@loaders.gl/tile-converter 3.0.13 → 3.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/dist.es5.min.js +3 -3
  2. package/dist/dist.es5.min.js.map +1 -1
  3. package/dist/dist.min.js +11 -11
  4. package/dist/dist.min.js.map +1 -1
  5. package/dist/es5/3d-tiles-converter/3d-tiles-converter.js +422 -184
  6. package/dist/es5/3d-tiles-converter/3d-tiles-converter.js.map +1 -1
  7. package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +299 -202
  8. package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
  9. package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js +8 -4
  10. package/dist/es5/3d-tiles-converter/helpers/i3s-obb-to-3d-tiles-obb.js.map +1 -1
  11. package/dist/es5/3d-tiles-converter/json-templates/tileset.js +17 -7
  12. package/dist/es5/3d-tiles-converter/json-templates/tileset.js.map +1 -1
  13. package/dist/es5/bundle.js +2 -2
  14. package/dist/es5/bundle.js.map +1 -1
  15. package/dist/es5/deps-installer/deps-installer.js +65 -17
  16. package/dist/es5/deps-installer/deps-installer.js.map +1 -1
  17. package/dist/es5/i3s-converter/helpers/coordinate-converter.js +16 -16
  18. package/dist/es5/i3s-converter/helpers/coordinate-converter.js.map +1 -1
  19. package/dist/es5/i3s-converter/helpers/create-scene-server-path.js +33 -9
  20. package/dist/es5/i3s-converter/helpers/create-scene-server-path.js.map +1 -1
  21. package/dist/es5/i3s-converter/helpers/geometry-attributes.js +103 -93
  22. package/dist/es5/i3s-converter/helpers/geometry-attributes.js.map +1 -1
  23. package/dist/es5/i3s-converter/helpers/geometry-converter.js +505 -344
  24. package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
  25. package/dist/es5/i3s-converter/helpers/node-debug.js +26 -30
  26. package/dist/es5/i3s-converter/helpers/node-debug.js.map +1 -1
  27. package/dist/es5/i3s-converter/helpers/node-pages.js +203 -102
  28. package/dist/es5/i3s-converter/helpers/node-pages.js.map +1 -1
  29. package/dist/es5/i3s-converter/i3s-converter.js +1510 -680
  30. package/dist/es5/i3s-converter/i3s-converter.js.map +1 -1
  31. package/dist/es5/i3s-converter/json-templates/layers.js +25 -15
  32. package/dist/es5/i3s-converter/json-templates/layers.js.map +1 -1
  33. package/dist/es5/i3s-converter/json-templates/metadata.js +1 -1
  34. package/dist/es5/i3s-converter/json-templates/metadata.js.map +1 -1
  35. package/dist/es5/i3s-converter/json-templates/node.js +21 -12
  36. package/dist/es5/i3s-converter/json-templates/node.js.map +1 -1
  37. package/dist/es5/i3s-converter/json-templates/scene-server.js +4 -2
  38. package/dist/es5/i3s-converter/json-templates/scene-server.js.map +1 -1
  39. package/dist/es5/i3s-converter/json-templates/shared-resources.js +55 -15
  40. package/dist/es5/i3s-converter/json-templates/shared-resources.js.map +1 -1
  41. package/dist/es5/i3s-converter/json-templates/store.js +4 -2
  42. package/dist/es5/i3s-converter/json-templates/store.js.map +1 -1
  43. package/dist/es5/i3s-server/app.js +6 -6
  44. package/dist/es5/i3s-server/app.js.map +1 -1
  45. package/dist/es5/i3s-server/controllers/index-controller.js +60 -20
  46. package/dist/es5/i3s-server/controllers/index-controller.js.map +1 -1
  47. package/dist/es5/i3s-server/routes/index.js +41 -14
  48. package/dist/es5/i3s-server/routes/index.js.map +1 -1
  49. package/dist/es5/index.js +4 -4
  50. package/dist/es5/lib/geoid-height-model.js +114 -100
  51. package/dist/es5/lib/geoid-height-model.js.map +1 -1
  52. package/dist/es5/lib/pgm-parser.js +122 -68
  53. package/dist/es5/lib/pgm-parser.js.map +1 -1
  54. package/dist/es5/lib/utils/compress-util.js +345 -123
  55. package/dist/es5/lib/utils/compress-util.js.map +1 -1
  56. package/dist/es5/lib/utils/file-utils.js +98 -20
  57. package/dist/es5/lib/utils/file-utils.js.map +1 -1
  58. package/dist/es5/lib/utils/lod-conversion-utils.js +9 -9
  59. package/dist/es5/lib/utils/lod-conversion-utils.js.map +1 -1
  60. package/dist/es5/lib/utils/statistic-utills.js +152 -41
  61. package/dist/es5/lib/utils/statistic-utills.js.map +1 -1
  62. package/dist/es5/pgm-loader.js +5 -3
  63. package/dist/es5/pgm-loader.js.map +1 -1
  64. package/dist/esm/i3s-converter/i3s-converter.js +11 -3
  65. package/dist/esm/i3s-converter/i3s-converter.js.map +1 -1
  66. package/dist/esm/pgm-loader.js +1 -1
  67. package/dist/scripts/converter.js +134 -71
  68. package/package.json +14 -14
  69. package/src/i3s-converter/i3s-converter.ts +10 -3
package/dist/dist.min.js CHANGED
@@ -1,24 +1,24 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=161)}([function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){},function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s}));var n={};function i(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function o(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(n),r.d(n,"dirname",(function(){return i})),r.d(n,"join",(function(){return o}));r(60);var s=r(143)},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r(10),i=r(1),o=r(65);async function s(t,e,r="index.json"){await n.promises.mkdir(t,{recursive:!0});const o=Object(i.join)(t,r);try{await n.promises.writeFile(o,e)}catch(t){throw t}return console.log(o+" saved."),o}async function a(t,e,r="index.json",n=!0){const i=await s(t,e,r);if(n){const t=await Object(o.a)(i);return await c(i),t}return i}function u(t){return n.promises.rmdir(t,{recursive:!0})}function c(t){return n.promises.unlink(t)}function l(e){return Object(i.isAbsolute)(e)?e:Object(i.join)(t.cwd(),e)}}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"f",(function(){return o})),r.d(e,"g",(function(){return s})),r.d(e,"d",(function(){return a})),r.d(e,"a",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"i",(function(){return l})),r.d(e,"b",(function(){return h})),r.d(e,"c",(function(){return f})),r.d(e,"h",(function(){return d}));const n=t=>"boolean"==typeof t,i=t=>"function"==typeof t,o=t=>null!==t&&"object"==typeof t,s=t=>o(t)&&t.constructor==={}.constructor,a=t=>t&&"function"==typeof t[Symbol.iterator],u=t=>t&&"function"==typeof t[Symbol.asyncIterator],c=t=>t&&i(t.next),l=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,h=t=>"undefined"!=typeof Blob&&t instanceof Blob,f=t=>t&&"object"==typeof t&&t.isBuffer,d=t=>(t=>"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||o(t)&&i(t.tee)&&i(t.cancel)&&i(t.getReader))(t)||(t=>o(t)&&i(t.read)&&i(t.pipe)&&n(t.readable))(t)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){const n=r(162);t.exports=n},function(t,e,r){"use strict";(function(t){
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=161)}([function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){},function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return s}));var n={};function i(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function o(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(n),r.d(n,"dirname",(function(){return i})),r.d(n,"join",(function(){return o}));r(53);var s=r(86)},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r(10),i=r(1),o=r(65);async function s(t,e,r="index.json"){await n.promises.mkdir(t,{recursive:!0});const o=Object(i.join)(t,r);try{await n.promises.writeFile(o,e)}catch(t){throw t}return console.log(o+" saved."),o}async function a(t,e,r="index.json",n=!0){const i=await s(t,e,r);if(n){const t=await Object(o.a)(i);return await c(i),t}return i}function u(t){return n.promises.rmdir(t,{recursive:!0})}function c(t){return n.promises.unlink(t)}function l(e){return Object(i.isAbsolute)(e)?e:Object(i.join)(t.cwd(),e)}}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"f",(function(){return o})),r.d(e,"g",(function(){return s})),r.d(e,"d",(function(){return a})),r.d(e,"a",(function(){return u})),r.d(e,"e",(function(){return c})),r.d(e,"i",(function(){return l})),r.d(e,"b",(function(){return h})),r.d(e,"c",(function(){return f})),r.d(e,"h",(function(){return d}));const n=t=>"boolean"==typeof t,i=t=>"function"==typeof t,o=t=>null!==t&&"object"==typeof t,s=t=>o(t)&&t.constructor==={}.constructor,a=t=>t&&"function"==typeof t[Symbol.iterator],u=t=>t&&"function"==typeof t[Symbol.asyncIterator],c=t=>t&&i(t.next),l=t=>"undefined"!=typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,h=t=>"undefined"!=typeof Blob&&t instanceof Blob,f=t=>t&&"object"==typeof t&&t.isBuffer,d=t=>(t=>"undefined"!=typeof ReadableStream&&t instanceof ReadableStream||o(t)&&i(t.tee)&&i(t.cancel)&&i(t.getReader))(t)||(t=>o(t)&&i(t.read)&&i(t.pipe)&&n(t.readable))(t)},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){const n=r(162);t.exports=n},function(t,e,r){"use strict";(function(t){
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
5
5
  * @author Feross Aboukhadijeh <http://feross.org>
6
6
  * @license MIT
7
7
  */
8
- var n=r(164),i=r(165),o=r(86);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return G(F(e,t.length-r),t,r,n)}function v(t,e,r,n){return G(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return v(t,e,r,n)}function S(t,e,r,n){return G(z(e),t,r,n)}function A(t,e,r,n){return G(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function D(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:F(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(7))},function(t,e){},function(t,e,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,r)}(t,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,a;if(c(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):_(i,i.length)}function g(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function _(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=_(u,c);for(r=0;r<c;++r)o(l[r],this,e)}return!0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return c(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,s;if(c(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<o;u=n[++r])g(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=l(t,i,n)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(_(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return h(r)}var c,w="",A=!1,T=["{","}"];(d(r)&&(A=!0,T=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(w=" "+RegExp.prototype.toString.call(r)),v(r)&&(w=" "+Date.prototype.toUTCString.call(r)),E(r)&&(w=" "+h(r)),0!==s.length||A&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=A?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)x(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return f(t,r,n,a,e,A)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,w,T)):T[0]+w+T[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function g(t){return null===t}function _(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===A(t)}function w(t){return"object"==typeof t&&null!==t}function v(t){return w(t)&&"[object Date]"===A(t)}function E(t){return w(t)&&("[object Error]"===A(t)||t instanceof Error)}function S(t){return"function"==typeof t}function A(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(y(o)&&(o=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;s[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else s[r]=function(){};return s[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=_,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=b,e.isObject=w,e.isDate=v,e.isError=E,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(177);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(178),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),k&&Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=k,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(I,e,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(0))},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(170).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"d",(function(){return a})),r.d(e,"c",(function(){return u}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,u="undefined"!=typeof window&&void 0!==window.orientation,c=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);c&&parseFloat(c[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(27);function i(t){var e;if(!t)return!1;Array.isArray(t)&&(t=t[0]);return Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions)}function o(t){var e,r;let o;return Object(n.a)(t,"null loader"),Object(n.a)(i(t),"invalid loader"),Array.isArray(t)&&(o=t[1],t=t[0],t={...t,options:{...t.options,...o}}),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(r=t)&&void 0!==r&&r.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}},function(t,e,r){"use strict";r.d(e,"b",(function(){return x})),r.d(e,"c",(function(){return I})),r.d(e,"a",(function(){return C}));var n=r(19),i=r(4),o=r(47),s=r(148);const a=Object(s.a)();class u{constructor(t,e,r="sessionStorage"){this.storage=function(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch(t){return null}}(r),this.id=t,this.config={},Object.assign(this.config,e),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){return this.config={},this.updateConfiguration(t)}updateConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function c(t,e,r,n=600){const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));const o=t.width*r,s=t.height*r,a=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}const l={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function h(t){return"string"==typeof t?l[t.toUpperCase()]||l.WHITE:t}function f(t,e){if(!t)throw new Error(e||"Assertion failed")}var d=r(24);function p(){let t;if(a&&d.b.performance)t=d.b.performance.now();else if(d.a.hrtime){const e=d.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const g={debug:a&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},_={enabled:!0,level:0};function m(){}const y={},b={once:!0};function w(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}class v{constructor({id:t}={id:""}){this.id=t,this.VERSION="3.0.13",this._startTs=p(),this._deltaTs=p(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new u("__probe-".concat(this.id,"__"),_),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r);for(const r of n)"function"==typeof t[r]&&(e.find(t=>r===t)||(t[r]=t[r].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((p()-this._startTs).toPrecision(10))}getDelta(){return Number((p()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){f(t,e)}warn(t){return this._getLogFunction(0,t,g.warn,arguments,b)}error(t){return this._getLogFunction(0,t,g.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,g.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,g.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,g.debug||g.info,arguments,b)}table(t,e,r){return e?this._getLogFunction(t,e,console.table||m,r&&[r],{tag:w(e)}):m}image({logLevel:t,priority:e,image:n,message:i="",scale:o=1}){return this._shouldLog(t||e)?a?function({image:t,message:e="",scale:r=1}){if("string"==typeof t){const n=new Image;return n.onload=()=>{const t=c(n,e,r);console.log(...t)},n.src=t,m}const n=t.nodeName||"";if("img"===n.toLowerCase())return console.log(...c(t,e,r)),m;if("canvas"===n.toLowerCase()){const n=new Image;return n.onload=()=>console.log(...c(n,e,r)),n.src=t.toDataURL(),m}return m}({image:n,message:i,scale:o}):function({image:t,message:e="",scale:n=1}){let i=null;try{i=r(259)}catch(t){}if(i)return()=>i(t,{fit:"box",width:"".concat(Math.round(80*n),"%")}).then(t=>console.log(t));return m}({image:n,message:i,scale:o}):m}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||m)}group(t,e,r={collapsed:!1}){r=S({logLevel:t,message:e,opts:r});const{collapsed:n}=r;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,r={}){return this.group(t,e,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||m)}withGroup(t,e,r){this.group(t,e)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=E(t)}_getLogFunction(t,e,r,n=[],i){if(this._shouldLog(t)){i=S({logLevel:t,message:e,args:n,opts:i}),f(r=r||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=p();const o=i.tag||i.message;if(i.once){if(y[o])return m;y[o]=p()}return e=function(t,e,r){if("string"==typeof e){const s=r.time?function(t,e=8){const r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(r.total)):"";e=r.time?"".concat(t,": ").concat(s," ").concat(e):"".concat(t,": ").concat(e),n=e,i=r.color,o=r.background,a||"string"!=typeof n||(i&&(i=h(i),n="[".concat(i,"m").concat(n,"")),o&&(i=h(o),n="[".concat(o+10,"m").concat(n,""))),e=n}var n,i,o;return e}(this.id,i.message,i),r.bind(console,e,...i.args)}return m}}function E(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return f(Number.isFinite(e)&&e>=0),e}function S(t){const{logLevel:e,message:r}=t;t.logLevel=E(e);const n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(t.args=n,typeof e){case"string":case"function":void 0!==r&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return f("string"===i||"object"===i),Object.assign(t,t.opts)}v.VERSION="3.0.13";const A=new v({id:"loaders.gl"});class T{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}const R={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){var t,e,r;r=void 0,(e="console")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},O={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function x(){n.a.loaders=n.a.loaders||{};const{loaders:t}=n.a;return t._state=t._state||{},t._state}const k=()=>{const t=x();return t.globalOptions=t.globalOptions||{...R},t.globalOptions};function I(t,e,r,n){return r=r||[],function(t,e){M(t,null,R,O,e);for(const r of e){const n=t&&t[r.id]||{},i=r.options&&r.options[r.id]||{},o=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};M(n,r.id,i,o,e)}}(t,r=Array.isArray(r)?r:[r]),P(e,t,n)}function C(t,e){const r=k(),n=t||r;return"function"==typeof n.fetch?n.fetch:Object(i.f)(n.fetch)?t=>Object(o.a)(t,n):null!=e&&e.fetch?null==e?void 0:e.fetch:o.a}function M(t,e,r,n,o){const s=e||"Top level",a=e?e+".":"";for(const u in t){const c=!e&&Object(i.f)(t[u]),l="baseUri"===u&&!e,h="workerUrl"===u&&e;if(!(u in r)&&!l&&!h)if(u in n)A.warn(`${s} loader option '${a}${u}' no longer supported, use '${n[u]}'`)();else if(!c){const t=D(u,o);A.warn(`${s} loader option '${a}${u}' not recognized. ${t}`)()}}}function D(t,e){const r=t.toLowerCase();let n="";for(const i of e)for(const e in i.options){if(t===e)return`Did you mean '${i.id}.${e}'?`;const o=e.toLowerCase();(r.startsWith(o)||o.startsWith(r))&&(n=n||`Did you mean '${i.id}.${e}'?`)}return n}function P(t,e,r){const n={...t.options||{}};return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(n,r),null===n.log&&(n.log=new T),L(n,k()),L(n,e),n}function L(t,e){for(const r in e)if(r in e){const n=e[r];Object(i.g)(n)&&Object(i.g)(t[r])?t[r]={...t[r],...e[r]}:t[r]=e[r]}}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);a&&parseFloat(a[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return a})),r.d(e,"d",(function(){return u}));var n=r(26);function i(t){if(n.b(t)&&(t=n.a(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"==typeof t){const e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"==typeof t&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function o(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;const n=new Uint8Array(t),i=new Uint8Array(e);for(let t=0;t<n.length;++t)if(n[t]!==i[t])return!1;return!0}function s(...t){const e=t.map(t=>t instanceof ArrayBuffer?new Uint8Array(t):t),r=e.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(r);let i=0;for(const t of e)n.set(t,i),i+=t.byteLength;return n.buffer}function a(...t){const e=t,r=e&&e.length>1&&e[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');const n=new r(e.reduce((t,e)=>t+e.length,0));let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}function u(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}},function(t,e,r){"use strict";r.d(e,"b",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r(4);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function s(t){const e=o.exec(t);return e?e[1]:t}function a(t){const e=i.exec(t);return e?e[1]:""}const u=/\?.*/;function c(t){if(Object(n.i)(t)){const e=h(t.url||"");return{url:e,type:s(t.headers.get("content-type")||"")||a(e)}}return Object(n.b)(t)?{url:h(t.name||""),type:t.type||""}:"string"==typeof t?{url:h(t),type:a(t)}:{url:"",type:""}}function l(t){return Object(n.i)(t)?t.headers["content-length"]||-1:Object(n.b)(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function h(t){return t.replace(u,"")}},,function(t,e,r){"use strict";var n=r(55),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=Object.create(r(42));o.inherits=r(5);var s=r(87),a=r(71);o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){"use strict";(function(t,n){r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document,process:"object"==typeof n&&n},o=i.window||i.self||i.global,s=i.process||{};console}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));let n="";const i={};function o(t){for(const e in i)if(t.startsWith(e)){const r=i[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${n}${t}`),t}},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(48);function i(t){return t&&"object"==typeof t&&t.isBuffer}function o(t){return n.toBuffer?n.toBuffer(t):t}function s(t){return n.toArrayBuffer?n.toArrayBuffer(t):t}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"loader assertion failed.")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window,s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);a&&parseFloat(a[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(4),i=r(21);async function o(t){if(Object(n.i)(t))return t;const e={},r=Object(i.a)(t);r>=0&&(e["content-length"]=String(r));const{url:o,type:s}=Object(i.b)(t);s&&(e["content-type"]=s);const a=await async function(t){if("string"==typeof t)return"data:,"+t.slice(0,5);if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const r=new FileReader;r.onload=e=>{var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},r.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return"data:base64,"+function(t){let e="";const r=new Uint8Array(t);for(let t=0;t<r.byteLength;t++)e+=String.fromCharCode(r[t]);return btoa(e)}(e)}return null}(t);a&&(e["x-first-bytes"]=a),"string"==typeof t&&(t=(new TextEncoder).encode(t));const u=new Response(t,{headers:e});return Object.defineProperty(u,"url",{value:o}),u}async function s(t){if(!t.ok){const e=await async function(t){let e=`Failed to fetch resource ${t.url} (${t.status}): `;try{const r=t.headers.get("Content-Type");let n=t.statusText;r.includes("application/json")&&(n+=" "+await t.text()),e+=n,e=e.length>60?e.slice(60)+"...":e}catch(t){}return e}(t);throw new Error(e)}}},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(7))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(102),o=r(106);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(114),o=r(118);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(123),o=r(127);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(130),o=r(134);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(137),o=r(141);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}));var n=r(27);function i(t,e){return Object(n.a)(t>=0),Object(n.a)(e>0),t+(e-1)&~(e-1)}function o(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+i(n.byteLength,4)}},function(t,e){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=Buffer.isBuffer},function(t,e,r){"use strict";(function(e){var n=r(176);
8
+ var n=r(164),i=r(165),o=r(88);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function g(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return k(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return x(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function _(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return G(F(e,t.length-r),t,r,n)}function v(t,e,r,n){return G(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return v(t,e,r,n)}function S(t,e,r,n){return G(z(e),t,r,n)}function A(t,e,r,n){return G(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)_(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)_(this,e,e+3),_(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)_(this,e,e+7),_(this,e+1,e+6),_(this,e+2,e+5),_(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):g.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function k(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function D(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function L(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function B(t,e,r,n,o){return o||L(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return o||L(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||M(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);M(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return B(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return B(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:F(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function G(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(7))},function(t,e){},function(t,e,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,r)}(t,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,a;if(c(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):_(i,i.length)}function g(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function _(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=_(u,c);for(r=0;r<c;++r)o(l[r],this,e)}return!0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return c(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,s;if(c(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},a.prototype.listenerCount=g,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<o;u=n[++r])g(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&S(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return m(i)||(i=l(t,i,n)),i}var o=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(_(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),E(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(S(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(b(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return h(r)}var c,w="",A=!1,T=["{","}"];(d(r)&&(A=!0,T=["[","]"]),S(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(w=" "+RegExp.prototype.toString.call(r)),v(r)&&(w=" "+Date.prototype.toUTCString.call(r)),E(r)&&(w=" "+h(r)),0!==s.length||A&&0!=r.length?n<0?b(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=A?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)x(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return f(t,r,n,a,e,A)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,w,T)):T[0]+w+T[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),x(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=g(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),y(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function g(t){return null===t}function _(t){return"number"==typeof t}function m(t){return"string"==typeof t}function y(t){return void 0===t}function b(t){return w(t)&&"[object RegExp]"===A(t)}function w(t){return"object"==typeof t&&null!==t}function v(t){return w(t)&&"[object Date]"===A(t)}function E(t){return w(t)&&("[object Error]"===A(t)||t instanceof Error)}function S(t){return"function"==typeof t}function A(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(y(o)&&(o=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;s[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else s[r]=function(){};return s[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=g,e.isNullOrUndefined=function(t){return null==t},e.isNumber=_,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=y,e.isRegExp=b,e.isObject=w,e.isDate=v,e.isError=E,e.isFunction=S,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(177);var R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function O(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),R[t.getMonth()],e].join(" ")}function x(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",O(),e.format.apply(e,arguments))},e.inherits=r(178),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var k="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(k&&t[k]){var e;if("function"!=typeof(e=t[k]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),k&&Object.defineProperty(e,k,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=k,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(I,e,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(0))},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";var n=r(170).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},,function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"d",(function(){return a})),r.d(e,"c",(function(){return u}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,u="undefined"!=typeof window&&void 0!==window.orientation,c=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);c&&parseFloat(c[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(27);function i(t){var e;if(!t)return!1;Array.isArray(t)&&(t=t[0]);return Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions)}function o(t){var e,r;let o;return Object(n.a)(t,"null loader"),Object(n.a)(i(t),"invalid loader"),Array.isArray(t)&&(o=t[1],t=t[0],t={...t,options:{...t.options,...o}}),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(r=t)&&void 0!==r&&r.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}},function(t,e,r){"use strict";r.d(e,"b",(function(){return x})),r.d(e,"c",(function(){return I})),r.d(e,"a",(function(){return C}));var n=r(19),i=r(4),o=r(47),s=r(148);const a=Object(s.a)();class u{constructor(t,e,r="sessionStorage"){this.storage=function(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch(t){return null}}(r),this.id=t,this.config={},Object.assign(this.config,e),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){return this.config={},this.updateConfiguration(t)}updateConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function c(t,e,r,n=600){const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));const o=t.width*r,s=t.height*r,a=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}const l={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function h(t){return"string"==typeof t?l[t.toUpperCase()]||l.WHITE:t}function f(t,e){if(!t)throw new Error(e||"Assertion failed")}var d=r(24);function p(){let t;if(a&&d.b.performance)t=d.b.performance.now();else if(d.a.hrtime){const e=d.a.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const g={debug:a&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},_={enabled:!0,level:0};function m(){}const y={},b={once:!0};function w(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}class v{constructor({id:t}={id:""}){this.id=t,this.VERSION="3.0.14",this._startTs=p(),this._deltaTs=p(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new u("__probe-".concat(this.id,"__"),_),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r);for(const r of n)"function"==typeof t[r]&&(e.find(t=>r===t)||(t[r]=t[r].bind(t)))}(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((p()-this._startTs).toPrecision(10))}getDelta(){return Number((p()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){f(t,e)}warn(t){return this._getLogFunction(0,t,g.warn,arguments,b)}error(t){return this._getLogFunction(0,t,g.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,g.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,g.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,g.debug||g.info,arguments,b)}table(t,e,r){return e?this._getLogFunction(t,e,console.table||m,r&&[r],{tag:w(e)}):m}image({logLevel:t,priority:e,image:n,message:i="",scale:o=1}){return this._shouldLog(t||e)?a?function({image:t,message:e="",scale:r=1}){if("string"==typeof t){const n=new Image;return n.onload=()=>{const t=c(n,e,r);console.log(...t)},n.src=t,m}const n=t.nodeName||"";if("img"===n.toLowerCase())return console.log(...c(t,e,r)),m;if("canvas"===n.toLowerCase()){const n=new Image;return n.onload=()=>console.log(...c(n,e,r)),n.src=t.toDataURL(),m}return m}({image:n,message:i,scale:o}):function({image:t,message:e="",scale:n=1}){let i=null;try{i=r(259)}catch(t){}if(i)return()=>i(t,{fit:"box",width:"".concat(Math.round(80*n),"%")}).then(t=>console.log(t));return m}({image:n,message:i,scale:o}):m}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||m)}group(t,e,r={collapsed:!1}){r=S({logLevel:t,message:e,opts:r});const{collapsed:n}=r;return r.method=(n?console.groupCollapsed:console.group)||console.info,this._getLogFunction(r)}groupCollapsed(t,e,r={}){return this.group(t,e,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||m)}withGroup(t,e,r){this.group(t,e)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=E(t)}_getLogFunction(t,e,r,n=[],i){if(this._shouldLog(t)){i=S({logLevel:t,message:e,args:n,opts:i}),f(r=r||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=p();const o=i.tag||i.message;if(i.once){if(y[o])return m;y[o]=p()}return e=function(t,e,r){if("string"==typeof e){const s=r.time?function(t,e=8){const r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(r.total)):"";e=r.time?"".concat(t,": ").concat(s," ").concat(e):"".concat(t,": ").concat(e),n=e,i=r.color,o=r.background,a||"string"!=typeof n||(i&&(i=h(i),n="[".concat(i,"m").concat(n,"")),o&&(i=h(o),n="[".concat(o+10,"m").concat(n,""))),e=n}var n,i,o;return e}(this.id,i.message,i),r.bind(console,e,...i.args)}return m}}function E(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return f(Number.isFinite(e)&&e>=0),e}function S(t){const{logLevel:e,message:r}=t;t.logLevel=E(e);const n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(t.args=n,typeof e){case"string":case"function":void 0!==r&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const i=typeof t.message;return f("string"===i||"object"===i),Object.assign(t,t.opts)}v.VERSION="3.0.14";const A=new v({id:"loaders.gl"});class T{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}const R={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){var t,e,r;r=void 0,(e="console")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},O={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function x(){n.a.loaders=n.a.loaders||{};const{loaders:t}=n.a;return t._state=t._state||{},t._state}const k=()=>{const t=x();return t.globalOptions=t.globalOptions||{...R},t.globalOptions};function I(t,e,r,n){return r=r||[],function(t,e){M(t,null,R,O,e);for(const r of e){const n=t&&t[r.id]||{},i=r.options&&r.options[r.id]||{},o=r.deprecatedOptions&&r.deprecatedOptions[r.id]||{};M(n,r.id,i,o,e)}}(t,r=Array.isArray(r)?r:[r]),P(e,t,n)}function C(t,e){const r=k(),n=t||r;return"function"==typeof n.fetch?n.fetch:Object(i.f)(n.fetch)?t=>Object(o.a)(t,n):null!=e&&e.fetch?null==e?void 0:e.fetch:o.a}function M(t,e,r,n,o){const s=e||"Top level",a=e?e+".":"";for(const u in t){const c=!e&&Object(i.f)(t[u]),l="baseUri"===u&&!e,h="workerUrl"===u&&e;if(!(u in r)&&!l&&!h)if(u in n)A.warn(`${s} loader option '${a}${u}' no longer supported, use '${n[u]}'`)();else if(!c){const t=D(u,o);A.warn(`${s} loader option '${a}${u}' not recognized. ${t}`)()}}}function D(t,e){const r=t.toLowerCase();let n="";for(const i of e)for(const e in i.options){if(t===e)return`Did you mean '${i.id}.${e}'?`;const o=e.toLowerCase();(r.startsWith(o)||o.startsWith(r))&&(n=n||`Did you mean '${i.id}.${e}'?`)}return n}function P(t,e,r){const n={...t.options||{}};return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(n,r),null===n.log&&(n.log=new T),L(n,k()),L(n,e),n}function L(t,e){for(const r in e)if(r in e){const n=e[r];Object(i.g)(n)&&Object(i.g)(t[r])?t[r]={...t[r],...e[r]}:t[r]=e[r]}}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);a&&parseFloat(a[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"e",(function(){return i})),r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return a})),r.d(e,"d",(function(){return u}));var n=r(26);function i(t){if(n.b(t)&&(t=n.a(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"==typeof t){const e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"==typeof t&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function o(t,e,r){if(r=r||t.byteLength,t.byteLength<r||e.byteLength<r)return!1;const n=new Uint8Array(t),i=new Uint8Array(e);for(let t=0;t<n.length;++t)if(n[t]!==i[t])return!1;return!0}function s(...t){const e=t.map(t=>t instanceof ArrayBuffer?new Uint8Array(t):t),r=e.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(r);let i=0;for(const t of e)n.set(t,i),i+=t.byteLength;return n.buffer}function a(...t){const e=t,r=e&&e.length>1&&e[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');const n=new r(e.reduce((t,e)=>t+e.length,0));let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}function u(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}},function(t,e,r){"use strict";r.d(e,"b",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r(4);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function s(t){const e=o.exec(t);return e?e[1]:t}function a(t){const e=i.exec(t);return e?e[1]:""}const u=/\?.*/;function c(t){if(Object(n.i)(t)){const e=h(t.url||"");return{url:e,type:s(t.headers.get("content-type")||"")||a(e)}}return Object(n.b)(t)?{url:h(t.name||""),type:t.type||""}:"string"==typeof t?{url:h(t),type:a(t)}:{url:"",type:""}}function l(t){return Object(n.i)(t)?t.headers["content-length"]||-1:Object(n.b)(t)?t.size:"string"==typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function h(t){return t.replace(u,"")}},,function(t,e,r){"use strict";var n=r(56),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=Object.create(r(42));o.inherits=r(5);var s=r(89),a=r(71);o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){"use strict";(function(t,n){r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document,process:"object"==typeof n&&n},o=i.window||i.self||i.global,s=i.process||{};console}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));let n="";const i={};function o(t){for(const e in i)if(t.startsWith(e)){const r=i[e];t=t.replace(e,r)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${n}${t}`),t}},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(48);function i(t){return t&&"object"==typeof t&&t.isBuffer}function o(t){return n.toBuffer?n.toBuffer(t):t}function s(t){return n.toArrayBuffer?n.toArrayBuffer(t):t}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"loader assertion failed.")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window,s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);a&&parseFloat(a[1])}).call(this,r(7),r(0))},function(t,e,r){"use strict";r.d(e,"b",(function(){return o})),r.d(e,"a",(function(){return s}));var n=r(4),i=r(21);async function o(t){if(Object(n.i)(t))return t;const e={},r=Object(i.a)(t);r>=0&&(e["content-length"]=String(r));const{url:o,type:s}=Object(i.b)(t);s&&(e["content-type"]=s);const a=await async function(t){if("string"==typeof t)return"data:,"+t.slice(0,5);if(t instanceof Blob){const e=t.slice(0,5);return await new Promise(t=>{const r=new FileReader;r.onload=e=>{var r;return t(null==e||null===(r=e.target)||void 0===r?void 0:r.result)},r.readAsDataURL(e)})}if(t instanceof ArrayBuffer){const e=t.slice(0,5);return"data:base64,"+function(t){let e="";const r=new Uint8Array(t);for(let t=0;t<r.byteLength;t++)e+=String.fromCharCode(r[t]);return btoa(e)}(e)}return null}(t);a&&(e["x-first-bytes"]=a),"string"==typeof t&&(t=(new TextEncoder).encode(t));const u=new Response(t,{headers:e});return Object.defineProperty(u,"url",{value:o}),u}async function s(t){if(!t.ok){const e=await async function(t){let e=`Failed to fetch resource ${t.url} (${t.status}): `;try{const r=t.headers.get("Content-Type");let n=t.statusText;r.includes("application/json")&&(n+=" "+await t.text()),e+=n,e=e.length>60?e.slice(60)+"...":e}catch(t){}return e}(t);throw new Error(e)}}},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(7))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(104),o=r(108);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(116),o=r(120);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(125),o=r(129);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(132),o=r(136);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(139),o=r(143);r(5)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}));var n=r(27);function i(t,e){return Object(n.a)(t>=0),Object(n.a)(e>0),t+(e-1)&~(e-1)}function o(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+i(n.byteLength,4)}},function(t,e){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=Buffer.isBuffer},function(t,e,r){"use strict";(function(e){var n=r(176);
9
9
  /*!
10
10
  * The buffer module from node.js, for the browser.
11
11
  *
12
12
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
13
13
  * @license MIT
14
- */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=r(12),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function h(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=t.exports=y,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(s.isFunction(t)){if(c)return t.name;var e=t.toString().match(d);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function _(t){if(c||!s.isFunction(t))return s.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function y(t,e){t||m(t,!0,e,"==",f.ok)}function b(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),b(t,e,r);var a,c,l=S(t),h=S(e);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),c=l.length-1;c>=0;c--)if(l[c]!==h[c])return!1;for(c=l.length-1;c>=0;c--)if(a=l[c],!b(t[a],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function E(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&i&&!r;if((!t&&s.isError(i)&&o&&v(i,r)||a)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}f.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(_(t.actual),128)+" "+t.operator+" "+g(_(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){b(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){b(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){b(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){E(!0,t,e,r)},f.doesNotThrow=function(t,e,r){E(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n((function t(e,r){e||m(e,!0,r,"==",t)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var S=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this,r(7))},function(t,e,r){var n=r(94),i=r(1),o=(r(12),r(196)),s=r(96),a=r(197),u=r(53).Stream,c=r(54).PassThrough,l=t.exports={};l.file=r(198),l.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",(function(t){r.push(t),n+=t.length})),t.on("end",(function(){var t=new Buffer(n),i=0;r.forEach((function(e){e.copy(t,i),i+=e.length})),e(null,t)}))},l.dateify=function(t){return t=(t=t||new Date)instanceof Date?t:"string"==typeof t?new Date(t):new Date},l.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},a(...n)},l.isStream=function(t){return t instanceof u},l.lazyReadStream=function(t){return new o.Readable((function(){return n.createReadStream(t)}))},l.normalizeInputSource=function(t){if(null===t)return new Buffer(0);if("string"==typeof t)return new Buffer(t);if(l.isStream(t)&&!t._readableState){var e=new c;return t.pipe(e),e}return t},l.sanitizePath=function(t){return s(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},l.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},l.unixifyPath=function(t){return s(t,!1).replace(/^\w+:/,"")},l.walkdir=function(t,e,r){var o=[];"function"==typeof e&&(r=e,e=t),n.readdir(t,(function(s,a){var u,c,h=0;if(s)return r(s);!function s(){if(!(u=a[h++]))return r(null,o);c=i.join(t,u),n.stat(c,(function(t,r){o.push({path:c,relative:i.relative(e,c).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?l.walkdir(c,e,(function(t,e){e.forEach((function(t){o.push(t)})),s()})):s()}))}()}))}},function(t,e,r){"use strict";function n(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return i(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return i(t,0,e)}return""}function i(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(n.getUint8(e+t));return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t){function n(){let e;if("undefined"!=typeof window&&window.performance)e=window.performance.now();else if(void 0!==t&&t.hrtime){const r=t.hrtime();e=1e3*r[0]+r[1]/1e6}else e=Date.now();return e}r.d(e,"a",(function(){return n}))}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(25),i=r(29);async function o(t,e){if("string"==typeof t){t=Object(n.a)(t);let r=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(r=e.fetch),await fetch(t,r)}return await Object(i.b)(t)}},function(t,e){},function(t,e){},,,function(t,e){const r=t=>null==t;t.exports={has:(t,e)=>{const r=e.split(".");let n=!0,i=Object.assign({},t);return r.forEach(t=>{n=i&&n&&Object.keys(i).indexOf(t)>-1,i=i[t]}),n},get:(t,e)=>{const n=e.split(".");let i=Object.assign({},t);return n.forEach(t=>{i=i&&!r(i[t])?i[t]:void 0}),i},set:(t,e,r)=>{let n=t;const i=e.split(".");return i.forEach((t,e)=>{n[t]||(n[t]=e==i.length-1?r:{}),n=n[t]}),t},isUndefined:r}},function(t,e,r){t.exports=i;var n=r(11).EventEmitter;function i(){n.call(this)}r(5)(i,n),i.Readable=r(54),i.Writable=r(172),i.Duplex=r(173),i.Transform=r(174),i.PassThrough=r(91),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(87)).Stream=e,e.Readable=e,e.Writable=r(71),e.Duplex=r(23),e.Transform=r(90),e.PassThrough=r(171)},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,r(0))},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(169),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(7))},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},s={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(n)},function(t,e,r){t.exports=l,l.Minimatch=h;var n={sep:"/"};try{n=r(1)}catch(t){}var i=l.GLOBSTAR=h.GLOBSTAR={},o=r(189),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(t,e){return t[e]=!0,t}),{});var u=/\/+/;function c(t,e){t=t||{},e=e||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function l(t,e,r){if("string"!=typeof e)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===e.charAt(0))&&(""===e.trim()?""===t:new h(e,r).match(t))}function h(t,e){if(!(this instanceof h))return new h(t,e);if("string"!=typeof t)throw new TypeError("glob pattern string required");e||(e={}),t=t.trim(),"/"!==n.sep&&(t=t.split(n.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function f(t,e){if(e||(e=this instanceof h?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:o(t)}l.filter=function(t,e){return e=e||{},function(r,n,i){return l(r,t,e)}},l.defaults=function(t){if(!t||!Object.keys(t).length)return l;var e=l,r=function(r,n,i){return e.minimatch(r,n,c(t,i))};return r.Minimatch=function(r,n){return new e.Minimatch(r,c(t,n))},r},h.defaults=function(t){return t&&Object.keys(t).length?l.defaults(t).Minimatch:h},h.prototype.debug=function(){},h.prototype.make=function(){if(this._made)return;var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(t){return t.split(u)})),this.debug(this.pattern,r),r=r.map((function(t,e,r){return t.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(t){return-1===t.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},h.prototype.parseNegate=function(){var t=this.pattern,e=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,o=t.length;i<o&&"!"===t.charAt(i);i++)e=!e,n++;n&&(this.pattern=t.substr(n));this.negate=e},l.braceExpand=function(t,e){return f(t,e)},h.prototype.braceExpand=f,h.prototype.parse=function(t,e){if(t.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===t)return i;if(""===t)return"";var n,o="",u=!!r.nocase,c=!1,l=[],h=[],f=!1,p=-1,g=-1,_="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function y(){if(n){switch(n){case"*":o+="[^/]*?",u=!0;break;case"?":o+="[^/]",u=!0;break;default:o+="\\"+n}m.debug("clearStateChar %j %j",n,o),n=!1}}for(var b,w=0,v=t.length;w<v&&(b=t.charAt(w));w++)if(this.debug("%s\t%s %s %j",t,w,o,b),c&&a[b])o+="\\"+b,c=!1;else switch(b){case"/":return!1;case"\\":y(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,w,o,b),f){this.debug(" in class"),"!"===b&&w===g+1&&(b="^"),o+=b;continue}m.debug("call clearStateChar %j",n),y(),n=b,r.noext&&y();continue;case"(":if(f){o+="(";continue}if(!n){o+="\\(";continue}l.push({type:n,start:w-1,reStart:o.length,open:s[n].open,close:s[n].close}),o+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,o),n=!1;continue;case")":if(f||!l.length){o+="\\)";continue}y(),u=!0;var E=l.pop();o+=E.close,"!"===E.type&&h.push(E),E.reEnd=o.length;continue;case"|":if(f||!l.length||c){o+="\\|",c=!1;continue}y(),o+="|";continue;case"[":if(y(),f){o+="\\"+b;continue}f=!0,g=w,p=o.length,o+=b;continue;case"]":if(w===g+1||!f){o+="\\"+b,c=!1;continue}if(f){var S=t.substring(g+1,w);try{RegExp("["+S+"]")}catch(t){var A=this.parse(S,d);o=o.substr(0,p)+"\\["+A[0]+"\\]",u=u||A[1],f=!1;continue}}u=!0,f=!1,o+=b;continue;default:y(),c?c=!1:!a[b]||"^"===b&&f||(o+="\\"),o+=b}f&&(S=t.substr(g+1),A=this.parse(S,d),o=o.substr(0,p)+"\\["+A[0],u=u||A[1]);for(E=l.pop();E;E=l.pop()){var T=o.slice(E.reStart+E.open.length);this.debug("setting tail",o,E),T=T.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,r){return r||(r="\\"),e+e+r+"|"})),this.debug("tail=%j\n %s",T,T,E,o);var R="*"===E.type?"[^/]*?":"?"===E.type?"[^/]":"\\"+E.type;u=!0,o=o.slice(0,E.reStart)+R+"\\("+T}y(),c&&(o+="\\\\");var O=!1;switch(o.charAt(0)){case".":case"[":case"(":O=!0}for(var x=h.length-1;x>-1;x--){var k=h[x],I=o.slice(0,k.reStart),C=o.slice(k.reStart,k.reEnd-8),M=o.slice(k.reEnd-8,k.reEnd),D=o.slice(k.reEnd);M+=D;var P=I.split("(").length-1,L=D;for(w=0;w<P;w++)L=L.replace(/\)[+*?]?/,"");var B="";""===(D=L)&&e!==d&&(B="$"),o=I+C+D+B+M}""!==o&&u&&(o="(?=.)"+o);O&&(o=_+o);if(e===d)return[o,u];if(!u)return function(t){return t.replace(/\\(.)/g,"$1")}(t);var N=r.nocase?"i":"";try{var j=new RegExp("^"+o+"$",N)}catch(t){return new RegExp("$.")}return j._glob=t,j._src=o,j};var d={};l.makeRe=function(t,e){return new h(t,e||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"",o=t.map((function(t){return t.map((function(t){return t===i?r:"string"==typeof t?function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(t):t._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch(t){this.regexp=!1}return this.regexp},l.match=function(t,e,r){var n=new h(e,r=r||{});return t=t.filter((function(t){return n.match(t)})),n.options.nonull&&!t.length&&t.push(e),t},h.prototype.match=function(t,e){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var r=this.options;"/"!==n.sep&&(t=t.split(n.sep).join("/"));t=t.split(u),this.debug(this.pattern,"split",t);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=t.length-1;o>=0&&!(i=t[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=t;if(r.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},h.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,u=e.length;o<a&&s<u;o++,s++){this.debug("matchOne loop");var c,l=e[s],h=t[o];if(this.debug(e,l,h),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[e,l,h]);var f=o,d=s+1;if(d===u){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!n.dot&&"."===t[o].charAt(0))return!1;return!0}for(;f<a;){var p=t[f];if(this.debug("\nglobstar while",t,f,e,d,p),this.matchOne(t.slice(f),e.slice(d),r))return this.debug("globstar found match!",f,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,f,e,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",t,f,e,d),f!==a))}if("string"==typeof l?(c=n.nocase?h.toLowerCase()===l.toLowerCase():h===l,this.debug("string match",l,h,c)):(c=h.match(l),this.debug("pattern match",l,h,c)),!c)return!1}if(o===a&&s===u)return!0;if(o===a)return r;if(s===u)return o===a-1&&""===t[o];throw new Error("wtf?")}},function(t,e,r){(e=t.exports=r(137)).Stream=e,e.Readable=e,e.Writable=r(141),e.Duplex=r(40),e.Transform=r(142),e.PassThrough=r(253),e.finished=r(80),e.pipeline=r(254)},function(t,e){},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let i="";for(let t=0;t<n;++t)i+=" ";return t+i}function i(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r.charCodeAt(i));return e+n}function o(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r[i]);return e+n}r.d(e,"c",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}))},function(t,e,r){"use strict";(function(t){var n=r(9).Buffer,i=r(53).Transform,o=r(175),s=r(12),a=r(43).ok,u=r(9).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(o),h=0;h<l.length;h++){var f=l[h];f.match(/^Z/)&&Object.defineProperty(e,f,{enumerable:!0,value:o[f],writable:!1})}for(var d={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},p=Object.keys(d),g=0;g<p.length;g++){var _=p[g];d[d[_]]=_}function m(t,e,r){var i=[],o=0;function s(){for(var e;null!==(e=t.read());)i.push(e),o+=e.length;t.once("readable",s)}function a(){var e,s=null;o>=u?s=new RangeError(c):e=n.concat(i,o),i=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function y(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function b(t){if(!(this instanceof b))return new b(t);O.call(this,t,o.DEFLATE)}function w(t){if(!(this instanceof w))return new w(t);O.call(this,t,o.INFLATE)}function v(t){if(!(this instanceof v))return new v(t);O.call(this,t,o.GZIP)}function E(t){if(!(this instanceof E))return new E(t);O.call(this,t,o.GUNZIP)}function S(t){if(!(this instanceof S))return new S(t);O.call(this,t,o.DEFLATERAW)}function A(t){if(!(this instanceof A))return new A(t);O.call(this,t,o.INFLATERAW)}function T(t){if(!(this instanceof T))return new T(t);O.call(this,t,o.UNZIP)}function R(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function O(t,r){var s=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!R(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!R(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSize<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){x(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var c=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(c=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,c,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function x(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function k(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=b,e.Inflate=w,e.Gzip=v,e.Gunzip=E,e.DeflateRaw=S,e.InflateRaw=A,e.Unzip=T,e.createDeflate=function(t){return new b(t)},e.createInflate=function(t){return new w(t)},e.createDeflateRaw=function(t){return new S(t)},e.createInflateRaw=function(t){return new A(t)},e.createGzip=function(t){return new v(t)},e.createGunzip=function(t){return new E(t)},e.createUnzip=function(t){return new T(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new b(e),t,r)},e.deflateSync=function(t,e){return y(new b(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new v(e),t,r)},e.gzipSync=function(t,e){return y(new v(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new S(e),t,r)},e.deflateRawSync=function(t,e){return y(new S(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new T(e),t,r)},e.unzipSync=function(t,e){return y(new T(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new w(e),t,r)},e.inflateSync=function(t,e){return y(new w(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new E(e),t,r)},e.gunzipSync=function(t,e){return y(new E(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new A(e),t,r)},e.inflateRawSync=function(t,e){return y(new A(e),t)},s.inherits(O,i),O.prototype.params=function(r,n,i){if(r<e.Z_MIN_LEVEL||r>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(o.Z_SYNC_FLUSH,(function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,i&&i())}))}else t.nextTick(i)},O.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},O.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},O.prototype.flush=function(e,r){var i=this,s=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),s.ended?r&&t.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},O.prototype.close=function(e){x(this,e),t.nextTick(k,this)},O.prototype._transform=function(t,e,r){var i,s=this._writableState,a=(s.ending||s.ended)&&(!t||s.length===t.length);return null===t||n.isBuffer(t)?this._handle?(a?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},O.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,s=0,l=this,h="function"==typeof r;if(!h){var f,d=[],p=0;this.on("error",(function(t){f=t})),a(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,s,i,this._buffer,this._offset,o)}while(!this._hadError&&y(g[0],g[1]));if(this._hadError)throw f;if(p>=u)throw x(this),new RangeError(c);var _=n.concat(d,p);return x(this),_}a(this._handle,"zlib binding closed");var m=this._handle.write(e,t,s,i,this._buffer,this._offset,o);function y(u,c){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var f=o-c;if(a(f>=0,"have should not go down"),f>0){var g=l._buffer.slice(l._offset,l._offset+f);l._offset+=f,h?l.push(g):(d.push(g),p+=g.length)}if((0===c||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=n.allocUnsafe(l._chunkSize)),0===c){if(s+=i-u,i=u,!h)return!0;var _=l._handle.write(e,t,s,i,l._buffer,l._offset,l._chunkSize);return _.callback=y,void(_.buffer=t)}if(!h)return!1;r()}}m.buffer=t,m.callback=y},s.inherits(b,O),s.inherits(w,O),s.inherits(v,O),s.inherits(E,O),s.inherits(S,O),s.inherits(A,O),s.inherits(T,O)}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n="3.0.13"},function(t,e,r){var n,i,o,s,a;n=r(84),i=r(85).utf8,o=r(163),s=r(85).bin,(a=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),u=8*t.length,c=1732584193,l=-271733879,h=-1732584194,f=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var p=a._ff,g=a._gg,_=a._hh,m=a._ii;for(d=0;d<r.length;d+=16){var y=c,b=l,w=h,v=f;c=p(c,l,h,f,r[d+0],7,-680876936),f=p(f,c,l,h,r[d+1],12,-389564586),h=p(h,f,c,l,r[d+2],17,606105819),l=p(l,h,f,c,r[d+3],22,-1044525330),c=p(c,l,h,f,r[d+4],7,-176418897),f=p(f,c,l,h,r[d+5],12,1200080426),h=p(h,f,c,l,r[d+6],17,-1473231341),l=p(l,h,f,c,r[d+7],22,-45705983),c=p(c,l,h,f,r[d+8],7,1770035416),f=p(f,c,l,h,r[d+9],12,-1958414417),h=p(h,f,c,l,r[d+10],17,-42063),l=p(l,h,f,c,r[d+11],22,-1990404162),c=p(c,l,h,f,r[d+12],7,1804603682),f=p(f,c,l,h,r[d+13],12,-40341101),h=p(h,f,c,l,r[d+14],17,-1502002290),c=g(c,l=p(l,h,f,c,r[d+15],22,1236535329),h,f,r[d+1],5,-165796510),f=g(f,c,l,h,r[d+6],9,-1069501632),h=g(h,f,c,l,r[d+11],14,643717713),l=g(l,h,f,c,r[d+0],20,-373897302),c=g(c,l,h,f,r[d+5],5,-701558691),f=g(f,c,l,h,r[d+10],9,38016083),h=g(h,f,c,l,r[d+15],14,-660478335),l=g(l,h,f,c,r[d+4],20,-405537848),c=g(c,l,h,f,r[d+9],5,568446438),f=g(f,c,l,h,r[d+14],9,-1019803690),h=g(h,f,c,l,r[d+3],14,-187363961),l=g(l,h,f,c,r[d+8],20,1163531501),c=g(c,l,h,f,r[d+13],5,-1444681467),f=g(f,c,l,h,r[d+2],9,-51403784),h=g(h,f,c,l,r[d+7],14,1735328473),c=_(c,l=g(l,h,f,c,r[d+12],20,-1926607734),h,f,r[d+5],4,-378558),f=_(f,c,l,h,r[d+8],11,-2022574463),h=_(h,f,c,l,r[d+11],16,1839030562),l=_(l,h,f,c,r[d+14],23,-35309556),c=_(c,l,h,f,r[d+1],4,-1530992060),f=_(f,c,l,h,r[d+4],11,1272893353),h=_(h,f,c,l,r[d+7],16,-155497632),l=_(l,h,f,c,r[d+10],23,-1094730640),c=_(c,l,h,f,r[d+13],4,681279174),f=_(f,c,l,h,r[d+0],11,-358537222),h=_(h,f,c,l,r[d+3],16,-722521979),l=_(l,h,f,c,r[d+6],23,76029189),c=_(c,l,h,f,r[d+9],4,-640364487),f=_(f,c,l,h,r[d+12],11,-421815835),h=_(h,f,c,l,r[d+15],16,530742520),c=m(c,l=_(l,h,f,c,r[d+2],23,-995338651),h,f,r[d+0],6,-198630844),f=m(f,c,l,h,r[d+7],10,1126891415),h=m(h,f,c,l,r[d+14],15,-1416354905),l=m(l,h,f,c,r[d+5],21,-57434055),c=m(c,l,h,f,r[d+12],6,1700485571),f=m(f,c,l,h,r[d+3],10,-1894986606),h=m(h,f,c,l,r[d+10],15,-1051523),l=m(l,h,f,c,r[d+1],21,-2054922799),c=m(c,l,h,f,r[d+8],6,1873313359),f=m(f,c,l,h,r[d+15],10,-30611744),h=m(h,f,c,l,r[d+6],15,-1560198380),l=m(l,h,f,c,r[d+13],21,1309151649),c=m(c,l,h,f,r[d+4],6,-145523070),f=m(f,c,l,h,r[d+11],10,-1120210379),h=m(h,f,c,l,r[d+2],15,718787259),l=m(l,h,f,c,r[d+9],21,-343485551),c=c+y>>>0,l=l+b>>>0,h=h+w>>>0,f=f+v>>>0}return n.endian([c,l,h,f])})._ff=function(t,e,r,n,i,o,s){var a=t+(e&r|~e&n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._gg=function(t,e,r,n,i,o,s){var a=t+(e&n|r&~n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._hh=function(t,e,r,n,i,o,s){var a=t+(e^r^n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._ii=function(t,e,r,n,i,o,s){var a=t+(r^(e|~n))+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(a(t,e));return e&&e.asBytes?r:e&&e.asString?s.bytesToString(r):n.bytesToHex(r)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l}));var n=r(62),i=r(1),o=r(10),s=(r(147),r(3)),a=r(151),u=r.n(a);r(66),r(263),r(84);function c(t){const e=t+".gz",r=Object(n.createGzip)(),i=Object(o.createReadStream)(t),s=Object(o.createWriteStream)(e);return new Promise((t,n)=>{i.on("end",()=>{console.log(e+" compressed and saved."),t(e)}),i.on("error",t=>{console.log(e+": compression error!"),n(t)}),i.pipe(r).pipe(s)})}async function l(){"win32"===t.platform?await f(...arguments):await h(...arguments)}async function h(t,e,r=0,n="."){const i=["-"+r,"-r",Object(s.a)(e),n],o=new u.a;await o.start({command:"zip",arguments:i,spawn:{cwd:t},wait:0})}async function f(t,e,r=0,n=Object(i.join)(".","*"),o){"@"===n[0]&&(n="*"+n.substr(1));const a=["a","-tzip","-mx="+r,Object(s.a)(e),n],c=new u.a;await c.start({command:o,arguments:a,spawn:{cwd:""+t},wait:0})}}).call(this,r(0))},function(t,e,r){(function(e,r){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[s]={exports:{}};e[s][0].call(c.exports,(function(t){return i(e[s][1][t]||t)}),c,c.exports,t,e,r,n)}return r[s].exports}for(var o=!1,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,a,u,c,l=[],h=0,f=t.length,d=f,p="string"!==n.getTypeOf(t);h<t.length;)d=f-h,i=p?(e=t[h++],r=h<f?t[h++]:0,h<f?t[h++]:0):(e=t.charCodeAt(h++),r=h<f?t.charCodeAt(h++):0,h<f?t.charCodeAt(h++):0),s=e>>2,a=(3&e)<<4|r>>4,u=1<d?(15&r)<<2|i>>6:64,c=2<d?63&i:64,l.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(c));return l.join("")},r.decode=function(t){var e,r,n,s,a,u,c=0,l=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|f):new Array(0|f);c<t.length;)e=o.indexOf(t.charAt(c++))<<2|(s=o.indexOf(t.charAt(c++)))>>4,r=(15&s)<<4|(a=o.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(u=o.indexOf(t.charAt(c++))),h[l++]=e,64!==a&&(h[l++]=r),64!==u&&(h[l++]=n);return h}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function a(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),a=n?"uint8array":"array";function u(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r<e;r++)n+=String.fromCharCode(255&t),t>>>=8;return n}function i(t,e,r,i,s,l){var h,f,d=t.file,p=t.compression,g=l!==a.utf8encode,_=o.transformTo("string",l(d.name)),m=o.transformTo("string",a.utf8encode(d.name)),y=d.comment,b=o.transformTo("string",l(y)),w=o.transformTo("string",a.utf8encode(y)),v=m.length!==d.name.length,E=w.length!==y.length,S="",A="",T="",R=d.dir,O=d.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var k=0;e&&(k|=8),g||!v&&!E||(k|=2048);var I,C=0,M=0;R&&(C|=16),"UNIX"===s?(M=798,C|=((I=d.unixPermissions)||(I=R?16893:33204),(65535&I)<<16)):(M=20,C|=63&(d.dosPermissions||0)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,f=O.getUTCFullYear()-1980,f<<=4,f|=O.getUTCMonth()+1,f<<=5,f|=O.getUTCDate(),v&&(S+="up"+n((A=n(1,1)+n(u(_),4)+m).length,2)+A),E&&(S+="uc"+n((T=n(1,1)+n(u(b),4)+w).length,2)+T);var D="";return D+="\n\0",D+=n(k,2),D+=p.magic,D+=n(h,2),D+=n(f,2),D+=n(x.crc32,4),D+=n(x.compressedSize,4),D+=n(x.uncompressedSize,4),D+=n(_.length,2),D+=n(S.length,2),{fileRecord:c.LOCAL_FILE_HEADER+D+_+S,dirRecord:c.CENTRAL_FILE_HEADER+n(M,2)+D+n(b.length,2)+"\0\0\0\0"+n(C,4)+n(i,4)+_+S+b}}var o=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),u=t("../crc32"),c=t("../signature");function l(t,e,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,s),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e,r=this.streamFiles&&!t.file.dir,o=i(t,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),r)this.push({data:(e=t,c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r,i,s,a,u,l,h=this.bytesWritten-t,f=(r=this.dirRecords.length,i=h,s=t,a=this.zipComment,u=this.encodeFileName,l=o.transformTo("string",u(a)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(i,4)+n(s,4)+n(l.length,2)+l);this.push({data:f,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},l.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,e,r){var o=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach((function(t,r){s++;var i=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,e.compression),a=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:t,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(n.prototype=t("./object")).loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.version="3.5.0",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./external"),o=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function c(t){return new i.Promise((function(e,r){var n=t.decompressed.getContentWorker().pipe(new a);n.on("error",(function(t){r(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var r=this;return e=n.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var r=new s(e);return r.load(t),r})).then((function(t){var r=[i.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(t){for(var n=t.shift(),i=n.files,o=0;o<i.length;o++){var s=i[o];r.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../stream/GenericWorker");function o(t,e){i.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(o,i),o.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",(function(t,e){i.push(t)||i._helper.pause(),r&&r(e)})).on("error",(function(t){i.emit("error",t)})).on("end",(function(){i.push(null)}))}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},e.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function n(t,e,r){var n,o=s.getTypeOf(e),u=s.extend(r||{},c);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(t=i(t)),u.createFolders&&(n=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""}(t))&&g.call(this,n,!0);var f,_="string"===o&&!1===u.binary&&!1===u.base64;r&&void 0!==r.binary||(u.binary=!_),(e instanceof l&&0===e.uncompressedSize||u.dir||!e||0===e.length)&&(u.base64=!1,u.binary=!0,e="",u.compression="STORE",o="string"),f=e instanceof l||e instanceof a?e:d.isNode&&d.isStream(e)?new p(t,e):s.prepareContent(t,e,u.binary,u.optimizedBinaryString,u.base64);var m=new h(t,f,u);this.files[t]=m}function i(t){return"/"!==t.slice(-1)&&(t+="/"),t}var o=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),u=t("./stream/StreamHelper"),c=t("./defaults"),l=t("./compressedObject"),h=t("./zipObject"),f=t("./generate"),d=t("./nodejsUtils"),p=t("./nodejs/NodejsStreamInputAdapter"),g=function(t,e){return e=void 0!==e?e:c.createFolders,t=i(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function _(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var m={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach((function(r,n){t(r,n)&&e.push(n)})),e},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,n.call(this,t,e,r),this;if(_(t)){var i=t;return this.filter((function(t,e){return!e.dir&&i.test(t)}))}var o=this.files[this.root+t];return o&&!o.dir?o:null},folder:function(t){if(!t)return this;if(_(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=g.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(t){(e=new a("error")).error(t)}return new u(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=m},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data[this.zero+t]},i.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===e&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var n=t("../utils");function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new a(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),u=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,r){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=r,n.checkSupport(s),this._worker=t.pipe(new i(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return e=this,r=t,new u.Promise((function(t,i){var o=[],a=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(t,e){o.push(t),r&&r(e)})).on("error",(function(t){o=[],i(t)})).on("end",(function(){try{var e=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return s.encode(e);default:return n.transformTo(t,e)}}(u,function(t,e){var r,n=0,i=null,o=0;for(r=0;r<e.length;r++)o+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(i=new Uint8Array(o),r=0;r<e.length;r++)i.set(e[r],n),n+=e[r].length;return i;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),c);t(e)}catch(e){i(e)}o=[]})).resume()}));var e,r},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,(function(t){e.call(r,t.data,t.meta)})):this._worker.on(t,(function(){n.delay(e,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(t){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(t){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,r){"use strict";for(var n=t("./utils"),i=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function l(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(t){return i.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,r,n,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=i.uint8array?new Uint8Array(u):new Array(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,s=t.length,u=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)u[r++]=i;else if(4<(o=a[i]))u[r++]=65533,e+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&e<s;)i=i<<6|63&t[e++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(c,s),c.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}(e),u=e;s!==e.length&&(i.uint8array?(u=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(u=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,s),l.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),a=t("./external");function u(t){return t}function c(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(t,e,r){var n=[],i=0,o=t.length;if(o<=r)return String.fromCharCode.apply(null,t);for(;i<o;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=l.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return l.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return l.stringifyByChar(t)}function f(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}r.applyFromCharCode=h;var d={};d.string={string:u,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return d.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},d.array={string:h,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},d.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return f(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},d.uint8array={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},d.nodebuffer={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return d.nodebuffer.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:u},r.transformTo=function(t,e){if(e=e||"",!t)return e;r.checkSupport(t);var n=r.getTypeOf(e);return d[n][t](e)},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&o.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)n+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){s((function(){t.apply(r||null,e||[])}))},r.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,o,s,u){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise((function(e,r){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(e){var l,h=r.getTypeOf(e);return h?("arraybuffer"===h?e=r.transformTo("uint8array",e):"string"===h&&(u?e=i.decode(e):o&&!0!==s&&(e=c(l=e,n.uint8array?new Uint8Array(l.length):new Array(l.length)))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./signature"),s=t("./zipEntry"),a=(t("./utf8"),t("./support"));function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(e)+", expected "+i.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===e;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",r=i.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=e-r;if(0<n)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),u=t("./compressions"),c=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n};t.setIndex(i)},handleUTF8:function(){var t=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=i.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function n(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),u=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&n&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(t){(e=new u("error")).error(t)}return new i(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)n.prototype[c[h]]=l;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,n){(function(t){"use strict";var e,n,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var o=0,s=new i(l),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var u=new t.MessageChannel;u.port1.onmessage=l,e=function(){u.port2.postMessage(0)}}var c=[];function l(){var t,e;n=!0;for(var r=c.length;r;){for(e=c,c=[],t=-1;++t<r;)e[t]();r=c.length}n=!1}r.exports=function(t){1!==c.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var n=t("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==i&&d(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,e,r){n((function(){var n;try{n=e(r)}catch(n){return o.reject(t,n)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,n)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,o.reject(t,e))}function i(e){r||(r=!0,o.resolve(t,e))}var s=p((function(){e(i,n)}));"error"===s.status&&n(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(i);return this.state!==u?h(r,this.state===a?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){o.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return o.reject(t,r.value);var n=r.value;if(n)d(t,n);else{t.state=a,t.outcome=e;for(var i=-1,s=t.queue.length;++i<s;)t.queue[i].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,n=t.queue.length;++r<n;)t.queue[r].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(i),t)},c.reject=function(t){var e=new this(i);return o.reject(e,t)},c.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,u=-1,c=new this(i);++u<r;)l(t[u],u);return c;function l(t,i){e.resolve(t).then((function(t){s[i]=t,++a!==r||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,r=!1;if(!e)return this.resolve([]);for(var n,s=-1,a=new this(i);++s<e;)n=t[s],this.resolve(n).then((function(t){r||(r=!0,o.resolve(a,t))}),(function(t){r||(r=!0,o.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,r){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var n=t("./zlib/deflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),u=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(s[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,l)))throw new Error(s[r]);this._dict_set=!0}}function l(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(t,e){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("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((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=c,r.deflate=l,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var n=t("./zlib/inflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),u=t("./zlib/zstream"),c=t("./zlib/gzheader"),l=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function f(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(t,e){var r,a,u,c,h,f,d=this.strm,p=this.options.chunkSize,g=this.options.dictionary,_=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(p),d.next_out=0,d.avail_out=p),(r=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===l.call(g)?new Uint8Array(g):g,r=n.inflateSetDictionary(this.strm,f)),r===s.Z_BUF_ERROR&&!0===_&&(r=s.Z_OK,_=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(d.output,d.next_out),c=d.next_out-u,h=o.buf2string(d.output,u),d.next_out=c,d.avail_out=p-c,c&&i.arraySet(d.output,d.output,u,c,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(_=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=h,r.inflate=f,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(e=n=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),e=i=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},o={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";var n=t("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s<e;s++)r+=String.fromCharCode(t[s]);return r}s[254]=s[254]=1,r.string2buf=function(t){var e,r,i,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,n,i,o,a=e||t.length,c=new Array(2*a);for(r=n=0;r<a;)if((i=t[r++])<128)c[n++]=i;else if(4<(o=s[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&t[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+e[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),s=t("./adler32"),a=t("./crc32"),u=t("./messages"),c=-2,l=258,h=262,f=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4<t?9:0)}function g(t){for(var e=t.length;0<=--e;)t[e]=0}function _(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function m(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,_(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,f=t.w_mask,d=t.prev,p=t.strstart+l,g=c[o+s-1],_=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===_&&c[r+s-1]===g&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<p);if(n=l-(p-o),o=p-l,s<n){if(t.match_start=e,a<=(s=n))break;g=c[o+s-1],_=c[o+s]}}}while((e=d[e&f])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function v(t){var e,r,n,o,u,c,l,f,d,p,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-h)){for(i.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=r=t.hash_size;n=t.head[--e],t.head[e]=g<=n?n-g:0,--r;);for(e=r=g;n=t.prev[--e],t.prev[e]=g<=n?n-g:0,--r;);o+=g}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,f=t.strstart+t.lookahead,p=void 0,(d=o)<(p=c.avail_in)&&(p=d),r=0===p?0:(c.avail_in-=p,i.arraySet(l,c.input,c.next_in,p,f),1===c.state.wrap?c.adler=s(c.adler,l,p,f):2===c.state.wrap&&(c.adler=a(c.adler,l,p,f)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<h&&0!==t.strm.avail_in)}function E(t,e){for(var r,n;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function S(t,e){for(var r,n,i;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(m(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&m(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function A(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function T(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),g(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 R(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:f,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):d(t,c)}function O(t){var e,r=R(t);return 0===r&&((e=t.state).window_size=2*e.w_size,g(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[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),r}function x(t,e,r,n,o,s){if(!t)return c;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==r||n<8||15<n||e<0||9<e||s<0||4<s)return d(t,c);8===n&&(n=9);var u=new T;return(t.state=u).strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,O(t)}n=[new A(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(v(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,m(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(m(t,!1),t.strm.avail_out),1)})),new A(4,4,8,4,E),new A(4,5,16,8,E),new A(4,6,32,32,E),new A(4,4,16,16,S),new A(8,16,32,32,S),new A(8,16,128,128,S),new A(8,32,128,256,S),new A(32,128,258,1024,S),new A(32,258,258,4096,S)],r.deflateInit=function(t,e){return x(t,e,8,15,8,0)},r.deflateInit2=x,r.deflateReset=O,r.deflateResetKeep=R,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},r.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||5<e||e<0)return t?d(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return d(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,b(i,h),0!==i.strstart&&(b(i,t.adler>>>16),b(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&_(t),i.pending+2<=i.pending_buf_size&&(y(i,255&t.adler),y(i,t.adler>>8&255),t.adler=0,i.status=f)):i.status=f),0!==i.pending){if(_(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(v(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=l){if(v(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+l;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=l-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),_(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&t.adler),y(i,t.adler>>8&255),y(i,t.adler>>16&255),y(i,t.adler>>24&255),y(i,255&t.total_in),y(i,t.total_in>>8&255),y(i,t.total_in>>16&255),y(i,t.total_in>>24&255)):(b(i,t.adler>>>16),b(i,65535&t.adler)),_(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==f&&666!==e?d(t,c):(t.state=null,e===f?d(t,-3):0):c},r.deflateSetDictionary=function(t,e){var r,n,o,a,u,l,h,f,d=e.length;if(!t||!t.state)return c;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,l=t.next_in,h=t.input,t.avail_in=d,t.next_in=0,t.input=e,v(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=2,v(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=h,t.avail_in=u,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,R=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,g=r.lencode,_=r.distcode,m=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=g[d&m];e:for(;;){if(d>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))R[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&b,(w&=15)&&(p<w&&(d+=T[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=_[d&y];r:for(;;){if(d>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=_[(65535&b)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&b,p<(w&=15)&&(d+=T[n++]<<p,(p+=8)<w&&(d+=T[n++]<<p,p+=8)),u<(E+=d&(1<<w)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,(w=o-s)<E){if(l<(w=E-w)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(A=f,(S=0)===h){if(S+=c-w,w<v){for(v-=w;R[o++]=f[S++],--w;);S=o-E,A=R}}else if(h<w){if(S+=c+h-w,(w-=h)<v){for(v-=w;R[o++]=f[S++],--w;);if(S=0,h<v){for(v-=w=h;R[o++]=f[S++],--w;);S=o-E,A=R}}}else if(S+=h-w,w<v){for(v-=w;R[o++]=f[S++],--w;);S=o-E,A=R}for(;2<v;)R[o++]=A[S++],R[o++]=A[S++],R[o++]=A[S++],v-=3;v&&(R[o++]=A[S++],1<v&&(R[o++]=A[S++]))}else{for(S=o-E;R[o++]=R[S++],R[o++]=R[S++],R[o++]=R[S++],2<(v-=3););v&&(R[o++]=R[S++],1<v&&(R[o++]=R[S++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},{}],49:[function(t,e,r){"use strict";var n=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),u=-2;function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?u:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):u}function p(t,e){var r,n;return t?(n=new l,(t.state=n).window=null,0!==(r=d(t,e))&&(t.state=null),r):u}var g,_,m=!0;function y(t){if(m){var e;for(g=new n.Buf32(512),_=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,_,0,t.work,{bits:5}),m=!1}t.lencode=g,t.lenbits=9,t.distcode=_,t.distbits=5}function b(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=f,r.inflateReset2=d,r.inflateResetKeep=h,r.inflateInit=function(t){return p(t,15)},r.inflateInit2=p,r.inflate=function(t,e){var r,l,h,f,d,p,g,_,m,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P,L=0,B=new n.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return u;12===(r=t.state).mode&&(r.mode=13),d=t.next_out,h=t.output,g=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,_=r.hold,m=r.bits,w=p,v=g,M=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(2&r.wrap&&35615===_){B[r.check=0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0),m=_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&_)){t.msg="unknown compression method",r.mode=30;break}if(m-=4,C=8+(15&(_>>>=4)),0===r.wbits)r.wbits=C;else if(C>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<C,t.adler=r.check=1,r.mode=512&_?10:12,m=_=0;break;case 2:for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(r.flags=_,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0,r.mode=3;case 3:for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.head&&(r.head.time=_),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,B[2]=_>>>16&255,B[3]=_>>>24&255,r.check=o(r.check,B,4,0)),m=_=0,r.mode=4;case 4:for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(E=r.length)&&(E=p),E&&(r.head&&(C=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,f,E,C)),512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,r.length-=E),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(E=0;C=l[f+E++],r.head&&C&&r.length<65536&&(r.head.name+=String.fromCharCode(C)),C&&E<p;);if(512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,C)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break t;for(E=0;C=l[f+E++],r.head&&C&&r.length<65536&&(r.head.comment+=String.fromCharCode(C)),C&&E<p;);if(512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,C)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}m=_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}t.adler=r.check=c(_),m=_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){_>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}switch(r.last=1&_,m-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6!==e)break;_>>>=2,m-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}_>>>=2,m-=2;break;case 14:for(_>>>=7&m,m-=7&m;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if((65535&_)!=(_>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&_,m=_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(E=r.length){if(p<E&&(E=p),g<E&&(E=g),0===E)break t;n.arraySet(h,l,f,E,d),p-=E,f+=E,g-=E,d+=E,r.length-=E;break}r.mode=12;break;case 17:for(;m<14;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(r.nlen=257+(31&_),_>>>=5,m-=5,r.ndist=1+(31&_),_>>>=5,m-=5,r.ncode=4+(15&_),_>>>=4,m-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.lens[N[r.have++]]=7&_,_>>>=3,m-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},M=a(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,M){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;R=(L=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(O<16)_>>>=T,m-=T,r.lens[r.have++]=O;else{if(16===O){for(P=T+2;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_>>>=T,m-=T,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}C=r.lens[r.have-1],E=3+(3&_),_>>>=2,m-=2}else if(17===O){for(P=T+3;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}m-=T,C=0,E=3+(7&(_>>>=T)),_>>>=3,m-=3}else{for(P=T+7;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}m-=T,C=0,E=11+(127&(_>>>=T)),_>>>=7,m-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=C}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,D={bits:r.lenbits},M=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,M){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},M=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,M){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=g){t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,s(t,v),d=t.next_out,h=t.output,g=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,_=r.hold,m=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;R=(L=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(R&&0==(240&R)){for(x=T,k=R,I=O;R=(L=r.lencode[I+((_&(1<<x+k)-1)>>x)])>>>16&255,O=65535&L,!(x+(T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}_>>>=x,m-=x,r.back+=x}if(_>>>=T,m-=T,r.back+=T,r.length=O,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=12;break}if(64&R){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(P=r.extra;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(L=r.distcode[_&(1<<r.distbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(0==(240&R)){for(x=T,k=R,I=O;R=(L=r.distcode[I+((_&(1<<x+k)-1)>>x)])>>>16&255,O=65535&L,!(x+(T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}_>>>=x,m-=x,r.back+=x}if(_>>>=T,m-=T,r.back+=T,64&R){t.msg="invalid distance code",r.mode=30;break}r.offset=O,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(P=r.extra;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break t;if(E=v-g,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}S=E>r.wnext?(E-=r.wnext,r.wsize-E):r.wnext-E,E>r.length&&(E=r.length),A=r.window}else A=h,S=d-r.offset,E=r.length;for(g<E&&(E=g),g-=E,r.length-=E;h[d++]=A[S++],--E;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break t;h[d++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===p)break t;p--,_|=l[f++]<<m,m+=8}if(v-=g,t.total_out+=v,r.total+=v,v&&(t.adler=r.check=r.flags?o(r.check,h,v,d-v):i(r.check,h,v,d-v)),v=g,(r.flags?_:c(_))!==r.check){t.msg="incorrect data check",r.mode=30;break}m=_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}m=_=0}r.mode=29;case 29:M=1;break t;case 30:M=-3;break t;case 31:return-4;case 32:default:return u}return t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,(r.wsize||v!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&b(t,t.output,t.next_out,v-t.avail_out)?(r.mode=31,-4):(w-=t.avail_in,v-=t.avail_out,t.total_in+=w,t.total_out+=v,r.total+=v,r.wrap&&v&&(t.adler=r.check=r.flags?o(r.check,h,v,t.next_out-v):i(r.check,h,v,t.next_out-v)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===v||4===e)&&0===M&&(M=-5),M)},r.inflateEnd=function(t){if(!t||!t.state)return u;var e=t.state;return e.window&&(e.window=null),t.state=null,0},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?u:((r.head=e).done=!1,0):u},r.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,e,n,0)!==r.check?-3:b(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=[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],o=[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],s=[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],a=[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];e.exports=function(t,e,r,u,c,l,h,f){var d,p,g,_,m,y,b,w,v,E=f.bits,S=0,A=0,T=0,R=0,O=0,x=0,k=0,I=0,C=0,M=0,D=null,P=0,L=new n.Buf16(16),B=new n.Buf16(16),N=null,j=0;for(S=0;S<=15;S++)L[S]=0;for(A=0;A<u;A++)L[e[r+A]]++;for(O=E,R=15;1<=R&&0===L[R];R--);if(R<O&&(O=R),0===R)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(T=1;T<R&&0===L[T];T++);for(O<T&&(O=T),S=I=1;S<=15;S++)if(I<<=1,(I-=L[S])<0)return-1;if(0<I&&(0===t||1!==R))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(A=0;A<u;A++)0!==e[r+A]&&(h[B[e[r+A]]++]=A);if(y=0===t?(D=N=h,19):1===t?(D=i,P-=257,N=o,j-=257,256):(D=s,N=a,-1),S=T,m=l,k=A=M=0,g=-1,_=(C=1<<(x=O))-1,1===t&&852<C||2===t&&592<C)return 1;for(;;){for(b=S-k,v=h[A]<y?(w=0,h[A]):h[A]>y?(w=N[j+h[A]],D[P+h[A]]):(w=96,0),d=1<<S-k,T=p=1<<x;c[m+(M>>k)+(p-=d)]=b<<24|w<<16|v|0,0!==p;);for(d=1<<S-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,A++,0==--L[S]){if(S===R)break;S=e[r+h[A]]}if(O<S&&(M&_)!==g){for(0===k&&(k=O),m+=T,I=1<<(x=S-k);x+k<R&&!((I-=L[x+k])<=0);)x++,I<<=1;if(C+=1<<x,1===t&&852<C||2===t&&592<C)return 1;c[g=M&_]=O<<24|x<<16|m-l|0}}return 0!==M&&(c[m+M]=S-k<<24|64<<16|0),f.bits=O,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var n=t("../utils/common");function i(t){for(var e=t.length;0<=--e;)t[e]=0}var o=15,s=[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],a=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var h=new Array(60);i(h);var f=new Array(512);i(f);var d=new Array(256);i(d);var p=new Array(29);i(p);var g,_,m,y=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?f[t]:f[256+(t>>>7)]}function E(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,E(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function A(t,e,r){S(t,r[2*e],r[2*e+1])}function T(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function R(t,e,r){var n,i,s=new Array(16),a=0;for(n=1;n<=o;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var u=t[2*i+1];0!==u&&(t[2*i]=T(s[u]++,u))}}function O(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function x(t){8<t.bi_valid?E(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function k(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function I(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&k(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!k(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function C(t,e,r){var n,i,o,u,c=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?A(t,i,e):(A(t,(o=d[i])+256+1,e),0!==(u=s[o])&&S(t,i-=p[o],u),A(t,o=v(--n),r),0!==(u=a[o])&&S(t,n-=y[o],u)),c<t.last_lit;);A(t,256,e)}function M(t,e){var r,n,i,s=e.dyn_tree,a=e.stat_desc.static_tree,u=e.stat_desc.has_stree,c=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<c;r++)0!==s[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,u&&(t.static_len-=a[2*i+1]);for(e.max_code=l,r=t.heap_len>>1;1<=r;r--)I(t,s,r);for(i=c;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,I(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,a,u,c=e.dyn_tree,l=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,_=0;for(s=0;s<=o;s++)t.bl_count[s]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)g<(s=c[2*c[2*(n=t.heap[r])+1]+1]+1)&&(s=g,_++),c[2*n+1]=s,l<n||(t.bl_count[s]++,a=0,p<=n&&(a=d[n-p]),u=c[2*n],t.opt_len+=u*(s+a),f&&(t.static_len+=u*(h[2*n+1]+a)));if(0!==_){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,_-=2}while(0<_);for(s=g;0!==s;s--)for(n=t.bl_count[s];0!==n;)l<(i=t.heap[--r])||(c[2*i+1]!==s&&(t.opt_len+=(s-c[2*i+1])*c[2*i],c[2*i+1]=s),n--)}}(t,e),R(s,l,t.bl_count)}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4))}function P(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)for(;A(t,i,t.bl_tree),0!=--a;);else 0!==i?(i!==o&&(A(t,i,t.bl_tree),a--),A(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(A(t,17,t.bl_tree),S(t,a-3,3)):(A(t,18,t.bl_tree),S(t,a-11,7));o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4)}}i(y);var L=!1;function B(t,e,r,i){var o,s,a;S(t,0+(i?1:0),3),s=e,a=r,x(o=t),E(o,a),E(o,~a),n.arraySet(o.pending_buf,o.window,s,a,o.pending),o.pending+=a}r._tr_init=function(t){L||(function(){var t,e,r,n,i,c=new Array(16);for(n=r=0;n<28;n++)for(p[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(d[r-1]=n,n=i=0;n<16;n++)for(y[n]=i,t=0;t<1<<a[n];t++)f[i++]=n;for(i>>=7;n<30;n++)for(y[n]=i<<7,t=0;t<1<<a[n]-7;t++)f[256+i++]=n;for(e=0;e<=o;e++)c[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,c[8]++;for(;t<=255;)l[2*t+1]=9,t++,c[9]++;for(;t<=279;)l[2*t+1]=7,t++,c[7]++;for(;t<=287;)l[2*t+1]=8,t++,c[8]++;for(R(l,287,c),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=T(t,5);g=new b(l,s,257,286,o),_=new b(h,a,0,30,o),m=new b(new Array(0),u,0,19,7)}(),L=!0),t.l_desc=new w(t.dyn_ltree,g),t.d_desc=new w(t.dyn_dtree,_),t.bl_desc=new w(t.bl_tree,m),t.bi_buf=0,t.bi_valid=0,O(t)},r._tr_stored_block=B,r._tr_flush_block=function(t,e,r,n){var i,o,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),M(t,t.l_desc),M(t,t.d_desc),s=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?B(t,e,r,n):4===t.strategy||o===i?(S(t,2+(n?1:0),3),C(t,l,h)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i<n;i++)S(t,t.bl_tree[2*c[i]+1],3);P(t,t.dyn_ltree,e-1),P(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),C(t,t.dyn_ltree,t.dyn_dtree)),O(t),n&&x(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){var e;S(t,2,3),A(t,256,l),16===(e=t).bi_valid?(E(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)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.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}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof r?r:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}).call(this,r(7),r(56).setImmediate)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(46);class i{constructor(t,e){this.name=t,this.type=e,this.sampleSize=1,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(n.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(n.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class o{constructor({id:t,stats:e}){this.id=t,this.stats={},this._initializeStats(e),Object.seal(this)}get(t,e="count"){return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:r}=t;return this.stats[e]||(this.stats[e]=t instanceof i?t:new i(e,r)),this.stats[e]}}},,,function(t,e,r){var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var o=r(55);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=m;var c=Object.create(r(42));c.inherits=r(5);var l={deprecate:r(30)},h=r(88),f=r(70).Buffer,d=i.Uint8Array||function(){};var p,g=r(89);function _(){}function m(t,e){a=a||r(23),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),A(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||v(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(t){if(a=a||r(23),!(p.call(y,this)||this instanceof a))return new y(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function b(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),A(t,e)}function v(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),A(t,e)}))}function A(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(y,h),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,f.isBuffer(n)||n instanceof d);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,n,i,o);return u}(this,i,a,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||v(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(0),r(56).setImmediate,r(7))},function(t,e,r){"use strict";(function(e){function r(t){return"/"===t.charAt(0)}function n(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(t),r=e[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(e[2]||n)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,r(0))},function(t,e,r){var n=r(100);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},function(t,e,r){"use strict";var n=r(31).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e){var r=t.exports=function(){};r.prototype.getName=function(){},r.prototype.getSize=function(){},r.prototype.getLastModifiedDate=function(){},r.prototype.isDirectory=function(){}},function(t,e){var r=t.exports={};r.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},r.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},r.fromDosTime=function(t){return r.dosToDate(t.readUInt32LE(0))},r.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},r.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},r.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},r.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},r.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},r.toDosTime=function(t){return r.getLongBytes(r.dateToDos(t))}},function(t,e,r){"use strict";var n=r(33).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(35).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(37).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(39).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(20);async function i(t){const e=[];for await(const r of t)e.push(r);return Object(n.b)(...e)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(41);function i(t,e,r,i){const o=Object(n.b)(r.byteLength,i),s=o-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),i=new Uint8Array(r);n.set(i);for(let n=0;n<s;++n)t.setUint8(e+r.byteLength+n,32)}return e+=o}function o(t,e,r,n){return e=i(t,e,(new TextEncoder).encode(r),n)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return w}));var n=r(16),i=r(13);const o=new Map;function s(t){Object(i.a)(t.source&&!t.url||!t.source&&t.url);let e=o.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return a((e=t,`try {\n importScripts('${e}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var e}(t.url),o.set(t.url,e)),t.source&&(e=a(t.source),o.set(t.source,e))),Object(i.a)(e),e}function a(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function u(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const l=()=>{};class h{static isSupported(){return"undefined"!=typeof Worker}constructor(t){c(this,"name",void 0),c(this,"source",void 0),c(this,"url",void 0),c(this,"terminated",!1),c(this,"worker",void 0),c(this,"onMessage",void 0),c(this,"onError",void 0),c(this,"_loadableURL","");const{name:e,source:r,url:n}=t;Object(i.a)(r||n),this.name=e,this.source=r,this.url=n,this.onMessage=l,this.onError=t=>console.log(t),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=l,this.onError=l,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,e){e=e||function t(e,r=!0,n){const i=n||new Set;if(e){if(u(e))i.add(e);else if(u(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"==typeof e)for(const n in e)t(e[n],r,i)}else;return void 0===n?Array.from(i):[]}(t),this.worker.postMessage(t,e)}_getErrorFromErrorEvent(t){let e="Failed to load ";return e+=`worker ${this.name}. `,t.message&&(e+=t.message+" in "),t.lineno&&(e+=`:${t.lineno}:${t.colno}`),new Error(e)}_createBrowserWorker(){this._loadableURL=s({source:this.source,url:this.url});const t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},t.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},t.onmessageerror=t=>console.error(t),t}}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class d{constructor(t,e){f(this,"name",void 0),f(this,"workerThread",void 0),f(this,"isRunning",void 0),f(this,"result",void 0),f(this,"_resolve",void 0),f(this,"_reject",void 0),this.name=t,this.workerThread=e,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e})}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){Object(i.a)(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Object(i.a)(this.isRunning),this.isRunning=!1,this._reject(t)}}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class g{constructor(t){p(this,"name","unnamed"),p(this,"source",void 0),p(this,"url",void 0),p(this,"maxConcurrency",1),p(this,"maxMobileConcurrency",1),p(this,"onDebug",()=>{}),p(this,"reuseWorkers",!0),p(this,"props",{}),p(this,"jobQueue",[]),p(this,"idleQueue",[]),p(this,"count",0),p(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}async startJob(t,e=((t,e,r)=>t.done(r)),r=((t,e)=>t.error(e))){const n=new Promise(n=>(this.jobQueue.push({name:t,onMessage:e,onError:r,onStart:n}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const t=this._getAvailableWorker();if(!t)return;const e=this.jobQueue.shift();if(e){this.onDebug({message:"Starting job",name:e.name,workerThread:t,backlog:this.jobQueue.length});const r=new d(e.name,t);t.onMessage=t=>e.onMessage(r,t.type,t.payload),t.onError=t=>e.onError(r,t),e.onStart(r);try{await r.result}finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const t=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new h({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return n.c?this.maxMobileConcurrency:this.maxConcurrency}}function _(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const m={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class y{static isSupported(){return h.isSupported()}static getWorkerFarm(t={}){return y._workerFarm=y._workerFarm||new y({}),y._workerFarm.setProps(t),y._workerFarm}constructor(t){_(this,"props",void 0),_(this,"workerPools",new Map),this.props={...m},this.setProps(t),this.workerPools=new Map}destroy(){for(const t of this.workerPools.values())t.destroy()}setProps(t){this.props={...this.props,...t};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(t){const{name:e,source:r,url:n}=t;let i=this.workerPools.get(e);return i||(i=new g({name:e,source:r,url:n}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}_(y,"_workerFarm",void 0);function b(t,e){return!!y.isSupported()&&(t.worker&&(null==e?void 0:e.worker))}async function w(t,e,r,n,o){const s=t.id,a=function(t,e={}){const r=e[t.id]||{},n=t.id+"-worker.js";let o=r.workerUrl;if(o||"compression"!==t.id||(o=e.workerUrl),"test"===e._workerType&&(o=`modules/${t.module}/dist/${n}`),!o){let e=t.version;"latest"===e&&(e="latest");const r=e?"@"+e:"";o=`https://unpkg.com/@loaders.gl/${t.module}${r}/dist/${n}`}return Object(i.a)(o),o}(t,r),u=y.getWorkerFarm(r).getWorkerPool({name:s,url:a});r=JSON.parse(JSON.stringify(r));const c=await u.startJob("process-on-worker",v.bind(null,o));c.postMessage("process",{input:e,options:r});const l=await c.result;return await l.result}async function v(t,e,r,n){switch(r){case"done":e.done(n);break;case"error":e.error(n.error);break;case"process":const{id:i,input:o,options:s}=n;try{const r=await t(o,s);e.postMessage("done",{id:i,result:r})}catch(t){const r=t instanceof Error?t.message:"unknown error";e.postMessage("error",{id:i,error:r})}break;default:console.warn("parse-with-worker unknown message "+r)}}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e,n){var i=r(55);t.exports=b;var o,s=r(86);b.ReadableState=y;r(11).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(88),c=r(70).Buffer,l=e.Uint8Array||function(){};var h=Object.create(r(42));h.inherits=r(5);var f=r(166),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,g=r(167),_=r(89);h.inherits(b,u);var m=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var n=e instanceof(o=o||r(23));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(14).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(23),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):v(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?v(t,s,e,!1):T(t,s)):v(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function v(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),T(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=_.destroy,b.prototype._undestroy=_.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=r(14).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function E(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d("emit readable"),t.emit("readable"),k(t)}function T(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function O(t){d("readable nexttick read 0"),t.read(0)}function x(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(M,e,t))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):S(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(n=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:b;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",m),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",_),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",g),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,k(t))}}(r);t.on("drain",h);var f=!1;var p=!1;function g(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==D(o.pipes,t))&&!f&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function _(e){d("onerror",e),b(),t.removeListener("error",_),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",y),b()}function y(){d("onfinish"),t.removeListener("close",m),b()}function b(){d("unpipe"),r.unpipe(t)}return r.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",_),t.once("close",m),t.once("finish",y),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=D(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},b.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&S(this):i.nextTick(O,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(x,t,e))}(this,t)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){d("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=I}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";var n=r(55);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";t.exports=s;var n=r(23),i=Object.create(r(42));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(5),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){t.exports=r(54).PassThrough},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){(function(e,n){var i,o,s=r(1),a=r(193),u=r(194),c=r(195),l=r(12);function h(t,e){Object.defineProperty(t,i,{get:function(){return e}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(i=Symbol.for("graceful-fs.queue"),o=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",o="___graceful-fs.previous");var f=function(){};if(l.debuglog?f=l.debuglog("gfs4"):/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&(f=function(){var t=l.format.apply(l,arguments);t="GFS4: "+t.split(/\n/).join("\nGFS4: "),console.error(t)}),!s[i]){var d=n[i]||[];h(s,d),s.close=function(t){function e(e,r){return t.call(s,e,(function(t){t||_(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(e,o,{value:t}),e}(s.close),s.closeSync=function(t){function e(e){t.apply(s,arguments),_()}return Object.defineProperty(e,o,{value:t}),e}(s.closeSync),/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&e.on("exit",(function(){f(s[i]),r(43).equal(s[i].length,0)}))}function p(t){a(t),t.gracefulify=p,t.createReadStream=function(e,r){return new t.ReadStream(e,r)},t.createWriteStream=function(e,r){return new t.WriteStream(e,r)};var r=t.readFile;t.readFile=function(t,e,n){"function"==typeof e&&(n=e,e=null);return function t(e,n,i){return r(e,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),_()):g([t,[e,n,i]])}))}(t,e,n)};var n=t.writeFile;t.writeFile=function(t,e,r,i){"function"==typeof r&&(i=r,r=null);return function t(e,r,i,o){return n(e,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof o&&o.apply(this,arguments),_()):g([t,[e,r,i,o]])}))}(t,e,r,i)};var i=t.appendFile;i&&(t.appendFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=null);return function t(e,r,n,o){return i(e,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),_()):g([t,[e,r,n,o]])}))}(t,e,r,n)});var o=t.copyFile;o&&(t.copyFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=0);return o(t,e,r,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof n&&n.apply(this,arguments),_()):g([o,[t,e,r,n]])}))});var s=t.readdir;function c(e){return s.apply(t,e)}if(t.readdir=function(t,e,r){var n=[t];"function"!=typeof e?n.push(e):r=e;return n.push((function(t,e){e&&e.sort&&e.sort();!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof r&&r.apply(this,arguments),_()):g([c,[n]])})),c(n)},"v0.8"===e.version.substr(0,4)){var l=u(t);y=l.ReadStream,b=l.WriteStream}var h=t.ReadStream;h&&(y.prototype=Object.create(h.prototype),y.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.autoClose&&t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r),t.read())}))});var f=t.WriteStream;f&&(b.prototype=Object.create(f.prototype),b.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r))}))}),Object.defineProperty(t,"ReadStream",{get:function(){return y},set:function(t){y=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return b},set:function(t){b=t},enumerable:!0,configurable:!0});var d=y;Object.defineProperty(t,"FileReadStream",{get:function(){return d},set:function(t){d=t},enumerable:!0,configurable:!0});var m=b;function y(t,e){return this instanceof y?(h.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function b(t,e){return this instanceof b?(f.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}Object.defineProperty(t,"FileWriteStream",{get:function(){return m},set:function(t){m=t},enumerable:!0,configurable:!0});var w=t.open;function v(t,e,r,n){return"function"==typeof r&&(n=r,r=null),function t(e,r,n,i){return w(e,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?("function"==typeof i&&i.apply(this,arguments),_()):g([t,[e,r,n,i]])}))}(t,e,r,n)}return t.open=v,t}function g(t){f("ENQUEUE",t[0].name,t[1]),s[i].push(t)}function _(){var t=s[i].shift();t&&(f("RETRY",t[0].name,t[1]),t[0].apply(null,t[1]))}n[i]||h(n,s[i]),t.exports=p(c(s)),e.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched&&(t.exports=p(s),s.__patched=!0)}).call(this,r(0),r(7))},function(t){t.exports=JSON.parse('{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}')},function(t,e){
14
+ */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=r(12),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function h(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=t.exports=y,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(s.isFunction(t)){if(c)return t.name;var e=t.toString().match(d);return e&&e[1]}}function g(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function _(t){if(c||!s.isFunction(t))return s.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function y(t,e){t||m(t,!0,e,"==",f.ok)}function b(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),b(t,e,r);var a,c,l=S(t),h=S(e);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),c=l.length-1;c>=0;c--)if(l[c]!==h[c])return!1;for(c=l.length-1;c>=0;c--)if(a=l[c],!b(t[a],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function E(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&m(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&i&&!r;if((!t&&s.isError(i)&&o&&v(i,r)||a)&&m(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}f.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(_(t.actual),128)+" "+t.operator+" "+g(_(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(f.AssertionError,Error),f.fail=m,f.ok=y,f.equal=function(t,e,r){t!=e&&m(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){b(t,e,!1)||m(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){b(t,e,!0)||m(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){b(t,e,!1)&&m(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){b(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){E(!0,t,e,r)},f.doesNotThrow=function(t,e,r){E(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n((function t(e,r){e||m(e,!0,r,"==",t)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var S=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this,r(7))},function(t,e,r){var n=r(96),i=r(1),o=(r(12),r(196)),s=r(98),a=r(197),u=r(54).Stream,c=r(55).PassThrough,l=t.exports={};l.file=r(198),l.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",(function(t){r.push(t),n+=t.length})),t.on("end",(function(){var t=new Buffer(n),i=0;r.forEach((function(e){e.copy(t,i),i+=e.length})),e(null,t)}))},l.dateify=function(t){return t=(t=t||new Date)instanceof Date?t:"string"==typeof t?new Date(t):new Date},l.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},a(...n)},l.isStream=function(t){return t instanceof u},l.lazyReadStream=function(t){return new o.Readable((function(){return n.createReadStream(t)}))},l.normalizeInputSource=function(t){if(null===t)return new Buffer(0);if("string"==typeof t)return new Buffer(t);if(l.isStream(t)&&!t._readableState){var e=new c;return t.pipe(e),e}return t},l.sanitizePath=function(t){return s(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},l.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},l.unixifyPath=function(t){return s(t,!1).replace(/^\w+:/,"")},l.walkdir=function(t,e,r){var o=[];"function"==typeof e&&(r=e,e=t),n.readdir(t,(function(s,a){var u,c,h=0;if(s)return r(s);!function s(){if(!(u=a[h++]))return r(null,o);c=i.join(t,u),n.stat(c,(function(t,r){o.push({path:c,relative:i.relative(e,c).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?l.walkdir(c,e,(function(t,e){e.forEach((function(t){o.push(t)})),s()})):s()}))}()}))}},function(t,e,r){"use strict";function n(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return i(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return i(t,0,e)}return""}function i(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(n.getUint8(e+t));return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t){function n(){let e;if("undefined"!=typeof window&&window.performance)e=window.performance.now();else if(void 0!==t&&t.hrtime){const r=t.hrtime();e=1e3*r[0]+r[1]/1e6}else e=Date.now();return e}r.d(e,"a",(function(){return n}))}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(25),i=r(29);async function o(t,e){if("string"==typeof t){t=Object(n.a)(t);let r=e;return null!=e&&e.fetch&&"function"!=typeof(null==e?void 0:e.fetch)&&(r=e.fetch),await fetch(t,r)}return await Object(i.b)(t)}},function(t,e){},function(t,e){},,,function(t,e){const r=t=>null==t;t.exports={has:(t,e)=>{const r=e.split(".");let n=!0,i=Object.assign({},t);return r.forEach(t=>{n=i&&n&&Object.keys(i).indexOf(t)>-1,i=i[t]}),n},get:(t,e)=>{const n=e.split(".");let i=Object.assign({},t);return n.forEach(t=>{i=i&&!r(i[t])?i[t]:void 0}),i},set:(t,e,r)=>{let n=t;const i=e.split(".");return i.forEach((t,e)=>{n[t]||(n[t]=e==i.length-1?r:{}),n=n[t]}),t},isUndefined:r}},function(t,e){},function(t,e,r){t.exports=i;var n=r(11).EventEmitter;function i(){n.call(this)}r(5)(i,n),i.Readable=r(55),i.Writable=r(172),i.Duplex=r(173),i.Transform=r(174),i.PassThrough=r(93),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(89)).Stream=e,e.Readable=e,e.Writable=r(71),e.Duplex=r(23),e.Transform=r(92),e.PassThrough=r(171)},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,r(0))},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(169),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(7))},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},s={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(n)},function(t,e,r){t.exports=l,l.Minimatch=h;var n={sep:"/"};try{n=r(1)}catch(t){}var i=l.GLOBSTAR=h.GLOBSTAR={},o=r(189),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(t,e){return t[e]=!0,t}),{});var u=/\/+/;function c(t,e){t=t||{},e=e||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function l(t,e,r){if("string"!=typeof e)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===e.charAt(0))&&(""===e.trim()?""===t:new h(e,r).match(t))}function h(t,e){if(!(this instanceof h))return new h(t,e);if("string"!=typeof t)throw new TypeError("glob pattern string required");e||(e={}),t=t.trim(),"/"!==n.sep&&(t=t.split(n.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function f(t,e){if(e||(e=this instanceof h?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:o(t)}l.filter=function(t,e){return e=e||{},function(r,n,i){return l(r,t,e)}},l.defaults=function(t){if(!t||!Object.keys(t).length)return l;var e=l,r=function(r,n,i){return e.minimatch(r,n,c(t,i))};return r.Minimatch=function(r,n){return new e.Minimatch(r,c(t,n))},r},h.defaults=function(t){return t&&Object.keys(t).length?l.defaults(t).Minimatch:h},h.prototype.debug=function(){},h.prototype.make=function(){if(this._made)return;var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(t){return t.split(u)})),this.debug(this.pattern,r),r=r.map((function(t,e,r){return t.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(t){return-1===t.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},h.prototype.parseNegate=function(){var t=this.pattern,e=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,o=t.length;i<o&&"!"===t.charAt(i);i++)e=!e,n++;n&&(this.pattern=t.substr(n));this.negate=e},l.braceExpand=function(t,e){return f(t,e)},h.prototype.braceExpand=f,h.prototype.parse=function(t,e){if(t.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===t)return i;if(""===t)return"";var n,o="",u=!!r.nocase,c=!1,l=[],h=[],f=!1,p=-1,g=-1,_="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",m=this;function y(){if(n){switch(n){case"*":o+="[^/]*?",u=!0;break;case"?":o+="[^/]",u=!0;break;default:o+="\\"+n}m.debug("clearStateChar %j %j",n,o),n=!1}}for(var b,w=0,v=t.length;w<v&&(b=t.charAt(w));w++)if(this.debug("%s\t%s %s %j",t,w,o,b),c&&a[b])o+="\\"+b,c=!1;else switch(b){case"/":return!1;case"\\":y(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,w,o,b),f){this.debug(" in class"),"!"===b&&w===g+1&&(b="^"),o+=b;continue}m.debug("call clearStateChar %j",n),y(),n=b,r.noext&&y();continue;case"(":if(f){o+="(";continue}if(!n){o+="\\(";continue}l.push({type:n,start:w-1,reStart:o.length,open:s[n].open,close:s[n].close}),o+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,o),n=!1;continue;case")":if(f||!l.length){o+="\\)";continue}y(),u=!0;var E=l.pop();o+=E.close,"!"===E.type&&h.push(E),E.reEnd=o.length;continue;case"|":if(f||!l.length||c){o+="\\|",c=!1;continue}y(),o+="|";continue;case"[":if(y(),f){o+="\\"+b;continue}f=!0,g=w,p=o.length,o+=b;continue;case"]":if(w===g+1||!f){o+="\\"+b,c=!1;continue}if(f){var S=t.substring(g+1,w);try{RegExp("["+S+"]")}catch(t){var A=this.parse(S,d);o=o.substr(0,p)+"\\["+A[0]+"\\]",u=u||A[1],f=!1;continue}}u=!0,f=!1,o+=b;continue;default:y(),c?c=!1:!a[b]||"^"===b&&f||(o+="\\"),o+=b}f&&(S=t.substr(g+1),A=this.parse(S,d),o=o.substr(0,p)+"\\["+A[0],u=u||A[1]);for(E=l.pop();E;E=l.pop()){var T=o.slice(E.reStart+E.open.length);this.debug("setting tail",o,E),T=T.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,r){return r||(r="\\"),e+e+r+"|"})),this.debug("tail=%j\n %s",T,T,E,o);var R="*"===E.type?"[^/]*?":"?"===E.type?"[^/]":"\\"+E.type;u=!0,o=o.slice(0,E.reStart)+R+"\\("+T}y(),c&&(o+="\\\\");var O=!1;switch(o.charAt(0)){case".":case"[":case"(":O=!0}for(var x=h.length-1;x>-1;x--){var k=h[x],I=o.slice(0,k.reStart),C=o.slice(k.reStart,k.reEnd-8),M=o.slice(k.reEnd-8,k.reEnd),D=o.slice(k.reEnd);M+=D;var P=I.split("(").length-1,L=D;for(w=0;w<P;w++)L=L.replace(/\)[+*?]?/,"");var B="";""===(D=L)&&e!==d&&(B="$"),o=I+C+D+B+M}""!==o&&u&&(o="(?=.)"+o);O&&(o=_+o);if(e===d)return[o,u];if(!u)return function(t){return t.replace(/\\(.)/g,"$1")}(t);var N=r.nocase?"i":"";try{var j=new RegExp("^"+o+"$",N)}catch(t){return new RegExp("$.")}return j._glob=t,j._src=o,j};var d={};l.makeRe=function(t,e){return new h(t,e||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"",o=t.map((function(t){return t.map((function(t){return t===i?r:"string"==typeof t?function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(t):t._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch(t){this.regexp=!1}return this.regexp},l.match=function(t,e,r){var n=new h(e,r=r||{});return t=t.filter((function(t){return n.match(t)})),n.options.nonull&&!t.length&&t.push(e),t},h.prototype.match=function(t,e){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var r=this.options;"/"!==n.sep&&(t=t.split(n.sep).join("/"));t=t.split(u),this.debug(this.pattern,"split",t);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=t.length-1;o>=0&&!(i=t[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=t;if(r.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},h.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,u=e.length;o<a&&s<u;o++,s++){this.debug("matchOne loop");var c,l=e[s],h=t[o];if(this.debug(e,l,h),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[e,l,h]);var f=o,d=s+1;if(d===u){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!n.dot&&"."===t[o].charAt(0))return!1;return!0}for(;f<a;){var p=t[f];if(this.debug("\nglobstar while",t,f,e,d,p),this.matchOne(t.slice(f),e.slice(d),r))return this.debug("globstar found match!",f,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,f,e,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",t,f,e,d),f!==a))}if("string"==typeof l?(c=n.nocase?h.toLowerCase()===l.toLowerCase():h===l,this.debug("string match",l,h,c)):(c=h.match(l),this.debug("pattern match",l,h,c)),!c)return!1}if(o===a&&s===u)return!0;if(o===a)return r;if(s===u)return o===a-1&&""===t[o];throw new Error("wtf?")}},function(t,e,r){(e=t.exports=r(139)).Stream=e,e.Readable=e,e.Writable=r(143),e.Duplex=r(40),e.Transform=r(144),e.PassThrough=r(253),e.finished=r(80),e.pipeline=r(254)},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let i="";for(let t=0;t<n;++t)i+=" ";return t+i}function i(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r.charCodeAt(i));return e+n}function o(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r[i]);return e+n}r.d(e,"c",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}))},function(t,e,r){"use strict";(function(t){var n=r(9).Buffer,i=r(54).Transform,o=r(175),s=r(12),a=r(43).ok,u=r(9).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(o),h=0;h<l.length;h++){var f=l[h];f.match(/^Z/)&&Object.defineProperty(e,f,{enumerable:!0,value:o[f],writable:!1})}for(var d={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},p=Object.keys(d),g=0;g<p.length;g++){var _=p[g];d[d[_]]=_}function m(t,e,r){var i=[],o=0;function s(){for(var e;null!==(e=t.read());)i.push(e),o+=e.length;t.once("readable",s)}function a(){var e,s=null;o>=u?s=new RangeError(c):e=n.concat(i,o),i=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function y(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function b(t){if(!(this instanceof b))return new b(t);O.call(this,t,o.DEFLATE)}function w(t){if(!(this instanceof w))return new w(t);O.call(this,t,o.INFLATE)}function v(t){if(!(this instanceof v))return new v(t);O.call(this,t,o.GZIP)}function E(t){if(!(this instanceof E))return new E(t);O.call(this,t,o.GUNZIP)}function S(t){if(!(this instanceof S))return new S(t);O.call(this,t,o.DEFLATERAW)}function A(t){if(!(this instanceof A))return new A(t);O.call(this,t,o.INFLATERAW)}function T(t){if(!(this instanceof T))return new T(t);O.call(this,t,o.UNZIP)}function R(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function O(t,r){var s=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!R(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!R(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSize<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){x(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var c=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(c=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,c,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function x(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function k(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=b,e.Inflate=w,e.Gzip=v,e.Gunzip=E,e.DeflateRaw=S,e.InflateRaw=A,e.Unzip=T,e.createDeflate=function(t){return new b(t)},e.createInflate=function(t){return new w(t)},e.createDeflateRaw=function(t){return new S(t)},e.createInflateRaw=function(t){return new A(t)},e.createGzip=function(t){return new v(t)},e.createGunzip=function(t){return new E(t)},e.createUnzip=function(t){return new T(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new b(e),t,r)},e.deflateSync=function(t,e){return y(new b(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new v(e),t,r)},e.gzipSync=function(t,e){return y(new v(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new S(e),t,r)},e.deflateRawSync=function(t,e){return y(new S(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new T(e),t,r)},e.unzipSync=function(t,e){return y(new T(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new w(e),t,r)},e.inflateSync=function(t,e){return y(new w(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new E(e),t,r)},e.gunzipSync=function(t,e){return y(new E(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),m(new A(e),t,r)},e.inflateRawSync=function(t,e){return y(new A(e),t)},s.inherits(O,i),O.prototype.params=function(r,n,i){if(r<e.Z_MIN_LEVEL||r>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(o.Z_SYNC_FLUSH,(function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,i&&i())}))}else t.nextTick(i)},O.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},O.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},O.prototype.flush=function(e,r){var i=this,s=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),s.ended?r&&t.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},O.prototype.close=function(e){x(this,e),t.nextTick(k,this)},O.prototype._transform=function(t,e,r){var i,s=this._writableState,a=(s.ending||s.ended)&&(!t||s.length===t.length);return null===t||n.isBuffer(t)?this._handle?(a?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},O.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,s=0,l=this,h="function"==typeof r;if(!h){var f,d=[],p=0;this.on("error",(function(t){f=t})),a(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,s,i,this._buffer,this._offset,o)}while(!this._hadError&&y(g[0],g[1]));if(this._hadError)throw f;if(p>=u)throw x(this),new RangeError(c);var _=n.concat(d,p);return x(this),_}a(this._handle,"zlib binding closed");var m=this._handle.write(e,t,s,i,this._buffer,this._offset,o);function y(u,c){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var f=o-c;if(a(f>=0,"have should not go down"),f>0){var g=l._buffer.slice(l._offset,l._offset+f);l._offset+=f,h?l.push(g):(d.push(g),p+=g.length)}if((0===c||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=n.allocUnsafe(l._chunkSize)),0===c){if(s+=i-u,i=u,!h)return!0;var _=l._handle.write(e,t,s,i,l._buffer,l._offset,l._chunkSize);return _.callback=y,void(_.buffer=t)}if(!h)return!1;r()}}m.buffer=t,m.callback=y},s.inherits(b,O),s.inherits(w,O),s.inherits(v,O),s.inherits(E,O),s.inherits(S,O),s.inherits(A,O),s.inherits(T,O)}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));const n="3.0.14"},function(t,e,r){var n,i,o,s,a;n=r(84),i=r(85).utf8,o=r(163),s=r(85).bin,(a=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),u=8*t.length,c=1732584193,l=-271733879,h=-1732584194,f=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var p=a._ff,g=a._gg,_=a._hh,m=a._ii;for(d=0;d<r.length;d+=16){var y=c,b=l,w=h,v=f;c=p(c,l,h,f,r[d+0],7,-680876936),f=p(f,c,l,h,r[d+1],12,-389564586),h=p(h,f,c,l,r[d+2],17,606105819),l=p(l,h,f,c,r[d+3],22,-1044525330),c=p(c,l,h,f,r[d+4],7,-176418897),f=p(f,c,l,h,r[d+5],12,1200080426),h=p(h,f,c,l,r[d+6],17,-1473231341),l=p(l,h,f,c,r[d+7],22,-45705983),c=p(c,l,h,f,r[d+8],7,1770035416),f=p(f,c,l,h,r[d+9],12,-1958414417),h=p(h,f,c,l,r[d+10],17,-42063),l=p(l,h,f,c,r[d+11],22,-1990404162),c=p(c,l,h,f,r[d+12],7,1804603682),f=p(f,c,l,h,r[d+13],12,-40341101),h=p(h,f,c,l,r[d+14],17,-1502002290),c=g(c,l=p(l,h,f,c,r[d+15],22,1236535329),h,f,r[d+1],5,-165796510),f=g(f,c,l,h,r[d+6],9,-1069501632),h=g(h,f,c,l,r[d+11],14,643717713),l=g(l,h,f,c,r[d+0],20,-373897302),c=g(c,l,h,f,r[d+5],5,-701558691),f=g(f,c,l,h,r[d+10],9,38016083),h=g(h,f,c,l,r[d+15],14,-660478335),l=g(l,h,f,c,r[d+4],20,-405537848),c=g(c,l,h,f,r[d+9],5,568446438),f=g(f,c,l,h,r[d+14],9,-1019803690),h=g(h,f,c,l,r[d+3],14,-187363961),l=g(l,h,f,c,r[d+8],20,1163531501),c=g(c,l,h,f,r[d+13],5,-1444681467),f=g(f,c,l,h,r[d+2],9,-51403784),h=g(h,f,c,l,r[d+7],14,1735328473),c=_(c,l=g(l,h,f,c,r[d+12],20,-1926607734),h,f,r[d+5],4,-378558),f=_(f,c,l,h,r[d+8],11,-2022574463),h=_(h,f,c,l,r[d+11],16,1839030562),l=_(l,h,f,c,r[d+14],23,-35309556),c=_(c,l,h,f,r[d+1],4,-1530992060),f=_(f,c,l,h,r[d+4],11,1272893353),h=_(h,f,c,l,r[d+7],16,-155497632),l=_(l,h,f,c,r[d+10],23,-1094730640),c=_(c,l,h,f,r[d+13],4,681279174),f=_(f,c,l,h,r[d+0],11,-358537222),h=_(h,f,c,l,r[d+3],16,-722521979),l=_(l,h,f,c,r[d+6],23,76029189),c=_(c,l,h,f,r[d+9],4,-640364487),f=_(f,c,l,h,r[d+12],11,-421815835),h=_(h,f,c,l,r[d+15],16,530742520),c=m(c,l=_(l,h,f,c,r[d+2],23,-995338651),h,f,r[d+0],6,-198630844),f=m(f,c,l,h,r[d+7],10,1126891415),h=m(h,f,c,l,r[d+14],15,-1416354905),l=m(l,h,f,c,r[d+5],21,-57434055),c=m(c,l,h,f,r[d+12],6,1700485571),f=m(f,c,l,h,r[d+3],10,-1894986606),h=m(h,f,c,l,r[d+10],15,-1051523),l=m(l,h,f,c,r[d+1],21,-2054922799),c=m(c,l,h,f,r[d+8],6,1873313359),f=m(f,c,l,h,r[d+15],10,-30611744),h=m(h,f,c,l,r[d+6],15,-1560198380),l=m(l,h,f,c,r[d+13],21,1309151649),c=m(c,l,h,f,r[d+4],6,-145523070),f=m(f,c,l,h,r[d+11],10,-1120210379),h=m(h,f,c,l,r[d+2],15,718787259),l=m(l,h,f,c,r[d+9],21,-343485551),c=c+y>>>0,l=l+b>>>0,h=h+w>>>0,f=f+v>>>0}return n.endian([c,l,h,f])})._ff=function(t,e,r,n,i,o,s){var a=t+(e&r|~e&n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._gg=function(t,e,r,n,i,o,s){var a=t+(e&n|r&~n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._hh=function(t,e,r,n,i,o,s){var a=t+(e^r^n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._ii=function(t,e,r,n,i,o,s){var a=t+(r^(e|~n))+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(a(t,e));return e&&e.asBytes?r:e&&e.asString?s.bytesToString(r):n.bytesToHex(r)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l}));var n=r(62),i=r(1),o=r(10),s=(r(147),r(3)),a=r(151),u=r.n(a);r(66),r(263),r(84);function c(t){const e=t+".gz",r=Object(n.createGzip)(),i=Object(o.createReadStream)(t),s=Object(o.createWriteStream)(e);return new Promise((t,n)=>{i.on("end",()=>{console.log(e+" compressed and saved."),t(e)}),i.on("error",t=>{console.log(e+": compression error!"),n(t)}),i.pipe(r).pipe(s)})}async function l(){"win32"===t.platform?await f(...arguments):await h(...arguments)}async function h(t,e,r=0,n="."){const i=["-"+r,"-r",Object(s.a)(e),n],o=new u.a;await o.start({command:"zip",arguments:i,spawn:{cwd:t},wait:0})}async function f(t,e,r=0,n=Object(i.join)(".","*"),o){"@"===n[0]&&(n="*"+n.substr(1));const a=["a","-tzip","-mx="+r,Object(s.a)(e),n],c=new u.a;await c.start({command:o,arguments:a,spawn:{cwd:""+t},wait:0})}}).call(this,r(0))},function(t,e,r){(function(e,r){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[s]={exports:{}};e[s][0].call(c.exports,(function(t){return i(e[s][1][t]||t)}),c,c.exports,t,e,r,n)}return r[s].exports}for(var o=!1,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,a,u,c,l=[],h=0,f=t.length,d=f,p="string"!==n.getTypeOf(t);h<t.length;)d=f-h,i=p?(e=t[h++],r=h<f?t[h++]:0,h<f?t[h++]:0):(e=t.charCodeAt(h++),r=h<f?t.charCodeAt(h++):0,h<f?t.charCodeAt(h++):0),s=e>>2,a=(3&e)<<4|r>>4,u=1<d?(15&r)<<2|i>>6:64,c=2<d?63&i:64,l.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(c));return l.join("")},r.decode=function(t){var e,r,n,s,a,u,c=0,l=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|f):new Array(0|f);c<t.length;)e=o.indexOf(t.charAt(c++))<<2|(s=o.indexOf(t.charAt(c++)))>>4,r=(15&s)<<4|(a=o.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(u=o.indexOf(t.charAt(c++))),h[l++]=e,64!==a&&(h[l++]=r),64!==u&&(h[l++]=n);return h}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function a(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),a=n?"uint8array":"array";function u(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r<e;r++)n+=String.fromCharCode(255&t),t>>>=8;return n}function i(t,e,r,i,s,l){var h,f,d=t.file,p=t.compression,g=l!==a.utf8encode,_=o.transformTo("string",l(d.name)),m=o.transformTo("string",a.utf8encode(d.name)),y=d.comment,b=o.transformTo("string",l(y)),w=o.transformTo("string",a.utf8encode(y)),v=m.length!==d.name.length,E=w.length!==y.length,S="",A="",T="",R=d.dir,O=d.date,x={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(x.crc32=t.crc32,x.compressedSize=t.compressedSize,x.uncompressedSize=t.uncompressedSize);var k=0;e&&(k|=8),g||!v&&!E||(k|=2048);var I,C=0,M=0;R&&(C|=16),"UNIX"===s?(M=798,C|=((I=d.unixPermissions)||(I=R?16893:33204),(65535&I)<<16)):(M=20,C|=63&(d.dosPermissions||0)),h=O.getUTCHours(),h<<=6,h|=O.getUTCMinutes(),h<<=5,h|=O.getUTCSeconds()/2,f=O.getUTCFullYear()-1980,f<<=4,f|=O.getUTCMonth()+1,f<<=5,f|=O.getUTCDate(),v&&(S+="up"+n((A=n(1,1)+n(u(_),4)+m).length,2)+A),E&&(S+="uc"+n((T=n(1,1)+n(u(b),4)+w).length,2)+T);var D="";return D+="\n\0",D+=n(k,2),D+=p.magic,D+=n(h,2),D+=n(f,2),D+=n(x.crc32,4),D+=n(x.compressedSize,4),D+=n(x.uncompressedSize,4),D+=n(_.length,2),D+=n(S.length,2),{fileRecord:c.LOCAL_FILE_HEADER+D+_+S,dirRecord:c.CENTRAL_FILE_HEADER+n(M,2)+D+n(b.length,2)+"\0\0\0\0"+n(C,4)+n(i,4)+_+S+b}}var o=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),u=t("../crc32"),c=t("../signature");function l(t,e,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,s),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e,r=this.streamFiles&&!t.file.dir,o=i(t,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),r)this.push({data:(e=t,c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r,i,s,a,u,l,h=this.bytesWritten-t,f=(r=this.dirRecords.length,i=h,s=t,a=this.zipComment,u=this.encodeFileName,l=o.transformTo("string",u(a)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(i,4)+n(s,4)+n(l.length,2)+l);this.push({data:f,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},l.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,e,r){var o=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach((function(t,r){s++;var i=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,e.compression),a=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:t,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(n.prototype=t("./object")).loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.version="3.5.0",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./external"),o=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function c(t){return new i.Promise((function(e,r){var n=t.decompressed.getContentWorker().pipe(new a);n.on("error",(function(t){r(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var r=this;return e=n.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var r=new s(e);return r.load(t),r})).then((function(t){var r=[i.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(t){for(var n=t.shift(),i=n.files,o=0;o<i.length;o++){var s=i[o];r.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../stream/GenericWorker");function o(t,e){i.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(o,i),o.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",(function(t,e){i.push(t)||i._helper.pause(),r&&r(e)})).on("error",(function(t){i.emit("error",t)})).on("end",(function(){i.push(null)}))}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},e.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function n(t,e,r){var n,o=s.getTypeOf(e),u=s.extend(r||{},c);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(t=i(t)),u.createFolders&&(n=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""}(t))&&g.call(this,n,!0);var f,_="string"===o&&!1===u.binary&&!1===u.base64;r&&void 0!==r.binary||(u.binary=!_),(e instanceof l&&0===e.uncompressedSize||u.dir||!e||0===e.length)&&(u.base64=!1,u.binary=!0,e="",u.compression="STORE",o="string"),f=e instanceof l||e instanceof a?e:d.isNode&&d.isStream(e)?new p(t,e):s.prepareContent(t,e,u.binary,u.optimizedBinaryString,u.base64);var m=new h(t,f,u);this.files[t]=m}function i(t){return"/"!==t.slice(-1)&&(t+="/"),t}var o=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),u=t("./stream/StreamHelper"),c=t("./defaults"),l=t("./compressedObject"),h=t("./zipObject"),f=t("./generate"),d=t("./nodejsUtils"),p=t("./nodejs/NodejsStreamInputAdapter"),g=function(t,e){return e=void 0!==e?e:c.createFolders,t=i(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function _(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var m={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach((function(r,n){t(r,n)&&e.push(n)})),e},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,n.call(this,t,e,r),this;if(_(t)){var i=t;return this.filter((function(t,e){return!e.dir&&i.test(t)}))}var o=this.files[this.root+t];return o&&!o.dir?o:null},folder:function(t){if(!t)return this;if(_(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=g.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(t){(e=new a("error")).error(t)}return new u(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=m},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data[this.zero+t]},i.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===e&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var n=t("../utils");function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new a(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),u=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,r){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=r,n.checkSupport(s),this._worker=t.pipe(new i(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return e=this,r=t,new u.Promise((function(t,i){var o=[],a=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(t,e){o.push(t),r&&r(e)})).on("error",(function(t){o=[],i(t)})).on("end",(function(){try{var e=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return s.encode(e);default:return n.transformTo(t,e)}}(u,function(t,e){var r,n=0,i=null,o=0;for(r=0;r<e.length;r++)o+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(i=new Uint8Array(o),r=0;r<e.length;r++)i.set(e[r],n),n+=e[r].length;return i;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),c);t(e)}catch(e){i(e)}o=[]})).resume()}));var e,r},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,(function(t){e.call(r,t.data,t.meta)})):this._worker.on(t,(function(){n.delay(e,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(t){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(t){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,r){"use strict";for(var n=t("./utils"),i=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function l(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(t){return i.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,r,n,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=i.uint8array?new Uint8Array(u):new Array(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,s=t.length,u=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)u[r++]=i;else if(4<(o=a[i]))u[r++]=65533,e+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&e<s;)i=i<<6|63&t[e++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(c,s),c.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}(e),u=e;s!==e.length&&(i.uint8array?(u=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(u=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,s),l.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),a=t("./external");function u(t){return t}function c(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(t,e,r){var n=[],i=0,o=t.length;if(o<=r)return String.fromCharCode.apply(null,t);for(;i<o;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=l.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return l.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return l.stringifyByChar(t)}function f(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}r.applyFromCharCode=h;var d={};d.string={string:u,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return d.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},d.array={string:h,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},d.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return f(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},d.uint8array={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},d.nodebuffer={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return d.nodebuffer.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:u},r.transformTo=function(t,e){if(e=e||"",!t)return e;r.checkSupport(t);var n=r.getTypeOf(e);return d[n][t](e)},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&o.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)n+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){s((function(){t.apply(r||null,e||[])}))},r.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,o,s,u){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise((function(e,r){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(e){var l,h=r.getTypeOf(e);return h?("arraybuffer"===h?e=r.transformTo("uint8array",e):"string"===h&&(u?e=i.decode(e):o&&!0!==s&&(e=c(l=e,n.uint8array?new Uint8Array(l.length):new Array(l.length)))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./signature"),s=t("./zipEntry"),a=(t("./utf8"),t("./support"));function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(e)+", expected "+i.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===e;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",r=i.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=e-r;if(0<n)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),u=t("./compressions"),c=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n};t.setIndex(i)},handleUTF8:function(){var t=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=i.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function n(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),u=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&n&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(t){(e=new u("error")).error(t)}return new i(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)n.prototype[c[h]]=l;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,n){(function(t){"use strict";var e,n,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var o=0,s=new i(l),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var u=new t.MessageChannel;u.port1.onmessage=l,e=function(){u.port2.postMessage(0)}}var c=[];function l(){var t,e;n=!0;for(var r=c.length;r;){for(e=c,c=[],t=-1;++t<r;)e[t]();r=c.length}n=!1}r.exports=function(t){1!==c.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var n=t("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==i&&d(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,e,r){n((function(){var n;try{n=e(r)}catch(n){return o.reject(t,n)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,n)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,o.reject(t,e))}function i(e){r||(r=!0,o.resolve(t,e))}var s=p((function(){e(i,n)}));"error"===s.status&&n(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(i);return this.state!==u?h(r,this.state===a?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){o.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return o.reject(t,r.value);var n=r.value;if(n)d(t,n);else{t.state=a,t.outcome=e;for(var i=-1,s=t.queue.length;++i<s;)t.queue[i].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,n=t.queue.length;++r<n;)t.queue[r].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(i),t)},c.reject=function(t){var e=new this(i);return o.reject(e,t)},c.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,u=-1,c=new this(i);++u<r;)l(t[u],u);return c;function l(t,i){e.resolve(t).then((function(t){s[i]=t,++a!==r||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,r=!1;if(!e)return this.resolve([]);for(var n,s=-1,a=new this(i);++s<e;)n=t[s],this.resolve(n).then((function(t){r||(r=!0,o.resolve(a,t))}),(function(t){r||(r=!0,o.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,r){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var n=t("./zlib/deflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),u=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(s[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,l)))throw new Error(s[r]);this._dict_set=!0}}function l(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(t,e){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("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((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=c,r.deflate=l,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var n=t("./zlib/inflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),u=t("./zlib/zstream"),c=t("./zlib/gzheader"),l=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function f(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(t,e){var r,a,u,c,h,f,d=this.strm,p=this.options.chunkSize,g=this.options.dictionary,_=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(p),d.next_out=0,d.avail_out=p),(r=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&g&&(f="string"==typeof g?o.string2buf(g):"[object ArrayBuffer]"===l.call(g)?new Uint8Array(g):g,r=n.inflateSetDictionary(this.strm,f)),r===s.Z_BUF_ERROR&&!0===_&&(r=s.Z_OK,_=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(d.output,d.next_out),c=d.next_out-u,h=o.buf2string(d.output,u),d.next_out=c,d.avail_out=p-c,c&&i.arraySet(d.output,d.output,u,c,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(_=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=h,r.inflate=f,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(e=n=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),e=i=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},o={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";var n=t("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s<e;s++)r+=String.fromCharCode(t[s]);return r}s[254]=s[254]=1,r.string2buf=function(t){var e,r,i,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,n,i,o,a=e||t.length,c=new Array(2*a);for(r=n=0;r<a;)if((i=t[r++])<128)c[n++]=i;else if(4<(o=s[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&t[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+e[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),s=t("./adler32"),a=t("./crc32"),u=t("./messages"),c=-2,l=258,h=262,f=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4<t?9:0)}function g(t){for(var e=t.length;0<=--e;)t[e]=0}function _(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function m(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,_(t.strm)}function y(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,f=t.w_mask,d=t.prev,p=t.strstart+l,g=c[o+s-1],_=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===_&&c[r+s-1]===g&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<p);if(n=l-(p-o),o=p-l,s<n){if(t.match_start=e,a<=(s=n))break;g=c[o+s-1],_=c[o+s]}}}while((e=d[e&f])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function v(t){var e,r,n,o,u,c,l,f,d,p,g=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=g+(g-h)){for(i.arraySet(t.window,t.window,g,g,0),t.match_start-=g,t.strstart-=g,t.block_start-=g,e=r=t.hash_size;n=t.head[--e],t.head[e]=g<=n?n-g:0,--r;);for(e=r=g;n=t.prev[--e],t.prev[e]=g<=n?n-g:0,--r;);o+=g}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,f=t.strstart+t.lookahead,p=void 0,(d=o)<(p=c.avail_in)&&(p=d),r=0===p?0:(c.avail_in-=p,i.arraySet(l,c.input,c.next_in,p,f),1===c.state.wrap?c.adler=s(c.adler,l,p,f):2===c.state.wrap&&(c.adler=a(c.adler,l,p,f)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<h&&0!==t.strm.avail_in)}function E(t,e){for(var r,n;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function S(t,e){for(var r,n,i;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(m(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&m(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}function A(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function T(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),g(this.dyn_ltree),g(this.dyn_dtree),g(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),g(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),g(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 R(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:f,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):d(t,c)}function O(t){var e,r=R(t);return 0===r&&((e=t.state).window_size=2*e.w_size,g(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[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),r}function x(t,e,r,n,o,s){if(!t)return c;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==r||n<8||15<n||e<0||9<e||s<0||4<s)return d(t,c);8===n&&(n=9);var u=new T;return(t.state=u).strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,O(t)}n=[new A(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(v(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,m(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(m(t,!1),t.strm.avail_out),1)})),new A(4,4,8,4,E),new A(4,5,16,8,E),new A(4,6,32,32,E),new A(4,4,16,16,S),new A(8,16,32,32,S),new A(8,16,128,128,S),new A(8,32,128,256,S),new A(32,128,258,1024,S),new A(32,258,258,4096,S)],r.deflateInit=function(t,e){return x(t,e,8,15,8,0)},r.deflateInit2=x,r.deflateReset=O,r.deflateResetKeep=R,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},r.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||5<e||e<0)return t?d(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return d(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,y(i,31),y(i,139),y(i,8),i.gzhead?(y(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),y(i,255&i.gzhead.time),y(i,i.gzhead.time>>8&255),y(i,i.gzhead.time>>16&255),y(i,i.gzhead.time>>24&255),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(y(i,255&i.gzhead.extra.length),y(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(y(i,0),y(i,0),y(i,0),y(i,0),y(i,0),y(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),y(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,b(i,h),0!==i.strstart&&(b(i,t.adler>>>16),b(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending!==i.pending_buf_size));)y(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),_(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,y(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&_(t),i.pending+2<=i.pending_buf_size&&(y(i,255&t.adler),y(i,t.adler>>8&255),t.adler=0,i.status=f)):i.status=f),0!==i.pending){if(_(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(v(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=l){if(v(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+l;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=l-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(m(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(m(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(m(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(g(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),_(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(y(i,255&t.adler),y(i,t.adler>>8&255),y(i,t.adler>>16&255),y(i,t.adler>>24&255),y(i,255&t.total_in),y(i,t.total_in>>8&255),y(i,t.total_in>>16&255),y(i,t.total_in>>24&255)):(b(i,t.adler>>>16),b(i,65535&t.adler)),_(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==f&&666!==e?d(t,c):(t.state=null,e===f?d(t,-3):0):c},r.deflateSetDictionary=function(t,e){var r,n,o,a,u,l,h,f,d=e.length;if(!t||!t.state)return c;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(g(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,l=t.next_in,h=t.input,t.avail_in=d,t.next_in=0,t.input=e,v(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=2,v(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=h,t.avail_in=u,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,R=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,g=r.lencode,_=r.distcode,m=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=g[d&m];e:for(;;){if(d>>>=w=b>>>24,p-=w,0==(w=b>>>16&255))R[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&b,(w&=15)&&(p<w&&(d+=T[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=_[d&y];r:for(;;){if(d>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=_[(65535&b)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&b,p<(w&=15)&&(d+=T[n++]<<p,(p+=8)<w&&(d+=T[n++]<<p,p+=8)),u<(E+=d&(1<<w)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,(w=o-s)<E){if(l<(w=E-w)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(A=f,(S=0)===h){if(S+=c-w,w<v){for(v-=w;R[o++]=f[S++],--w;);S=o-E,A=R}}else if(h<w){if(S+=c+h-w,(w-=h)<v){for(v-=w;R[o++]=f[S++],--w;);if(S=0,h<v){for(v-=w=h;R[o++]=f[S++],--w;);S=o-E,A=R}}}else if(S+=h-w,w<v){for(v-=w;R[o++]=f[S++],--w;);S=o-E,A=R}for(;2<v;)R[o++]=A[S++],R[o++]=A[S++],R[o++]=A[S++],v-=3;v&&(R[o++]=A[S++],1<v&&(R[o++]=A[S++]))}else{for(S=o-E;R[o++]=R[S++],R[o++]=R[S++],R[o++]=R[S++],2<(v-=3););v&&(R[o++]=R[S++],1<v&&(R[o++]=R[S++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},{}],49:[function(t,e,r){"use strict";var n=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),u=-2;function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?u:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):u}function p(t,e){var r,n;return t?(n=new l,(t.state=n).window=null,0!==(r=d(t,e))&&(t.state=null),r):u}var g,_,m=!0;function y(t){if(m){var e;for(g=new n.Buf32(512),_=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,g,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,_,0,t.work,{bits:5}),m=!1}t.lencode=g,t.lenbits=9,t.distcode=_,t.distbits=5}function b(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=f,r.inflateReset2=d,r.inflateResetKeep=h,r.inflateInit=function(t){return p(t,15)},r.inflateInit2=p,r.inflate=function(t,e){var r,l,h,f,d,p,g,_,m,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P,L=0,B=new n.Buf8(4),N=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return u;12===(r=t.state).mode&&(r.mode=13),d=t.next_out,h=t.output,g=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,_=r.hold,m=r.bits,w=p,v=g,M=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(2&r.wrap&&35615===_){B[r.check=0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0),m=_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&_)<<8)+(_>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&_)){t.msg="unknown compression method",r.mode=30;break}if(m-=4,C=8+(15&(_>>>=4)),0===r.wbits)r.wbits=C;else if(C>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<C,t.adler=r.check=1,r.mode=512&_?10:12,m=_=0;break;case 2:for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(r.flags=_,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=_>>8&1),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0,r.mode=3;case 3:for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.head&&(r.head.time=_),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,B[2]=_>>>16&255,B[3]=_>>>24&255,r.check=o(r.check,B,4,0)),m=_=0,r.mode=4;case 4:for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.head&&(r.head.xflags=255&_,r.head.os=_>>8),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0,r.mode=5;case 5:if(1024&r.flags){for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.length=_,r.head&&(r.head.extra_len=_),512&r.flags&&(B[0]=255&_,B[1]=_>>>8&255,r.check=o(r.check,B,2,0)),m=_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(E=r.length)&&(E=p),E&&(r.head&&(C=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,f,E,C)),512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,r.length-=E),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(E=0;C=l[f+E++],r.head&&C&&r.length<65536&&(r.head.name+=String.fromCharCode(C)),C&&E<p;);if(512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,C)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break t;for(E=0;C=l[f+E++],r.head&&C&&r.length<65536&&(r.head.comment+=String.fromCharCode(C)),C&&E<p;);if(512&r.flags&&(r.check=o(r.check,l,E,f)),p-=E,f+=E,C)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;m<16;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}m=_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}t.adler=r.check=c(_),m=_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){_>>>=7&m,m-=7&m,r.mode=27;break}for(;m<3;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}switch(r.last=1&_,m-=1,3&(_>>>=1)){case 0:r.mode=14;break;case 1:if(y(r),r.mode=20,6!==e)break;_>>>=2,m-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}_>>>=2,m-=2;break;case 14:for(_>>>=7&m,m-=7&m;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if((65535&_)!=(_>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&_,m=_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(E=r.length){if(p<E&&(E=p),g<E&&(E=g),0===E)break t;n.arraySet(h,l,f,E,d),p-=E,f+=E,g-=E,d+=E,r.length-=E;break}r.mode=12;break;case 17:for(;m<14;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(r.nlen=257+(31&_),_>>>=5,m-=5,r.ndist=1+(31&_),_>>>=5,m-=5,r.ncode=4+(15&_),_>>>=4,m-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;m<3;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.lens[N[r.have++]]=7&_,_>>>=3,m-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},M=a(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,M){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;R=(L=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(O<16)_>>>=T,m-=T,r.lens[r.have++]=O;else{if(16===O){for(P=T+2;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_>>>=T,m-=T,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}C=r.lens[r.have-1],E=3+(3&_),_>>>=2,m-=2}else if(17===O){for(P=T+3;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}m-=T,C=0,E=3+(7&(_>>>=T)),_>>>=3,m-=3}else{for(P=T+7;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}m-=T,C=0,E=11+(127&(_>>>=T)),_>>>=7,m-=7}if(r.have+E>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;E--;)r.lens[r.have++]=C}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,D={bits:r.lenbits},M=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,M){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},M=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,M){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=g){t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,s(t,v),d=t.next_out,h=t.output,g=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,_=r.hold,m=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;R=(L=r.lencode[_&(1<<r.lenbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(R&&0==(240&R)){for(x=T,k=R,I=O;R=(L=r.lencode[I+((_&(1<<x+k)-1)>>x)])>>>16&255,O=65535&L,!(x+(T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}_>>>=x,m-=x,r.back+=x}if(_>>>=T,m-=T,r.back+=T,r.length=O,0===R){r.mode=26;break}if(32&R){r.back=-1,r.mode=12;break}if(64&R){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&R,r.mode=22;case 22:if(r.extra){for(P=r.extra;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.length+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;R=(L=r.distcode[_&(1<<r.distbits)-1])>>>16&255,O=65535&L,!((T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(0==(240&R)){for(x=T,k=R,I=O;R=(L=r.distcode[I+((_&(1<<x+k)-1)>>x)])>>>16&255,O=65535&L,!(x+(T=L>>>24)<=m);){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}_>>>=x,m-=x,r.back+=x}if(_>>>=T,m-=T,r.back+=T,64&R){t.msg="invalid distance code",r.mode=30;break}r.offset=O,r.extra=15&R,r.mode=24;case 24:if(r.extra){for(P=r.extra;m<P;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}r.offset+=_&(1<<r.extra)-1,_>>>=r.extra,m-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===g)break t;if(E=v-g,r.offset>E){if((E=r.offset-E)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}S=E>r.wnext?(E-=r.wnext,r.wsize-E):r.wnext-E,E>r.length&&(E=r.length),A=r.window}else A=h,S=d-r.offset,E=r.length;for(g<E&&(E=g),g-=E,r.length-=E;h[d++]=A[S++],--E;);0===r.length&&(r.mode=21);break;case 26:if(0===g)break t;h[d++]=r.length,g--,r.mode=21;break;case 27:if(r.wrap){for(;m<32;){if(0===p)break t;p--,_|=l[f++]<<m,m+=8}if(v-=g,t.total_out+=v,r.total+=v,v&&(t.adler=r.check=r.flags?o(r.check,h,v,d-v):i(r.check,h,v,d-v)),v=g,(r.flags?_:c(_))!==r.check){t.msg="incorrect data check",r.mode=30;break}m=_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;m<32;){if(0===p)break t;p--,_+=l[f++]<<m,m+=8}if(_!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}m=_=0}r.mode=29;case 29:M=1;break t;case 30:M=-3;break t;case 31:return-4;case 32:default:return u}return t.next_out=d,t.avail_out=g,t.next_in=f,t.avail_in=p,r.hold=_,r.bits=m,(r.wsize||v!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&b(t,t.output,t.next_out,v-t.avail_out)?(r.mode=31,-4):(w-=t.avail_in,v-=t.avail_out,t.total_in+=w,t.total_out+=v,r.total+=v,r.wrap&&v&&(t.adler=r.check=r.flags?o(r.check,h,v,t.next_out-v):i(r.check,h,v,t.next_out-v)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===v||4===e)&&0===M&&(M=-5),M)},r.inflateEnd=function(t){if(!t||!t.state)return u;var e=t.state;return e.window&&(e.window=null),t.state=null,0},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?u:((r.head=e).done=!1,0):u},r.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,e,n,0)!==r.check?-3:b(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=[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],o=[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],s=[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],a=[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];e.exports=function(t,e,r,u,c,l,h,f){var d,p,g,_,m,y,b,w,v,E=f.bits,S=0,A=0,T=0,R=0,O=0,x=0,k=0,I=0,C=0,M=0,D=null,P=0,L=new n.Buf16(16),B=new n.Buf16(16),N=null,j=0;for(S=0;S<=15;S++)L[S]=0;for(A=0;A<u;A++)L[e[r+A]]++;for(O=E,R=15;1<=R&&0===L[R];R--);if(R<O&&(O=R),0===R)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(T=1;T<R&&0===L[T];T++);for(O<T&&(O=T),S=I=1;S<=15;S++)if(I<<=1,(I-=L[S])<0)return-1;if(0<I&&(0===t||1!==R))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(A=0;A<u;A++)0!==e[r+A]&&(h[B[e[r+A]]++]=A);if(y=0===t?(D=N=h,19):1===t?(D=i,P-=257,N=o,j-=257,256):(D=s,N=a,-1),S=T,m=l,k=A=M=0,g=-1,_=(C=1<<(x=O))-1,1===t&&852<C||2===t&&592<C)return 1;for(;;){for(b=S-k,v=h[A]<y?(w=0,h[A]):h[A]>y?(w=N[j+h[A]],D[P+h[A]]):(w=96,0),d=1<<S-k,T=p=1<<x;c[m+(M>>k)+(p-=d)]=b<<24|w<<16|v|0,0!==p;);for(d=1<<S-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,A++,0==--L[S]){if(S===R)break;S=e[r+h[A]]}if(O<S&&(M&_)!==g){for(0===k&&(k=O),m+=T,I=1<<(x=S-k);x+k<R&&!((I-=L[x+k])<=0);)x++,I<<=1;if(C+=1<<x,1===t&&852<C||2===t&&592<C)return 1;c[g=M&_]=O<<24|x<<16|m-l|0}}return 0!==M&&(c[m+M]=S-k<<24|64<<16|0),f.bits=O,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var n=t("../utils/common");function i(t){for(var e=t.length;0<=--e;)t[e]=0}var o=15,s=[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],a=[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],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var h=new Array(60);i(h);var f=new Array(512);i(f);var d=new Array(256);i(d);var p=new Array(29);i(p);var g,_,m,y=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?f[t]:f[256+(t>>>7)]}function E(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,E(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function A(t,e,r){S(t,r[2*e],r[2*e+1])}function T(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function R(t,e,r){var n,i,s=new Array(16),a=0;for(n=1;n<=o;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var u=t[2*i+1];0!==u&&(t[2*i]=T(s[u]++,u))}}function O(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function x(t){8<t.bi_valid?E(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function k(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function I(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&k(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!k(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function C(t,e,r){var n,i,o,u,c=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?A(t,i,e):(A(t,(o=d[i])+256+1,e),0!==(u=s[o])&&S(t,i-=p[o],u),A(t,o=v(--n),r),0!==(u=a[o])&&S(t,n-=y[o],u)),c<t.last_lit;);A(t,256,e)}function M(t,e){var r,n,i,s=e.dyn_tree,a=e.stat_desc.static_tree,u=e.stat_desc.has_stree,c=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<c;r++)0!==s[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,u&&(t.static_len-=a[2*i+1]);for(e.max_code=l,r=t.heap_len>>1;1<=r;r--)I(t,s,r);for(i=c;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,I(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,a,u,c=e.dyn_tree,l=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,g=e.stat_desc.max_length,_=0;for(s=0;s<=o;s++)t.bl_count[s]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)g<(s=c[2*c[2*(n=t.heap[r])+1]+1]+1)&&(s=g,_++),c[2*n+1]=s,l<n||(t.bl_count[s]++,a=0,p<=n&&(a=d[n-p]),u=c[2*n],t.opt_len+=u*(s+a),f&&(t.static_len+=u*(h[2*n+1]+a)));if(0!==_){do{for(s=g-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[g]--,_-=2}while(0<_);for(s=g;0!==s;s--)for(n=t.bl_count[s];0!==n;)l<(i=t.heap[--r])||(c[2*i+1]!==s&&(t.opt_len+=(s-c[2*i+1])*c[2*i],c[2*i+1]=s),n--)}}(t,e),R(s,l,t.bl_count)}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4))}function P(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)for(;A(t,i,t.bl_tree),0!=--a;);else 0!==i?(i!==o&&(A(t,i,t.bl_tree),a--),A(t,16,t.bl_tree),S(t,a-3,2)):a<=10?(A(t,17,t.bl_tree),S(t,a-3,3)):(A(t,18,t.bl_tree),S(t,a-11,7));o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4)}}i(y);var L=!1;function B(t,e,r,i){var o,s,a;S(t,0+(i?1:0),3),s=e,a=r,x(o=t),E(o,a),E(o,~a),n.arraySet(o.pending_buf,o.window,s,a,o.pending),o.pending+=a}r._tr_init=function(t){L||(function(){var t,e,r,n,i,c=new Array(16);for(n=r=0;n<28;n++)for(p[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(d[r-1]=n,n=i=0;n<16;n++)for(y[n]=i,t=0;t<1<<a[n];t++)f[i++]=n;for(i>>=7;n<30;n++)for(y[n]=i<<7,t=0;t<1<<a[n]-7;t++)f[256+i++]=n;for(e=0;e<=o;e++)c[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,c[8]++;for(;t<=255;)l[2*t+1]=9,t++,c[9]++;for(;t<=279;)l[2*t+1]=7,t++,c[7]++;for(;t<=287;)l[2*t+1]=8,t++,c[8]++;for(R(l,287,c),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=T(t,5);g=new b(l,s,257,286,o),_=new b(h,a,0,30,o),m=new b(new Array(0),u,0,19,7)}(),L=!0),t.l_desc=new w(t.dyn_ltree,g),t.d_desc=new w(t.dyn_dtree,_),t.bl_desc=new w(t.bl_tree,m),t.bi_buf=0,t.bi_valid=0,O(t)},r._tr_stored_block=B,r._tr_flush_block=function(t,e,r,n){var i,o,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),M(t,t.l_desc),M(t,t.d_desc),s=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?B(t,e,r,n):4===t.strategy||o===i?(S(t,2+(n?1:0),3),C(t,l,h)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i<n;i++)S(t,t.bl_tree[2*c[i]+1],3);P(t,t.dyn_ltree,e-1),P(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),C(t,t.dyn_ltree,t.dyn_dtree)),O(t),n&&x(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){var e;S(t,2,3),A(t,256,l),16===(e=t).bi_valid?(E(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)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.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}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof r?r:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}).call(this,r(7),r(57).setImmediate)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(46);class i{constructor(t,e){this.name=t,this.type=e,this.sampleSize=1,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(n.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(n.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class o{constructor({id:t,stats:e}){this.id=t,this.stats={},this._initializeStats(e),Object.seal(this)}get(t,e="count"){return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:r}=t;return this.stats[e]||(this.stats[e]=t instanceof i?t:new i(e,r)),this.stats[e]}}},,,function(t,e,r){var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var o=r(56);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=y;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;y.WritableState=m;var c=Object.create(r(42));c.inherits=r(5);var l={deprecate:r(30)},h=r(90),f=r(70).Buffer,d=i.Uint8Array||function(){};var p,g=r(91);function _(){}function m(t,e){a=a||r(23),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(A,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),A(t,e))}(t,r,n,e,i);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||v(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function y(t){if(a=a||r(23),!(p.call(y,this)||this instanceof a))return new y(t);this._writableState=new m(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function b(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),A(t,e)}function v(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,b(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(b(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),A(t,e)}))}function A(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(y,h),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===y&&(t&&t._writableState instanceof m)}})):p=function(t){return t instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,f.isBuffer(n)||n instanceof d);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=_),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,n,i,o);return u}(this,i,a,t,e,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||v(this,t))},y.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,A(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(0),r(57).setImmediate,r(7))},function(t,e,r){"use strict";(function(e){function r(t){return"/"===t.charAt(0)}function n(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(t),r=e[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(e[2]||n)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,r(0))},function(t,e,r){var n=r(102);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},function(t,e,r){"use strict";var n=r(31).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e){var r=t.exports=function(){};r.prototype.getName=function(){},r.prototype.getSize=function(){},r.prototype.getLastModifiedDate=function(){},r.prototype.isDirectory=function(){}},function(t,e){var r=t.exports={};r.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},r.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},r.fromDosTime=function(t){return r.dosToDate(t.readUInt32LE(0))},r.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},r.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},r.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},r.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},r.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},r.toDosTime=function(t){return r.getLongBytes(r.dateToDos(t))}},function(t,e,r){"use strict";var n=r(33).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(35).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(37).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(39).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?g():e.on("request",g)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",g),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(20);async function i(t){const e=[];for await(const r of t)e.push(r);return Object(n.b)(...e)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(41);function i(t,e,r,i){const o=Object(n.b)(r.byteLength,i),s=o-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),i=new Uint8Array(r);n.set(i);for(let n=0;n<s;++n)t.setUint8(e+r.byteLength+n,32)}return e+=o}function o(t,e,r,n){return e=i(t,e,(new TextEncoder).encode(r),n)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return b})),r.d(e,"b",(function(){return w}));var n=r(16),i=r(13);const o=new Map;function s(t){Object(i.a)(t.source&&!t.url||!t.source&&t.url);let e=o.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return a((e=t,`try {\n importScripts('${e}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var e}(t.url),o.set(t.url,e)),t.source&&(e=a(t.source),o.set(t.source,e))),Object(i.a)(e),e}function a(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function u(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!=typeof MessagePort&&t instanceof MessagePort||("undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const l=()=>{};class h{static isSupported(){return"undefined"!=typeof Worker}constructor(t){c(this,"name",void 0),c(this,"source",void 0),c(this,"url",void 0),c(this,"terminated",!1),c(this,"worker",void 0),c(this,"onMessage",void 0),c(this,"onError",void 0),c(this,"_loadableURL","");const{name:e,source:r,url:n}=t;Object(i.a)(r||n),this.name=e,this.source=r,this.url=n,this.onMessage=l,this.onError=t=>console.log(t),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=l,this.onError=l,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,e){e=e||function t(e,r=!0,n){const i=n||new Set;if(e){if(u(e))i.add(e);else if(u(e.buffer))i.add(e.buffer);else if(ArrayBuffer.isView(e));else if(r&&"object"==typeof e)for(const n in e)t(e[n],r,i)}else;return void 0===n?Array.from(i):[]}(t),this.worker.postMessage(t,e)}_getErrorFromErrorEvent(t){let e="Failed to load ";return e+=`worker ${this.name}. `,t.message&&(e+=t.message+" in "),t.lineno&&(e+=`:${t.lineno}:${t.colno}`),new Error(e)}_createBrowserWorker(){this._loadableURL=s({source:this.source,url:this.url});const t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},t.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},t.onmessageerror=t=>console.error(t),t}}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class d{constructor(t,e){f(this,"name",void 0),f(this,"workerThread",void 0),f(this,"isRunning",void 0),f(this,"result",void 0),f(this,"_resolve",void 0),f(this,"_reject",void 0),this.name=t,this.workerThread=e,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e})}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){Object(i.a)(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){Object(i.a)(this.isRunning),this.isRunning=!1,this._reject(t)}}function p(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class g{constructor(t){p(this,"name","unnamed"),p(this,"source",void 0),p(this,"url",void 0),p(this,"maxConcurrency",1),p(this,"maxMobileConcurrency",1),p(this,"onDebug",()=>{}),p(this,"reuseWorkers",!0),p(this,"props",{}),p(this,"jobQueue",[]),p(this,"idleQueue",[]),p(this,"count",0),p(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach(t=>t.destroy()),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}async startJob(t,e=((t,e,r)=>t.done(r)),r=((t,e)=>t.error(e))){const n=new Promise(n=>(this.jobQueue.push({name:t,onMessage:e,onError:r,onStart:n}),this));return this._startQueuedJob(),await n}async _startQueuedJob(){if(!this.jobQueue.length)return;const t=this._getAvailableWorker();if(!t)return;const e=this.jobQueue.shift();if(e){this.onDebug({message:"Starting job",name:e.name,workerThread:t,backlog:this.jobQueue.length});const r=new d(e.name,t);t.onMessage=t=>e.onMessage(r,t.type,t.payload),t.onError=t=>e.onError(r,t),e.onStart(r);try{await r.result}finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const t=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new h({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return n.c?this.maxMobileConcurrency:this.maxConcurrency}}function _(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const m={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class y{static isSupported(){return h.isSupported()}static getWorkerFarm(t={}){return y._workerFarm=y._workerFarm||new y({}),y._workerFarm.setProps(t),y._workerFarm}constructor(t){_(this,"props",void 0),_(this,"workerPools",new Map),this.props={...m},this.setProps(t),this.workerPools=new Map}destroy(){for(const t of this.workerPools.values())t.destroy()}setProps(t){this.props={...this.props,...t};for(const t of this.workerPools.values())t.setProps(this._getWorkerPoolProps())}getWorkerPool(t){const{name:e,source:r,url:n}=t;let i=this.workerPools.get(e);return i||(i=new g({name:e,source:r,url:n}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}_(y,"_workerFarm",void 0);function b(t,e){return!!y.isSupported()&&(t.worker&&(null==e?void 0:e.worker))}async function w(t,e,r,n,o){const s=t.id,a=function(t,e={}){const r=e[t.id]||{},n=t.id+"-worker.js";let o=r.workerUrl;if(o||"compression"!==t.id||(o=e.workerUrl),"test"===e._workerType&&(o=`modules/${t.module}/dist/${n}`),!o){let e=t.version;"latest"===e&&(e="latest");const r=e?"@"+e:"";o=`https://unpkg.com/@loaders.gl/${t.module}${r}/dist/${n}`}return Object(i.a)(o),o}(t,r),u=y.getWorkerFarm(r).getWorkerPool({name:s,url:a});r=JSON.parse(JSON.stringify(r));const c=await u.startJob("process-on-worker",v.bind(null,o));c.postMessage("process",{input:e,options:r});const l=await c.result;return await l.result}async function v(t,e,r,n){switch(r){case"done":e.done(n);break;case"error":e.error(n.error);break;case"process":const{id:i,input:o,options:s}=n;try{const r=await t(o,s);e.postMessage("done",{id:i,result:r})}catch(t){const r=t instanceof Error?t.message:"unknown error";e.postMessage("error",{id:i,error:r})}break;default:console.warn("parse-with-worker unknown message "+r)}}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e){},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(45);function i(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${Object(n.a)(t)}"`)}}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e,n){var i=r(56);t.exports=b;var o,s=r(88);b.ReadableState=y;r(11).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(90),c=r(70).Buffer,l=e.Uint8Array||function(){};var h=Object.create(r(42));h.inherits=r(5);var f=r(166),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,g=r(167),_=r(91);h.inherits(b,u);var m=["error","close","destroy","pause","resume"];function y(t,e){t=t||{};var n=e instanceof(o=o||r(23));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(14).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function b(t){if(o=o||r(23),!(this instanceof b))return new b(t);this._readableState=new y(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):v(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?v(t,s,e,!1):T(t,s)):v(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function v(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),T(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=_.destroy,b.prototype._undestroy=_.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},b.prototype.unshift=function(t){return w(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return p||(p=r(14).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function E(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d("emit readable"),t.emit("readable"),k(t)}function T(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(R,t,e))}function R(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function O(t){d("readable nexttick read 0"),t.read(0)}function x(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),k(t),e.flowing&&!e.reading&&t.read(0)}function k(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(M,e,t))}function M(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}b.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):S(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&C(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(n=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&C(this)),null!==n&&this.emit("data",n),n},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:b;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",m),t.removeListener("finish",y),t.removeListener("drain",h),t.removeListener("error",_),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",b),r.removeListener("data",g),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,k(t))}}(r);t.on("drain",h);var f=!1;var p=!1;function g(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==D(o.pipes,t))&&!f&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function _(e){d("onerror",e),b(),t.removeListener("error",_),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",y),b()}function y(){d("onfinish"),t.removeListener("close",m),b()}function b(){d("unpipe"),r.unpipe(t)}return r.on("data",g),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",_),t.once("close",m),t.once("finish",y),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=D(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},b.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&S(this):i.nextTick(O,this))}return r},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(x,t,e))}(this,t)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<m.length;o++)t.on(m[o],this.emit.bind(this,m[o]));return this._read=function(e){d("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=I}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";var n=r(56);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";t.exports=s;var n=r(23),i=Object.create(r(42));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(5),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){t.exports=r(55).PassThrough},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){(function(e,n){var i,o,s=r(1),a=r(193),u=r(194),c=r(195),l=r(12);function h(t,e){Object.defineProperty(t,i,{get:function(){return e}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(i=Symbol.for("graceful-fs.queue"),o=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",o="___graceful-fs.previous");var f=function(){};if(l.debuglog?f=l.debuglog("gfs4"):/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&(f=function(){var t=l.format.apply(l,arguments);t="GFS4: "+t.split(/\n/).join("\nGFS4: "),console.error(t)}),!s[i]){var d=n[i]||[];h(s,d),s.close=function(t){function e(e,r){return t.call(s,e,(function(t){t||_(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(e,o,{value:t}),e}(s.close),s.closeSync=function(t){function e(e){t.apply(s,arguments),_()}return Object.defineProperty(e,o,{value:t}),e}(s.closeSync),/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&e.on("exit",(function(){f(s[i]),r(43).equal(s[i].length,0)}))}function p(t){a(t),t.gracefulify=p,t.createReadStream=function(e,r){return new t.ReadStream(e,r)},t.createWriteStream=function(e,r){return new t.WriteStream(e,r)};var r=t.readFile;t.readFile=function(t,e,n){"function"==typeof e&&(n=e,e=null);return function t(e,n,i){return r(e,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),_()):g([t,[e,n,i]])}))}(t,e,n)};var n=t.writeFile;t.writeFile=function(t,e,r,i){"function"==typeof r&&(i=r,r=null);return function t(e,r,i,o){return n(e,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof o&&o.apply(this,arguments),_()):g([t,[e,r,i,o]])}))}(t,e,r,i)};var i=t.appendFile;i&&(t.appendFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=null);return function t(e,r,n,o){return i(e,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),_()):g([t,[e,r,n,o]])}))}(t,e,r,n)});var o=t.copyFile;o&&(t.copyFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=0);return o(t,e,r,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof n&&n.apply(this,arguments),_()):g([o,[t,e,r,n]])}))});var s=t.readdir;function c(e){return s.apply(t,e)}if(t.readdir=function(t,e,r){var n=[t];"function"!=typeof e?n.push(e):r=e;return n.push((function(t,e){e&&e.sort&&e.sort();!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof r&&r.apply(this,arguments),_()):g([c,[n]])})),c(n)},"v0.8"===e.version.substr(0,4)){var l=u(t);y=l.ReadStream,b=l.WriteStream}var h=t.ReadStream;h&&(y.prototype=Object.create(h.prototype),y.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.autoClose&&t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r),t.read())}))});var f=t.WriteStream;f&&(b.prototype=Object.create(f.prototype),b.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r))}))}),Object.defineProperty(t,"ReadStream",{get:function(){return y},set:function(t){y=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return b},set:function(t){b=t},enumerable:!0,configurable:!0});var d=y;Object.defineProperty(t,"FileReadStream",{get:function(){return d},set:function(t){d=t},enumerable:!0,configurable:!0});var m=b;function y(t,e){return this instanceof y?(h.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}function b(t,e){return this instanceof b?(f.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}Object.defineProperty(t,"FileWriteStream",{get:function(){return m},set:function(t){m=t},enumerable:!0,configurable:!0});var w=t.open;function v(t,e,r,n){return"function"==typeof r&&(n=r,r=null),function t(e,r,n,i){return w(e,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?("function"==typeof i&&i.apply(this,arguments),_()):g([t,[e,r,n,i]])}))}(t,e,r,n)}return t.open=v,t}function g(t){f("ENQUEUE",t[0].name,t[1]),s[i].push(t)}function _(){var t=s[i].shift();t&&(f("RETRY",t[0].name,t[1]),t[0].apply(null,t[1]))}n[i]||h(n,s[i]),t.exports=p(c(s)),e.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched&&(t.exports=p(s),s.__patched=!0)}).call(this,r(0),r(7))},function(t){t.exports=JSON.parse('{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}')},function(t,e){
15
15
  /*!
16
16
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
17
17
  *
18
18
  * Copyright (c) 2014-2018, Jon Schlinkert.
19
19
  * Released under the MIT License.
20
20
  */
21
- t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&"\\"===t[3]){var i=t[2];"?"!==i&&"."!==i||"\\\\"!==t.slice(0,2)||(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return!1!==e&&""===o[o.length-1]&&o.pop(),n+o.join("/")}},function(t,e,r){(function(e){t.exports=b;var n=r(1),i=r(98),o=r(58),s=(o.Minimatch,r(5)),a=r(11).EventEmitter,u=r(1),c=r(43),l=r(72),h=r(204),f=r(99),d=f.setopts,p=f.ownProp,g=r(205),_=(r(12),f.childrenIgnored),m=f.isIgnored,y=r(73);function b(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return h(t,e)}return new v(t,e,r)}b.sync=h;var w=b.GlobSync=h.GlobSync;function v(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new w(t,e)}if(!(this instanceof v))return new v(t,e,r);d(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return s();for(var o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--i._processing,i._processing<=0&&i._finish()}}b.glob=b,b.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new v(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},b.Glob=v,s(v,a),v.prototype._finish=function(){if(c(this instanceof v),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();f.finish(this),this.emit("end",this.found)}},v.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},v.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),o=this,s=n.length;if(0===s)return e();var a=this.matches[t]=Object.create(null);n.forEach((function(r,n){r=o._makeAbs(r),i.realpath(r,o.realpathCache,(function(n,i){n?"stat"===n.syscall?a[r]=!0:o.emit("error",n):a[i]=!0,0==--s&&(o.matches[t]=a,e())}))}))},v.prototype._mark=function(t){return f.mark(this,t)},v.prototype._makeAbs=function(t){return f.makeAbs(this,t)},v.prototype.abort=function(){this.aborted=!0,this.emit("abort")},v.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},v.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},v.prototype._process=function(t,e,r,n){if(c(this instanceof v),c("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,n]);else{for(var i,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e,n);case 0:i=null;break;default:i=t.slice(0,s).join("/")}var a,u=t.slice(s);null===i?a=".":l(i)||l(t.join("/"))?(i&&l(i)||(i="/"+i),a=i):a=i;var h=this._makeAbs(a);if(_(this,a))return n();u[0]===o.GLOBSTAR?this._processGlobStar(i,a,h,u,e,r,n):this._processReaddir(i,a,h,u,e,r,n)}},v.prototype._processReaddir=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){return a._processReaddir2(t,e,r,n,i,o,c,s)}))},v.prototype._processReaddir2=function(t,e,r,n,i,o,s,a){if(!s)return a();for(var c=n[0],l=!!this.minimatch.negate,h=c._glob,f=this.dot||"."===h.charAt(0),d=[],p=0;p<s.length;p++){if("."!==(_=s[p]).charAt(0)||f)(l&&!t?!_.match(c):_.match(c))&&d.push(_)}var g=d.length;if(0===g)return a();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(p=0;p<g;p++){var _=d[p];t&&(_="/"!==t?t+"/"+_:t+_),"/"!==_.charAt(0)||this.nomount||(_=u.join(this.root,_)),this._emitMatch(i,_)}return a()}n.shift();for(p=0;p<g;p++){_=d[p];t&&(_="/"!==t?t+"/"+_:t+_),this._process([_].concat(n),i,o,a)}a()},v.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=l(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},v.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,i=g("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var o=i&&i.isSymbolicLink();r.symlinks[t]=o,o||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));i&&n.lstat(t,i)}},v.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=g("readdir\0"+t+"\0"+e,r))){if(e&&!p(this.symlinks,t))return this._readdirInGlobStar(t,r);if(p(this.cache,t)){var i=this.cache[t];if(!i||"FILE"===i)return r();if(Array.isArray(i))return r(null,i)}n.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},v.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},v.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},v.prototype._processGlobStar=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){a._processGlobStar2(t,e,r,n,i,o,c,s)}))},v.prototype._processGlobStar2=function(t,e,r,n,i,o,s,a){if(!s)return a();var u=n.slice(1),c=t?[t]:[],l=c.concat(u);this._process(l,i,!1,a);var h=this.symlinks[r],f=s.length;if(h&&o)return a();for(var d=0;d<f;d++){if("."!==s[d].charAt(0)||this.dot){var p=c.concat(s[d],u);this._process(p,i,!0,a);var g=c.concat(s[d],n);this._process(g,i,!0,a)}}a()},v.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,o){n._processSimple2(t,e,i,o,r)}))},v.prototype._processSimple2=function(t,r,n,i,o){if(this.matches[r]||(this.matches[r]=Object.create(null)),!i)return o();if(t&&l(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=u.join(this.root,t):(t=u.resolve(this.root,t),s&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t),o()},v.prototype._stat=function(t,e){var r=this._makeAbs(t),i="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&p(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return e(null,o);if(i&&"FILE"===o)return e()}var s=this.statCache[r];if(void 0!==s){if(!1===s)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?e():e(null,a,s)}var u=this,c=g("stat\0"+r,(function(i,o){if(o&&o.isSymbolicLink())return n.stat(r,(function(n,i){n?u._stat2(t,r,null,o,e):u._stat2(t,r,n,i,e)}));u._stat2(t,r,i,o,e)}));c&&n.lstat(r,c)},v.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var o="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&"FILE"===s?i():i(null,s,n)}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=l,l.realpath=l,l.sync=h,l.realpathSync=h,l.monkeypatch=function(){n.realpath=l,n.realpathSync=h},l.unmonkeypatch=function(){n.realpath=i,n.realpathSync=o};var n=r(1),i=n.realpath,o=n.realpathSync,s=e.version,a=/^v[0-5]\./.test(s),u=r(203);function c(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function l(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(n,i){c(n)?u.realpath(t,e,r):r(n,i)}))}function h(t,e){if(a)return o(t,e);try{return o(t,e)}catch(r){if(c(r))return u.realpathSync(t,e);throw r}}}).call(this,r(0))},function(t,e,r){(function(t){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(e,r,o){o||(o={});if(o.matchBase&&-1===r.indexOf("/")){if(o.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}e.silent=!!o.silent,e.pattern=r,e.strict=!1!==o.strict,e.realpath=!!o.realpath,e.realpathCache=o.realpathCache||Object.create(null),e.follow=!!o.follow,e.dot=!!o.dot,e.mark=!!o.mark,e.nodir=!!o.nodir,e.nodir&&(e.mark=!0);e.sync=!!o.sync,e.nounique=!!o.nounique,e.nonull=!!o.nonull,e.nosort=!!o.nosort,e.nocase=!!o.nocase,e.stat=!!o.stat,e.noprocess=!!o.noprocess,e.absolute=!!o.absolute,e.maxLength=o.maxLength||1/0,e.cache=o.cache||Object.create(null),e.statCache=o.statCache||Object.create(null),e.symlinks=o.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(c))}(e,o),e.changedCwd=!1;var u=t.cwd();n(o,"cwd")?(e.cwd=i.resolve(o.cwd),e.changedCwd=e.cwd!==u):e.cwd=u;e.root=o.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===t.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:l(e,e.cwd),"win32"===t.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!o.nomount,o.nonegate=!0,o.nocomment=!0,e.minimatch=new a(r,o),e.options=e.minimatch.options},e.ownProp=n,e.makeAbs=l,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var o=t.matches[n];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);e?r.push.apply(r,s):s.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(u));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[l(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!h(t,e)})));t.found=r},e.mark=function(t,e){var r=l(t,e),n=t.cache[r],i=e;if(n){var o="DIR"===n||Array.isArray(n),s="/"===e.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=l(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=h,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(1),o=r(58),s=r(72),a=o.Minimatch;function u(t,e){return t.localeCompare(e,"en")}function c(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new a(r,{dot:!0})}return{matcher:new a(t,{dot:!0}),gmatcher:e}}function l(e,r){var n=r;return n="/"===r.charAt(0)?i.join(e.root,r):s(r)||""===r?r:e.changedCwd?i.resolve(e.cwd,r):i.resolve(r),"win32"===t.platform&&(n=n.replace(/\\/g,"/")),n}function h(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}}).call(this,r(0))},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},function(t,e,r){(e=t.exports=r(102)).Stream=e,e.Readable=e,e.Writable=r(106),e.Duplex=r(32),e.Transform=r(107),e.PassThrough=r(212),e.finished=r(74),e.pipeline=r(213)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(103),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(207);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(208),g=r(104),_=r(105).getHighWaterMark,m=r(31).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(32),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(32),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(210)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(211)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(31).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(103),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(104),f=r(105).getHighWaterMark,d=r(31).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(32),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(32));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(31).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(32);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){t.exports={ArchiveEntry:r(75),ZipArchiveEntry:r(109),ArchiveOutputStream:r(112),ZipArchiveOutputStream:r(224)}},function(t,e,r){var n=r(12).inherits,i=r(96),o=r(75),s=r(110),a=r(216),u=r(111),c=r(76),l=t.exports=function(t){if(!(this instanceof l))return new l(t);o.call(this),this.platform=u.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new s,this.crc=0,this.time=-1,this.minver=u.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};n(l,o),l.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},l.prototype.getComment=function(){return null!==this.comment?this.comment:""},l.prototype.getCompressedSize=function(){return this.csize},l.prototype.getCrc=function(){return this.crc},l.prototype.getExternalAttributes=function(){return this.exattr},l.prototype.getExtra=function(){return null!==this.extra?this.extra:u.EMPTY},l.prototype.getGeneralPurposeBit=function(){return this.gpb},l.prototype.getInternalAttributes=function(){return this.inattr},l.prototype.getLastModifiedDate=function(){return this.getTime()},l.prototype.getLocalFileDataExtra=function(){return this.getExtra()},l.prototype.getMethod=function(){return this.method},l.prototype.getName=function(){return this.name},l.prototype.getPlatform=function(){return this.platform},l.prototype.getSize=function(){return this.size},l.prototype.getTime=function(){return-1!==this.time?c.dosToDate(this.time):-1},l.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},l.prototype.getUnixMode=function(){return this.platform!==u.PLATFORM_UNIX?0:this.getExternalAttributes()>>u.SHORT_SHIFT&u.SHORT_MASK},l.prototype.getVersionNeededToExtract=function(){return this.minver},l.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},l.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},l.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},l.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},l.prototype.setExtra=function(t){this.extra=t},l.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof s))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},l.prototype.setInternalAttributes=function(t){this.inattr=t},l.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},l.prototype.setName=function(t,e=!1){t=i(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t="/"+t),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},l.prototype.setPlatform=function(t){this.platform=t},l.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},l.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=c.dateToDos(t,e)},l.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?u.S_IFDIR:u.S_IFREG)<<u.SHORT_SHIFT|(this.isDirectory()?u.S_DOS_D:u.S_DOS_A),this.setExternalAttributes(e),this.mode=t&u.MODE_MASK,this.platform=u.PLATFORM_UNIX},l.prototype.setVersionNeededToExtract=function(t){this.minver=t},l.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},l.prototype.isUnixSymlink=function(){return(this.getUnixMode()&a.FILE_TYPE_FLAG)===a.LINK_FLAG},l.prototype.isZip64=function(){return this.csize>u.ZIP64_MAGIC||this.size>u.ZIP64_MAGIC}},function(t,e,r){var n=r(76),i=t.exports=function(){return this instanceof i?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new i};i.prototype.encode=function(){return n.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},i.prototype.parse=function(t,e){var r=n.getShortBytesValue(t,e),o=new i;return o.useDataDescriptor(0!=(8&r)),o.useUTF8ForNames(0!=(2048&r)),o.useStrongEncryption(0!=(64&r)),o.useEncryption(0!=(1&r)),o.setSlidingDictionarySize(0!=(2&r)?8192:4096),o.setNumberOfShannonFanoTrees(0!=(4&r)?3:2),o},i.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},i.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},i.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},i.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},i.prototype.useDataDescriptor=function(t){this.descriptor=t},i.prototype.usesDataDescriptor=function(){return this.descriptor},i.prototype.useEncryption=function(t){this.encryption=t},i.prototype.usesEncryption=function(){return this.encryption},i.prototype.useStrongEncryption=function(t){this.strongEncryption=t},i.prototype.usesStrongEncryption=function(){return this.strongEncryption},i.prototype.useUTF8ForNames=function(t){this.utf8=t},i.prototype.usesUTF8ForNames=function(){return this.utf8}},function(t,e){t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}},function(t,e,r){var n=r(12).inherits,i=r(113).Transform,o=r(75),s=r(120),a=t.exports=function(t){if(!(this instanceof a))return new a(t);i.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};n(a,i),a.prototype._appendBuffer=function(t,e,r){},a.prototype._appendStream=function(t,e,r){},a.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},a.prototype._finish=function(t){},a.prototype._normalizeEntry=function(t){},a.prototype._transform=function(t,e,r){r(null,t)},a.prototype.entry=function(t,e,r){if(e=e||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),t instanceof o)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=s.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else{if(!s.isStream(e))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,e,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))},a.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},a.prototype.getBytesWritten=function(){return this.offset},a.prototype.write=function(t,e){return t&&(this.offset+=t.length),i.prototype.write.call(this,t,e)}},function(t,e,r){(e=t.exports=r(114)).Stream=e,e.Readable=e,e.Writable=r(118),e.Duplex=r(34),e.Transform=r(119),e.PassThrough=r(222),e.finished=r(77),e.pipeline=r(223)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(115),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(217);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(218),g=r(116),_=r(117).getHighWaterMark,m=r(33).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(34),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(34),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(220)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(221)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(33).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(115),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(116),f=r(117).getHighWaterMark,d=r(33).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(34),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(34));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(33).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(34);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n=r(53).Stream,i=r(113).PassThrough,o=t.exports={};o.isStream=function(t){return t instanceof n},o.normalizeInputSource=function(t){if(null===t)return Buffer.alloc(0);if("string"==typeof t)return Buffer.from(t);if(o.isStream(t)&&!t._readableState){var e=new i;return t.pipe(e),e}return t}},function(t,e,r){var n=r(9).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(t){if(n.isBuffer(t))return t;var e="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof t)return e?n.alloc(t):new n(t);if("string"==typeof t)return e?n.from(t):new n(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function s(t){var e=o(4);return e.writeInt32BE(t,0),e}function a(t,e){t=o(t),n.isBuffer(e)&&(e=e.readUInt32BE(0));for(var r=-1^~~e,s=0;s<t.length;s++)r=i[255&(r^t[s])]^r>>>8;return-1^r}function u(){return s(a.apply(null,arguments))}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),u.signed=function(){return a.apply(null,arguments)},u.unsigned=function(){return a.apply(null,arguments)>>>0},t.exports=u},function(t,e,r){"use strict";t.exports={CRC32Stream:r(225),DeflateCRC32Stream:r(234)}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(124),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(227);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(228),g=r(125),_=r(126).getHighWaterMark,m=r(35).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(36),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(36),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(230)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(231)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(35).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(124),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(125),f=r(126).getHighWaterMark,d=r(35).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(36),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(36));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(35).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(36);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n;n=function(t){t.version="1.2.0";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=t.length-1,o=0;o<i;)n=(n=n>>>8^e[255&(n^t.charCodeAt(o++))])>>>8^e[255&(n^t.charCodeAt(o++))];return o===i&&(n=n>>>8^e[255&(n^t.charCodeAt(o))]),-1^n},t.buf=function(t,r){if(t.length>1e4)return function(t,r){for(var n=-1^r,i=t.length-7,o=0;o<i;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+7;)n=n>>>8^e[255&(n^t[o++])];return-1^n}(t,r);for(var n=-1^r,i=t.length-3,o=0;o<i;)n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+3;)n=n>>>8^e[255&(n^t[o++])];return-1^n},t.str=function(t,r){for(var n,i,o=-1^r,s=0,a=t.length;s<a;)(n=t.charCodeAt(s++))<128?o=o>>>8^e[255&(o^n)]:n<2048?o=(o=o>>>8^e[255&(o^(192|n>>6&31))])>>>8^e[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&t.charCodeAt(s++),o=(o=(o=(o=o>>>8^e[255&(o^(240|n>>8&7))])>>>8^e[255&(o^(128|n>>2&63))])>>>8^e[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^e[255&(o^(128|63&i))]):o=(o=(o=o>>>8^e[255&(o^(224|n>>12&15))])>>>8^e[255&(o^(128|n>>6&63))])>>>8^e[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(e):n({})},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(131),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(240);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(241),g=r(132),_=r(133).getHighWaterMark,m=r(37).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(38),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(38),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(243)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(244)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(37).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(131),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(132),f=r(133).getHighWaterMark,d=r(37).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(38),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(38));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(37).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(38);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e){var r=Buffer.alloc,n="0".charCodeAt(0),i=Buffer.from("ustar\0","binary"),o=Buffer.from("00","binary"),s=Buffer.from("ustar ","binary"),a=Buffer.from(" \0","binary"),u=parseInt("7777",8),c=function(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n},l=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var n=156;n<512;n++)e+=t[n];return e},h=function(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "};var f=function(t,e,r){if(128&(t=t.slice(e,e+r))[e=0])return function(t){var e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}for(var r=[],n=t.length-1;n>0;n--){var i=t[n];e?r.push(i):r.push(255-i)}var o=0,s=r.length;for(n=0;n<s;n++)o+=r[n]*Math.pow(256,n);return e?o:-1*o}(t);for(;e<t.length&&32===t[e];)e++;for(var n=function(t,e,r){return"number"!=typeof t?r:(t=~~t)>=e?e:t>=0||(t+=e)>=0?t:0}(c(t,32,e,t.length),t.length,t.length);e<n&&0===t[e];)e++;return n===e?0:parseInt(t.slice(e,n).toString(),8)},d=function(t,e,r,n){return t.slice(e,c(t,0,e,e+r)).toString(n)},p=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};e.decodeLongPath=function(t,e){return d(t,0,t.length,e)},e.encodePax=function(t){var e="";t.name&&(e+=p(" path="+t.name+"\n")),t.linkname&&(e+=p(" linkpath="+t.linkname+"\n"));var r=t.pax;if(r)for(var n in r)e+=p(" "+n+"="+r[n]+"\n");return Buffer.from(e)},e.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&32!==t[r];)r++;var n=parseInt(t.slice(0,r).toString(),10);if(!n)return e;var i=t.slice(r+1,n-1).toString(),o=i.indexOf("=");if(-1===o)return e;e[i.slice(0,o)]=i.slice(o+1),t=t.slice(n)}return e},e.encode=function(t){var e=r(512),s=t.name,a="";if(5===t.typeflag&&"/"!==s[s.length-1]&&(s+="/"),Buffer.byteLength(s)!==s.length)return null;for(;Buffer.byteLength(s)>100;){var c=s.indexOf("/");if(-1===c)return null;a+=a?"/"+s.slice(0,c):s.slice(0,c),s=s.slice(c+1)}return Buffer.byteLength(s)>100||Buffer.byteLength(a)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(s),e.write(h(t.mode&u,6),100),e.write(h(t.uid,6),108),e.write(h(t.gid,6),116),e.write(h(t.size,11),124),e.write(h(t.mtime.getTime()/1e3|0,11),136),e[156]=n+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(t.type),t.linkname&&e.write(t.linkname,157),i.copy(e,257),o.copy(e,263),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(h(t.devmajor||0,6),329),e.write(h(t.devminor||0,6),337),a&&e.write(a,345),e.write(h(l(e),6),148),e)},e.decode=function(t,e,r){var o=0===t[156]?0:t[156]-n,u=d(t,0,100,e),c=f(t,100,8),h=f(t,108,8),p=f(t,116,8),g=f(t,124,12),_=f(t,136,12),m=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(o),y=0===t[157]?null:d(t,157,100,e),b=d(t,265,32),w=d(t,297,32),v=f(t,329,8),E=f(t,337,8),S=l(t);if(256===S)return null;if(S!==f(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(0===i.compare(t,257,263))t[345]&&(u=d(t,345,155,e)+"/"+u);else if(0===s.compare(t,257,263)&&0===a.compare(t,263,265));else if(!r)throw new Error("Invalid tar header: unknown format.");return 0===o&&u&&"/"===u[u.length-1]&&(o=5),{name:u,mode:c,uid:h,gid:p,size:g,mtime:new Date(1e3*_),type:m,linkname:y,uname:b,gname:w,devmajor:v,devminor:E}}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(138),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(248);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(249),g=r(139),_=r(140).getHighWaterMark,m=r(39).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(40),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(40),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(251)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(252)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(39).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(138),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(139),f=r(140).getHighWaterMark,d=r(39).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(40),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(40));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(39).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(40);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e){},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(45);function i(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${Object(n.a)(t)}"`)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(67);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class s{constructor(t={}){i(this,"props",void 0),i(this,"stats",void 0),i(this,"activeRequestCount",0),i(this,"requestQueue",[]),i(this,"requestMap",new Map),i(this,"deferredUpdate",null),this.props={...o,...t},this.stats=new n.a({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(t,e=(()=>0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);const r={handle:t,priority:0,getPriority:e},n=new Promise(t=>(r.resolve=t,r));return this.requestQueue.push(r),this.requestMap.set(t,n),this._issueNewRequests(),n}_issueRequest(t){const{handle:e,resolve:r}=t;let n=!1;const i=()=>{n||(n=!0,this.requestMap.delete(e),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,r?r({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(let e=0;e<t;++e){const t=this.requestQueue.shift();t&&this._issueRequest(t)}}}_updateAllRequests(){const t=this.requestQueue;for(let e=0;e<t.length;++e){const r=t[e];this._updateRequest(r)||(t.splice(e,1),this.requestMap.delete(r.handle),e--)}t.sort((t,e)=>t.priority-e.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(261),i=r(262),o=r(3),s=r(1);class a{async install(e=""){console.log('Installing "EGM2008-5" model...');const r=await Object(n.a)("https://github.com/visgl/deck.gl-data/raw/master/egm/egm2008-5.zip",i.a,{fetch:{followRedirect:!0}});let a=t.cwd();e&&(a=Object(s.join)(a,e)),await Object(o.d)(a,new Uint8Array(r["geoids/egm2008-5.pgm"]),"egm2008-5.pgm"),console.log("All dependencies were installed succesfully.")}}}).call(this,r(0))},function(t,e,r){
21
+ t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&"\\"===t[3]){var i=t[2];"?"!==i&&"."!==i||"\\\\"!==t.slice(0,2)||(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return!1!==e&&""===o[o.length-1]&&o.pop(),n+o.join("/")}},function(t,e,r){(function(e){t.exports=b;var n=r(1),i=r(100),o=r(59),s=(o.Minimatch,r(5)),a=r(11).EventEmitter,u=r(1),c=r(43),l=r(72),h=r(204),f=r(101),d=f.setopts,p=f.ownProp,g=r(205),_=(r(12),f.childrenIgnored),m=f.isIgnored,y=r(73);function b(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return h(t,e)}return new v(t,e,r)}b.sync=h;var w=b.GlobSync=h.GlobSync;function v(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new w(t,e)}if(!(this instanceof v))return new v(t,e,r);d(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=y(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return s();for(var o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--i._processing,i._processing<=0&&i._finish()}}b.glob=b,b.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new v(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},b.Glob=v,s(v,a),v.prototype._finish=function(){if(c(this instanceof v),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();f.finish(this),this.emit("end",this.found)}},v.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},v.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),o=this,s=n.length;if(0===s)return e();var a=this.matches[t]=Object.create(null);n.forEach((function(r,n){r=o._makeAbs(r),i.realpath(r,o.realpathCache,(function(n,i){n?"stat"===n.syscall?a[r]=!0:o.emit("error",n):a[i]=!0,0==--s&&(o.matches[t]=a,e())}))}))},v.prototype._mark=function(t){return f.mark(this,t)},v.prototype._makeAbs=function(t){return f.makeAbs(this,t)},v.prototype.abort=function(){this.aborted=!0,this.emit("abort")},v.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},v.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},v.prototype._process=function(t,e,r,n){if(c(this instanceof v),c("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,n]);else{for(var i,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e,n);case 0:i=null;break;default:i=t.slice(0,s).join("/")}var a,u=t.slice(s);null===i?a=".":l(i)||l(t.join("/"))?(i&&l(i)||(i="/"+i),a=i):a=i;var h=this._makeAbs(a);if(_(this,a))return n();u[0]===o.GLOBSTAR?this._processGlobStar(i,a,h,u,e,r,n):this._processReaddir(i,a,h,u,e,r,n)}},v.prototype._processReaddir=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){return a._processReaddir2(t,e,r,n,i,o,c,s)}))},v.prototype._processReaddir2=function(t,e,r,n,i,o,s,a){if(!s)return a();for(var c=n[0],l=!!this.minimatch.negate,h=c._glob,f=this.dot||"."===h.charAt(0),d=[],p=0;p<s.length;p++){if("."!==(_=s[p]).charAt(0)||f)(l&&!t?!_.match(c):_.match(c))&&d.push(_)}var g=d.length;if(0===g)return a();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(p=0;p<g;p++){var _=d[p];t&&(_="/"!==t?t+"/"+_:t+_),"/"!==_.charAt(0)||this.nomount||(_=u.join(this.root,_)),this._emitMatch(i,_)}return a()}n.shift();for(p=0;p<g;p++){_=d[p];t&&(_="/"!==t?t+"/"+_:t+_),this._process([_].concat(n),i,o,a)}a()},v.prototype._emitMatch=function(t,e){if(!this.aborted&&!m(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=l(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},v.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,i=g("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var o=i&&i.isSymbolicLink();r.symlinks[t]=o,o||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));i&&n.lstat(t,i)}},v.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=g("readdir\0"+t+"\0"+e,r))){if(e&&!p(this.symlinks,t))return this._readdirInGlobStar(t,r);if(p(this.cache,t)){var i=this.cache[t];if(!i||"FILE"===i)return r();if(Array.isArray(i))return r(null,i)}n.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},v.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},v.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},v.prototype._processGlobStar=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){a._processGlobStar2(t,e,r,n,i,o,c,s)}))},v.prototype._processGlobStar2=function(t,e,r,n,i,o,s,a){if(!s)return a();var u=n.slice(1),c=t?[t]:[],l=c.concat(u);this._process(l,i,!1,a);var h=this.symlinks[r],f=s.length;if(h&&o)return a();for(var d=0;d<f;d++){if("."!==s[d].charAt(0)||this.dot){var p=c.concat(s[d],u);this._process(p,i,!0,a);var g=c.concat(s[d],n);this._process(g,i,!0,a)}}a()},v.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,o){n._processSimple2(t,e,i,o,r)}))},v.prototype._processSimple2=function(t,r,n,i,o){if(this.matches[r]||(this.matches[r]=Object.create(null)),!i)return o();if(t&&l(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=u.join(this.root,t):(t=u.resolve(this.root,t),s&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t),o()},v.prototype._stat=function(t,e){var r=this._makeAbs(t),i="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&p(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return e(null,o);if(i&&"FILE"===o)return e()}var s=this.statCache[r];if(void 0!==s){if(!1===s)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?e():e(null,a,s)}var u=this,c=g("stat\0"+r,(function(i,o){if(o&&o.isSymbolicLink())return n.stat(r,(function(n,i){n?u._stat2(t,r,null,o,e):u._stat2(t,r,n,i,e)}));u._stat2(t,r,i,o,e)}));c&&n.lstat(r,c)},v.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var o="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&"FILE"===s?i():i(null,s,n)}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=l,l.realpath=l,l.sync=h,l.realpathSync=h,l.monkeypatch=function(){n.realpath=l,n.realpathSync=h},l.unmonkeypatch=function(){n.realpath=i,n.realpathSync=o};var n=r(1),i=n.realpath,o=n.realpathSync,s=e.version,a=/^v[0-5]\./.test(s),u=r(203);function c(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function l(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(n,i){c(n)?u.realpath(t,e,r):r(n,i)}))}function h(t,e){if(a)return o(t,e);try{return o(t,e)}catch(r){if(c(r))return u.realpathSync(t,e);throw r}}}).call(this,r(0))},function(t,e,r){(function(t){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(e,r,o){o||(o={});if(o.matchBase&&-1===r.indexOf("/")){if(o.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}e.silent=!!o.silent,e.pattern=r,e.strict=!1!==o.strict,e.realpath=!!o.realpath,e.realpathCache=o.realpathCache||Object.create(null),e.follow=!!o.follow,e.dot=!!o.dot,e.mark=!!o.mark,e.nodir=!!o.nodir,e.nodir&&(e.mark=!0);e.sync=!!o.sync,e.nounique=!!o.nounique,e.nonull=!!o.nonull,e.nosort=!!o.nosort,e.nocase=!!o.nocase,e.stat=!!o.stat,e.noprocess=!!o.noprocess,e.absolute=!!o.absolute,e.maxLength=o.maxLength||1/0,e.cache=o.cache||Object.create(null),e.statCache=o.statCache||Object.create(null),e.symlinks=o.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(c))}(e,o),e.changedCwd=!1;var u=t.cwd();n(o,"cwd")?(e.cwd=i.resolve(o.cwd),e.changedCwd=e.cwd!==u):e.cwd=u;e.root=o.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===t.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:l(e,e.cwd),"win32"===t.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!o.nomount,o.nonegate=!0,o.nocomment=!0,e.minimatch=new a(r,o),e.options=e.minimatch.options},e.ownProp=n,e.makeAbs=l,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var o=t.matches[n];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);e?r.push.apply(r,s):s.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(u));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[l(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!h(t,e)})));t.found=r},e.mark=function(t,e){var r=l(t,e),n=t.cache[r],i=e;if(n){var o="DIR"===n||Array.isArray(n),s="/"===e.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=l(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=h,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(1),o=r(59),s=r(72),a=o.Minimatch;function u(t,e){return t.localeCompare(e,"en")}function c(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new a(r,{dot:!0})}return{matcher:new a(t,{dot:!0}),gmatcher:e}}function l(e,r){var n=r;return n="/"===r.charAt(0)?i.join(e.root,r):s(r)||""===r?r:e.changedCwd?i.resolve(e.cwd,r):i.resolve(r),"win32"===t.platform&&(n=n.replace(/\\/g,"/")),n}function h(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}}).call(this,r(0))},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},function(t,e,r){(e=t.exports=r(104)).Stream=e,e.Readable=e,e.Writable=r(108),e.Duplex=r(32),e.Transform=r(109),e.PassThrough=r(212),e.finished=r(74),e.pipeline=r(213)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(105),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(207);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(208),g=r(106),_=r(107).getHighWaterMark,m=r(31).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(32),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(32),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(210)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(211)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(31).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(105),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(106),f=r(107).getHighWaterMark,d=r(31).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(32),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(32));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(31).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(32);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){t.exports={ArchiveEntry:r(75),ZipArchiveEntry:r(111),ArchiveOutputStream:r(114),ZipArchiveOutputStream:r(224)}},function(t,e,r){var n=r(12).inherits,i=r(98),o=r(75),s=r(112),a=r(216),u=r(113),c=r(76),l=t.exports=function(t){if(!(this instanceof l))return new l(t);o.call(this),this.platform=u.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new s,this.crc=0,this.time=-1,this.minver=u.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};n(l,o),l.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},l.prototype.getComment=function(){return null!==this.comment?this.comment:""},l.prototype.getCompressedSize=function(){return this.csize},l.prototype.getCrc=function(){return this.crc},l.prototype.getExternalAttributes=function(){return this.exattr},l.prototype.getExtra=function(){return null!==this.extra?this.extra:u.EMPTY},l.prototype.getGeneralPurposeBit=function(){return this.gpb},l.prototype.getInternalAttributes=function(){return this.inattr},l.prototype.getLastModifiedDate=function(){return this.getTime()},l.prototype.getLocalFileDataExtra=function(){return this.getExtra()},l.prototype.getMethod=function(){return this.method},l.prototype.getName=function(){return this.name},l.prototype.getPlatform=function(){return this.platform},l.prototype.getSize=function(){return this.size},l.prototype.getTime=function(){return-1!==this.time?c.dosToDate(this.time):-1},l.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},l.prototype.getUnixMode=function(){return this.platform!==u.PLATFORM_UNIX?0:this.getExternalAttributes()>>u.SHORT_SHIFT&u.SHORT_MASK},l.prototype.getVersionNeededToExtract=function(){return this.minver},l.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},l.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},l.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},l.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},l.prototype.setExtra=function(t){this.extra=t},l.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof s))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},l.prototype.setInternalAttributes=function(t){this.inattr=t},l.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},l.prototype.setName=function(t,e=!1){t=i(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t="/"+t),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},l.prototype.setPlatform=function(t){this.platform=t},l.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},l.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=c.dateToDos(t,e)},l.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?u.S_IFDIR:u.S_IFREG)<<u.SHORT_SHIFT|(this.isDirectory()?u.S_DOS_D:u.S_DOS_A),this.setExternalAttributes(e),this.mode=t&u.MODE_MASK,this.platform=u.PLATFORM_UNIX},l.prototype.setVersionNeededToExtract=function(t){this.minver=t},l.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},l.prototype.isUnixSymlink=function(){return(this.getUnixMode()&a.FILE_TYPE_FLAG)===a.LINK_FLAG},l.prototype.isZip64=function(){return this.csize>u.ZIP64_MAGIC||this.size>u.ZIP64_MAGIC}},function(t,e,r){var n=r(76),i=t.exports=function(){return this instanceof i?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new i};i.prototype.encode=function(){return n.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},i.prototype.parse=function(t,e){var r=n.getShortBytesValue(t,e),o=new i;return o.useDataDescriptor(0!=(8&r)),o.useUTF8ForNames(0!=(2048&r)),o.useStrongEncryption(0!=(64&r)),o.useEncryption(0!=(1&r)),o.setSlidingDictionarySize(0!=(2&r)?8192:4096),o.setNumberOfShannonFanoTrees(0!=(4&r)?3:2),o},i.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},i.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},i.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},i.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},i.prototype.useDataDescriptor=function(t){this.descriptor=t},i.prototype.usesDataDescriptor=function(){return this.descriptor},i.prototype.useEncryption=function(t){this.encryption=t},i.prototype.usesEncryption=function(){return this.encryption},i.prototype.useStrongEncryption=function(t){this.strongEncryption=t},i.prototype.usesStrongEncryption=function(){return this.strongEncryption},i.prototype.useUTF8ForNames=function(t){this.utf8=t},i.prototype.usesUTF8ForNames=function(){return this.utf8}},function(t,e){t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}},function(t,e,r){var n=r(12).inherits,i=r(115).Transform,o=r(75),s=r(122),a=t.exports=function(t){if(!(this instanceof a))return new a(t);i.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};n(a,i),a.prototype._appendBuffer=function(t,e,r){},a.prototype._appendStream=function(t,e,r){},a.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},a.prototype._finish=function(t){},a.prototype._normalizeEntry=function(t){},a.prototype._transform=function(t,e,r){r(null,t)},a.prototype.entry=function(t,e,r){if(e=e||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),t instanceof o)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=s.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else{if(!s.isStream(e))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,e,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))},a.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},a.prototype.getBytesWritten=function(){return this.offset},a.prototype.write=function(t,e){return t&&(this.offset+=t.length),i.prototype.write.call(this,t,e)}},function(t,e,r){(e=t.exports=r(116)).Stream=e,e.Readable=e,e.Writable=r(120),e.Duplex=r(34),e.Transform=r(121),e.PassThrough=r(222),e.finished=r(77),e.pipeline=r(223)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(117),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(217);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(218),g=r(118),_=r(119).getHighWaterMark,m=r(33).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(34),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(34),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(220)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(221)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(33).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(117),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(118),f=r(119).getHighWaterMark,d=r(33).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(34),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(34));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(33).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(34);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n=r(54).Stream,i=r(115).PassThrough,o=t.exports={};o.isStream=function(t){return t instanceof n},o.normalizeInputSource=function(t){if(null===t)return Buffer.alloc(0);if("string"==typeof t)return Buffer.from(t);if(o.isStream(t)&&!t._readableState){var e=new i;return t.pipe(e),e}return t}},function(t,e,r){var n=r(9).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(t){if(n.isBuffer(t))return t;var e="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof t)return e?n.alloc(t):new n(t);if("string"==typeof t)return e?n.from(t):new n(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function s(t){var e=o(4);return e.writeInt32BE(t,0),e}function a(t,e){t=o(t),n.isBuffer(e)&&(e=e.readUInt32BE(0));for(var r=-1^~~e,s=0;s<t.length;s++)r=i[255&(r^t[s])]^r>>>8;return-1^r}function u(){return s(a.apply(null,arguments))}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),u.signed=function(){return a.apply(null,arguments)},u.unsigned=function(){return a.apply(null,arguments)>>>0},t.exports=u},function(t,e,r){"use strict";t.exports={CRC32Stream:r(225),DeflateCRC32Stream:r(234)}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(126),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(227);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(228),g=r(127),_=r(128).getHighWaterMark,m=r(35).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(36),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(36),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(230)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(231)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(35).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(126),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(127),f=r(128).getHighWaterMark,d=r(35).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(36),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(36));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(35).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(36);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n;n=function(t){t.version="1.2.0";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=t.length-1,o=0;o<i;)n=(n=n>>>8^e[255&(n^t.charCodeAt(o++))])>>>8^e[255&(n^t.charCodeAt(o++))];return o===i&&(n=n>>>8^e[255&(n^t.charCodeAt(o))]),-1^n},t.buf=function(t,r){if(t.length>1e4)return function(t,r){for(var n=-1^r,i=t.length-7,o=0;o<i;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+7;)n=n>>>8^e[255&(n^t[o++])];return-1^n}(t,r);for(var n=-1^r,i=t.length-3,o=0;o<i;)n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+3;)n=n>>>8^e[255&(n^t[o++])];return-1^n},t.str=function(t,r){for(var n,i,o=-1^r,s=0,a=t.length;s<a;)(n=t.charCodeAt(s++))<128?o=o>>>8^e[255&(o^n)]:n<2048?o=(o=o>>>8^e[255&(o^(192|n>>6&31))])>>>8^e[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&t.charCodeAt(s++),o=(o=(o=(o=o>>>8^e[255&(o^(240|n>>8&7))])>>>8^e[255&(o^(128|n>>2&63))])>>>8^e[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^e[255&(o^(128|63&i))]):o=(o=(o=o>>>8^e[255&(o^(224|n>>12&15))])>>>8^e[255&(o^(128|n>>6&63))])>>>8^e[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(e):n({})},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(133),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(240);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(241),g=r(134),_=r(135).getHighWaterMark,m=r(37).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(38),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(38),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(243)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(244)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(37).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(133),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(134),f=r(135).getHighWaterMark,d=r(37).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(38),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(38));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(37).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(38);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e){var r=Buffer.alloc,n="0".charCodeAt(0),i=Buffer.from("ustar\0","binary"),o=Buffer.from("00","binary"),s=Buffer.from("ustar ","binary"),a=Buffer.from(" \0","binary"),u=parseInt("7777",8),c=function(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n},l=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var n=156;n<512;n++)e+=t[n];return e},h=function(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "};var f=function(t,e,r){if(128&(t=t.slice(e,e+r))[e=0])return function(t){var e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}for(var r=[],n=t.length-1;n>0;n--){var i=t[n];e?r.push(i):r.push(255-i)}var o=0,s=r.length;for(n=0;n<s;n++)o+=r[n]*Math.pow(256,n);return e?o:-1*o}(t);for(;e<t.length&&32===t[e];)e++;for(var n=function(t,e,r){return"number"!=typeof t?r:(t=~~t)>=e?e:t>=0||(t+=e)>=0?t:0}(c(t,32,e,t.length),t.length,t.length);e<n&&0===t[e];)e++;return n===e?0:parseInt(t.slice(e,n).toString(),8)},d=function(t,e,r,n){return t.slice(e,c(t,0,e,e+r)).toString(n)},p=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};e.decodeLongPath=function(t,e){return d(t,0,t.length,e)},e.encodePax=function(t){var e="";t.name&&(e+=p(" path="+t.name+"\n")),t.linkname&&(e+=p(" linkpath="+t.linkname+"\n"));var r=t.pax;if(r)for(var n in r)e+=p(" "+n+"="+r[n]+"\n");return Buffer.from(e)},e.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&32!==t[r];)r++;var n=parseInt(t.slice(0,r).toString(),10);if(!n)return e;var i=t.slice(r+1,n-1).toString(),o=i.indexOf("=");if(-1===o)return e;e[i.slice(0,o)]=i.slice(o+1),t=t.slice(n)}return e},e.encode=function(t){var e=r(512),s=t.name,a="";if(5===t.typeflag&&"/"!==s[s.length-1]&&(s+="/"),Buffer.byteLength(s)!==s.length)return null;for(;Buffer.byteLength(s)>100;){var c=s.indexOf("/");if(-1===c)return null;a+=a?"/"+s.slice(0,c):s.slice(0,c),s=s.slice(c+1)}return Buffer.byteLength(s)>100||Buffer.byteLength(a)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(s),e.write(h(t.mode&u,6),100),e.write(h(t.uid,6),108),e.write(h(t.gid,6),116),e.write(h(t.size,11),124),e.write(h(t.mtime.getTime()/1e3|0,11),136),e[156]=n+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(t.type),t.linkname&&e.write(t.linkname,157),i.copy(e,257),o.copy(e,263),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(h(t.devmajor||0,6),329),e.write(h(t.devminor||0,6),337),a&&e.write(a,345),e.write(h(l(e),6),148),e)},e.decode=function(t,e,r){var o=0===t[156]?0:t[156]-n,u=d(t,0,100,e),c=f(t,100,8),h=f(t,108,8),p=f(t,116,8),g=f(t,124,12),_=f(t,136,12),m=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(o),y=0===t[157]?null:d(t,157,100,e),b=d(t,265,32),w=d(t,297,32),v=f(t,329,8),E=f(t,337,8),S=l(t);if(256===S)return null;if(S!==f(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(0===i.compare(t,257,263))t[345]&&(u=d(t,345,155,e)+"/"+u);else if(0===s.compare(t,257,263)&&0===a.compare(t,263,265));else if(!r)throw new Error("Invalid tar header: unknown format.");return 0===o&&u&&"/"===u[u.length-1]&&(o=5),{name:u,mode:c,uid:h,gid:p,size:g,mtime:new Date(1e3*_),type:m,linkname:y,uname:b,gname:w,devmajor:v,devminor:E}}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=T,T.ReadableState=A;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(140),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(248);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(249),g=r(141),_=r(142).getHighWaterMark,m=r(39).codes,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,v=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5)(T,s);var E=g.errorOrDestroy,S=["error","close","destroy","pause","resume"];function A(t,e,n){i=i||r(40),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=_(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(14).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function T(t){if(i=i||r(40),!(this instanceof T))return new T(t);var e=this instanceof i;this._readableState=new A(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function R(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?k(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)E(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?E(t,new v):O(t,s,e,!0);else if(s.ended)E(t,new b);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?O(t,s,e,!1):C(t,s)):O(t,s,e,!1)}else n||(s.reading=!1,C(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function O(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&k(t)),C(t,e)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),T.prototype.destroy=g.destroy,T.prototype._undestroy=g.undestroy,T.prototype._destroy=function(t,e){e(t)},T.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),R(this,t,e,!1,r)},T.prototype.unshift=function(t){return R(this,t,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(t){h||(h=r(14).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,B(t)}function C(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(M,t,e))}function M(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){c("readable nexttick read 0"),t.read(0)}function L(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),B(t),e.flowing&&!e.reading&&t.read(0)}function B(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function j(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}T.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?j(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&j(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&j(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(t){E(this,new w("_read()"))},T.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:_;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",g),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",_),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,B(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==F(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),_(),t.removeListener("error",d),0===o(t,"error")&&E(t,e)}function p(){t.removeListener("finish",g),_()}function g(){c("onfinish"),t.removeListener("close",p),_()}function _(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",g),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},T.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?k(this):i.reading||n.nextTick(P,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(L,t,e))}(this,t)),t.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(251)),f(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),T._fromList=N,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(t,e){return void 0===d&&(d=r(252)),d(T,t,e)})}).call(this,r(7),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(39).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=T,T.WritableState=A;var s={deprecate:r(30)},a=r(140),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(141),f=r(142).getHighWaterMark,d=r(39).codes,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,_=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,E=h.errorOrDestroy;function S(){}function A(t,e,s){o=o||r(40),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new _;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(C,t,e),t._writableState.errorEmitted=!0,E(t,i)):(o(i),t._writableState.errorEmitted=!0,E(t,i),C(t,e))}(t,r,i,e,o);else{var s=k(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),i?n.nextTick(O,t,r,s,o):O(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function T(t){var e=this instanceof(o=o||r(40));if(!e&&!l.call(T,this))return new T(t);this._writableState=new A(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function R(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new y("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function O(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),C(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,R(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(R(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&E(t,r),e.prefinished=!0,t.emit("prefinish"),C(t,e)}))}function C(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(5)(T,a),A.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(A.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===T&&(t&&t._writableState instanceof A)}})):l=function(t){return t instanceof this},T.prototype.pipe=function(){E(this,new m)},T.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;E(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new b:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(E(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else R(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},T.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(t,e,r){r(new g("_write()"))},T.prototype._writev=null,T.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,C(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),T.prototype.destroy=h.destroy,T.prototype._undestroy=h.undestroy,T.prototype._destroy=function(t,e){e(t)}}).call(this,r(7),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(39).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(40);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(5)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(67);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class s{constructor(t={}){i(this,"props",void 0),i(this,"stats",void 0),i(this,"activeRequestCount",0),i(this,"requestQueue",[]),i(this,"requestMap",new Map),i(this,"deferredUpdate",null),this.props={...o,...t},this.stats=new n.a({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(t,e=(()=>0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);const r={handle:t,priority:0,getPriority:e},n=new Promise(t=>(r.resolve=t,r));return this.requestQueue.push(r),this.requestMap.set(t,n),this._issueNewRequests(),n}_issueRequest(t){const{handle:e,resolve:r}=t;let n=!1;const i=()=>{n||(n=!0,this.requestMap.delete(e),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,r?r({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(let e=0;e<t;++e){const t=this.requestQueue.shift();t&&this._issueRequest(t)}}}_updateAllRequests(){const t=this.requestQueue;for(let e=0;e<t.length;++e){const r=t[e];this._updateRequest(r)||(t.splice(e,1),this.requestMap.delete(r.handle),e--)}t.sort((t,e)=>t.priority-e.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(261),i=r(262),o=r(3),s=r(1);class a{async install(e=""){console.log('Installing "EGM2008-5" model...');const r=await Object(n.a)("https://github.com/visgl/deck.gl-data/raw/master/egm/egm2008-5.zip",i.a,{fetch:{followRedirect:!0}});let a=t.cwd();e&&(a=Object(s.join)(a,e)),await Object(o.d)(a,new Uint8Array(r["geoids/egm2008-5.pgm"]),"egm2008-5.pgm"),console.log("All dependencies were installed succesfully.")}}}).call(this,r(0))},function(t,e,r){
22
22
  /**
23
23
  * Archiver Vending
24
24
  *
@@ -37,12 +37,12 @@ t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeo
37
37
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
38
38
  e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*g}},function(t,e){},function(t,e,r){"use strict";var n=r(70).Buffer,i=r(168);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return c[u]=i,n(u),u++},f.clearImmediate=d}function d(t){delete c[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{d(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(7),r(0))},function(t,e,r){
39
39
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
40
- var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=o;var n=r(90),i=Object.create(r(42));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(5),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(71)},function(t,e,r){t.exports=r(23)},function(t,e,r){t.exports=r(54).Transform},function(t,e,r){"use strict";(function(t){var n=r(43),i=r(179),o=r(180),s=r(183),a=r(186);for(var u in a)e[u]=a[u];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function c(t){if("number"!=typeof t||t<e.DEFLATE||t>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||s.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},c.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},c.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},c.prototype._write=function(r,i,o,s,a,u,c,l){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==e.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==e.Z_NO_FLUSH&&i!==e.Z_PARTIAL_FLUSH&&i!==e.Z_SYNC_FLUSH&&i!==e.Z_FULL_FLUSH&&i!==e.Z_FINISH&&i!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=Buffer.alloc(0),a=0,s=0),this.strm.avail_in=a,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=l,this.strm.output=u,this.strm.next_out=c,this.flush=i,!r)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return t.nextTick((function(){h._process(),h._after()})),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,r,i,o,s){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(t>=8&&t<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,i,o,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,r,n,a,u){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=a,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new i,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=c}).call(this,r(0))},function(t,e,r){"use strict";
40
+ var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=o;var n=r(92),i=Object.create(r(42));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(5),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(71)},function(t,e,r){t.exports=r(23)},function(t,e,r){t.exports=r(55).Transform},function(t,e,r){"use strict";(function(t){var n=r(43),i=r(179),o=r(180),s=r(183),a=r(186);for(var u in a)e[u]=a[u];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function c(t){if("number"!=typeof t||t<e.DEFLATE||t>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||s.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},c.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},c.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},c.prototype._write=function(r,i,o,s,a,u,c,l){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==e.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==e.Z_NO_FLUSH&&i!==e.Z_PARTIAL_FLUSH&&i!==e.Z_SYNC_FLUSH&&i!==e.Z_FULL_FLUSH&&i!==e.Z_FINISH&&i!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=Buffer.alloc(0),a=0,s=0),this.strm.avail_in=a,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=l,this.strm.output=u,this.strm.next_out=c,this.flush=i,!r)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return t.nextTick((function(){h._process(),h._after()})),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,r,i,o,s){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(t>=8&&t<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,i,o,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,r,n,a,u){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=a,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new i,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=c}).call(this,r(0))},function(t,e,r){"use strict";
41
41
  /*
42
42
  object-assign
43
43
  (c) Sindre Sorhus
44
44
  @license MIT
45
- */var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=s(t),c=1;c<arguments.length;c++){for(var l in r=Object(arguments[c]))i.call(r,l)&&(u[l]=r[l]);if(n){a=n(r);for(var h=0;h<a.length;h++)o.call(r,a[h])&&(u[a[h]]=r[a[h]])}}return u}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"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}},function(t,e,r){"use strict";var n,i=r(57),o=r(181),s=r(92),a=r(93),u=r(182);function c(t,e){return t.msg=u[e],e}function l(t){return(t<<1)-(t>4?9:0)}function h(t){for(var e=t.length;--e>=0;)t[e]=0}function f(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,f(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function g(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+258,d=c[o+s-1],p=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===p&&c[r+s-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<f);if(n=258-(f-o),o=f-258,n>s){if(t.match_start=e,s=n,n>=a)break;d=c[o+s-1],p=c[o+s]}}}while((e=h[e&l])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function m(t){var e,r,n,o,u,c,l,h,f,d,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,h=t.strstart+t.lookahead,f=o,d=void 0,(d=c.avail_in)>f&&(d=f),r=0===d?0:(c.avail_in-=d,i.arraySet(l,c.input,c.next_in,d,h),1===c.state.wrap?c.adler=s(c.adler,l,d,h):2===c.state.wrap&&(c.adler=a(c.adler,l,d,h)),c.next_in+=d,c.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function y(t,e){for(var r,n;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function b(t,e){for(var r,n,i;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(d(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&d(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function v(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),h(this.dyn_ltree),h(this.dyn_dtree),h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),h(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 E(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):c(t,-2)}function S(t){var e,r=E(t);return 0===r&&((e=t.state).window_size=2*e.w_size,h(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[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),r}function A(t,e,r,n,o,s){if(!t)return-2;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||s<0||s>4)return c(t,-2);8===n&&(n=9);var u=new v;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,S(t)}n=[new w(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(m(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,y),new w(4,5,16,8,y),new w(4,6,32,32,y),new w(4,4,16,16,b),new w(8,16,32,32,b),new w(8,16,128,128,b),new w(8,32,128,256,b),new w(32,128,258,1024,b),new w(32,258,258,4096,b)],e.deflateInit=function(t,e){return A(t,e,8,15,8,0)},e.deflateInit2=A,e.deflateReset=S,e.deflateResetKeep=E,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?c(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return c(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var _=8+(i.w_bits-8<<4)<<8;_|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(_|=32),_+=31-_%31,i.status=113,g(i,_),0!==i.strstart&&(g(i,t.adler>>>16),g(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&l(e)<=l(r)&&4!==e)return c(t,-5);if(666===i.status&&0!==t.avail_in)return c(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var y=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(m(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=258){if(m(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+258;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=258-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==y&&4!==y||(i.status=666),1===y||3===y)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(h(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(g(i,t.adler>>>16),g(i,65535&t.adler)),f(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?c(t,-2):(t.state=null,113===e?c(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,c,l,f,d=e.length;if(!t||!t.state)return-2;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(h(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,c=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,m(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,m(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=c,t.input=l,t.avail_in=u,r.wrap=a,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(57);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[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],s=[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],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var h=new Array(512);i(h);var f=new Array(256);i(f);var d=new Array(29);i(d);var p,g,_,m=new Array(30);function y(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?h[t]:h[256+(t>>>7)]}function v(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,v(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function S(t,e,r){E(t,r[2*e],r[2*e+1])}function A(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=A(o[a]++,a))}}function R(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function O(t){t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function x(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function k(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&x(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!x(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function I(t,e,r){var n,i,a,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?S(t,i,e):(S(t,(a=f[i])+256+1,e),0!==(u=o[a])&&E(t,i-=d[a],u),S(t,a=w(--n),r),0!==(u=s[a])&&E(t,n-=m[a],u))}while(c<t.last_lit);S(t,256,e)}function C(t,e){var r,n,i,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=c=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=s[2*i+1]);for(e.max_code=c,r=t.heap_len>>1;r>=1;r--)k(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],k(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,k(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,g++),u[2*n+1]=o,n>c||(t.bl_count[o]++,s=0,n>=d&&(s=f[n-d]),a=u[2*n],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(l[2*n+1]+s)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),T(o,c,t.bl_count)}function M(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4))}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)do{S(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(S(t,i,t.bl_tree),a--),S(t,16,t.bl_tree),E(t,a-3,2)):a<=10?(S(t,17,t.bl_tree),E(t,a-3,3)):(S(t,18,t.bl_tree),E(t,a-11,7));a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4)}}i(m);var P=!1;function L(t,e,r,i){E(t,0+(i?1:0),3),function(t,e,r,i){O(t),i&&(v(t,r),v(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){P||(!function(){var t,e,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<<o[n];t++)f[r++]=n;for(f[r-1]=n,i=0,n=0;n<16;n++)for(m[n]=i,t=0;t<1<<s[n];t++)h[i++]=n;for(i>>=7;n<30;n++)for(m[n]=i<<7,t=0;t<1<<s[n]-7;t++)h[256+i++]=n;for(e=0;e<=15;e++)u[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,u[8]++;for(;t<=255;)c[2*t+1]=9,t++,u[9]++;for(;t<=279;)c[2*t+1]=7,t++,u[7]++;for(;t<=287;)c[2*t+1]=8,t++,u[8]++;for(T(c,287,u),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=A(t,5);p=new y(c,o,257,286,15),g=new y(l,s,0,30,15),_=new y(new Array(0),a,0,19,7)}(),P=!0),t.l_desc=new b(t.dyn_ltree,p),t.d_desc=new b(t.dyn_dtree,g),t.bl_desc=new b(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,R(t)},e._tr_stored_block=L,e._tr_flush_block=function(t,e,r,n){var i,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),C(t,t.l_desc),C(t,t.d_desc),s=function(t){var e;for(M(t,t.dyn_ltree,t.l_desc.max_code),M(t,t.dyn_dtree,t.d_desc.max_code),C(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?L(t,e,r,n):4===t.strategy||o===i?(E(t,2+(n?1:0),3),I(t,c,l)):(E(t,4+(n?1:0),3),function(t,e,r,n){var i;for(E(t,e-257,5),E(t,r-1,5),E(t,n-4,4),i=0;i<n;i++)E(t,t.bl_tree[2*u[i]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),I(t,t.dyn_ltree,t.dyn_dtree)),R(t),n&&O(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(f[r]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){E(t,2,3),S(t,256,c),function(t){16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"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"}},function(t,e,r){"use strict";var n=r(57),i=r(92),o=r(93),s=r(184),a=r(185);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):-2}function f(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,h(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=f(t,e))&&(t.state=null),r):-2}var p,g,_=!0;function m(t){if(_){var e;for(p=new n.Buf32(512),g=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,g,0,t.work,{bits:5}),_=!1}t.lencode=p,t.lenbits=9,t.distcode=g,t.distbits=5}function y(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=h,e.inflateReset2=f,e.inflateResetKeep=l,e.inflateInit=function(t){return d(t,15)},e.inflateInit2=d,e.inflate=function(t,e){var r,c,l,h,f,d,p,g,_,b,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P=0,L=new n.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(r=t.state).mode&&(r.mode=13),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,g=r.hold,_=r.bits,b=d,w=p,C=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(2&r.wrap&&35615===g){r.check=0,L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0),g=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(_-=4,I=8+(15&(g>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,t.adler=r.check=1,r.mode=512&g?10:12,g=0,_=0;break;case 2:for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(r.flags=g,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=g>>8&1),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.head&&(r.head.time=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,L[2]=g>>>16&255,L[3]=g>>>24&255,r.check=o(r.check,L,4,0)),g=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.head&&(r.head.xflags=255&g,r.head.os=g>>8),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.length=g,r.head&&(r.head.extra_len=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((v=r.length)>d&&(v=d),v&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,h,v,I)),512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,r.length-=v),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}g=0,_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}t.adler=r.check=u(g),g=0,_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){g>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}switch(r.last=1&g,_-=1,3&(g>>>=1)){case 0:r.mode=14;break;case 1:if(m(r),r.mode=20,6===e){g>>>=2,_-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,_-=2;break;case 14:for(g>>>=7&_,_-=7&_;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if((65535&g)!=(g>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,g=0,_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(v=r.length){if(v>d&&(v=d),v>p&&(v=p),0===v)break t;n.arraySet(l,c,h,v,f),d-=v,h+=v,p-=v,f+=v,r.length-=v;break}r.mode=12;break;case 17:for(;_<14;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(r.nlen=257+(31&g),g>>>=5,_-=5,r.ndist=1+(31&g),g>>>=5,_-=5,r.ncode=4+(15&g),g>>>=4,_-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.lens[B[r.have++]]=7&g,g>>>=3,_-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},C=a(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,C){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;T=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(R<16)g>>>=A,_-=A,r.lens[r.have++]=R;else{if(16===R){for(D=A+2;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g>>>=A,_-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],v=3+(3&g),g>>>=2,_-=2}else if(17===R){for(D=A+3;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}_-=A,I=0,v=3+(7&(g>>>=A)),g>>>=3,_-=3}else{for(D=A+7;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}_-=A,I=0,v=11+(127&(g>>>=A)),g>>>=7,_-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;v--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,M={bits:r.lenbits},C=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,C){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},C=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,C){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,s(t,w),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,g=r.hold,_=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(T&&0==(240&T)){for(O=A,x=T,k=R;T=(P=r.lencode[k+((g&(1<<O+x)-1)>>O)])>>>16&255,R=65535&P,!(O+(A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}g>>>=O,_-=O,r.back+=O}if(g>>>=A,_-=A,r.back+=A,r.length=R,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(D=r.extra;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.length+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(P=r.distcode[g&(1<<r.distbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(0==(240&T)){for(O=A,x=T,k=R;T=(P=r.distcode[k+((g&(1<<O+x)-1)>>O)])>>>16&255,R=65535&P,!(O+(A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}g>>>=O,_-=O,r.back+=O}if(g>>>=A,_-=A,r.back+=A,64&T){t.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(D=r.extra;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.offset+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(v=w-p,r.offset>v){if((v=r.offset-v)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}v>r.wnext?(v-=r.wnext,E=r.wsize-v):E=r.wnext-v,v>r.length&&(v=r.length),S=r.window}else S=l,E=f-r.offset,v=r.length;v>p&&(v=p),p-=v,r.length-=v;do{l[f++]=S[E++]}while(--v);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;l[f++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===d)break t;d--,g|=c[h++]<<_,_+=8}if(w-=p,t.total_out+=w,r.total+=w,w&&(t.adler=r.check=r.flags?o(r.check,l,w,f-w):i(r.check,l,w,f-w)),w=p,(r.flags?g:u(g))!==r.check){t.msg="incorrect data check",r.mode=30;break}g=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}g=0,_=0}r.mode=29;case 29:C=1;break t;case 30:C=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,(r.wsize||w!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&y(t,t.output,t.next_out,w-t.avail_out)?(r.mode=31,-4):(b-=t.avail_in,w-=t.avail_out,t.total_in+=b,t.total_out+=w,r.total+=w,r.wrap&&w&&(t.adler=r.check=r.flags?o(r.check,l,w,t.next_out-w):i(r.check,l,w,t.next_out-w)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===b&&0===w||4===e)&&0===C&&(C=-5),C)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:y(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,R=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,g=r.lencode,_=r.distcode,m=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=g[d&m];e:for(;;){if(d>>>=w=b>>>24,p-=w,0===(w=b>>>16&255))R[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&b,(w&=15)&&(p<w&&(d+=T[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=_[d&y];r:for(;;){if(d>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=_[(65535&b)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&b,p<(w&=15)&&(d+=T[n++]<<p,(p+=8)<w&&(d+=T[n++]<<p,p+=8)),(E+=d&(1<<w)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,E>(w=o-s)){if((w=E-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,A=f,0===h){if(S+=c-w,w<v){v-=w;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}}else if(h<w){if(S+=c+h-w,(w-=h)<v){v-=w;do{R[o++]=f[S++]}while(--w);if(S=0,h<v){v-=w=h;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}}}else if(S+=h-w,w<v){v-=w;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}for(;v>2;)R[o++]=A[S++],R[o++]=A[S++],R[o++]=A[S++],v-=3;v&&(R[o++]=A[S++],v>1&&(R[o++]=A[S++]))}else{S=o-E;do{R[o++]=R[S++],R[o++]=R[S++],R[o++]=R[S++],v-=3}while(v>2);v&&(R[o++]=R[S++],v>1&&(R[o++]=R[S++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},function(t,e,r){"use strict";var n=r(57),i=[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],o=[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],s=[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],a=[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(t,e,r,u,c,l,h,f){var d,p,g,_,m,y,b,w,v,E=f.bits,S=0,A=0,T=0,R=0,O=0,x=0,k=0,I=0,C=0,M=0,D=null,P=0,L=new n.Buf16(16),B=new n.Buf16(16),N=null,j=0;for(S=0;S<=15;S++)L[S]=0;for(A=0;A<u;A++)L[e[r+A]]++;for(O=E,R=15;R>=1&&0===L[R];R--);if(O>R&&(O=R),0===R)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(T=1;T<R&&0===L[T];T++);for(O<T&&(O=T),I=1,S=1;S<=15;S++)if(I<<=1,(I-=L[S])<0)return-1;if(I>0&&(0===t||1!==R))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(A=0;A<u;A++)0!==e[r+A]&&(h[B[e[r+A]]++]=A);if(0===t?(D=N=h,y=19):1===t?(D=i,P-=257,N=o,j-=257,y=256):(D=s,N=a,y=-1),M=0,A=0,S=T,m=l,x=O,k=0,g=-1,_=(C=1<<O)-1,1===t&&C>852||2===t&&C>592)return 1;for(;;){b=S-k,h[A]<y?(w=0,v=h[A]):h[A]>y?(w=N[j+h[A]],v=D[P+h[A]]):(w=96,v=0),d=1<<S-k,T=p=1<<x;do{c[m+(M>>k)+(p-=d)]=b<<24|w<<16|v|0}while(0!==p);for(d=1<<S-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,A++,0==--L[S]){if(S===R)break;S=e[r+h[A]]}if(S>O&&(M&_)!==g){for(0===k&&(k=O),m+=T,I=1<<(x=S-k);x+k<R&&!((I-=L[x+k])<=0);)x++,I<<=1;if(C+=1<<x,1===t&&C>852||2===t&&C>592)return 1;c[g=M&_]=O<<24|x<<16|m-l|0}}return 0!==M&&(c[m+M]=S-k<<24|64<<16|0),f.bits=O,0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){(function(e,n){
45
+ */var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=s(t),c=1;c<arguments.length;c++){for(var l in r=Object(arguments[c]))i.call(r,l)&&(u[l]=r[l]);if(n){a=n(r);for(var h=0;h<a.length;h++)o.call(r,a[h])&&(u[a[h]]=r[a[h]])}}return u}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"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}},function(t,e,r){"use strict";var n,i=r(58),o=r(181),s=r(94),a=r(95),u=r(182);function c(t,e){return t.msg=u[e],e}function l(t){return(t<<1)-(t>4?9:0)}function h(t){for(var e=t.length;--e>=0;)t[e]=0}function f(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,f(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function g(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+258,d=c[o+s-1],p=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===p&&c[r+s-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<f);if(n=258-(f-o),o=f-258,n>s){if(t.match_start=e,s=n,n>=a)break;d=c[o+s-1],p=c[o+s]}}}while((e=h[e&l])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function m(t){var e,r,n,o,u,c,l,h,f,d,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,h=t.strstart+t.lookahead,f=o,d=void 0,(d=c.avail_in)>f&&(d=f),r=0===d?0:(c.avail_in-=d,i.arraySet(l,c.input,c.next_in,d,h),1===c.state.wrap?c.adler=s(c.adler,l,d,h):2===c.state.wrap&&(c.adler=a(c.adler,l,d,h)),c.next_in+=d,c.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function y(t,e){for(var r,n;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function b(t,e){for(var r,n,i;;){if(t.lookahead<262){if(m(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=_(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(d(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&d(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function v(){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 i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),h(this.dyn_ltree),h(this.dyn_dtree),h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),h(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 E(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):c(t,-2)}function S(t){var e,r=E(t);return 0===r&&((e=t.state).window_size=2*e.w_size,h(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[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),r}function A(t,e,r,n,o,s){if(!t)return-2;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||s<0||s>4)return c(t,-2);8===n&&(n=9);var u=new v;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,S(t)}n=[new w(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(m(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,y),new w(4,5,16,8,y),new w(4,6,32,32,y),new w(4,4,16,16,b),new w(8,16,32,32,b),new w(8,16,128,128,b),new w(8,32,128,256,b),new w(32,128,258,1024,b),new w(32,258,258,4096,b)],e.deflateInit=function(t,e){return A(t,e,8,15,8,0)},e.deflateInit2=A,e.deflateReset=S,e.deflateResetKeep=E,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?c(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return c(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var _=8+(i.w_bits-8<<4)<<8;_|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(_|=32),_+=31-_%31,i.status=113,g(i,_),0!==i.strstart&&(g(i,t.adler>>>16),g(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&l(e)<=l(r)&&4!==e)return c(t,-5);if(666===i.status&&0!==t.avail_in)return c(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var y=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(m(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=258){if(m(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+258;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=258-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==y&&4!==y||(i.status=666),1===y||3===y)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===y&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(h(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(g(i,t.adler>>>16),g(i,65535&t.adler)),f(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?c(t,-2):(t.state=null,113===e?c(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,c,l,f,d=e.length;if(!t||!t.state)return-2;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(h(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,c=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,m(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,m(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=c,t.input=l,t.avail_in=u,r.wrap=a,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(58);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[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],s=[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],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var h=new Array(512);i(h);var f=new Array(256);i(f);var d=new Array(29);i(d);var p,g,_,m=new Array(30);function y(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function b(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?h[t]:h[256+(t>>>7)]}function v(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,v(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function S(t,e,r){E(t,r[2*e],r[2*e+1])}function A(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=A(o[a]++,a))}}function R(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function O(t){t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function x(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function k(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&x(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!x(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function I(t,e,r){var n,i,a,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?S(t,i,e):(S(t,(a=f[i])+256+1,e),0!==(u=o[a])&&E(t,i-=d[a],u),S(t,a=w(--n),r),0!==(u=s[a])&&E(t,n-=m[a],u))}while(c<t.last_lit);S(t,256,e)}function C(t,e){var r,n,i,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=c=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=s[2*i+1]);for(e.max_code=c,r=t.heap_len>>1;r>=1;r--)k(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],k(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,k(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,g++),u[2*n+1]=o,n>c||(t.bl_count[o]++,s=0,n>=d&&(s=f[n-d]),a=u[2*n],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(l[2*n+1]+s)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),T(o,c,t.bl_count)}function M(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4))}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)do{S(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(S(t,i,t.bl_tree),a--),S(t,16,t.bl_tree),E(t,a-3,2)):a<=10?(S(t,17,t.bl_tree),E(t,a-3,3)):(S(t,18,t.bl_tree),E(t,a-11,7));a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4)}}i(m);var P=!1;function L(t,e,r,i){E(t,0+(i?1:0),3),function(t,e,r,i){O(t),i&&(v(t,r),v(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){P||(!function(){var t,e,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<<o[n];t++)f[r++]=n;for(f[r-1]=n,i=0,n=0;n<16;n++)for(m[n]=i,t=0;t<1<<s[n];t++)h[i++]=n;for(i>>=7;n<30;n++)for(m[n]=i<<7,t=0;t<1<<s[n]-7;t++)h[256+i++]=n;for(e=0;e<=15;e++)u[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,u[8]++;for(;t<=255;)c[2*t+1]=9,t++,u[9]++;for(;t<=279;)c[2*t+1]=7,t++,u[7]++;for(;t<=287;)c[2*t+1]=8,t++,u[8]++;for(T(c,287,u),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=A(t,5);p=new y(c,o,257,286,15),g=new y(l,s,0,30,15),_=new y(new Array(0),a,0,19,7)}(),P=!0),t.l_desc=new b(t.dyn_ltree,p),t.d_desc=new b(t.dyn_dtree,g),t.bl_desc=new b(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,R(t)},e._tr_stored_block=L,e._tr_flush_block=function(t,e,r,n){var i,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),C(t,t.l_desc),C(t,t.d_desc),s=function(t){var e;for(M(t,t.dyn_ltree,t.l_desc.max_code),M(t,t.dyn_dtree,t.d_desc.max_code),C(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?L(t,e,r,n):4===t.strategy||o===i?(E(t,2+(n?1:0),3),I(t,c,l)):(E(t,4+(n?1:0),3),function(t,e,r,n){var i;for(E(t,e-257,5),E(t,r-1,5),E(t,n-4,4),i=0;i<n;i++)E(t,t.bl_tree[2*u[i]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),I(t,t.dyn_ltree,t.dyn_dtree)),R(t),n&&O(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(f[r]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){E(t,2,3),S(t,256,c),function(t){16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"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"}},function(t,e,r){"use strict";var n=r(58),i=r(94),o=r(95),s=r(184),a=r(185);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):-2}function f(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,h(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=f(t,e))&&(t.state=null),r):-2}var p,g,_=!0;function m(t){if(_){var e;for(p=new n.Buf32(512),g=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,g,0,t.work,{bits:5}),_=!1}t.lencode=p,t.lenbits=9,t.distcode=g,t.distbits=5}function y(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=h,e.inflateReset2=f,e.inflateResetKeep=l,e.inflateInit=function(t){return d(t,15)},e.inflateInit2=d,e.inflate=function(t,e){var r,c,l,h,f,d,p,g,_,b,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P=0,L=new n.Buf8(4),B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(r=t.state).mode&&(r.mode=13),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,g=r.hold,_=r.bits,b=d,w=p,C=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(2&r.wrap&&35615===g){r.check=0,L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0),g=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(_-=4,I=8+(15&(g>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,t.adler=r.check=1,r.mode=512&g?10:12,g=0,_=0;break;case 2:for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(r.flags=g,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=g>>8&1),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.head&&(r.head.time=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,L[2]=g>>>16&255,L[3]=g>>>24&255,r.check=o(r.check,L,4,0)),g=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.head&&(r.head.xflags=255&g,r.head.os=g>>8),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.length=g,r.head&&(r.head.extra_len=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),g=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((v=r.length)>d&&(v=d),v&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,h,v,I)),512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,r.length-=v),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}g=0,_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}t.adler=r.check=u(g),g=0,_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){g>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}switch(r.last=1&g,_-=1,3&(g>>>=1)){case 0:r.mode=14;break;case 1:if(m(r),r.mode=20,6===e){g>>>=2,_-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,_-=2;break;case 14:for(g>>>=7&_,_-=7&_;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if((65535&g)!=(g>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,g=0,_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(v=r.length){if(v>d&&(v=d),v>p&&(v=p),0===v)break t;n.arraySet(l,c,h,v,f),d-=v,h+=v,p-=v,f+=v,r.length-=v;break}r.mode=12;break;case 17:for(;_<14;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(r.nlen=257+(31&g),g>>>=5,_-=5,r.ndist=1+(31&g),g>>>=5,_-=5,r.ncode=4+(15&g),g>>>=4,_-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.lens[B[r.have++]]=7&g,g>>>=3,_-=3}for(;r.have<19;)r.lens[B[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,M={bits:r.lenbits},C=a(0,r.lens,0,19,r.lencode,0,r.work,M),r.lenbits=M.bits,C){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;T=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(R<16)g>>>=A,_-=A,r.lens[r.have++]=R;else{if(16===R){for(D=A+2;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g>>>=A,_-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],v=3+(3&g),g>>>=2,_-=2}else if(17===R){for(D=A+3;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}_-=A,I=0,v=3+(7&(g>>>=A)),g>>>=3,_-=3}else{for(D=A+7;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}_-=A,I=0,v=11+(127&(g>>>=A)),g>>>=7,_-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;v--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,M={bits:r.lenbits},C=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,M),r.lenbits=M.bits,C){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,M={bits:r.distbits},C=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,M),r.distbits=M.bits,C){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,s(t,w),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,g=r.hold,_=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(T&&0==(240&T)){for(O=A,x=T,k=R;T=(P=r.lencode[k+((g&(1<<O+x)-1)>>O)])>>>16&255,R=65535&P,!(O+(A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}g>>>=O,_-=O,r.back+=O}if(g>>>=A,_-=A,r.back+=A,r.length=R,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(D=r.extra;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.length+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(P=r.distcode[g&(1<<r.distbits)-1])>>>16&255,R=65535&P,!((A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(0==(240&T)){for(O=A,x=T,k=R;T=(P=r.distcode[k+((g&(1<<O+x)-1)>>O)])>>>16&255,R=65535&P,!(O+(A=P>>>24)<=_);){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}g>>>=O,_-=O,r.back+=O}if(g>>>=A,_-=A,r.back+=A,64&T){t.msg="invalid distance code",r.mode=30;break}r.offset=R,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(D=r.extra;_<D;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}r.offset+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(v=w-p,r.offset>v){if((v=r.offset-v)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}v>r.wnext?(v-=r.wnext,E=r.wsize-v):E=r.wnext-v,v>r.length&&(v=r.length),S=r.window}else S=l,E=f-r.offset,v=r.length;v>p&&(v=p),p-=v,r.length-=v;do{l[f++]=S[E++]}while(--v);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;l[f++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===d)break t;d--,g|=c[h++]<<_,_+=8}if(w-=p,t.total_out+=w,r.total+=w,w&&(t.adler=r.check=r.flags?o(r.check,l,w,f-w):i(r.check,l,w,f-w)),w=p,(r.flags?g:u(g))!==r.check){t.msg="incorrect data check",r.mode=30;break}g=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===d)break t;d--,g+=c[h++]<<_,_+=8}if(g!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}g=0,_=0}r.mode=29;case 29:C=1;break t;case 30:C=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=g,r.bits=_,(r.wsize||w!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&y(t,t.output,t.next_out,w-t.avail_out)?(r.mode=31,-4):(b-=t.avail_in,w-=t.avail_out,t.total_in+=b,t.total_out+=w,r.total+=w,r.wrap&&w&&(t.adler=r.check=r.flags?o(r.check,l,w,t.next_out-w):i(r.check,l,w,t.next_out-w)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===b&&0===w||4===e)&&0===C&&(C=-5),C)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:y(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),o=t.next_out,R=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,g=r.lencode,_=r.distcode,m=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;t:do{p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=g[d&m];e:for(;;){if(d>>>=w=b>>>24,p-=w,0===(w=b>>>16&255))R[o++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=g[(65535&b)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&b,(w&=15)&&(p<w&&(d+=T[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),b=_[d&y];r:for(;;){if(d>>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=_[(65535&b)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&b,p<(w&=15)&&(d+=T[n++]<<p,(p+=8)<w&&(d+=T[n++]<<p,p+=8)),(E+=d&(1<<w)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,E>(w=o-s)){if((w=E-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=0,A=f,0===h){if(S+=c-w,w<v){v-=w;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}}else if(h<w){if(S+=c+h-w,(w-=h)<v){v-=w;do{R[o++]=f[S++]}while(--w);if(S=0,h<v){v-=w=h;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}}}else if(S+=h-w,w<v){v-=w;do{R[o++]=f[S++]}while(--w);S=o-E,A=R}for(;v>2;)R[o++]=A[S++],R[o++]=A[S++],R[o++]=A[S++],v-=3;v&&(R[o++]=A[S++],v>1&&(R[o++]=A[S++]))}else{S=o-E;do{R[o++]=R[S++],R[o++]=R[S++],R[o++]=R[S++],v-=3}while(v>2);v&&(R[o++]=R[S++],v>1&&(R[o++]=R[S++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},function(t,e,r){"use strict";var n=r(58),i=[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],o=[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],s=[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],a=[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(t,e,r,u,c,l,h,f){var d,p,g,_,m,y,b,w,v,E=f.bits,S=0,A=0,T=0,R=0,O=0,x=0,k=0,I=0,C=0,M=0,D=null,P=0,L=new n.Buf16(16),B=new n.Buf16(16),N=null,j=0;for(S=0;S<=15;S++)L[S]=0;for(A=0;A<u;A++)L[e[r+A]]++;for(O=E,R=15;R>=1&&0===L[R];R--);if(O>R&&(O=R),0===R)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(T=1;T<R&&0===L[T];T++);for(O<T&&(O=T),I=1,S=1;S<=15;S++)if(I<<=1,(I-=L[S])<0)return-1;if(I>0&&(0===t||1!==R))return-1;for(B[1]=0,S=1;S<15;S++)B[S+1]=B[S]+L[S];for(A=0;A<u;A++)0!==e[r+A]&&(h[B[e[r+A]]++]=A);if(0===t?(D=N=h,y=19):1===t?(D=i,P-=257,N=o,j-=257,y=256):(D=s,N=a,y=-1),M=0,A=0,S=T,m=l,x=O,k=0,g=-1,_=(C=1<<O)-1,1===t&&C>852||2===t&&C>592)return 1;for(;;){b=S-k,h[A]<y?(w=0,v=h[A]):h[A]>y?(w=N[j+h[A]],v=D[P+h[A]]):(w=96,v=0),d=1<<S-k,T=p=1<<x;do{c[m+(M>>k)+(p-=d)]=b<<24|w<<16|v|0}while(0!==p);for(d=1<<S-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,A++,0==--L[S]){if(S===R)break;S=e[r+h[A]]}if(S>O&&(M&_)!==g){for(0===k&&(k=O),m+=T,I=1<<(x=S-k);x+k<R&&!((I-=L[x+k])<=0);)x++,I<<=1;if(C+=1<<x,1===t&&C>852||2===t&&C>592)return 1;c[g=M&_]=O<<24|x<<16|m-l|0}}return 0!==M&&(c[m+M]=S-k<<24|64<<16|0),f.bits=O,0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){(function(e,n){
46
46
  /**
47
47
  * Archiver Core
48
48
  *
@@ -50,7 +50,7 @@ object-assign
50
50
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
51
51
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
52
52
  */
53
- var i=r(1),o=r(188),s=r(192),a=r(1),u=r(44),c=r(12).inherits,l=r(206),h=r(101).Transform,f="win32"===e.platform,d=function(t,e){if(!(this instanceof d))return new d(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=u.defaults(e,{highWaterMark:1048576,statConcurrency:4}),h.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=s.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=s.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(d,h),d.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},d.prototype._append=function(t,e){var r={source:null,filepath:t};(e=e||{}).name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof i.Stats?(r=this._updateQueueTaskWithStats(r,e.stats))&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r)):this._statQueue.push(r)},d.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},d.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},d.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void n(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),n(r)}}.bind(this))},d.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new l("NOENDMETHOD"))},d.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},d.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},d.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},d.prototype._normalizeEntryData=function(t,e){t=u.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=u.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=f?511:4095:t.stats&&null===t.mode?(t.mode=f?511&t.stats.mode:4095&t.stats.mode,f&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=u.dateify(t.date),t},d.prototype._onModuleError=function(t){this.emit("error",t)},d.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},d.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))},d.prototype._onStatQueueTask=function(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():i.lstat(t.filepath,function(r,i){if(this._state.aborted)n(e);else{if(r)return this._entriesCount--,this.emit("warning",r),void n(e);(t=this._updateQueueTaskWithStats(t,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(t)),n(e)}}.bind(this))},d.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},d.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},d.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=u.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=u.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=u.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!e.isSymbolicLink()||!this._moduleSupports("symlink"))return e.isDirectory()?this.emit("warning",new l("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new l("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new l("ENTRYNOTSUPPORTED",t.data)),null;var r=i.readlinkSync(t.filepath),n=a.dirname(t.filepath);t.data.type="symlink",t.data.linkname=a.relative(n,a.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}return t.data=this._normalizeEntryData(t.data,e),t},d.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},d.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new l("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new l("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=u.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!u.isStream(t))return this.emit("error",new l("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},d.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});var i=o(t,{stat:!0,dot:!0});return i.on("error",function(t){this.emit("error",t)}.bind(this)),i.on("match",function(o){i.pause();var s=!1,a=Object.assign({},r);a.name=o.relative,a.prefix=e,a.stats=o.stat,a.callback=i.resume.bind(i);try{if(n)if(!1===(a=n(a)))s=!0;else if("object"!=typeof a)throw new l("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}s?i.resume():this._append(o.absolute,a)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new l("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new l("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},d.prototype.glob=function(t,e,r){this._pending++,e=u.defaults(e,{stat:!0,pattern:t});var n=o(e.cwd||".",e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();var e=Object.assign({},r);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.finalize=function(){if(this._state.aborted){var t=new l("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new l("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise((function(t,e){var n;r._module.on("end",(function(){n||t()})),r._module.on("error",(function(t){n=!0,e(t)}))}))},d.prototype.setFormat=function(t){return this._format?(this.emit("error",new l("FORMATSET")),this):(this._format=t,this)},d.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new l("ABORTED")),this):this._state.module?(this.emit("error",new l("MODULESET")),this):(this._module=t,this._modulePipe(),this)},d.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new l("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new l("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={type:"symlink"};return n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this},d.prototype.pointer=function(){return this._pointer},d.prototype.use=function(t){return this._streams.push(t),this},t.exports=d}).call(this,r(0),r(56).setImmediate)},function(t,e,r){t.exports=l;const n=r(1),{EventEmitter:i}=r(11),{Minimatch:o}=r(58),{resolve:s}=r(1);function a(t,e){return new Promise((r,i)=>{(e?n.stat:n.lstat)(t,(n,i)=>{if(n)switch(n.code){case"ENOENT":r(e?a(t,!1):null);break;default:r(null)}else r(i)})})}async function*u(t,e,r,i,o,s){let c=await function(t,e){return new Promise((r,i)=>{n.readdir(t,{withFileTypes:!0},(t,n)=>{if(t)switch(t.code){case"ENOTDIR":e?i(t):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;case"ELOOP":default:i(t)}else r(n)})})}(e+t,s);for(const n of c){let s=n.name;void 0===s&&(s=n,i=!0);const c=t+"/"+s,l=c.slice(1),h=e+"/"+l;let f=null;(i||r)&&(f=await a(h,r)),f||void 0===n.name||(f=n),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?o(l)||(yield{relative:l,absolute:h,stats:f},yield*u(c,e,r,i,o,!1)):yield{relative:l,absolute:h,stats:f}}}class c extends i{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new o(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new o(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new o(t,{dot:!0}))}this.iterator=async function*(t,e,r,n){yield*u("",t,e,r,n,!0)}(s(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,n=t.value.absolute;this.options.mark&&e&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:t.value.stats}):this.emit("match",{relative:r,absolute:n})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function l(t,e,r){return new c(t,e,r)}l.ReaddirGlob=c},function(t,e,r){var n=r(190),i=r(191);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return function t(e,r){var o=[],s=i("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var u,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),_=c||h,m=s.body.indexOf(",")>=0;if(!_&&!m)return s.post.match(/,.*\}/)?(e=s.pre+"{"+s.body+a+s.post,t(e)):[e];if(_)u=s.body.split(/\.\./);else{if(1===(u=function t(e){if(!e)return[""];var r=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,s=n.body,a=n.post,u=o.split(",");u[u.length-1]+="{"+s+"}";var c=t(a);a.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c));return r.push.apply(r,u),r}(s.body)).length)if(1===(u=t(u[0],!1).map(f)).length)return(w=s.post.length?t(s.post,!1):[""]).map((function(t){return s.pre+u[0]+t}))}var y,b=s.pre,w=s.post.length?t(s.post,!1):[""];if(_){var v=l(u[0]),E=l(u[1]),S=Math.max(u[0].length,u[1].length),A=3==u.length?Math.abs(l(u[2])):1,T=p;E<v&&(A*=-1,T=g);var R=u.some(d);y=[];for(var O=v;T(O,E);O+=A){var x;if(h)"\\"===(x=String.fromCharCode(O))&&(x="");else if(x=String(O),R){var k=S-x.length;if(k>0){var I=new Array(k+1).join("0");x=O<0?"-"+I+x.slice(1):I+x}}y.push(x)}}else y=n(u,(function(e){return t(e,!1)}));for(var C=0;C<y.length;C++)for(var M=0;M<w.length;M++){var D=b+y[C]+w[M];(!r||_||D)&&o.push(D)}return o}(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(u).split("\\.").join(c)}(t),!0).map(h)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function h(t){return t.split(o).join("\\").split(s).join("{").split(a).join("}").split(u).join(",").split(c).join(".")}function f(t){return"{"+t+"}"}function d(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function g(t,e){return t>=e}},function(t,e){t.exports=function(t,e){for(var n=[],i=0;i<t.length;i++){var o=e(t[i],i);r(o)?n.push.apply(n,o):n.push(o)}return n};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=i(t,r)),e instanceof RegExp&&(e=i(e,r));var n=o(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function i(t,e){var r=e.match(t);return r?r[0]:null}function o(t,e,r){var n,i,o,s,a,u=r.indexOf(t),c=r.indexOf(e,u+1),l=u;if(u>=0&&c>0){if(t===e)return[u,c];for(n=[],o=r.length;l>=0&&!a;)l==u?(n.push(l),u=r.indexOf(t,l+1)):1==n.length?a=[n.pop(),c]:((i=n.pop())<o&&(o=i,s=c),c=r.indexOf(e,l+1)),l=u<c&&u>=0?u:c;n.length&&(a=[o,s])}return a}t.exports=n,n.range=o},function(t,e,r){"use strict";r.r(e),function(t,n){function i(t,...e){return(...r)=>t(...e,...r)}function o(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}r.d(e,"apply",(function(){return i})),r.d(e,"applyEach",(function(){return C})),r.d(e,"applyEachSeries",(function(){return P})),r.d(e,"asyncify",(function(){return h})),r.d(e,"auto",(function(){return N})),r.d(e,"autoInject",(function(){return H})),r.d(e,"cargo",(function(){return Z})),r.d(e,"cargoQueue",(function(){return Q})),r.d(e,"compose",(function(){return Y})),r.d(e,"concat",(function(){return tt})),r.d(e,"concatLimit",(function(){return J})),r.d(e,"concatSeries",(function(){return et})),r.d(e,"constant",(function(){return rt})),r.d(e,"detect",(function(){return it})),r.d(e,"detectLimit",(function(){return ot})),r.d(e,"detectSeries",(function(){return st})),r.d(e,"dir",(function(){return ut})),r.d(e,"doUntil",(function(){return lt})),r.d(e,"doWhilst",(function(){return ct})),r.d(e,"each",(function(){return ft})),r.d(e,"eachLimit",(function(){return dt})),r.d(e,"eachOf",(function(){return k})),r.d(e,"eachOfLimit",(function(){return R})),r.d(e,"eachOfSeries",(function(){return M})),r.d(e,"eachSeries",(function(){return pt})),r.d(e,"ensureAsync",(function(){return gt})),r.d(e,"every",(function(){return _t})),r.d(e,"everyLimit",(function(){return mt})),r.d(e,"everySeries",(function(){return yt})),r.d(e,"filter",(function(){return Et})),r.d(e,"filterLimit",(function(){return St})),r.d(e,"filterSeries",(function(){return At})),r.d(e,"forever",(function(){return Tt})),r.d(e,"groupBy",(function(){return Ot})),r.d(e,"groupByLimit",(function(){return Rt})),r.d(e,"groupBySeries",(function(){return xt})),r.d(e,"log",(function(){return kt})),r.d(e,"map",(function(){return I})),r.d(e,"mapLimit",(function(){return $})),r.d(e,"mapSeries",(function(){return D})),r.d(e,"mapValues",(function(){return Ct})),r.d(e,"mapValuesLimit",(function(){return It})),r.d(e,"mapValuesSeries",(function(){return Mt})),r.d(e,"memoize",(function(){return Dt})),r.d(e,"nextTick",(function(){return Pt})),r.d(e,"parallel",(function(){return Bt})),r.d(e,"parallelLimit",(function(){return Nt})),r.d(e,"priorityQueue",(function(){return Gt})),r.d(e,"queue",(function(){return jt})),r.d(e,"race",(function(){return Ht})),r.d(e,"reduce",(function(){return K})),r.d(e,"reduceRight",(function(){return Wt})),r.d(e,"reflect",(function(){return qt})),r.d(e,"reflectAll",(function(){return Vt})),r.d(e,"reject",(function(){return Qt})),r.d(e,"rejectLimit",(function(){return Kt})),r.d(e,"rejectSeries",(function(){return Xt})),r.d(e,"retry",(function(){return $t})),r.d(e,"retryable",(function(){return te})),r.d(e,"seq",(function(){return X})),r.d(e,"series",(function(){return ee})),r.d(e,"setImmediate",(function(){return l})),r.d(e,"some",(function(){return re})),r.d(e,"someLimit",(function(){return ne})),r.d(e,"someSeries",(function(){return ie})),r.d(e,"sortBy",(function(){return oe})),r.d(e,"timeout",(function(){return se})),r.d(e,"times",(function(){return ue})),r.d(e,"timesLimit",(function(){return ae})),r.d(e,"timesSeries",(function(){return ce})),r.d(e,"transform",(function(){return le})),r.d(e,"tryEach",(function(){return he})),r.d(e,"unmemoize",(function(){return fe})),r.d(e,"until",(function(){return pe})),r.d(e,"waterfall",(function(){return ge})),r.d(e,"whilst",(function(){return de})),r.d(e,"all",(function(){return _t})),r.d(e,"allLimit",(function(){return mt})),r.d(e,"allSeries",(function(){return yt})),r.d(e,"any",(function(){return re})),r.d(e,"anyLimit",(function(){return ne})),r.d(e,"anySeries",(function(){return ie})),r.d(e,"find",(function(){return it})),r.d(e,"findLimit",(function(){return ot})),r.d(e,"findSeries",(function(){return st})),r.d(e,"flatMap",(function(){return tt})),r.d(e,"flatMapLimit",(function(){return J})),r.d(e,"flatMapSeries",(function(){return et})),r.d(e,"forEach",(function(){return ft})),r.d(e,"forEachSeries",(function(){return pt})),r.d(e,"forEachLimit",(function(){return dt})),r.d(e,"forEachOf",(function(){return k})),r.d(e,"forEachOfSeries",(function(){return M})),r.d(e,"forEachOfLimit",(function(){return R})),r.d(e,"inject",(function(){return K})),r.d(e,"foldl",(function(){return K})),r.d(e,"foldr",(function(){return Wt})),r.d(e,"select",(function(){return Et})),r.d(e,"selectLimit",(function(){return St})),r.d(e,"selectSeries",(function(){return At})),r.d(e,"wrapSync",(function(){return h})),r.d(e,"during",(function(){return de})),r.d(e,"doDuring",(function(){return ct}));var s="function"==typeof t&&t,a="object"==typeof n&&"function"==typeof n.nextTick;function u(t){setTimeout(t,0)}function c(t){return(e,...r)=>t(()=>e(...r))}var l=c(s?t:a?n.nextTick:u);function h(t){return p(t)?function(...e){const r=e.pop();return f(t.apply(this,e),r)}:o((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return f(n,r);r(null,n)}))}function f(t,e){return t.then(t=>{d(e,null,t)},t=>{d(e,t&&t.message?t:new Error(t))})}function d(t,e,r){try{t(e,r)}catch(t){l(t=>{throw t},t)}}function p(t){return"AsyncFunction"===t[Symbol.toStringTag]}function g(t){if("function"!=typeof t)throw new Error("expected a function");return p(t)?h(t):t}function _(t,e=t.length){if(!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)})}}function m(t){return function(e,...r){return _((function(n){var i=this;return t(e,(t,e)=>{g(t).apply(i,r.concat(e))},n)}))}}function y(t,e,r,n){e=e||[];var i=[],o=0,s=g(r);return t(e,(t,e,r)=>{var n=o++;s(t,(t,e)=>{i[n]=e,r(t)})},t=>{n(t,i)})}function b(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const w={};function v(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function E(t){if(b(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,n,i,o=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return o?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(o):(r=(e=t)?Object.keys(e):[],n=-1,i=r.length,function(){var t=r[++n];return n<i?{value:e[t],key:t}:null})}function S(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function A(t,e,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function c(){a>=e||s||i||(s=!0,t.next().then(({value:t,done:e})=>{if(!o&&!i){if(s=!1,e)return i=!0,void(a<=0&&n(null));a++,r(t,u,l),u++,c()}}).catch(h))}function l(t,e){if(a-=1,!o)return t?h(t):!1===t?(i=!0,void(o=!0)):e===w||i&&a<=0?(i=!0,n(null)):void c()}function h(t){o||(s=!1,i=!0,n(t))}c()}var T=t=>(e,r,n)=>{if(n=v(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if("AsyncGenerator"===e[Symbol.toStringTag])return A(e,t,r,n);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return A(e[Symbol.asyncIterator](),t,r,n);var i=E(e),o=!1,s=!1,a=0,u=!1;function c(t,e){if(!s)if(a-=1,t)o=!0,n(t);else if(!1===t)o=!0,s=!0;else{if(e===w||o&&a<=0)return o=!0,n(null);u||l()}}function l(){for(u=!0;a<t&&!o;){var e=i();if(null===e)return o=!0,void(a<=0&&n(null));a+=1,r(e.value,e.key,S(c))}u=!1}l()};var R=_((function(t,e,r,n){return T(e)(t,g(r),n)}),4);function O(t,e,r){r=v(r);var n=0,i=0,{length:o}=t,s=!1;function a(t,e){!1===t&&(s=!0),!0!==s&&(t?r(t):++i!==o&&e!==w||r(null))}for(0===o&&r(null);n<o;n++)e(t[n],n,S(a))}function x(t,e,r){return R(t,1/0,e,r)}var k=_((function(t,e,r){return(b(t)?O:x)(t,g(e),r)}),3);var I=_((function(t,e,r){return y(k,t,e,r)}),3),C=m(I);var M=_((function(t,e,r){return R(t,1,e,r)}),3);var D=_((function(t,e,r){return y(M,t,e,r)}),3),P=m(D);const L=Symbol("promiseCallback");function B(){let t,e;function r(r,...n){if(r)return e(r);t(n.length>1?n:n[0])}return r[L]=new Promise((r,n)=>{t=r,e=n}),r}function N(t,e,r){"number"!=typeof e&&(r=e,e=null),r=v(r||B());var n=Object.keys(t).length;if(!n)return r(null);e||(e=n);var i={},o=0,s=!1,a=!1,u=Object.create(null),c=[],l=[],h={};function f(t,e){c.push(()=>function(t,e){if(a)return;var n=S((e,...n)=>{if(o--,!1!==e)if(n.length<2&&([n]=n),e){var c={};if(Object.keys(i).forEach(t=>{c[t]=i[t]}),c[t]=n,a=!0,u=Object.create(null),s)return;r(e,c)}else i[t]=n,(u[t]||[]).forEach(t=>t()),d();else s=!0});o++;var c=g(e[e.length-1]);e.length>1?c(i,n):c(n)}(t,e))}function d(){if(!s){if(0===c.length&&0===o)return r(null,i);for(;c.length&&o<e;){c.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(n=>{const i=t[n];Array.isArray(i)&&i.indexOf(e)>=0&&r.push(n)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void l.push(e);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return f(e,r),void l.push(e);h[e]=i,n.forEach(o=>{if(!t[o])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(t,e){var r=u[t];r||(r=u[t]=[]);r.push(e)}(o,()=>{0===--i&&f(e,r)})})}),function(){var t,e=0;for(;l.length;)t=l.pop(),e++,p(t).forEach(t=>{0==--h[t]&&l.push(t)});if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[L]}var j=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,U=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,z=/(=.+)?(\s*)$/,G=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function H(t,e){var r={};return Object.keys(t).forEach(e=>{var n,i=t[e],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[e]=n.concat(n.length>0?a:i);else if(s)r[e]=i;else{if(n=function(t){const e=t.toString().replace(G,"");let r=e.match(j);if(r||(r=e.match(U)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,n]=r;return n.replace(/\s/g,"").split(F).map(t=>t.replace(z,"").trim())}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[e]=n.concat(a)}function a(t,e){var r=n.map(e=>t[e]);r.push(e),g(i)(...r)}}),N(r,e)}class W{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):q(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):q(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function q(t,e){t.length=1,t.head=t.tail=e}function V(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var n=g(t),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(s[t]=s[t].filter(t=>t!==e)):s[t]=[]:Object.keys(s).forEach(t=>s[t]=[])}function u(t,...e){s[t].forEach(t=>t(...e))}var c=!1;function h(t,e,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(t,...e){return t?r?o(t):i():e.length<=1?i(e[0]):void i(e)}m.started=!0;var a={data:t,callback:r?s:n||s};if(e?m._tasks.unshift(a):m._tasks.push(a),c||(c=!0,l(()=>{c=!1,m.process()})),r||!n)return new Promise((t,e)=>{i=t,o=e})}function f(t){return function(e,...r){i-=1;for(var n=0,s=t.length;n<s;n++){var a=t[n],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(e,...r),null!=e&&u("error",e,a.data)}i<=m.concurrency-m.buffer&&u("unsaturated"),m.idle()&&u("drain"),m.process()}}function d(t){return!(0!==t.length||!m.idle())&&(l(()=>u("drain")),!0)}const p=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...n)=>{a(t,r),e(...n)};s[t].push(r)}(t,(t,n)=>{if(t)return r(t);e(n)})});a(t),function(t,e){s[t].push(e)}(t,e)};var _=!1,m={_tasks:new W,*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),m._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){m._tasks.remove(t)},process(){if(!_){for(_=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var t=[],e=[],r=m._tasks.length;m.payload&&(r=Math.min(r,m.payload));for(var s=0;s<r;s++){var a=m._tasks.shift();t.push(a),o.push(a),e.push(a.data)}i+=1,0===m._tasks.length&&u("empty"),i===m.concurrency&&u("saturated");var c=S(f(t));n(e,c)}_=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>o,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,l(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),m}function Z(t,e){return V(t,1,e)}function Q(t,e,r){return V(t,e,r)}var K=_((function(t,e,r,n){n=v(n);var i=g(r);return M(t,(t,r,n)=>{i(e,t,(t,r)=>{e=r,n(t)})},t=>n(t,e))}),4);function X(...t){var e=t.map(g);return function(...t){var r=this,n=t[t.length-1];return"function"==typeof n?t.pop():n=B(),K(e,t,(t,e,n)=>{e.apply(r,t.concat((t,...e)=>{n(t,e)}))},(t,e)=>n(t,...e)),n[L]}}function Y(...t){return X(...t.reverse())}var $=_((function(t,e,r,n){return y(T(e),t,r,n)}),4);var J=_((function(t,e,r,n){var i=g(r);return $(t,e,(t,e)=>{i(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],i=0;i<e.length;i++)e[i]&&(r=r.concat(...e[i]));return n(t,r)})}),4);var tt=_((function(t,e,r){return J(t,1/0,e,r)}),3);var et=_((function(t,e,r){return J(t,1,e,r)}),3);function rt(...t){return function(...e){return e.pop()(null,...t)}}function nt(t,e){return(r,n,i,o)=>{var s,a=!1;const u=g(i);r(n,(r,n,i)=>{u(r,(n,o)=>n||!1===n?i(n):t(o)&&!s?(a=!0,s=e(!0,r),i(null,w)):void i())},t=>{if(t)return o(t);o(null,a?s:e(!1))})}}var it=_((function(t,e,r){return nt(t=>t,(t,e)=>e)(k,t,e,r)}),3);var ot=_((function(t,e,r,n){return nt(t=>t,(t,e)=>e)(T(e),t,r,n)}),4);var st=_((function(t,e,r){return nt(t=>t,(t,e)=>e)(T(1),t,e,r)}),3);function at(t){return(e,...r)=>g(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var ut=at("dir");var ct=_((function(t,e,r){r=S(r);var n,i=g(t),o=g(e);function s(t,...e){if(t)return r(t);!1!==t&&(n=e,o(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function lt(t,e,r){const n=g(e);return ct(t,(...t)=>{const e=t.pop();n(...t,(t,r)=>e(t,!r))},r)}function ht(t){return(e,r,n)=>t(e,n)}var ft=_((function(t,e,r){return k(t,ht(g(e)),r)}),3);var dt=_((function(t,e,r,n){return T(e)(t,ht(g(r)),n)}),4);var pt=_((function(t,e,r){return dt(t,1,e,r)}),3);function gt(t){return p(t)?t:function(...e){var r=e.pop(),n=!0;e.push((...t)=>{n?l(()=>r(...t)):r(...t)}),t.apply(this,e),n=!1}}var _t=_((function(t,e,r){return nt(t=>!t,t=>!t)(k,t,e,r)}),3);var mt=_((function(t,e,r,n){return nt(t=>!t,t=>!t)(T(e),t,r,n)}),4);var yt=_((function(t,e,r){return nt(t=>!t,t=>!t)(M,t,e,r)}),3);function bt(t,e,r,n){var i=new Array(e.length);t(e,(t,e,n)=>{r(t,(t,r)=>{i[e]=!!r,n(t)})},t=>{if(t)return n(t);for(var r=[],o=0;o<e.length;o++)i[o]&&r.push(e[o]);n(null,r)})}function wt(t,e,r,n){var i=[];t(e,(t,e,n)=>{r(t,(r,o)=>{if(r)return n(r);o&&i.push({index:e,value:t}),n(r)})},t=>{if(t)return n(t);n(null,i.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function vt(t,e,r,n){return(b(e)?bt:wt)(t,e,g(r),n)}var Et=_((function(t,e,r){return vt(k,t,e,r)}),3);var St=_((function(t,e,r,n){return vt(T(e),t,r,n)}),4);var At=_((function(t,e,r){return vt(M,t,e,r)}),3);var Tt=_((function(t,e){var r=S(e),n=g(gt(t));return function t(e){if(e)return r(e);!1!==e&&n(t)}()}),2);var Rt=_((function(t,e,r,n){var i=g(r);return $(t,e,(t,e)=>{i(t,(r,n)=>r?e(r):e(r,{key:n,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<e.length;o++)if(e[o]){var{key:s}=e[o],{val:a}=e[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(t,r)})}),4);function Ot(t,e,r){return Rt(t,1/0,e,r)}function xt(t,e,r){return Rt(t,1,e,r)}var kt=at("log");var It=_((function(t,e,r,n){n=v(n);var i={},o=g(r);return T(e)(t,(t,e,r)=>{o(t,e,(t,n)=>{if(t)return r(t);i[e]=n,r(t)})},t=>n(t,i))}),4);function Ct(t,e,r){return It(t,1/0,e,r)}function Mt(t,e,r){return It(t,1,e,r)}function Dt(t,e=(t=>t)){var r=Object.create(null),n=Object.create(null),i=g(t),s=o((t,o)=>{var s=e(...t);s in r?l(()=>o(null,...r[s])):s in n?n[s].push(o):(n[s]=[o],i(...t,(t,...e)=>{t||(r[s]=e);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var Pt=c(a?n.nextTick:s?t:u),Lt=_((t,e,r)=>{var n=b(e)?[]:{};t(e,(t,e,r)=>{g(t)((t,...i)=>{i.length<2&&([i]=i),n[e]=i,r(t)})},t=>r(t,n))},3);function Bt(t,e){return Lt(k,t,e)}function Nt(t,e,r){return Lt(T(e),t,r)}function jt(t,e){var r=g(t);return V((t,e)=>{r(t[0],e)},e,1)}class Ut{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&zt(this.heap[t],this.heap[e=Ft(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=1+(t<<1))<this.heap.length&&(e+1<this.heap.length&&zt(this.heap[e+1],this.heap[e])&&(e+=1),!zt(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=Ft(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function Ft(t){return(t+1>>1)-1}function zt(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function Gt(t,e){var r=jt(t,e);return r._tasks=new Ut,r.push=function(t,e=0,n=(()=>{})){if("function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,Array.isArray(t)||(t=[t]),0===t.length&&r.idle())return l(()=>r.drain());for(var i=0,o=t.length;i<o;i++){var s={data:t[i],priority:e,callback:n};r._tasks.push(s)}l(r.process)},delete r.unshift,r}var Ht=_((function(t,e){if(e=v(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,n=t.length;r<n;r++)g(t[r])(e)}),2);function Wt(t,e,r,n){var i=[...t].reverse();return K(i,e,r,n)}function qt(t){var e=g(t);return o((function(t,r){return t.push((t,...e)=>{let n={};if(t&&(n.error=t),e.length>0){var i=e;e.length<=1&&([i]=e),n.value=i}r(null,n)}),e.apply(this,t)}))}function Vt(t){var e;return Array.isArray(t)?e=t.map(qt):(e={},Object.keys(t).forEach(r=>{e[r]=qt.call(this,t[r])})),e}function Zt(t,e,r,n){const i=g(r);return vt(t,e,(t,e)=>{i(t,(t,r)=>{e(t,!r)})},n)}var Qt=_((function(t,e,r){return Zt(k,t,e,r)}),3);var Kt=_((function(t,e,r,n){return Zt(T(e),t,r,n)}),4);var Xt=_((function(t,e,r){return Zt(M,t,e,r)}),3);function Yt(t){return function(){return t}}function $t(t,e,r){var n={times:5,intervalFunc:Yt(0)};if(arguments.length<3&&"function"==typeof t?(r=e||B(),e=t):(Jt(n,t),r=r||B()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var i=g(e),o=1;function s(){i((t,...e)=>{!1!==t&&(t&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(t))?setTimeout(s,n.intervalFunc(o-1)):r(t,...e))})}return s(),r[L]}function Jt(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:Yt(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}function te(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;p(e)&&(r+=1);var n=g(e);return o((e,i)=>{function o(t){n(...e,t)}return(e.length<r-1||null==i)&&(e.push(i),i=B()),t?$t(t,o,i):$t(o,i),i[L]})}function ee(t,e){return Lt(M,t,e)}var re=_((function(t,e,r){return nt(Boolean,t=>t)(k,t,e,r)}),3);var ne=_((function(t,e,r,n){return nt(Boolean,t=>t)(T(e),t,r,n)}),4);var ie=_((function(t,e,r){return nt(Boolean,t=>t)(M,t,e,r)}),3);var oe=_((function(t,e,r){var n=g(e);return I(t,(t,e)=>{n(t,(r,n)=>{if(r)return e(r);e(r,{value:t,criteria:n})})},(t,e)=>{if(t)return r(t);r(null,e.sort(i).map(t=>t.value))});function i(t,e){var r=t.criteria,n=e.criteria;return r<n?-1:r>n?1:0}}),3);function se(t,e,r){var n=g(t);return o((i,o)=>{var s,a=!1;i.push((...t)=>{a||(o(...t),clearTimeout(s))}),s=setTimeout((function(){var e=t.name||"anonymous",n=new Error('Callback function "'+e+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),e),n(...i)})}function ae(t,e,r,n){var i=g(r);return $(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,i,n)}function ue(t,e,r){return ae(t,1/0,e,r)}function ce(t,e,r){return ae(t,1,e,r)}function le(t,e,r,n){arguments.length<=3&&"function"==typeof e&&(n=r,r=e,e=Array.isArray(t)?[]:{}),n=v(n||B());var i=g(r);return k(t,(t,r,n)=>{i(e,t,r,n)},t=>n(t,e)),n[L]}var he=_((function(t,e){var r,n=null;return pt(t,(t,e)=>{g(t)((t,...i)=>{if(!1===t)return e(t);i.length<2?[r]=i:r=i,n=t,e(t?null:{})})},()=>e(n,r))}));function fe(t){return(...e)=>(t.unmemoized||t)(...e)}var de=_((function(t,e,r){r=S(r);var n=g(e),i=g(t),o=[];function s(t,...e){if(t)return r(t);o=e,!1!==t&&i(a)}function a(t,e){return t?r(t):!1!==t?e?void n(s):r(null,...o):void 0}return i(a)}),3);function pe(t,e,r){const n=g(t);return de(t=>n((e,r)=>t(e,!r)),e,r)}var ge=_((function(t,e){if(e=v(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function n(e){g(t[r++])(...e,S(i))}function i(i,...o){if(!1!==i)return i||r===t.length?e(i,...o):void n(o)}n([])})),_e={apply:i,applyEach:C,applyEachSeries:P,asyncify:h,auto:N,autoInject:H,cargo:Z,cargoQueue:Q,compose:Y,concat:tt,concatLimit:J,concatSeries:et,constant:rt,detect:it,detectLimit:ot,detectSeries:st,dir:ut,doUntil:lt,doWhilst:ct,each:ft,eachLimit:dt,eachOf:k,eachOfLimit:R,eachOfSeries:M,eachSeries:pt,ensureAsync:gt,every:_t,everyLimit:mt,everySeries:yt,filter:Et,filterLimit:St,filterSeries:At,forever:Tt,groupBy:Ot,groupByLimit:Rt,groupBySeries:xt,log:kt,map:I,mapLimit:$,mapSeries:D,mapValues:Ct,mapValuesLimit:It,mapValuesSeries:Mt,memoize:Dt,nextTick:Pt,parallel:Bt,parallelLimit:Nt,priorityQueue:Gt,queue:jt,race:Ht,reduce:K,reduceRight:Wt,reflect:qt,reflectAll:Vt,reject:Qt,rejectLimit:Kt,rejectSeries:Xt,retry:$t,retryable:te,seq:X,series:ee,setImmediate:l,some:re,someLimit:ne,someSeries:ie,sortBy:oe,timeout:se,times:ue,timesLimit:ae,timesSeries:ce,transform:le,tryEach:he,unmemoize:fe,until:pe,waterfall:ge,whilst:de,all:_t,allLimit:mt,allSeries:yt,any:re,anyLimit:ne,anySeries:ie,find:it,findLimit:ot,findSeries:st,flatMap:tt,flatMapLimit:J,flatMapSeries:et,forEach:ft,forEachSeries:pt,forEachLimit:dt,forEachOf:k,forEachOfSeries:M,forEachOfLimit:R,inject:K,foldl:K,foldr:Wt,select:Et,selectLimit:St,selectSeries:At,wrapSync:h,during:de,doDuring:ct};e.default=_e}.call(this,r(56).setImmediate,r(0))},function(t,e,r){(function(e){var n=r(95),i=e.cwd,o=null,s=e.env.GRACEFUL_FS_PLATFORM||e.platform;e.cwd=function(){return o||(o=i.call(e)),o};try{e.cwd()}catch(t){}if("function"==typeof e.chdir){var a=e.chdir;e.chdir=function(t){o=null,a.call(e,t)},Object.setPrototypeOf&&Object.setPrototypeOf(e.chdir,a)}t.exports=function(t){n.hasOwnProperty("O_SYMLINK")&&e.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(t){t.lchmod=function(e,r,i){t.open(e,n.O_WRONLY|n.O_SYMLINK,r,(function(e,n){e?i&&i(e):t.fchmod(n,r,(function(e){t.close(n,(function(t){i&&i(e||t)}))}))}))},t.lchmodSync=function(e,r){var i,o=t.openSync(e,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{i=t.fchmodSync(o,r),s=!1}finally{if(s)try{t.closeSync(o)}catch(t){}else t.closeSync(o)}return i}}(t);t.lutimes||function(t){n.hasOwnProperty("O_SYMLINK")?(t.lutimes=function(e,r,i,o){t.open(e,n.O_SYMLINK,(function(e,n){e?o&&o(e):t.futimes(n,r,i,(function(e){t.close(n,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(e,r,i){var o,s=t.openSync(e,n.O_SYMLINK),a=!0;try{o=t.futimesSync(s,r,i),a=!1}finally{if(a)try{t.closeSync(s)}catch(t){}else t.closeSync(s)}return o}):(t.lutimes=function(t,r,n,i){i&&e.nextTick(i)},t.lutimesSync=function(){})}(t);t.chown=a(t.chown),t.fchown=a(t.fchown),t.lchown=a(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=o(t.chmodSync),t.fchmodSync=o(t.fchmodSync),t.lchmodSync=o(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.lchmod||(t.lchmod=function(t,r,n){n&&e.nextTick(n)},t.lchmodSync=function(){});t.lchown||(t.lchown=function(t,r,n,i){i&&e.nextTick(i)},t.lchownSync=function(){});"win32"===s&&(t.rename=(r=t.rename,function(e,n,i){var o=Date.now(),s=0;r(e,n,(function a(u){if(u&&("EACCES"===u.code||"EPERM"===u.code)&&Date.now()-o<6e4)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?r(e,n,a):i(u)}))}),s),void(s<100&&(s+=10));i&&i(u)}))}));var r;function i(e){return e?function(r,n,i){return e.call(t,r,n,(function(t){h(t)&&(t=null),i&&i.apply(this,arguments)}))}:e}function o(e){return e?function(r,n){try{return e.call(t,r,n)}catch(t){if(!h(t))throw t}}:e}function a(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(t){h(t)&&(t=null),o&&o.apply(this,arguments)}))}:e}function u(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(t){if(!h(t))throw t}}:e}function c(e){return e?function(r,n,i){function o(t,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function l(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:e}function h(t){return!t||("ENOSYS"===t.code||!(e.getuid&&0===e.getuid()||"EINVAL"!==t.code&&"EPERM"!==t.code))}t.read=function(e){function r(r,n,i,o,s,a){var u;if(a&&"function"==typeof a){var c=0;u=function(l,h,f){if(l&&"EAGAIN"===l.code&&c<10)return c++,e.call(t,r,n,i,o,s,u);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,u)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync=(f=t.readSync,function(e,r,n,i,o){for(var s=0;;)try{return f.call(t,e,r,n,i,o)}catch(t){if("EAGAIN"===t.code&&s<10){s++;continue}throw t}});var f}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(53).Stream;t.exports=function(t){return{ReadStream:function r(i,o){if(!(this instanceof r))return new r(i,o);n.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var a=Object.keys(o),u=0,c=a.length;u<c;u++){var l=a[u];this[l]=o[l]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void e.nextTick((function(){s._read()}));t.open(this.path,this.flags,this.mode,(function(t,e){if(t)return s.emit("error",t),void(s.readable=!1);s.fd=e,s.emit("open",e),s._read()}))},WriteStream:function e(r,i){if(!(this instanceof e))return new e(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var u=o[s];this[u]=i[u]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}).call(this,r(0))},function(t,e,r){"use strict";t.exports=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var e={__proto__:n(t)};else e=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e};var n=Object.getPrototypeOf||function(t){return t.__proto__}},function(t,e,r){var n=r(12),i=r(91);function o(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function s(t,e){if(!(this instanceof s))return new s(t,e);i.call(this,e),o(this,"_read",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function a(t,e){if(!(this instanceof a))return new a(t,e);i.call(this,e),o(this,"_write",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}t.exports={Readable:s,Writable:a},n.inherits(s,i),n.inherits(a,i)},function(t,e){var r=/^(?:0|[1-9]\d*)$/;function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=i.propertyIsEnumerable,u=Math.max;function c(t,e){var r=_(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&m(t)}(t)&&o.call(t,"callee")&&(!a.call(t,"callee")||"[object Arguments]"==s.call(t))}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var u in t)!e&&!o.call(t,u)||i&&("length"==u||p(u,n))||r.push(u);return r}function l(t,e,r,n){return void 0===t||g(t,i[r])&&!o.call(n,r)?e:t}function h(t,e,r){var n=t[e];o.call(t,e)&&g(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function f(t){if(!y(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n,s=(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||i,e===n),a=[];for(var u in t)("constructor"!=u||!s&&o.call(t,u))&&a.push(u);return a}function d(t,e){return e=u(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=u(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,n(t,this,a)}}function p(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<e}function g(t,e){return t===e||t!=t&&e!=e}var _=Array.isArray;function m(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=y(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var b,w=(b=function(t,e,r,n){!function(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;h(r,s,void 0===a?t[s]:a)}}(e,function(t){return m(t)?c(t,!0):f(t)}(e),t,n)},d((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=b.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!y(r))return!1;var n=typeof e;return!!("number"==n?m(r)&&p(e,r.length):"string"==n&&e in r)&&g(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&b(t,s,r,i)}return t}))),v=d((function(t){return t.push(void 0,l),n(w,void 0,t)}));t.exports=v},function(t,e,r){var n=r(94),i=r(1),o=r(199),s=r(200),a=r(201),u=r(202),c=r(97),l=t.exports={},h=/[\/\\]/g;l.exists=function(){var t=i.join.apply(i,arguments);return n.existsSync(t)},l.expand=function(...t){var e=u(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(0===r.length)return[];var l=function(t,e){var r=[];return o(t).forEach((function(t){var n=0===t.indexOf("!");n&&(t=t.slice(1));var i=e(t);r=n?s(r,i):a(r,i)})),r}(r,(function(t){return c.sync(t,e)}));return e.filter&&(l=l.filter((function(t){t=i.join(e.cwd||"",t);try{return"function"==typeof e.filter?e.filter(t):n.statSync(t)[e.filter]()}catch(t){return!1}}))),l},l.expandMapping=function(t,e,r){r=Object.assign({rename:function(t,e){return i.join(t||"",e)}},r);var n=[],o={};return l.expand(r,t).forEach((function(t){var s=t;r.flatten&&(s=i.basename(s)),r.ext&&(s=s.replace(/(\.[^\/]*)?$/,r.ext));var a=r.rename(e,s,r);r.cwd&&(t=i.join(r.cwd,t)),a=a.replace(h,"/"),t=t.replace(h,"/"),o[a]?o[a].src.push(t):(n.push({src:[t],dest:a}),o[a]=n[n.length-1])})),n},l.normalizeFilesArray=function(t){var e=[];return t.forEach((function(t){("src"in t||"dest"in t)&&e.push(t)})),0===e.length?[]:e=_(e).chain().forEach((function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=o(t.src):t.src=[t.src])})).map((function(t){var e=Object.assign({},t);if(delete e.src,delete e.dest,t.expand)return l.expandMapping(t.src,t.dest,e).map((function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach((function(t){delete r[t]})),r}));var r=Object.assign({},t);return r.orig=Object.assign({},t),"src"in r&&Object.defineProperty(r,"src",{enumerable:!0,get:function r(){var n;return"result"in r||(n=t.src,n=Array.isArray(n)?o(n):[n],r.result=l.expand(e,n)),r.result}}),"dest"in r&&(r.dest=t.dest),r})).flatten().value()}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e,n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")();function o(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var s=Object.prototype,a=s.hasOwnProperty,u=s.toString,c=i.Symbol,l=s.propertyIsEnumerable,h=c?c.isConcatSpreadable:void 0;function f(t){return d(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&a.call(t,"callee")&&(!l.call(t,"callee")||"[object Arguments]"==u.call(t))}(t)||!!(h&&t&&t[h])}var d=Array.isArray;t.exports=function(t){return(t?t.length:0)?function t(e,r,n,i,s){var a=-1,u=e.length;for(n||(n=f),s||(s=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,i,s):o(s,c):i||(s[s.length]=c)}return s}(t,1):[]}}).call(this,r(7))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}var f,d=Array.prototype,p=Function.prototype,g=Object.prototype,_=o["__core-js_shared__"],m=(f=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",y=p.toString,b=g.hasOwnProperty,w=g.toString,v=RegExp("^"+y.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=o.Symbol,S=g.propertyIsEnumerable,A=d.splice,T=E?E.isConcatSpreadable:void 0,R=Math.max,O=N(o,"Map"),x=N(Object,"create");function k(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function M(t){var e=-1,r=t?t.length:0;for(this.__data__=new C;++e<r;)this.add(t[e])}function D(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function P(t,e,r,n){var i,o=-1,s=a,c=!0,l=t.length,f=[],d=e.length;if(!l)return f;r&&(e=function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}(e,(i=r,function(t){return i(t)}))),n?(s=u,c=!1):e.length>=200&&(s=h,c=!1,e=new M(e));t:for(;++o<l;){var p=t[o],g=r?r(p):p;if(p=n||0!==p?p:0,c&&g==g){for(var _=d;_--;)if(e[_]===g)continue t;f.push(p)}else s(e,g,n)||f.push(p)}return f}function L(t){return!(!V(t)||(e=t,m&&m in e))&&(q(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?v:r).test(function(t){if(null!=t){try{return y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function B(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function N(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return L(r)?r:void 0}function j(t){return G(t)||function(t){return W(t)&&b.call(t,"callee")&&(!S.call(t,"callee")||"[object Arguments]"==w.call(t))}(t)||!!(T&&t&&t[T])}k.prototype.clear=function(){this.__data__=x?x(null):{}},k.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},k.prototype.get=function(t){var e=this.__data__;if(x){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return b.call(e,t)?e[t]:void 0},k.prototype.has=function(t){var e=this.__data__;return x?void 0!==e[t]:b.call(e,t)},k.prototype.set=function(t,e){return this.__data__[t]=x&&void 0===e?"__lodash_hash_undefined__":e,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(t){var e=this.__data__,r=D(e,t);return!(r<0)&&(r==e.length-1?e.pop():A.call(e,r,1),!0)},I.prototype.get=function(t){var e=this.__data__,r=D(e,t);return r<0?void 0:e[r][1]},I.prototype.has=function(t){return D(this.__data__,t)>-1},I.prototype.set=function(t,e){var r=this.__data__,n=D(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},C.prototype.clear=function(){this.__data__={hash:new k,map:new(O||I),string:new k}},C.prototype.delete=function(t){return B(this,t).delete(t)},C.prototype.get=function(t){return B(this,t).get(t)},C.prototype.has=function(t){return B(this,t).has(t)},C.prototype.set=function(t,e){return B(this,t).set(t,e),this},M.prototype.add=M.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},M.prototype.has=function(t){return this.__data__.has(t)};var U,F,z=(U=function(t,e){return W(t)?P(t,function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=j),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(e,1,W,!0)):[]},F=R(void 0===F?U.length-1:F,0),function(){for(var t=arguments,e=-1,r=R(t.length-F,0),n=Array(r);++e<r;)n[e]=t[F+e];e=-1;for(var i=Array(F+1);++e<F;)i[e]=t[e];return i[F]=n,s(U,this,i)});var G=Array.isArray;function H(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!q(t)}function W(t){return function(t){return!!t&&"object"==typeof t}(t)&&H(t)}function q(t){var e=V(t)?w.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function V(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=z}).call(this,r(7))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}function f(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var d,p=Array.prototype,g=Function.prototype,_=Object.prototype,m=o["__core-js_shared__"],y=(d=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",b=g.toString,w=_.hasOwnProperty,v=_.toString,E=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=o.Symbol,A=_.propertyIsEnumerable,T=p.splice,R=S?S.isConcatSpreadable:void 0,O=Math.max,x=U(o,"Map"),k=U(o,"Set"),I=U(Object,"create");function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function M(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function P(t){var e=-1,r=t?t.length:0;for(this.__data__=new D;++e<r;)this.add(t[e])}function L(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function B(t){return!(!Q(t)||(e=t,y&&y in e))&&(Z(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?E:r).test(function(t){if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}C.prototype.clear=function(){this.__data__=I?I(null):{}},C.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},C.prototype.get=function(t){var e=this.__data__;if(I){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},C.prototype.has=function(t){var e=this.__data__;return I?void 0!==e[t]:w.call(e,t)},C.prototype.set=function(t,e){return this.__data__[t]=I&&void 0===e?"__lodash_hash_undefined__":e,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(t){var e=this.__data__,r=L(e,t);return!(r<0)&&(r==e.length-1?e.pop():T.call(e,r,1),!0)},M.prototype.get=function(t){var e=this.__data__,r=L(e,t);return r<0?void 0:e[r][1]},M.prototype.has=function(t){return L(this.__data__,t)>-1},M.prototype.set=function(t,e){var r=this.__data__,n=L(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},D.prototype.clear=function(){this.__data__={hash:new C,map:new(x||M),string:new C}},D.prototype.delete=function(t){return j(this,t).delete(t)},D.prototype.get=function(t){return j(this,t).get(t)},D.prototype.has=function(t){return j(this,t).has(t)},D.prototype.set=function(t,e){return j(this,t).set(t,e),this},P.prototype.add=P.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},P.prototype.has=function(t){return this.__data__.has(t)};var N=k&&1/f(new k([,-0]))[1]==1/0?function(t){return new k(t)}:function(){};function j(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function U(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return B(r)?r:void 0}function F(t){return W(t)||function(t){return V(t)&&w.call(t,"callee")&&(!A.call(t,"callee")||"[object Arguments]"==v.call(t))}(t)||!!(R&&t&&t[R])}var z,G,H=(z=function(t){return function(t,e,r){var n=-1,i=a,o=t.length,s=!0,c=[],l=c;if(r)s=!1,i=u;else if(o>=200){var d=e?null:N(t);if(d)return f(d);s=!1,i=h,l=new P}else l=e?[]:c;t:for(;++n<o;){var p=t[n],g=e?e(p):p;if(p=r||0!==p?p:0,s&&g==g){for(var _=l.length;_--;)if(l[_]===g)continue t;e&&l.push(g),c.push(p)}else i(l,g,r)||(l!==c&&l.push(g),c.push(p))}return c}(function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=F),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(t,1,V,!0))},G=O(void 0===G?z.length-1:G,0),function(){for(var t=arguments,e=-1,r=O(t.length-G,0),n=Array(r);++e<r;)n[e]=t[G+e];e=-1;for(var i=Array(G+1);++e<G;)i[e]=t[e];return i[G]=n,s(z,this,i)});var W=Array.isArray;function q(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!Z(t)}function V(t){return function(t){return!!t&&"object"==typeof t}(t)&&q(t)}function Z(t){var e=Q(t)?v.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function Q(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=H}).call(this,r(7))},function(t,e){var r,n,i=Function.prototype,o=Object.prototype,s=i.toString,a=o.hasOwnProperty,u=s.call(Object),c=o.toString,l=(r=Object.getPrototypeOf,n=Object,function(t){return r(n(t))});t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=c.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=l(t);if(null===e)return!0;var r=a.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==u}},function(t,e,r){(function(t){var n=r(1),i="win32"===t.platform,o=r(1),s=t.env.NODE_DEBUG&&/fs/.test(t.env.NODE_DEBUG);function a(e){return"function"==typeof e?e:function(){var e;if(s){var r=new Error;e=function(t){t&&(r.message=t.message,n(t=r))}}else e=n;return e;function n(e){if(e){if(t.throwDeprecation)throw e;if(!t.noDeprecation){var r="fs: missing callback "+(e.stack||e.message);t.traceDeprecation?console.trace(r):console.error(r)}}}}()}n.normalize;if(i)var u=/(.*?)(?:[\/\\]+|$)/g;else u=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;e.realpathSync=function(t,e){if(t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,s,a,l,h=t,f={},d={};function p(){var e=c.exec(t);r=e[0].length,s=e[0],a=e[0],l="",i&&!d[a]&&(o.lstatSync(a),d[a]=!0)}for(p();r<t.length;){u.lastIndex=r;var g=u.exec(t);if(l=s,s+=g[0],a=l+g[1],r=u.lastIndex,!(d[a]||e&&e[a]===a)){var _;if(e&&Object.prototype.hasOwnProperty.call(e,a))_=e[a];else{var m=o.lstatSync(a);if(!m.isSymbolicLink()){d[a]=!0,e&&(e[a]=a);continue}var y=null;if(!i){var b=m.dev.toString(32)+":"+m.ino.toString(32);f.hasOwnProperty(b)&&(y=f[b])}null===y&&(o.statSync(a),y=o.readlinkSync(a)),_=n.resolve(l,y),e&&(e[a]=_),i||(f[b]=y)}t=n.resolve(_,t.slice(r)),p()}}return e&&(e[h]=t),t},e.realpath=function(e,r,s){if("function"!=typeof s&&(s=a(r),r=null),e=n.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return t.nextTick(s.bind(null,null,r[e]));var l,h,f,d,p=e,g={},_={};function m(){var r=c.exec(e);l=r[0].length,h=r[0],f=r[0],d="",i&&!_[f]?o.lstat(f,(function(t){if(t)return s(t);_[f]=!0,y()})):t.nextTick(y)}function y(){if(l>=e.length)return r&&(r[p]=e),s(null,e);u.lastIndex=l;var n=u.exec(e);return d=h,h+=n[0],f=d+n[1],l=u.lastIndex,_[f]||r&&r[f]===f?t.nextTick(y):r&&Object.prototype.hasOwnProperty.call(r,f)?v(r[f]):o.lstat(f,b)}function b(e,n){if(e)return s(e);if(!n.isSymbolicLink())return _[f]=!0,r&&(r[f]=f),t.nextTick(y);if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(g.hasOwnProperty(a))return w(null,g[a],f)}o.stat(f,(function(t){if(t)return s(t);o.readlink(f,(function(t,e){i||(g[a]=e),w(t,e)}))}))}function w(t,e,i){if(t)return s(t);var o=n.resolve(d,e);r&&(r[i]=o),v(o)}function v(t){e=n.resolve(t,e.slice(l)),m()}m()}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=p,p.GlobSync=g;var n=r(1),i=r(98),o=r(58),s=(o.Minimatch,r(97).Glob,r(12),r(1)),a=r(43),u=r(72),c=r(99),l=c.setopts,h=c.ownProp,f=c.childrenIgnored,d=c.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new g(t,e).found}function g(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof g))return new g(t,e);if(l(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}g.prototype._finish=function(){if(a(this instanceof g),this.realpath){var t=this;this.matches.forEach((function(e,r){var n=t.matches[r]=Object.create(null);for(var o in e)try{o=t._makeAbs(o),n[i.realpathSync(o,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;n[t._makeAbs(o)]=!0}}))}c.finish(this)},g.prototype._process=function(t,e,r){a(this instanceof g);for(var n,i=0;"string"==typeof t[i];)i++;switch(i){case t.length:return void this._processSimple(t.join("/"),e);case 0:n=null;break;default:n=t.slice(0,i).join("/")}var s,c=t.slice(i);null===n?s=".":u(n)||u(t.join("/"))?(n&&u(n)||(n="/"+n),s=n):s=n;var l=this._makeAbs(s);f(this,s)||(c[0]===o.GLOBSTAR?this._processGlobStar(n,s,l,c,e,r):this._processReaddir(n,s,l,c,e,r))},g.prototype._processReaddir=function(t,e,r,n,i,o){var a=this._readdir(r,o);if(a){for(var u=n[0],c=!!this.minimatch.negate,l=u._glob,h=this.dot||"."===l.charAt(0),f=[],d=0;d<a.length;d++){if("."!==(_=a[d]).charAt(0)||h)(c&&!t?!_.match(u):_.match(u))&&f.push(_)}var p=f.length;if(0!==p)if(1!==n.length||this.mark||this.stat){n.shift();for(d=0;d<p;d++){var g;_=f[d];g=t?[t,_]:[_],this._process(g.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<p;d++){var _=f[d];t&&(_="/"!==t.slice(-1)?t+"/"+_:t+_),"/"!==_.charAt(0)||this.nomount||(_=s.join(this.root,_)),this._emitMatch(i,_)}}}},g.prototype._emitMatch=function(t,e){if(!d(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},g.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=n.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var i=r&&r.isSymbolicLink();return this.symlinks[t]=i,i||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},g.prototype._readdir=function(t,e){if(e&&!h(this.symlinks,t))return this._readdirInGlobStar(t);if(h(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,n.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},g.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e},g.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},g.prototype._processGlobStar=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){var a=n.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,i,!1);var l=s.length;if(!this.symlinks[r]||!o)for(var h=0;h<l;h++){if("."!==s[h].charAt(0)||this.dot){var f=u.concat(s[h],a);this._process(f,i,!0);var d=u.concat(s[h],n);this._process(d,i,!0)}}}},g.prototype._processSimple=function(t,r){var n=this._stat(t);if(this.matches[r]||(this.matches[r]=Object.create(null)),n){if(t&&u(t)&&!this.nomount){var i=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=s.join(this.root,t):(t=s.resolve(this.root,t),i&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t)}},g.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&h(this.cache,e)){var i=this.cache[e];if(Array.isArray(i)&&(i="DIR"),!r||"DIR"===i)return i;if(r&&"FILE"===i)return!1}var o=this.statCache[e];if(!o){var s;try{s=n.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{o=n.statSync(e)}catch(t){o=s}else o=s}this.statCache[e]=o;i=!0;return o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||i,(!r||"FILE"!==i)&&i},g.prototype._mark=function(t){return c.mark(this,t)},g.prototype._makeAbs=function(t){return c.makeAbs(this,t)}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(100),i=Object.create(null),o=r(73);function s(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}t.exports=n((function(t,r){return i[t]?(i[t].push(r),null):(i[t]=[r],function(t){return o((function r(){var n=i[t],o=n.length,a=s(arguments);try{for(var u=0;u<o;u++)n[u].apply(null,a)}finally{n.length>o?(n.splice(0,o),e.nextTick((function(){r.apply(null,a)}))):delete i[t]}}))}(t))}))}).call(this,r(0))},function(t,e,r){
53
+ var i=r(1),o=r(188),s=r(192),a=r(1),u=r(44),c=r(12).inherits,l=r(206),h=r(103).Transform,f="win32"===e.platform,d=function(t,e){if(!(this instanceof d))return new d(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=u.defaults(e,{highWaterMark:1048576,statConcurrency:4}),h.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=s.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=s.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(d,h),d.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},d.prototype._append=function(t,e){var r={source:null,filepath:t};(e=e||{}).name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof i.Stats?(r=this._updateQueueTaskWithStats(r,e.stats))&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r)):this._statQueue.push(r)},d.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},d.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},d.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void n(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),n(r)}}.bind(this))},d.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new l("NOENDMETHOD"))},d.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},d.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},d.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},d.prototype._normalizeEntryData=function(t,e){t=u.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=u.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=f?511:4095:t.stats&&null===t.mode?(t.mode=f?511&t.stats.mode:4095&t.stats.mode,f&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=u.dateify(t.date),t},d.prototype._onModuleError=function(t){this.emit("error",t)},d.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},d.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))},d.prototype._onStatQueueTask=function(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():i.lstat(t.filepath,function(r,i){if(this._state.aborted)n(e);else{if(r)return this._entriesCount--,this.emit("warning",r),void n(e);(t=this._updateQueueTaskWithStats(t,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(t)),n(e)}}.bind(this))},d.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},d.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},d.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=u.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=u.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=u.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!e.isSymbolicLink()||!this._moduleSupports("symlink"))return e.isDirectory()?this.emit("warning",new l("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new l("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new l("ENTRYNOTSUPPORTED",t.data)),null;var r=i.readlinkSync(t.filepath),n=a.dirname(t.filepath);t.data.type="symlink",t.data.linkname=a.relative(n,a.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}return t.data=this._normalizeEntryData(t.data,e),t},d.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},d.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new l("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new l("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=u.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!u.isStream(t))return this.emit("error",new l("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},d.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});var i=o(t,{stat:!0,dot:!0});return i.on("error",function(t){this.emit("error",t)}.bind(this)),i.on("match",function(o){i.pause();var s=!1,a=Object.assign({},r);a.name=o.relative,a.prefix=e,a.stats=o.stat,a.callback=i.resume.bind(i);try{if(n)if(!1===(a=n(a)))s=!0;else if("object"!=typeof a)throw new l("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}s?i.resume():this._append(o.absolute,a)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new l("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new l("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},d.prototype.glob=function(t,e,r){this._pending++,e=u.defaults(e,{stat:!0,pattern:t});var n=o(e.cwd||".",e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();var e=Object.assign({},r);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.finalize=function(){if(this._state.aborted){var t=new l("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new l("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise((function(t,e){var n;r._module.on("end",(function(){n||t()})),r._module.on("error",(function(t){n=!0,e(t)}))}))},d.prototype.setFormat=function(t){return this._format?(this.emit("error",new l("FORMATSET")),this):(this._format=t,this)},d.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new l("ABORTED")),this):this._state.module?(this.emit("error",new l("MODULESET")),this):(this._module=t,this._modulePipe(),this)},d.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new l("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new l("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={type:"symlink"};return n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this},d.prototype.pointer=function(){return this._pointer},d.prototype.use=function(t){return this._streams.push(t),this},t.exports=d}).call(this,r(0),r(57).setImmediate)},function(t,e,r){t.exports=l;const n=r(1),{EventEmitter:i}=r(11),{Minimatch:o}=r(59),{resolve:s}=r(1);function a(t,e){return new Promise((r,i)=>{(e?n.stat:n.lstat)(t,(n,i)=>{if(n)switch(n.code){case"ENOENT":r(e?a(t,!1):null);break;default:r(null)}else r(i)})})}async function*u(t,e,r,i,o,s){let c=await function(t,e){return new Promise((r,i)=>{n.readdir(t,{withFileTypes:!0},(t,n)=>{if(t)switch(t.code){case"ENOTDIR":e?i(t):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;case"ELOOP":default:i(t)}else r(n)})})}(e+t,s);for(const n of c){let s=n.name;void 0===s&&(s=n,i=!0);const c=t+"/"+s,l=c.slice(1),h=e+"/"+l;let f=null;(i||r)&&(f=await a(h,r)),f||void 0===n.name||(f=n),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?o(l)||(yield{relative:l,absolute:h,stats:f},yield*u(c,e,r,i,o,!1)):yield{relative:l,absolute:h,stats:f}}}class c extends i{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new o(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new o(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new o(t,{dot:!0}))}this.iterator=async function*(t,e,r,n){yield*u("",t,e,r,n,!0)}(s(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,n=t.value.absolute;this.options.mark&&e&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:t.value.stats}):this.emit("match",{relative:r,absolute:n})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function l(t,e,r){return new c(t,e,r)}l.ReaddirGlob=c},function(t,e,r){var n=r(190),i=r(191);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return function t(e,r){var o=[],s=i("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var u,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),_=c||h,m=s.body.indexOf(",")>=0;if(!_&&!m)return s.post.match(/,.*\}/)?(e=s.pre+"{"+s.body+a+s.post,t(e)):[e];if(_)u=s.body.split(/\.\./);else{if(1===(u=function t(e){if(!e)return[""];var r=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,s=n.body,a=n.post,u=o.split(",");u[u.length-1]+="{"+s+"}";var c=t(a);a.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c));return r.push.apply(r,u),r}(s.body)).length)if(1===(u=t(u[0],!1).map(f)).length)return(w=s.post.length?t(s.post,!1):[""]).map((function(t){return s.pre+u[0]+t}))}var y,b=s.pre,w=s.post.length?t(s.post,!1):[""];if(_){var v=l(u[0]),E=l(u[1]),S=Math.max(u[0].length,u[1].length),A=3==u.length?Math.abs(l(u[2])):1,T=p;E<v&&(A*=-1,T=g);var R=u.some(d);y=[];for(var O=v;T(O,E);O+=A){var x;if(h)"\\"===(x=String.fromCharCode(O))&&(x="");else if(x=String(O),R){var k=S-x.length;if(k>0){var I=new Array(k+1).join("0");x=O<0?"-"+I+x.slice(1):I+x}}y.push(x)}}else y=n(u,(function(e){return t(e,!1)}));for(var C=0;C<y.length;C++)for(var M=0;M<w.length;M++){var D=b+y[C]+w[M];(!r||_||D)&&o.push(D)}return o}(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(u).split("\\.").join(c)}(t),!0).map(h)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function h(t){return t.split(o).join("\\").split(s).join("{").split(a).join("}").split(u).join(",").split(c).join(".")}function f(t){return"{"+t+"}"}function d(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function g(t,e){return t>=e}},function(t,e){t.exports=function(t,e){for(var n=[],i=0;i<t.length;i++){var o=e(t[i],i);r(o)?n.push.apply(n,o):n.push(o)}return n};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=i(t,r)),e instanceof RegExp&&(e=i(e,r));var n=o(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function i(t,e){var r=e.match(t);return r?r[0]:null}function o(t,e,r){var n,i,o,s,a,u=r.indexOf(t),c=r.indexOf(e,u+1),l=u;if(u>=0&&c>0){if(t===e)return[u,c];for(n=[],o=r.length;l>=0&&!a;)l==u?(n.push(l),u=r.indexOf(t,l+1)):1==n.length?a=[n.pop(),c]:((i=n.pop())<o&&(o=i,s=c),c=r.indexOf(e,l+1)),l=u<c&&u>=0?u:c;n.length&&(a=[o,s])}return a}t.exports=n,n.range=o},function(t,e,r){"use strict";r.r(e),function(t,n){function i(t,...e){return(...r)=>t(...e,...r)}function o(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}r.d(e,"apply",(function(){return i})),r.d(e,"applyEach",(function(){return C})),r.d(e,"applyEachSeries",(function(){return P})),r.d(e,"asyncify",(function(){return h})),r.d(e,"auto",(function(){return N})),r.d(e,"autoInject",(function(){return H})),r.d(e,"cargo",(function(){return Z})),r.d(e,"cargoQueue",(function(){return Q})),r.d(e,"compose",(function(){return Y})),r.d(e,"concat",(function(){return tt})),r.d(e,"concatLimit",(function(){return J})),r.d(e,"concatSeries",(function(){return et})),r.d(e,"constant",(function(){return rt})),r.d(e,"detect",(function(){return it})),r.d(e,"detectLimit",(function(){return ot})),r.d(e,"detectSeries",(function(){return st})),r.d(e,"dir",(function(){return ut})),r.d(e,"doUntil",(function(){return lt})),r.d(e,"doWhilst",(function(){return ct})),r.d(e,"each",(function(){return ft})),r.d(e,"eachLimit",(function(){return dt})),r.d(e,"eachOf",(function(){return k})),r.d(e,"eachOfLimit",(function(){return R})),r.d(e,"eachOfSeries",(function(){return M})),r.d(e,"eachSeries",(function(){return pt})),r.d(e,"ensureAsync",(function(){return gt})),r.d(e,"every",(function(){return _t})),r.d(e,"everyLimit",(function(){return mt})),r.d(e,"everySeries",(function(){return yt})),r.d(e,"filter",(function(){return Et})),r.d(e,"filterLimit",(function(){return St})),r.d(e,"filterSeries",(function(){return At})),r.d(e,"forever",(function(){return Tt})),r.d(e,"groupBy",(function(){return Ot})),r.d(e,"groupByLimit",(function(){return Rt})),r.d(e,"groupBySeries",(function(){return xt})),r.d(e,"log",(function(){return kt})),r.d(e,"map",(function(){return I})),r.d(e,"mapLimit",(function(){return $})),r.d(e,"mapSeries",(function(){return D})),r.d(e,"mapValues",(function(){return Ct})),r.d(e,"mapValuesLimit",(function(){return It})),r.d(e,"mapValuesSeries",(function(){return Mt})),r.d(e,"memoize",(function(){return Dt})),r.d(e,"nextTick",(function(){return Pt})),r.d(e,"parallel",(function(){return Bt})),r.d(e,"parallelLimit",(function(){return Nt})),r.d(e,"priorityQueue",(function(){return Gt})),r.d(e,"queue",(function(){return jt})),r.d(e,"race",(function(){return Ht})),r.d(e,"reduce",(function(){return K})),r.d(e,"reduceRight",(function(){return Wt})),r.d(e,"reflect",(function(){return qt})),r.d(e,"reflectAll",(function(){return Vt})),r.d(e,"reject",(function(){return Qt})),r.d(e,"rejectLimit",(function(){return Kt})),r.d(e,"rejectSeries",(function(){return Xt})),r.d(e,"retry",(function(){return $t})),r.d(e,"retryable",(function(){return te})),r.d(e,"seq",(function(){return X})),r.d(e,"series",(function(){return ee})),r.d(e,"setImmediate",(function(){return l})),r.d(e,"some",(function(){return re})),r.d(e,"someLimit",(function(){return ne})),r.d(e,"someSeries",(function(){return ie})),r.d(e,"sortBy",(function(){return oe})),r.d(e,"timeout",(function(){return se})),r.d(e,"times",(function(){return ue})),r.d(e,"timesLimit",(function(){return ae})),r.d(e,"timesSeries",(function(){return ce})),r.d(e,"transform",(function(){return le})),r.d(e,"tryEach",(function(){return he})),r.d(e,"unmemoize",(function(){return fe})),r.d(e,"until",(function(){return pe})),r.d(e,"waterfall",(function(){return ge})),r.d(e,"whilst",(function(){return de})),r.d(e,"all",(function(){return _t})),r.d(e,"allLimit",(function(){return mt})),r.d(e,"allSeries",(function(){return yt})),r.d(e,"any",(function(){return re})),r.d(e,"anyLimit",(function(){return ne})),r.d(e,"anySeries",(function(){return ie})),r.d(e,"find",(function(){return it})),r.d(e,"findLimit",(function(){return ot})),r.d(e,"findSeries",(function(){return st})),r.d(e,"flatMap",(function(){return tt})),r.d(e,"flatMapLimit",(function(){return J})),r.d(e,"flatMapSeries",(function(){return et})),r.d(e,"forEach",(function(){return ft})),r.d(e,"forEachSeries",(function(){return pt})),r.d(e,"forEachLimit",(function(){return dt})),r.d(e,"forEachOf",(function(){return k})),r.d(e,"forEachOfSeries",(function(){return M})),r.d(e,"forEachOfLimit",(function(){return R})),r.d(e,"inject",(function(){return K})),r.d(e,"foldl",(function(){return K})),r.d(e,"foldr",(function(){return Wt})),r.d(e,"select",(function(){return Et})),r.d(e,"selectLimit",(function(){return St})),r.d(e,"selectSeries",(function(){return At})),r.d(e,"wrapSync",(function(){return h})),r.d(e,"during",(function(){return de})),r.d(e,"doDuring",(function(){return ct}));var s="function"==typeof t&&t,a="object"==typeof n&&"function"==typeof n.nextTick;function u(t){setTimeout(t,0)}function c(t){return(e,...r)=>t(()=>e(...r))}var l=c(s?t:a?n.nextTick:u);function h(t){return p(t)?function(...e){const r=e.pop();return f(t.apply(this,e),r)}:o((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return f(n,r);r(null,n)}))}function f(t,e){return t.then(t=>{d(e,null,t)},t=>{d(e,t&&t.message?t:new Error(t))})}function d(t,e,r){try{t(e,r)}catch(t){l(t=>{throw t},t)}}function p(t){return"AsyncFunction"===t[Symbol.toStringTag]}function g(t){if("function"!=typeof t)throw new Error("expected a function");return p(t)?h(t):t}function _(t,e=t.length){if(!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)})}}function m(t){return function(e,...r){return _((function(n){var i=this;return t(e,(t,e)=>{g(t).apply(i,r.concat(e))},n)}))}}function y(t,e,r,n){e=e||[];var i=[],o=0,s=g(r);return t(e,(t,e,r)=>{var n=o++;s(t,(t,e)=>{i[n]=e,r(t)})},t=>{n(t,i)})}function b(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const w={};function v(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function E(t){if(b(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,n,i,o=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return o?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(o):(r=(e=t)?Object.keys(e):[],n=-1,i=r.length,function(){var t=r[++n];return n<i?{value:e[t],key:t}:null})}function S(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function A(t,e,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function c(){a>=e||s||i||(s=!0,t.next().then(({value:t,done:e})=>{if(!o&&!i){if(s=!1,e)return i=!0,void(a<=0&&n(null));a++,r(t,u,l),u++,c()}}).catch(h))}function l(t,e){if(a-=1,!o)return t?h(t):!1===t?(i=!0,void(o=!0)):e===w||i&&a<=0?(i=!0,n(null)):void c()}function h(t){o||(s=!1,i=!0,n(t))}c()}var T=t=>(e,r,n)=>{if(n=v(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if("AsyncGenerator"===e[Symbol.toStringTag])return A(e,t,r,n);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return A(e[Symbol.asyncIterator](),t,r,n);var i=E(e),o=!1,s=!1,a=0,u=!1;function c(t,e){if(!s)if(a-=1,t)o=!0,n(t);else if(!1===t)o=!0,s=!0;else{if(e===w||o&&a<=0)return o=!0,n(null);u||l()}}function l(){for(u=!0;a<t&&!o;){var e=i();if(null===e)return o=!0,void(a<=0&&n(null));a+=1,r(e.value,e.key,S(c))}u=!1}l()};var R=_((function(t,e,r,n){return T(e)(t,g(r),n)}),4);function O(t,e,r){r=v(r);var n=0,i=0,{length:o}=t,s=!1;function a(t,e){!1===t&&(s=!0),!0!==s&&(t?r(t):++i!==o&&e!==w||r(null))}for(0===o&&r(null);n<o;n++)e(t[n],n,S(a))}function x(t,e,r){return R(t,1/0,e,r)}var k=_((function(t,e,r){return(b(t)?O:x)(t,g(e),r)}),3);var I=_((function(t,e,r){return y(k,t,e,r)}),3),C=m(I);var M=_((function(t,e,r){return R(t,1,e,r)}),3);var D=_((function(t,e,r){return y(M,t,e,r)}),3),P=m(D);const L=Symbol("promiseCallback");function B(){let t,e;function r(r,...n){if(r)return e(r);t(n.length>1?n:n[0])}return r[L]=new Promise((r,n)=>{t=r,e=n}),r}function N(t,e,r){"number"!=typeof e&&(r=e,e=null),r=v(r||B());var n=Object.keys(t).length;if(!n)return r(null);e||(e=n);var i={},o=0,s=!1,a=!1,u=Object.create(null),c=[],l=[],h={};function f(t,e){c.push(()=>function(t,e){if(a)return;var n=S((e,...n)=>{if(o--,!1!==e)if(n.length<2&&([n]=n),e){var c={};if(Object.keys(i).forEach(t=>{c[t]=i[t]}),c[t]=n,a=!0,u=Object.create(null),s)return;r(e,c)}else i[t]=n,(u[t]||[]).forEach(t=>t()),d();else s=!0});o++;var c=g(e[e.length-1]);e.length>1?c(i,n):c(n)}(t,e))}function d(){if(!s){if(0===c.length&&0===o)return r(null,i);for(;c.length&&o<e;){c.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(n=>{const i=t[n];Array.isArray(i)&&i.indexOf(e)>=0&&r.push(n)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void l.push(e);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return f(e,r),void l.push(e);h[e]=i,n.forEach(o=>{if(!t[o])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(t,e){var r=u[t];r||(r=u[t]=[]);r.push(e)}(o,()=>{0===--i&&f(e,r)})})}),function(){var t,e=0;for(;l.length;)t=l.pop(),e++,p(t).forEach(t=>{0==--h[t]&&l.push(t)});if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[L]}var j=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,U=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,F=/,/,z=/(=.+)?(\s*)$/,G=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function H(t,e){var r={};return Object.keys(t).forEach(e=>{var n,i=t[e],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[e]=n.concat(n.length>0?a:i);else if(s)r[e]=i;else{if(n=function(t){const e=t.toString().replace(G,"");let r=e.match(j);if(r||(r=e.match(U)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,n]=r;return n.replace(/\s/g,"").split(F).map(t=>t.replace(z,"").trim())}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[e]=n.concat(a)}function a(t,e){var r=n.map(e=>t[e]);r.push(e),g(i)(...r)}}),N(r,e)}class W{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):q(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):q(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function q(t,e){t.length=1,t.head=t.tail=e}function V(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var n=g(t),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(s[t]=s[t].filter(t=>t!==e)):s[t]=[]:Object.keys(s).forEach(t=>s[t]=[])}function u(t,...e){s[t].forEach(t=>t(...e))}var c=!1;function h(t,e,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(t,...e){return t?r?o(t):i():e.length<=1?i(e[0]):void i(e)}m.started=!0;var a={data:t,callback:r?s:n||s};if(e?m._tasks.unshift(a):m._tasks.push(a),c||(c=!0,l(()=>{c=!1,m.process()})),r||!n)return new Promise((t,e)=>{i=t,o=e})}function f(t){return function(e,...r){i-=1;for(var n=0,s=t.length;n<s;n++){var a=t[n],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(e,...r),null!=e&&u("error",e,a.data)}i<=m.concurrency-m.buffer&&u("unsaturated"),m.idle()&&u("drain"),m.process()}}function d(t){return!(0!==t.length||!m.idle())&&(l(()=>u("drain")),!0)}const p=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...n)=>{a(t,r),e(...n)};s[t].push(r)}(t,(t,n)=>{if(t)return r(t);e(n)})});a(t),function(t,e){s[t].push(e)}(t,e)};var _=!1,m={_tasks:new W,*[Symbol.iterator](){yield*m._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),m._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){m._tasks.remove(t)},process(){if(!_){for(_=!0;!m.paused&&i<m.concurrency&&m._tasks.length;){var t=[],e=[],r=m._tasks.length;m.payload&&(r=Math.min(r,m.payload));for(var s=0;s<r;s++){var a=m._tasks.shift();t.push(a),o.push(a),e.push(a.data)}i+=1,0===m._tasks.length&&u("empty"),i===m.concurrency&&u("saturated");var c=S(f(t));n(e,c)}_=!1}},length:()=>m._tasks.length,running:()=>i,workersList:()=>o,idle:()=>m._tasks.length+i===0,pause(){m.paused=!0},resume(){!1!==m.paused&&(m.paused=!1,l(m.process))}};return Object.defineProperties(m,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),m}function Z(t,e){return V(t,1,e)}function Q(t,e,r){return V(t,e,r)}var K=_((function(t,e,r,n){n=v(n);var i=g(r);return M(t,(t,r,n)=>{i(e,t,(t,r)=>{e=r,n(t)})},t=>n(t,e))}),4);function X(...t){var e=t.map(g);return function(...t){var r=this,n=t[t.length-1];return"function"==typeof n?t.pop():n=B(),K(e,t,(t,e,n)=>{e.apply(r,t.concat((t,...e)=>{n(t,e)}))},(t,e)=>n(t,...e)),n[L]}}function Y(...t){return X(...t.reverse())}var $=_((function(t,e,r,n){return y(T(e),t,r,n)}),4);var J=_((function(t,e,r,n){var i=g(r);return $(t,e,(t,e)=>{i(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],i=0;i<e.length;i++)e[i]&&(r=r.concat(...e[i]));return n(t,r)})}),4);var tt=_((function(t,e,r){return J(t,1/0,e,r)}),3);var et=_((function(t,e,r){return J(t,1,e,r)}),3);function rt(...t){return function(...e){return e.pop()(null,...t)}}function nt(t,e){return(r,n,i,o)=>{var s,a=!1;const u=g(i);r(n,(r,n,i)=>{u(r,(n,o)=>n||!1===n?i(n):t(o)&&!s?(a=!0,s=e(!0,r),i(null,w)):void i())},t=>{if(t)return o(t);o(null,a?s:e(!1))})}}var it=_((function(t,e,r){return nt(t=>t,(t,e)=>e)(k,t,e,r)}),3);var ot=_((function(t,e,r,n){return nt(t=>t,(t,e)=>e)(T(e),t,r,n)}),4);var st=_((function(t,e,r){return nt(t=>t,(t,e)=>e)(T(1),t,e,r)}),3);function at(t){return(e,...r)=>g(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var ut=at("dir");var ct=_((function(t,e,r){r=S(r);var n,i=g(t),o=g(e);function s(t,...e){if(t)return r(t);!1!==t&&(n=e,o(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function lt(t,e,r){const n=g(e);return ct(t,(...t)=>{const e=t.pop();n(...t,(t,r)=>e(t,!r))},r)}function ht(t){return(e,r,n)=>t(e,n)}var ft=_((function(t,e,r){return k(t,ht(g(e)),r)}),3);var dt=_((function(t,e,r,n){return T(e)(t,ht(g(r)),n)}),4);var pt=_((function(t,e,r){return dt(t,1,e,r)}),3);function gt(t){return p(t)?t:function(...e){var r=e.pop(),n=!0;e.push((...t)=>{n?l(()=>r(...t)):r(...t)}),t.apply(this,e),n=!1}}var _t=_((function(t,e,r){return nt(t=>!t,t=>!t)(k,t,e,r)}),3);var mt=_((function(t,e,r,n){return nt(t=>!t,t=>!t)(T(e),t,r,n)}),4);var yt=_((function(t,e,r){return nt(t=>!t,t=>!t)(M,t,e,r)}),3);function bt(t,e,r,n){var i=new Array(e.length);t(e,(t,e,n)=>{r(t,(t,r)=>{i[e]=!!r,n(t)})},t=>{if(t)return n(t);for(var r=[],o=0;o<e.length;o++)i[o]&&r.push(e[o]);n(null,r)})}function wt(t,e,r,n){var i=[];t(e,(t,e,n)=>{r(t,(r,o)=>{if(r)return n(r);o&&i.push({index:e,value:t}),n(r)})},t=>{if(t)return n(t);n(null,i.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function vt(t,e,r,n){return(b(e)?bt:wt)(t,e,g(r),n)}var Et=_((function(t,e,r){return vt(k,t,e,r)}),3);var St=_((function(t,e,r,n){return vt(T(e),t,r,n)}),4);var At=_((function(t,e,r){return vt(M,t,e,r)}),3);var Tt=_((function(t,e){var r=S(e),n=g(gt(t));return function t(e){if(e)return r(e);!1!==e&&n(t)}()}),2);var Rt=_((function(t,e,r,n){var i=g(r);return $(t,e,(t,e)=>{i(t,(r,n)=>r?e(r):e(r,{key:n,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<e.length;o++)if(e[o]){var{key:s}=e[o],{val:a}=e[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(t,r)})}),4);function Ot(t,e,r){return Rt(t,1/0,e,r)}function xt(t,e,r){return Rt(t,1,e,r)}var kt=at("log");var It=_((function(t,e,r,n){n=v(n);var i={},o=g(r);return T(e)(t,(t,e,r)=>{o(t,e,(t,n)=>{if(t)return r(t);i[e]=n,r(t)})},t=>n(t,i))}),4);function Ct(t,e,r){return It(t,1/0,e,r)}function Mt(t,e,r){return It(t,1,e,r)}function Dt(t,e=(t=>t)){var r=Object.create(null),n=Object.create(null),i=g(t),s=o((t,o)=>{var s=e(...t);s in r?l(()=>o(null,...r[s])):s in n?n[s].push(o):(n[s]=[o],i(...t,(t,...e)=>{t||(r[s]=e);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var Pt=c(a?n.nextTick:s?t:u),Lt=_((t,e,r)=>{var n=b(e)?[]:{};t(e,(t,e,r)=>{g(t)((t,...i)=>{i.length<2&&([i]=i),n[e]=i,r(t)})},t=>r(t,n))},3);function Bt(t,e){return Lt(k,t,e)}function Nt(t,e,r){return Lt(T(e),t,r)}function jt(t,e){var r=g(t);return V((t,e)=>{r(t[0],e)},e,1)}class Ut{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&zt(this.heap[t],this.heap[e=Ft(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=1+(t<<1))<this.heap.length&&(e+1<this.heap.length&&zt(this.heap[e+1],this.heap[e])&&(e+=1),!zt(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=Ft(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function Ft(t){return(t+1>>1)-1}function zt(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function Gt(t,e){var r=jt(t,e);return r._tasks=new Ut,r.push=function(t,e=0,n=(()=>{})){if("function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,Array.isArray(t)||(t=[t]),0===t.length&&r.idle())return l(()=>r.drain());for(var i=0,o=t.length;i<o;i++){var s={data:t[i],priority:e,callback:n};r._tasks.push(s)}l(r.process)},delete r.unshift,r}var Ht=_((function(t,e){if(e=v(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,n=t.length;r<n;r++)g(t[r])(e)}),2);function Wt(t,e,r,n){var i=[...t].reverse();return K(i,e,r,n)}function qt(t){var e=g(t);return o((function(t,r){return t.push((t,...e)=>{let n={};if(t&&(n.error=t),e.length>0){var i=e;e.length<=1&&([i]=e),n.value=i}r(null,n)}),e.apply(this,t)}))}function Vt(t){var e;return Array.isArray(t)?e=t.map(qt):(e={},Object.keys(t).forEach(r=>{e[r]=qt.call(this,t[r])})),e}function Zt(t,e,r,n){const i=g(r);return vt(t,e,(t,e)=>{i(t,(t,r)=>{e(t,!r)})},n)}var Qt=_((function(t,e,r){return Zt(k,t,e,r)}),3);var Kt=_((function(t,e,r,n){return Zt(T(e),t,r,n)}),4);var Xt=_((function(t,e,r){return Zt(M,t,e,r)}),3);function Yt(t){return function(){return t}}function $t(t,e,r){var n={times:5,intervalFunc:Yt(0)};if(arguments.length<3&&"function"==typeof t?(r=e||B(),e=t):(Jt(n,t),r=r||B()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var i=g(e),o=1;function s(){i((t,...e)=>{!1!==t&&(t&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(t))?setTimeout(s,n.intervalFunc(o-1)):r(t,...e))})}return s(),r[L]}function Jt(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:Yt(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}function te(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;p(e)&&(r+=1);var n=g(e);return o((e,i)=>{function o(t){n(...e,t)}return(e.length<r-1||null==i)&&(e.push(i),i=B()),t?$t(t,o,i):$t(o,i),i[L]})}function ee(t,e){return Lt(M,t,e)}var re=_((function(t,e,r){return nt(Boolean,t=>t)(k,t,e,r)}),3);var ne=_((function(t,e,r,n){return nt(Boolean,t=>t)(T(e),t,r,n)}),4);var ie=_((function(t,e,r){return nt(Boolean,t=>t)(M,t,e,r)}),3);var oe=_((function(t,e,r){var n=g(e);return I(t,(t,e)=>{n(t,(r,n)=>{if(r)return e(r);e(r,{value:t,criteria:n})})},(t,e)=>{if(t)return r(t);r(null,e.sort(i).map(t=>t.value))});function i(t,e){var r=t.criteria,n=e.criteria;return r<n?-1:r>n?1:0}}),3);function se(t,e,r){var n=g(t);return o((i,o)=>{var s,a=!1;i.push((...t)=>{a||(o(...t),clearTimeout(s))}),s=setTimeout((function(){var e=t.name||"anonymous",n=new Error('Callback function "'+e+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),e),n(...i)})}function ae(t,e,r,n){var i=g(r);return $(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,i,n)}function ue(t,e,r){return ae(t,1/0,e,r)}function ce(t,e,r){return ae(t,1,e,r)}function le(t,e,r,n){arguments.length<=3&&"function"==typeof e&&(n=r,r=e,e=Array.isArray(t)?[]:{}),n=v(n||B());var i=g(r);return k(t,(t,r,n)=>{i(e,t,r,n)},t=>n(t,e)),n[L]}var he=_((function(t,e){var r,n=null;return pt(t,(t,e)=>{g(t)((t,...i)=>{if(!1===t)return e(t);i.length<2?[r]=i:r=i,n=t,e(t?null:{})})},()=>e(n,r))}));function fe(t){return(...e)=>(t.unmemoized||t)(...e)}var de=_((function(t,e,r){r=S(r);var n=g(e),i=g(t),o=[];function s(t,...e){if(t)return r(t);o=e,!1!==t&&i(a)}function a(t,e){return t?r(t):!1!==t?e?void n(s):r(null,...o):void 0}return i(a)}),3);function pe(t,e,r){const n=g(t);return de(t=>n((e,r)=>t(e,!r)),e,r)}var ge=_((function(t,e){if(e=v(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function n(e){g(t[r++])(...e,S(i))}function i(i,...o){if(!1!==i)return i||r===t.length?e(i,...o):void n(o)}n([])})),_e={apply:i,applyEach:C,applyEachSeries:P,asyncify:h,auto:N,autoInject:H,cargo:Z,cargoQueue:Q,compose:Y,concat:tt,concatLimit:J,concatSeries:et,constant:rt,detect:it,detectLimit:ot,detectSeries:st,dir:ut,doUntil:lt,doWhilst:ct,each:ft,eachLimit:dt,eachOf:k,eachOfLimit:R,eachOfSeries:M,eachSeries:pt,ensureAsync:gt,every:_t,everyLimit:mt,everySeries:yt,filter:Et,filterLimit:St,filterSeries:At,forever:Tt,groupBy:Ot,groupByLimit:Rt,groupBySeries:xt,log:kt,map:I,mapLimit:$,mapSeries:D,mapValues:Ct,mapValuesLimit:It,mapValuesSeries:Mt,memoize:Dt,nextTick:Pt,parallel:Bt,parallelLimit:Nt,priorityQueue:Gt,queue:jt,race:Ht,reduce:K,reduceRight:Wt,reflect:qt,reflectAll:Vt,reject:Qt,rejectLimit:Kt,rejectSeries:Xt,retry:$t,retryable:te,seq:X,series:ee,setImmediate:l,some:re,someLimit:ne,someSeries:ie,sortBy:oe,timeout:se,times:ue,timesLimit:ae,timesSeries:ce,transform:le,tryEach:he,unmemoize:fe,until:pe,waterfall:ge,whilst:de,all:_t,allLimit:mt,allSeries:yt,any:re,anyLimit:ne,anySeries:ie,find:it,findLimit:ot,findSeries:st,flatMap:tt,flatMapLimit:J,flatMapSeries:et,forEach:ft,forEachSeries:pt,forEachLimit:dt,forEachOf:k,forEachOfSeries:M,forEachOfLimit:R,inject:K,foldl:K,foldr:Wt,select:Et,selectLimit:St,selectSeries:At,wrapSync:h,during:de,doDuring:ct};e.default=_e}.call(this,r(57).setImmediate,r(0))},function(t,e,r){(function(e){var n=r(97),i=e.cwd,o=null,s=e.env.GRACEFUL_FS_PLATFORM||e.platform;e.cwd=function(){return o||(o=i.call(e)),o};try{e.cwd()}catch(t){}if("function"==typeof e.chdir){var a=e.chdir;e.chdir=function(t){o=null,a.call(e,t)},Object.setPrototypeOf&&Object.setPrototypeOf(e.chdir,a)}t.exports=function(t){n.hasOwnProperty("O_SYMLINK")&&e.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(t){t.lchmod=function(e,r,i){t.open(e,n.O_WRONLY|n.O_SYMLINK,r,(function(e,n){e?i&&i(e):t.fchmod(n,r,(function(e){t.close(n,(function(t){i&&i(e||t)}))}))}))},t.lchmodSync=function(e,r){var i,o=t.openSync(e,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{i=t.fchmodSync(o,r),s=!1}finally{if(s)try{t.closeSync(o)}catch(t){}else t.closeSync(o)}return i}}(t);t.lutimes||function(t){n.hasOwnProperty("O_SYMLINK")?(t.lutimes=function(e,r,i,o){t.open(e,n.O_SYMLINK,(function(e,n){e?o&&o(e):t.futimes(n,r,i,(function(e){t.close(n,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(e,r,i){var o,s=t.openSync(e,n.O_SYMLINK),a=!0;try{o=t.futimesSync(s,r,i),a=!1}finally{if(a)try{t.closeSync(s)}catch(t){}else t.closeSync(s)}return o}):(t.lutimes=function(t,r,n,i){i&&e.nextTick(i)},t.lutimesSync=function(){})}(t);t.chown=a(t.chown),t.fchown=a(t.fchown),t.lchown=a(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=o(t.chmodSync),t.fchmodSync=o(t.fchmodSync),t.lchmodSync=o(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.lchmod||(t.lchmod=function(t,r,n){n&&e.nextTick(n)},t.lchmodSync=function(){});t.lchown||(t.lchown=function(t,r,n,i){i&&e.nextTick(i)},t.lchownSync=function(){});"win32"===s&&(t.rename=(r=t.rename,function(e,n,i){var o=Date.now(),s=0;r(e,n,(function a(u){if(u&&("EACCES"===u.code||"EPERM"===u.code)&&Date.now()-o<6e4)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?r(e,n,a):i(u)}))}),s),void(s<100&&(s+=10));i&&i(u)}))}));var r;function i(e){return e?function(r,n,i){return e.call(t,r,n,(function(t){h(t)&&(t=null),i&&i.apply(this,arguments)}))}:e}function o(e){return e?function(r,n){try{return e.call(t,r,n)}catch(t){if(!h(t))throw t}}:e}function a(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(t){h(t)&&(t=null),o&&o.apply(this,arguments)}))}:e}function u(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(t){if(!h(t))throw t}}:e}function c(e){return e?function(r,n,i){function o(t,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function l(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:e}function h(t){return!t||("ENOSYS"===t.code||!(e.getuid&&0===e.getuid()||"EINVAL"!==t.code&&"EPERM"!==t.code))}t.read=function(e){function r(r,n,i,o,s,a){var u;if(a&&"function"==typeof a){var c=0;u=function(l,h,f){if(l&&"EAGAIN"===l.code&&c<10)return c++,e.call(t,r,n,i,o,s,u);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,u)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync=(f=t.readSync,function(e,r,n,i,o){for(var s=0;;)try{return f.call(t,e,r,n,i,o)}catch(t){if("EAGAIN"===t.code&&s<10){s++;continue}throw t}});var f}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(54).Stream;t.exports=function(t){return{ReadStream:function r(i,o){if(!(this instanceof r))return new r(i,o);n.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var a=Object.keys(o),u=0,c=a.length;u<c;u++){var l=a[u];this[l]=o[l]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void e.nextTick((function(){s._read()}));t.open(this.path,this.flags,this.mode,(function(t,e){if(t)return s.emit("error",t),void(s.readable=!1);s.fd=e,s.emit("open",e),s._read()}))},WriteStream:function e(r,i){if(!(this instanceof e))return new e(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var u=o[s];this[u]=i[u]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}).call(this,r(0))},function(t,e,r){"use strict";t.exports=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var e={__proto__:n(t)};else e=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e};var n=Object.getPrototypeOf||function(t){return t.__proto__}},function(t,e,r){var n=r(12),i=r(93);function o(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function s(t,e){if(!(this instanceof s))return new s(t,e);i.call(this,e),o(this,"_read",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function a(t,e){if(!(this instanceof a))return new a(t,e);i.call(this,e),o(this,"_write",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}t.exports={Readable:s,Writable:a},n.inherits(s,i),n.inherits(a,i)},function(t,e){var r=/^(?:0|[1-9]\d*)$/;function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=i.propertyIsEnumerable,u=Math.max;function c(t,e){var r=_(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&m(t)}(t)&&o.call(t,"callee")&&(!a.call(t,"callee")||"[object Arguments]"==s.call(t))}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var u in t)!e&&!o.call(t,u)||i&&("length"==u||p(u,n))||r.push(u);return r}function l(t,e,r,n){return void 0===t||g(t,i[r])&&!o.call(n,r)?e:t}function h(t,e,r){var n=t[e];o.call(t,e)&&g(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function f(t){if(!y(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n,s=(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||i,e===n),a=[];for(var u in t)("constructor"!=u||!s&&o.call(t,u))&&a.push(u);return a}function d(t,e){return e=u(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=u(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,n(t,this,a)}}function p(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<e}function g(t,e){return t===e||t!=t&&e!=e}var _=Array.isArray;function m(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=y(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var b,w=(b=function(t,e,r,n){!function(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;h(r,s,void 0===a?t[s]:a)}}(e,function(t){return m(t)?c(t,!0):f(t)}(e),t,n)},d((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=b.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!y(r))return!1;var n=typeof e;return!!("number"==n?m(r)&&p(e,r.length):"string"==n&&e in r)&&g(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&b(t,s,r,i)}return t}))),v=d((function(t){return t.push(void 0,l),n(w,void 0,t)}));t.exports=v},function(t,e,r){var n=r(96),i=r(1),o=r(199),s=r(200),a=r(201),u=r(202),c=r(99),l=t.exports={},h=/[\/\\]/g;l.exists=function(){var t=i.join.apply(i,arguments);return n.existsSync(t)},l.expand=function(...t){var e=u(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(0===r.length)return[];var l=function(t,e){var r=[];return o(t).forEach((function(t){var n=0===t.indexOf("!");n&&(t=t.slice(1));var i=e(t);r=n?s(r,i):a(r,i)})),r}(r,(function(t){return c.sync(t,e)}));return e.filter&&(l=l.filter((function(t){t=i.join(e.cwd||"",t);try{return"function"==typeof e.filter?e.filter(t):n.statSync(t)[e.filter]()}catch(t){return!1}}))),l},l.expandMapping=function(t,e,r){r=Object.assign({rename:function(t,e){return i.join(t||"",e)}},r);var n=[],o={};return l.expand(r,t).forEach((function(t){var s=t;r.flatten&&(s=i.basename(s)),r.ext&&(s=s.replace(/(\.[^\/]*)?$/,r.ext));var a=r.rename(e,s,r);r.cwd&&(t=i.join(r.cwd,t)),a=a.replace(h,"/"),t=t.replace(h,"/"),o[a]?o[a].src.push(t):(n.push({src:[t],dest:a}),o[a]=n[n.length-1])})),n},l.normalizeFilesArray=function(t){var e=[];return t.forEach((function(t){("src"in t||"dest"in t)&&e.push(t)})),0===e.length?[]:e=_(e).chain().forEach((function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=o(t.src):t.src=[t.src])})).map((function(t){var e=Object.assign({},t);if(delete e.src,delete e.dest,t.expand)return l.expandMapping(t.src,t.dest,e).map((function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach((function(t){delete r[t]})),r}));var r=Object.assign({},t);return r.orig=Object.assign({},t),"src"in r&&Object.defineProperty(r,"src",{enumerable:!0,get:function r(){var n;return"result"in r||(n=t.src,n=Array.isArray(n)?o(n):[n],r.result=l.expand(e,n)),r.result}}),"dest"in r&&(r.dest=t.dest),r})).flatten().value()}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e,n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")();function o(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var s=Object.prototype,a=s.hasOwnProperty,u=s.toString,c=i.Symbol,l=s.propertyIsEnumerable,h=c?c.isConcatSpreadable:void 0;function f(t){return d(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&a.call(t,"callee")&&(!l.call(t,"callee")||"[object Arguments]"==u.call(t))}(t)||!!(h&&t&&t[h])}var d=Array.isArray;t.exports=function(t){return(t?t.length:0)?function t(e,r,n,i,s){var a=-1,u=e.length;for(n||(n=f),s||(s=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,i,s):o(s,c):i||(s[s.length]=c)}return s}(t,1):[]}}).call(this,r(7))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}var f,d=Array.prototype,p=Function.prototype,g=Object.prototype,_=o["__core-js_shared__"],m=(f=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",y=p.toString,b=g.hasOwnProperty,w=g.toString,v=RegExp("^"+y.call(b).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=o.Symbol,S=g.propertyIsEnumerable,A=d.splice,T=E?E.isConcatSpreadable:void 0,R=Math.max,O=N(o,"Map"),x=N(Object,"create");function k(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function M(t){var e=-1,r=t?t.length:0;for(this.__data__=new C;++e<r;)this.add(t[e])}function D(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function P(t,e,r,n){var i,o=-1,s=a,c=!0,l=t.length,f=[],d=e.length;if(!l)return f;r&&(e=function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}(e,(i=r,function(t){return i(t)}))),n?(s=u,c=!1):e.length>=200&&(s=h,c=!1,e=new M(e));t:for(;++o<l;){var p=t[o],g=r?r(p):p;if(p=n||0!==p?p:0,c&&g==g){for(var _=d;_--;)if(e[_]===g)continue t;f.push(p)}else s(e,g,n)||f.push(p)}return f}function L(t){return!(!V(t)||(e=t,m&&m in e))&&(q(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?v:r).test(function(t){if(null!=t){try{return y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function B(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function N(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return L(r)?r:void 0}function j(t){return G(t)||function(t){return W(t)&&b.call(t,"callee")&&(!S.call(t,"callee")||"[object Arguments]"==w.call(t))}(t)||!!(T&&t&&t[T])}k.prototype.clear=function(){this.__data__=x?x(null):{}},k.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},k.prototype.get=function(t){var e=this.__data__;if(x){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return b.call(e,t)?e[t]:void 0},k.prototype.has=function(t){var e=this.__data__;return x?void 0!==e[t]:b.call(e,t)},k.prototype.set=function(t,e){return this.__data__[t]=x&&void 0===e?"__lodash_hash_undefined__":e,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(t){var e=this.__data__,r=D(e,t);return!(r<0)&&(r==e.length-1?e.pop():A.call(e,r,1),!0)},I.prototype.get=function(t){var e=this.__data__,r=D(e,t);return r<0?void 0:e[r][1]},I.prototype.has=function(t){return D(this.__data__,t)>-1},I.prototype.set=function(t,e){var r=this.__data__,n=D(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},C.prototype.clear=function(){this.__data__={hash:new k,map:new(O||I),string:new k}},C.prototype.delete=function(t){return B(this,t).delete(t)},C.prototype.get=function(t){return B(this,t).get(t)},C.prototype.has=function(t){return B(this,t).has(t)},C.prototype.set=function(t,e){return B(this,t).set(t,e),this},M.prototype.add=M.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},M.prototype.has=function(t){return this.__data__.has(t)};var U,F,z=(U=function(t,e){return W(t)?P(t,function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=j),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(e,1,W,!0)):[]},F=R(void 0===F?U.length-1:F,0),function(){for(var t=arguments,e=-1,r=R(t.length-F,0),n=Array(r);++e<r;)n[e]=t[F+e];e=-1;for(var i=Array(F+1);++e<F;)i[e]=t[e];return i[F]=n,s(U,this,i)});var G=Array.isArray;function H(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!q(t)}function W(t){return function(t){return!!t&&"object"==typeof t}(t)&&H(t)}function q(t){var e=V(t)?w.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function V(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=z}).call(this,r(7))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}function f(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var d,p=Array.prototype,g=Function.prototype,_=Object.prototype,m=o["__core-js_shared__"],y=(d=/[^.]+$/.exec(m&&m.keys&&m.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",b=g.toString,w=_.hasOwnProperty,v=_.toString,E=RegExp("^"+b.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=o.Symbol,A=_.propertyIsEnumerable,T=p.splice,R=S?S.isConcatSpreadable:void 0,O=Math.max,x=U(o,"Map"),k=U(o,"Set"),I=U(Object,"create");function C(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function M(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function P(t){var e=-1,r=t?t.length:0;for(this.__data__=new D;++e<r;)this.add(t[e])}function L(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function B(t){return!(!Q(t)||(e=t,y&&y in e))&&(Z(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?E:r).test(function(t){if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}C.prototype.clear=function(){this.__data__=I?I(null):{}},C.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},C.prototype.get=function(t){var e=this.__data__;if(I){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},C.prototype.has=function(t){var e=this.__data__;return I?void 0!==e[t]:w.call(e,t)},C.prototype.set=function(t,e){return this.__data__[t]=I&&void 0===e?"__lodash_hash_undefined__":e,this},M.prototype.clear=function(){this.__data__=[]},M.prototype.delete=function(t){var e=this.__data__,r=L(e,t);return!(r<0)&&(r==e.length-1?e.pop():T.call(e,r,1),!0)},M.prototype.get=function(t){var e=this.__data__,r=L(e,t);return r<0?void 0:e[r][1]},M.prototype.has=function(t){return L(this.__data__,t)>-1},M.prototype.set=function(t,e){var r=this.__data__,n=L(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},D.prototype.clear=function(){this.__data__={hash:new C,map:new(x||M),string:new C}},D.prototype.delete=function(t){return j(this,t).delete(t)},D.prototype.get=function(t){return j(this,t).get(t)},D.prototype.has=function(t){return j(this,t).has(t)},D.prototype.set=function(t,e){return j(this,t).set(t,e),this},P.prototype.add=P.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},P.prototype.has=function(t){return this.__data__.has(t)};var N=k&&1/f(new k([,-0]))[1]==1/0?function(t){return new k(t)}:function(){};function j(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function U(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return B(r)?r:void 0}function F(t){return W(t)||function(t){return V(t)&&w.call(t,"callee")&&(!A.call(t,"callee")||"[object Arguments]"==v.call(t))}(t)||!!(R&&t&&t[R])}var z,G,H=(z=function(t){return function(t,e,r){var n=-1,i=a,o=t.length,s=!0,c=[],l=c;if(r)s=!1,i=u;else if(o>=200){var d=e?null:N(t);if(d)return f(d);s=!1,i=h,l=new P}else l=e?[]:c;t:for(;++n<o;){var p=t[n],g=e?e(p):p;if(p=r||0!==p?p:0,s&&g==g){for(var _=l.length;_--;)if(l[_]===g)continue t;e&&l.push(g),c.push(p)}else i(l,g,r)||(l!==c&&l.push(g),c.push(p))}return c}(function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=F),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(t,1,V,!0))},G=O(void 0===G?z.length-1:G,0),function(){for(var t=arguments,e=-1,r=O(t.length-G,0),n=Array(r);++e<r;)n[e]=t[G+e];e=-1;for(var i=Array(G+1);++e<G;)i[e]=t[e];return i[G]=n,s(z,this,i)});var W=Array.isArray;function q(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!Z(t)}function V(t){return function(t){return!!t&&"object"==typeof t}(t)&&q(t)}function Z(t){var e=Q(t)?v.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function Q(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=H}).call(this,r(7))},function(t,e){var r,n,i=Function.prototype,o=Object.prototype,s=i.toString,a=o.hasOwnProperty,u=s.call(Object),c=o.toString,l=(r=Object.getPrototypeOf,n=Object,function(t){return r(n(t))});t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=c.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=l(t);if(null===e)return!0;var r=a.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==u}},function(t,e,r){(function(t){var n=r(1),i="win32"===t.platform,o=r(1),s=t.env.NODE_DEBUG&&/fs/.test(t.env.NODE_DEBUG);function a(e){return"function"==typeof e?e:function(){var e;if(s){var r=new Error;e=function(t){t&&(r.message=t.message,n(t=r))}}else e=n;return e;function n(e){if(e){if(t.throwDeprecation)throw e;if(!t.noDeprecation){var r="fs: missing callback "+(e.stack||e.message);t.traceDeprecation?console.trace(r):console.error(r)}}}}()}n.normalize;if(i)var u=/(.*?)(?:[\/\\]+|$)/g;else u=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;e.realpathSync=function(t,e){if(t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,s,a,l,h=t,f={},d={};function p(){var e=c.exec(t);r=e[0].length,s=e[0],a=e[0],l="",i&&!d[a]&&(o.lstatSync(a),d[a]=!0)}for(p();r<t.length;){u.lastIndex=r;var g=u.exec(t);if(l=s,s+=g[0],a=l+g[1],r=u.lastIndex,!(d[a]||e&&e[a]===a)){var _;if(e&&Object.prototype.hasOwnProperty.call(e,a))_=e[a];else{var m=o.lstatSync(a);if(!m.isSymbolicLink()){d[a]=!0,e&&(e[a]=a);continue}var y=null;if(!i){var b=m.dev.toString(32)+":"+m.ino.toString(32);f.hasOwnProperty(b)&&(y=f[b])}null===y&&(o.statSync(a),y=o.readlinkSync(a)),_=n.resolve(l,y),e&&(e[a]=_),i||(f[b]=y)}t=n.resolve(_,t.slice(r)),p()}}return e&&(e[h]=t),t},e.realpath=function(e,r,s){if("function"!=typeof s&&(s=a(r),r=null),e=n.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return t.nextTick(s.bind(null,null,r[e]));var l,h,f,d,p=e,g={},_={};function m(){var r=c.exec(e);l=r[0].length,h=r[0],f=r[0],d="",i&&!_[f]?o.lstat(f,(function(t){if(t)return s(t);_[f]=!0,y()})):t.nextTick(y)}function y(){if(l>=e.length)return r&&(r[p]=e),s(null,e);u.lastIndex=l;var n=u.exec(e);return d=h,h+=n[0],f=d+n[1],l=u.lastIndex,_[f]||r&&r[f]===f?t.nextTick(y):r&&Object.prototype.hasOwnProperty.call(r,f)?v(r[f]):o.lstat(f,b)}function b(e,n){if(e)return s(e);if(!n.isSymbolicLink())return _[f]=!0,r&&(r[f]=f),t.nextTick(y);if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(g.hasOwnProperty(a))return w(null,g[a],f)}o.stat(f,(function(t){if(t)return s(t);o.readlink(f,(function(t,e){i||(g[a]=e),w(t,e)}))}))}function w(t,e,i){if(t)return s(t);var o=n.resolve(d,e);r&&(r[i]=o),v(o)}function v(t){e=n.resolve(t,e.slice(l)),m()}m()}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=p,p.GlobSync=g;var n=r(1),i=r(100),o=r(59),s=(o.Minimatch,r(99).Glob,r(12),r(1)),a=r(43),u=r(72),c=r(101),l=c.setopts,h=c.ownProp,f=c.childrenIgnored,d=c.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new g(t,e).found}function g(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof g))return new g(t,e);if(l(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}g.prototype._finish=function(){if(a(this instanceof g),this.realpath){var t=this;this.matches.forEach((function(e,r){var n=t.matches[r]=Object.create(null);for(var o in e)try{o=t._makeAbs(o),n[i.realpathSync(o,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;n[t._makeAbs(o)]=!0}}))}c.finish(this)},g.prototype._process=function(t,e,r){a(this instanceof g);for(var n,i=0;"string"==typeof t[i];)i++;switch(i){case t.length:return void this._processSimple(t.join("/"),e);case 0:n=null;break;default:n=t.slice(0,i).join("/")}var s,c=t.slice(i);null===n?s=".":u(n)||u(t.join("/"))?(n&&u(n)||(n="/"+n),s=n):s=n;var l=this._makeAbs(s);f(this,s)||(c[0]===o.GLOBSTAR?this._processGlobStar(n,s,l,c,e,r):this._processReaddir(n,s,l,c,e,r))},g.prototype._processReaddir=function(t,e,r,n,i,o){var a=this._readdir(r,o);if(a){for(var u=n[0],c=!!this.minimatch.negate,l=u._glob,h=this.dot||"."===l.charAt(0),f=[],d=0;d<a.length;d++){if("."!==(_=a[d]).charAt(0)||h)(c&&!t?!_.match(u):_.match(u))&&f.push(_)}var p=f.length;if(0!==p)if(1!==n.length||this.mark||this.stat){n.shift();for(d=0;d<p;d++){var g;_=f[d];g=t?[t,_]:[_],this._process(g.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<p;d++){var _=f[d];t&&(_="/"!==t.slice(-1)?t+"/"+_:t+_),"/"!==_.charAt(0)||this.nomount||(_=s.join(this.root,_)),this._emitMatch(i,_)}}}},g.prototype._emitMatch=function(t,e){if(!d(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},g.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=n.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var i=r&&r.isSymbolicLink();return this.symlinks[t]=i,i||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},g.prototype._readdir=function(t,e){if(e&&!h(this.symlinks,t))return this._readdirInGlobStar(t);if(h(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,n.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},g.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e},g.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},g.prototype._processGlobStar=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){var a=n.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,i,!1);var l=s.length;if(!this.symlinks[r]||!o)for(var h=0;h<l;h++){if("."!==s[h].charAt(0)||this.dot){var f=u.concat(s[h],a);this._process(f,i,!0);var d=u.concat(s[h],n);this._process(d,i,!0)}}}},g.prototype._processSimple=function(t,r){var n=this._stat(t);if(this.matches[r]||(this.matches[r]=Object.create(null)),n){if(t&&u(t)&&!this.nomount){var i=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=s.join(this.root,t):(t=s.resolve(this.root,t),i&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t)}},g.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&h(this.cache,e)){var i=this.cache[e];if(Array.isArray(i)&&(i="DIR"),!r||"DIR"===i)return i;if(r&&"FILE"===i)return!1}var o=this.statCache[e];if(!o){var s;try{s=n.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{o=n.statSync(e)}catch(t){o=s}else o=s}this.statCache[e]=o;i=!0;return o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||i,(!r||"FILE"!==i)&&i},g.prototype._mark=function(t){return c.mark(this,t)},g.prototype._makeAbs=function(t){return c.makeAbs(this,t)}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(102),i=Object.create(null),o=r(73);function s(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}t.exports=n((function(t,r){return i[t]?(i[t].push(r),null):(i[t]=[r],function(t){return o((function r(){var n=i[t],o=n.length,a=s(arguments);try{for(var u=0;u<o;u++)n[u].apply(null,a)}finally{n.length>o?(n.splice(0,o),e.nextTick((function(){r.apply(null,a)}))):delete i[t]}}))}(t))}))}).call(this,r(0))},function(t,e,r){
54
54
  /**
55
55
  * Archiver Core
56
56
  *
@@ -58,7 +58,7 @@ var i=r(1),o=r(188),s=r(192),a=r(1),u=r(44),c=r(12).inherits,l=r(206),h=r(101).T
58
58
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
59
59
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
60
60
  */
61
- var n=r(12);const i={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function o(t,e){Error.captureStackTrace(this,this.constructor),this.message=i[t]||t,this.code=t,this.data=e}n.inherits(o,Error),t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(209).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(74),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(107);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(31).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(74)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){
61
+ var n=r(12);const i={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function o(t,e){Error.captureStackTrace(this,this.constructor),this.message=i[t]||t,this.code=t,this.data=e}n.inherits(o,Error),t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(209).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(74),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(109);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(31).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(74)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){
62
62
  /**
63
63
  * ZIP Format Plugin
64
64
  *
@@ -74,7 +74,7 @@ var n=r(215),i=r(44),o=function(t){if(!(this instanceof o))return new o(t);t=thi
74
74
  * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
75
75
  * @copyright (c) 2014 Chris Talkington, contributors.
76
76
  */
77
- var n=r(12).inherits,i=r(108).ZipArchiveOutputStream,o=r(108).ZipArchiveEntry,s=r(44),a=t.exports=function(t){if(!(this instanceof a))return new a(t);(t=this.options=t||{}).zlib=t.zlib||{},i.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};n(a,i),a.prototype._normalizeFileData=function(t){var e="directory"===(t=s.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=s.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=s.dateify(t.date),t},a.prototype.entry=function(t,e,r){if("function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),"file"===(e=this._normalizeFileData(e)).type||"directory"===e.type||"symlink"===e.type)if("string"==typeof e.name&&0!==e.name.length){if("symlink"!==e.type||"string"==typeof e.linkname){var n=new o(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),"symlink"===e.type&&"number"!=typeof e.mode&&(e.mode=40960),"number"==typeof e.mode&&("symlink"===e.type&&(e.mode|=40960),n.setUnixMode(e.mode)),"symlink"===e.type&&"string"==typeof e.linkname&&(t=Buffer.from(e.linkname)),i.prototype.entry.call(this,n,t,r)}r(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else r(new Error("entry name must be a non-empty string value"));else r(new Error(e.type+" entries not currently supported"))},a.prototype.finalize=function(){this.finish()}},function(t,e){t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(219).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(77),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(119);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(33).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(77)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){var n=r(12).inherits,i=r(121),{CRC32Stream:o}=r(122),{DeflateCRC32Stream:s}=r(122),a=r(112),u=(r(109),r(110),r(111)),c=(r(120),r(76)),l=t.exports=function(t){if(!(this instanceof l))return new l(t);t=this.options=this._defaults(t),a.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};n(l,a),l.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},l.prototype._appendBuffer=function(t,e,r){0===e.length&&t.setMethod(u.METHOD_STORED);var n=t.getMethod();return n===u.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(i.unsigned(e))),this._writeLocalFileHeader(t),n===u.METHOD_STORED?(this.write(e),this._afterAppend(t),void r(null,t)):n===u.METHOD_DEFLATED?void this._smartStream(t,r).end(e):void r(new Error("compression method "+n+" not implemented"))},l.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",(function(t){n.emit("error",t),n.end()})),e.pipe(n)},l.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=u.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},l.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},l.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(u.METHOD_DEFLATED),t.getMethod()===u.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},l.prototype._smartStream=function(t,e){var r=t.getMethod()===u.METHOD_DEFLATED?new s(this.options.zlib):new o,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);t.setCrc(i),t.setSize(r.size()),t.setCompressedSize(r.size(!0)),this._afterAppend(t),e(n,t)}.bind(this)),r.once("error",(function(t){n=t})),r.pipe(this,{end:!1}),r},l.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=u.ZIP64_MAGIC_SHORT,e=u.ZIP64_MAGIC,r=u.ZIP64_MAGIC),this.write(c.getLongBytes(u.SIG_EOCD)),this.write(u.SHORT_ZERO),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t)),this.write(c.getShortBytes(t)),this.write(c.getLongBytes(e)),this.write(c.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(c.getShortBytes(i)),this.write(n)},l.prototype._writeCentralDirectoryZip64=function(){this.write(c.getLongBytes(u.SIG_ZIP64_EOCD)),this.write(c.getEightBytes(44)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._archive.centralLength)),this.write(c.getEightBytes(this._archive.centralOffset)),this.write(c.getLongBytes(u.SIG_ZIP64_EOCD_LOC)),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(c.getLongBytes(1))},l.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n.file>u.ZIP64_MAGIC){i=u.ZIP64_MAGIC,o=u.ZIP64_MAGIC,t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64);var s=Buffer.concat([c.getShortBytes(u.ZIP64_EXTRA_ID),c.getShortBytes(24),c.getEightBytes(t.getSize()),c.getEightBytes(t.getCompressedSize()),c.getEightBytes(n.file)],28);t.setExtra(s)}this.write(c.getLongBytes(u.SIG_CFH)),this.write(c.getShortBytes(t.getPlatform()<<8|u.VERSION_MADEBY)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(o)),this.write(c.getLongBytes(i));var a=t.getName(),l=t.getComment(),h=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),l=Buffer.from(l)),this.write(c.getShortBytes(a.length)),this.write(c.getShortBytes(h.length)),this.write(c.getShortBytes(l.length)),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t.getInternalAttributes())),this.write(c.getLongBytes(t.getExternalAttributes())),n.file>u.ZIP64_MAGIC?this.write(c.getLongBytes(u.ZIP64_MAGIC)):this.write(c.getLongBytes(n.file)),this.write(a),this.write(h),this.write(l)},l.prototype._writeDataDescriptor=function(t){this.write(c.getLongBytes(u.SIG_DD)),this.write(c.getLongBytes(t.getCrc())),t.isZip64()?(this.write(c.getEightBytes(t.getCompressedSize())),this.write(c.getEightBytes(t.getSize()))):(this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize())))},l.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(c.getLongBytes(u.SIG_LFH)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO)):(this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize()))),this.write(c.getShortBytes(n.length)),this.write(c.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset},l.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},l.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>u.ZIP64_MAGIC_SHORT||this._archive.centralLength>u.ZIP64_MAGIC||this._archive.centralOffset>u.ZIP64_MAGIC},l.prototype.setComment=function(t){this._archive.comment=t}},function(t,e,r){"use strict";const{Transform:n}=r(226),i=r(129);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),r(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}},function(t,e,r){(e=t.exports=r(123)).Stream=e,e.Readable=e,e.Writable=r(127),e.Duplex=r(36),e.Transform=r(128),e.PassThrough=r(232),e.finished=r(78),e.pipeline=r(233)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(229).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(78),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(128);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(35).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(78)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{DeflateRaw:n}=r(62),i=r(129);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,e,r)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}},function(t,e,r){
77
+ var n=r(12).inherits,i=r(110).ZipArchiveOutputStream,o=r(110).ZipArchiveEntry,s=r(44),a=t.exports=function(t){if(!(this instanceof a))return new a(t);(t=this.options=t||{}).zlib=t.zlib||{},i.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};n(a,i),a.prototype._normalizeFileData=function(t){var e="directory"===(t=s.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=s.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=s.dateify(t.date),t},a.prototype.entry=function(t,e,r){if("function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),"file"===(e=this._normalizeFileData(e)).type||"directory"===e.type||"symlink"===e.type)if("string"==typeof e.name&&0!==e.name.length){if("symlink"!==e.type||"string"==typeof e.linkname){var n=new o(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),"symlink"===e.type&&"number"!=typeof e.mode&&(e.mode=40960),"number"==typeof e.mode&&("symlink"===e.type&&(e.mode|=40960),n.setUnixMode(e.mode)),"symlink"===e.type&&"string"==typeof e.linkname&&(t=Buffer.from(e.linkname)),i.prototype.entry.call(this,n,t,r)}r(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else r(new Error("entry name must be a non-empty string value"));else r(new Error(e.type+" entries not currently supported"))},a.prototype.finalize=function(){this.finish()}},function(t,e){t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(219).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(77),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(121);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(33).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(77)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){var n=r(12).inherits,i=r(123),{CRC32Stream:o}=r(124),{DeflateCRC32Stream:s}=r(124),a=r(114),u=(r(111),r(112),r(113)),c=(r(122),r(76)),l=t.exports=function(t){if(!(this instanceof l))return new l(t);t=this.options=this._defaults(t),a.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};n(l,a),l.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},l.prototype._appendBuffer=function(t,e,r){0===e.length&&t.setMethod(u.METHOD_STORED);var n=t.getMethod();return n===u.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(i.unsigned(e))),this._writeLocalFileHeader(t),n===u.METHOD_STORED?(this.write(e),this._afterAppend(t),void r(null,t)):n===u.METHOD_DEFLATED?void this._smartStream(t,r).end(e):void r(new Error("compression method "+n+" not implemented"))},l.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",(function(t){n.emit("error",t),n.end()})),e.pipe(n)},l.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=u.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},l.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},l.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(u.METHOD_DEFLATED),t.getMethod()===u.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},l.prototype._smartStream=function(t,e){var r=t.getMethod()===u.METHOD_DEFLATED?new s(this.options.zlib):new o,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);t.setCrc(i),t.setSize(r.size()),t.setCompressedSize(r.size(!0)),this._afterAppend(t),e(n,t)}.bind(this)),r.once("error",(function(t){n=t})),r.pipe(this,{end:!1}),r},l.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=u.ZIP64_MAGIC_SHORT,e=u.ZIP64_MAGIC,r=u.ZIP64_MAGIC),this.write(c.getLongBytes(u.SIG_EOCD)),this.write(u.SHORT_ZERO),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t)),this.write(c.getShortBytes(t)),this.write(c.getLongBytes(e)),this.write(c.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(c.getShortBytes(i)),this.write(n)},l.prototype._writeCentralDirectoryZip64=function(){this.write(c.getLongBytes(u.SIG_ZIP64_EOCD)),this.write(c.getEightBytes(44)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._archive.centralLength)),this.write(c.getEightBytes(this._archive.centralOffset)),this.write(c.getLongBytes(u.SIG_ZIP64_EOCD_LOC)),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(c.getLongBytes(1))},l.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n.file>u.ZIP64_MAGIC){i=u.ZIP64_MAGIC,o=u.ZIP64_MAGIC,t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64);var s=Buffer.concat([c.getShortBytes(u.ZIP64_EXTRA_ID),c.getShortBytes(24),c.getEightBytes(t.getSize()),c.getEightBytes(t.getCompressedSize()),c.getEightBytes(n.file)],28);t.setExtra(s)}this.write(c.getLongBytes(u.SIG_CFH)),this.write(c.getShortBytes(t.getPlatform()<<8|u.VERSION_MADEBY)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(o)),this.write(c.getLongBytes(i));var a=t.getName(),l=t.getComment(),h=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),l=Buffer.from(l)),this.write(c.getShortBytes(a.length)),this.write(c.getShortBytes(h.length)),this.write(c.getShortBytes(l.length)),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t.getInternalAttributes())),this.write(c.getLongBytes(t.getExternalAttributes())),n.file>u.ZIP64_MAGIC?this.write(c.getLongBytes(u.ZIP64_MAGIC)):this.write(c.getLongBytes(n.file)),this.write(a),this.write(h),this.write(l)},l.prototype._writeDataDescriptor=function(t){this.write(c.getLongBytes(u.SIG_DD)),this.write(c.getLongBytes(t.getCrc())),t.isZip64()?(this.write(c.getEightBytes(t.getCompressedSize())),this.write(c.getEightBytes(t.getSize()))):(this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize())))},l.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(c.getLongBytes(u.SIG_LFH)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO)):(this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize()))),this.write(c.getShortBytes(n.length)),this.write(c.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset},l.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},l.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>u.ZIP64_MAGIC_SHORT||this._archive.centralLength>u.ZIP64_MAGIC||this._archive.centralOffset>u.ZIP64_MAGIC},l.prototype.setComment=function(t){this._archive.comment=t}},function(t,e,r){"use strict";const{Transform:n}=r(226),i=r(131);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),r(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}},function(t,e,r){(e=t.exports=r(125)).Stream=e,e.Readable=e,e.Writable=r(129),e.Duplex=r(36),e.Transform=r(130),e.PassThrough=r(232),e.finished=r(78),e.pipeline=r(233)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(229).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(78),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(130);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(35).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(78)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{DeflateRaw:n}=r(62),i=r(131);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,e,r)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}},function(t,e,r){
78
78
  /**
79
79
  * TAR Format Plugin
80
80
  *
@@ -82,7 +82,7 @@ var n=r(12).inherits,i=r(108).ZipArchiveOutputStream,o=r(108).ZipArchiveEntry,s=
82
82
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
83
83
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
84
84
  */
85
- var n=r(62),i=r(236),o=r(44),s=function(t){if(!(this instanceof s))return new s(t);"object"!=typeof(t=this.options=o.defaults(t,{gzip:!1})).gzipOptions&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(t),this.compressor=!1,t.gzip&&(this.compressor=n.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};s.prototype._onCompressorError=function(t){this.engine.emit("error",t)},s.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):n.engine.entry(e,i,(function(t){r(t,e)}))}if(e.mtime=e.date,"buffer"===e.sourceType)i(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var s=n.engine.entry(e,(function(t){r(t,e)}));t.pipe(s)}else"stream"===e.sourceType&&o.collectStream(t,i)},s.prototype.finalize=function(){this.engine.finalize()},s.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},s.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},s.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},t.exports=s},function(t,e,r){e.extract=r(237),e.pack=r(255)},function(t,e,r){var n=r(12),i=r(238),o=r(136),s=r(59).Writable,a=r(59).PassThrough,u=function(){},c=function(t){return(t&=511)&&512-t},l=function(t,e){this._parent=t,this.offset=e,a.call(this,{autoDestroy:!1})};n.inherits(l,a),l.prototype.destroy=function(t){this._parent.destroy(t)};var h=function(t){if(!(this instanceof h))return new h(t);s.call(this,t),t=t||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=u,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,n=function(){e._continue()},a=function(t){if(e._locked=!1,t)return e.destroy(t);e._stream||n()},f=function(){e._stream=null;var t=c(e._header.size);t?e._parse(t,d):e._parse(512,y),e._locked||n()},d=function(){e._buffer.consume(c(e._header.size)),e._parse(512,y),n()},p=function(){var t=e._header.size;e._paxGlobal=o.decodePax(r.slice(0,t)),r.consume(t),f()},g=function(){var t=e._header.size;e._pax=o.decodePax(r.slice(0,t)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(t),f()},_=function(){var n=e._header.size;this._gnuLongPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},m=function(){var n=e._header.size;this._gnuLongLinkPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},y=function(){var i,s=e._offset;try{i=e._header=o.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(t){e.emit("error",t)}return r.consume(512),i?"gnu-long-path"===i.type?(e._parse(i.size,_),void n()):"gnu-long-link-path"===i.type?(e._parse(i.size,m),void n()):"pax-global-header"===i.type?(e._parse(i.size,p),void n()):"pax-header"===i.type?(e._parse(i.size,g),void n()):(e._gnuLongPath&&(i.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(i.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=i=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t}(i,e._pax),e._pax=null),e._locked=!0,i.size&&"directory"!==i.type?(e._stream=new l(e,s),e.emit("entry",i,e._stream,a),e._parse(i.size,f),void n()):(e._parse(512,y),void e.emit("entry",i,function(t,e){var r=new l(t,e);return r.end(),r}(e,s),a))):(e._parse(512,y),void n())};this._onheader=y,this._parse(512,y)};n.inherits(h,s),h.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))},h.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)},h.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=u,this._overflow?this._write(this._overflow,void 0,t):t()}},h.prototype._write=function(t,e,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing;if(t.length&&(this._partial=!0),t.length<o)return this._missing-=t.length,this._overflow=null,n?n.write(t,r):(i.append(t),r());this._cb=r,this._missing=0;var s=null;t.length>o&&(s=t.slice(o),t=t.slice(0,o)),n?n.end(t):i.append(t),this._overflow=s,this._onparse()}},h.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()},t.exports=h},function(t,e,r){"use strict";const n=r(239).Duplex,i=r(5),o=r(247);function s(t){if(!(this instanceof s))return new s(t);if("function"==typeof t){this._callback=t;const e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)})),t=null}o._init.call(this,t),n.call(this)}i(s,n),Object.assign(s.prototype,o.prototype),s.prototype._new=function(t){return new s(t)},s.prototype._write=function(t,e,r){this._appendBuffer(t),"function"==typeof r&&r()},s.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function(t){n.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(t,e){this._bufs.length=0,this.length=0,e(t)},s.prototype._isBufferList=function(t){return t instanceof s||t instanceof o||s.isBufferList(t)},s.isBufferList=o.isBufferList,t.exports=s,t.exports.BufferListStream=s,t.exports.BufferList=o},function(t,e,r){(e=t.exports=r(130)).Stream=e,e.Readable=e,e.Writable=r(134),e.Duplex=r(38),e.Transform=r(135),e.PassThrough=r(245),e.finished=r(79),e.pipeline=r(246)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(242).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(79),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(135);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(37).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(79)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{Buffer:n}=r(9),i=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){const n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},o.prototype._reverseOffset=function(t){const e=t[0];let r=t[1];for(let t=0;t<e;t++)r+=this._bufs[t].length;return r},o.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return t||n.alloc(0);if(i<=0)return t||n.alloc(0);const o=!!t,s=this._offset(r),a=i-r;let u=a,c=o&&e||0,l=s[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,c),c+=this._bufs[e].length;return t}if(u<=this._bufs[s[0]].length-l)return o?this._bufs[s[0]].copy(t,e,l,l+u):this._bufs[s[0]].slice(l,l+u);o||(t=n.allocUnsafe(a));for(let e=s[0];e<this._bufs.length;e++){const r=this._bufs[e].length-l;if(!(u>r)){this._bufs[e].copy(t,c,l,l+u),c+=r;break}this._bufs[e].copy(t,c,l),c+=r,u-=r,l&&(l=0)}return t.length>c?t.slice(0,c):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),n=this._offset(e),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},o.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(n.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(n.from(t));return this},o.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},o.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=n.from([t]):"string"==typeof t?t=n.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=n.from(t.buffer,t.byteOffset,t.byteLength):n.isBuffer(t)||(t=n.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const i=this._offset(e);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const e=this._bufs[o];for(;s<e.length;){if(e.length-s>=t.length){const r=e.indexOf(t,s);if(-1!==r)return this._reverseOffset([o,r]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}}s=0}return-1},o.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const e in t)!function(e){o.prototype[e]=null===t[e]?function(t,r){return this.slice(t,t+r)[e](0,r)}:function(r=0){return this.slice(r,r+t[e])[e](0)}}(e)}(),o.prototype._isBufferList=function(t){return t instanceof o||o.isBufferList(t)},o.isBufferList=function(t){return null!=t&&t[i]},t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(250).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(80),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(142);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(39).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(80)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){(function(e){var n=r(256),i=r(257),o=r(5),s=Buffer.alloc,a=r(59).Readable,u=r(59).Writable,c=r(14).StringDecoder,l=r(136),h=parseInt("755",8),f=parseInt("644",8),d=s(1024),p=function(){},g=function(t,e){(e&=511)&&t.push(d.slice(0,512-e))};var _=function(t){u.call(this),this.written=0,this._to=t,this._destroyed=!1};o(_,u),_.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r},_.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var m=function(){u.call(this),this.linkname="",this._decoder=new c("utf-8"),this._destroyed=!1};o(m,u),m.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()},m.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var y=function(){u.call(this),this._destroyed=!1};o(y,u),y.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))},y.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var b=function(t){if(!(this instanceof b))return new b(t);a.call(this,t),this._drain=p,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};o(b,a),b.prototype.entry=function(t,r,o){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof r&&(o=r,r=null),o||(o=p);var s=this;if(t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&n.S_IFMT){case n.S_IFBLK:return"block-device";case n.S_IFCHR:return"character-device";case n.S_IFDIR:return"directory";case n.S_IFIFO:return"fifo";case n.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?h:f),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof r&&(r=Buffer.from(r)),Buffer.isBuffer(r)){t.size=r.length,this._encode(t);var a=this.push(r);return g(s,t.size),a?e.nextTick(o):this._drain=o,new y}if("symlink"===t.type&&!t.linkname){var u=new m;return i(u,(function(e){if(e)return s.destroy(),o(e);t.linkname=u.linkname,s._encode(t),o()})),u}if(this._encode(t),"file"!==t.type&&"contiguous-file"!==t.type)return e.nextTick(o),new y;var c=new _(this);return this._stream=c,i(c,(function(e){return s._stream=null,e?(s.destroy(),o(e)):c.written!==t.size?(s.destroy(),o(new Error("size mismatch"))):(g(s,t.size),s._finalizing&&s.finalize(),void o())})),c}},b.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(d),this.push(null))},b.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},b.prototype._encode=function(t){if(!t.pax){var e=l.encode(t);if(e)return void this.push(e)}this._encodePax(t)},b.prototype._encodePax=function(t){var e=l.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(l.encode(r)),this.push(e),g(this,e.length),r.size=t.size,r.type=t.type,this.push(l.encode(r))},b.prototype._read=function(t){var e=this._drain;this._drain=p,e()},t.exports=b}).call(this,r(0))},function(t,e,r){t.exports=r(95)},function(t,e,r){(function(e){var n=r(73),i=function(){},o=function(t,r,s){if("function"==typeof r)return o(t,null,r);r||(r={}),s=n(s||i);var a=t._writableState,u=t._readableState,c=r.readable||!1!==r.readable&&t.readable,l=r.writable||!1!==r.writable&&t.writable,h=!1,f=function(){t.writable||d()},d=function(){l=!1,c||s.call(t)},p=function(){c=!1,l||s.call(t)},g=function(e){s.call(t,e?new Error("exited with error code: "+e):null)},_=function(e){s.call(t,e)},m=function(){e.nextTick(y)},y=function(){if(!h)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:s.call(t,new Error("premature close"))},b=function(){t.req.on("finish",d)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?l&&!a&&(t.on("end",f),t.on("close",f)):(t.on("complete",d),t.on("abort",m),t.req?b():t.on("request",b)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",g),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",_),t.on("close",m),function(){h=!0,t.removeListener("complete",d),t.removeListener("abort",m),t.removeListener("request",b),t.req&&t.req.removeListener("finish",d),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",d),t.removeListener("exit",g),t.removeListener("end",p),t.removeListener("error",_),t.removeListener("close",m)}};t.exports=o}).call(this,r(0))},function(t,e,r){
85
+ var n=r(62),i=r(236),o=r(44),s=function(t){if(!(this instanceof s))return new s(t);"object"!=typeof(t=this.options=o.defaults(t,{gzip:!1})).gzipOptions&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(t),this.compressor=!1,t.gzip&&(this.compressor=n.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};s.prototype._onCompressorError=function(t){this.engine.emit("error",t)},s.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):n.engine.entry(e,i,(function(t){r(t,e)}))}if(e.mtime=e.date,"buffer"===e.sourceType)i(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var s=n.engine.entry(e,(function(t){r(t,e)}));t.pipe(s)}else"stream"===e.sourceType&&o.collectStream(t,i)},s.prototype.finalize=function(){this.engine.finalize()},s.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},s.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},s.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},t.exports=s},function(t,e,r){e.extract=r(237),e.pack=r(255)},function(t,e,r){var n=r(12),i=r(238),o=r(138),s=r(60).Writable,a=r(60).PassThrough,u=function(){},c=function(t){return(t&=511)&&512-t},l=function(t,e){this._parent=t,this.offset=e,a.call(this,{autoDestroy:!1})};n.inherits(l,a),l.prototype.destroy=function(t){this._parent.destroy(t)};var h=function(t){if(!(this instanceof h))return new h(t);s.call(this,t),t=t||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=u,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,n=function(){e._continue()},a=function(t){if(e._locked=!1,t)return e.destroy(t);e._stream||n()},f=function(){e._stream=null;var t=c(e._header.size);t?e._parse(t,d):e._parse(512,y),e._locked||n()},d=function(){e._buffer.consume(c(e._header.size)),e._parse(512,y),n()},p=function(){var t=e._header.size;e._paxGlobal=o.decodePax(r.slice(0,t)),r.consume(t),f()},g=function(){var t=e._header.size;e._pax=o.decodePax(r.slice(0,t)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(t),f()},_=function(){var n=e._header.size;this._gnuLongPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},m=function(){var n=e._header.size;this._gnuLongLinkPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},y=function(){var i,s=e._offset;try{i=e._header=o.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(t){e.emit("error",t)}return r.consume(512),i?"gnu-long-path"===i.type?(e._parse(i.size,_),void n()):"gnu-long-link-path"===i.type?(e._parse(i.size,m),void n()):"pax-global-header"===i.type?(e._parse(i.size,p),void n()):"pax-header"===i.type?(e._parse(i.size,g),void n()):(e._gnuLongPath&&(i.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(i.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=i=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t}(i,e._pax),e._pax=null),e._locked=!0,i.size&&"directory"!==i.type?(e._stream=new l(e,s),e.emit("entry",i,e._stream,a),e._parse(i.size,f),void n()):(e._parse(512,y),void e.emit("entry",i,function(t,e){var r=new l(t,e);return r.end(),r}(e,s),a))):(e._parse(512,y),void n())};this._onheader=y,this._parse(512,y)};n.inherits(h,s),h.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))},h.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)},h.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=u,this._overflow?this._write(this._overflow,void 0,t):t()}},h.prototype._write=function(t,e,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing;if(t.length&&(this._partial=!0),t.length<o)return this._missing-=t.length,this._overflow=null,n?n.write(t,r):(i.append(t),r());this._cb=r,this._missing=0;var s=null;t.length>o&&(s=t.slice(o),t=t.slice(0,o)),n?n.end(t):i.append(t),this._overflow=s,this._onparse()}},h.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()},t.exports=h},function(t,e,r){"use strict";const n=r(239).Duplex,i=r(5),o=r(247);function s(t){if(!(this instanceof s))return new s(t);if("function"==typeof t){this._callback=t;const e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)})),t=null}o._init.call(this,t),n.call(this)}i(s,n),Object.assign(s.prototype,o.prototype),s.prototype._new=function(t){return new s(t)},s.prototype._write=function(t,e,r){this._appendBuffer(t),"function"==typeof r&&r()},s.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function(t){n.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(t,e){this._bufs.length=0,this.length=0,e(t)},s.prototype._isBufferList=function(t){return t instanceof s||t instanceof o||s.isBufferList(t)},s.isBufferList=o.isBufferList,t.exports=s,t.exports.BufferListStream=s,t.exports.BufferList=o},function(t,e,r){(e=t.exports=r(132)).Stream=e,e.Readable=e,e.Writable=r(136),e.Duplex=r(38),e.Transform=r(137),e.PassThrough=r(245),e.finished=r(79),e.pipeline=r(246)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(242).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(79),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(137);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(37).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(79)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{Buffer:n}=r(9),i=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){const n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},o.prototype._reverseOffset=function(t){const e=t[0];let r=t[1];for(let t=0;t<e;t++)r+=this._bufs[t].length;return r},o.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return t||n.alloc(0);if(i<=0)return t||n.alloc(0);const o=!!t,s=this._offset(r),a=i-r;let u=a,c=o&&e||0,l=s[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,c),c+=this._bufs[e].length;return t}if(u<=this._bufs[s[0]].length-l)return o?this._bufs[s[0]].copy(t,e,l,l+u):this._bufs[s[0]].slice(l,l+u);o||(t=n.allocUnsafe(a));for(let e=s[0];e<this._bufs.length;e++){const r=this._bufs[e].length-l;if(!(u>r)){this._bufs[e].copy(t,c,l,l+u),c+=r;break}this._bufs[e].copy(t,c,l),c+=r,u-=r,l&&(l=0)}return t.length>c?t.slice(0,c):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),n=this._offset(e),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},o.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(n.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(n.from(t));return this},o.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},o.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=n.from([t]):"string"==typeof t?t=n.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=n.from(t.buffer,t.byteOffset,t.byteLength):n.isBuffer(t)||(t=n.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const i=this._offset(e);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const e=this._bufs[o];for(;s<e.length;){if(e.length-s>=t.length){const r=e.indexOf(t,s);if(-1!==r)return this._reverseOffset([o,r]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}}s=0}return-1},o.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const e in t)!function(e){o.prototype[e]=null===t[e]?function(t,r){return this.slice(t,t+r)[e](0,r)}:function(r=0){return this.slice(r,r+t[e])[e](0)}}(e)}(),o.prototype._isBufferList=function(t){return t instanceof o||o.isBufferList(t)},o.isBufferList=function(t){return null!=t&&t[i]},t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(250).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(80),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function g(t){e.nextTick(p,t)}var _=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),_);t.exports=function(t){var e,r=Object.create(m,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(144);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(5)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(39).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(80)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){(function(e){var n=r(256),i=r(257),o=r(5),s=Buffer.alloc,a=r(60).Readable,u=r(60).Writable,c=r(14).StringDecoder,l=r(138),h=parseInt("755",8),f=parseInt("644",8),d=s(1024),p=function(){},g=function(t,e){(e&=511)&&t.push(d.slice(0,512-e))};var _=function(t){u.call(this),this.written=0,this._to=t,this._destroyed=!1};o(_,u),_.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r},_.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var m=function(){u.call(this),this.linkname="",this._decoder=new c("utf-8"),this._destroyed=!1};o(m,u),m.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()},m.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var y=function(){u.call(this),this._destroyed=!1};o(y,u),y.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))},y.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var b=function(t){if(!(this instanceof b))return new b(t);a.call(this,t),this._drain=p,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};o(b,a),b.prototype.entry=function(t,r,o){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof r&&(o=r,r=null),o||(o=p);var s=this;if(t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&n.S_IFMT){case n.S_IFBLK:return"block-device";case n.S_IFCHR:return"character-device";case n.S_IFDIR:return"directory";case n.S_IFIFO:return"fifo";case n.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?h:f),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof r&&(r=Buffer.from(r)),Buffer.isBuffer(r)){t.size=r.length,this._encode(t);var a=this.push(r);return g(s,t.size),a?e.nextTick(o):this._drain=o,new y}if("symlink"===t.type&&!t.linkname){var u=new m;return i(u,(function(e){if(e)return s.destroy(),o(e);t.linkname=u.linkname,s._encode(t),o()})),u}if(this._encode(t),"file"!==t.type&&"contiguous-file"!==t.type)return e.nextTick(o),new y;var c=new _(this);return this._stream=c,i(c,(function(e){return s._stream=null,e?(s.destroy(),o(e)):c.written!==t.size?(s.destroy(),o(new Error("size mismatch"))):(g(s,t.size),s._finalizing&&s.finalize(),void o())})),c}},b.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(d),this.push(null))},b.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},b.prototype._encode=function(t){if(!t.pax){var e=l.encode(t);if(e)return void this.push(e)}this._encodePax(t)},b.prototype._encodePax=function(t){var e=l.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(l.encode(r)),this.push(e),g(this,e.length),r.size=t.size,r.type=t.type,this.push(l.encode(r))},b.prototype._read=function(t){var e=this._drain;this._drain=p,e()},t.exports=b}).call(this,r(0))},function(t,e,r){t.exports=r(97)},function(t,e,r){(function(e){var n=r(73),i=function(){},o=function(t,r,s){if("function"==typeof r)return o(t,null,r);r||(r={}),s=n(s||i);var a=t._writableState,u=t._readableState,c=r.readable||!1!==r.readable&&t.readable,l=r.writable||!1!==r.writable&&t.writable,h=!1,f=function(){t.writable||d()},d=function(){l=!1,c||s.call(t)},p=function(){c=!1,l||s.call(t)},g=function(e){s.call(t,e?new Error("exited with error code: "+e):null)},_=function(e){s.call(t,e)},m=function(){e.nextTick(y)},y=function(){if(!h)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:s.call(t,new Error("premature close"))},b=function(){t.req.on("finish",d)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?l&&!a&&(t.on("end",f),t.on("close",f)):(t.on("complete",d),t.on("abort",m),t.req?b():t.on("request",b)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",g),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",_),t.on("close",m),function(){h=!0,t.removeListener("complete",d),t.removeListener("abort",m),t.removeListener("request",b),t.req&&t.req.removeListener("finish",d),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",d),t.removeListener("exit",g),t.removeListener("end",p),t.removeListener("error",_),t.removeListener("close",m)}};t.exports=o}).call(this,r(0))},function(t,e,r){
86
86
  /**
87
87
  * JSON Format Plugin
88
88
  *
@@ -90,5 +90,5 @@ var n=r(62),i=r(236),o=r(44),s=function(t){if(!(this instanceof s))return new s(
90
90
  * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
91
91
  * @copyright (c) 2012-2014 Chris Talkington, contributors.
92
92
  */
93
- var n=r(12).inherits,i=r(101).Transform,o=r(121),s=r(44),a=function(t){if(!(this instanceof a))return new a(t);t=this.options=s.defaults(t,{}),i.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};n(a,i),a.prototype._transform=function(t,e,r){r(null,t)},a.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},a.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):(e.size=i.length||0,e.crc32=o.unsigned(i),n.files.push(e),r(null,e))}e.crc32=0,"buffer"===e.sourceType?i(null,t):"stream"===e.sourceType&&s.collectStream(t,i)},a.prototype.finalize=function(){this._writeStringified(),this.end()},t.exports=a},function(t,e){},function(t,e,r){"use strict";r.r(e),r.d(e,"I3SConverter",(function(){return Ma})),r.d(e,"NodePages",(function(){return $o})),r.d(e,"Tiles3DConverter",(function(){return Oc})),r.d(e,"DepsInstaller",(function(){return xc.a}));var n={};r.r(n),r.d(n,"decode",(function(){return Zi})),r.d(n,"encode",(function(){return Qi}));var i={};r.r(i),r.d(i,"decode",(function(){return Yi})),r.d(i,"encode",(function(){return $i}));var o={};r.r(o),r.d(o,"decode",(function(){return Ji})),r.d(o,"encode",(function(){return to}));var s={};r.r(s),r.d(s,"decode",(function(){return eo})),r.d(s,"encode",(function(){return ro}));var a=r(261);function u(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const c=1/Math.PI*180,l=1/180*Math.PI,h={};function f(t,{precision:e=h.precision||4}={}){return t=function(t){return Math.round(t/h.EPSILON)*h.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function d(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p(t,e,r){if(d(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function g(t){return function(t,e){return p(t,t=>t*l,e)}(t)}function _(t){return m(t)}function m(t,e){return p(t,t=>t*c,e)}function y(t,e,r){return p(t,t=>Math.max(e,Math.min(r,t)))}function b(t,e,r){const n=h.EPSILON;r&&(h.EPSILON=r);try{if(t===e)return!0;if(d(t)&&d(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!b(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=h.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{h.EPSILON=n}}function w(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function v(t,e,r=""){if(h.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}h.EPSILON=1e-12,h.debug=!1,h.precision=4,h.printTypes=!1,h.printDegrees=!1,h.printRowMajor=!0;const E={};function S(t,e){E[t]||(E[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}class A extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return u(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:d(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(h)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+f(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!b(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const i=t[n];this[n]=i+r*(e[n]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(h.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}class T extends A{get ELEMENTS(){return u(!1),0}get RANK(){return u(!1),0}toString(){let t="[";if(h.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=w(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}function R(t,e,r){const n=e[0],i=e[1],o=r[3]*n+r[7]*i||1;return t[0]=(r[0]*n+r[4]*i)/o,t[1]=(r[1]*n+r[5]*i)/o,t}function O(t,e,r){const n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o||1;return t[0]=(r[0]*n+r[4]*i+r[8]*o)/s,t[1]=(r[1]*n+r[5]*i+r[9]*o)/s,t[2]=(r[2]*n+r[6]*i+r[10]*o)/s,t}function x(t,e,r){const n=e[0],i=e[1],o=e[2];return t[0]=r[0]*n+r[3]*i+r[6]*o,t[1]=r[1]*n+r[4]*i+r[7]*o,t[2]=r[2]*n+r[5]*i+r[8]*o,t[3]=e[3],t}var k=1e-6,I="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function C(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],_=e[13],m=e[14],y=e[15],b=r[0],w=r[1],v=r[2],E=r[3];return t[0]=b*n+w*a+v*h+E*g,t[1]=b*i+w*u+v*f+E*_,t[2]=b*o+w*c+v*d+E*m,t[3]=b*s+w*l+v*p+E*y,b=r[4],w=r[5],v=r[6],E=r[7],t[4]=b*n+w*a+v*h+E*g,t[5]=b*i+w*u+v*f+E*_,t[6]=b*o+w*c+v*d+E*m,t[7]=b*s+w*l+v*p+E*y,b=r[8],w=r[9],v=r[10],E=r[11],t[8]=b*n+w*a+v*h+E*g,t[9]=b*i+w*u+v*f+E*_,t[10]=b*o+w*c+v*d+E*m,t[11]=b*s+w*l+v*p+E*y,b=r[12],w=r[13],v=r[14],E=r[15],t[12]=b*n+w*a+v*h+E*g,t[13]=b*i+w*u+v*f+E*_,t[14]=b*o+w*c+v*d+E*m,t[15]=b*s+w*l+v*p+E*y,t}function M(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function D(t,e){var r=e[0],n=e[1],i=e[2],o=e[4],s=e[5],a=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(r,n,i),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(u,c,l),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function P(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t}function L(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t}var B,N;B=new I(2),I!=Float32Array&&(B[0]=0,B[1]=0),N=B;function j(){var t=new I(3);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function F(t,e,r){var n=new I(3);return n[0]=t,n[1]=e,n[2]=r,n}function z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function G(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2];return t[0]=i*u-o*a,t[1]=o*s-n*u,t[2]=n*a-i*s,t}function H(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o+r[15];return s=s||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/s,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/s,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/s,t}function W(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}function q(t,e,r){var n=r[0],i=r[1],o=r[2],s=r[3],a=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*a-n*c,f=n*u-i*a,d=i*f-o*h,p=o*l-n*f,g=n*h-i*l,_=2*s;return l*=_,h*=_,f*=_,d*=2,p*=2,g*=2,t[0]=a+l+d,t[1]=u+h+p,t[2]=c+f+g,t}var V=U;!function(){var t=j()}();function Z(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.hypot(e,r,n,i)}function Q(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}!function(){var t=function(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();const K=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),X=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Y=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),$={};class J extends T{static get IDENTITY(){return $.IDENTITY=$.IDENTITY||Object.freeze(new J(K)),$.IDENTITY}static get ZERO(){return $.ZERO=$.ZERO||Object.freeze(new J(X)),$.ZERO}get INDICES(){return Y}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=d,this[14]=p,this[15]=g,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=d,this[8]=r,this[9]=s,this[10]=l,this[11]=p,this[12]=n,this[13]=a,this[14]=h,this[15]=g,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(K)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,g=o*s,_=o*a,m=o*u;t[0]=1-h-p,t[1]=l+m,t[2]=f-_,t[3]=0,t[4]=l-m,t[5]=1-c-p,t[6]=d+g,t[7]=0,t[8]=f+_,t[9]=d-g,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:i,far:o}){return o===1/0?J._computeInfinitePerspectiveOffCenter(this,t,e,r,n,i):function(t,e,r,n,i,o,s){var a=1/(r-e),u=1/(i-n),c=1/(o-s);t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*u,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0}(this,t,e,r,n,i,o),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,i,o){const s=2*o/(r-e),a=2*o/(i-n),u=(r+e)/(r-e),c=(i+n)/(i-n),l=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p=e[0],g=e[1],_=e[2],m=n[0],y=n[1],b=n[2],w=r[0],v=r[1],E=r[2];Math.abs(p-w)<k&&Math.abs(g-v)<k&&Math.abs(_-E)<k?function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t):(l=p-w,h=g-v,f=_-E,i=y*(f*=d=1/Math.hypot(l,h,f))-b*(h*=d),o=b*(l*=d)-m*f,s=m*h-y*l,(d=Math.hypot(i,o,s))?(i*=d=1/d,o*=d,s*=d):(i=0,o=0,s=0),a=h*s-f*o,u=f*i-l*s,c=l*o-h*i,(d=Math.hypot(a,u,c))?(a*=d=1/d,u*=d,c*=d):(a=0,u=0,c=0),t[0]=i,t[1]=a,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*g+s*_),t[13]=-(a*p+u*g+c*_),t[14]=-(l*p+h*g+f*_),t[15]=1)}(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:i=.1,far:o=500}){return function(t,e,r,n,i,o,s){var a=1/(e-r),u=1/(n-i),c=1/(o-s);t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*u,t[14]=(s+o)*c,t[15]=1}(this,t,e,r,n,i,o),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:i=500}){if(t>2*Math.PI)throw Error("radians");const o=t/2,s=r*Math.tan(o),a=s*e;return(new J).ortho({left:-a,right:a,bottom:-s,top:s,near:n,far:i})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:i=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return function(t,e,r,n,i){var o,s=1/Math.tan(e/2);t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n)}(this,t,r,n,i),this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],_=t[15],(e*s-r*o)*(h*_-f*g)-(e*a-n*o)*(l*_-f*p)+(e*u-i*o)*(l*g-h*p)+(r*a-n*s)*(c*_-f*d)-(r*u-i*s)*(c*g-h*d)+(n*u-i*a)*(c*p-l*d);var t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g,_}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*n,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*n,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],_=e[14],m=e[15],y=r*a-n*s,b=r*u-i*s,w=r*c-o*s,v=n*u-i*a,E=n*c-o*a,S=i*c-o*u,A=l*g-h*p,T=l*_-f*p,R=l*m-d*p,O=h*_-f*g,x=h*m-d*g,k=f*m-d*_,I=y*k-b*x+w*O+v*R-E*T+S*A;I&&(I=1/I,t[0]=(a*k-u*x+c*O)*I,t[1]=(i*x-n*k-o*O)*I,t[2]=(g*S-_*E+m*v)*I,t[3]=(f*E-h*S-d*v)*I,t[4]=(u*R-s*k-c*T)*I,t[5]=(r*k-i*R+o*T)*I,t[6]=(_*w-p*S-m*b)*I,t[7]=(l*S-f*w+d*b)*I,t[8]=(s*x-a*R+c*A)*I,t[9]=(n*R-r*x-o*A)*I,t[10]=(p*E-g*w+m*y)*I,t[11]=(h*w-l*E-d*y)*I,t[12]=(a*T-s*O-u*A)*I,t[13]=(r*O-n*T+i*A)*I,t[14]=(g*b-p*v-_*y)*I,t[15]=(l*v-h*b+f*y)*I)}(this,this),this.check()}multiplyLeft(t){return C(this,t,this),this.check()}multiplyRight(t){return C(this,this,t),this.check()}rotateX(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],s=e[5],a=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=s*i+l*n,t[6]=a*i+h*n,t[7]=u*i+f*n,t[8]=c*i-o*n,t[9]=l*i-s*n,t[10]=h*i-a*n,t[11]=f*i-u*n}(this,this,t),this.check()}rotateY(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=s*i-l*n,t[2]=a*i-h*n,t[3]=u*i-f*n,t[8]=o*n+c*i,t[9]=s*n+l*i,t[10]=a*n+h*i,t[11]=u*n+f*i}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=s*i+l*n,t[2]=a*i+h*n,t[3]=u*i+f*n,t[4]=c*i-o*n,t[5]=l*i-s*n,t[6]=h*i-a*n,t[7]=f*i-u*n}(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R,O,x=n[0],I=n[1],C=n[2],M=Math.hypot(x,I,C);M<k||(x*=M=1/M,I*=M,C*=M,i=Math.sin(r),s=1-(o=Math.cos(r)),a=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],d=e[6],p=e[7],g=e[8],_=e[9],m=e[10],y=e[11],b=x*x*s+o,w=I*x*s+C*i,v=C*x*s-I*i,E=x*I*s-C*i,S=I*I*s+o,A=C*I*s+x*i,T=x*C*s+I*i,R=I*C*s-x*i,O=C*C*s+o,t[0]=a*b+h*w+g*v,t[1]=u*b+f*w+_*v,t[2]=c*b+d*w+m*v,t[3]=l*b+p*w+y*v,t[4]=a*E+h*S+g*A,t[5]=u*E+f*S+_*A,t[6]=c*E+d*S+m*A,t[7]=l*E+p*S+y*A,t[8]=a*T+h*R+g*O,t[9]=u*T+f*R+_*O,t[10]=c*T+d*R+m*O,t[11]=l*T+p*R+y*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?M(this,this,t):M(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n,i,o,s,a,u,c,l,h,f,d,p,g=r[0],_=r[1],m=r[2];e===t?(t[12]=e[0]*g+e[4]*_+e[8]*m+e[12],t[13]=e[1]*g+e[5]*_+e[9]*m+e[13],t[14]=e[2]*g+e[6]*_+e[10]*m+e[14],t[15]=e[3]*g+e[7]*_+e[11]*m+e[15]):(n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=n*g+a*_+h*m+e[12],t[13]=i*g+u*_+f*m+e[13],t[14]=o*g+c*_+d*m+e[14],t[15]=s*g+l*_+p*m+e[15])}(this,this,t),this.check()}transform(t,e){return 4===t.length?(v(e=function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=L(e||[-0,-0],t,this);break;case 3:e=H(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=R(e||[-0,-0],t,this);break;case 3:e=O(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return S("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return S("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return S("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}class tt extends A{get ELEMENTS(){return u(!1),0}copy(t){return u(!1),this}get x(){return this[0]}set x(t){this[0]=w(t)}get y(){return this[1]}set y(t){this[1]=w(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return w(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return w(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return u(t>=0&&t<this.ELEMENTS,"index is out of range"),w(this[t])}setComponent(t,e){return u(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}const et=[0,0,0],rt={};class nt extends tt{static get ZERO(){return rt.ZERO=rt.ZERO||Object.freeze(new nt(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&d(t)?this.copy(t):(h.debug&&(w(t),w(e),w(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y),w(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=w(t)}angle(t){return r=t,n=(e=this)[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=Math.sqrt(n*n+i*i+o*o)*Math.sqrt(s*s+a*a+u*u),l=c&&z(e,r)/c,Math.acos(Math.min(Math.max(l,-1),1));var e,r,n,i,o,s,a,u,c,l}cross(t){return G(this,this,t),this.check()}rotateX({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateY({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return H(this,this,t),this.check()}transformAsVector(t){return O(this,this,t),this.check()}transformByMatrix3(t){return W(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}}var it=.1,ot=1e-12,st=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;Math.max(6378137,6378137,6356752.314245179);const at=t=>t,ut=new nt;function ct(t,e,r=at){return d(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function lt(t,e,r=at){return d(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const ht=new nt,ft=new nt,dt=new nt;const pt=new nt,gt={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},_t={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},mt={east:new nt,north:new nt,up:new nt,west:new nt,south:new nt,down:new nt},yt=new nt,bt=new nt,wt=new nt;function vt(t,e,r,n,i,o){const s=gt[e]&&gt[e][r];let a,c,l;u(s&&(!n||n===s));const h=pt.copy(i);if(b(h.x,0,1e-14)&&b(h.y,0,1e-14)){const t=Math.sign(h.z);a=yt.fromArray(_t[e]),"east"!==e&&"west"!==e&&a.scale(t),c=bt.fromArray(_t[r]),"east"!==r&&"west"!==r&&c.scale(t),l=wt.fromArray(_t[n]),"east"!==n&&"west"!==n&&l.scale(t)}else{const{up:i,east:o,north:s}=mt;o.set(-h.y,h.x,0).normalize(),t.geodeticSurfaceNormal(h,i),s.copy(i).cross(o);const{down:u,west:f,south:d}=mt;u.copy(i).scale(-1),f.copy(o).scale(-1),d.copy(s).scale(-1),a=mt[e],c=mt[r],l=mt[n]}return o[0]=a.x,o[1]=a.y,o[2]=a.z,o[3]=0,o[4]=c.x,o[5]=c.y,o[6]=c.z,o[7]=0,o[8]=l.x,o[9]=l.y,o[10]=l.z,o[11]=0,o[12]=h.x,o[13]=h.y,o[14]=h.z,o[15]=1,o}const Et=new nt,St=new nt,At=new nt,Tt=new nt,Rt=new nt,Ot=new nt;let xt;class kt{static get WGS84(){return xt=xt||new kt(6378137,6378137,6356752.314245179),xt}constructor(t=0,e=0,r=0){u(t>=0),u(e>=0),u(r>=0),this.radii=new nt(t,e,r),this.radiiSquared=new nt(t*t,e*e,r*r),this.radiiToTheFourth=new nt(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new nt(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new nt(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=it,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=St,n=At,[,,i]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const o=Math.sqrt(r.dot(n));return n.scale(1/o),r.scale(i),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){Ot.from(t);const r=this.scaleToGeodeticSurface(Ot,Tt);if(!r)return;const n=this.geodeticSurfaceNormal(r,St),i=Rt;i.copy(Ot).subtract(r);const o=Math.atan2(n.y,n.x),s=Math.asin(n.z),a=Math.sign(z(i,Ot))*U(i);return lt([o,s,a],e,h._cartographicRadians?at:_)}eastNorthUpToFixedFrame(t,e=new J){return vt(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,i=new J){return vt(this,t,e,r,n,i)}geocentricSurfaceNormal(t,e=[0,0,0]){return Et.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=ut){return ct(t,e,h._cartographicRadians?at:g)}(t),n=r[0],i=r[1],o=Math.cos(i);return Et.set(o*Math.cos(n),o*Math.sin(n),Math.sin(i)).normalize(),Et.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return Et.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new nt){const{oneOverRadii:n,oneOverRadiiSquared:i,centerToleranceSquared:o}=e;ht.from(t);const s=t.x,a=t.y,u=t.z,c=n.x,l=n.y,h=n.z,f=s*s*c*c,d=a*a*l*l,p=u*u*h*h,g=f+d+p,_=Math.sqrt(1/g);if(!Number.isFinite(_))return;const m=ft;if(m.copy(t).scale(_),g<o)return m.to(r);const y=i.x,b=i.y,w=i.z,v=dt;v.set(m.x*y*2,m.y*b*2,m.z*w*2);let E,S,A,T,R=(1-_)*t.len()/(.5*v.len()),O=0;do{R-=O,E=1/(1+R*y),S=1/(1+R*b),A=1/(1+R*w);const t=E*E,e=S*S,r=A*A;T=f*t+d*e+p*r-1;O=T/(-2*(f*(t*E)*y+d*(e*S)*b+p*(r*A)*w))}while(Math.abs(T)>ot);return ht.scale([E,S,A]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Tt.from(t);const r=Tt.x,n=Tt.y,i=Tt.z,o=this.oneOverRadiiSquared,s=1/Math.sqrt(r*r*o.x+n*n*o.y+i*i*o.z);return Tt.multiplyScalar(s).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Tt.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Tt.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){u(b(this.radii.x,this.radii.y,st)),u(this.radii.z>0),Tt.from(t);const n=Tt.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Tt.set(0,0,n).to(r)}}var It=r(67),Ct=r(27),Mt=r(2),Dt=r(145);class Pt{constructor(t,e,r){this.item=t,this.previous=e,this.next=r}}class Lt{constructor(){this.head=null,this.tail=null,this._length=0}get length(){return this._length}add(t){const e=new Pt(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}remove(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}splice(t,e){t!==e&&(this.remove(e),this._insert(t,e))}_insert(t,e){const r=t.next;t.next=e,this.tail===t?this.tail=e:r.previous=e,e.next=r,e.previous=t,++this._length}}function Bt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nt(t){return null!=t}class jt{constructor(){Bt(this,"_list",void 0),Bt(this,"_sentinel",void 0),Bt(this,"_trimTiles",void 0),this._list=new Lt,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}reset(){this._list.splice(this._list.tail,this._sentinel)}touch(t){const e=t._cacheNode;Nt(e)&&this._list.splice(this._sentinel,e)}add(t,e,r){Nt(e._cacheNode)||(e._cacheNode=this._list.add(e),r&&r(t,e))}unloadTile(t,e,r){const n=e._cacheNode;Nt(n)&&(this._list.remove(n),e._cacheNode=void 0,r&&r(t,e))}unloadTiles(t,e){const r=this._trimTiles;this._trimTiles=!1;const n=this._list,i=1024*t.maximumMemoryUsage*1024,o=this._sentinel;let s=n.head;for(;s!==o&&(t.gpuMemoryUsageInBytes>i||r);){const r=s.item;s=s.next,this.unloadTile(t,r,e)}}trim(){this._trimTiles=!0}}const Ut=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});new nt,new nt;const Ft=new nt,zt=new nt;class Gt{constructor(t=[0,0,0],e=0){this.radius=-0,this.center=new nt,this.fromCenterRadius(t,e)}fromCenterRadius(t,e){return this.center.from(t),this.radius=e,this}fromCornerPoints(t,e){return e=Ft.from(e),this.center=(new nt).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}clone(){return new Gt(this.center,this.radius)}union(t){const e=this.center,r=this.radius,n=t.center,i=t.radius,o=Ft.copy(n).subtract(e),s=o.magnitude();if(r>=s+i)return this.clone();if(i>=s+r)return t.clone();const a=.5*(r+s+i);return zt.copy(o).scale((-r+a)/s).add(e),this.center.copy(zt),this.radius=a,this}expand(t){const e=(t=Ft.from(t)).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}transform(t){this.center.transform(t);const e=D(Ft,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}distanceSquaredTo(t){return(t=Ft.from(t)).subtract(this.center).lengthSquared()-this.radius*this.radius}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}intersectPlane(t){const e=this.center,r=this.radius,n=t.normal.dot(e)+t.distance;return n<-r?Ut.OUTSIDE:n<r?Ut.INTERSECTING:Ut.INSIDE}}function Ht(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1],p=r[2],g=r[3],_=r[4],m=r[5],y=r[6],b=r[7],w=r[8];return t[0]=f*n+d*s+p*c,t[1]=f*i+d*a+p*l,t[2]=f*o+d*u+p*h,t[3]=g*n+_*s+m*c,t[4]=g*i+_*a+m*l,t[5]=g*o+_*u+m*h,t[6]=y*n+b*s+w*c,t[7]=y*i+b*a+w*l,t[8]=y*o+b*u+w*h,t}function Wt(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}const qt=Object.freeze([1,0,0,0,1,0,0,0,1]),Vt=Object.freeze([0,0,0,0,0,0,0,0,0]),Zt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),Qt={};class Kt extends T{static get IDENTITY(){return Qt.IDENTITY=Qt.IDENTITY||Object.freeze(new Kt(qt)),Qt.IDENTITY}static get ZERO(){return Qt.ZERO=Qt.ZERO||Object.freeze(new Kt(Vt)),Qt.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return Zt}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=n,this[2]=s,this[3]=e,this[4]=i,this[5]=a,this[6]=r,this[7]=o,this[8]=u,this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],e*(c*o-s*u)+r*(-c*i+s*a)+n*(u*i-o*a);var t,e,r,n,i,o,s,a,u,c}identity(){return this.copy(qt)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,g=o*s,_=o*a,m=o*u;t[0]=1-h-p,t[3]=l-m,t[6]=f+_,t[1]=l+m,t[4]=1-c-p,t[7]=d-g,t[2]=f-_,t[5]=d+g,t[8]=1-c-h}(this,t),this.check()}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=l*s-a*c,f=-l*o+a*u,d=c*o-s*u,p=r*h+n*f+i*d;p&&(p=1/p,t[0]=h*p,t[1]=(-l*n+i*c)*p,t[2]=(a*n-i*s)*p,t[3]=f*p,t[4]=(l*r-i*u)*p,t[5]=(-a*r+i*o)*p,t[6]=d*p,t[7]=(-c*r+n*u)*p,t[8]=(s*r-n*o)*p)}(this,this),this.check()}multiplyLeft(t){return Ht(this,t,this),this.check()}multiplyRight(t){return Ht(this,this,t),this.check()}rotate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(r),d=Math.cos(r);t[0]=d*n+f*s,t[1]=d*i+f*a,t[2]=d*o+f*u,t[3]=d*s-f*n,t[4]=d*a-f*i,t[5]=d*u-f*o,t[6]=c,t[7]=l,t[8]=h}(this,this,t),this.check()}scale(t){return Array.isArray(t)?Wt(this,this,t):Wt(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1];t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=f*n+d*s+c,t[7]=f*i+d*a+l,t[8]=f*o+d*u+h}(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=P(e||[-0,-0],t,this);break;case 3:e=W(e||[-0,-0,-0],t,this);break;case 4:e=x(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}transformVector(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}}function Xt(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Yt(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function $t(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],u=r[1],c=r[2],l=r[3];return t[0]=n*l+s*a+i*c-o*u,t[1]=i*l+s*u+o*a-n*c,t[2]=o*l+s*c+n*u-i*a,t[3]=s*l-n*a-i*u-o*c,t}function Jt(t,e,r,n){var i,o,s,a,u,c=e[0],l=e[1],h=e[2],f=e[3],d=r[0],p=r[1],g=r[2],_=r[3];return(o=c*d+l*p+h*g+f*_)<0&&(o=-o,d=-d,p=-p,g=-g,_=-_),1-o>k?(i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-n)*i)/s,u=Math.sin(n*i)/s):(a=1-n,u=n),t[0]=a*c+u*d,t[1]=a*l+u*p,t[2]=a*h+u*g,t[3]=a*f+u*_,t}function te(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*o+s]-e[3*s+o])*r,t[o]=(e[3*o+i]+e[3*i+o])*r,t[s]=(e[3*s+i]+e[3*i+s])*r}return t}var ee,re,ne,ie,oe,se,ae=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},ue=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},ce=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},le=function(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=s+n*(r[2]-s),t[3]=a+n*(r[3]-a),t},he=Z,fe=Q,de=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=n*s,t[2]=i*s,t[3]=o*s,t},pe=(ee=j(),re=F(1,0,0),ne=F(0,1,0),function(t,e,r){var n=z(e,r);return n<-.999999?(G(ee,re,e),V(ee)<1e-6&&G(ee,ne,e),function(t,e){var r=e[0],n=e[1],i=e[2],o=r*r+n*n+i*i;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o}(ee,ee),Yt(t,ee,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(G(ee,e,r),t[0]=ee[0],t[1]=ee[1],t[2]=ee[2],t[3]=1+n,de(t,t))});ie=Xt(),oe=Xt(),se=function(){var t=new I(9);return I!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}();const ge=[0,0,0,1];class _e extends A{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return te(this,t),this.check()}identity(){return function(t){t[0]=0,t[1]=0,t[2]=0,t[3]=1}(this),this.check()}fromAxisRotation(t,e){return Yt(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=w(t)}get y(){return this[1]}set y(t){this[1]=w(t)}get z(){return this[2]}set z(t){this[2]=w(t)}get w(){return this[3]}set w(t){this[3]=w(t)}len(){return he(this)}lengthSquared(){return fe(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return ce(this,t)}rotationTo(t,e){return pe(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return ae(this,this,t),this.check()}calculateW(){return function(t,e){var r=e[0],n=e[1],i=e[2];t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i))}(this,this),this.check()}conjugate(){return function(t,e){t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o,a=s?1/s:0;t[0]=-r*a,t[1]=-n*a,t[2]=-i*a,t[3]=o*a}(this,this),this.check()}lerp(t,e,r){return le(this,t,e,r),this.check()}multiplyRight(t,e){return u(!e),$t(this,this,t),this.check()}multiplyLeft(t,e){return u(!e),$t(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+s*a,t[1]=i*u+o*a,t[2]=o*u-i*a,t[3]=s*u-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u-o*a,t[1]=i*u+s*a,t[2]=o*u+n*a,t[3]=s*u-i*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+i*a,t[1]=i*u-n*a,t[2]=o*u+s*a,t[3]=s*u-o*a}(this,this,t),this.check()}scale(t){return ue(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=ge,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return Jt(this,t,e,r),this.check()}transformVector4(t,e=t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=r[3],l=c*n+a*o-u*i,h=c*i+u*n-s*o,f=c*o+s*i-a*n,d=-s*n-a*i-u*o;t[0]=l*c+d*-s+h*-u-f*-a,t[1]=h*c+d*-a+f*-s-l*-u,t[2]=f*c+d*-u+l*-a-h*-s,t[3]=e[3]}(e,t,this),v(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}const me=new nt,ye=new nt,be=new nt,we=new nt,ve=new nt,Ee=new nt,Se=new nt,Ae=0,Te=1,Re=2,Oe=3,xe=4,ke=5,Ie=6,Ce=7,Me=8;class De{constructor(t=[0,0,0],e=[0,0,0,0,0,0,0,0,0]){this.center=(new nt).from(t),this.halfAxes=new Kt(e)}get halfSize(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2);return[new nt(t).len(),new nt(e).len(),new nt(r).len()]}get quaternion(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2),n=new nt(t).normalize(),i=new nt(e).normalize(),o=new nt(r).normalize();return(new _e).fromMatrix3(new Kt([...n,...i,...o]))}fromCenterHalfSizeQuaternion(t,e,r){const n=new _e(r),i=(new Kt).fromQuaternion(n);return i[0]=i[0]*e[0],i[1]=i[1]*e[0],i[2]=i[2]*e[0],i[3]=i[3]*e[1],i[4]=i[4]*e[1],i[5]=i[5]*e[1],i[6]=i[6]*e[2],i[7]=i[7]*e[2],i[8]=i[8]*e[2],this.center=(new nt).from(t),this.halfAxes=i,this}clone(){return new De(this.center,this.halfAxes)}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}getBoundingSphere(t=new Gt){const e=this.halfAxes,r=e.getColumn(0,be),n=e.getColumn(1,we),i=e.getColumn(2,ve),o=me.copy(r).add(n).add(i);return t.center.copy(this.center),t.radius=o.magnitude(),t}intersectPlane(t){const e=this.center,r=t.normal,n=this.halfAxes,i=r.x,o=r.y,s=r.z,a=Math.abs(i*n[Ae]+o*n[Te]+s*n[Re])+Math.abs(i*n[Oe]+o*n[xe]+s*n[ke])+Math.abs(i*n[Ie]+o*n[Ce]+s*n[Me]),u=r.dot(e)+t.distance;return u<=-a?Ut.OUTSIDE:u>=a?Ut.INSIDE:Ut.INTERSECTING}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=ye.from(t).subtract(this.center),r=this.halfAxes,n=r.getColumn(0,be),i=r.getColumn(1,we),o=r.getColumn(2,ve),s=n.magnitude(),a=i.magnitude(),u=o.magnitude();n.normalize(),i.normalize(),o.normalize();let c,l=0;return c=Math.abs(e.dot(n))-s,c>0&&(l+=c*c),c=Math.abs(e.dot(i))-a,c>0&&(l+=c*c),c=Math.abs(e.dot(o))-u,c>0&&(l+=c*c),l}computePlaneDistances(t,e,r=[-0,-0]){let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,s=this.halfAxes,a=s.getColumn(0,be),u=s.getColumn(1,we),c=s.getColumn(2,ve),l=Ee.copy(a).add(u).add(c).add(o),h=Se.copy(l).subtract(t);let f=e.dot(h);return n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),r[0]=n,r[1]=i,r}transform(t){this.center.transformAsPoint(t);const e=this.halfAxes.getColumn(0,be);e.transformAsPoint(t);const r=this.halfAxes.getColumn(1,we);r.transformAsPoint(t);const n=this.halfAxes.getColumn(2,ve);return n.transformAsPoint(t),this.halfAxes=new Kt([...e,...r,...n]),this}getTransform(){throw new Error("not implemented")}}const Pe=new nt,Le=new nt;class Be{constructor(t=[0,0,1],e=0){this.normal=new nt,this.distance=-0,this.fromNormalDistance(t,e)}fromNormalDistance(t,e){return u(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}fromPointNormal(t,e){t=Pe.from(t),this.normal.from(e).normalize();const r=-this.normal.dot(t);return this.distance=r,this}fromCoefficients(t,e,r,n){return this.normal.set(t,e,r),u(b(this.normal.len(),1)),this.distance=n,this}clone(t){return new Be(this.normal,this.distance)}equals(t){return b(this.distance,t.distance)&&b(this.normal,t.normal)}getPointDistance(t){return this.normal.dot(t)+this.distance}transform(t){const e=Le.copy(this.normal).transformAsVector(t).normalize(),r=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(r,e)}projectPointOntoPlane(t,e=[0,0,0]){t=Pe.from(t);const r=this.getPointDistance(t),n=Le.copy(this.normal).scale(r);return t.subtract(n).to(e)}}const Ne=[new nt([1,0,0]),new nt([0,1,0]),new nt([0,0,1])],je=new nt,Ue=new nt;new Be(new nt(1,0,0),0);class Fe{static get MASK_OUTSIDE(){return 4294967295}static get MASK_INSIDE(){return 0}static get MASK_INDETERMINATE(){return 2147483647}constructor(t=[]){this.planes=t,u(this.planes.every(t=>t instanceof Be))}fromBoundingSphere(t){this.planes.length=2*Ne.length;const e=t.center,r=t.radius;let n=0;for(const t of Ne){let i=this.planes[n],o=this.planes[n+1];i||(i=this.planes[n]=new Be),o||(o=this.planes[n+1]=new Be);const s=je.copy(t).scale(-r).add(e);t.dot(s);i.fromPointNormal(s,t);const a=je.copy(t).scale(r).add(e),u=Ue.copy(t).negate();u.dot(a);o.fromPointNormal(a,u),n+=2}return this}computeVisibility(t){u(t);let e=Ut.INSIDE;for(const r of this.planes){switch(t.intersectPlane(r)){case Ut.OUTSIDE:return Ut.OUTSIDE;case Ut.INTERSECTING:e=Ut.INTERSECTING}}return e}computeVisibilityWithPlaneMask(t,e){if(u(t,"boundingVolume is required."),u(Number.isFinite(e),"parentPlaneMask is required."),e===Fe.MASK_OUTSIDE||e===Fe.MASK_INSIDE)return e;let r=Fe.MASK_INSIDE;const n=this.planes;for(let i=0;i<this.planes.length;++i){const o=i<31?1<<i:0;if(i<31&&0==(e&o))continue;const s=n[i],a=t.intersectPlane(s);if(a===Ut.OUTSIDE)return Fe.MASK_OUTSIDE;a===Ut.INTERSECTING&&(r|=o)}return r}}new nt,new nt,new nt,new nt,new nt;new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,Math.PI;new Kt,new Kt,new Kt,new Kt,new Kt;new nt,new nt,new nt,new nt,new nt,new Kt,new Kt,new Kt;const ze=new nt,Ge=new nt,He=new Fe([new Be,new Be,new Be,new Be,new Be,new Be]);function We(t,e){const{cameraDirection:r,cameraUp:n,height:i}=t,{metersPerUnit:o}=t.distanceScales,s=[t.longitude,t.latitude,0],a=kt.WGS84.cartographicToCartesian(s,new nt),u=kt.WGS84.eastNorthUpToFixedFrame(a),c=t.unprojectPosition(t.cameraPosition),l=kt.WGS84.cartographicToCartesian(c,new nt),h=new nt(u.transformAsVector(new nt(r).scale(o))).normalize(),f=new nt(u.transformAsVector(new nt(n).scale(o))).normalize();return function(t,e){const r=t.getFrustumPlanes();let n=0;for(const i in r){const o=r[i],s=o.normal.dot(t.center);Ge.copy(o.normal).scale(o.distance-s).add(t.center);const a=t.unprojectPosition(Ge),u=kt.WGS84.cartographicToCartesian(a,new nt);He.planes[n++].fromPointNormal(u,ze.copy(e).subtract(u))}}(t,a),{camera:{position:l,direction:h,up:f},viewport:t,height:i,cullingVolume:He,frameNumber:e,sseDenominator:1.15}}const qe=new nt;function Ve(t){const{halfAxes:e,radius:r,width:n,height:i}=t;if(e){const t=function(t){t.getColumn(0,qe);const e=t.getColumn(1),r=t.getColumn(2),n=qe.add(e).add(r);return n.len()}(e);return Math.log2(6356752.314245179/t)}if(r)return Math.log2(6356752.314245179/r);if(i&&n){return(Math.log2(6378137/n)+Math.log2(6378137/i))/2}return 1}const Ze=0,Qe=1,Ke=3,Xe=4,Ye=5,$e=1,Je=2,tr="empty",er="scenegraph",rr="pointcloud",nr="mesh",ir="I3S",or="TILES3D",sr="geometricError",ar=1;function ur(t){return null!=t}const cr=new nt,lr=new nt,hr=new nt;function fr(t,e,r){if(Object(Ct.a)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,r){const n=new nt(t[0],t[1],t[2]);e.transform(n,n);let i=[];if(10===t.length){const e=t.slice(3,6),r=new _e;r.fromArray(t,6);const n=new nt([1,0,0]),o=new nt([0,1,0]),s=new nt([0,0,1]);n.transformByQuaternion(r),n.scale(e[0]),o.transformByQuaternion(r),o.scale(e[1]),s.transformByQuaternion(r),s.scale(e[2]),i=[...n.toArray(),...o.toArray(),...s.toArray()]}else i=[...t.slice(3,6),...t.slice(6,9),...t.slice(9,12)];const o=e.transformAsVector(i.slice(0,3)),s=e.transformAsVector(i.slice(3,6)),a=e.transformAsVector(i.slice(6,9)),u=new Kt([o[0],o[1],o[2],s[0],s[1],s[2],a[0],a[1],a[2]]);if(ur(r))return r.center=n,r.halfAxes=u,r;return new De(n,u)}(t.box,e,r);if(t.region){const[e,r,n,i,o,s]=t.region,a=kt.WGS84.cartographicToCartesian([m(e),m(i),o],lr),u=kt.WGS84.cartographicToCartesian([m(n),m(r),s],hr),c=(new nt).addVectors(a,u).multiplyScalar(.5),l=(new nt).subVectors(a,u).len()/2;return dr([c[0],c[1],c[2],l],new J)}if(t.sphere)return dr(t.sphere,e,r);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function dr(t,e,r){const n=new nt(t[0],t[1],t[2]);e.transform(n,n);const i=e.getScale(cr),o=Math.max(Math.max(i[0],i[1]),i[2]),s=t[3]*o;return ur(r)?(r.center=n,r.radius=s,r):new Gt(n,s)}new nt,new nt,new J,new nt,new nt,new nt;function pr(t,e){if(t.dynamicScreenSpaceError&&t.dynamicScreenSpaceErrorComputedDensity){const r=t.dynamicScreenSpaceErrorComputedDensity,n=t.dynamicScreenSpaceErrorFactor;return function(t,e){const r=t*e;return 1-Math.exp(-r*r)}(e,r)*n}return 0}const gr=Math.PI/2;function _r([t,e,r]){const n=g(t),i=g(e),o=1+r/6378137,s=o*Math.cos(i);return[t=s*Math.cos(n),e=s*Math.sin(n),r=o*Math.sin(i)]}function mr(t,e){const[r,n,i=0]=t,[o,s,a=0]=e,u=_r([o,s,a]),c=_r([r,n,i]),l=c[0]-u[0],h=c[1]-u[1],f=c[2]-u[2];return l*l+h*h+f*f}function yr(t,e){const r=e.viewport,n=t.header.mbs[1],i=[t.header.mbs[0],n,t.header.mbs[2]],o=t.header.mbs[3]/6378137,s=mr(r.unprojectPosition(r.cameraPosition),i)-o*o;if(s<=0)return 170141175e30;return function(t){const{projectionMatrix:e}=t.viewport;return e[5]}(e)*o/Math.sqrt(s)*300}class br{constructor(t=0){this._array=new Array(t),this._map=new Map,this._length=t}get length(){return this._length}set length(t){this._length=t,t>this._array.length&&(this._array.length=t)}get values(){return this._array}get(t){return Object(Ct.a)(t<this._array.length),this._array[t]}set(t,e){Object(Ct.a)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}delete(t){const e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}peek(){return this._array[this._length-1]}push(t){if(!this._map.has(t)){const e=this.length++;this._array[e]=t,this._map.set(t,e)}}pop(){const t=this._array[--this.length];return this._map.delete(t),t}reserve(t){Object(Ct.a)(t>=0),t>this._array.length&&(this._array.length=t)}resize(t){Object(Ct.a)(t>=0),this.length=t}trim(t){null==t&&(t=this.length),this._array.length=t}reset(){this._array=[],this._map=new Map,this._length=0}find(t){return this._map.has(t)}}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const vr={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:()=>{},viewportTraversersMap:{},basePath:""};class Er{constructor(t){wr(this,"options",void 0),wr(this,"root",void 0),wr(this,"requestedTiles",void 0),wr(this,"selectedTiles",void 0),wr(this,"emptyTiles",void 0),wr(this,"_traversalStack",void 0),wr(this,"_emptyTraversalStack",void 0),wr(this,"_frameNumber",void 0),this.options={...vr,...t},this._traversalStack=new br,this._emptyTraversalStack=new br,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}traverse(t,e,r){this.root=t,this.options={...this.options,...r},this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}reset(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}executeTraversal(t,e){const r=this._traversalStack;for(t._selectionDepth=1,r.push(t);r.length>0;){const t=r.pop();let n=!1;this.canTraverse(t,e)&&(this.updateChildTiles(t,e),n=this.updateAndPushChildren(t,e,r,t.hasRenderContent?t._selectionDepth+1:t._selectionDepth));const i=t.parent,o=Boolean(!i||i._shouldRefine),s=!n;t.hasRenderContent?t.refine===$e?(this.loadTile(t,e),this.selectTile(t,e)):t.refine===Je&&(this.loadTile(t,e),s&&this.selectTile(t,e)):(this.emptyTiles[t.id]=t,this.loadTile(t,e),s&&this.selectTile(t,e)),this.touchTile(t,e),t._shouldRefine=n&&o}this.options.onTraversalEnd(e)}updateChildTiles(t,e){const r=t.children;for(const t of r)this.updateTile(t,e);return!0}updateAndPushChildren(t,e,r,n){const{loadSiblings:i,skipLevelOfDetail:o}=this.options,s=t.children;s.sort(this.compareDistanceToCamera.bind(this));const a=t.refine===Je&&t.hasRenderContent&&!o;let u=!1,c=!0;for(const t of s)if(t._selectionDepth=n,t.isVisibleAndInRequestVolume?(r.find(t)&&r.delete(t),r.push(t),u=!0):(a||i)&&(this.loadTile(t,e),this.touchTile(t,e)),a){let r;if(r=!!t._inRequestVolume&&(t.hasRenderContent?t.contentAvailable:this.executeEmptyTraversal(t,e)),c=c&&r,!c)return!1}return u||(c=!1),c}updateTile(t,e){this.updateTileVisibility(t,e)}selectTile(t,e){this.shouldSelectTile(t)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}loadTile(t,e){this.shouldLoadTile(t)&&(t._requestedFrame=e.frameNumber,t._priority=t._getPriority(),this.requestedTiles[t.id]=t)}touchTile(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}canTraverse(t,e,r=!1,n=!1){return!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:!(!n&&!t.isVisibleAndInRequestVolume)&&this.shouldRefine(t,e,r))}shouldLoadTile(t){return t.hasUnloadedContent||t.contentExpired}shouldSelectTile(t){return t.contentAvailable&&!this.options.skipLevelOfDetail}shouldRefine(t,e,r){let n=t._screenSpaceError;return r&&(n=t.getScreenSpaceError(e,!0)),n>this.options.maximumScreenSpaceError}updateTileVisibility(t,e){const r=[];if(this.options.viewportTraversersMap)for(const t in this.options.viewportTraversersMap){this.options.viewportTraversersMap[t]===e.viewport.id&&r.push(t)}else r.push(e.viewport.id);t.updateVisibility(e,r)}compareDistanceToCamera(t,e){return t._distanceToCamera-e._distanceToCamera}anyChildrenVisible(t,e){let r=!1;for(const n of t.children)n.updateVisibility(e),r=r||n.isVisibleAndInRequestVolume;return r}executeEmptyTraversal(t,e){let r=!0;const n=this._emptyTraversalStack;for(n.push(t);n.length>0&&r;){const t=n.pop();this.updateTile(t,e),t.isVisibleAndInRequestVolume||this.loadTile(t,e),this.touchTile(t,e);if(!t.hasRenderContent&&this.canTraverse(t,e,!1,!0)){const e=t.children;for(const t of e)n.find(t)&&n.delete(t),n.push(t)}else t.contentAvailable||(r=!1)}return r}}function Sr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ar=new nt;class Tr{constructor(t,e,r,n=""){Sr(this,"tileset",void 0),Sr(this,"header",void 0),Sr(this,"id",void 0),Sr(this,"url",void 0),Sr(this,"parent",void 0),Sr(this,"refine",void 0),Sr(this,"type",void 0),Sr(this,"contentUrl",void 0),Sr(this,"lodMetricType",void 0),Sr(this,"lodMetricValue",void 0),Sr(this,"boundingVolume",void 0),Sr(this,"content",void 0),Sr(this,"contentState",void 0),Sr(this,"gpuMemoryUsageInBytes",void 0),Sr(this,"children",void 0),Sr(this,"depth",void 0),Sr(this,"viewportIds",void 0),Sr(this,"transform",void 0),Sr(this,"userData",void 0),Sr(this,"computedTransform",void 0),Sr(this,"hasEmptyContent",void 0),Sr(this,"hasTilesetContent",void 0),Sr(this,"traverser",void 0),Sr(this,"_cacheNode",void 0),Sr(this,"_frameNumber",void 0),Sr(this,"_lodJudge",void 0),Sr(this,"_expireDate",void 0),Sr(this,"_expiredContent",void 0),Sr(this,"_shouldRefine",void 0),Sr(this,"_distanceToCamera",void 0),Sr(this,"_centerZDepth",void 0),Sr(this,"_screenSpaceError",void 0),Sr(this,"_visibilityPlaneMask",void 0),Sr(this,"_visible",void 0),Sr(this,"_inRequestVolume",void 0),Sr(this,"_stackLength",void 0),Sr(this,"_selectionDepth",void 0),Sr(this,"_touchedFrame",void 0),Sr(this,"_visitedFrame",void 0),Sr(this,"_selectedFrame",void 0),Sr(this,"_requestedFrame",void 0),Sr(this,"_priority",void 0),Sr(this,"_contentBoundingVolume",void 0),Sr(this,"_viewerRequestVolume",void 0),Sr(this,"_initialTransform",void 0),this.header=e,this.tileset=t,this.id=n||e.id,this.url=e.url,this.parent=r,this.refine=this._getRefine(e.refine),this.type=e.type,this.contentUrl=e.contentUrl,this.lodMetricType="geometricError",this.lodMetricValue=0,this.boundingVolume=null,this.content=null,this.contentState=Ze,this.gpuMemoryUsageInBytes=0,this.children=[],this.hasEmptyContent=!1,this.hasTilesetContent=!1,this.depth=0,this.viewportIds=[],this.userData={},this._priority=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._screenSpaceError=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this.traverser=new Er({}),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._initialTransform=new J,this.transform=new J,this._initializeLodMetric(e),this._initializeTransforms(e),this._initializeBoundingVolumes(e),this._initializeContent(e),this._initializeRenderingState(e),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,Object.seal(this)}destroy(){this.header=null}isDestroyed(){return null===this.header}get selected(){return this._selectedFrame===this.tileset._frameNumber}get isVisible(){return this._visible}get isVisibleAndInRequestVolume(){return this._visible&&this._inRequestVolume}get hasRenderContent(){return!this.hasEmptyContent&&!this.hasTilesetContent}get hasChildren(){return this.children.length>0||this.header.children&&this.header.children.length>0}get contentReady(){return this.contentState===Ke||this.hasEmptyContent}get contentAvailable(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}get hasUnloadedContent(){return this.hasRenderContent&&this.contentUnloaded}get contentUnloaded(){return this.contentState===Ze}get contentExpired(){return this.contentState===Xe}get contentFailed(){return this.contentState===Ye}getScreenSpaceError(t,e){switch(this.tileset.type){case ir:return yr(this,t);case or:return function(t,e,r){const n=t.tileset,i=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,o=r?i:t.lodMetricValue;if(0===o)return 0;const s=Math.max(t._distanceToCamera,1e-7),{height:a,sseDenominator:u}=e,{viewDistanceScale:c}=n.options;let l=o*a*(c||1)/(s*u);return l-=pr(n,s),l}(this,t,e);default:throw new Error("Unsupported tileset type")}}_getPriority(){const t=this.tileset._traverser,{skipLevelOfDetail:e}=t.options,r=this.refine===$e||e;if(r&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(this.contentState===Ze)return-1;const n=this.parent,i=n&&(!r||0===this._screenSpaceError||n.hasTilesetContent)?n._screenSpaceError:this._screenSpaceError,o=t.root?t.root._screenSpaceError:0;return Math.max(o-i,0)}async loadContent(){if(this.hasEmptyContent)return!1;if(this.content)return!0;this.contentExpired&&(this._expireDate=null),this.contentState=Qe;const t=await this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));if(!t)return this.contentState=Ze,!1;try{const e=this.tileset.getTileUrl(this.contentUrl),r=this.tileset.loader,n={...this.tileset.loadOptions,[r.id]:{...this.tileset.loadOptions[r.id],isTileset:"json"===this.type,...this._getLoaderSpecificOptions(r.id)}};return this.content=await Object(a.a)(e,r,n),this.tileset.options.contentLoader&&await this.tileset.options.contentLoader(this),this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=Ke,this._onContentLoaded(),!0}catch(t){throw this.contentState=Ye,t}finally{t.done()}}unloadContent(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=Ze,!0}updateVisibility(t,e){if(this._frameNumber===t.frameNumber)return;const r=this.parent,n=r?r._visibilityPlaneMask:Fe.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){const t=r?r.computedTransform:this.tileset.modelMatrix;this._updateTransform(t)}this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,n),this._visible=this._visibilityPlaneMask!==Fe.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._frameNumber=t.frameNumber,this.viewportIds=e}visibility(t,e){const{cullingVolume:r}=t,{boundingVolume:n}=this;return r.computeVisibilityWithPlaneMask(n,e)}contentVisibility(){return!0}distanceToTile(t){const e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}cameraSpaceZDepth({camera:t}){const e=this.boundingVolume;return Ar.subVectors(e.center,t.position),t.direction.dot(Ar)}insideViewerRequestVolume(t){const e=this._viewerRequestVolume;return!e||e.distanceSquaredTo(t.camera.position)<=0}updateExpiration(){if(null!=this._expireDate&&this.contentReady&&!this.hasEmptyContent){const t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=Xe,this._expiredContent=this.content)}}get extras(){return this.header.extras}_initializeLodMetric(t){"lodMetricType"in t?this.lodMetricType=t.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in t?this.lodMetricValue=t.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}_initializeTransforms(t){this.transform=t.transform?new J(t.transform):new J;const e=this.parent,r=this.tileset,n=e&&e.computedTransform?e.computedTransform.clone():r.modelMatrix.clone();this.computedTransform=new J(n).multiplyRight(this.transform);const i=e&&e._initialTransform?e._initialTransform.clone():new J;this._initialTransform=new J(i).multiplyRight(this.transform)}_initializeBoundingVolumes(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}_initializeContent(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Ze,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}_initializeRenderingState(t){this.depth=t.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=Fe.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}_getRefine(t){return t||this.parent&&this.parent.refine||Je}_isTileset(){return-1!==this.contentUrl.indexOf(".json")}_onContentLoaded(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()&&(this.hasTilesetContent=!0)}_updateBoundingVolume(t){this.boundingVolume=fr(t.boundingVolume,this.computedTransform,this.boundingVolume);const e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=fr(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=fr(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}_updateTransform(t=new J){const e=t.clone().multiplyRight(this.transform);!e.equals(this.computedTransform)&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}_getLoaderSpecificOptions(t){switch(t){case"i3s":return{...this.tileset.options.i3s,tile:this.header,tileset:this.tileset.tileset,isTileHeader:!1};case"3d-tiles":case"cesium-ion":default:return{assetGltfUpAxis:(e=this.tileset.tileset).asset&&e.asset.gltfUpAxis||"Y"}}var e}}class Rr extends Er{compareDistanceToCamera(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}updateTileVisibility(t,e){if(super.updateTileVisibility(t,e),!t.isVisibleAndInRequestVolume)return;const r=t.children.length>0;if(t.hasTilesetContent&&r){const r=t.children[0];return this.updateTileVisibility(r,e),void(t._visible=r._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))return void(t._visible=!1);const n=t.refine===Je,i=t._optimChildrenWithinParent===ar;n&&i&&r&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}meetsScreenSpaceErrorEarly(t,e){const{parent:r}=t;return!(!r||r.hasTilesetContent||r.refine!==$e)&&!this.shouldRefine(t,e,!0)}}const Or="REQUESTED",xr="COMPLETED",kr="ERROR";class Ir{constructor(){var t,e,r;r=void 0,(e="_statusMap")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,this._statusMap={}}add(t,e,r,n){this._statusMap[e]||(this._statusMap[e]={request:t,callback:r,key:e,frameState:n,status:Or},t().then(t=>{this._statusMap[e].status=xr,this._statusMap[e].callback(t,n)}).catch(t=>{this._statusMap[e].status=kr,r(t)}))}update(t,e){this._statusMap[t]&&(this._statusMap[t].frameState=e)}find(t){return this._statusMap[t]}}class Cr extends Er{constructor(t){var e,r,n;super(t),n=void 0,(r="_tileManager")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this._tileManager=new Ir}shouldRefine(t,e){return t._lodJudge=function(t,e){const r=e.viewport,n=r.metersPerPixel,i=t.header.mbs[1],o=t.header.mbs[0],s=t.header.mbs[2],a=t.header.mbs[3],{height:u,width:c,latitude:l,longitude:h}=r,f=[h,l],d=[o,i,s],p=[h,i],g=[o,l],_=Math.sqrt(u*u+c*c)*n[0],m=.5*u+a/6378137,y=.5*c+a/6378137;if(mr(f,d)>_+a/6378137)return"OUT";if(mr(f,p)>m)return"OUT";if(mr(f,g)>y)return"OUT";if(0===t.lodMetricValue)return"DIG";let b=yr(t,e);return b*=gr,b<.5?"OUT":!t.header.children||b<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}updateChildTiles(t,e){const r=t.header.children||[],n=t.children,i=t.tileset;for(const o of r){const r=`${o.id}-${e.viewport.id}`,s=n&&n.find(t=>t.id===r);if(s)s&&this.updateTile(s,e);else{let n=()=>this._loadTile(o.id,i);this._tileManager.find(r)?this._tileManager.update(r,e):(i.tileset.nodePages&&(n=()=>i.tileset.nodePagesTile.formTileFromNodePages(o.id)),this._tileManager.add(n,r,e=>this._onTileLoad(e,t,r),e))}}return!1}async _loadTile(t,e){const{loader:r}=e,n=e.getTileUrl(`${e.url}/nodes/${t}`),i={...e.loadOptions,i3s:{...e.loadOptions.i3s,isTileHeader:!0,loadContent:!1}};return await Object(a.a)(n,r,i)}_onTileLoad(t,e,r){const n=new Tr(e.tileset,t,e,r);e.children.push(n);const i=this._tileManager.find(n.id).frameState;this.updateTile(n,i),this._frameNumber===i.frameNumber&&this.executeTraversal(n,i)}}function Mr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Dr={description:"",ellipsoid:kt.WGS84,modelMatrix:new J,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{},onTraversalComplete:t=>t,contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}};class Pr{constructor(t,e){Mr(this,"options",void 0),Mr(this,"loadOptions",void 0),Mr(this,"type",void 0),Mr(this,"tileset",void 0),Mr(this,"loader",void 0),Mr(this,"url",void 0),Mr(this,"basePath",void 0),Mr(this,"modelMatrix",void 0),Mr(this,"ellipsoid",void 0),Mr(this,"lodMetricType",void 0),Mr(this,"lodMetricValue",void 0),Mr(this,"refine",void 0),Mr(this,"root",void 0),Mr(this,"roots",void 0),Mr(this,"asset",void 0),Mr(this,"description",void 0),Mr(this,"properties",void 0),Mr(this,"extras",void 0),Mr(this,"attributions",void 0),Mr(this,"credits",void 0),Mr(this,"stats",void 0),Mr(this,"traverseCounter",void 0),Mr(this,"geometricError",void 0),Mr(this,"selectedTiles",void 0),Mr(this,"cartographicCenter",void 0),Mr(this,"cartesianCenter",void 0),Mr(this,"zoom",void 0),Mr(this,"boundingVolume",void 0),Mr(this,"gpuMemoryUsageInBytes",void 0),Mr(this,"dynamicScreenSpaceErrorComputedDensity",void 0),Mr(this,"_traverser",void 0),Mr(this,"_cache",void 0),Mr(this,"_requestScheduler",void 0),Mr(this,"_frameNumber",void 0),Mr(this,"_queryParamsString",void 0),Mr(this,"_queryParams",void 0),Mr(this,"_extensionsUsed",void 0),Mr(this,"_tiles",void 0),Mr(this,"_pendingCount",void 0),Mr(this,"lastUpdatedVieports",void 0),Mr(this,"_requestedTiles",void 0),Mr(this,"_emptyTiles",void 0),Mr(this,"frameStateData",void 0),Mr(this,"maximumMemoryUsage",void 0),Object(Ct.a)(t),this.options={...Dr,...e},this.tileset=t,this.loader=t.loader,this.type=t.type,this.url=t.url,this.basePath=t.basePath||Mt.b.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=t.lodMetricType,this.lodMetricValue=t.lodMetricValue,this.refine=t.root.refine,this.loadOptions=this.options.loadOptions||{},this.root=null,this.roots={},this.cartographicCenter=null,this.cartesianCenter=null,this.zoom=1,this.boundingVolume=null,this.traverseCounter=0,this.geometricError=0,this._traverser=this._initializeTraverser(),this._cache=new jt,this._requestScheduler=new Dt.a({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this._frameNumber=0,this._pendingCount=0,this._tiles={},this.selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this.frameStateData={},this.lastUpdatedVieports=null,this._queryParams={},this._queryParamsString="",this.maximumMemoryUsage=this.options.maximumMemoryUsage||32,this.gpuMemoryUsageInBytes=0,this.stats=new It.a({id:this.url}),this._initializeStats(),this._extensionsUsed=void 0,this.dynamicScreenSpaceErrorComputedDensity=0,this.extras=null,this.asset={},this.credits={},this.description=this.options.description||"",this._initializeTileSet(t)}destroy(){this._destroy()}isLoaded(){return 0===this._pendingCount&&0!==this._frameNumber}get tiles(){return Object.values(this._tiles)}get frameNumber(){return this._frameNumber}get queryParams(){return this._queryParamsString||(this._queryParamsString=function(t){const e=[];for(const r of Object.keys(t))e.push(`${r}=${t[r]}`);switch(e.length){case 0:return"";case 1:return"?"+e[0];default:return"?"+e.join("&")}}(this._queryParams)),this._queryParamsString}setProps(t){this.options={...this.options,...t}}setOptions(t){this.options={...this.options,...t}}getTileUrl(t){return t.startsWith("data:")?t:`${t}${this.queryParams}`}hasExtension(t){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(t)>-1)}update(t){if("loadTiles"in this.options&&!this.options.loadTiles)return;if(this.traverseCounter>0)return;!t&&this.lastUpdatedVieports?t=this.lastUpdatedVieports:this.lastUpdatedVieports=t,t instanceof Array||(t=[t]),this._cache.reset(),this._frameNumber++,this.traverseCounter=t.length;const e=[];for(const r of t){const t=r.id;this._needTraverse(t)?e.push(t):this.traverseCounter--}for(const r of t){const t=r.id;if(this.roots[t]||(this.roots[t]=this._initializeTileHeaders(this.tileset,null)),!e.includes(t))continue;const n=We(r,this._frameNumber);this._traverser.traverse(this.roots[t],n,this.options)}}_needTraverse(t){let e=t;return this.options.viewportTraversersMap&&(e=this.options.viewportTraversersMap[t]),e===t}_onTraversalEnd(t){const e=t.viewport.id;this.frameStateData[e]||(this.frameStateData[e]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});const r=this.frameStateData[e],n=Object.values(this._traverser.selectedTiles);r.selectedTiles=n,r._requestedTiles=Object.values(this._traverser.requestedTiles),r._emptyTiles=Object.values(this._traverser.emptyTiles),this.traverseCounter--,this.traverseCounter>0||this._updateTiles()}_updateTiles(){this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[];for(const t in this.frameStateData){const e=this.frameStateData[t];this.selectedTiles=this.selectedTiles.concat(e.selectedTiles),this._requestedTiles=this._requestedTiles.concat(e._requestedTiles),this._emptyTiles=this._emptyTiles.concat(e._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);for(const t of this.selectedTiles)this._tiles[t.id]=t;this._loadTiles(),this._unloadTiles(),this._updateStats()}_tilesChanged(t,e){if(t.length!==e.length)return!0;const r=new Set(t.map(t=>t.id)),n=new Set(e.map(t=>t.id));let i=t.filter(t=>!n.has(t.id)).length>0;return i=i||e.filter(t=>!r.has(t.id)).length>0,i}_loadTiles(){for(const t of this._requestedTiles)t.contentUnloaded&&this._loadTile(t)}_unloadTiles(){this._cache.unloadTiles(this,(t,e)=>t._unloadTile(e))}_updateStats(){let t=0,e=0;for(const r of this.selectedTiles)r.contentAvailable&&r.content&&(t++,r.content.pointCount&&(e+=r.content.pointCount));this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=t,this.stats.get("Points").count=e}_initializeTileSet(t){this.root=this._initializeTileHeaders(t,null),this.type===or&&this._initializeCesiumTileset(t),this.type===ir&&this._initializeI3STileset(),this._calculateViewProps()}_calculateViewProps(){const t=this.root;Object(Ct.a)(t);const{center:e}=t.boundingVolume;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new nt,void(this.zoom=1);this.cartographicCenter=kt.WGS84.cartesianToCartographic(e,new nt),this.cartesianCenter=e,this.zoom=Ve(t.boundingVolume)}_initializeStats(){this.stats.get("Tiles In Tileset(s)"),this.stats.get("Tiles Loading"),this.stats.get("Tiles In Memory"),this.stats.get("Tiles In View"),this.stats.get("Tiles To Render"),this.stats.get("Tiles Loaded"),this.stats.get("Tiles Unloaded"),this.stats.get("Failed Tile Loads"),this.stats.get("Points","memory"),this.stats.get("Tile Memory Use","memory")}_initializeTileHeaders(t,e){const r=new Tr(this,t.root,e);if(e&&(e.children.push(r),r.depth=e.depth+1),this.type===or){const t=[];for(t.push(r);t.length>0;){const e=t.pop();this.stats.get("Tiles In Tileset(s)").incrementCount();const r=e.header.children||[];for(const n of r){const r=new Tr(this,n,e);e.children.push(r),r.depth=e.depth+1,t.push(r)}}}return r}_initializeTraverser(){let t;switch(this.type){case or:t=Rr;break;case ir:t=Cr;break;default:t=Er}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}_destroyTileHeaders(t){this._destroySubtree(t)}async _loadTile(t){let e;try{this._onStartTileLoading(),e=await t.loadContent()}catch(e){this._onTileLoadError(t,e)}finally{this._onEndTileLoading(),this._onTileLoad(t,e)}}_onTileLoadError(t,e){this.stats.get("Failed Tile Loads").incrementCount();const r=e.message||e.toString(),n=t.url;console.error(`A 3D tile failed to load: ${t.url} ${r}`),this.options.onTileError(t,r,n)}_onTileLoad(t,e){e&&(t&&t.content&&function(t,e){Object(Ct.a)(t),Object(Ct.a)(e);const{rtcCenter:r,gltfUpAxis:n}=e,{computedTransform:i,boundingVolume:{center:o}}=t;let s=new J(i);switch(r&&s.translate(r),n){case"Z":break;case"Y":const t=(new J).rotateX(Math.PI/2);s=s.multiplyRight(t);break;case"X":const e=(new J).rotateY(-Math.PI/2);s=s.multiplyRight(e)}e.isQuantized&&s.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);const a=new nt(o);e.cartesianModelMatrix=s,e.cartesianOrigin=a;const u=kt.WGS84.cartesianToCartographic(a,new nt),c=kt.WGS84.eastNorthUpToFixedFrame(a).invert();e.cartographicModelMatrix=c.multiplyRight(s),e.cartographicOrigin=u,e.modelMatrix=e.cartographicModelMatrix}(t,t.content),this._addTileToCache(t),this.options.onTileLoad(t))}_onStartTileLoading(){this._pendingCount++,this.stats.get("Tiles Loading").incrementCount()}_onEndTileLoading(){this._pendingCount--,this.stats.get("Tiles Loading").decrementCount()}_addTileToCache(t){this._cache.add(this,t,e=>e._updateCacheStats(t))}_updateCacheStats(t){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=t.content.byteLength||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}_unloadTile(t){this.gpuMemoryUsageInBytes-=t.content&&t.content.byteLength||0,this.stats.get("Tiles In Memory").decrementCount(),this.stats.get("Tiles Unloaded").incrementCount(),this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(t),t.unloadContent()}_destroy(){const t=[];for(this.root&&t.push(this.root);t.length>0;){const e=t.pop();for(const r of e.children)t.push(r);this._destroyTile(e)}this.root=null}_destroySubtree(t){const e=t,r=[];for(r.push(e);r.length>0;){t=r.pop();for(const e of t.children)r.push(e);t!==e&&this._destroyTile(t)}e.children=[]}_destroyTile(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}_initializeCesiumTileset(t){if(this.asset=t.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed,this.extras=t.extras}_initializeI3STileset(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}const Lr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},Br=(Object.keys(Lr),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function Nr(t,e,r){Object(Ct.a)(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),i=new Uint8Array(t,e,r);return n.decode(i)}const jr={name:"Draco",id:"draco",module:"draco",version:"3.0.13",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Fr{constructor(t,e){Ur(this,"fields",void 0),Ur(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new Fr(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new Fr(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof Fr){const n=t;e=n.fields,r=zr(zr(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new Fr(i,r)}}function zr(t,e){return new Map([...t||new Map,...e||new Map])}let Gr,Hr,Wr,qr,Vr,Zr,Qr,Kr;function Xr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(Gr||(Gr={}));class Yr{static isNull(t){return t&&t.typeId===Gr.Null}static isInt(t){return t&&t.typeId===Gr.Int}static isFloat(t){return t&&t.typeId===Gr.Float}static isBinary(t){return t&&t.typeId===Gr.Binary}static isUtf8(t){return t&&t.typeId===Gr.Utf8}static isBool(t){return t&&t.typeId===Gr.Bool}static isDecimal(t){return t&&t.typeId===Gr.Decimal}static isDate(t){return t&&t.typeId===Gr.Date}static isTime(t){return t&&t.typeId===Gr.Time}static isTimestamp(t){return t&&t.typeId===Gr.Timestamp}static isInterval(t){return t&&t.typeId===Gr.Interval}static isList(t){return t&&t.typeId===Gr.List}static isStruct(t){return t&&t.typeId===Gr.Struct}static isUnion(t){return t&&t.typeId===Gr.Union}static isFixedSizeBinary(t){return t&&t.typeId===Gr.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===Gr.FixedSizeList}static isMap(t){return t&&t.typeId===Gr.Map}static isDictionary(t){return t&&t.typeId===Gr.Dictionary}get typeId(){return Gr.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;Hr=Symbol.toStringTag;class $r extends Yr{constructor(t,e){super(),Xr(this,"isSigned",void 0),Xr(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return Gr.Int}get[Hr](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class Jr extends $r{constructor(){super(!0,8)}}class tn extends $r{constructor(){super(!0,16)}}class en extends $r{constructor(){super(!0,32)}}class rn extends $r{constructor(){super(!1,8)}}class nn extends $r{constructor(){super(!1,16)}}class on extends $r{constructor(){super(!1,32)}}const sn=32,an=64;Wr=Symbol.toStringTag;class un extends Yr{constructor(t){super(),Xr(this,"precision",void 0),this.precision=t}get typeId(){return Gr.Float}get[Wr](){return"Float"}toString(){return"Float"+this.precision}}class cn extends un{constructor(){super(sn)}}class ln extends un{constructor(){super(an)}}Symbol.toStringTag;Symbol.toStringTag;qr=Symbol.toStringTag;Vr=Symbol.toStringTag;Zr=Symbol.toStringTag;Qr=Symbol.toStringTag;Kr=Symbol.toStringTag;class hn extends Yr{constructor(t,e){super(),Xr(this,"listSize",void 0),Xr(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return Gr.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Kr](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}function fn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class dn{constructor(t,e,r=!1,n=new Map){fn(this,"name",void 0),fn(this,"type",void 0),fn(this,"nullable",void 0),fn(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new dn(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}function pn(t,e,r){const n=r?gn(r.metadata):void 0,i=function(t){switch(t.constructor){case Int8Array:return new Jr;case Uint8Array:return new rn;case Int16Array:return new tn;case Uint16Array:return new nn;case Int32Array:return new en;case Uint32Array:return new on;case Float32Array:return new cn;case Float64Array:return new ln;default:throw new Error("array type not supported")}}(e.value);return new dn(t,new hn(e.size,new dn("value",i)),!1,n)}function gn(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function _n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const mn={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},yn={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class bn{constructor(t){_n(this,"draco",void 0),_n(this,"decoder",void 0),_n(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),i=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const o=this._getDracoLoaderData(i,n,e),s=this._getMeshData(i,o,e),a=function(t){let e=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,s=-1/0;const a=t.POSITION?t.POSITION.value:[],u=a&&a.length;for(let t=0;t<u;t+=3){const u=a[t],c=a[t+1],l=a[t+2];e=u<e?u:e,r=c<r?c:r,n=l<n?l:n,i=u>i?u:i,o=c>o?c:o,s=l>s?l:s}return[[e,r,n],[i,o,s]]}(s.attributes),u=function(t,e,r){const n=gn(e.metadata),i=[],o=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=pn(e,t[e],o[e]);i.push(r)}if(r){const t=pn("indices",r);i.push(t)}return new Fr(i,n)}(s.attributes,o,s.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:a},...s,schema:u}}finally{this.draco.destroy(r),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:i}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const i=this.decoder.GetAttribute(t,n),o=this._getAttributeMetadata(t,n);r[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:n,metadata:o};const s=this._getQuantizationTransform(i,e);s&&(r[i.unique_id()].quantization_transform=s);const a=this._getOctahedronTransform(i,e);a&&(r[i.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,r);i.name=t;const{value:o,size:s}=this._getAttributeValues(e,i);n[t]={value:o,size:s,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=yn[e.data_type],n=e.num_components,i=t.num_points()*n,o=i*r.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const u=this.draco._malloc(o);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,s,o,u),a=new r(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in mn){if(this.draco[t]===n)return mn[t]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var wn=r(16),vn=r(49),En=r(13);const Sn={};async function An(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!wn.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return Object(En.a)(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.0.13/dist/libs/${t}`;if(wn.d)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),Sn[t]=Sn[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!wn.b)return vn.requireFromFile&&await vn.requireFromFile(t);if(wn.d)return importScripts(t);const e=await fetch(t);return function(t,e){if(!wn.b)return vn.requireFromString&&vn.requireFromString(t,e);if(wn.d)return eval.call(wn.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await Sn[t]}let Tn,Rn;async function On(t){const e=t.modules||{};return Tn=e.draco3d?Tn||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):Tn||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await Tn}async function xn(t){const e=t.modules||{};return Rn=e.draco3d?Rn||e.draco3d.createEncoderModule({}).then(t=>({draco:t})):Rn||async function(t){let e=await An("https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js","draco",t);return e=e||globalThis.DracoEncoderModule,new Promise(t=>{e({onModuleLoaded:e=>t({draco:e})})})}(t),await Rn}const kn={...jr,parse:async function(t,e){const{draco:r}=await On(e),n=new bn(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const In={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Cn={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...In},Mn={[In.DOUBLE]:Float64Array,[In.FLOAT]:Float32Array,[In.UNSIGNED_SHORT]:Uint16Array,[In.UNSIGNED_INT]:Uint32Array,[In.UNSIGNED_BYTE]:Uint8Array,[In.BYTE]:Int8Array,[In.SHORT]:Int16Array,[In.INT]:Int32Array},Dn={DOUBLE:In.DOUBLE,FLOAT:In.FLOAT,UNSIGNED_SHORT:In.UNSIGNED_SHORT,UNSIGNED_INT:In.UNSIGNED_INT,UNSIGNED_BYTE:In.UNSIGNED_BYTE,BYTE:In.BYTE,SHORT:In.SHORT,INT:In.INT};class Pn{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in Mn){if(Mn[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=Dn[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case In.UNSIGNED_SHORT_5_6_5:case In.UNSIGNED_SHORT_4_4_4_4:case In.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=Mn[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return Pn.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(Pn.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/Pn.getByteSize(t));return new(Pn.getArrayType(t))(e,r,n)}}class Ln{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=Cn.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=Pn.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,i){const o=this.json[t];if(!o)return o;const s=this.getPropertyArray(t,e,r);if(1===r)return s[n];for(let t=0;t<r;++t)i[t]=s[r*n+t];return i}_getTypedArrayFromBinary(t,e,r,n,i){const o=this._cachedTypedArrays;let s=o[t];return s||(s=Pn.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+i,n*r),o[t]=s),s}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let i=n[t];return i||(i=Pn.createTypedArray(e,r),n[t]=i),i}}const Bn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Nn={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},jn={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Un=t=>void 0!==t;function Fn(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const i=e.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=i,n=i),n?function(t,e){let r,n,i;const o=t.instancesLength,s=t.classes;let a,u=t.classIds,c=t.parentCounts,l=t.parentIds,h=o;Un(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,o));if(Un(c))for(Un(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,i=getBinaryAccessor(c),c=i.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,o)),a=new Uint16Array(o),h=0,r=0;r<o;++r)a[r]=h,h+=c[r];Un(l)&&Un(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(e.buffer,e.byteOffset+l.byteOffset,h));const f=s.length;for(r=0;r<f;++r){const t=s[r].length,n=s[r].instances,i=getBinaryProperties(t,n,e);s[r].instances=combine(i,n)}const d=new Array(f).fill(0),p=new Uint16Array(o);for(r=0;r<o;++r)n=u[r],p[r]=d[n],++d[n];const g={classes:s,classIds:u,classIndexes:p,parentCounts:c,parentIndexes:a,parentIds:l};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)Gn(t,r,stack)}(g),g}(n,r):null}function zn(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,i=t.parentCounts,o=t.parentIds,s=t.parentIndexes,a=n.length,u=scratchVisited;u.length=Math.max(u.length,a);const c=++marker,l=scratchStack;l.length=0,l.push(e);for(;l.length>0;){if(e=l.pop(),u[e]===c)continue;u[e]=c;const n=r(t,e);if(Un(n))return n;const a=i[e],h=s[e];for(let t=0;t<a;++t){const r=o[h+t];r!==e&&l.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const i=r(t,e);if(Un(i))return i;const o=t.parentIds[e];n=o!==e,e=o}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function Gn(t,e,r){const n=t.parentCounts,i=t.parentIds,o=t.parentIndexes,s=t.classIds.length;if(!Un(i))return;assert(e<s,`Parent index ${e} exceeds the total number of instances: ${s}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Un(n)?n[e]:1,u=Un(n)?o[e]:e;for(let n=0;n<a;++n){const o=i[u+n];o!==e&&Gn(t,o,r)}r.pop(e)}function Hn(t){return null!=t}const Wn=(t,e)=>t,qn={HIERARCHY:!0,extensions:!0,extras:!0};class Vn{constructor(t,e,r,n={}){var i;Object(Ct.a)(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(i=this.json)||void 0===i?void 0:i.extensions)||{},this._properties={};for(const t in this.json)qn[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Fn(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._hierarchy){return Hn(zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return Object(Ct.a)("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),Hn(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=Hn(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(Hn(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(Hn(r))return Wn(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(Hn(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let i=this._properties[e];Hn(i)||(this._properties[e]=new Array(n),i=this._properties[e]),i[t]=Wn(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;Object(Ct.a)(this.binary,`Property ${t} requires a batch table binary.`),Object(Ct.a)(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:i}=t;Object(Ct.a)(t.componentType);const o="string"==typeof i?Pn.fromName(i):i,s=Bn[t.type],a=Nn[t.type],u=jn[t.type];return r+=t.byteOffset,{values:Pn.createTypedArray(o,e,r,s*n),type:o,size:s,unpacker:a,packer:u}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return Hn(t.classes[n].instances[e])});return Hn(r)}_getPropertyNamesInHierarchy(t,e){zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n].instances;for(const t in i)i.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n],o=t.classIndexes[r],s=i.instances[e];return Hn(s)?Hn(s.typedArray)?this._getBinaryProperty(s,o):Wn(s[o]):null})}_setHierarchyProperty(t,e,r,n){const i=zn(this._hierarchy,e,(t,i)=>{const o=t.classIds[i],s=t.classes[o],a=t.classIndexes[i],u=s.instances[r];return!!Hn(u)&&(Object(Ct.a)(i===e,`Inherited property "${r}" is read-only.`),Hn(u.typedArray)?this._setBinaryProperty(u,a,n):u[a]=Wn(n),!0)});return Hn(i)}}function Zn(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Qn(t,e,r){const n=new DataView(e);let i;t.header=t.header||{};let o=n.getUint32(r,!0);r+=4;let s=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let u=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,i=o,a=s,u=0,o=0,s=0,console.warn("b3dm tile in legacy format.")):u>=570425344&&(r-=4,i=a,a=o,u=s,o=0,s=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=o,t.header.featureTableBinaryByteLength=s,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=u,t.header.batchLength=i,r}function Kn(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:i,featureTableBinaryByteLength:o,batchLength:s}=t.header;if(t.featureTableJson={BATCH_LENGTH:s||0},i>0){const n=Nr(e,r,i);t.featureTableJson=JSON.parse(n)}return r+=i,t.featureTableBinary=new Uint8Array(e,r,o),r+=o}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:i,batchTableBinaryByteLength:o}=t.header;if(i>0){const n=Nr(e,r,i);t.batchTableJson=JSON.parse(n),r+=i,o>0&&(t.batchTableBinary=new Uint8Array(e,r,o),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=o)}return r}(t,e,r)}function Xn(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,i=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=i<<3,e}function Yn(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:i,pointCount:o}=t;if(n&&r){const t=new Uint8ClampedArray(3*o);for(let e=0;e<o;e++){const i=n[e],o=r.getProperty(i,"dimensions").map(t=>255*t);t[3*e]=o[0],t[3*e+1]=o[1],t[3*e+2]=o[2]}return{type:Cn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(i){const t=new Uint8ClampedArray(3*o);for(let r=0;r<o;r++){const n=Xn(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:Cn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*o?{type:Cn.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:Cn.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}class $n extends tt{constructor(t=0,e=0){super(2),d(t)&&1===arguments.length?this.copy(t):(h.debug&&(w(t),w(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return L(this,this,t),this.check()}transformAsVector(t){return R(this,this,t),this.check()}transformByMatrix3(t){return P(this,this,t),this.check()}transformByMatrix2x3(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i}(this,this,t),this.check()}}function Jn(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new $n,new nt,new $n,new $n,new Uint8Array(1);function ti(t,e=255){return y(t,0,e)/e*2-1}function ei(t){return t<0?-1:1}function ri(t,e,r,n){if(Jn(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=ti(t,r),n.y=ti(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*ei(t),n.y=(1-Math.abs(t))*ei(n.y)}return n.normalize()}function ni(t,e,r){return ri(t,e,255,r)}const ii=new nt;function oi(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new nt,n=new Float32Array(3*t.pointCount);for(let i=0;i<t.pointCount;i++)r.set(e[3*i],e[3*i+1],e[3*i+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*i);return n}(t,e)):{type:Cn.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function si(t,e,r,n,i){r=Kn(t,e,r=Qn(t,e,r=Zn(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:o,batchTable:s}=function(t){const e=new Ln(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",Cn.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:i,batchTableBinary:o}=t;r=new Vn(i,o,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,i){let o,s,a;const u=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(a=u.properties);const c=e.getExtension("3DTILES_draco_point_compression");if(c){s=c.properties;const e=c.byteOffset,r=c.byteLength;if(!s||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");o=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(s.POSITION),t.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),t.hasNormals=Number.isFinite(s.NORMAL),t.hasBatchIds=Number.isFinite(s.BATCH_ID),t.isTranslucent=Number.isFinite(s.RGBA)}if(!o)return!0;const l={buffer:o,properties:{...s,...a},featureTableProperties:s,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:i}=n,o={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete o["3d-tiles"];const s=await i(e.buffer,kn,o),a=s.attributes.POSITION&&s.attributes.POSITION.value,u=s.attributes.COLOR_0&&s.attributes.COLOR_0.value,c=s.attributes.NORMAL&&s.attributes.NORMAL.value,l=s.attributes.BATCH_ID&&s.attributes.BATCH_ID.value,h=a&&s.attributes.POSITION.value.quantization,f=c&&s.attributes.NORMAL.value.quantization;if(h){const e=s.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new nt(r,r,r),t.quantizedVolumeOffset=new nt(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}f&&(t.octEncodedRange=(1<<s.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const d={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))s.attributes[t]&&s.attributes[t].value&&(d[t.toLowerCase()]=s.attributes[t].value);t.attributes={positions:a,colors:Yn(t,u),normals:c,batchIds:l,...d}}(t,l,n,i)}(t,o,0,n,i),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",Cn.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",Cn.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Cn.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Cn.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=oi(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,o,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",Cn.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",Cn.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",Cn.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Yn(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",Cn.UNSIGNED_BYTE,4))}(t,o,s),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",Cn.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",Cn.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)ni(e[2*n],e[2*n+1],ii),ii.toArray(r,3*n);return{type:Cn.FLOAT,size:2,value:r}}return{type:Cn.FLOAT,size:2,value:e}}(t,r)}}(t,o),r}function ai(t,e){if(!t)throw new Error(e)}var ui=r(28);const{_parseImageNode:ci}=ui.a,li="undefined"!=typeof Image,hi="undefined"!=typeof ImageBitmap,fi=Boolean(ci),di=!!ui.b||fi;function pi(t){const e=_i(t);if(!e)throw new Error("Not an image");return e}function gi(t){switch(pi(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function _i(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const mi=/^data:image\/svg\+xml/,yi=/\.svg((\?|#).*)?$/;function bi(t){return t&&(mi.test(t)||yi.test(t))}function wi(t,e){if(bi(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function vi(t,e,r){const n=function(t,e){if(bi(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return wi(t,e)}(t,r),i=self.URL||self.webkitURL,o="string"!=typeof n&&i.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(o||n,e)}finally{o&&i.revokeObjectURL(o)}}const Ei={};let Si=!0;async function Ai(t,e,r){let n;if(bi(r)){n=await vi(t,e,r)}else n=wi(t,r);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||Ei)return!1;return!0}(e)&&Si||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),Si=!1}return await createImageBitmap(t)}(n,i)}function Ti(t){const e=Ri(t);return function(t){const e=Ri(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let i=2;for(;i+9<e.byteLength;){const t=e.getUint16(i,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!r.has(t))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Ri(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const Oi={id:"image",module:"images",name:"Images",version:"3.0.13",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:i}=r||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(hi)return"imagebitmap";if(li)return"image";if(di)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return hi||li||di;case"imagebitmap":return hi;case"image":return li;case"data":return di;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":o=await Ai(t,e,i);break;case"image":o=await vi(t,e,i);break;case"data":o=await function(t,e){const{mimeType:r}=Ti(t)||{},{_parseImageNode:n}=ui.a;return ai(n),n(t,r,e)}(t,e);break;default:ai(!1)}return"data"===n&&(o=gi(o)),o},tests:[t=>Boolean(Ti(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};var xi=r(144),ki=r(20);function Ii(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Ci(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function Mi(t,e,r){const n=t.bufferViews[r];Ii(n);const i=e[n.buffer];Ii(i);const o=(n.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,n.byteLength)}var Di=r(41);const Pi=["SCALAR","VEC2","VEC3","VEC4"],Li=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Bi=new Map(Li),Ni={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ji={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ui={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Fi(t){return Pi[t-1]||Pi[0]}function zi(t){const e=Bi.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function Gi(t,e){const r=Ui[t.componentType],n=Ni[t.type],i=ji[t.componentType],o=t.count*n,s=t.count*n*i;return Ii(s>=0&&s<=e.byteLength),{ArrayType:r,length:o,byteLength:s}}function Hi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Wi={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class qi{constructor(t){Hi(this,"gltf",void 0),Hi(this,"sourceBuffers",void 0),Hi(this,"byteLength",void 0),this.gltf=t||{json:{...Wi},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];Ii(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:i}=Gi(t,e);return new n(r,e.byteOffset+t.byteOffset,i)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return Ii(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return Ii(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:i=4}=t,o={primitives:[{attributes:this._addAttributes(e),mode:i}]};if(r){const t=this._addIndices(r);o.primitives[0].indices=t}return Number.isFinite(n)&&(o.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=Ti(t),n=e||(null==r?void 0:r.mimeType),i={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(t){const e=t.byteLength;Ii(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Object(Di.b)(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:Fi(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const i={size:e.size,componentType:zi(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(i,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),i=new Uint8Array(n);let o=0;for(const t of this.sourceBuffers||[])o=Object(Di.a)(t,i,o);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],i=this._getGltfAttributeName(r),o=this.addBinaryBuffer(n.value,n);e[i]=o}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let i=0;i<e;i++)r.min[0+i]=Math.min(r.min[0+i],t[n+i]),r.max[0+i]=Math.max(r.max[0+i],t[n+i]);return r}}function Vi(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:Fi(r),componentType:zi(e)}}async function Zi(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const i=new qi(t),o=[];for(const t of function*(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}(i))i.getObjectExtension(t,"KHR_draco_mesh_compression")&&o.push(Ki(i,t,e,r));await Promise.all(o),i.removeExtension("KHR_draco_mesh_compression")}function Qi(t,e={}){const r=new qi(t);for(const t of r.json.meshes||[])Xi(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function Ki(t,e,r,n){const i=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!i)return;const o=t.getTypedArrayForBufferView(i.bufferView),s=Object(ki.d)(o.buffer,o.byteOffset),{parse:a}=n,u={...r};delete u["3d-tiles"];const c=await a(s,kn,u,n),l=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=Vi(n);e[r]=t}}return e}(c.attributes);for(const[r,n]of Object.entries(l))if(r in e.attributes){const i=e.attributes[r],o=t.getAccessor(i);null!=o&&o.min&&null!=o&&o.max&&(n.min=o.min,n.max=o.max)}e.attributes=l,c.indices&&(e.indices=Vi(c.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Xi(t,e,r=4,n,i){var o;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const s=n.DracoWriter.encodeSync({attributes:t}),a=null==i||null===(o=i.parseSync)||void 0===o?void 0:o.call(i,{attributes:t}),u=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:u,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(s),attributes:u}}}]}}async function Yi(t){const e=new qi(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function $i(t){const e=new qi(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}async function Ji(t){const e=new qi(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function to(t){const e=new qi(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");Ii(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}async function eo(t){const e=new qi(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:i=[]}=t,o=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=o.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),i.forEach(t=>{t.program=r[t.program]}),i}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=no(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function ro(t,e){}function no(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const io={KHR_draco_mesh_compression:n,KHR_materials_unlit:i,KHR_lights_punctual:o,KHR_techniques_webgl:s};const oo={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},so={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class ao{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new qi(t),{json:r}=e;for(const t of r.images||[]){const r=e.removeObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in oo)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const i=r[n];i.id=i.id||n;const o=t[e].length;t[e].push(i),this.idToIndexMap[e][n]=o}}}_convertObjectIdsToArrayIndices(t){for(const e in oo)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=so[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const uo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},co={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},lo={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},ho={magFilter:lo.TEXTURE_MAG_FILTER,minFilter:lo.TEXTURE_MIN_FILTER,wrapS:lo.TEXTURE_WRAP_S,wrapT:lo.TEXTURE_WRAP_T},fo={[lo.TEXTURE_MAG_FILTER]:lo.LINEAR,[lo.TEXTURE_MIN_FILTER]:lo.NEAREST_MIPMAP_LINEAR,[lo.TEXTURE_WRAP_S]:lo.REPEAT,[lo.TEXTURE_WRAP_]:lo.REPEAT};class po{postProcess(t,e={}){const{json:r,buffers:n=[],images:i=[],baseUri:o=""}=t;return Ii(r),this.baseUri=o,this.json=r,this.buffers=n,this.images=i,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,co[r]),t.components=(n=t.type,uo[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=Gi(t,t.bufferView),i=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,o=e.arrayBuffer.slice(i,i+n);t.value=new r(o)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):fo,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return ho[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let i=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(i+=t.byteOffset),t.data=new Uint8Array(n,i,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const go=1735152710;function _o(t,e=0,r={}){const n=new DataView(t),{magic:i=go}=r,o=n.getUint32(e,!1);return o===i||o===go}function mo(t,e,r=0,n={}){const i=new DataView(e),o=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(i,r+0),s=i.getUint32(r+4,!0),a=i.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){Object(Ct.a)(t.header.byteLength>20);const n=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);return r+=8,Object(Ct.a)(0===i),yo(t,e,r,n),r+=n,r+=bo(t,e,r,t.header.byteLength)}(t,i,r);case 2:return function(t,e,r,n){return Object(Ct.a)(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const i=e.getUint32(r+0,!0),o=e.getUint32(r+4,!0);switch(r+=8,o){case 1313821514:yo(t,e,r,i);break;case 5130562:bo(t,e,r,i);break;case 0:n.strict||yo(t,e,r,i);break;case 1:n.strict||bo(t,e,r,i)}r+=Object(Di.b)(i,4)}}(t,e,r,n),r+t.header.byteLength}(t,i,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function yo(t,e,r,n){const i=new Uint8Array(e.buffer,r,n),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Object(Di.b)(n,4)}function bo(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Object(Di.b)(n,4)}async function wo(t,e,r=0,n,i){var o,s,a,u;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!_o(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=Object(xi.a)(e);else if(e instanceof ArrayBuffer){const i={};r=mo(i,e,r,n.glb),Ii("glTF"===i.type,"Invalid GLB magic string "+i.type),t._glb=i,t.json=i.json}else Ii(!1,"GLTF: must be ArrayBuffer or string");const i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}(t,e,r,n),function(t,e={}){(new ao).normalize(t,e)}(t,{normalize:null==n||null===(o=n.gltf)||void 0===o?void 0:o.normalize});const c=[];if(null!=n&&null!==(s=n.gltf)&&void 0!==s&&s.loadBuffers&&t.json.buffers&&await async function(t,e,r){for(let o=0;o<t.json.buffers.length;++o){const s=t.json.buffers[o];if(s.uri){var n,i;const{fetch:a}=r;Ii(a);const u=Ci(s.uri,e),c=await(null==r||null===(n=r.fetch)||void 0===n?void 0:n.call(r,u)),l=await(null==c||null===(i=c.arrayBuffer)||void 0===i?void 0:i.call(c));t.buffers[o]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete s.uri}}}(t,n,i),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=t.json.images||[],i=[];for(let o=0;o<n.length;++o)i.push(vo(t,n[o],o,e,r));return await Promise.all(i)}(t,n,i);c.push(e)}const l=async function(t,e={},r){for(const i in io){var n;const o=(null==e||null===(n=e.gltf)||void 0===n?void 0:n.excludeExtensions)||{};if(!(i in o&&!o[i])){const n=io[i];await n.decode(t,e,r)}}}(t,n,i);return c.push(l),await Promise.all(c),null!=n&&null!==(u=n.gltf)&&void 0!==u&&u.postProcess?function(t,e){return(new po).postProcess(t,e)}(t,n):t}async function vo(t,e,r,n,i){const{fetch:o,parse:s}=i;let a;if(e.uri){const t=Ci(e.uri,n),r=await o(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=Mi(t.json,t.buffers,e.bufferView);a=Object(ki.d)(r.buffer,r.byteOffset,r.byteLength)}Ii(a,"glTF image has no data");const u=await s(a,Oi,{},i);t.images[r]=u}const Eo={name:"glTF",id:"gltf",module:"gltf",version:"3.0.13",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...Eo.options,...e}).gltf={...Eo.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await wo({},t,n,e,r)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};const So=0,Ao=1;function To(t,e,r,n){t.rotateYtoZ=!0;const i=t.byteOffset+t.byteLength-r;if(0===i)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Object(ki.d)(e,r,i),t.gltfByteOffset=0,t.gltfByteLength=i,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function Ro(t,e,r,n){const i=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case So:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Ao:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),i.loadGLTF){const{parse:e,fetch:i}=n;t.gltfUrl&&(t.gltfArrayBuffer=await i(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,Eo,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function Oo(t,e,r,n,i){var o;r=function(t,e,r,n,i){r=Zn(t,e,r),r=Qn(t,e,r),r=Kn(t,e,r),r=To(t,e,r,n);const o=new Ln(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=o.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3),r}(t,e,r,n),await Ro(t,Ao,n,i);const s=null==t||null===(o=t.gltf)||void 0===o?void 0:o.extensions;return s&&s.CESIUM_RTC&&(t.rtcCenter=s.CESIUM_RTC.center),r}async function xo(t,e,r,n,i){return r=function(t,e,r,n,i){if(r=Zn(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Qn(t,e,r);const o=new DataView(e);if(t.gltfFormat=o.getUint32(r,!0),r=Kn(t,e,r+=4),r=To(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const s=new Ln(t.featureTableJson,t.featureTableBinary),a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=s.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=s.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3);new Vn(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const i=[new Array(n),t._batchTable][0],o=new nt,s=new nt,a=new nt,u=new nt,c=new Kt,l=new _e,h=new nt,f={},d=new J,p=[],g=[],_=new nt,m=new nt;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",Cn.FLOAT,3,r,o);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",Cn.UNSIGNED_SHORT,3,r,o);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Cn.FLOAT,3,_);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Cn.FLOAT,3,m);if(!i)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const s=65535;for(let e=0;e<3;e++)n[e]=n[e]/s*i[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");o.copy(n),f.translation=o,t.normalUp=e.getProperty("NORMAL_UP",Cn.FLOAT,3,r,p),t.normalRight=e.getProperty("NORMAL_RIGHT",Cn.FLOAT,3,r,g);const y=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",Cn.UNSIGNED_SHORT,2,p),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",Cn.UNSIGNED_SHORT,2,g),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(kt.WGS84.eastNorthUpToFixedFrame(o,d),d.getRotationMatrix3(c)):c.identity()}y&&(u.copy(s).cross(a).normalize(),c.setColumn(0,s),c.setColumn(1,a),c.setColumn(2,u)),l.fromMatrix3(c),f.rotation=l,h.set(1,1,1);const b=e.getProperty("SCALE",Cn.FLOAT,1,r);Number.isFinite(b)&&h.multiplyByScalar(b);const w=e.getProperty("SCALE_NON_UNIFORM",Cn.FLOAT,3,r,p);w&&h.scale(w),f.scale=h;let v=e.getProperty("BATCH_ID",Cn.UNSIGNED_SHORT,1,r);void 0===v&&(v=r);const E=(new J).fromQuaternion(f.rotation);d.identity(),d.translate(f.translation),d.multiplyRight(E),d.scale(f.scale);const S=d.clone();i[r]={modelMatrix:S,batchId:v}}t.instances=i}(t,s,0,a),r}(t,e,r,n),await Ro(t,t.gltfFormat,n,i),r}async function ko(t,e=0,r,n,i={}){switch(i.byteOffset=e,i.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),i.type){case Lr.COMPOSITE:return await async function(t,e,r,n,i,o){r=Zn(t,e,r);const s=new DataView(e);for(t.tilesLength=s.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const s={};t.tiles.push(s),r=await o(e,r,n,i,s)}return r}(i,t,e,r,n,ko);case Lr.BATCHED_3D_MODEL:return await Oo(i,t,e,r,n);case Lr.INSTANCED_3D_MODEL:return await xo(i,t,e,r,n);case Lr.POINT_CLOUD:return await si(i,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+i.type)}}function Io(t,e){if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=sr,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return tr;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return rr;case"i3dm":case"b3dm":return er;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return Je;case"ADD":case"add":return $e;default:return t}}(t.refine),t}const Co={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.0.13",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const n=e["3d-tiles"]||{};let i;i="auto"===n.isTileset?r.url&&-1!==r.url.indexOf(".json"):n.isTileset;t=i?await async function(t,e,r){const n=JSON.parse((new TextDecoder).decode(t));return n.loader=e.loader||Co,n.url=r.url,n.basePath=function(t){return Mt.b.dirname(t.url)}(n),n.root=function(t){const e=t.basePath,r=Io(t.root,t),n=[];for(n.push(r);n.length>0;){const t=n.pop().children||[];for(const r of t)Io(r,{basePath:e}),n.push(r)}return r}(n),n.type=or,n.lodMetricType=sr,n.lodMetricValue=n.root.lodMetricValue,n}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await ko(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};var Mo=r(47);async function Do(t,e){if(!e){const r=await async function(t){Object(Ct.a)(t);const e={Authorization:"Bearer "+t},r=await Object(Mo.a)("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){Object(Ct.a)(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let i=await Object(Mo.a)(""+n,{fetch:{headers:r}});if(!i.ok)throw new Error(i.statusText);let o=await i.json();if(i=await Object(Mo.a)(n+"/endpoint",{fetch:{headers:r}}),!i.ok)throw new Error(i.statusText);const s=await i.json();return o={...o,...s},o}(t,e),{type:n,url:i}=r;return Object(Ct.a)("3DTILES"===n&&i),r.headers={Authorization:"Bearer "+r.accessToken},r}const Po={...Co,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return Do(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=Po,Co.parse(t,e,r)),options:{"cesium-ion":{...Co.options["3d-tiles"],accessToken:null}}};var Lo,Bo=r(1),No=new Uint8Array(16);function jo(){if(!Lo&&!(Lo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lo(No)}var Uo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Fo=function(t){return"string"==typeof t&&Uo.test(t)},zo=[],Go=0;Go<256;++Go)zo.push((Go+256).toString(16).substr(1));var Ho=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(zo[t[e+0]]+zo[t[e+1]]+zo[t[e+2]]+zo[t[e+3]]+"-"+zo[t[e+4]]+zo[t[e+5]]+"-"+zo[t[e+6]]+zo[t[e+7]]+"-"+zo[t[e+8]]+zo[t[e+9]]+"-"+zo[t[e+10]]+zo[t[e+11]]+zo[t[e+12]]+zo[t[e+13]]+zo[t[e+14]]+zo[t[e+15]]).toLowerCase();if(!Fo(r))throw TypeError("Stringified UUID is invalid");return r};var Wo=function(t,e,r){var n=(t=t||{}).random||(t.rng||jo)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Ho(n)},qo=r(0),Vo=r.n(qo),Zo=r(8),Qo=r.n(Zo),Ko=r(64),Xo=r.n(Ko);const Yo={folderPattern:{path:"folderPattern",default:"BASIC"},archiveCompressionType:{path:"archiveCompressionType",default:"STORE"},resourceCompressionType:{path:"resourceCompressionType",default:"GZIP"},I3SVersion:{path:"I3SVersion",default:"1.7"},nodeCount:{path:"nodeCount"}};class $o{constructor(t,e){this.nodesPerPage=e,this.nodesCounter=0,this.nodePages=[{}],this.nodePages[0].nodes=[],this.writeFile=t}useWriteFunction(t){this.writeFile=t}getNodeById(t){const e=Math.floor(t/this.nodesPerPage),r=t%this.nodesPerPage;return this.nodePages[e].nodes[r]}updateMaterialByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.material={definition:e,resource:r.index})}updateVertexCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.vertexCount=e)}updateNodeAttributeByNodeId(t){const e=this.getNodeById(t);e.mesh&&(e.mesh.attribute.resource=e.index)}updateFeatureCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.featureCount=e)}updateTexelCountHintByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&r.mesh.material&&(r.mesh.material.texelCountHint=e)}addChildRelation(t,e){if(null===t)return;this.getNodeById(t).children.push(e)}updateResourceInMesh(t){t.mesh&&(t.mesh.geometry.resource=t.index)}push(t,e=null){let r=this.nodePages[this.nodePages.length-1];return r.nodes.length===this.nodesPerPage&&(r={nodes:[]},this.nodePages.push(r)),t.index=this.nodesCounter++,r.nodes.push(t),this.addChildRelation(e,t.index),this.updateResourceInMesh(t),t.index}async save(t,e,r=!1){const n=[];if(r){for(const[r,i]of this.nodePages.entries()){const o=JSON.stringify(i),s=Object(Bo.join)(t,"nodepages");n.push(this.writeFile(s,o,r.toString()+".json")),e[`nodePages/${r.toString()}.json.gz`]=s+".json.gz"}const r=Qo()({nodeCount:this.nodesCounter},Yo),i=!1;e["metadata.json"]=await this.writeFile(t,JSON.stringify(r),"metadata.json",i)}else for(const[e,r]of this.nodePages.entries()){const i=JSON.stringify(r),o=Object(Bo.join)(t,"nodepages",e.toString());n.push(this.writeFile(o,i))}await Promise.all(n)}}var Jo=r(3),ts=r(65),es=r(10);function rs(t){let e=t[0];const r=Math.floor(e/3600);e-=3600*r;const n=Math.floor(e/60);e-=60*n;const i=Math.floor(e),o=t[1]/1e6;let s="";return r&&(s+=r+"h "),n&&(s+=n+"m "),i&&(s+=i+"s"),s||(s+=o+"ms"),s}async function ns(t){const{slpk:e,outputPath:r,tilesetName:n}=t,i=Object(Jo.a)(r);try{if(e){const t=Object(Bo.join)(i,n+".slpk");return(await es.promises.stat(t)).size}const t=Object(Bo.join)(i,n);return await async function t(e){let r=0;const n=await es.promises.readdir(e);for(const i of n){const n=await es.promises.stat(Object(Bo.join)(e,i));n.isDirectory()?r+=await t(Object(Bo.join)(e,i)):r+=n.size}return r}(t)}catch(t){return console.log("Calculate file sizes error: ",t),null}}const is={};class os extends tt{static get ZERO(){return is.ZERO=is.ZERO||Object.freeze(new os(0,0,0,0))}constructor(t=0,e=0,r=0,n=0){super(-0,-0,-0,-0),d(t)&&1===arguments.length?this.copy(t):(h.debug&&(w(t),w(e),w(r),w(n)),this[0]=t,this[1]=e,this[2]=r,this[3]=n)}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y),w(t.z),w(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=w(t)}get w(){return this[3]}set w(t){this[3]=w(t)}transform(t){return H(this,this,t),this.check()}transformByMatrix3(t){return x(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2],t[3]=e[3]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}function ss(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const as={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},us=()=>{};class cs{constructor(t){ss(this,"draco",void 0),ss(this,"dracoEncoder",void 0),ss(this,"dracoMeshBuilder",void 0),ss(this,"dracoMetadataBuilder",void 0),ss(this,"log",void 0),this.draco=t,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(t){t&&this.draco.destroy(t)}encodeSync(t,e={}){return this.log=us,this._setOptions(e),e.pointcloud?this._encodePointCloud(t,e):this._encodeMesh(t,e)}_getAttributesFromMesh(t){const e={...t,...t.attributes};return t.indices&&(e.indices=t.indices),e}_encodePointCloud(t,e){const r=new this.draco.PointCloud;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoPointCloud(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodePointCloudToDracoBuffer(r,!1,i);if(!(t>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),ls(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_encodeMesh(t,e){const r=new this.draco.Mesh;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoMesh(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodeMeshToDracoBuffer(r,i);if(t<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),ls(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_setOptions(t){if("speed"in t&&this.dracoEncoder.SetSpeedOptions(...t.speed),"method"in t){const e=this.draco[t.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(e)}if("quantization"in t)for(const e in t.quantization){const r=t.quantization[e],n=this.draco[e];this.dracoEncoder.SetAttributeQuantization(n,r)}}_createDracoMesh(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=as[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_createDracoPointCloud(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=as[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_addAttributeToMesh(t,e,r,n){if(!ArrayBuffer.isView(r))return-1;const i=this._getDracoAttributeType(e),o=r.length/n;if("indices"===i){const n=r.length/3;return this.log(`Adding attribute ${e}, size ${n}`),this.dracoMeshBuilder.AddFacesToMesh(t,n,r),-1}this.log(`Adding attribute ${e}, size ${o}`);const s=this.dracoMeshBuilder,{buffer:a}=r;switch(r.constructor){case Int8Array:return s.AddInt8Attribute(t,i,n,o,new Int8Array(a));case Int16Array:return s.AddInt16Attribute(t,i,n,o,new Int16Array(a));case Int32Array:return s.AddInt32Attribute(t,i,n,o,new Int32Array(a));case Uint8Array:case Uint8ClampedArray:return s.AddUInt8Attribute(t,i,n,o,new Uint8Array(a));case Uint16Array:return s.AddUInt16Attribute(t,i,n,o,new Uint16Array(a));case Uint32Array:return s.AddUInt32Attribute(t,i,n,o,new Uint32Array(a));case Float32Array:default:return s.AddFloatAttribute(t,i,n,o,new Float32Array(a))}}_getDracoAttributeType(t){switch(t.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(t){for(const e in t){const r=t[e];if(this._getDracoAttributeType(e)===this.draco.POSITION)return r}return null}_addGeometryMetadata(t,e){const r=new this.draco.Metadata;this._populateDracoMetadata(r,e),this.dracoMeshBuilder.AddMetadata(t,r)}_addAttributeMetadata(t,e,r){const n=new this.draco.Metadata;this._populateDracoMetadata(n,r),this.dracoMeshBuilder.SetMetadataForAttribute(t,e,n)}_populateDracoMetadata(t,e){for(const[n,i]of(r=e).entries&&!r.hasOwnProperty("entries")?r.entries():Object.entries(r))switch(typeof i){case"number":Math.trunc(i)===i?this.dracoMetadataBuilder.AddIntEntry(t,n,i):this.dracoMetadataBuilder.AddDoubleEntry(t,n,i);break;case"object":i instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(t,n,i,i.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(t,n,i)}var r}}function ls(t){const e=t.size(),r=new ArrayBuffer(e),n=new Int8Array(r);for(let r=0;r<e;++r)n[r]=t.GetValue(r);return r}const hs={name:"DRACO",id:"draco",module:"draco",version:"3.0.13",extensions:["drc"],encode:async function(t,e={}){const{draco:r}=await xn(e),n=new cs(r);try{return n.encodeSync(t,e.draco)}finally{n.destroy()}},options:{draco:{pointcloud:!1,attributeNameEntry:"name"}}};var fs=r(25),ds=r(19),ps=r(26);async function gs(t,e,r){if(e.encode)return await e.encode(t,r);if(e.encodeSync)return e.encodeSync(t,r);if(e.encodeText)return(new TextEncoder).encode(await e.encodeText(t,r));if(e.encodeInBatches){const n=function(t,e,r){if(e.encodeInBatches){const n=function(t){return[{table:t,start:0,end:t.length}]}(t);return e.encodeInBatches(n,r)}throw new Error("Writer could not encode data in batches")}(t,e,r),i=[];for await(const t of n)i.push(t);return Object(ki.b)(...i)}if(!ds.b&&e.encodeURLtoURL){const n=ms("input");await async function(t,e,r){t=Object(fs.a)(t),ds.b||await Mt.a.writeFile(t,Object(ps.c)(e),{flag:"w"}),Object(Ct.a)(!1)}(n,t);const i=ms("output"),o=await async function(t,e,r,n){if(t=Object(fs.a)(t),e=Object(fs.a)(e),ds.b||!r.encodeURLtoURL)throw new Error;return await r.encodeURLtoURL(t,e,n)}(n,i,e,r);return(await Object(Mo.a)(o)).arrayBuffer()}throw new Error("Writer could not encode data")}function _s(t,e,r){if(e.encodeSync)return e.encodeSync(t,r);throw new Error("Writer could not synchronously encode data")}function ms(t){return"/tmp/"+t}function ys(t){const{positions:e,normals:r,texCoords:n,colors:i,featureIndices:o,triangleCount:s}=t;if(!o.length)return{faceRange:new Uint32Array([0,s-1]),featureIds:[0],featureCount:1,positions:e,normals:r,texCoords:n,colors:i};const{faceRange:a,featureCount:u,featureIds:c}=function(t){let e=1,r=1,n=t[0];const i=[],o=[],s=[n];i[0]=0,o[0]=n;for(let a=1;a<t.length;a++)n!==t[a]&&(i[e]=a/3-1,i[e+1]=a/3,o[r]=t[a],s.includes(t[a])||s.push(t[a]),e+=2,r+=1),n=t[a];i[e]=t.length/3-1;const a=new Uint32Array(i),u=s.length;return{faceRange:a,featureCount:u,featureIds:o}}(o);return{featureCount:u,...function(t){const e=t[0],r=[e.featureId];let n=new Float32Array(e.positions),i=new Float32Array(e.normals),o=new Uint8Array(e.colors),s=new Float32Array(e.texCoords);const a=[0];let u=0,c=0;for(let e=1;e<t.length;e++){const l=t[e];r.push(l.featureId),n=Object(ki.c)(n,l.positions),i=Object(ki.c)(i,l.normals),o=Object(ki.c)(o,l.colors),s=Object(ki.c)(s,l.texCoords);const h=t[u];a.push(h.positions.length/9-1+c),a.push(h.positions.length/9+c),c+=h.positions.length/9,u+=1}a.push(n.length/9-1);return{faceRange:new Uint32Array(a),featureIds:r,positions:n,normals:i,colors:o,texCoords:s}}(function(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r],i=e.find(t=>t.featureId===n.featureId);i?(i.positions=Object(ki.c)(i.positions,n.positions),i.normals=Object(ki.c)(i.normals,n.normals),i.colors=Object(ki.c)(i.colors,n.colors),i.texCoords=Object(ki.c)(i.texCoords,n.texCoords)):e.push(n)}return e}(function(t){const{featureIds:e,positions:r,normals:n,colors:i,texCoords:o,faceRange:s}=t,a=[];let u=new Float32Array(r),c=new Float32Array(n),l=new Uint8Array(i),h=new Float32Array(o),f=0;for(let t=0;t<e.length;t++){const r=s[t+f],n=s[t+f+1],i=bs("positions",r,n),o=bs("normals",r,n),d=bs("colors",r,n),p=bs("texCoords",r,n);a.push({featureId:e[t],positions:u.slice(0,i),normals:c.slice(0,o),colors:l.slice(0,d),texCoords:h.slice(0,p)}),u=u.slice(i),c=c.slice(o),l=l.slice(d),h=h.slice(p),f+=1}return a.sort((t,e)=>t.featureId-e.featureId)}({faceRange:a,featureIds:c,...t})))}}function bs(t,e,r){const n=r-e+1,i=3*n;switch(t){case"positions":case"normals":return 9*n;case"colors":return 4*i;case"texCoords":return 2*i;default:return 0}}const ws=["CUSTOM_ATTRIBUTE_2","_BATCHID","BATCHID"];async function vs(t,e,r,n,i){const o=function(t){const e=[],r=t.gltf.materials;for(const t of r)e.push(Ms(t));return e}(t),s=function(t){const e=new Map;for(const r of t.gltf.materials||[{id:"default"}])e.set(r.id,{positions:new Float32Array(0),normals:new Float32Array(0),texCoords:new Float32Array(0),colors:new Uint8Array(0),featureIndices:[]});Ss(t.gltf.scene.nodes,t,e);for(const t of e.keys()){const r=e.get(t);if(0===r.positions.length){e.delete(t);continue}const n=r.positions.length/3;if(!r.colors.length){r.colors=new Uint8Array(4*n);for(let t=0;t<r.colors.length;t+=4)r.colors.set([255,255,255,255],t)}if(!r.texCoords.length){r.texCoords=new Float32Array(2*n);for(let t=0;t<r.texCoords.length;t+=2)r.texCoords.set([1,1],t)}r.featureIndices=r.featureIndices.reduce((t,e)=>t.concat(e))}return e}(t);s.has("default")&&o.push({material:{alphaMode:"opaque",pbrMetallicRoughness:{}}});const a=[];let u=e;for(let e=0;e<(t.gltf.materials.length||1);e++){const c=t.gltf.materials[e]||{id:"default"};if(!s.has(c.id))continue;const l=s.get(c.id),{material:h,texture:f}=o[e];a.push(await Es({convertedAttributes:l,material:h,texture:f,tileContent:t,nodeId:u,featuresHashArray:r,attributeStorageInfo:n,draco:i})),u++}return a}async function Es({convertedAttributes:t,material:e,texture:r,tileContent:n,nodeId:i,featuresHashArray:o,attributeStorageInfo:s,draco:a}){const u=t.positions.length/3,c=u/3,{faceRange:l,featureIds:h,positions:f,normals:d,colors:p,texCoords:g,featureCount:_}=ys({triangleCount:c,...t});n.batchTableJson&&function(t,e,r,n){const i=function(t,e,r){const n={};for(let i=0;i<t.length;i++){const o=t[i],s=Ns(i,e,r);n[o.toString()]=s}return n}(t,n,r);js(e,i),js(t,i)}(h,t.featureIndices,o,n.batchTableJson);const m=new Uint32Array(2),y=function(t){const e=new BigUint64Array(t.length);for(let r=0;r<t.length;r++)e[r]=BigInt(t[r]);return e}(h);m.set([u,_],0);const b=new Uint8Array(Object(ki.b)(m.buffer,f.buffer,d.buffer,r?g.buffer:new ArrayBuffer(0),p.buffer,y.buffer,l.buffer)),w=a?await async function(t,e,r){const{positions:n,normals:i,texCoords:o,colors:s,featureIds:a,faceRange:u}=r,c=new Uint32Array(t);for(let t=0;t<c.length;t++)c.set([t],t);const l=function(t,e){const r=new Uint32Array(t.length);let n=0,i=0;for(let t=1;t<e.length;t+=2){const o=3*(e[t]+1);r.fill(n,i,o),n++,i=o+1}return r}(new Uint32Array(e.featureIndices.length?e.featureIndices:t),u),h={positions:n,normals:i,colors:s,"feature-index":l};o.length&&(h.texCoords=o);const f={"feature-index":{"i3s-attribute-type":"feature-index","i3s-feature-ids":new Int32Array(a)}};return new Uint8Array(await gs({attributes:h,indices:c},hs,{draco:{method:"MESH_SEQUENTIAL_ENCODING",attributesMetadata:f}}))}(u,t,{positions:f,normals:d,texCoords:r?g:new Float32Array(0),colors:p,featureIds:h,faceRange:l}):null,v=function(t,e,r){const n=[];if(t){const i={OBJECTID:e,...t};for(const t in i){const e=Us(t,r);let o=null;switch(e){case"Oid32":case"Int32":o=Fs(i[t]);break;case"Float64":o=zs(i[t]);break;case"string":o=Gs(i[t]);break;default:o=Gs(i[t])}n.push(o)}}return n}(n.batchTableJson,h,s);return{geometry:b,compressedGeometry:w,texture:r,sharedResources:Ds(n,i),meshMaterial:e,vertexCount:u,attributes:v,featureCount:_}}function Ss(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){if(t)for(const i of t)As(i,e,r,n)}function As(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){const i=t.matrix,o=i?n.multiplyRight(i):n,s=t.mesh;s&&function(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){for(const i of t.primitives){let t=null;i.material?t=r.get(i.material.id):r.has("default")&&(t=r.get("default")),Object(Ct.a)(null!==t,"Primitive - material mapping failed");const o=i.attributes;t.positions=Object(ki.c)(t.positions,Ts({vertices:o.POSITION.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Rs})),t.normals=Object(ki.c)(t.normals,Ts({vertices:o.NORMAL&&o.NORMAL.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Os})),t.texCoords=Object(ki.c)(t.texCoords,xs(o.TEXCOORD_0&&o.TEXCOORD_0.value,i.indices.value)),t.colors=Object(ki.c)(t.colors,ks(o.COLOR_0,i.indices.value)),t.featureIndices.push(Is(Cs(o),i.indices.value))}}(s,e,r,o),Ss(t.children,e,r,o)}function Ts(t){const{vertices:e,indices:r,attributeSpecificTransformation:n}=t,i=new Float32Array(3*r.length);if(!e)return i;for(let o=0;o<r.length;o++){const s=3*r[o],a=e.subarray(s,s+3);let u=new nt(Array.from(a));u=n(u,t),i[3*o]=u.x,i[3*o+1]=u.y,i[3*o+2]=u.z}return i}function Rs(t,e){const{cartesianModelMatrix:r,cartographicOrigin:n,nodeMatrix:i}=e;return i&&(t=t.transform(i)),t=t.transform(r),kt.WGS84.cartesianToCartographic([t[0],t[1],t[2]],t),t=t.subtract(n)}function Os(t,e){const{cartesianModelMatrix:r,nodeMatrix:n}=e;return n&&(t=t.transformAsVector(n)),t=t.transformAsVector(r)}function xs(t,e){if(!t)return new Float32Array(0);const r=new Float32Array(2*e.length);for(let n=0;n<e.length;n++){const i=2*e[n],o=t.subarray(i,i+2);r[2*n]=o[0],r[2*n+1]=o[1]}return r}function ks(t,e){if(!t)return new Uint8Array(0);const r=t.components,n=t.value,i=new Uint8Array(e.length*r);for(let t=0;t<e.length;t++){const o=e[t]*r,s=n.subarray(o,o+r),a=new Uint8Array(r);for(let t=0;t<s.length;t++)a[t]=255*s[t];i.set(a,t*r)}return i}function Is(t,e){if(!t.length||!e.length)return[];const r=[];for(let n=0;n<e.length;n++){const i=e[n];r.push(t[i])}return r}function Cs(t){let e=[];for(let r=0;r<ws.length;r++){const n=ws[r];if(t[n]&&t[n].value){e=t[n].value;break}}return e}function Ms(t){const e={doubleSided:t.doubleSided,emissiveFactor:t.emissiveFactor.map(t=>Math.round(255*t)),alphaMode:(t.alphaMode||"OPAQUE").toLowerCase(),pbrMetallicRoughness:{roughnessFactor:t.pbrMetallicRoughness.roughnessFactor,metallicFactor:t.pbrMetallicRoughness.metallicFactor}};let r;if(t.pbrMetallicRoughness.baseColorTexture?(r=t.pbrMetallicRoughness.baseColorTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}):t.emissiveTexture&&(r=t.emissiveTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}),!r){const r=t.pbrMetallicRoughness.baseColorFactor;e.pbrMetallicRoughness.baseColorFactor=r&&r.map(t=>Math.round(255*t))||void 0}return{material:e,texture:r}}function Ds(t,e){const r=t.gltf.materials,n={};if(!r||!r.length)return n;n.materialDefinitionInfos=[];for(const t of r){const{materialDefinitionInfo:r,textureDefinitionInfo:i}=Ps(t,e);n.materialDefinitionInfos.push(r),i&&(n.textureDefinitionInfos=n.textureDefinitionInfos||[],n.textureDefinitionInfos.push(i))}return n}function Ps(t,e){const r=t.pbrMetallicRoughness.baseColorTexture||t.emissiveTexture;let n=null;r&&(n=function(t,e){return{encoding:[t.source.mimeType],images:[{id:Bs(t,e),size:t.source.image.width,length:[t.source.image.data.length]}]}}(r.texture,e));const{baseColorFactor:i,metallicFactor:o}=t.pbrMetallicRoughness;let s=i;return i&&0!==i[3]||!t.emissiveFactor||(s=t.emissiveFactor,s[3]=s[3]||1),{materialDefinitionInfo:Ls(s,o),textureDefinitionInfo:n}}function Ls(t,e=0){const r=new os(0,0,0,1),n=new os(1,1,1,1),i=new os(.04/255,.04/255,.04/255,0),o=new os(t),s=n.subtract(i).multiply(o),a=s.lerp(s,r,e);i[3]=1;const u=i.lerp(i,o,e);return{diffuse:a.toArray(),specular:u.toArray()}}function Bs(t,e){const{width:r,height:n}=t.source.image,i=e+1,o=32-i.toString(2).length,s="0".repeat(o).concat(i.toString(2));return BigInt(`0b${(268435456+(r-1<<12)+(n-1<<0)).toString(2)}${s}`).toString()}function Ns(t,e,r){const n=function(t,e){let r="";for(const n in t)r+=t[n][e];return r}(e,t),i=Xo()(n);return r.includes(i)?r.indexOf(i):r.push(i)-1}function js(t,e){for(let r=0;r<t.length;r++)t[r]=e[t[r]]}function Us(t,e){return e.find(e=>e.name===t).attributeValues.valueType}function Fs(t){const e=new Uint32Array([t.length]),r=new Uint32Array(t);return Object(ki.b)(e.buffer,r.buffer)}function zs(t){const e=new Uint32Array([t.length]),r=new Uint8Array(4),n=new Float64Array(t);return Object(ki.b)(e.buffer,r.buffer,n.buffer)}function Gs(t){const e=new Uint32Array([t.length]);let r=0;const n=new Uint32Array(t.length),i=[];for(let e=0;e<t.length;e++){const o=String(t[e])+"\0",s=Buffer.from(o),a=s.length;r+=a,n[e]=a,i.push(s)}const o=new Uint32Array([r]);return Object(ki.b)(e.buffer,o.buffer,n.buffer,...i)}function Hs(t,e){let r,n,i;const o=t.boundingVolume,s=kt.WGS84.cartesianToCartographic(o.center,new nt);return s[2]=s[2]-e.getHeight(s[1],s[0]),o instanceof De?(n=o.halfSize,r=new nt(n[0],n[1],n[2]).len(),i=o.quaternion):(r=t.boundingVolume.radius,n=[r,r,r],i=(new _e).fromMatrix3(new Kt([n[0],0,0,0,n[1],0,0,0,n[2]])).normalize()),{mbs:[s[0],s[1],s[2],r],obb:{center:[s[0],s[1],s[2]],halfSize:n,quaternion:i}}}function Ws(t){const e=t[3],r=new nt(t[0],t[1],t[2]),n=new Kt([e,0,0,0,e,0,0,0,e]);return new De(r,n)}const qs={serviceItemId:{path:"serviceItemId"},serviceName:{path:"layerName"},name:{path:"layerName"},currentVersion:{path:"currentVersion",default:10.7},serviceVersion:{path:"serviceVersion",default:"1.7"},supportedBindings:{path:"supportedBindings",default:["REST"]},layers:{path:"layers0",transform:t=>[t]}};function Vs(t){let e=(t.header.lodSelection.maxScreenThreshold||{}).maxError;if(!e){const r=t.header.lodSelection.maxScreenThresholdSQ;r&&(e=Math.sqrt(r.maxError/(.25*Math.PI)))}return e||(e=16),2*t.header.mbs[3]*16/e}const Zs=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],Qs=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],Ks=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31];class Xs{constructor(t){this.options=t,this._v00=0,this._v01=0,this._v10=0,this._v11=0,this._t=[],this._ix=this.options._width,this._iy=this.options._height}getHeight(t,e){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(e))return NaN;const r=function(t,e){e=Math.abs(e);let r=Ys(t,e);2*Math.abs(r)===e?r-=Ys(t,2*e)-r:2*Math.abs(r)>e&&(r+=r<0?e:-e);return r}(e,360);let n=(e=-180!==r?r:180)*this.options._rlonres,i=-t*this.options._rlatres,o=Math.floor(n),s=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(i));n-=o,i-=s,s+=(this.options._height-1)/2,o+=o<0?this.options._width:o>=this.options._width?-this.options._width:0;let a=0,u=0,c=0,l=0,h=new Array(10);if(o!==this._ix||s!==this._iy)if(this.options.cubic){const t=[this._rawval(o,s-1),this._rawval(o+1,s-1),this._rawval(o-1,s),this._rawval(o,s),this._rawval(o+1,s),this._rawval(o+2,s),this._rawval(o-1,s+1),this._rawval(o,s+1),this._rawval(o+1,s+1),this._rawval(o+2,s+1),this._rawval(o,s+2),this._rawval(o+1,s+2)];let e=Qs;0!==s&&(e=s===this.options._height-2?Ks:Zs);let r=372;0!==s&&(r=s===this.options._height-2?372:240);for(let n=0;n<10;++n){h[n]=0;for(let r=0;r<12;++r)h[n]+=t[r]*e[10*r+n];h[n]/=r}}else a=this._rawval(o,s),u=this._rawval(o+1,s),c=this._rawval(o,s+1),l=this._rawval(o+1,s+1);else this.options.cubic?h=this._t:(a=this._v00,u=this._v01,c=this._v10,l=this._v11);if(!this.options.cubic){const t=(1-i)*((1-n)*a+n*u)+i*((1-n)*c+n*l),e=this.options._offset+this.options._scale*t;return this._ix=o,this._iy=s,this._v00=a,this._v01=u,this._v10=c,this._v11=l,e}let f=h[0]+n*(h[1]+n*(h[3]+n*h[6]))+i*(h[2]+n*(h[4]+n*h[7])+i*(h[5]+n*h[8]+i*h[9]));return f=this.options._offset+this.options._scale*f,this._ix=o,this._iy=s,this._t=h,f}_rawval(t,e){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(e<0||e>=this.options._height)&&(e=e<0?-e:2*(this.options._height-1)-e,t+=(t<this.options._width/2?1:-1)*this.options._width/2);const r=this.options._datastart+2*(e*this.options._swidth+t);return this.options.data[r]<<8|this.options.data[r+1]}}function Ys(t,e){return t-Math.floor(t/e)*e}function $s(t,e){const r=function*(t){let e=0;do{const r=t.indexOf(10,e);if(-1!==r){const n=t.subarray(e,r);e=r+1,yield{offset:e,line:Js(n)}}else{const r=t.subarray(e,t.length);e=t.length,yield{offset:e,line:Js(r)}}}while(e<t.length);return{offset:e,line:""}}(t);let n=r.next();if(n.done||"P5"!==n.value.line)throw new Error("Geoid model file: File not in PGM format");let i=Number.MAX_VALUE,o=0,s=-1,a=-1,u="NONE",c="UNKNOWN",l=0,h=0,f=null,d=null;do{n=r.next();const t=n.value.line;if(t.length){if("#"!==t[0]){let e=t.split(" ");if(e=e.filter(t=>""!==t),l=parseInt(e[0],10),h=parseInt(e[1],10),!l||!h)throw new Error("Geoid model file: Error reading raster size");break}{const r=t.split(" "),n=r[0],l=r[1];if("#"!==n||!l)continue;const h=r.length>2?r.slice(2):[];if("Description"===l)u=h.join(" ");else if("DateTime"===l)c=h.join(" ");else if("Offset"===l){if(!r[2])throw new Error("Geoid model file: Error reading offset");i=parseInt(r[2],10)}else if("Scale"===l){if(!r[2])throw new Error("Geoid model file: Error reading scale");o=parseFloat(r[2])}else l===(e.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat(r[2]))&&(s=parseFloat(r[2])):l===(e.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat(r[2]))&&(a=parseFloat(r[2]))}}}while(!n.done);n=r.next();const p=parseInt(n.value.line,10);if(n.done)throw new Error("Geoid model file: Error reading maxval");if(65535!==p)throw new Error("Geoid model file: Incorrect value of maxval");if(f=n.value.offset,d=l,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(0===o)throw new Error("Geoid model file: Scale not set");if(o<0)throw new Error("Geoid model file: Scale must be positive");if(h<2||l<2)throw new Error("Geoid model file: Raster size too small");if(1&l)throw new Error("Geoid model file: Raster width is odd");if(!(1&h))throw new Error("Geoid model file: Raster height is even");const g=l/360,_=(h-1)/180;return new Xs({cubic:e.cubic,_width:l,_height:h,_rlonres:g,_rlatres:_,_offset:i,_scale:o,_swidth:d,_datastart:f,_maxerror:s,_rmserror:a,_description:u,_datetime:c,data:t})}function Js(t){let e="";for(const r of t)e+=String.fromCharCode(r);return e}const ta={name:"PGM - Netpbm grayscale image format",id:"pgm",module:"tile-converter",version:"3.0.13",mimeTypes:["image/x-portable-graymap"],parse:(t,e)=>$s(new Uint8Array(t),e),extensions:["pgm"],options:{cubic:!1}},ea={id:{path:"id",transform:t=>t.toUpperCase()},profile:{path:"profile",default:"meshpyramids"},version:{path:"version",default:"1.7"},resourcePattern:{path:"resourcePattern",default:["3dNodeIndexDocument","Attributes","SharedResource","Geometry"]},rootNode:{path:"rootNode",default:"./nodes/root"},extent:{path:"extent"},indexCRS:{path:"indexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},vertexCRS:{path:"vertexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},normalReferenceFrame:{path:"normalReferenceFrame",default:"east-north-up"},attributeEncoding:{path:"attributeEncoding",default:"application/octet-stream; version=1.6"},textureEncoding:{path:"textureEncoding",default:["image/jpeg"]},lodType:{path:"lodType",default:"MeshPyramid"},lodModel:{path:"lodModel",default:"node-switching"},defaultGeometrySchema:{path:"defaultGeometrySchema",default:{geometryType:"triangles",header:[{property:"vertexCount",type:"UInt32"},{property:"featureCount",type:"UInt32"}],topology:"PerAttributeArray",ordering:["position","normal","uv0","color"],vertexAttributes:{position:{valueType:"Float32",valuesPerElement:3},normal:{valueType:"Float32",valuesPerElement:3},uv0:{valueType:"Float32",valuesPerElement:2},color:{valueType:"UInt8",valuesPerElement:4}},featureAttributeOrder:["id","faceRange"],featureAttributes:{id:{valueType:"UInt64",valuesPerElement:1},faceRange:{valueType:"UInt32",valuesPerElement:2}}}}},ra={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},uv0:{type:"Float32",component:2},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},na={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},ia={compressedAttributes:{encoding:"draco",attributes:["position","normal","uv0","color","feature-index"]}},oa={compressedAttributes:{encoding:"draco",attributes:["position","normal","color","feature-index"]}},sa={wkid:{path:"wkid",default:4326},latestWkid:{path:"latestWkid",default:4326},vcsWkid:{path:"vcsWkid",default:5773},latestVcsWkid:{path:"latestVcsWkid",default:5773}},aa={heightModel:{path:"heightModel",default:"gravity_related_height"},vertCRS:{path:"vertCRS",default:"EGM96_Geoid"},heightUnit:{path:"heightUnit",default:"meter"}},ua={nodesPerPage:{path:"nodesPerPage"},lodSelectionMetricType:{path:"lodSelectionMetricType",default:"maxScreenThresholdSQ"}},ca={version:{path:"version",transform:t=>t.toUpperCase()},id:{path:"id",default:0},name:{path:"name"},href:{path:"href",default:"./layers/0"},layerType:{path:"layerType",default:"IntegratedMesh"},spatialReference:{path:"spatialReference",transform:t=>Qo()(t,sa)},capabilities:{path:"capabilities",default:["View","Query"]},store:{path:"store",transform:t=>Qo()(t,ea)},heightModelInfo:{path:"heightModelInfo",transform:t=>Qo()(t,aa)},nodePages:{path:"nodePages",transform:t=>Qo()(t,ua)},materialDefinitions:{path:"materialDefinitions",default:[]},textureSetDefinitions:{path:"textureSetDefinitions",default:[]},geometryDefinitions:{path:"compressGeometry",transform:t=>{const e=[{},{}];return e[0].geometryBuffers=[],e[1].geometryBuffers=[],e[0].geometryBuffers.push(ra),e[1].geometryBuffers.push(na),t&&(e[0].geometryBuffers.push(ia),e[1].geometryBuffers.push(oa)),e},default:[{geometryBuffers:[ra,na]}]},attributeStorageInfo:{path:"attributeStorageInfo",default:[]},fields:{path:"fields",default:[]},popupInfo:{path:"popupInfo",default:null}},la={mbs:{path:"mbs"},obb:{path:"obb"}},ha={id:{path:"id"},href:{path:"href"},...la},fa={version:{path:"version"},id:{path:"id"},path:{path:"path"},level:{path:"level"},...la,lodSelection:{path:"lodSelection",default:[{metricType:"maxScreenThresholdSQ",maxError:196349.54374999998},{metricType:"maxScreenThreshold",maxError:999.9999999999999}]},children:{path:"children",default:null},neighbors:{path:"neighbors",default:null},parentNode:{path:"parentNode",transform:t=>Qo()(t,ha),default:null},sharedResource:{path:"sharedResource",default:null},featureData:{path:"featureData",default:null},geometryData:{path:"geometryData",default:null},textureData:{path:"textureData",default:null},attributeData:{path:"attributeData",default:null}},da={renderMode:{path:"renderMode",default:"solid"},shininess:{path:"shininess",default:1},reflectivity:{path:"reflectivity",default:0},ambient:{path:"ambient",default:[1,1,1,1]},diffuse:{path:"diffuse",default:[1,1,1,1]},specular:{path:"specular",default:[0,0,0,0]},useVertexColorAlpha:{path:"useVertexColorAlpha",default:!1},vertexRegions:{path:"vertexRegions",default:!1},vertexColors:{path:"vertexColors",default:!0}},pa={name:{path:"name",default:"standard"},type:{path:"type",default:"standard"},params:{path:"params",transform:(t,e,r)=>Qo()(r,da)}},ga={id:{path:"id"},size:{path:"size"},href:{path:"href",default:["../textures/0"]},length:{path:"length"}},_a={encoding:{path:"encoding"},wrap:{path:"wrap",default:["none"]},atlas:{path:"atlas",default:!1},uvSet:{path:"uvSet",default:"uv0"},channels:{path:"channels",default:"rgb"},images:{path:"images",transform:(t,e,r)=>t.map(t=>Qo()(t,ga))}},ma={materialDefinitions:{path:"materialDefinitionInfos",transform:function(t,e,r){const n={};for(const[e,i]of t.entries())n[`Mat${r.nodePath}${e}`]=Qo()(i,pa);return n}},textureDefinitions:{path:"textureDefinitionInfos",transform:function(t,e,r){if(!t)return null;const n={};for(const[e,i]of t.entries()){const t=`${r.nodePath}${e}`;i.imageIndex=t,n[t]=Qo()(i,_a)}return n}}};function ya(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const ba={};function wa(t="id"){ba[t]=ba[t]||1;const e=ba[t]++;return"".concat(t,"-").concat(e)}const va={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};const Ea=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),Sa=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),Aa=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),Ta=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),Ra={POSITION:{size:3,value:new Float32Array(Sa)},NORMAL:{size:3,value:new Float32Array(Aa)},TEXCOORD_0:{size:2,value:new Float32Array(Ta)}};class Oa extends class{static get DRAW_MODE(){return va}constructor(t={}){const{id:e=wa("geometry"),drawMode:r=va.TRIANGLES,attributes:n={},indices:i=null,vertexCount:o=null}=t;this.id=e,this.drawMode=0|r,this.attributes={},this.userData={},this._setAttributes(n,i),this.vertexCount=o||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(t){return"Geometry ".concat(this.id," attribute ").concat(t)}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const e in t){let r=t[e];r=ArrayBuffer.isView(r)?{value:r}:r,ya(ArrayBuffer.isView(r.value),"".concat(this._print(e),": must be typed array or object with value as typed array")),"POSITION"!==e&&"positions"!==e||r.size||(r.size=3),"indices"===e?(ya(!this.indices),this.indices=r):this.attributes[e]=r}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let r=1/0;for(const e in t){const n=t[e],{value:i,size:o,constant:s}=n;!s&&i&&o>=1&&(r=Math.min(r,i.length/o))}return ya(Number.isFinite(r)),r}}{constructor(t={}){const{id:e=wa("cube-geometry")}=t;super({...t,id:e,indices:{size:1,value:new Uint16Array(Ea)},attributes:{...Ra,...t.attributes}})}}function xa(t){if(!t.parentNode.obb||!t.parentNode.mbs)return null;const e=[];return function(t,e){const r=function(t){const{center:e,halfSize:r,quaternion:n}=t;return(new De).fromCenterHalfSizeQuaternion(e,r,n)}(e.parentNode.obb),n=function(t){const e=new Oa,r=t.obb.halfSize,{attributes:n}=e,i=new Float32Array(n.POSITION.value),o=kt.WGS84.cartographicToCartesian(t.obb.center);let s=[];for(let e=0;e<i.length;e+=3){const n=new nt(i[e]*=r[0],i[e+1]*=r[1],i[e+2]*=r[2]).transformByQuaternion(t.obb.quaternion).add(o);s=s.concat(n)}return s}(e);if(function(t,e){let r=!0;for(let n=0;n<e.length/3;n+=3){const i=[e[n],e[n+1],e[n+2]],o=kt.WGS84.cartesianToCartographic(i);if(t.distanceTo(o)>0){r=!1;break}}return r}(r,n))return;const i=`OBB of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile OBB`;t.push(i)}(e,t),function(t,e){const r=ka(e.mbs),n=ka(e.parentNode.mbs);if(r.center.distanceTo(n.center)+r.radius>n.radius){const r=`MBS of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile MBS`;t.push(r)}}(e,t),e}function ka(t){return new Gt([t[0],t[1],t[2]],t[3])}function Ia(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ca=Vo.a.env.IonToken||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ";class Ma{constructor(){Ia(this,"nodePages",void 0),Ia(this,"fileMap",void 0),Ia(this,"options",void 0),Ia(this,"layers0Path",void 0),Ia(this,"materialMap",void 0),Ia(this,"materialDefinitions",void 0),Ia(this,"vertexCounter",void 0),Ia(this,"layers0",void 0),Ia(this,"featuresHashArray",void 0),Ia(this,"refinementCounter",void 0),Ia(this,"validate",void 0),Ia(this,"boundingVolumeWarnings",void 0),Ia(this,"conversionStartTime",void 0),Ia(this,"refreshTokenTime",void 0),Ia(this,"sourceTileset",void 0),Ia(this,"geoidHeightModel",void 0),this.nodePages=new $o(Jo.d,64),this.fileMap={},this.options={},this.layers0Path="",this.materialMap=new Map,this.materialDefinitions=[],this.vertexCounter=0,this.layers0=null,this.featuresHashArray=[],this.refinementCounter={tilesCount:0,tilesWithAddRefineCount:0},this.validate=!1,this.boundingVolumeWarnings=null}async convert(t){this.conversionStartTime=Vo.a.hrtime();const{tilesetName:e,slpk:r,egmFilePath:n,inputUrl:i,validate:o,outputPath:s,draco:u,sevenZipExe:c,maxDepth:l,token:h}=t;this.options={maxDepth:l,slpk:r,sevenZipExe:c,egmFilePath:n,draco:u,token:h,inputUrl:i},this.validate=o,console.log("Loading egm file..."),this.geoidHeightModel=await Object(a.a)(n,ta),console.log("Loading egm file completed!"),r&&this.nodePages.useWriteFunction(Jo.e);const f=await this._fetchPreloadOptions(),d={loadOptions:{}};f.headers&&(d.loadOptions.fetch={headers:f.headers}),Object.assign(d,f);const p=await Object(a.a)(i,Po,d.loadOptions);return this.sourceTileset=new Pr(p,d),await this._createAndSaveTileset(s,e),await this._finishConversion({slpk:r,outputPath:s,tilesetName:e}),p}async _createAndSaveTileset(t,e){const r=Object(Bo.join)(""+t,""+e);try{await Object(Jo.b)(r)}catch(t){}this.layers0Path=Object(Bo.join)(r,"SceneServer","layers","0"),this._formLayers0(e),this.materialDefinitions=[],this.materialMap=new Map;const n=this.sourceTileset.root,i=Hs(n,this.geoidHeightModel),o=this.nodePages.push({lodThreshold:0,obb:i.obb,children:[]}),s=this.options.slpk,a=this._formRootNodeIndexDocument(i);await this._convertNodesTree(a,n,o,i),this.layers0.materialDefinitions=this.materialDefinitions,await this._writeLayers0(),async function(t,e,r){const n={serviceItemId:Wo().replace(/-/gi,""),layerName:t,layers0:e},i=Qo()(n,qs),o=Object(Bo.join)(r,"SceneServer");await Object(Jo.d)(o,JSON.stringify(i))}(e,this.layers0,r),await this._writeNodeIndexDocument(a,"root",Object(Bo.join)(this.layers0Path,"nodes","root")),await this.nodePages.save(this.layers0Path,this.fileMap,s),await this._createSlpk(r)}_formLayers0(t){const e=function(t){const e=t.cartesianCenter,r=t.lodMetricValue,n=kt.WGS84.cartesianToCartographic(new nt(e[0]+r,e[1]+r,e[2]),new nt),i=kt.WGS84.cartesianToCartographic(new nt(e[0]-r,e[1]-r,e[2]),new nt),o=n[0]<i[0],s=n[1]<i[1];return[o?n[0]:i[0],s?n[1]:i[1],o?i[0]:n[0],s?i[1]:n[1]]}(this.sourceTileset),r={version:`{${Wo().toUpperCase()}}`,id:0,name:t,href:"./layers/0",store:{id:`{${Wo().toUpperCase()}}`,extent:e},nodePages:{nodesPerPage:64},compressGeometry:this.options.draco};this.layers0=Qo()(r,ca)}_formRootNodeIndexDocument(t){const e={version:`{${Wo().toUpperCase()}}`,id:"root",level:0,lodSelection:[{metricType:"maxScreenThresholdSQ",maxError:0},{metricType:"maxScreenThreshold",maxError:0}],...t,children:[]};return Qo()(e,fa)}async _convertNodesTree(t,e,r,n){if(await this.sourceTileset._loadTile(e),e.content&&"b3dm"===e.content.type){t.children.push({id:"1",href:"./1",...n});const[i]=await this._createNode(t,e,r,0),o=Object(Bo.join)(this.layers0Path,"nodes",i.path);this.options.slpk?this.fileMap["nodes/1/3dNodeIndexDocument.json.gz"]=await Object(Jo.e)(o,JSON.stringify(i),"3dNodeIndexDocument.json"):await Object(Jo.d)(o,JSON.stringify(i))}else await this._addChildrenWithNeighborsAndWriteFile({parentNode:t,sourceTiles:e.children,parentId:r,level:1});await e.unloadContent()}async _writeLayers0(){this.options.slpk?this.fileMap["3dSceneLayer.json.gz"]=await Object(Jo.e)(this.layers0Path,JSON.stringify(this.layers0),"3dSceneLayer.json"):await Object(Jo.d)(this.layers0Path,JSON.stringify(this.layers0))}async _writeNodeIndexDocument(t,e,r){this.options.slpk?this.fileMap[`nodes/${e}/3dNodeIndexDocument.json.gz`]=await Object(Jo.e)(r,JSON.stringify(t),"3dNodeIndexDocument.json"):await Object(Jo.d)(r,JSON.stringify(t))}async _createSlpk(t){if(this.options.slpk){const e=Object(Bo.join)(t,"SceneServer","layers","0"),r=t+".slpk";await Object(ts.b)(e,r,0,".",this.options.sevenZipExe);try{await Object(Jo.b)(t)}catch(t){}}}async _addChildrenWithNeighborsAndWriteFile(t){const e=[];await this._addChildren({...t,childNodes:e}),await this._addNeighborsAndWriteFile(t.parentNode,e)}async _addChildren(t){const{childNodes:e,sourceTiles:r,parentNode:n,parentId:i,level:o}=t;if(!(this.options.maxDepth&&o>this.options.maxDepth))for(const t of r){if("json"===t.type)await this.sourceTileset._loadTile(t),await this._addChildren({parentNode:n,sourceTiles:t.children,childNodes:e,parentId:i,level:o+1}),await t.unloadContent();else{const r=Hs(t,this.geoidHeightModel),s=await this._createNode(n,t,i,o);for(const t of s)n.children.push({id:t.id,href:"../"+t.path,...r}),e.push(t)}t.id&&console.log(t.id)}}async _addNeighborsAndWriteFile(t,e){for(const r of e){const e=Object(Bo.join)(this.layers0Path,"nodes",r.path),n=r.path;if(delete r.path,t.children.length<1e3)for(const e of t.children)r.id!==e.id&&r.neighbors.push({...e});else console.warn(`Node ${r.id}: neighbors attribute is omited because of large number of neigbors`),delete r.neighbors;await this._writeNodeIndexDocument(r,n,e),r.neighbors=[]}}async _createNode(t,e,r,n){var i;this.validate&&this._checkAddRefinementTypeForTile(e),await this._updateTilesetOptions(),await this.sourceTileset._loadTile(e);const o=Hs(e,this.geoidHeightModel),s=function(t,e){const r=[],n=t.boundingVolume,i=t.lodMetricValue||.1,o={metricType:"maxScreenThreshold",maxError:2*e.mbs[3]*16/i},s={metricType:"maxScreenThresholdSQ",maxError:.25*Math.PI*o.maxError*o.maxError};return"OrientedBoundingBox"===n.constructor.name?(r.push(s),r.push(o)):(r.push(o),r.push(s)),r}(e,o),a=s.find(t=>"maxScreenThresholdSQ"===t.metricType)||{maxError:0};(null==e||null===(i=e.content)||void 0===i?void 0:i.batchTableJson)&&this._convertAttributeStorageInfo(e.content);const u=await this._convertResources(e),c=[],l={geometry:null,compressedGeometry:null,texture:null,sharedResources:null,meshMaterial:null,vertexCount:null,attributes:null,featureCount:null};for(const n of u||[l]){const i=this._createNodeInNodePages(a,o,e,r,n),u=this._createNodeIndexDocument(t,o,s,i,n);i.mesh&&await this._writeResources(n,u.path),this.validate&&(this.boundingVolumeWarnings=xa(u),this.boundingVolumeWarnings&&this.boundingVolumeWarnings.length&&console.warn("Bounding Volume Warnings: ",...this.boundingVolumeWarnings)),c.push(u)}e.unloadContent();const h=c[0];return await this._addChildrenWithNeighborsAndWriteFile({parentNode:h,sourceTiles:e.children,parentId:h.id,level:n+1}),c}_convertAttributeStorageInfo(t){const e=t&&t.batchTableJson;e&&!this.layers0.attributeStorageInfo.length&&this._convertBatchTableInfoToNodeAttributes(e)}async _convertResources(t){if(!t.content||"b3dm"!==t.content.type)return null;return await vs(t.content,Number(this.nodePages.nodesCounter),this.featuresHashArray,this.layers0.attributeStorageInfo,this.options.draco)}_createNodeInNodePages(t,e,r,n,i){const{meshMaterial:o,texture:s,vertexCount:a,featureCount:u}=i,c={lodThreshold:t.maxError,obb:e.obb,children:[],mesh:null};r.content&&"b3dm"===r.content.type&&(c.mesh={geometry:{definition:s?0:1},attribute:{}});const l=this.nodePages.push(c,n);if(o&&this.nodePages.updateMaterialByNodeId(l,this._findOrCreateMaterial(o)),s){const t=s.image.height*s.image.width;this.nodePages.updateTexelCountHintByNodeId(l,t)}return a&&(this.vertexCounter+=a,this.nodePages.updateVertexCountByNodeId(l,a)),this.nodePages.updateNodeAttributeByNodeId(l),u&&this.nodePages.updateFeatureCountByNodeId(l,u),c}_createNodeIndexDocument(t,e,r,n,i){const{texture:o,attributes:s}=i,a=n.index,u={version:t.version,id:a.toString(),path:a.toString(),level:t.level+1,...e,lodSelection:r,parentNode:{id:t.id,href:"../"+t.id,mbs:t.mbs,obb:t.obb},children:[],neighbors:[]},c=Qo()(u,fa);if(n.mesh&&(c.geometryData=[{href:"./geometries/0"}],c.sharedResource={href:"./shared"},o&&(c.textureData=[{href:"./textures/0"}]),s&&s.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)){c.attributeData=[];for(let t=0;t<s.length;t++){const e=this.layers0.attributeStorageInfo[t].key;c.attributeData.push({href:`./attributes/${e}/0`})}}return c}async _writeResources(t,e){const{geometry:r,compressedGeometry:n,texture:i,sharedResources:o,attributes:s}=t,a=Object(Bo.join)(this.layers0Path,"nodes",e),u=Object(Bo.join)("nodes",e);await this._writeGeometries(r,n,a,u),await this._writeShared(o,a,u,e),await this._writeTexture(i,a,u),await this._writeAttributes(s,a,u)}async _writeGeometries(t,e,r,n){if(this.options.slpk){const e=Object(Bo.join)(r,"geometries");this.fileMap[n+"/geometries/0.bin.gz"]=await Object(Jo.e)(e,t,"0.bin")}else{const e=Object(Bo.join)(r,"geometries/0/");await Object(Jo.d)(e,t,"index.bin")}if(this.options.draco)if(this.options.slpk){const t=Object(Bo.join)(r,"geometries");this.fileMap[n+"/geometries/1.bin.gz"]=await Object(Jo.e)(t,e,"1.bin")}else{const t=Object(Bo.join)(r,"geometries/1/");await Object(Jo.d)(t,e,"index.bin")}}async _writeShared(t,e,r,n){t.nodePath=n;const i=Qo()(t,ma),o=JSON.stringify(i);if(this.options.slpk){const t=Object(Bo.join)(e,"shared");this.fileMap[r+"/shared/sharedResource.json.gz"]=await Object(Jo.e)(t,o,"sharedResource.json")}else{const t=Object(Bo.join)(e,"shared/");await Object(Jo.d)(t,o)}}async _writeTexture(t,e,r){if(t){const n=this._getFormatByMimeType(t.mimeType);this.layers0.textureSetDefinitions.length||this.layers0.textureSetDefinitions.push({formats:[{name:"0",format:n}]});const i=t.bufferView.data;if(this.options.slpk){const t=Object(Bo.join)(e,"textures"),o=!1;this.fileMap[`${r}/textures/0.${n}`]=await Object(Jo.e)(t,i,"0."+n,o)}else{const t=Object(Bo.join)(e,"textures/0/");await Object(Jo.d)(t,i,"index."+n)}}}async _writeAttributes(t,e,r){if(t.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)for(let n=0;n<t.length;n++){const i=this.layers0.attributeStorageInfo[n].key,o=new Uint8Array(t[n]);if(this.options.slpk){const t=Object(Bo.join)(e,"attributes",i);this.fileMap[`${r}/attributes/${i}.bin.gz`]=await Object(Jo.e)(t,o,"0.bin")}else{const t=Object(Bo.join)(e,`attributes/${i}/0`);await Object(Jo.d)(t,o,"index.bin")}}}_getFormatByMimeType(t){switch(t){case"image/jpeg":return"jpg";case"image/png":return"png";default:return"jpg"}}_findOrCreateMaterial(t){const e=Xo()(JSON.stringify(t));if(this.materialMap.has(e))return this.materialMap.get(e);const r=this.materialDefinitions.push(t)-1;return this.materialMap.set(e,r),r}_createdStorageAttribute(t,e,r){const n={key:"f_"+t,name:e,ordering:["attributeValues"],header:[{property:"count",valueType:"UInt32"}],attributeValues:{valueType:"Int32",valuesPerElement:1}};switch(r){case"OBJECTID":this._setupIdAttribute(n);break;case"string":this._setupStringAttribute(n);break;case"double":this._setupDoubleAttribute(n);break;case"Int32":break;default:this._setupStringAttribute(n)}return n}getAttributeType(t,e){return"OBJECTID"===t?"OBJECTID":"string"==typeof e?"string":"number"==typeof e?Number.isInteger(e)?"Int32":"double":"string"}_setupStringAttribute(t){t.ordering.unshift("attributeByteCounts"),t.header.push({property:"attributeValuesByteCount",valueType:"UInt32"}),t.attributeValues={valueType:"String",encoding:"UTF-8",valuesPerElement:1},t.attributeByteCounts={valueType:"UInt32",valuesPerElement:1}}_setupIdAttribute(t){t.attributeValues={valueType:"Oid32",valuesPerElement:1}}_setupDoubleAttribute(t){t.attributeValues={valueType:"Float64",valuesPerElement:1}}_createFieldAttribute(t,e){return{name:t,type:e,alias:t}}_convertBatchTableInfoToNodeAttributes(t){let e=0;const r={OBJECTID:[0],...t};for(const t in r){const n=r[t][0],i=this.getAttributeType(t,n),o=this._createdStorageAttribute(e,t,i),s=this._getFieldAttributeType(i),a=this._createFieldAttribute(t,s),u=this._createPopupInfo(r);this.layers0.attributeStorageInfo.push(o),this.layers0.fields.push(a),this.layers0.popupInfo=u,this.layers0.layerType="3DObject",e+=1}}_getFieldAttributeType(t){switch(t){case"OBJECTID":return"esriFieldTypeOID";case"string":return"esriFieldTypeString";case"Int32":return"esriFieldTypeInteger";case"double":return"esriFieldTypeDouble";default:return"esriFieldTypeString"}}_createPopupInfo(t){const e=[],r=[];for(const r in t)e.push({fieldName:r,visible:!0,isEditable:!1,label:r});return r.push({fieldInfos:e,type:"fields"}),{title:"{OBJECTID}",mediaInfos:[],popupElements:r,fieldInfos:e,expressionInfos:[]}}async _finishConversion(t){const{tilesCount:e,tilesWithAddRefineCount:r}=this.refinementCounter,n=r?r/e*100:0,i=await ns(t),o=rs(Vo.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finishing conversion of 3DTILES"),console.log("Total conversion time: "+o),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",i," bytes"),console.log('Percentage of tiles with "ADD" refinement type:',n,"%"),console.log("------------------------------------------------")}async _fetchPreloadOptions(){const t={"cesium-ion":{accessToken:this.options.token||Ca}},e=await Po.preload(this.options.inputUrl,t);return this.refreshTokenTime=Vo.a.hrtime(),{...t,...e}}async _updateTilesetOptions(){if(Vo.a.hrtime(this.refreshTokenTime)[0]<1800)return;this.refreshTokenTime=Vo.a.hrtime();const t=await this._fetchPreloadOptions();this.sourceTileset.options={...this.sourceTileset.options,...t},t.headers&&(this.sourceTileset.loadOptions.fetch={...this.sourceTileset.loadOptions.fetch,headers:t.headers},console.log("Authorization Bearer token has been updated"))}_checkAddRefinementTypeForTile(t){1===t.refine&&(this.refinementCounter.tilesWithAddRefineCount+=1,console.warn('This tile uses "ADD" type of refinement')),this.refinementCounter.tilesCount+=1}}var Da=r(150);new Uint8Array([0]);const Pa=[171,75,84,88,32,50,48,187,13,10,26,10];var La,Ba,Na,ja,Ua,Fa,za,Ga,Ha;(Ha=La||(La={}))[Ha.NONE=0]="NONE",Ha[Ha.BASISLZ=1]="BASISLZ",Ha[Ha.ZSTD=2]="ZSTD",Ha[Ha.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(Ba||(Ba={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(Na||(Na={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(ja||(ja={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Ua||(Ua={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Fa||(Fa={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(za||(za={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(Ga||(Ga={}));class Wa{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=La.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:Ba.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:Na.UNSPECIFIED,colorPrimaries:ja.SRGB,transferFunction:ja.SRGB,flags:Fa.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class qa{constructor(t,e,r,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,r),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const r=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&n<t;)n++,this._offset++;return n<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,n)}}function Va(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Za(t,e){const r=new Array(e.mipMapLevels);let n=e.width,i=e.height,o=0;for(let s=0;s<e.mipMapLevels;++s){const a=Ka(e,n,i,t,s),u=Qa(t,s,o,a);r[s]={compressed:!0,format:e.internalFormat,data:u,width:n,height:i,levelSize:a},n=Math.max(1,n>>1),i=Math.max(1,i>>1),o+=a}return r}function Qa(t,e,r,n){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+r,n)}function Ka(t,e,r,n,i){return Array.isArray(n)?t.sizeFunction(n[i]):t.sizeFunction(e,r)}const Xa={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},Ya={131:Xa.COMPRESSED_RGB_S3TC_DXT1_EXT,132:Xa.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:Xa.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:Xa.COMPRESSED_RED_RGTC1_EXT,140:Xa.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:Xa.COMPRESSED_RED_GREEN_RGTC2_EXT,142:Xa.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:Xa.COMPRESSED_RGB8_ETC2,148:Xa.COMPRESSED_SRGB8_ETC2,149:Xa.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:Xa.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:Xa.COMPRESSED_RGBA8_ETC2_EAC,152:Xa.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:Xa.COMPRESSED_R11_EAC,154:Xa.COMPRESSED_SIGNED_R11_EAC,155:Xa.COMPRESSED_RG11_EAC,156:Xa.COMPRESSED_SIGNED_RG11_EAC,157:Xa.COMPRESSED_RGBA_ASTC_4x4_KHR,158:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:Xa.COMPRESSED_RGBA_ASTC_5x4_KHR,160:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:Xa.COMPRESSED_RGBA_ASTC_5x5_KHR,162:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:Xa.COMPRESSED_RGBA_ASTC_6x5_KHR,164:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:Xa.COMPRESSED_RGBA_ASTC_6x6_KHR,166:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:Xa.COMPRESSED_RGBA_ASTC_8x5_KHR,168:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:Xa.COMPRESSED_RGBA_ASTC_8x6_KHR,170:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:Xa.COMPRESSED_RGBA_ASTC_8x8_KHR,172:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:Xa.COMPRESSED_RGBA_ASTC_10x5_KHR,174:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:Xa.COMPRESSED_RGBA_ASTC_10x6_KHR,176:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:Xa.COMPRESSED_RGBA_ASTC_10x8_KHR,178:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:Xa.COMPRESSED_RGBA_ASTC_10x10_KHR,180:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:Xa.COMPRESSED_RGBA_ASTC_12x10_KHR,182:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:Xa.COMPRESSED_RGBA_ASTC_12x12_KHR,184:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:Xa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:Xa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:Xa.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:Xa.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:Xa.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:Xa.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:Xa.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:Xa.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:Xa.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:Xa.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:Xa.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:Xa.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:Xa.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:Xa.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:Xa.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:Xa.COMPRESSED_RGBA_ASTC_12x12_KHR};const $a=[171,75,84,88,32,50,48,187,13,10,26,10];function Ja(t){const e=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,Pa.length);if(e[0]!==Pa[0]||e[1]!==Pa[1]||e[2]!==Pa[2]||e[3]!==Pa[3]||e[4]!==Pa[4]||e[5]!==Pa[5]||e[6]!==Pa[6]||e[7]!==Pa[7]||e[8]!==Pa[8]||e[9]!==Pa[9]||e[10]!==Pa[10]||e[11]!==Pa[11])throw new Error("Missing KTX 2.0 identifier.");const r=new Wa,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new qa(t,Pa.length,n,!0);r.vkFormat=i._nextUint32(),r.typeSize=i._nextUint32(),r.pixelWidth=i._nextUint32(),r.pixelHeight=i._nextUint32(),r.pixelDepth=i._nextUint32(),r.layerCount=i._nextUint32(),r.faceCount=i._nextUint32();const o=i._nextUint32();r.supercompressionScheme=i._nextUint32();const s=i._nextUint32(),a=i._nextUint32(),u=i._nextUint32(),c=i._nextUint32(),l=i._nextUint64(),h=i._nextUint64(),f=new qa(t,Pa.length+n,3*o*8,!0);for(let e=0;e<o;e++)r.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+f._nextUint64(),f._nextUint64()),uncompressedByteLength:f._nextUint64()});const d=new qa(t,s,a,!0),p={vendorId:d._skip(4)._nextUint16(),descriptorType:d._nextUint16(),versionNumber:d._nextUint16(),descriptorBlockSize:d._nextUint16(),colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:{x:d._nextUint8()+1,y:d._nextUint8()+1,z:d._nextUint8()+1,w:d._nextUint8()+1},bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},g=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<g;t++)p.samples[t]={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelID:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:d._nextUint32(),sampleUpper:d._nextUint32()};r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(p);const _=new qa(t,u,c,!0);for(;_._offset<c;){const t=_._nextUint32(),e=_._scan(t),n=Va(e),i=_._scan(t-e.byteLength);r.keyValue[n]=n.match(/^ktx/i)?Va(i):i,t%4&&_._skip(4-t%4)}if(h<=0)return r;const m=new qa(t,l,h,!0),y=m._nextUint16(),b=m._nextUint16(),w=m._nextUint32(),v=m._nextUint32(),E=m._nextUint32(),S=m._nextUint32(),A=[];for(let t=0;t<o;t++)A.push({imageFlags:m._nextUint32(),rgbSliceByteOffset:m._nextUint32(),rgbSliceByteLength:m._nextUint32(),alphaSliceByteOffset:m._nextUint32(),alphaSliceByteLength:m._nextUint32()});const T=l+m._offset,R=T+w,O=R+v,x=O+E,k=new Uint8Array(t.buffer,t.byteOffset+T,w),I=new Uint8Array(t.buffer,t.byteOffset+R,v),C=new Uint8Array(t.buffer,t.byteOffset+O,E),M=new Uint8Array(t.buffer,t.byteOffset+x,S);return r.globalData={endpointCount:y,selectorCount:b,imageDescs:A,endpointsData:k,selectorsData:I,tablesData:C,extendedData:M},r}(new Uint8Array(t)),r=Math.max(1,e.levels.length),n=e.pixelWidth,i=e.pixelHeight,o=(s=e.vkFormat,Ya[s]);var s;return Za(e.levels,{mipMapLevels:r,width:n,height:i,sizeFunction:t=>t.uncompressedByteLength,internalFormat:o})}const tu={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:Xa.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":Xa.COMPRESSED_RGB_ATC_WEBGL,ATCA:Xa.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:Xa.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:ru,DXT3:nu,DXT5:nu,"ATC ":ru,ATCA:nu,ATCI:nu}};function eu(t){const e=new Int32Array(t,0,tu.HEADER_LENGTH),r=e[tu.HEADER_PF_FOURCC_INDEX];Object(Ct.a)(Boolean(e[tu.HEADER_PF_FLAGS_INDEX]&tu.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");const n=(i=r,String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255));var i;const o=tu.PIXEL_FORMATS[n],s=tu.SIZE_FUNCTIONS[n];Object(Ct.a)(o&&s,"DDS: Unknown pixel format "+r);let a=1;e[tu.HEADER_FLAGS_INDEX]&tu.DDSD_MIPMAPCOUNT&&(a=Math.max(1,e[tu.MIPMAPCOUNT_INDEX]));const u=e[tu.HEADER_WIDTH_INDEX],c=e[tu.HEADER_HEIGHT_INDEX],l=e[tu.HEADER_SIZE_INDEX]+4;return Za(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}function ru(t,e){return(t+3>>2)*(e+3>>2)*8}function nu(t,e){return(t+3>>2)*(e+3>>2)*16}const iu=55727696,ou=1347834371,su=13,au=52,uu=0,cu=2,lu=4,hu=6,fu=7,du=11,pu=12,gu={0:[Xa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[Xa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[Xa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[Xa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[Xa.COMPRESSED_RGB_ETC1_WEBGL],7:[Xa.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[Xa.COMPRESSED_RGB8_ETC2],23:[Xa.COMPRESSED_RGBA8_ETC2_EAC],24:[Xa.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[Xa.COMPRESSED_R11_EAC],26:[Xa.COMPRESSED_RG11_EAC],27:[Xa.COMPRESSED_RGBA_ASTC_4X4_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[Xa.COMPRESSED_RGBA_ASTC_5X4_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[Xa.COMPRESSED_RGBA_ASTC_5X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[Xa.COMPRESSED_RGBA_ASTC_6X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[Xa.COMPRESSED_RGBA_ASTC_6X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[Xa.COMPRESSED_RGBA_ASTC_8X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[Xa.COMPRESSED_RGBA_ASTC_8X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[Xa.COMPRESSED_RGBA_ASTC_8X8_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[Xa.COMPRESSED_RGBA_ASTC_10X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[Xa.COMPRESSED_RGBA_ASTC_10X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[Xa.COMPRESSED_RGBA_ASTC_10X8_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[Xa.COMPRESSED_RGBA_ASTC_10X10_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[Xa.COMPRESSED_RGBA_ASTC_12X10_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[Xa.COMPRESSED_RGBA_ASTC_12X12_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},_u={0:mu,1:mu,2:yu,3:yu,6:bu,7:bu,9:wu,11:wu,22:bu,23:wu,24:bu,25:bu,26:wu,27:wu,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function mu(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function yu(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function bu(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function wu(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function vu(t){if(function(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,$a.length);return!(e[0]!==$a[0]||e[1]!==$a[1]||e[2]!==$a[2]||e[3]!==$a[3]||e[4]!==$a[4]||e[5]!==$a[5]||e[6]!==$a[6]||e[7]!==$a[7]||e[8]!==$a[8]||e[9]!==$a[9]||e[10]!==$a[10]||e[11]!==$a[11])}(t))return Ja(t);if(function(t){return new Uint32Array(t,0,tu.HEADER_LENGTH)[tu.MAGIC_NUMBER_INDEX]===tu.MAGIC_NUMBER}(t))return eu(t);if(function(t){const e=new Uint32Array(t,0,su)[uu];return e===iu||e===ou}(t))return function(t){const e=new Uint32Array(t,0,su),r=e[cu],n=e[lu],i=gu[r]||[],o=i.length>1&&n?i[1]:i[0],s=_u[r],a=e[du],u=e[fu],c=e[hu],l=au+e[pu];return Za(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}const Eu={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.13",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},Su={...Eu,parse:async t=>vu(t)};function Au(t,e=null){return e?`${t}?token=${e}`:t}var Tu=5121,Ru=5125,Ou=5126,xu=5130;const ku={UInt8:Uint8Array,UInt16:Uint16Array,UInt32:Uint32Array,Float32:Float32Array,UInt64:Float64Array},Iu={UInt8:Tu,UInt16:Ru,Float32:Ou,UInt32:Ru,UInt64:xu},Cu={position:"position",normal:"normal",uv0:"uv0",color:"color",region:"region"},Mu={vertexAttributes:"vertexAttributes",featureAttributeOrder:"featureAttributeOrder",featureAttributes:"featureAttributes"},Du="header",Pu="vertexCount",Lu="featureCount",Bu={UInt8:1,UInt16:2,UInt32:4,Float32:4,UInt64:8},Nu=new nt([0,0,0]),ju={jpeg:Oi,png:Oi,"ktx-etc2":Su,dds:Su};async function Uu(t,e,r,n,i){if(e.content=e.content||{},e.content.featureIds=e.content.featureIds||null,e.content.featureData=function(t,e){const r=e.store.defaultGeometrySchema,n=r;for(const t in Mu)for(const e in Cu){const i=r[t][e];if(i){const{byteOffset:r=0,count:o=0,valueType:s,valuesPerElement:a}=i;n[t][e]={valueType:s,valuesPerElement:a,byteOffset:r,count:o}}}return n.attributesOrder=r.ordering,n}(0,r),e.content.attributes={},e.textureUrl){var o;const t=Au(e.textureUrl,null==n||null===(o=n.i3s)||void 0===o?void 0:o.token),r=ju[e.textureFormat]||Oi,s=await fetch(t),u=await s.arrayBuffer();if(r===Oi){const t={image:{type:"data"}};e.content.texture=await i.parse(u,t)}else if(r===Su){const t=await Object(a.a)(u,Su);e.content.texture={compressed:!0,mipmaps:!1,width:t[0].width,height:t[0].height,data:t}}}return e.content.material=function(t,e){let r;t?r={...t,pbrMetallicRoughness:t.pbrMetallicRoughness?{...t.pbrMetallicRoughness}:{baseColorFactor:[255,255,255,255]}}:(r={pbrMetallicRoughness:{}},e?r.pbrMetallicRoughness.baseColorTexture={texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]);r.alphaCutoff=r.alphaCutoff||.25,r.alphaMode&&(r.alphaMode=r.alphaMode.toUpperCase());r.emissiveFactor&&(r.emissiveFactor=Hu(r.emissiveFactor));r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorFactor&&(r.pbrMetallicRoughness.baseColorFactor=Hu(r.pbrMetallicRoughness.baseColorFactor));return function(t,e){const r={source:{image:e}};t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?t.pbrMetallicRoughness.baseColorTexture={...t.pbrMetallicRoughness.baseColorTexture,texture:r}:t.emissiveTexture?t.emissiveTexture={...t.emissiveTexture,texture:r}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?t.pbrMetallicRoughness.metallicRoughnessTexture={...t.pbrMetallicRoughness.metallicRoughnessTexture,texture:r}:t.normalTexture?t.normalTexture={...t.normalTexture,texture:r}:t.occlusionTexture&&(t.occlusionTexture={...t.occlusionTexture,texture:r})}(r,e),r}(e.materialDefinition,e.content.texture),e.content.material&&(e.content.texture=null),await async function(t,e={},r){if(!e.content)return e;const n=e.content;let i,o,s=0,a=0;if(e.isDracoGeometry){const e=await Object(Da.a)(t,kn,{draco:{attributeNameEntry:"i3s-attribute-type"}});o=e.header.vertexCount;const r=e.indices.value,{POSITION:n,NORMAL:s,COLOR_0:a,TEXCOORD_0:u,"feature-index":c,"uv-region":l}=e.attributes;i={position:n,normal:s,color:a,uv0:u,uvRegion:l,id:c,indices:r},function(t,e){for(const r in e.loaderData.attributes){const n=e.loaderData.attributes[r];switch(n.name){case"POSITION":t.position.metadata=n.metadata;break;case"feature-index":t.id.metadata=n.metadata}}}(i,e);const h=function(t){return t&&t.metadata&&t.metadata["i3s-feature-ids"]&&t.metadata["i3s-feature-ids"].intArray}(c);h&&function(t,e){const r=t.id.value,n=new Float32Array(r.length);for(let t=0;t<r.length;t++)n[t]=e[r[t]];t.id.value=n}(i,h)}else{const{vertexAttributes:e,attributesOrder:r,featureAttributes:u,featureAttributeOrder:c}=n.featureData,l=function(t,e){let r=0,n=0,i=0;const o=t.featureData[Du];for(const t in o){const{property:s,type:a}=o[t],u=ku[a];s===Pu&&(n=new u(e,0,4)[0],r+=Bu[a]),s===Lu&&(i=new u(e,4,4)[0],r+=Bu[a])}return{vertexCount:n,featureCount:i,byteOffset:r}}(n,t);s=l.byteOffset,o=l.vertexCount,a=l.featureCount;const{attributes:h,byteOffset:f}=zu(t,s,e,o,r),{attributes:d}=zu(t,f,u,a,c);!function(t){const{id:e,faceRange:r}=t;if(!e||!r)return;const n=e.value,i=r.value,o=i[i.length-1]+1,s=new Uint32Array(3*o);let a=0,u=0;for(let t=1;t<i.length;t+=2){const e=Number(n[a]),r=i[t],o=i[t-1],c=u+3*(r-o+1);s.fill(e,u,c),a++,u=c}t.id.value=s}(d),i=function(t,e){return{...t,...e}}(h,d)}const{enuMatrix:u,cartographicOrigin:c,cartesianOrigin:l}=function(t,e){const r=e.mbs,n=t.value,i=t.metadata,o=new J,s=new nt(r[0],r[1],r[2]),a=new nt;return kt.WGS84.cartographicToCartesian(s,a),kt.WGS84.eastNorthUpToFixedFrame(a,o),t.value=function(t,e={},r){const n=new Float64Array(t.length),i=e["i3s-scale_x"]&&e["i3s-scale_x"].double||1,o=e["i3s-scale_y"]&&e["i3s-scale_y"].double||1;for(let e=0;e<n.length;e+=3)n[e]=t[e]*i+r.x,n[e+1]=t[e+1]*o+r.y,n[e+2]=t[e+2]+r.z;for(let t=0;t<n.length;t+=3)kt.WGS84.cartographicToCartesian(n.subarray(t,t+3),Nu),n[t]=Nu.x,n[t+1]=Nu.y,n[t+2]=Nu.z;return n}(n,i,s),{enuMatrix:o,fixedFrameToENUMatrix:o.invert(),cartographicOrigin:s,cartesianOrigin:a}}(i.position,e),h=(new J).multiplyRight(u);n.attributes={positions:i.position,normals:i.normal,colors:Fu(i.color),texCoords:i.uv0,uvRegions:Fu(i.uvRegion)},n.indices=i.indices||null,i.id&&i.id.value&&(e.content.featureIds=i.id.value);for(const t in n.attributes)n.attributes[t]||delete n.attributes[t];return n.vertexCount=o,n.cartographicCenter=c,n.cartesianOrigin=l,n.modelMatrix=h.invert(),n.byteLength=t.byteLength,e}(t,e)}function Fu(t){return t?(t.normalized=!0,t):t}function zu(t,e,r,n,i){const o={};for(const s of i)if(r[s]){const{valueType:i,valuesPerElement:a}=r[s],u=n;if(e+u*a>t.byteLength)break;const c=t.slice(e);let l=[];if("UInt64"===i)l=Gu(c,u*a,Bu[i]);else{l=new(0,ku[i])(c,0,u*a)}switch(o[s]={value:l,type:Iu[i],size:a},s){case"color":o.color.normalized=!0}e+=u*a*Bu[i]}return{attributes:o,byteOffset:e}}function Gu(t,e,r){const n=[],i=new DataView(t);let o=0;for(let t=0;t<e;t++){const t=i.getUint32(o,!0)+2**32*i.getUint32(o+4,!0);n.push(t),o+=r}return n}function Hu(t){const e=[...t];for(let r=0;r<t.length;r++)e[r]=t[r]/255;return e}const Wu={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:"3.0.13",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const{tile:n,tileset:i}=(null==e?void 0:e.i3s)||{};return await Uu(t,n,i,e,r),n.content},extensions:["bin"],options:{"i3s-content":{}}};const qu=["","WEBKIT_","MOZ_"],Vu={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Zu=null;function Qu(t){if(!Zu){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,Zu=new Set;for(const e of qu)for(const r in Vu)if(t&&t.getExtension(`${e}${r}`)){const t=Vu[r];Zu.add(t)}}return Zu}async function Ku(t){return JSON.parse((new TextDecoder).decode(t))}const Xu={name:"I3S Node Page",id:"i3s-node-page",module:"i3s",version:"3.0.13",mimeTypes:["application/json"],parse:async function(t){return t=Ku(t)},extensions:["json"],options:{}};function Yu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class $u{constructor(t,e){Yu(this,"tileset",void 0),Yu(this,"nodePages",void 0),Yu(this,"nodesPerPage",void 0),Yu(this,"options",void 0),Yu(this,"lodSelectionMetricType",void 0),Yu(this,"textureDefinitionsSelectedFormats",void 0),this.tileset={...t},this.nodesPerPage=t.nodePages.nodesPerPage,this.lodSelectionMetricType=t.nodePages.lodSelectionMetricType,this.options=e,this.nodePages=[],this.textureDefinitionsSelectedFormats=[],this._initSelectedFormatsForTextureDefinitions(t)}async getNodeById(t){const e=Math.floor(t/this.nodesPerPage);if(!this.nodePages[e]){var r;const t=Au(`${this.tileset.url}/nodepages/${e}`,null===(r=this.options.i3s)||void 0===r?void 0:r.token);this.nodePages[e]=Object(a.a)(t,Xu,this.options),this.nodePages[e]=await this.nodePages[e]}this.nodePages[e]instanceof Promise&&(this.nodePages[e]=await this.nodePages[e]);const n=t%this.nodesPerPage;return this.nodePages[e].nodes[n]}async formTileFromNodePages(t){const e=await this.getNodeById(t),r=[];for(const t of e.children||[]){const e=await this.getNodeById(t);r.push({id:t,obb:e.obb})}let n=null,i=null,o=null,s="jpeg",a=[],u=!1;if(e&&e.mesh){const{url:t,isDracoGeometry:r}=e.mesh.geometry&&this._getContentUrl(e.mesh.geometry)||{url:null,isDracoGeometry:null};n=t,u=r;const[c,l]=this._getInformationFromMaterial(e.mesh.material);o=l,s=c.format||s,c.name&&(i=`${this.tileset.url}/nodes/${e.mesh.material.resource}/textures/${c.name}`),this.tileset.attributeStorageInfo&&(a=function(t,e){const r=[],{attributeStorageInfo:n,url:i}=t;for(let t=0;t<n.length;t++){const o=n[t].key;r.push(`${i}/nodes/${e}/attributes/${o}/0`)}return r}(this.tileset,e.mesh.attribute.resource))}return Ju({id:t,lodSelection:this._getLodSelection(e),obb:e.obb,contentUrl:n,textureUrl:i,attributeUrls:a,materialDefinition:o,textureFormat:s,children:r,isDracoGeometry:u})}_getContentUrl(t){let e={};const r=this.tileset.geometryDefinitions[t.definition];let n=-1;if(this.options.i3s&&this.options.i3s.useDracoGeometry&&(n=r.geometryBuffers.findIndex(t=>t.compressedAttributes&&"draco"===t.compressedAttributes.encoding)),-1===n&&(n=r.geometryBuffers.findIndex(t=>!t.compressedAttributes)),-1!==n){const i=Boolean(r.geometryBuffers[n].compressedAttributes);e={url:`${this.tileset.url}/nodes/${t.resource}/geometries/${n}`,isDracoGeometry:i}}return e}_getLodSelection(t){const e=[];return"maxScreenThresholdSQ"===this.lodSelectionMetricType&&e.push({metricType:"maxScreenThreshold",maxError:Math.sqrt(t.lodThreshold/(.25*Math.PI))}),e.push({metricType:this.lodSelectionMetricType,maxError:t.lodThreshold}),e}_getInformationFromMaterial(t){const e={name:null,format:null};if(t){const r=this.tileset.materialDefinitions[t.definition],n=r&&r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture&&r.pbrMetallicRoughness.baseColorTexture.textureSetDefinitionId;if(n||0===n){return[this.textureDefinitionsSelectedFormats[n]||e,r]}return[e,r]}return[e,null]}_initSelectedFormatsForTextureDefinitions(t){this.textureDefinitionsSelectedFormats=[];const e=this._getSupportedTextureFormats(),r=t.textureSetDefinitions||[];for(const t of r){const r=t&&t.formats||[];let n=null;for(const t of e){const e=r.find(e=>e.format===t);if(e){n=e;break}}this.textureDefinitionsSelectedFormats.push(n)}}_getSupportedTextureFormats(){const t=[];if(!this.options.i3s||this.options.i3s.useCompressedTextures){const e=Qu();e.has("etc2")&&t.push("ktx-etc2"),e.has("dxt")&&t.push("dds")}return t.push("jpg"),t.push("png"),t}}function Ju(t){const e=t.obb?[...kt.WGS84.cartographicToCartesian(t.obb.center),...t.obb.halfSize,...t.obb.quaternion]:void 0;let r;if(t.mbs)r=[...kt.WGS84.cartographicToCartesian(t.mbs.slice(0,3)),t.mbs[3]];else if(e){const n=(new De).fromCenterHalfSizeQuaternion(e.slice(0,3),t.obb.halfSize,t.obb.quaternion).getBoundingSphere();r=[...n.center,n.radius],t.mbs=[...t.obb.center,n.radius]}return t.boundingVolume={sphere:r,box:e},t.lodMetricType=t.lodSelection[0].metricType,t.lodMetricValue=t.lodSelection[0].maxError,t.transformMatrix=t.transform,t.type=nr,t.refine=Je,t}const tc=/layers\/[0-9]+$/,ec=/nodes\/([0-9-]+|root)$/,rc={name:"I3S (Indexed Scene Layers)",id:"i3s",module:"i3s",version:"3.0.13",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const n=r.url;e.i3s=e.i3s||{};if("504b0304"===function(t){if(t instanceof ArrayBuffer)return[...new Uint8Array(t,0,4)].map(t=>t.toString(16).padStart(2,"0")).join("");return null}(t))throw new Error("Files with .slpk extention currently are not supported by I3SLoader");let i,o;i="auto"===e.i3s.isTileset?tc.test(n):e.i3s.isTileset;o="auto"===e.isTileHeader?ec.test(n):e.i3s.isTileHeader;i?t=await async function(t,e,r){const n=JSON.parse((new TextDecoder).decode(t));return n.loader=rc,await async function(t,e,r){if(t.url=r.url,t.nodePages)t.nodePagesTile=new $u(t,e),t.root=await t.nodePagesTile.formTileFromNodePages(0);else{var n;const r=Au(t.url+"/nodes/root",null===(n=e.i3s)||void 0===n?void 0:n.token);t.root=await Object(a.a)(r,t.loader,{i3s:{loadContent:!1,isTileHeader:!0,isTileset:!1}})}t.basePath=t.url,t.type=ir,t.lodMetricType=t.root.lodMetricType,t.lodMetricValue=t.root.lodMetricValue}(n,e,r),n}(t,e,r):o?(t=await async function(t,e,r){return function(t,e,r){return t.url=r.url,t.featureData&&(t.featureUrl=`${t.url}/${t.featureData[0].href}`),t.geometryData&&(t.contentUrl=`${t.url}/${t.geometryData[0].href}`),t.textureData&&(t.textureUrl=`${t.url}/${t.textureData[0].href}`),t.attributeData&&(t.attributeUrls=function(t){const{url:e,attributeData:r}=t,n=[];for(let t=0;t<r.length;t++){const i=r[t].href.replace("./","");n.push(`${e}/${i}`)}return n}(t)),Ju(t)}(t=JSON.parse((new TextDecoder).decode(t)),0,r)}(t,0,r),e.i3s.loadContent&&(e.i3s.tile=t,await Object(a.a)(t.contentUrl,rc,e))):t=await async function(t,e){return await Object(Da.a)(t,Wu,e)}(t,e);return t},extensions:["bin"],options:{i3s:{loadContent:!0,token:null,isTileset:"auto",isTileHeader:"auto",tile:null,tileset:null,useDracoGeometry:!0,useCompressedTextures:!0}}};async function nc(t,e){const{attributeName:r,attributeType:n}=e;return r?{[r]:n?ic(n,t):null}:{}}function ic(t,e){switch(t){case"String":return function(t){const e=[];try{const r=new DataView(t,0,4).getUint32(0,!0),n=new Uint32Array(t,8,r);let i=8+4*r;for(const r of n){const n=new TextDecoder("utf-8"),o=new Uint8Array(t,i,r);e.push(n.decode(o)),i+=r}}catch(t){console.error("Parse string attribute error: ",t.message)}return e}(e);case"Oid32":return oc(e);case"Float64":return function(t){return new Float64Array(t,8)}(e);default:return oc(e)}}function oc(t){return new Uint32Array(t,4)}const sc={name:"I3S Attribute",id:"i3s-attribute",module:"i3s",version:"3.0.13",mimeTypes:["application/binary"],parse:async function(t,e){return t=nc(t,e)},extensions:["bin"],options:{},binary:!0};function ac(t,e){const r=[t.center[0],t.center[1],t.center[2]+e.getHeight(t.center[1],t.center[0])],n=kt.WGS84.cartographicToCartesian(r,new nt),i=(new De).fromCenterHalfSizeQuaternion(n,t.halfSize,t.quaternion);return[...i.center,...i.halfAxes.toArray()]}const uc={version:{path:"version",default:"1.0"}},cc={boundingVolume:{path:"boundingVolume"},geometricError:{path:"geometricError"},content:{path:"content"},children:{path:"children",transform:t=>t.map(t=>Qo()(t,cc))}},lc={asset:{path:"asset",transform:t=>Qo()(t,uc)},geometricError:{path:"root",transform:t=>t.geometricError},root:{path:"root",transform:t=>Qo()(t,cc)}};var hc=r(82);const fc=1179937895;function dc(t,e,r,n){return function(t,{firstBuffer:e=0}={}){if(t.buffers&&t.buffers.length>e)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(t),function(t,e,r=0,n={}){const{magic:i=fc,version:o=2,json:s={},binary:a}=t,u=r;e&&(e.setUint32(r+0,i,!0),e.setUint32(r+4,o,!0),e.setUint32(r+8,0,!0));const c=r+8,l=r+=12;e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,1313821514,!0)),r+=8;const h=JSON.stringify(s);if(r=Object(hc.b)(e,r,h,4),e){const t=r-l-8;e.setUint32(l+0,t,!0)}if(a){const t=r;if(e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,5130562,!0)),r+=8,r=Object(hc.a)(e,r,a,4),e){const n=r-t-8;e.setUint32(t+0,n,!0)}}if(e){const t=r-u;e.setUint32(c,t,!0)}return r}(t,e,r,n)}const pc={name:"glTF",id:"gltf",module:"gltf",version:"3.0.13",extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(t,e={}){const{byteOffset:r=0}=e,n=dc(t,null,r,e),i=new ArrayBuffer(n),o=new DataView(i);return dc(t,o,r,e),i},options:{gltf:{}}};function gc(t,e,r){if(!e)return r+12;const{magic:n,version:i=1,byteLength:o=12}=t;return Object(Ct.a)(Array.isArray(n)&&Number.isFinite(i)&&Number.isFinite(o)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,i,!0),e.setUint32(r+8,o,!0),r+=12}function _c(t,e,r){t&&t.setUint32(e+8,r,!0)}var mc=r(61);const yc={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function bc(t,e,r,n){switch(Object(Ct.a)("string"==typeof t.type),t.type){case Lr.COMPOSITE:return function(t,e,r,n,i){const o=r;r+=gc(t={magic:Br.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let o=0;o<t.tiles.length;++o)r+=i(t.tiles[o],e,r,n);return _c(e,o,r-o),r}(t,e,r,n,bc);case Lr.POINT_CLOUD:return function(t,e,r,n){const{featureTableJson:i=yc}=t;let o=JSON.stringify(i);o=Object(mc.c)(o,4);const{featureTableJsonByteLength:s=o.length}=t,a=new ArrayBuffer(12),u=a.byteLength,c=r;return r+=gc(t={magic:Br.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,s,!0),e.setUint32(r+4,u,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=Object(mc.b)(e,r,o,s),_c(e,c,(r+=Object(mc.a)(e,r,a,u))-c),r}(t,e,r);case Lr.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=0,batchTable:o}=t,s={BATCH_LENGTH:i},a=JSON.stringify(s),u=o?JSON.stringify(o):"",c=Object(Di.b)(a.length,8),l=u?Object(Di.b)(u.length,8):0,h=r;r=gc(t={magic:Br.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,c,!0),e.setUint32(16,0,!0),e.setUint32(20,l,!0),e.setUint32(24,0,!0)),r+=16,r=Object(hc.b)(e,r,a,8),o&&(r=Object(hc.b)(e,r,u,8));const f=t.gltfEncoded;return f&&(r=Object(mc.a)(e,r,f,f.byteLength)),_c(e,h,r-h),r}(t,e,r);case Lr.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=1,gltfFormat:o=1,gltfUri:s=""}=t,a=s.length,u={INSTANCES_LENGTH:i,POSITION:new Array(3*i).fill(0)},c=JSON.stringify(u),l=c.length,h=r;return r=gc(t={magic:Br.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,l,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,o,!0)),r+=20,r+=Object(mc.b)(e,r,c,l),_c(e,h,(r+=Object(mc.b)(e,r,s,a))-h),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const wc={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.0.13",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=bc(t,null,0,e),n=new ArrayBuffer(r);return bc(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}};const{_encodeImageNode:vc}=ui.a;let Ec=!0;const Sc={name:"Images",id:"image",module:"images",version:"3.0.13",extensions:["jpeg"],options:{image:{mimeType:"image/png",jpegQuality:null}},encode:async function(t,e){return(e=e||{}).image=e.image||{},vc?vc(t,{type:e.image.mimeType}):async function(t,e){const{mimeType:r,jpegQuality:n}=e.image,{width:i,height:o}=function(t){return gi(t)}(t),s=document.createElement("canvas");s.width=i,s.height=o,function(t,e,r=0,n=0){if(0===r&&0===n&&"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const r=e.getContext("bitmaprenderer");if(r)return r.transferFromImageBitmap(t),e}const i=e.getContext("2d");if(t.data){const r=new Uint8ClampedArray(t.data),n=new ImageData(r,t.width,t.height);return i.putImageData(n,0,0),e}i.drawImage(t,0,0)}(t,s);const a=await new Promise(t=>{if(n&&Ec)try{return void s.toBlob(t,r,n)}catch(t){Ec=!1}s.toBlob(t,r)});if(!a)throw new Error("image encoding failed");return await a.arrayBuffer()}(t,e)}},Ac=new J([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]);class Tc{async convert(t,e=null){this.i3sTile=t;const r=await this.buildGltf(t);return _s({gltfEncoded:new Uint8Array(r),type:"b3dm",featuresLength:this._getFeaturesLength(e),batchTable:e},wc)}async buildGltf(t){const{material:e,attributes:r,indices:n,cartesianOrigin:i}=t.content,o=new qi,s=await this._addI3sTextureToGltf(t,o),a=this._convertI3sMaterialToGltfMaterial(e,s),u=o.addMaterial(a),c=r.positions,l=c.value;r.positions.value=this._normalizePositions(l,i),r.normals&&!this._checkNormals(r.normals.value)&&delete r.normals;const h=n||this._generateSynteticIndices(l.length/c.size),f=o.addMesh({attributes:r,indices:h,material:u}),d=this._generateTransformMatrix(i),p=o.addNode({meshIndex:f,matrix:d}),g=o.addScene({nodeIndices:[p]});o.setDefaultScene(g),o.createBinaryChunk();return _s(o.gltf,pc)}async _addI3sTextureToGltf(t,e){const{content:{texture:r,material:n,attributes:i},header:{textureFormat:o}}=t;let s=null,a=r;if(!r&&n&&(a=n.pbrMetallicRoughness&&n.pbrMetallicRoughness.baseColorTexture&&n.pbrMetallicRoughness.baseColorTexture.texture.source.image),a){const t=this._deduceMimeTypeFromFormat(o),r=await gs(a,Sc),n=e.addImage(r,t);s=e.addTexture({imageIndex:n}),delete i.colors}return s}_normalizePositions(t,e){const r=new Float32Array(t.length);for(let n=0;n<t.length;n+=3){const i=t.subarray(n,n+3),o=new nt(e);let s=new nt(Array.from(i));s=s.subtract(o),r.set(s,n)}return r}_generateTransformMatrix(t){return(new J).translate(t).multiplyLeft(Ac)}_generateBatchId(t){const e=3*(t[t.length-1]+1),r=new Float32Array(e);let n=0,i=0;for(let e=0;e<t.length/2;e++){const e=3*t[n],o=3*(t[n+1]+1);r.fill(i,e,o),n+=2,i+=1}return r}_generateSynteticIndices(t){const e=new Uint32Array(t);for(let r=0;r<t;r++)e.set([r],r);return e}_deduceMimeTypeFromFormat(t){switch(t){case"jpg":return"image/jpeg";case"png":return"image/png";default:return console.warn("Unexpected texture format in I3S: "+t),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(t,e){return t?(null!==e&&(t=this._setGltfTexture(t,e)),t):(t={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},null!==e?t.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],t)}_setGltfTexture(t,e){const r={...t,pbrMetallicRoughness:{...t.pbrMetallicRoughness}};return t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?r.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.emissiveTexture?r.emissiveTexture={index:e,texCoord:0}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?r.pbrMetallicRoughness.metallicRoughnessTexture={index:e,texCoord:0}:t.normalTexture?r.normalTexture={index:e,texCoord:0}:t.occlusionTexture&&(r.occlusionTexture={index:e,texCoord:0}),r}_getFeaturesLength(t){if(!t)return 0;return t[Object.keys(t)[0]].length}_checkNormals(t){return t.find(t=>t)}}function Rc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Oc{constructor(){Rc(this,"options",void 0),Rc(this,"tilesetPath",void 0),Rc(this,"vertexCounter",void 0),Rc(this,"conversionStartTime",void 0),Rc(this,"geoidHeightModel",void 0),Rc(this,"sourceTileset",void 0),Rc(this,"attributeStorageInfo",void 0),this.options={},this.tilesetPath="",this.vertexCounter=0,this.conversionStartTime=[0,0],this.geoidHeightModel=null,this.sourceTileset=null,this.attributeStorageInfo=null}async convert(t){const{inputUrl:e,outputPath:r,tilesetName:n,maxDepth:i,egmFilePath:o}=t;this.conversionStartTime=Vo.a.hrtime(),this.options={maxDepth:i},console.log("Loading egm file..."),this.geoidHeightModel=await Object(a.a)(o,ta),console.log("Loading egm file completed!");const s=await Object(a.a)(e,rc,{});this.sourceTileset=new Pr(s,{}),this.sourceTileset.root.header.obb||(this.sourceTileset.root.header.obb=Ws(this.sourceTileset.root.header.mbs)),this.tilesetPath=Object(Bo.join)(""+r,""+n),this.attributeStorageInfo=s.attributeStorageInfo;try{await Object(Jo.b)(this.tilesetPath)}catch(t){}const u={boundingVolume:{box:ac(this.sourceTileset.root.header.obb,this.geoidHeightModel)},geometricError:Vs(this.sourceTileset.root),children:[]};await this._addChildren(this.sourceTileset.root,u,1);const c=Qo()({root:u},lc);await Object(Jo.d)(this.tilesetPath,JSON.stringify(c),"tileset.json"),this._finishConversion({slpk:!1,outputPath:r,tilesetName:n})}async _addChildren(t,e,r){if(!(this.options.maxDepth&&r>this.options.maxDepth))for(const n of t.header.children||[]){const i=await this._loadChildNode(t,n);if(t.children.push(i),i.contentUrl){await this.sourceTileset._loadTile(i),this.vertexCounter+=i.content.vertexCount;let t=null;this.attributeStorageInfo&&(t=await this._loadChildAttributes(i,this.attributeStorageInfo)),i.header.obb||(i.header.obb=Ws(i.header.mbs));const n={box:ac(i.header.obb,this.geoidHeightModel)},o={boundingVolume:n,geometricError:Vs(i),children:[]},s=await(new Tc).convert(i,t);o.content={uri:i.id+".b3dm",boundingVolume:n},await Object(Jo.d)(this.tilesetPath,new Uint8Array(s),i.id+".b3dm"),e.children.push(o),i.unloadContent(),await this._addChildren(i,o,r+1)}else await this._addChildren(i,e,r+1)}}async _loadChildNode(t,e){let r;if(this.sourceTileset.tileset.nodePages)console.log("Node conversion: "+e.id),r=await this.sourceTileset.tileset.nodePagesTile.formTileFromNodePages(e.id);else{const{loader:n}=this.sourceTileset,i=this._relativeUrlToFullUrl(t.url,e.href),o={i3s:{...this.sourceTileset.loadOptions,isTileHeader:!0,loadContent:!1}};console.log("Node conversion: "+i),r=await Object(a.a)(i,n,o)}return new Tr(this.sourceTileset,r,t)}_relativeUrlToFullUrl(t,e){let r=t.split("/");const n=e.split("/");for(const t of n)switch(t){case".":continue;case"..":r=r.slice(0,-1);break;default:r.push(t)}return r.join("/")}async _loadChildAttributes(t,e){const r=[],{attributeUrls:n}=t.header;for(let t=0;t<n.length;t++){const i=n[t],o=e[t],s={attributeName:o.name,attributeType:this._getAttributeType(o)};r.push(Object(a.a)(i,sc,s))}const i=await Promise.all(r);return this._replaceNestedArrays(i),Object.assign({},...i)}_getAttributeType(t){return t.attributeValues?t.attributeValues.valueType:t.objectIds?"Oid32":""}_replaceNestedArrays(t){for(let e=0;e<t.length;e++){const r=t[e];for(const t in r)r[t]=Array.from(r[t])}}async _finishConversion(t){const e=await ns(t),r=rs(Vo.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finish conversion of I3S"),console.log("Total conversion time: "+r),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",e," bytes"),console.log("------------------------------------------------")}}var xc=r(146)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(4),i=r(17),o=r(18),s=r(150);async function a(t,e,r,a){Array.isArray(e)||Object(i.a)(e)||(void 0,r=e,e=void 0);const u=Object(o.a)(r);let c=t;return"string"==typeof t&&(c=await u(t)),Object(n.b)(t)&&(c=await u(t)),await Object(s.a)(c,e,r)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(66),i=r.n(n);const o={id:"zip",module:"zip",name:"Zip Archive",version:"3.0.13",extensions:["zip"],mimeTypes:["application/zip"],category:"archive",tests:["PK"],options:{},parse:async function(t,e={}){const r=[],n={};try{const o=new i.a;return(await o.loadAsync(t,e)).forEach((t,i)=>{const s=i.name,a=async function(t,e,r={}){try{return await t.file(e).async(r.dataType||"arraybuffer")}catch(t){return r.log.error(`Unable to read ${e} from zip archive: ${t}`),t}}(o,s,e).then(e=>{n[t]=e});r.push(a)}),await Promise.all(r),n}catch(t){throw e.log.error("Unable to read zip archive: "+t),t}}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return _}));var n=r(81);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o="function"==typeof atob?atob:"function"==typeof Buffer?function(t){return Buffer.from(t,"base64").toString("binary")}:f,s=o("AGFzbQEAAAABDANgAX8AYAAAYAABfwIeAgdpbXBvcnRzA2xvZwAAB2ltcG9ydHMDbWVtAgABAzIxAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAgICAgIAAAAAAAaYARt/AUGBxpS6Bgt/AUGJ17b+fgt/AUH+uevFeQt/AUH2qMmBAQt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALB7oCJQhvbmVGdWxsQQAYCG9uZUZ1bGxCABkIb25lRnVsbEMAGghvbmVGdWxsRAAbBWxvb3BzAAEEbG9vcAACBXByaW1lAAMFbG9vcEEABAZsb29wQTEABQZsb29wQTIABgZsb29wQTMABwZsb29wQTQACAVsb29wQgAJBmxvb3BCMQAKBmxvb3BCMgALBmxvb3BCMwAMBmxvb3BCNAANBWxvb3BDAA4GbG9vcEMxAA8GbG9vcEMyABAGbG9vcEMzABEGbG9vcEM0ABIFbG9vcEQAEwZsb29wRDEAFAZsb29wRDIAFQZsb29wRDMAFgZsb29wRDQAFwRnZXRBACgEZ2V0QgApBGdldEMAKgRnZXREACsEZ2V0WAAsBHNldEEALQRzZXRCAC4Ec2V0QwAvBHNldEQAMARzZXRYADEKzA0xWwEBf0EAJAggAEEGdCEBAkADQCMIIAFGDQEjACQEIwEkBSMCJAYjAyQHEAIjBCMAaiQAIwUjAWokASMGIwJqJAIjByMDaiQDIwhBwABqJAgMAAsLIwgjGmokGgsTACMIIxpqJAkQAxAEEAkQDhATC6IBAEEAIwlqKAIAJApBBCMJaigCACQLQQgjCWooAgAkDEEMIwlqKAIAJA1BECMJaigCACQOQRQjCWooAgAkD0EYIwlqKAIAJBBBHCMJaigCACQRQSAjCWooAgAkEkEkIwlqKAIAJBNBKCMJaigCACQUQSwjCWooAgAkFUEwIwlqKAIAJBZBNCMJaigCACQXQTgjCWooAgAkGEE8IwlqKAIAJBkLCgAQBRAGEAcQCAsuAEH4yKq7fSMKahAYQdbunsZ+IwtqEBtB2+GBoQIjDGoQGkHunfeNfCMNahAZCy0AQa+f8Kt/Iw5qEBhBqoyfvAQjD2oQG0GTjMHBeiMQahAaQYGqmmojEWoQGQssAEHYsYLMBiMSahAYQa/vk9p4IxNqEBtBsbd9IxRqEBpBvq/zyngjFWoQGQstAEGiosDcBiMWahAYQZPj4WwjF2oQG0GOh+WzeiMYahAaQaGQ0M0EIxlqEBkLCgAQChALEAwQDQsuAEHiyviwfyMLahAcQcDmgoJ8IxBqEB9B0bT5sgIjFWoQHkGqj9vNfiMKahAdCy0AQd2gvLF9Iw9qEBxB06iQEiMUahAfQYHNh8V9IxlqEB5ByPfPvn4jDmoQHQsuAEHmm4ePAiMTahAcQdaP3Jl8IxhqEB9Bh5vUpn8jDWoQHkHtqeiqBCMSahAdCy0AQYXSj896IxdqEBxB+Me+ZyMMahAfQdmFvLsGIxFqEB5Bipmp6XgjFmoQHQsKABAPEBAQERASCysAQcLyaCMPahAgQYHtx7t4IxJqECNBosL17AYjFWoQIkGM8JRvIxhqECELLgBBxNT7pXojC2oQIEGpn/veBCMOahAjQeCW7bV/IxFqECJB8Pj+9XsjFGoQIQstAEHG/e3EAiMXahAgQfrPhNV+IwpqECNBheG8p30jDWoQIkGFuqAkIxBqECELLgBBuaDTzn0jE2oQIEHls+62fiMWahAjQfj5if0BIxlqECJB5ayxpXwjDGoQIQsKABAUEBUQFhAXCy0AQcTEpKF/IwpqECRBl/+rmQQjEWoQJ0Gnx9DceiMYahAmQbnAzmQjD2oQJQstAEHDs+2qBiMWahAkQZKZs/h4Iw1qECdB/ei/fyMUahAmQdG7kax4IwtqECULLQBBz/yh/QYjEmoQJEHgzbNxIxlqECdBlIaFmHojEGoQJkGho6DwBCMXahAlCy4AQYL9zbp/Iw5qECRBteTr6XsjFWoQJ0G7pd/WAiMMahAmQZGnm9x+IxNqECULKAEBf0F/IwFzIwNxIwEjAnFyIwBqIABqIgFBB3QgAUEZdnIjAWokAAsoAQF/QX8jAnMjAHEjAiMDcXIjAWogAGoiAUEWdCABQQp2ciMCaiQBCygBAX9BfyMDcyMBcSMDIwBxciMCaiAAaiIBQRF0IAFBD3ZyIwNqJAILKAEBf0F/IwBzIwJxIwAjAXFyIwNqIABqIgFBDHQgAUEUdnIjAGokAwsoAQF/IwJBfyMDc3EjASMDcXIjAGogAGoiAUEFdCABQRt2ciMBaiQACygBAX8jA0F/IwBzcSMCIwBxciMBaiAAaiIBQRR0IAFBDHZyIwJqJAELKAEBfyMAQX8jAXNxIwMjAXFyIwJqIABqIgFBDnQgAUESdnIjA2okAgsoAQF/IwFBfyMCc3EjACMCcXIjA2ogAGoiAUEJdCABQRd2ciMAaiQDCyIBAX8jASMCcyMDcyMAaiAAaiIBQQR0IAFBHHZyIwFqJAALIgEBfyMCIwNzIwBzIwFqIABqIgFBF3QgAUEJdnIjAmokAQsiAQF/IwMjAHMjAXMjAmogAGoiAUEQdCABQRB2ciMDaiQCCyIBAX8jACMBcyMCcyMDaiAAaiIBQQt0IAFBFXZyIwBqJAMLJQEBf0F/IwNzIwFyIwJzIwBqIABqIgFBBnQgAUEadnIjAWokAAslAQF/QX8jAHMjAnIjA3MjAWogAGoiAUEVdCABQQt2ciMCaiQBCyUBAX9BfyMBcyMDciMAcyMCaiAAaiIBQQ90IAFBEXZyIwNqJAILJQEBf0F/IwJzIwByIwFzIwNqIABqIgFBCnQgAUEWdnIjAGokAwsEACMACwQAIwELBAAjAgsEACMDCwQAIxoLBgAgACQACwYAIAAkAQsGACAAJAILBgAgACQDCwYAIAAkGgsA6gQEbmFtZQGSAzIAA2xvZwEFbG9vcHMCBGxvb3ADBXByaW1lBAVsb29wQQUGbG9vcEExBgZsb29wQTIHBmxvb3BBMwgGbG9vcEE0CQVsb29wQgoGbG9vcEIxCwZsb29wQjIMBmxvb3BCMw0GbG9vcEI0DgVsb29wQw8GbG9vcEMxEAZsb29wQzIRBmxvb3BDMxIGbG9vcEM0EwVsb29wRBQGbG9vcEQxFQZsb29wRDIWBmxvb3BEMxcGbG9vcEQ0GAhvbmVGdWxsQRkIb25lRnVsbEIaCG9uZUZ1bGxDGwhvbmVGdWxsRBwIdHdvRnVsbEEdCHR3b0Z1bGxCHgh0d29GdWxsQx8IdHdvRnVsbEQgCHRyZUZ1bGxBIQh0cmVGdWxsQiIIdHJlRnVsbEMjCHRyZUZ1bGxEJAhxdWFGdWxsQSUIcXVhRnVsbEImCHF1YUZ1bGxDJwhxdWFGdWxsRCgEZ2V0QSkEZ2V0QioEZ2V0QysEZ2V0RCwEZ2V0WC0Ec2V0QS4Ec2V0Qi8Ec2V0QzAEc2V0RDEEc2V0WALNATIAAQAAAQIAAAEIbnVtbG9vcHMCAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgCAAABAW4ZAgAAAQFuGgIAAAEBbhsCAAABAW4cAgAAAQFuHQIAAAEBbh4CAAABAW4fAgAAAQFuIAIAAAEBbiECAAABAW4iAgAAAQFuIwIAAAEBbiQCAAABAW4lAgAAAQFuJgIAAAEBbicCAAABAW4oACkAKgArACwALQEAAC4BAAAvAQAAMAEAADEBAAA="),a=!(!WebAssembly||o===f)&&function(t){var e,r,n,i=-1;e=t.length-1,r=new ArrayBuffer(t.length),n=new Uint8Array(r);for(;e>i++;)n[i]=t.charCodeAt(i);return n}(s).buffer,u={rotl:function(t,e){return t<<e|t>>>32-e},endian:function(t){if(t.constructor==Number)return 16711935&u.rotl(t,8)|4278255360&u.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=u.endian(t[e]);return t},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")}},c=Math.floor(1048576.00032768),l="Parameter must be Buffer, ArrayBuffer or Uint8Array";function h(t){var e,r,n,i,o,s,h,f,d;const p=function(t,e){var r=u.wordsToBytes(function(t,e){(new Date).getTime();var r,n,i,o,s,a,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A=1732584193,T=-271733879,R=-1732584194,O=271733878,x=8*t.length;S=u.bytesToWords(t);for(var k=0;k<S.length;k++)S[k]=16711935&(S[k]<<8|S[k]>>>24)|4278255360&(S[k]<<24|S[k]>>>8);S[x>>>5]|=128<<x%32,S[14+(x+64>>>9<<4)]=x;for(var I=0;I<S.length;I+=16)b=A,w=T,v=R,E=O,r=S[I+0]>>>0,n=S[I+1]>>>0,i=S[I+2]>>>0,o=S[I+3]>>>0,s=S[I+4]>>>0,a=S[I+5]>>>0,c=S[I+6]>>>0,l=S[I+7]>>>0,h=S[I+8]>>>0,f=S[I+9]>>>0,d=S[I+10]>>>0,p=S[I+11]>>>0,g=S[I+12]>>>0,_=S[I+13]>>>0,m=S[I+14]>>>0,y=S[I+15]>>>0,A=C(7,25,A+(T&R|~T&O)+r-680876936)+T,O=C(12,20,O+(A&T|~A&R)+n-389564586)+A,R=C(17,15,R+(O&A|~O&T)+i+606105819)+O,T=C(22,10,T+(R&O|~R&A)+o-1044525330)+R,A=C(7,25,A+(T&R|~T&O)+s-176418897)+T,O=C(12,20,O+(A&T|~A&R)+a+1200080426)+A,R=C(17,15,R+(O&A|~O&T)+c-1473231341)+O,T=C(22,10,T+(R&O|~R&A)+l-45705983)+R,A=C(7,25,A+(T&R|~T&O)+h+1770035416)+T,O=C(12,20,O+(A&T|~A&R)+f-1958414417)+A,R=C(17,15,R+(O&A|~O&T)+d-42063)+O,T=C(22,10,T+(R&O|~R&A)+p-1990404162)+R,A=C(7,25,A+(T&R|~T&O)+g+1804603682)+T,O=C(12,20,O+(A&T|~A&R)+_-40341101)+A,R=C(17,15,R+(O&A|~O&T)+m-1502002290)+O,T=C(22,10,T+(R&O|~R&A)+y+1236535329)+R,A=C(5,27,A+(T&O|R&~O)+n-165796510)+T,O=C(9,23,O+(A&R|T&~R)+c-1069501632)+A,R=C(14,18,R+(O&T|A&~T)+p+643717713)+O,T=C(20,12,T+(R&A|O&~A)+r-373897302)+R,A=C(5,27,A+(T&O|R&~O)+a-701558691)+T,O=C(9,23,O+(A&R|T&~R)+d+38016083)+A,R=C(14,18,R+(O&T|A&~T)+y-660478335)+O,T=C(20,12,T+(R&A|O&~A)+s-405537848)+R,A=C(5,27,A+(T&O|R&~O)+f+568446438)+T,O=C(9,23,O+(A&R|T&~R)+m-1019803690)+A,R=C(14,18,R+(O&T|A&~T)+o-187363961)+O,T=C(20,12,T+(R&A|O&~A)+h+1163531501)+R,A=C(5,27,A+(T&O|R&~O)+_-1444681467)+T,O=C(9,23,O+(A&R|T&~R)+i-51403784)+A,R=C(14,18,R+(O&T|A&~T)+l+1735328473)+O,T=C(20,12,T+(R&A|O&~A)+g-1926607734)+R,A=C(4,28,A+(T^R^O)+a-378558)+T,O=C(11,21,O+(A^T^R)+h-2022574463)+A,R=C(16,16,R+(O^A^T)+p+1839030562)+O,T=C(23,9,T+(R^O^A)+m-35309556)+R,A=C(4,28,A+(T^R^O)+n-1530992060)+T,O=C(11,21,O+(A^T^R)+s+1272893353)+A,R=C(16,16,R+(O^A^T)+l-155497632)+O,T=C(23,9,T+(R^O^A)+d-1094730640)+R,A=C(4,28,A+(T^R^O)+_+681279174)+T,O=C(11,21,O+(A^T^R)+r-358537222)+A,R=C(16,16,R+(O^A^T)+o-722521979)+O,T=C(23,9,T+(R^O^A)+c+76029189)+R,A=C(4,28,A+(T^R^O)+f-640364487)+T,O=C(11,21,O+(A^T^R)+g-421815835)+A,R=C(16,16,R+(O^A^T)+y+530742520)+O,T=C(23,9,T+(R^O^A)+i-995338651)+R,A=C(6,26,A+(R^(T|~O))+r-198630844)+T,O=C(10,22,O+(T^(A|~R))+l+1126891415)+A,R=C(15,17,R+(A^(O|~T))+m-1416354905)+O,T=C(21,11,T+(O^(R|~A))+a-57434055)+R,A=C(6,26,A+(R^(T|~O))+g+1700485571)+T,O=C(10,22,O+(T^(A|~R))+o-1894986606)+A,R=C(15,17,R+(A^(O|~T))+d-1051523)+O,T=C(21,11,T+(O^(R|~A))+n-2054922799)+R,A=C(6,26,A+(R^(T|~O))+h+1873313359)+T,O=C(10,22,O+(T^(A|~R))+y-30611744)+A,R=C(15,17,R+(A^(O|~T))+c-1560198380)+O,T=C(21,11,T+(O^(R|~A))+_+1309151649)+R,A=C(6,26,A+(R^(T|~O))+s-145523070)+T,O=C(10,22,O+(T^(A|~R))+p-1120210379)+A,R=C(15,17,R+(A^(O|~T))+i+718787259)+O,T=C(21,11,T+(O^(R|~A))+f-343485551)+R,A=A+b>>>0,T=T+w>>>0,R=R+v>>>0,O=O+E>>>0;return u.endian([A,T,R,O]);function C(t,e,r){return r<<t|r>>>e}}(t));return e&&e.asBytes?r:u.bytesToHex(r)},g=function(){var t,e,r,n,i,o,s,a,l,h;return function(f,d,p,g){var _;return t=d.loops,d.loop,e=d.getA,n=d.getB,o=d.getC,a=d.getD,d.getX,r=d.setA,i=d.setB,s=d.setC,l=d.setD,d.setX,h=p,_=u.wordsToBytes(function(f){(new Date).getTime();var d,p,g,_,m,y,b,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P,L=1732584193,B=-271733879,N=-1732584194,j=271733878,U=0,F=8*f.length;for(function(t,e){var r,n,i,o,s=-1,a=Math.floor((t.length-1)/4),u=0;for(;a-8>s++;)u=s<<2,e[s]=t[u+0]|t[u+1]<<8|t[u+2]<<16|t[u+3]<<24;s--;for(;a>s++;)r=void 0===t[(u=s<<2)+0]?0:t[u+0],n=void 0===t[u+1]?0:t[u+1],i=void 0===t[u+2]?0:t[u+2],o=void 0===t[u+3]?0:t[u+3],e[s]=r|n<<8|i<<16|o<<24;return a+1}(f,h),h[F>>>5]|=128<<F%32,h[14+(F+64>>>9<<4)]=F,P=15+(F+64>>>9<<4),D=h;U<P;)P>U+c?(r(L),i(B),s(N),l(j),t(61440),U+=983040,L=e(),B=n(),N=o(),j=a()):(k=L,I=B,C=N,M=j,d=D[U+0]>>>0,p=D[U+1]>>>0,g=D[U+2]>>>0,_=D[U+3]>>>0,m=D[U+4]>>>0,y=D[U+5]>>>0,b=D[U+6]>>>0,w=D[U+7]>>>0,v=D[U+8]>>>0,E=D[U+9]>>>0,S=D[U+10]>>>0,A=D[U+11]>>>0,T=D[U+12]>>>0,R=D[U+13]>>>0,O=D[U+14]>>>0,x=D[U+15]>>>0,L=z(7,25,L+(B&N|~B&j)+d-680876936)+B,j=z(12,20,j+(L&B|~L&N)+p-389564586)+L,N=z(17,15,N+(j&L|~j&B)+g+606105819)+j,B=z(22,10,B+(N&j|~N&L)+_-1044525330)+N,L=z(7,25,L+(B&N|~B&j)+m-176418897)+B,j=z(12,20,j+(L&B|~L&N)+y+1200080426)+L,N=z(17,15,N+(j&L|~j&B)+b-1473231341)+j,B=z(22,10,B+(N&j|~N&L)+w-45705983)+N,L=z(7,25,L+(B&N|~B&j)+v+1770035416)+B,j=z(12,20,j+(L&B|~L&N)+E-1958414417)+L,N=z(17,15,N+(j&L|~j&B)+S-42063)+j,B=z(22,10,B+(N&j|~N&L)+A-1990404162)+N,L=z(7,25,L+(B&N|~B&j)+T+1804603682)+B,j=z(12,20,j+(L&B|~L&N)+R-40341101)+L,N=z(17,15,N+(j&L|~j&B)+O-1502002290)+j,B=z(22,10,B+(N&j|~N&L)+x+1236535329)+N,L=z(5,27,L+(B&j|N&~j)+p-165796510)+B,j=z(9,23,j+(L&N|B&~N)+b-1069501632)+L,N=z(14,18,N+(j&B|L&~B)+A+643717713)+j,B=z(20,12,B+(N&L|j&~L)+d-373897302)+N,L=z(5,27,L+(B&j|N&~j)+y-701558691)+B,j=z(9,23,j+(L&N|B&~N)+S+38016083)+L,N=z(14,18,N+(j&B|L&~B)+x-660478335)+j,B=z(20,12,B+(N&L|j&~L)+m-405537848)+N,L=z(5,27,L+(B&j|N&~j)+E+568446438)+B,j=z(9,23,j+(L&N|B&~N)+O-1019803690)+L,N=z(14,18,N+(j&B|L&~B)+_-187363961)+j,B=z(20,12,B+(N&L|j&~L)+v+1163531501)+N,L=z(5,27,L+(B&j|N&~j)+R-1444681467)+B,j=z(9,23,j+(L&N|B&~N)+g-51403784)+L,N=z(14,18,N+(j&B|L&~B)+w+1735328473)+j,B=z(20,12,B+(N&L|j&~L)+T-1926607734)+N,L=z(4,28,L+(B^N^j)+y-378558)+B,j=z(11,21,j+(L^B^N)+v-2022574463)+L,N=z(16,16,N+(j^L^B)+A+1839030562)+j,B=z(23,9,B+(N^j^L)+O-35309556)+N,L=z(4,28,L+(B^N^j)+p-1530992060)+B,j=z(11,21,j+(L^B^N)+m+1272893353)+L,N=z(16,16,N+(j^L^B)+w-155497632)+j,B=z(23,9,B+(N^j^L)+S-1094730640)+N,L=z(4,28,L+(B^N^j)+R+681279174)+B,j=z(11,21,j+(L^B^N)+d-358537222)+L,N=z(16,16,N+(j^L^B)+_-722521979)+j,B=z(23,9,B+(N^j^L)+b+76029189)+N,L=z(4,28,L+(B^N^j)+E-640364487)+B,j=z(11,21,j+(L^B^N)+T-421815835)+L,N=z(16,16,N+(j^L^B)+x+530742520)+j,B=z(23,9,B+(N^j^L)+g-995338651)+N,L=z(6,26,L+(N^(B|~j))+d-198630844)+B,j=z(10,22,j+(B^(L|~N))+w+1126891415)+L,N=z(15,17,N+(L^(j|~B))+O-1416354905)+j,B=z(21,11,B+(j^(N|~L))+y-57434055)+N,L=z(6,26,L+(N^(B|~j))+T+1700485571)+B,j=z(10,22,j+(B^(L|~N))+_-1894986606)+L,N=z(15,17,N+(L^(j|~B))+S-1051523)+j,B=z(21,11,B+(j^(N|~L))+p-2054922799)+N,L=z(6,26,L+(N^(B|~j))+v+1873313359)+B,j=z(10,22,j+(B^(L|~N))+x-30611744)+L,N=z(15,17,N+(L^(j|~B))+b-1560198380)+j,B=z(21,11,B+(j^(N|~L))+R+1309151649)+N,L=z(6,26,L+(N^(B|~j))+m-145523070)+B,j=z(10,22,j+(B^(L|~N))+A-1120210379)+L,N=z(15,17,N+(L^(j|~B))+g+718787259)+j,B=z(21,11,B+(j^(N|~L))+E-343485551)+N,U+=16,L=L+k>>>0,B=B+I>>>0,N=N+C>>>0,j=j+M>>>0);return u.endian([L,B,N,j]);function z(t,e,r){return r<<t|r>>>e}}(f)),g&&g.asBytes?_:u.bytesToHex(_)}}(),_={},m=(new Date).getTime();return _.then=function(t){return s=t,y(),_},_.catch=function(t){return h=t,_},t&&"object"==typeof t?"function"==typeof Buffer&&t.constructor===Buffer?o=t:t.constructor===Uint8Array||t.constructor===ArrayBuffer?o=t.constructor===ArrayBuffer?new Uint8Array(t):t:b(new TypeError(l)):b(new TypeError(l)),o&&(i=o.length,a&&i>c?i>268369920?b(new Error("Parameter exceeds max size of 255.9 Mbytes")):(e=new WebAssembly.Memory({initial:i>32e6?i>64e6?i>128e6?4096:2048:1024:512}),r=new Uint32Array(e.buffer),n={imports:{mem:e,log:console.log}},WebAssembly.instantiate(a,n).then((function(t){y(g(o,t.instance.exports,r))}))):y(p(o))),_;function y(t){var e=Boolean(t)?t:f;Boolean(t)&&(d=(new Date).getTime()),"function"==typeof s?Boolean(e)&&(s(e,d-m),s=h=null):Boolean(t)&&(f=t)}function b(t){"function"==typeof h&&h(t)}}function f(t){return t}function d(t){return t<26?String.fromCharCode(t+"A".charCodeAt(0)):t<52?String.fromCharCode(t-26+"a".charCodeAt(0)):t<62?String.fromCharCode(t-52+"0".charCodeAt(0)):62===t?"+":63===t?"/":void 0}function p(t){t.length%2!=0&&(t="0"+t);return function(t){t=""+t;for(let e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return null;let e="";for(let r=0;r<t.length;r+=3){const n=[void 0,void 0,void 0,void 0];n[0]=t.charCodeAt(r)>>2,n[1]=(3&t.charCodeAt(r))<<4,t.length>r+1&&(n[1]|=t.charCodeAt(r+1)>>4,n[2]=(15&t.charCodeAt(r+1))<<2),t.length>r+2&&(n[2]|=t.charCodeAt(r+2)>>6,n[3]=63&t.charCodeAt(r+2));for(let t=0;t<n.length;t++)void 0===n[t]?e+="=":e+=d(n[t])}return e}(t.match(/\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(""))}function g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}a||console.log("WebAssembly not available or WASM module could not be decoded; md5WASM will fall back to JavaScript");class _ extends class{constructor(t={}){i(this,"name",void 0),i(this,"options",void 0),this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(t){var e,r,n;const i=[];for await(const e of t)i.push(e),yield e;const o=await this.concatenate(i),s=await this.hash(o);null===(e=this.options)||void 0===e||null===(r=e.crypto)||void 0===r||null===(n=r.onEnd)||void 0===n||n.call(r,{hash:s})}async concatenate(t){return await Object(n.a)(t)}}{constructor(t={}){super(),g(this,"name","md5"),g(this,"options",void 0),this.options=t}async hash(t){const e=new Promise((e,r)=>h(t).then(e).catch(r));return p(await e)}}}])}));
93
+ var n=r(12).inherits,i=r(103).Transform,o=r(123),s=r(44),a=function(t){if(!(this instanceof a))return new a(t);t=this.options=s.defaults(t,{}),i.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};n(a,i),a.prototype._transform=function(t,e,r){r(null,t)},a.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},a.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):(e.size=i.length||0,e.crc32=o.unsigned(i),n.files.push(e),r(null,e))}e.crc32=0,"buffer"===e.sourceType?i(null,t):"stream"===e.sourceType&&s.collectStream(t,i)},a.prototype.finalize=function(){this._writeStringified(),this.end()},t.exports=a},function(t,e){},function(t,e,r){"use strict";r.r(e),r.d(e,"I3SConverter",(function(){return Ma})),r.d(e,"NodePages",(function(){return $o})),r.d(e,"Tiles3DConverter",(function(){return Oc})),r.d(e,"DepsInstaller",(function(){return xc.a}));var n={};r.r(n),r.d(n,"decode",(function(){return Zi})),r.d(n,"encode",(function(){return Qi}));var i={};r.r(i),r.d(i,"decode",(function(){return Yi})),r.d(i,"encode",(function(){return $i}));var o={};r.r(o),r.d(o,"decode",(function(){return Ji})),r.d(o,"encode",(function(){return to}));var s={};r.r(s),r.d(s,"decode",(function(){return eo})),r.d(s,"encode",(function(){return ro}));var a=r(261);function u(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const c=1/Math.PI*180,l=1/180*Math.PI,h={};function f(t,{precision:e=h.precision||4}={}){return t=function(t){return Math.round(t/h.EPSILON)*h.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function d(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function p(t,e,r){if(d(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function g(t){return function(t,e){return p(t,t=>t*l,e)}(t)}function _(t){return m(t)}function m(t,e){return p(t,t=>t*c,e)}function y(t,e,r){return p(t,t=>Math.max(e,Math.min(r,t)))}function b(t,e,r){const n=h.EPSILON;r&&(h.EPSILON=r);try{if(t===e)return!0;if(d(t)&&d(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!b(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=h.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{h.EPSILON=n}}function w(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function v(t,e,r=""){if(h.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}h.EPSILON=1e-12,h.debug=!1,h.precision=4,h.printTypes=!1,h.printDegrees=!1,h.printRowMajor=!0;const E={};function S(t,e){E[t]||(E[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}class A extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return u(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:d(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(h)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+f(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!b(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const i=t[n];this[n]=i+r*(e[n]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(h.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}class T extends A{get ELEMENTS(){return u(!1),0}get RANK(){return u(!1),0}toString(){let t="[";if(h.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=w(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}function R(t,e,r){const n=e[0],i=e[1],o=r[3]*n+r[7]*i||1;return t[0]=(r[0]*n+r[4]*i)/o,t[1]=(r[1]*n+r[5]*i)/o,t}function O(t,e,r){const n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o||1;return t[0]=(r[0]*n+r[4]*i+r[8]*o)/s,t[1]=(r[1]*n+r[5]*i+r[9]*o)/s,t[2]=(r[2]*n+r[6]*i+r[10]*o)/s,t}function x(t,e,r){const n=e[0],i=e[1],o=e[2];return t[0]=r[0]*n+r[3]*i+r[6]*o,t[1]=r[1]*n+r[4]*i+r[7]*o,t[2]=r[2]*n+r[5]*i+r[8]*o,t[3]=e[3],t}var k=1e-6,I="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function C(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],_=e[13],m=e[14],y=e[15],b=r[0],w=r[1],v=r[2],E=r[3];return t[0]=b*n+w*a+v*h+E*g,t[1]=b*i+w*u+v*f+E*_,t[2]=b*o+w*c+v*d+E*m,t[3]=b*s+w*l+v*p+E*y,b=r[4],w=r[5],v=r[6],E=r[7],t[4]=b*n+w*a+v*h+E*g,t[5]=b*i+w*u+v*f+E*_,t[6]=b*o+w*c+v*d+E*m,t[7]=b*s+w*l+v*p+E*y,b=r[8],w=r[9],v=r[10],E=r[11],t[8]=b*n+w*a+v*h+E*g,t[9]=b*i+w*u+v*f+E*_,t[10]=b*o+w*c+v*d+E*m,t[11]=b*s+w*l+v*p+E*y,b=r[12],w=r[13],v=r[14],E=r[15],t[12]=b*n+w*a+v*h+E*g,t[13]=b*i+w*u+v*f+E*_,t[14]=b*o+w*c+v*d+E*m,t[15]=b*s+w*l+v*p+E*y,t}function M(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function D(t,e){var r=e[0],n=e[1],i=e[2],o=e[4],s=e[5],a=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(r,n,i),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(u,c,l),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function P(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t}function L(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t}var B,N;B=new I(2),I!=Float32Array&&(B[0]=0,B[1]=0),N=B;function j(){var t=new I(3);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function F(t,e,r){var n=new I(3);return n[0]=t,n[1]=e,n[2]=r,n}function z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function G(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2];return t[0]=i*u-o*a,t[1]=o*s-n*u,t[2]=n*a-i*s,t}function H(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o+r[15];return s=s||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/s,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/s,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/s,t}function W(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}function q(t,e,r){var n=r[0],i=r[1],o=r[2],s=r[3],a=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*a-n*c,f=n*u-i*a,d=i*f-o*h,p=o*l-n*f,g=n*h-i*l,_=2*s;return l*=_,h*=_,f*=_,d*=2,p*=2,g*=2,t[0]=a+l+d,t[1]=u+h+p,t[2]=c+f+g,t}var V=U;!function(){var t=j()}();function Z(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.hypot(e,r,n,i)}function Q(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}!function(){var t=function(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();const K=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),X=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),Y=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),$={};class J extends T{static get IDENTITY(){return $.IDENTITY=$.IDENTITY||Object.freeze(new J(K)),$.IDENTITY}static get ZERO(){return $.ZERO=$.ZERO||Object.freeze(new J(X)),$.ZERO}get INDICES(){return Y}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=d,this[14]=p,this[15]=g,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=d,this[8]=r,this[9]=s,this[10]=l,this[11]=p,this[12]=n,this[13]=a,this[14]=h,this[15]=g,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(K)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,g=o*s,_=o*a,m=o*u;t[0]=1-h-p,t[1]=l+m,t[2]=f-_,t[3]=0,t[4]=l-m,t[5]=1-c-p,t[6]=d+g,t[7]=0,t[8]=f+_,t[9]=d-g,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:i,far:o}){return o===1/0?J._computeInfinitePerspectiveOffCenter(this,t,e,r,n,i):function(t,e,r,n,i,o,s){var a=1/(r-e),u=1/(i-n),c=1/(o-s);t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*u,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0}(this,t,e,r,n,i,o),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,i,o){const s=2*o/(r-e),a=2*o/(i-n),u=(r+e)/(r-e),c=(i+n)/(i-n),l=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p=e[0],g=e[1],_=e[2],m=n[0],y=n[1],b=n[2],w=r[0],v=r[1],E=r[2];Math.abs(p-w)<k&&Math.abs(g-v)<k&&Math.abs(_-E)<k?function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t):(l=p-w,h=g-v,f=_-E,i=y*(f*=d=1/Math.hypot(l,h,f))-b*(h*=d),o=b*(l*=d)-m*f,s=m*h-y*l,(d=Math.hypot(i,o,s))?(i*=d=1/d,o*=d,s*=d):(i=0,o=0,s=0),a=h*s-f*o,u=f*i-l*s,c=l*o-h*i,(d=Math.hypot(a,u,c))?(a*=d=1/d,u*=d,c*=d):(a=0,u=0,c=0),t[0]=i,t[1]=a,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*g+s*_),t[13]=-(a*p+u*g+c*_),t[14]=-(l*p+h*g+f*_),t[15]=1)}(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:i=.1,far:o=500}){return function(t,e,r,n,i,o,s){var a=1/(e-r),u=1/(n-i),c=1/(o-s);t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*u,t[14]=(s+o)*c,t[15]=1}(this,t,e,r,n,i,o),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:i=500}){if(t>2*Math.PI)throw Error("radians");const o=t/2,s=r*Math.tan(o),a=s*e;return(new J).ortho({left:-a,right:a,bottom:-s,top:s,near:n,far:i})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:i=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return function(t,e,r,n,i){var o,s=1/Math.tan(e/2);t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n)}(this,t,r,n,i),this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],_=t[15],(e*s-r*o)*(h*_-f*g)-(e*a-n*o)*(l*_-f*p)+(e*u-i*o)*(l*g-h*p)+(r*a-n*s)*(c*_-f*d)-(r*u-i*s)*(c*g-h*d)+(n*u-i*a)*(c*p-l*d);var t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,g,_}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*n,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*n,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],_=e[14],m=e[15],y=r*a-n*s,b=r*u-i*s,w=r*c-o*s,v=n*u-i*a,E=n*c-o*a,S=i*c-o*u,A=l*g-h*p,T=l*_-f*p,R=l*m-d*p,O=h*_-f*g,x=h*m-d*g,k=f*m-d*_,I=y*k-b*x+w*O+v*R-E*T+S*A;I&&(I=1/I,t[0]=(a*k-u*x+c*O)*I,t[1]=(i*x-n*k-o*O)*I,t[2]=(g*S-_*E+m*v)*I,t[3]=(f*E-h*S-d*v)*I,t[4]=(u*R-s*k-c*T)*I,t[5]=(r*k-i*R+o*T)*I,t[6]=(_*w-p*S-m*b)*I,t[7]=(l*S-f*w+d*b)*I,t[8]=(s*x-a*R+c*A)*I,t[9]=(n*R-r*x-o*A)*I,t[10]=(p*E-g*w+m*y)*I,t[11]=(h*w-l*E-d*y)*I,t[12]=(a*T-s*O-u*A)*I,t[13]=(r*O-n*T+i*A)*I,t[14]=(g*b-p*v-_*y)*I,t[15]=(l*v-h*b+f*y)*I)}(this,this),this.check()}multiplyLeft(t){return C(this,t,this),this.check()}multiplyRight(t){return C(this,this,t),this.check()}rotateX(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],s=e[5],a=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=s*i+l*n,t[6]=a*i+h*n,t[7]=u*i+f*n,t[8]=c*i-o*n,t[9]=l*i-s*n,t[10]=h*i-a*n,t[11]=f*i-u*n}(this,this,t),this.check()}rotateY(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=s*i-l*n,t[2]=a*i-h*n,t[3]=u*i-f*n,t[8]=o*n+c*i,t[9]=s*n+l*i,t[10]=a*n+h*i,t[11]=u*n+f*i}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=s*i+l*n,t[2]=a*i+h*n,t[3]=u*i+f*n,t[4]=c*i-o*n,t[5]=l*i-s*n,t[6]=h*i-a*n,t[7]=f*i-u*n}(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A,T,R,O,x=n[0],I=n[1],C=n[2],M=Math.hypot(x,I,C);M<k||(x*=M=1/M,I*=M,C*=M,i=Math.sin(r),s=1-(o=Math.cos(r)),a=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],d=e[6],p=e[7],g=e[8],_=e[9],m=e[10],y=e[11],b=x*x*s+o,w=I*x*s+C*i,v=C*x*s-I*i,E=x*I*s-C*i,S=I*I*s+o,A=C*I*s+x*i,T=x*C*s+I*i,R=I*C*s-x*i,O=C*C*s+o,t[0]=a*b+h*w+g*v,t[1]=u*b+f*w+_*v,t[2]=c*b+d*w+m*v,t[3]=l*b+p*w+y*v,t[4]=a*E+h*S+g*A,t[5]=u*E+f*S+_*A,t[6]=c*E+d*S+m*A,t[7]=l*E+p*S+y*A,t[8]=a*T+h*R+g*O,t[9]=u*T+f*R+_*O,t[10]=c*T+d*R+m*O,t[11]=l*T+p*R+y*O,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?M(this,this,t):M(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n,i,o,s,a,u,c,l,h,f,d,p,g=r[0],_=r[1],m=r[2];e===t?(t[12]=e[0]*g+e[4]*_+e[8]*m+e[12],t[13]=e[1]*g+e[5]*_+e[9]*m+e[13],t[14]=e[2]*g+e[6]*_+e[10]*m+e[14],t[15]=e[3]*g+e[7]*_+e[11]*m+e[15]):(n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=n*g+a*_+h*m+e[12],t[13]=i*g+u*_+f*m+e[13],t[14]=o*g+c*_+d*m+e[14],t[15]=s*g+l*_+p*m+e[15])}(this,this,t),this.check()}transform(t,e){return 4===t.length?(v(e=function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=L(e||[-0,-0],t,this);break;case 3:e=H(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=R(e||[-0,-0],t,this);break;case 3:e=O(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return S("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return S("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return S("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}class tt extends A{get ELEMENTS(){return u(!1),0}copy(t){return u(!1),this}get x(){return this[0]}set x(t){this[0]=w(t)}get y(){return this[1]}set y(t){this[1]=w(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return w(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return w(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return u(t>=0&&t<this.ELEMENTS,"index is out of range"),w(this[t])}setComponent(t,e){return u(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}const et=[0,0,0],rt={};class nt extends tt{static get ZERO(){return rt.ZERO=rt.ZERO||Object.freeze(new nt(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&d(t)?this.copy(t):(h.debug&&(w(t),w(e),w(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y),w(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=w(t)}angle(t){return r=t,n=(e=this)[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=Math.sqrt(n*n+i*i+o*o)*Math.sqrt(s*s+a*a+u*u),l=c&&z(e,r)/c,Math.acos(Math.min(Math.max(l,-1),1));var e,r,n,i,o,s,a,u,c,l}cross(t){return G(this,this,t),this.check()}rotateX({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateY({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=et}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return H(this,this,t),this.check()}transformAsVector(t){return O(this,this,t),this.check()}transformByMatrix3(t){return W(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}}var it=.1,ot=1e-12,st=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;Math.max(6378137,6378137,6356752.314245179);const at=t=>t,ut=new nt;function ct(t,e,r=at){return d(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function lt(t,e,r=at){return d(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const ht=new nt,ft=new nt,dt=new nt;const pt=new nt,gt={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},_t={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},mt={east:new nt,north:new nt,up:new nt,west:new nt,south:new nt,down:new nt},yt=new nt,bt=new nt,wt=new nt;function vt(t,e,r,n,i,o){const s=gt[e]&&gt[e][r];let a,c,l;u(s&&(!n||n===s));const h=pt.copy(i);if(b(h.x,0,1e-14)&&b(h.y,0,1e-14)){const t=Math.sign(h.z);a=yt.fromArray(_t[e]),"east"!==e&&"west"!==e&&a.scale(t),c=bt.fromArray(_t[r]),"east"!==r&&"west"!==r&&c.scale(t),l=wt.fromArray(_t[n]),"east"!==n&&"west"!==n&&l.scale(t)}else{const{up:i,east:o,north:s}=mt;o.set(-h.y,h.x,0).normalize(),t.geodeticSurfaceNormal(h,i),s.copy(i).cross(o);const{down:u,west:f,south:d}=mt;u.copy(i).scale(-1),f.copy(o).scale(-1),d.copy(s).scale(-1),a=mt[e],c=mt[r],l=mt[n]}return o[0]=a.x,o[1]=a.y,o[2]=a.z,o[3]=0,o[4]=c.x,o[5]=c.y,o[6]=c.z,o[7]=0,o[8]=l.x,o[9]=l.y,o[10]=l.z,o[11]=0,o[12]=h.x,o[13]=h.y,o[14]=h.z,o[15]=1,o}const Et=new nt,St=new nt,At=new nt,Tt=new nt,Rt=new nt,Ot=new nt;let xt;class kt{static get WGS84(){return xt=xt||new kt(6378137,6378137,6356752.314245179),xt}constructor(t=0,e=0,r=0){u(t>=0),u(e>=0),u(r>=0),this.radii=new nt(t,e,r),this.radiiSquared=new nt(t*t,e*e,r*r),this.radiiToTheFourth=new nt(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new nt(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new nt(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=it,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=St,n=At,[,,i]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const o=Math.sqrt(r.dot(n));return n.scale(1/o),r.scale(i),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){Ot.from(t);const r=this.scaleToGeodeticSurface(Ot,Tt);if(!r)return;const n=this.geodeticSurfaceNormal(r,St),i=Rt;i.copy(Ot).subtract(r);const o=Math.atan2(n.y,n.x),s=Math.asin(n.z),a=Math.sign(z(i,Ot))*U(i);return lt([o,s,a],e,h._cartographicRadians?at:_)}eastNorthUpToFixedFrame(t,e=new J){return vt(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,i=new J){return vt(this,t,e,r,n,i)}geocentricSurfaceNormal(t,e=[0,0,0]){return Et.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=ut){return ct(t,e,h._cartographicRadians?at:g)}(t),n=r[0],i=r[1],o=Math.cos(i);return Et.set(o*Math.cos(n),o*Math.sin(n),Math.sin(i)).normalize(),Et.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return Et.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new nt){const{oneOverRadii:n,oneOverRadiiSquared:i,centerToleranceSquared:o}=e;ht.from(t);const s=t.x,a=t.y,u=t.z,c=n.x,l=n.y,h=n.z,f=s*s*c*c,d=a*a*l*l,p=u*u*h*h,g=f+d+p,_=Math.sqrt(1/g);if(!Number.isFinite(_))return;const m=ft;if(m.copy(t).scale(_),g<o)return m.to(r);const y=i.x,b=i.y,w=i.z,v=dt;v.set(m.x*y*2,m.y*b*2,m.z*w*2);let E,S,A,T,R=(1-_)*t.len()/(.5*v.len()),O=0;do{R-=O,E=1/(1+R*y),S=1/(1+R*b),A=1/(1+R*w);const t=E*E,e=S*S,r=A*A;T=f*t+d*e+p*r-1;O=T/(-2*(f*(t*E)*y+d*(e*S)*b+p*(r*A)*w))}while(Math.abs(T)>ot);return ht.scale([E,S,A]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Tt.from(t);const r=Tt.x,n=Tt.y,i=Tt.z,o=this.oneOverRadiiSquared,s=1/Math.sqrt(r*r*o.x+n*n*o.y+i*i*o.z);return Tt.multiplyScalar(s).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Tt.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Tt.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){u(b(this.radii.x,this.radii.y,st)),u(this.radii.z>0),Tt.from(t);const n=Tt.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Tt.set(0,0,n).to(r)}}var It=r(67),Ct=r(27),Mt=r(2),Dt=r(145);class Pt{constructor(t,e,r){this.item=t,this.previous=e,this.next=r}}class Lt{constructor(){this.head=null,this.tail=null,this._length=0}get length(){return this._length}add(t){const e=new Pt(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}remove(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}splice(t,e){t!==e&&(this.remove(e),this._insert(t,e))}_insert(t,e){const r=t.next;t.next=e,this.tail===t?this.tail=e:r.previous=e,e.next=r,e.previous=t,++this._length}}function Bt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nt(t){return null!=t}class jt{constructor(){Bt(this,"_list",void 0),Bt(this,"_sentinel",void 0),Bt(this,"_trimTiles",void 0),this._list=new Lt,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}reset(){this._list.splice(this._list.tail,this._sentinel)}touch(t){const e=t._cacheNode;Nt(e)&&this._list.splice(this._sentinel,e)}add(t,e,r){Nt(e._cacheNode)||(e._cacheNode=this._list.add(e),r&&r(t,e))}unloadTile(t,e,r){const n=e._cacheNode;Nt(n)&&(this._list.remove(n),e._cacheNode=void 0,r&&r(t,e))}unloadTiles(t,e){const r=this._trimTiles;this._trimTiles=!1;const n=this._list,i=1024*t.maximumMemoryUsage*1024,o=this._sentinel;let s=n.head;for(;s!==o&&(t.gpuMemoryUsageInBytes>i||r);){const r=s.item;s=s.next,this.unloadTile(t,r,e)}}trim(){this._trimTiles=!0}}const Ut=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});new nt,new nt;const Ft=new nt,zt=new nt;class Gt{constructor(t=[0,0,0],e=0){this.radius=-0,this.center=new nt,this.fromCenterRadius(t,e)}fromCenterRadius(t,e){return this.center.from(t),this.radius=e,this}fromCornerPoints(t,e){return e=Ft.from(e),this.center=(new nt).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}clone(){return new Gt(this.center,this.radius)}union(t){const e=this.center,r=this.radius,n=t.center,i=t.radius,o=Ft.copy(n).subtract(e),s=o.magnitude();if(r>=s+i)return this.clone();if(i>=s+r)return t.clone();const a=.5*(r+s+i);return zt.copy(o).scale((-r+a)/s).add(e),this.center.copy(zt),this.radius=a,this}expand(t){const e=(t=Ft.from(t)).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}transform(t){this.center.transform(t);const e=D(Ft,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}distanceSquaredTo(t){return(t=Ft.from(t)).subtract(this.center).lengthSquared()-this.radius*this.radius}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}intersectPlane(t){const e=this.center,r=this.radius,n=t.normal.dot(e)+t.distance;return n<-r?Ut.OUTSIDE:n<r?Ut.INTERSECTING:Ut.INSIDE}}function Ht(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1],p=r[2],g=r[3],_=r[4],m=r[5],y=r[6],b=r[7],w=r[8];return t[0]=f*n+d*s+p*c,t[1]=f*i+d*a+p*l,t[2]=f*o+d*u+p*h,t[3]=g*n+_*s+m*c,t[4]=g*i+_*a+m*l,t[5]=g*o+_*u+m*h,t[6]=y*n+b*s+w*c,t[7]=y*i+b*a+w*l,t[8]=y*o+b*u+w*h,t}function Wt(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}const qt=Object.freeze([1,0,0,0,1,0,0,0,1]),Vt=Object.freeze([0,0,0,0,0,0,0,0,0]),Zt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),Qt={};class Kt extends T{static get IDENTITY(){return Qt.IDENTITY=Qt.IDENTITY||Object.freeze(new Kt(qt)),Qt.IDENTITY}static get ZERO(){return Qt.ZERO=Qt.ZERO||Object.freeze(new Kt(Vt)),Qt.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return Zt}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=n,this[2]=s,this[3]=e,this[4]=i,this[5]=a,this[6]=r,this[7]=o,this[8]=u,this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],e*(c*o-s*u)+r*(-c*i+s*a)+n*(u*i-o*a);var t,e,r,n,i,o,s,a,u,c}identity(){return this.copy(qt)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,g=o*s,_=o*a,m=o*u;t[0]=1-h-p,t[3]=l-m,t[6]=f+_,t[1]=l+m,t[4]=1-c-p,t[7]=d-g,t[2]=f-_,t[5]=d+g,t[8]=1-c-h}(this,t),this.check()}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=l*s-a*c,f=-l*o+a*u,d=c*o-s*u,p=r*h+n*f+i*d;p&&(p=1/p,t[0]=h*p,t[1]=(-l*n+i*c)*p,t[2]=(a*n-i*s)*p,t[3]=f*p,t[4]=(l*r-i*u)*p,t[5]=(-a*r+i*o)*p,t[6]=d*p,t[7]=(-c*r+n*u)*p,t[8]=(s*r-n*o)*p)}(this,this),this.check()}multiplyLeft(t){return Ht(this,t,this),this.check()}multiplyRight(t){return Ht(this,this,t),this.check()}rotate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(r),d=Math.cos(r);t[0]=d*n+f*s,t[1]=d*i+f*a,t[2]=d*o+f*u,t[3]=d*s-f*n,t[4]=d*a-f*i,t[5]=d*u-f*o,t[6]=c,t[7]=l,t[8]=h}(this,this,t),this.check()}scale(t){return Array.isArray(t)?Wt(this,this,t):Wt(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1];t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=f*n+d*s+c,t[7]=f*i+d*a+l,t[8]=f*o+d*u+h}(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=P(e||[-0,-0],t,this);break;case 3:e=W(e||[-0,-0,-0],t,this);break;case 4:e=x(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return v(e,t.length),e}transformVector(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return S("Matrix3.transformVector"),this.transform(t,e)}}function Xt(){var t=new I(4);return I!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Yt(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function $t(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],u=r[1],c=r[2],l=r[3];return t[0]=n*l+s*a+i*c-o*u,t[1]=i*l+s*u+o*a-n*c,t[2]=o*l+s*c+n*u-i*a,t[3]=s*l-n*a-i*u-o*c,t}function Jt(t,e,r,n){var i,o,s,a,u,c=e[0],l=e[1],h=e[2],f=e[3],d=r[0],p=r[1],g=r[2],_=r[3];return(o=c*d+l*p+h*g+f*_)<0&&(o=-o,d=-d,p=-p,g=-g,_=-_),1-o>k?(i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-n)*i)/s,u=Math.sin(n*i)/s):(a=1-n,u=n),t[0]=a*c+u*d,t[1]=a*l+u*p,t[2]=a*h+u*g,t[3]=a*f+u*_,t}function te(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*o+s]-e[3*s+o])*r,t[o]=(e[3*o+i]+e[3*i+o])*r,t[s]=(e[3*s+i]+e[3*i+s])*r}return t}var ee,re,ne,ie,oe,se,ae=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},ue=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},ce=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},le=function(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=s+n*(r[2]-s),t[3]=a+n*(r[3]-a),t},he=Z,fe=Q,de=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=n*s,t[2]=i*s,t[3]=o*s,t},pe=(ee=j(),re=F(1,0,0),ne=F(0,1,0),function(t,e,r){var n=z(e,r);return n<-.999999?(G(ee,re,e),V(ee)<1e-6&&G(ee,ne,e),function(t,e){var r=e[0],n=e[1],i=e[2],o=r*r+n*n+i*i;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o}(ee,ee),Yt(t,ee,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(G(ee,e,r),t[0]=ee[0],t[1]=ee[1],t[2]=ee[2],t[3]=1+n,de(t,t))});ie=Xt(),oe=Xt(),se=function(){var t=new I(9);return I!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}();const ge=[0,0,0,1];class _e extends A{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return te(this,t),this.check()}identity(){return function(t){t[0]=0,t[1]=0,t[2]=0,t[3]=1}(this),this.check()}fromAxisRotation(t,e){return Yt(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=w(t)}get y(){return this[1]}set y(t){this[1]=w(t)}get z(){return this[2]}set z(t){this[2]=w(t)}get w(){return this[3]}set w(t){this[3]=w(t)}len(){return he(this)}lengthSquared(){return fe(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return ce(this,t)}rotationTo(t,e){return pe(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return ae(this,this,t),this.check()}calculateW(){return function(t,e){var r=e[0],n=e[1],i=e[2];t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i))}(this,this),this.check()}conjugate(){return function(t,e){t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o,a=s?1/s:0;t[0]=-r*a,t[1]=-n*a,t[2]=-i*a,t[3]=o*a}(this,this),this.check()}lerp(t,e,r){return le(this,t,e,r),this.check()}multiplyRight(t,e){return u(!e),$t(this,this,t),this.check()}multiplyLeft(t,e){return u(!e),$t(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+s*a,t[1]=i*u+o*a,t[2]=o*u-i*a,t[3]=s*u-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u-o*a,t[1]=i*u+s*a,t[2]=o*u+n*a,t[3]=s*u-i*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+i*a,t[1]=i*u-n*a,t[2]=o*u+s*a,t[3]=s*u-o*a}(this,this,t),this.check()}scale(t){return ue(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=ge,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return Jt(this,t,e,r),this.check()}transformVector4(t,e=t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=r[3],l=c*n+a*o-u*i,h=c*i+u*n-s*o,f=c*o+s*i-a*n,d=-s*n-a*i-u*o;t[0]=l*c+d*-s+h*-u-f*-a,t[1]=h*c+d*-a+f*-s-l*-u,t[2]=f*c+d*-u+l*-a-h*-s,t[3]=e[3]}(e,t,this),v(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}const me=new nt,ye=new nt,be=new nt,we=new nt,ve=new nt,Ee=new nt,Se=new nt,Ae=0,Te=1,Re=2,Oe=3,xe=4,ke=5,Ie=6,Ce=7,Me=8;class De{constructor(t=[0,0,0],e=[0,0,0,0,0,0,0,0,0]){this.center=(new nt).from(t),this.halfAxes=new Kt(e)}get halfSize(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2);return[new nt(t).len(),new nt(e).len(),new nt(r).len()]}get quaternion(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2),n=new nt(t).normalize(),i=new nt(e).normalize(),o=new nt(r).normalize();return(new _e).fromMatrix3(new Kt([...n,...i,...o]))}fromCenterHalfSizeQuaternion(t,e,r){const n=new _e(r),i=(new Kt).fromQuaternion(n);return i[0]=i[0]*e[0],i[1]=i[1]*e[0],i[2]=i[2]*e[0],i[3]=i[3]*e[1],i[4]=i[4]*e[1],i[5]=i[5]*e[1],i[6]=i[6]*e[2],i[7]=i[7]*e[2],i[8]=i[8]*e[2],this.center=(new nt).from(t),this.halfAxes=i,this}clone(){return new De(this.center,this.halfAxes)}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}getBoundingSphere(t=new Gt){const e=this.halfAxes,r=e.getColumn(0,be),n=e.getColumn(1,we),i=e.getColumn(2,ve),o=me.copy(r).add(n).add(i);return t.center.copy(this.center),t.radius=o.magnitude(),t}intersectPlane(t){const e=this.center,r=t.normal,n=this.halfAxes,i=r.x,o=r.y,s=r.z,a=Math.abs(i*n[Ae]+o*n[Te]+s*n[Re])+Math.abs(i*n[Oe]+o*n[xe]+s*n[ke])+Math.abs(i*n[Ie]+o*n[Ce]+s*n[Me]),u=r.dot(e)+t.distance;return u<=-a?Ut.OUTSIDE:u>=a?Ut.INSIDE:Ut.INTERSECTING}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=ye.from(t).subtract(this.center),r=this.halfAxes,n=r.getColumn(0,be),i=r.getColumn(1,we),o=r.getColumn(2,ve),s=n.magnitude(),a=i.magnitude(),u=o.magnitude();n.normalize(),i.normalize(),o.normalize();let c,l=0;return c=Math.abs(e.dot(n))-s,c>0&&(l+=c*c),c=Math.abs(e.dot(i))-a,c>0&&(l+=c*c),c=Math.abs(e.dot(o))-u,c>0&&(l+=c*c),l}computePlaneDistances(t,e,r=[-0,-0]){let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,s=this.halfAxes,a=s.getColumn(0,be),u=s.getColumn(1,we),c=s.getColumn(2,ve),l=Ee.copy(a).add(u).add(c).add(o),h=Se.copy(l).subtract(t);let f=e.dot(h);return n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),r[0]=n,r[1]=i,r}transform(t){this.center.transformAsPoint(t);const e=this.halfAxes.getColumn(0,be);e.transformAsPoint(t);const r=this.halfAxes.getColumn(1,we);r.transformAsPoint(t);const n=this.halfAxes.getColumn(2,ve);return n.transformAsPoint(t),this.halfAxes=new Kt([...e,...r,...n]),this}getTransform(){throw new Error("not implemented")}}const Pe=new nt,Le=new nt;class Be{constructor(t=[0,0,1],e=0){this.normal=new nt,this.distance=-0,this.fromNormalDistance(t,e)}fromNormalDistance(t,e){return u(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}fromPointNormal(t,e){t=Pe.from(t),this.normal.from(e).normalize();const r=-this.normal.dot(t);return this.distance=r,this}fromCoefficients(t,e,r,n){return this.normal.set(t,e,r),u(b(this.normal.len(),1)),this.distance=n,this}clone(t){return new Be(this.normal,this.distance)}equals(t){return b(this.distance,t.distance)&&b(this.normal,t.normal)}getPointDistance(t){return this.normal.dot(t)+this.distance}transform(t){const e=Le.copy(this.normal).transformAsVector(t).normalize(),r=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(r,e)}projectPointOntoPlane(t,e=[0,0,0]){t=Pe.from(t);const r=this.getPointDistance(t),n=Le.copy(this.normal).scale(r);return t.subtract(n).to(e)}}const Ne=[new nt([1,0,0]),new nt([0,1,0]),new nt([0,0,1])],je=new nt,Ue=new nt;new Be(new nt(1,0,0),0);class Fe{static get MASK_OUTSIDE(){return 4294967295}static get MASK_INSIDE(){return 0}static get MASK_INDETERMINATE(){return 2147483647}constructor(t=[]){this.planes=t,u(this.planes.every(t=>t instanceof Be))}fromBoundingSphere(t){this.planes.length=2*Ne.length;const e=t.center,r=t.radius;let n=0;for(const t of Ne){let i=this.planes[n],o=this.planes[n+1];i||(i=this.planes[n]=new Be),o||(o=this.planes[n+1]=new Be);const s=je.copy(t).scale(-r).add(e);t.dot(s);i.fromPointNormal(s,t);const a=je.copy(t).scale(r).add(e),u=Ue.copy(t).negate();u.dot(a);o.fromPointNormal(a,u),n+=2}return this}computeVisibility(t){u(t);let e=Ut.INSIDE;for(const r of this.planes){switch(t.intersectPlane(r)){case Ut.OUTSIDE:return Ut.OUTSIDE;case Ut.INTERSECTING:e=Ut.INTERSECTING}}return e}computeVisibilityWithPlaneMask(t,e){if(u(t,"boundingVolume is required."),u(Number.isFinite(e),"parentPlaneMask is required."),e===Fe.MASK_OUTSIDE||e===Fe.MASK_INSIDE)return e;let r=Fe.MASK_INSIDE;const n=this.planes;for(let i=0;i<this.planes.length;++i){const o=i<31?1<<i:0;if(i<31&&0==(e&o))continue;const s=n[i],a=t.intersectPlane(s);if(a===Ut.OUTSIDE)return Fe.MASK_OUTSIDE;a===Ut.INTERSECTING&&(r|=o)}return r}}new nt,new nt,new nt,new nt,new nt;new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,new nt,Math.PI;new Kt,new Kt,new Kt,new Kt,new Kt;new nt,new nt,new nt,new nt,new nt,new Kt,new Kt,new Kt;const ze=new nt,Ge=new nt,He=new Fe([new Be,new Be,new Be,new Be,new Be,new Be]);function We(t,e){const{cameraDirection:r,cameraUp:n,height:i}=t,{metersPerUnit:o}=t.distanceScales,s=[t.longitude,t.latitude,0],a=kt.WGS84.cartographicToCartesian(s,new nt),u=kt.WGS84.eastNorthUpToFixedFrame(a),c=t.unprojectPosition(t.cameraPosition),l=kt.WGS84.cartographicToCartesian(c,new nt),h=new nt(u.transformAsVector(new nt(r).scale(o))).normalize(),f=new nt(u.transformAsVector(new nt(n).scale(o))).normalize();return function(t,e){const r=t.getFrustumPlanes();let n=0;for(const i in r){const o=r[i],s=o.normal.dot(t.center);Ge.copy(o.normal).scale(o.distance-s).add(t.center);const a=t.unprojectPosition(Ge),u=kt.WGS84.cartographicToCartesian(a,new nt);He.planes[n++].fromPointNormal(u,ze.copy(e).subtract(u))}}(t,a),{camera:{position:l,direction:h,up:f},viewport:t,height:i,cullingVolume:He,frameNumber:e,sseDenominator:1.15}}const qe=new nt;function Ve(t){const{halfAxes:e,radius:r,width:n,height:i}=t;if(e){const t=function(t){t.getColumn(0,qe);const e=t.getColumn(1),r=t.getColumn(2),n=qe.add(e).add(r);return n.len()}(e);return Math.log2(6356752.314245179/t)}if(r)return Math.log2(6356752.314245179/r);if(i&&n){return(Math.log2(6378137/n)+Math.log2(6378137/i))/2}return 1}const Ze=0,Qe=1,Ke=3,Xe=4,Ye=5,$e=1,Je=2,tr="empty",er="scenegraph",rr="pointcloud",nr="mesh",ir="I3S",or="TILES3D",sr="geometricError",ar=1;function ur(t){return null!=t}const cr=new nt,lr=new nt,hr=new nt;function fr(t,e,r){if(Object(Ct.a)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,r){const n=new nt(t[0],t[1],t[2]);e.transform(n,n);let i=[];if(10===t.length){const e=t.slice(3,6),r=new _e;r.fromArray(t,6);const n=new nt([1,0,0]),o=new nt([0,1,0]),s=new nt([0,0,1]);n.transformByQuaternion(r),n.scale(e[0]),o.transformByQuaternion(r),o.scale(e[1]),s.transformByQuaternion(r),s.scale(e[2]),i=[...n.toArray(),...o.toArray(),...s.toArray()]}else i=[...t.slice(3,6),...t.slice(6,9),...t.slice(9,12)];const o=e.transformAsVector(i.slice(0,3)),s=e.transformAsVector(i.slice(3,6)),a=e.transformAsVector(i.slice(6,9)),u=new Kt([o[0],o[1],o[2],s[0],s[1],s[2],a[0],a[1],a[2]]);if(ur(r))return r.center=n,r.halfAxes=u,r;return new De(n,u)}(t.box,e,r);if(t.region){const[e,r,n,i,o,s]=t.region,a=kt.WGS84.cartographicToCartesian([m(e),m(i),o],lr),u=kt.WGS84.cartographicToCartesian([m(n),m(r),s],hr),c=(new nt).addVectors(a,u).multiplyScalar(.5),l=(new nt).subVectors(a,u).len()/2;return dr([c[0],c[1],c[2],l],new J)}if(t.sphere)return dr(t.sphere,e,r);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function dr(t,e,r){const n=new nt(t[0],t[1],t[2]);e.transform(n,n);const i=e.getScale(cr),o=Math.max(Math.max(i[0],i[1]),i[2]),s=t[3]*o;return ur(r)?(r.center=n,r.radius=s,r):new Gt(n,s)}new nt,new nt,new J,new nt,new nt,new nt;function pr(t,e){if(t.dynamicScreenSpaceError&&t.dynamicScreenSpaceErrorComputedDensity){const r=t.dynamicScreenSpaceErrorComputedDensity,n=t.dynamicScreenSpaceErrorFactor;return function(t,e){const r=t*e;return 1-Math.exp(-r*r)}(e,r)*n}return 0}const gr=Math.PI/2;function _r([t,e,r]){const n=g(t),i=g(e),o=1+r/6378137,s=o*Math.cos(i);return[t=s*Math.cos(n),e=s*Math.sin(n),r=o*Math.sin(i)]}function mr(t,e){const[r,n,i=0]=t,[o,s,a=0]=e,u=_r([o,s,a]),c=_r([r,n,i]),l=c[0]-u[0],h=c[1]-u[1],f=c[2]-u[2];return l*l+h*h+f*f}function yr(t,e){const r=e.viewport,n=t.header.mbs[1],i=[t.header.mbs[0],n,t.header.mbs[2]],o=t.header.mbs[3]/6378137,s=mr(r.unprojectPosition(r.cameraPosition),i)-o*o;if(s<=0)return 170141175e30;return function(t){const{projectionMatrix:e}=t.viewport;return e[5]}(e)*o/Math.sqrt(s)*300}class br{constructor(t=0){this._array=new Array(t),this._map=new Map,this._length=t}get length(){return this._length}set length(t){this._length=t,t>this._array.length&&(this._array.length=t)}get values(){return this._array}get(t){return Object(Ct.a)(t<this._array.length),this._array[t]}set(t,e){Object(Ct.a)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}delete(t){const e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}peek(){return this._array[this._length-1]}push(t){if(!this._map.has(t)){const e=this.length++;this._array[e]=t,this._map.set(t,e)}}pop(){const t=this._array[--this.length];return this._map.delete(t),t}reserve(t){Object(Ct.a)(t>=0),t>this._array.length&&(this._array.length=t)}resize(t){Object(Ct.a)(t>=0),this.length=t}trim(t){null==t&&(t=this.length),this._array.length=t}reset(){this._array=[],this._map=new Map,this._length=0}find(t){return this._map.has(t)}}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const vr={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:()=>{},viewportTraversersMap:{},basePath:""};class Er{constructor(t){wr(this,"options",void 0),wr(this,"root",void 0),wr(this,"requestedTiles",void 0),wr(this,"selectedTiles",void 0),wr(this,"emptyTiles",void 0),wr(this,"_traversalStack",void 0),wr(this,"_emptyTraversalStack",void 0),wr(this,"_frameNumber",void 0),this.options={...vr,...t},this._traversalStack=new br,this._emptyTraversalStack=new br,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}traverse(t,e,r){this.root=t,this.options={...this.options,...r},this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}reset(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}executeTraversal(t,e){const r=this._traversalStack;for(t._selectionDepth=1,r.push(t);r.length>0;){const t=r.pop();let n=!1;this.canTraverse(t,e)&&(this.updateChildTiles(t,e),n=this.updateAndPushChildren(t,e,r,t.hasRenderContent?t._selectionDepth+1:t._selectionDepth));const i=t.parent,o=Boolean(!i||i._shouldRefine),s=!n;t.hasRenderContent?t.refine===$e?(this.loadTile(t,e),this.selectTile(t,e)):t.refine===Je&&(this.loadTile(t,e),s&&this.selectTile(t,e)):(this.emptyTiles[t.id]=t,this.loadTile(t,e),s&&this.selectTile(t,e)),this.touchTile(t,e),t._shouldRefine=n&&o}this.options.onTraversalEnd(e)}updateChildTiles(t,e){const r=t.children;for(const t of r)this.updateTile(t,e);return!0}updateAndPushChildren(t,e,r,n){const{loadSiblings:i,skipLevelOfDetail:o}=this.options,s=t.children;s.sort(this.compareDistanceToCamera.bind(this));const a=t.refine===Je&&t.hasRenderContent&&!o;let u=!1,c=!0;for(const t of s)if(t._selectionDepth=n,t.isVisibleAndInRequestVolume?(r.find(t)&&r.delete(t),r.push(t),u=!0):(a||i)&&(this.loadTile(t,e),this.touchTile(t,e)),a){let r;if(r=!!t._inRequestVolume&&(t.hasRenderContent?t.contentAvailable:this.executeEmptyTraversal(t,e)),c=c&&r,!c)return!1}return u||(c=!1),c}updateTile(t,e){this.updateTileVisibility(t,e)}selectTile(t,e){this.shouldSelectTile(t)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}loadTile(t,e){this.shouldLoadTile(t)&&(t._requestedFrame=e.frameNumber,t._priority=t._getPriority(),this.requestedTiles[t.id]=t)}touchTile(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}canTraverse(t,e,r=!1,n=!1){return!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:!(!n&&!t.isVisibleAndInRequestVolume)&&this.shouldRefine(t,e,r))}shouldLoadTile(t){return t.hasUnloadedContent||t.contentExpired}shouldSelectTile(t){return t.contentAvailable&&!this.options.skipLevelOfDetail}shouldRefine(t,e,r){let n=t._screenSpaceError;return r&&(n=t.getScreenSpaceError(e,!0)),n>this.options.maximumScreenSpaceError}updateTileVisibility(t,e){const r=[];if(this.options.viewportTraversersMap)for(const t in this.options.viewportTraversersMap){this.options.viewportTraversersMap[t]===e.viewport.id&&r.push(t)}else r.push(e.viewport.id);t.updateVisibility(e,r)}compareDistanceToCamera(t,e){return t._distanceToCamera-e._distanceToCamera}anyChildrenVisible(t,e){let r=!1;for(const n of t.children)n.updateVisibility(e),r=r||n.isVisibleAndInRequestVolume;return r}executeEmptyTraversal(t,e){let r=!0;const n=this._emptyTraversalStack;for(n.push(t);n.length>0&&r;){const t=n.pop();this.updateTile(t,e),t.isVisibleAndInRequestVolume||this.loadTile(t,e),this.touchTile(t,e);if(!t.hasRenderContent&&this.canTraverse(t,e,!1,!0)){const e=t.children;for(const t of e)n.find(t)&&n.delete(t),n.push(t)}else t.contentAvailable||(r=!1)}return r}}function Sr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ar=new nt;class Tr{constructor(t,e,r,n=""){Sr(this,"tileset",void 0),Sr(this,"header",void 0),Sr(this,"id",void 0),Sr(this,"url",void 0),Sr(this,"parent",void 0),Sr(this,"refine",void 0),Sr(this,"type",void 0),Sr(this,"contentUrl",void 0),Sr(this,"lodMetricType",void 0),Sr(this,"lodMetricValue",void 0),Sr(this,"boundingVolume",void 0),Sr(this,"content",void 0),Sr(this,"contentState",void 0),Sr(this,"gpuMemoryUsageInBytes",void 0),Sr(this,"children",void 0),Sr(this,"depth",void 0),Sr(this,"viewportIds",void 0),Sr(this,"transform",void 0),Sr(this,"userData",void 0),Sr(this,"computedTransform",void 0),Sr(this,"hasEmptyContent",void 0),Sr(this,"hasTilesetContent",void 0),Sr(this,"traverser",void 0),Sr(this,"_cacheNode",void 0),Sr(this,"_frameNumber",void 0),Sr(this,"_lodJudge",void 0),Sr(this,"_expireDate",void 0),Sr(this,"_expiredContent",void 0),Sr(this,"_shouldRefine",void 0),Sr(this,"_distanceToCamera",void 0),Sr(this,"_centerZDepth",void 0),Sr(this,"_screenSpaceError",void 0),Sr(this,"_visibilityPlaneMask",void 0),Sr(this,"_visible",void 0),Sr(this,"_inRequestVolume",void 0),Sr(this,"_stackLength",void 0),Sr(this,"_selectionDepth",void 0),Sr(this,"_touchedFrame",void 0),Sr(this,"_visitedFrame",void 0),Sr(this,"_selectedFrame",void 0),Sr(this,"_requestedFrame",void 0),Sr(this,"_priority",void 0),Sr(this,"_contentBoundingVolume",void 0),Sr(this,"_viewerRequestVolume",void 0),Sr(this,"_initialTransform",void 0),this.header=e,this.tileset=t,this.id=n||e.id,this.url=e.url,this.parent=r,this.refine=this._getRefine(e.refine),this.type=e.type,this.contentUrl=e.contentUrl,this.lodMetricType="geometricError",this.lodMetricValue=0,this.boundingVolume=null,this.content=null,this.contentState=Ze,this.gpuMemoryUsageInBytes=0,this.children=[],this.hasEmptyContent=!1,this.hasTilesetContent=!1,this.depth=0,this.viewportIds=[],this.userData={},this._priority=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._screenSpaceError=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this.traverser=new Er({}),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._initialTransform=new J,this.transform=new J,this._initializeLodMetric(e),this._initializeTransforms(e),this._initializeBoundingVolumes(e),this._initializeContent(e),this._initializeRenderingState(e),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,Object.seal(this)}destroy(){this.header=null}isDestroyed(){return null===this.header}get selected(){return this._selectedFrame===this.tileset._frameNumber}get isVisible(){return this._visible}get isVisibleAndInRequestVolume(){return this._visible&&this._inRequestVolume}get hasRenderContent(){return!this.hasEmptyContent&&!this.hasTilesetContent}get hasChildren(){return this.children.length>0||this.header.children&&this.header.children.length>0}get contentReady(){return this.contentState===Ke||this.hasEmptyContent}get contentAvailable(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}get hasUnloadedContent(){return this.hasRenderContent&&this.contentUnloaded}get contentUnloaded(){return this.contentState===Ze}get contentExpired(){return this.contentState===Xe}get contentFailed(){return this.contentState===Ye}getScreenSpaceError(t,e){switch(this.tileset.type){case ir:return yr(this,t);case or:return function(t,e,r){const n=t.tileset,i=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,o=r?i:t.lodMetricValue;if(0===o)return 0;const s=Math.max(t._distanceToCamera,1e-7),{height:a,sseDenominator:u}=e,{viewDistanceScale:c}=n.options;let l=o*a*(c||1)/(s*u);return l-=pr(n,s),l}(this,t,e);default:throw new Error("Unsupported tileset type")}}_getPriority(){const t=this.tileset._traverser,{skipLevelOfDetail:e}=t.options,r=this.refine===$e||e;if(r&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(this.contentState===Ze)return-1;const n=this.parent,i=n&&(!r||0===this._screenSpaceError||n.hasTilesetContent)?n._screenSpaceError:this._screenSpaceError,o=t.root?t.root._screenSpaceError:0;return Math.max(o-i,0)}async loadContent(){if(this.hasEmptyContent)return!1;if(this.content)return!0;this.contentExpired&&(this._expireDate=null),this.contentState=Qe;const t=await this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));if(!t)return this.contentState=Ze,!1;try{const e=this.tileset.getTileUrl(this.contentUrl),r=this.tileset.loader,n={...this.tileset.loadOptions,[r.id]:{...this.tileset.loadOptions[r.id],isTileset:"json"===this.type,...this._getLoaderSpecificOptions(r.id)}};return this.content=await Object(a.a)(e,r,n),this.tileset.options.contentLoader&&await this.tileset.options.contentLoader(this),this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=Ke,this._onContentLoaded(),!0}catch(t){throw this.contentState=Ye,t}finally{t.done()}}unloadContent(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=Ze,!0}updateVisibility(t,e){if(this._frameNumber===t.frameNumber)return;const r=this.parent,n=r?r._visibilityPlaneMask:Fe.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){const t=r?r.computedTransform:this.tileset.modelMatrix;this._updateTransform(t)}this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,n),this._visible=this._visibilityPlaneMask!==Fe.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._frameNumber=t.frameNumber,this.viewportIds=e}visibility(t,e){const{cullingVolume:r}=t,{boundingVolume:n}=this;return r.computeVisibilityWithPlaneMask(n,e)}contentVisibility(){return!0}distanceToTile(t){const e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}cameraSpaceZDepth({camera:t}){const e=this.boundingVolume;return Ar.subVectors(e.center,t.position),t.direction.dot(Ar)}insideViewerRequestVolume(t){const e=this._viewerRequestVolume;return!e||e.distanceSquaredTo(t.camera.position)<=0}updateExpiration(){if(null!=this._expireDate&&this.contentReady&&!this.hasEmptyContent){const t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=Xe,this._expiredContent=this.content)}}get extras(){return this.header.extras}_initializeLodMetric(t){"lodMetricType"in t?this.lodMetricType=t.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in t?this.lodMetricValue=t.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}_initializeTransforms(t){this.transform=t.transform?new J(t.transform):new J;const e=this.parent,r=this.tileset,n=e&&e.computedTransform?e.computedTransform.clone():r.modelMatrix.clone();this.computedTransform=new J(n).multiplyRight(this.transform);const i=e&&e._initialTransform?e._initialTransform.clone():new J;this._initialTransform=new J(i).multiplyRight(this.transform)}_initializeBoundingVolumes(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}_initializeContent(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Ze,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}_initializeRenderingState(t){this.depth=t.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=Fe.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}_getRefine(t){return t||this.parent&&this.parent.refine||Je}_isTileset(){return-1!==this.contentUrl.indexOf(".json")}_onContentLoaded(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()&&(this.hasTilesetContent=!0)}_updateBoundingVolume(t){this.boundingVolume=fr(t.boundingVolume,this.computedTransform,this.boundingVolume);const e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=fr(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=fr(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}_updateTransform(t=new J){const e=t.clone().multiplyRight(this.transform);!e.equals(this.computedTransform)&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}_getLoaderSpecificOptions(t){switch(t){case"i3s":return{...this.tileset.options.i3s,tile:this.header,tileset:this.tileset.tileset,isTileHeader:!1};case"3d-tiles":case"cesium-ion":default:return{assetGltfUpAxis:(e=this.tileset.tileset).asset&&e.asset.gltfUpAxis||"Y"}}var e}}class Rr extends Er{compareDistanceToCamera(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}updateTileVisibility(t,e){if(super.updateTileVisibility(t,e),!t.isVisibleAndInRequestVolume)return;const r=t.children.length>0;if(t.hasTilesetContent&&r){const r=t.children[0];return this.updateTileVisibility(r,e),void(t._visible=r._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))return void(t._visible=!1);const n=t.refine===Je,i=t._optimChildrenWithinParent===ar;n&&i&&r&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}meetsScreenSpaceErrorEarly(t,e){const{parent:r}=t;return!(!r||r.hasTilesetContent||r.refine!==$e)&&!this.shouldRefine(t,e,!0)}}const Or="REQUESTED",xr="COMPLETED",kr="ERROR";class Ir{constructor(){var t,e,r;r=void 0,(e="_statusMap")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,this._statusMap={}}add(t,e,r,n){this._statusMap[e]||(this._statusMap[e]={request:t,callback:r,key:e,frameState:n,status:Or},t().then(t=>{this._statusMap[e].status=xr,this._statusMap[e].callback(t,n)}).catch(t=>{this._statusMap[e].status=kr,r(t)}))}update(t,e){this._statusMap[t]&&(this._statusMap[t].frameState=e)}find(t){return this._statusMap[t]}}class Cr extends Er{constructor(t){var e,r,n;super(t),n=void 0,(r="_tileManager")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this._tileManager=new Ir}shouldRefine(t,e){return t._lodJudge=function(t,e){const r=e.viewport,n=r.metersPerPixel,i=t.header.mbs[1],o=t.header.mbs[0],s=t.header.mbs[2],a=t.header.mbs[3],{height:u,width:c,latitude:l,longitude:h}=r,f=[h,l],d=[o,i,s],p=[h,i],g=[o,l],_=Math.sqrt(u*u+c*c)*n[0],m=.5*u+a/6378137,y=.5*c+a/6378137;if(mr(f,d)>_+a/6378137)return"OUT";if(mr(f,p)>m)return"OUT";if(mr(f,g)>y)return"OUT";if(0===t.lodMetricValue)return"DIG";let b=yr(t,e);return b*=gr,b<.5?"OUT":!t.header.children||b<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}updateChildTiles(t,e){const r=t.header.children||[],n=t.children,i=t.tileset;for(const o of r){const r=`${o.id}-${e.viewport.id}`,s=n&&n.find(t=>t.id===r);if(s)s&&this.updateTile(s,e);else{let n=()=>this._loadTile(o.id,i);this._tileManager.find(r)?this._tileManager.update(r,e):(i.tileset.nodePages&&(n=()=>i.tileset.nodePagesTile.formTileFromNodePages(o.id)),this._tileManager.add(n,r,e=>this._onTileLoad(e,t,r),e))}}return!1}async _loadTile(t,e){const{loader:r}=e,n=e.getTileUrl(`${e.url}/nodes/${t}`),i={...e.loadOptions,i3s:{...e.loadOptions.i3s,isTileHeader:!0,loadContent:!1}};return await Object(a.a)(n,r,i)}_onTileLoad(t,e,r){const n=new Tr(e.tileset,t,e,r);e.children.push(n);const i=this._tileManager.find(n.id).frameState;this.updateTile(n,i),this._frameNumber===i.frameNumber&&this.executeTraversal(n,i)}}function Mr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Dr={description:"",ellipsoid:kt.WGS84,modelMatrix:new J,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{},onTraversalComplete:t=>t,contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}};class Pr{constructor(t,e){Mr(this,"options",void 0),Mr(this,"loadOptions",void 0),Mr(this,"type",void 0),Mr(this,"tileset",void 0),Mr(this,"loader",void 0),Mr(this,"url",void 0),Mr(this,"basePath",void 0),Mr(this,"modelMatrix",void 0),Mr(this,"ellipsoid",void 0),Mr(this,"lodMetricType",void 0),Mr(this,"lodMetricValue",void 0),Mr(this,"refine",void 0),Mr(this,"root",void 0),Mr(this,"roots",void 0),Mr(this,"asset",void 0),Mr(this,"description",void 0),Mr(this,"properties",void 0),Mr(this,"extras",void 0),Mr(this,"attributions",void 0),Mr(this,"credits",void 0),Mr(this,"stats",void 0),Mr(this,"traverseCounter",void 0),Mr(this,"geometricError",void 0),Mr(this,"selectedTiles",void 0),Mr(this,"cartographicCenter",void 0),Mr(this,"cartesianCenter",void 0),Mr(this,"zoom",void 0),Mr(this,"boundingVolume",void 0),Mr(this,"gpuMemoryUsageInBytes",void 0),Mr(this,"dynamicScreenSpaceErrorComputedDensity",void 0),Mr(this,"_traverser",void 0),Mr(this,"_cache",void 0),Mr(this,"_requestScheduler",void 0),Mr(this,"_frameNumber",void 0),Mr(this,"_queryParamsString",void 0),Mr(this,"_queryParams",void 0),Mr(this,"_extensionsUsed",void 0),Mr(this,"_tiles",void 0),Mr(this,"_pendingCount",void 0),Mr(this,"lastUpdatedVieports",void 0),Mr(this,"_requestedTiles",void 0),Mr(this,"_emptyTiles",void 0),Mr(this,"frameStateData",void 0),Mr(this,"maximumMemoryUsage",void 0),Object(Ct.a)(t),this.options={...Dr,...e},this.tileset=t,this.loader=t.loader,this.type=t.type,this.url=t.url,this.basePath=t.basePath||Mt.b.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=t.lodMetricType,this.lodMetricValue=t.lodMetricValue,this.refine=t.root.refine,this.loadOptions=this.options.loadOptions||{},this.root=null,this.roots={},this.cartographicCenter=null,this.cartesianCenter=null,this.zoom=1,this.boundingVolume=null,this.traverseCounter=0,this.geometricError=0,this._traverser=this._initializeTraverser(),this._cache=new jt,this._requestScheduler=new Dt.a({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this._frameNumber=0,this._pendingCount=0,this._tiles={},this.selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this.frameStateData={},this.lastUpdatedVieports=null,this._queryParams={},this._queryParamsString="",this.maximumMemoryUsage=this.options.maximumMemoryUsage||32,this.gpuMemoryUsageInBytes=0,this.stats=new It.a({id:this.url}),this._initializeStats(),this._extensionsUsed=void 0,this.dynamicScreenSpaceErrorComputedDensity=0,this.extras=null,this.asset={},this.credits={},this.description=this.options.description||"",this._initializeTileSet(t)}destroy(){this._destroy()}isLoaded(){return 0===this._pendingCount&&0!==this._frameNumber}get tiles(){return Object.values(this._tiles)}get frameNumber(){return this._frameNumber}get queryParams(){return this._queryParamsString||(this._queryParamsString=function(t){const e=[];for(const r of Object.keys(t))e.push(`${r}=${t[r]}`);switch(e.length){case 0:return"";case 1:return"?"+e[0];default:return"?"+e.join("&")}}(this._queryParams)),this._queryParamsString}setProps(t){this.options={...this.options,...t}}setOptions(t){this.options={...this.options,...t}}getTileUrl(t){return t.startsWith("data:")?t:`${t}${this.queryParams}`}hasExtension(t){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(t)>-1)}update(t){if("loadTiles"in this.options&&!this.options.loadTiles)return;if(this.traverseCounter>0)return;!t&&this.lastUpdatedVieports?t=this.lastUpdatedVieports:this.lastUpdatedVieports=t,t instanceof Array||(t=[t]),this._cache.reset(),this._frameNumber++,this.traverseCounter=t.length;const e=[];for(const r of t){const t=r.id;this._needTraverse(t)?e.push(t):this.traverseCounter--}for(const r of t){const t=r.id;if(this.roots[t]||(this.roots[t]=this._initializeTileHeaders(this.tileset,null)),!e.includes(t))continue;const n=We(r,this._frameNumber);this._traverser.traverse(this.roots[t],n,this.options)}}_needTraverse(t){let e=t;return this.options.viewportTraversersMap&&(e=this.options.viewportTraversersMap[t]),e===t}_onTraversalEnd(t){const e=t.viewport.id;this.frameStateData[e]||(this.frameStateData[e]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});const r=this.frameStateData[e],n=Object.values(this._traverser.selectedTiles);r.selectedTiles=n,r._requestedTiles=Object.values(this._traverser.requestedTiles),r._emptyTiles=Object.values(this._traverser.emptyTiles),this.traverseCounter--,this.traverseCounter>0||this._updateTiles()}_updateTiles(){this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[];for(const t in this.frameStateData){const e=this.frameStateData[t];this.selectedTiles=this.selectedTiles.concat(e.selectedTiles),this._requestedTiles=this._requestedTiles.concat(e._requestedTiles),this._emptyTiles=this._emptyTiles.concat(e._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);for(const t of this.selectedTiles)this._tiles[t.id]=t;this._loadTiles(),this._unloadTiles(),this._updateStats()}_tilesChanged(t,e){if(t.length!==e.length)return!0;const r=new Set(t.map(t=>t.id)),n=new Set(e.map(t=>t.id));let i=t.filter(t=>!n.has(t.id)).length>0;return i=i||e.filter(t=>!r.has(t.id)).length>0,i}_loadTiles(){for(const t of this._requestedTiles)t.contentUnloaded&&this._loadTile(t)}_unloadTiles(){this._cache.unloadTiles(this,(t,e)=>t._unloadTile(e))}_updateStats(){let t=0,e=0;for(const r of this.selectedTiles)r.contentAvailable&&r.content&&(t++,r.content.pointCount&&(e+=r.content.pointCount));this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=t,this.stats.get("Points").count=e}_initializeTileSet(t){this.root=this._initializeTileHeaders(t,null),this.type===or&&this._initializeCesiumTileset(t),this.type===ir&&this._initializeI3STileset(),this._calculateViewProps()}_calculateViewProps(){const t=this.root;Object(Ct.a)(t);const{center:e}=t.boundingVolume;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new nt,void(this.zoom=1);this.cartographicCenter=kt.WGS84.cartesianToCartographic(e,new nt),this.cartesianCenter=e,this.zoom=Ve(t.boundingVolume)}_initializeStats(){this.stats.get("Tiles In Tileset(s)"),this.stats.get("Tiles Loading"),this.stats.get("Tiles In Memory"),this.stats.get("Tiles In View"),this.stats.get("Tiles To Render"),this.stats.get("Tiles Loaded"),this.stats.get("Tiles Unloaded"),this.stats.get("Failed Tile Loads"),this.stats.get("Points","memory"),this.stats.get("Tile Memory Use","memory")}_initializeTileHeaders(t,e){const r=new Tr(this,t.root,e);if(e&&(e.children.push(r),r.depth=e.depth+1),this.type===or){const t=[];for(t.push(r);t.length>0;){const e=t.pop();this.stats.get("Tiles In Tileset(s)").incrementCount();const r=e.header.children||[];for(const n of r){const r=new Tr(this,n,e);e.children.push(r),r.depth=e.depth+1,t.push(r)}}}return r}_initializeTraverser(){let t;switch(this.type){case or:t=Rr;break;case ir:t=Cr;break;default:t=Er}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}_destroyTileHeaders(t){this._destroySubtree(t)}async _loadTile(t){let e;try{this._onStartTileLoading(),e=await t.loadContent()}catch(e){this._onTileLoadError(t,e)}finally{this._onEndTileLoading(),this._onTileLoad(t,e)}}_onTileLoadError(t,e){this.stats.get("Failed Tile Loads").incrementCount();const r=e.message||e.toString(),n=t.url;console.error(`A 3D tile failed to load: ${t.url} ${r}`),this.options.onTileError(t,r,n)}_onTileLoad(t,e){e&&(t&&t.content&&function(t,e){Object(Ct.a)(t),Object(Ct.a)(e);const{rtcCenter:r,gltfUpAxis:n}=e,{computedTransform:i,boundingVolume:{center:o}}=t;let s=new J(i);switch(r&&s.translate(r),n){case"Z":break;case"Y":const t=(new J).rotateX(Math.PI/2);s=s.multiplyRight(t);break;case"X":const e=(new J).rotateY(-Math.PI/2);s=s.multiplyRight(e)}e.isQuantized&&s.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);const a=new nt(o);e.cartesianModelMatrix=s,e.cartesianOrigin=a;const u=kt.WGS84.cartesianToCartographic(a,new nt),c=kt.WGS84.eastNorthUpToFixedFrame(a).invert();e.cartographicModelMatrix=c.multiplyRight(s),e.cartographicOrigin=u,e.modelMatrix=e.cartographicModelMatrix}(t,t.content),this._addTileToCache(t),this.options.onTileLoad(t))}_onStartTileLoading(){this._pendingCount++,this.stats.get("Tiles Loading").incrementCount()}_onEndTileLoading(){this._pendingCount--,this.stats.get("Tiles Loading").decrementCount()}_addTileToCache(t){this._cache.add(this,t,e=>e._updateCacheStats(t))}_updateCacheStats(t){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=t.content.byteLength||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}_unloadTile(t){this.gpuMemoryUsageInBytes-=t.content&&t.content.byteLength||0,this.stats.get("Tiles In Memory").decrementCount(),this.stats.get("Tiles Unloaded").incrementCount(),this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(t),t.unloadContent()}_destroy(){const t=[];for(this.root&&t.push(this.root);t.length>0;){const e=t.pop();for(const r of e.children)t.push(r);this._destroyTile(e)}this.root=null}_destroySubtree(t){const e=t,r=[];for(r.push(e);r.length>0;){t=r.pop();for(const e of t.children)r.push(e);t!==e&&this._destroyTile(t)}e.children=[]}_destroyTile(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}_initializeCesiumTileset(t){if(this.asset=t.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed,this.extras=t.extras}_initializeI3STileset(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}const Lr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},Br=(Object.keys(Lr),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function Nr(t,e,r){Object(Ct.a)(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),i=new Uint8Array(t,e,r);return n.decode(i)}const jr={name:"Draco",id:"draco",module:"draco",version:"3.0.14",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Fr{constructor(t,e){Ur(this,"fields",void 0),Ur(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new Fr(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new Fr(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof Fr){const n=t;e=n.fields,r=zr(zr(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new Fr(i,r)}}function zr(t,e){return new Map([...t||new Map,...e||new Map])}let Gr,Hr,Wr,qr,Vr,Zr,Qr,Kr;function Xr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(Gr||(Gr={}));class Yr{static isNull(t){return t&&t.typeId===Gr.Null}static isInt(t){return t&&t.typeId===Gr.Int}static isFloat(t){return t&&t.typeId===Gr.Float}static isBinary(t){return t&&t.typeId===Gr.Binary}static isUtf8(t){return t&&t.typeId===Gr.Utf8}static isBool(t){return t&&t.typeId===Gr.Bool}static isDecimal(t){return t&&t.typeId===Gr.Decimal}static isDate(t){return t&&t.typeId===Gr.Date}static isTime(t){return t&&t.typeId===Gr.Time}static isTimestamp(t){return t&&t.typeId===Gr.Timestamp}static isInterval(t){return t&&t.typeId===Gr.Interval}static isList(t){return t&&t.typeId===Gr.List}static isStruct(t){return t&&t.typeId===Gr.Struct}static isUnion(t){return t&&t.typeId===Gr.Union}static isFixedSizeBinary(t){return t&&t.typeId===Gr.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===Gr.FixedSizeList}static isMap(t){return t&&t.typeId===Gr.Map}static isDictionary(t){return t&&t.typeId===Gr.Dictionary}get typeId(){return Gr.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;Hr=Symbol.toStringTag;class $r extends Yr{constructor(t,e){super(),Xr(this,"isSigned",void 0),Xr(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return Gr.Int}get[Hr](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class Jr extends $r{constructor(){super(!0,8)}}class tn extends $r{constructor(){super(!0,16)}}class en extends $r{constructor(){super(!0,32)}}class rn extends $r{constructor(){super(!1,8)}}class nn extends $r{constructor(){super(!1,16)}}class on extends $r{constructor(){super(!1,32)}}const sn=32,an=64;Wr=Symbol.toStringTag;class un extends Yr{constructor(t){super(),Xr(this,"precision",void 0),this.precision=t}get typeId(){return Gr.Float}get[Wr](){return"Float"}toString(){return"Float"+this.precision}}class cn extends un{constructor(){super(sn)}}class ln extends un{constructor(){super(an)}}Symbol.toStringTag;Symbol.toStringTag;qr=Symbol.toStringTag;Vr=Symbol.toStringTag;Zr=Symbol.toStringTag;Qr=Symbol.toStringTag;Kr=Symbol.toStringTag;class hn extends Yr{constructor(t,e){super(),Xr(this,"listSize",void 0),Xr(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return Gr.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Kr](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}function fn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class dn{constructor(t,e,r=!1,n=new Map){fn(this,"name",void 0),fn(this,"type",void 0),fn(this,"nullable",void 0),fn(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new dn(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}function pn(t,e,r){const n=r?gn(r.metadata):void 0,i=function(t){switch(t.constructor){case Int8Array:return new Jr;case Uint8Array:return new rn;case Int16Array:return new tn;case Uint16Array:return new nn;case Int32Array:return new en;case Uint32Array:return new on;case Float32Array:return new cn;case Float64Array:return new ln;default:throw new Error("array type not supported")}}(e.value);return new dn(t,new hn(e.size,new dn("value",i)),!1,n)}function gn(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function _n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const mn={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},yn={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class bn{constructor(t){_n(this,"draco",void 0),_n(this,"decoder",void 0),_n(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),i=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const o=this._getDracoLoaderData(i,n,e),s=this._getMeshData(i,o,e),a=function(t){let e=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,s=-1/0;const a=t.POSITION?t.POSITION.value:[],u=a&&a.length;for(let t=0;t<u;t+=3){const u=a[t],c=a[t+1],l=a[t+2];e=u<e?u:e,r=c<r?c:r,n=l<n?l:n,i=u>i?u:i,o=c>o?c:o,s=l>s?l:s}return[[e,r,n],[i,o,s]]}(s.attributes),u=function(t,e,r){const n=gn(e.metadata),i=[],o=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=pn(e,t[e],o[e]);i.push(r)}if(r){const t=pn("indices",r);i.push(t)}return new Fr(i,n)}(s.attributes,o,s.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:a},...s,schema:u}}finally{this.draco.destroy(r),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:i}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const i=this.decoder.GetAttribute(t,n),o=this._getAttributeMetadata(t,n);r[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:n,metadata:o};const s=this._getQuantizationTransform(i,e);s&&(r[i.unique_id()].quantization_transform=s);const a=this._getOctahedronTransform(i,e);a&&(r[i.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,r);i.name=t;const{value:o,size:s}=this._getAttributeValues(e,i);n[t]={value:o,size:s,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=yn[e.data_type],n=e.num_components,i=t.num_points()*n,o=i*r.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const u=this.draco._malloc(o);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,s,o,u),a=new r(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in mn){if(this.draco[t]===n)return mn[t]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var wn=r(16),vn=r(49),En=r(13);const Sn={};async function An(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!wn.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return Object(En.a)(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.0.14/dist/libs/${t}`;if(wn.d)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),Sn[t]=Sn[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!wn.b)return vn.requireFromFile&&await vn.requireFromFile(t);if(wn.d)return importScripts(t);const e=await fetch(t);return function(t,e){if(!wn.b)return vn.requireFromString&&vn.requireFromString(t,e);if(wn.d)return eval.call(wn.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await Sn[t]}let Tn,Rn;async function On(t){const e=t.modules||{};return Tn=e.draco3d?Tn||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):Tn||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await An("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await Tn}async function xn(t){const e=t.modules||{};return Rn=e.draco3d?Rn||e.draco3d.createEncoderModule({}).then(t=>({draco:t})):Rn||async function(t){let e=await An("https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js","draco",t);return e=e||globalThis.DracoEncoderModule,new Promise(t=>{e({onModuleLoaded:e=>t({draco:e})})})}(t),await Rn}const kn={...jr,parse:async function(t,e){const{draco:r}=await On(e),n=new bn(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const In={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},Cn={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...In},Mn={[In.DOUBLE]:Float64Array,[In.FLOAT]:Float32Array,[In.UNSIGNED_SHORT]:Uint16Array,[In.UNSIGNED_INT]:Uint32Array,[In.UNSIGNED_BYTE]:Uint8Array,[In.BYTE]:Int8Array,[In.SHORT]:Int16Array,[In.INT]:Int32Array},Dn={DOUBLE:In.DOUBLE,FLOAT:In.FLOAT,UNSIGNED_SHORT:In.UNSIGNED_SHORT,UNSIGNED_INT:In.UNSIGNED_INT,UNSIGNED_BYTE:In.UNSIGNED_BYTE,BYTE:In.BYTE,SHORT:In.SHORT,INT:In.INT};class Pn{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in Mn){if(Mn[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=Dn[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case In.UNSIGNED_SHORT_5_6_5:case In.UNSIGNED_SHORT_4_4_4_4:case In.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=Mn[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return Pn.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(Pn.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/Pn.getByteSize(t));return new(Pn.getArrayType(t))(e,r,n)}}class Ln{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=Cn.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=Pn.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,i){const o=this.json[t];if(!o)return o;const s=this.getPropertyArray(t,e,r);if(1===r)return s[n];for(let t=0;t<r;++t)i[t]=s[r*n+t];return i}_getTypedArrayFromBinary(t,e,r,n,i){const o=this._cachedTypedArrays;let s=o[t];return s||(s=Pn.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+i,n*r),o[t]=s),s}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let i=n[t];return i||(i=Pn.createTypedArray(e,r),n[t]=i),i}}const Bn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Nn={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},jn={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Un=t=>void 0!==t;function Fn(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const i=e.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=i,n=i),n?function(t,e){let r,n,i;const o=t.instancesLength,s=t.classes;let a,u=t.classIds,c=t.parentCounts,l=t.parentIds,h=o;Un(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,o));if(Un(c))for(Un(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,i=getBinaryAccessor(c),c=i.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,o)),a=new Uint16Array(o),h=0,r=0;r<o;++r)a[r]=h,h+=c[r];Un(l)&&Un(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(e.buffer,e.byteOffset+l.byteOffset,h));const f=s.length;for(r=0;r<f;++r){const t=s[r].length,n=s[r].instances,i=getBinaryProperties(t,n,e);s[r].instances=combine(i,n)}const d=new Array(f).fill(0),p=new Uint16Array(o);for(r=0;r<o;++r)n=u[r],p[r]=d[n],++d[n];const g={classes:s,classIds:u,classIndexes:p,parentCounts:c,parentIndexes:a,parentIds:l};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)Gn(t,r,stack)}(g),g}(n,r):null}function zn(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,i=t.parentCounts,o=t.parentIds,s=t.parentIndexes,a=n.length,u=scratchVisited;u.length=Math.max(u.length,a);const c=++marker,l=scratchStack;l.length=0,l.push(e);for(;l.length>0;){if(e=l.pop(),u[e]===c)continue;u[e]=c;const n=r(t,e);if(Un(n))return n;const a=i[e],h=s[e];for(let t=0;t<a;++t){const r=o[h+t];r!==e&&l.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const i=r(t,e);if(Un(i))return i;const o=t.parentIds[e];n=o!==e,e=o}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function Gn(t,e,r){const n=t.parentCounts,i=t.parentIds,o=t.parentIndexes,s=t.classIds.length;if(!Un(i))return;assert(e<s,`Parent index ${e} exceeds the total number of instances: ${s}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Un(n)?n[e]:1,u=Un(n)?o[e]:e;for(let n=0;n<a;++n){const o=i[u+n];o!==e&&Gn(t,o,r)}r.pop(e)}function Hn(t){return null!=t}const Wn=(t,e)=>t,qn={HIERARCHY:!0,extensions:!0,extras:!0};class Vn{constructor(t,e,r,n={}){var i;Object(Ct.a)(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(i=this.json)||void 0===i?void 0:i.extensions)||{},this._properties={};for(const t in this.json)qn[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=Fn(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._hierarchy){return Hn(zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return Object(Ct.a)("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),Hn(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=Hn(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(Hn(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(Hn(r))return Wn(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(Hn(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),Object(Ct.a)("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let i=this._properties[e];Hn(i)||(this._properties[e]=new Array(n),i=this._properties[e]),i[t]=Wn(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;Object(Ct.a)(this.binary,`Property ${t} requires a batch table binary.`),Object(Ct.a)(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:i}=t;Object(Ct.a)(t.componentType);const o="string"==typeof i?Pn.fromName(i):i,s=Bn[t.type],a=Nn[t.type],u=jn[t.type];return r+=t.byteOffset,{values:Pn.createTypedArray(o,e,r,s*n),type:o,size:s,unpacker:a,packer:u}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return Hn(t.classes[n].instances[e])});return Hn(r)}_getPropertyNamesInHierarchy(t,e){zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n].instances;for(const t in i)i.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return zn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n],o=t.classIndexes[r],s=i.instances[e];return Hn(s)?Hn(s.typedArray)?this._getBinaryProperty(s,o):Wn(s[o]):null})}_setHierarchyProperty(t,e,r,n){const i=zn(this._hierarchy,e,(t,i)=>{const o=t.classIds[i],s=t.classes[o],a=t.classIndexes[i],u=s.instances[r];return!!Hn(u)&&(Object(Ct.a)(i===e,`Inherited property "${r}" is read-only.`),Hn(u.typedArray)?this._setBinaryProperty(u,a,n):u[a]=Wn(n),!0)});return Hn(i)}}function Zn(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Qn(t,e,r){const n=new DataView(e);let i;t.header=t.header||{};let o=n.getUint32(r,!0);r+=4;let s=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let u=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,i=o,a=s,u=0,o=0,s=0,console.warn("b3dm tile in legacy format.")):u>=570425344&&(r-=4,i=a,a=o,u=s,o=0,s=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=o,t.header.featureTableBinaryByteLength=s,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=u,t.header.batchLength=i,r}function Kn(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:i,featureTableBinaryByteLength:o,batchLength:s}=t.header;if(t.featureTableJson={BATCH_LENGTH:s||0},i>0){const n=Nr(e,r,i);t.featureTableJson=JSON.parse(n)}return r+=i,t.featureTableBinary=new Uint8Array(e,r,o),r+=o}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:i,batchTableBinaryByteLength:o}=t.header;if(i>0){const n=Nr(e,r,i);t.batchTableJson=JSON.parse(n),r+=i,o>0&&(t.batchTableBinary=new Uint8Array(e,r,o),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=o)}return r}(t,e,r)}function Xn(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,i=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=i<<3,e}function Yn(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:i,pointCount:o}=t;if(n&&r){const t=new Uint8ClampedArray(3*o);for(let e=0;e<o;e++){const i=n[e],o=r.getProperty(i,"dimensions").map(t=>255*t);t[3*e]=o[0],t[3*e+1]=o[1],t[3*e+2]=o[2]}return{type:Cn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(i){const t=new Uint8ClampedArray(3*o);for(let r=0;r<o;r++){const n=Xn(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:Cn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*o?{type:Cn.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:Cn.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}class $n extends tt{constructor(t=0,e=0){super(2),d(t)&&1===arguments.length?this.copy(t):(h.debug&&(w(t),w(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return L(this,this,t),this.check()}transformAsVector(t){return R(this,this,t),this.check()}transformByMatrix3(t){return P(this,this,t),this.check()}transformByMatrix2x3(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i}(this,this,t),this.check()}}function Jn(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new $n,new nt,new $n,new $n,new Uint8Array(1);function ti(t,e=255){return y(t,0,e)/e*2-1}function ei(t){return t<0?-1:1}function ri(t,e,r,n){if(Jn(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=ti(t,r),n.y=ti(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*ei(t),n.y=(1-Math.abs(t))*ei(n.y)}return n.normalize()}function ni(t,e,r){return ri(t,e,255,r)}const ii=new nt;function oi(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new nt,n=new Float32Array(3*t.pointCount);for(let i=0;i<t.pointCount;i++)r.set(e[3*i],e[3*i+1],e[3*i+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*i);return n}(t,e)):{type:Cn.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function si(t,e,r,n,i){r=Kn(t,e,r=Qn(t,e,r=Zn(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:o,batchTable:s}=function(t){const e=new Ln(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",Cn.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:i,batchTableBinary:o}=t;r=new Vn(i,o,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,i){let o,s,a;const u=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(a=u.properties);const c=e.getExtension("3DTILES_draco_point_compression");if(c){s=c.properties;const e=c.byteOffset,r=c.byteLength;if(!s||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");o=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(s.POSITION),t.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),t.hasNormals=Number.isFinite(s.NORMAL),t.hasBatchIds=Number.isFinite(s.BATCH_ID),t.isTranslucent=Number.isFinite(s.RGBA)}if(!o)return!0;const l={buffer:o,properties:{...s,...a},featureTableProperties:s,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:i}=n,o={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete o["3d-tiles"];const s=await i(e.buffer,kn,o),a=s.attributes.POSITION&&s.attributes.POSITION.value,u=s.attributes.COLOR_0&&s.attributes.COLOR_0.value,c=s.attributes.NORMAL&&s.attributes.NORMAL.value,l=s.attributes.BATCH_ID&&s.attributes.BATCH_ID.value,h=a&&s.attributes.POSITION.value.quantization,f=c&&s.attributes.NORMAL.value.quantization;if(h){const e=s.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new nt(r,r,r),t.quantizedVolumeOffset=new nt(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}f&&(t.octEncodedRange=(1<<s.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const d={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))s.attributes[t]&&s.attributes[t].value&&(d[t.toLowerCase()]=s.attributes[t].value);t.attributes={positions:a,colors:Yn(t,u),normals:c,batchIds:l,...d}}(t,l,n,i)}(t,o,0,n,i),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",Cn.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",Cn.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Cn.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Cn.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=oi(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,o,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",Cn.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",Cn.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",Cn.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Yn(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",Cn.UNSIGNED_BYTE,4))}(t,o,s),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",Cn.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",Cn.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)ni(e[2*n],e[2*n+1],ii),ii.toArray(r,3*n);return{type:Cn.FLOAT,size:2,value:r}}return{type:Cn.FLOAT,size:2,value:e}}(t,r)}}(t,o),r}function ai(t,e){if(!t)throw new Error(e)}var ui=r(28);const{_parseImageNode:ci}=ui.a,li="undefined"!=typeof Image,hi="undefined"!=typeof ImageBitmap,fi=Boolean(ci),di=!!ui.b||fi;function pi(t){const e=_i(t);if(!e)throw new Error("Not an image");return e}function gi(t){switch(pi(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function _i(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const mi=/^data:image\/svg\+xml/,yi=/\.svg((\?|#).*)?$/;function bi(t){return t&&(mi.test(t)||yi.test(t))}function wi(t,e){if(bi(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function vi(t,e,r){const n=function(t,e){if(bi(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return wi(t,e)}(t,r),i=self.URL||self.webkitURL,o="string"!=typeof n&&i.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(o||n,e)}finally{o&&i.revokeObjectURL(o)}}const Ei={};let Si=!0;async function Ai(t,e,r){let n;if(bi(r)){n=await vi(t,e,r)}else n=wi(t,r);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||Ei)return!1;return!0}(e)&&Si||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),Si=!1}return await createImageBitmap(t)}(n,i)}function Ti(t){const e=Ri(t);return function(t){const e=Ri(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let i=2;for(;i+9<e.byteLength;){const t=e.getUint16(i,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!r.has(t))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=Ri(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function Ri(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const Oi={id:"image",module:"images",name:"Images",version:"3.0.14",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:i}=r||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(hi)return"imagebitmap";if(li)return"image";if(di)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return hi||li||di;case"imagebitmap":return hi;case"image":return li;case"data":return di;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":o=await Ai(t,e,i);break;case"image":o=await vi(t,e,i);break;case"data":o=await function(t,e){const{mimeType:r}=Ti(t)||{},{_parseImageNode:n}=ui.a;return ai(n),n(t,r,e)}(t,e);break;default:ai(!1)}return"data"===n&&(o=gi(o)),o},tests:[t=>Boolean(Ti(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};var xi=r(87),ki=r(20);function Ii(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function Ci(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function Mi(t,e,r){const n=t.bufferViews[r];Ii(n);const i=e[n.buffer];Ii(i);const o=(n.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,n.byteLength)}var Di=r(41);const Pi=["SCALAR","VEC2","VEC3","VEC4"],Li=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Bi=new Map(Li),Ni={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ji={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ui={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Fi(t){return Pi[t-1]||Pi[0]}function zi(t){const e=Bi.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function Gi(t,e){const r=Ui[t.componentType],n=Ni[t.type],i=ji[t.componentType],o=t.count*n,s=t.count*n*i;return Ii(s>=0&&s<=e.byteLength),{ArrayType:r,length:o,byteLength:s}}function Hi(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Wi={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class qi{constructor(t){Hi(this,"gltf",void 0),Hi(this,"sourceBuffers",void 0),Hi(this,"byteLength",void 0),this.gltf=t||{json:{...Wi},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];Ii(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:i}=Gi(t,e);return new n(r,e.byteOffset+t.byteOffset,i)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return Ii(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return Ii(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:i=4}=t,o={primitives:[{attributes:this._addAttributes(e),mode:i}]};if(r){const t=this._addIndices(r);o.primitives[0].indices=t}return Number.isFinite(n)&&(o.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=Ti(t),n=e||(null==r?void 0:r.mimeType),i={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(t){const e=t.byteLength;Ii(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Object(Di.b)(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:Fi(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const i={size:e.size,componentType:zi(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(i,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),i=new Uint8Array(n);let o=0;for(const t of this.sourceBuffers||[])o=Object(Di.a)(t,i,o);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],i=this._getGltfAttributeName(r),o=this.addBinaryBuffer(n.value,n);e[i]=o}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let i=0;i<e;i++)r.min[0+i]=Math.min(r.min[0+i],t[n+i]),r.max[0+i]=Math.max(r.max[0+i],t[n+i]);return r}}function Vi(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:Fi(r),componentType:zi(e)}}async function Zi(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const i=new qi(t),o=[];for(const t of function*(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}(i))i.getObjectExtension(t,"KHR_draco_mesh_compression")&&o.push(Ki(i,t,e,r));await Promise.all(o),i.removeExtension("KHR_draco_mesh_compression")}function Qi(t,e={}){const r=new qi(t);for(const t of r.json.meshes||[])Xi(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function Ki(t,e,r,n){const i=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!i)return;const o=t.getTypedArrayForBufferView(i.bufferView),s=Object(ki.d)(o.buffer,o.byteOffset),{parse:a}=n,u={...r};delete u["3d-tiles"];const c=await a(s,kn,u,n),l=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=Vi(n);e[r]=t}}return e}(c.attributes);for(const[r,n]of Object.entries(l))if(r in e.attributes){const i=e.attributes[r],o=t.getAccessor(i);null!=o&&o.min&&null!=o&&o.max&&(n.min=o.min,n.max=o.max)}e.attributes=l,c.indices&&(e.indices=Vi(c.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Xi(t,e,r=4,n,i){var o;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const s=n.DracoWriter.encodeSync({attributes:t}),a=null==i||null===(o=i.parseSync)||void 0===o?void 0:o.call(i,{attributes:t}),u=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:u,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(s),attributes:u}}}]}}async function Yi(t){const e=new qi(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function $i(t){const e=new qi(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}async function Ji(t){const e=new qi(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function to(t){const e=new qi(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");Ii(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}async function eo(t){const e=new qi(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:i=[]}=t,o=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=o.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),i.forEach(t=>{t.program=r[t.program]}),i}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=no(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function ro(t,e){}function no(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const io={KHR_draco_mesh_compression:n,KHR_materials_unlit:i,KHR_lights_punctual:o,KHR_techniques_webgl:s};const oo={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},so={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class ao{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new qi(t),{json:r}=e;for(const t of r.images||[]){const r=e.removeObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r)}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in oo)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const i=r[n];i.id=i.id||n;const o=t[e].length;t[e].push(i),this.idToIndexMap[e][n]=o}}}_convertObjectIdsToArrayIndices(t){for(const e in oo)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=so[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const uo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},co={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},lo={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},ho={magFilter:lo.TEXTURE_MAG_FILTER,minFilter:lo.TEXTURE_MIN_FILTER,wrapS:lo.TEXTURE_WRAP_S,wrapT:lo.TEXTURE_WRAP_T},fo={[lo.TEXTURE_MAG_FILTER]:lo.LINEAR,[lo.TEXTURE_MIN_FILTER]:lo.NEAREST_MIPMAP_LINEAR,[lo.TEXTURE_WRAP_S]:lo.REPEAT,[lo.TEXTURE_WRAP_]:lo.REPEAT};class po{postProcess(t,e={}){const{json:r,buffers:n=[],images:i=[],baseUri:o=""}=t;return Ii(r),this.baseUri=o,this.json=r,this.buffers=n,this.images=i,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,co[r]),t.components=(n=t.type,uo[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=Gi(t,t.bufferView),i=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,o=e.arrayBuffer.slice(i,i+n);t.value=new r(o)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):fo,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return ho[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let i=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(i+=t.byteOffset),t.data=new Uint8Array(n,i,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const go=1735152710;function _o(t,e=0,r={}){const n=new DataView(t),{magic:i=go}=r,o=n.getUint32(e,!1);return o===i||o===go}function mo(t,e,r=0,n={}){const i=new DataView(e),o=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(i,r+0),s=i.getUint32(r+4,!0),a=i.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){Object(Ct.a)(t.header.byteLength>20);const n=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);return r+=8,Object(Ct.a)(0===i),yo(t,e,r,n),r+=n,r+=bo(t,e,r,t.header.byteLength)}(t,i,r);case 2:return function(t,e,r,n){return Object(Ct.a)(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const i=e.getUint32(r+0,!0),o=e.getUint32(r+4,!0);switch(r+=8,o){case 1313821514:yo(t,e,r,i);break;case 5130562:bo(t,e,r,i);break;case 0:n.strict||yo(t,e,r,i);break;case 1:n.strict||bo(t,e,r,i)}r+=Object(Di.b)(i,4)}}(t,e,r,n),r+t.header.byteLength}(t,i,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function yo(t,e,r,n){const i=new Uint8Array(e.buffer,r,n),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Object(Di.b)(n,4)}function bo(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Object(Di.b)(n,4)}async function wo(t,e,r=0,n,i){var o,s,a,u;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!_o(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=Object(xi.a)(e);else if(e instanceof ArrayBuffer){const i={};r=mo(i,e,r,n.glb),Ii("glTF"===i.type,"Invalid GLB magic string "+i.type),t._glb=i,t.json=i.json}else Ii(!1,"GLTF: must be ArrayBuffer or string");const i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}(t,e,r,n),function(t,e={}){(new ao).normalize(t,e)}(t,{normalize:null==n||null===(o=n.gltf)||void 0===o?void 0:o.normalize});const c=[];if(null!=n&&null!==(s=n.gltf)&&void 0!==s&&s.loadBuffers&&t.json.buffers&&await async function(t,e,r){for(let o=0;o<t.json.buffers.length;++o){const s=t.json.buffers[o];if(s.uri){var n,i;const{fetch:a}=r;Ii(a);const u=Ci(s.uri,e),c=await(null==r||null===(n=r.fetch)||void 0===n?void 0:n.call(r,u)),l=await(null==c||null===(i=c.arrayBuffer)||void 0===i?void 0:i.call(c));t.buffers[o]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete s.uri}}}(t,n,i),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=t.json.images||[],i=[];for(let o=0;o<n.length;++o)i.push(vo(t,n[o],o,e,r));return await Promise.all(i)}(t,n,i);c.push(e)}const l=async function(t,e={},r){for(const i in io){var n;const o=(null==e||null===(n=e.gltf)||void 0===n?void 0:n.excludeExtensions)||{};if(!(i in o&&!o[i])){const n=io[i];await n.decode(t,e,r)}}}(t,n,i);return c.push(l),await Promise.all(c),null!=n&&null!==(u=n.gltf)&&void 0!==u&&u.postProcess?function(t,e){return(new po).postProcess(t,e)}(t,n):t}async function vo(t,e,r,n,i){const{fetch:o,parse:s}=i;let a;if(e.uri){const t=Ci(e.uri,n),r=await o(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=Mi(t.json,t.buffers,e.bufferView);a=Object(ki.d)(r.buffer,r.byteOffset,r.byteLength)}Ii(a,"glTF image has no data");const u=await s(a,Oi,{},i);t.images[r]=u}const Eo={name:"glTF",id:"gltf",module:"gltf",version:"3.0.14",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...Eo.options,...e}).gltf={...Eo.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await wo({},t,n,e,r)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};const So=0,Ao=1;function To(t,e,r,n){t.rotateYtoZ=!0;const i=t.byteOffset+t.byteLength-r;if(0===i)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Object(ki.d)(e,r,i),t.gltfByteOffset=0,t.gltfByteLength=i,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function Ro(t,e,r,n){const i=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case So:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Ao:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),i.loadGLTF){const{parse:e,fetch:i}=n;t.gltfUrl&&(t.gltfArrayBuffer=await i(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,Eo,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function Oo(t,e,r,n,i){var o;r=function(t,e,r,n,i){r=Zn(t,e,r),r=Qn(t,e,r),r=Kn(t,e,r),r=To(t,e,r,n);const o=new Ln(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=o.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3),r}(t,e,r,n),await Ro(t,Ao,n,i);const s=null==t||null===(o=t.gltf)||void 0===o?void 0:o.extensions;return s&&s.CESIUM_RTC&&(t.rtcCenter=s.CESIUM_RTC.center),r}async function xo(t,e,r,n,i){return r=function(t,e,r,n,i){if(r=Zn(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Qn(t,e,r);const o=new DataView(e);if(t.gltfFormat=o.getUint32(r,!0),r=Kn(t,e,r+=4),r=To(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const s=new Ln(t.featureTableJson,t.featureTableBinary),a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=s.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=s.getGlobalProperty("RTC_CENTER",Cn.FLOAT,3);new Vn(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const i=[new Array(n),t._batchTable][0],o=new nt,s=new nt,a=new nt,u=new nt,c=new Kt,l=new _e,h=new nt,f={},d=new J,p=[],g=[],_=new nt,m=new nt;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",Cn.FLOAT,3,r,o);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",Cn.UNSIGNED_SHORT,3,r,o);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",Cn.FLOAT,3,_);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",Cn.FLOAT,3,m);if(!i)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const s=65535;for(let e=0;e<3;e++)n[e]=n[e]/s*i[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");o.copy(n),f.translation=o,t.normalUp=e.getProperty("NORMAL_UP",Cn.FLOAT,3,r,p),t.normalRight=e.getProperty("NORMAL_RIGHT",Cn.FLOAT,3,r,g);const y=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",Cn.UNSIGNED_SHORT,2,p),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",Cn.UNSIGNED_SHORT,2,g),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(kt.WGS84.eastNorthUpToFixedFrame(o,d),d.getRotationMatrix3(c)):c.identity()}y&&(u.copy(s).cross(a).normalize(),c.setColumn(0,s),c.setColumn(1,a),c.setColumn(2,u)),l.fromMatrix3(c),f.rotation=l,h.set(1,1,1);const b=e.getProperty("SCALE",Cn.FLOAT,1,r);Number.isFinite(b)&&h.multiplyByScalar(b);const w=e.getProperty("SCALE_NON_UNIFORM",Cn.FLOAT,3,r,p);w&&h.scale(w),f.scale=h;let v=e.getProperty("BATCH_ID",Cn.UNSIGNED_SHORT,1,r);void 0===v&&(v=r);const E=(new J).fromQuaternion(f.rotation);d.identity(),d.translate(f.translation),d.multiplyRight(E),d.scale(f.scale);const S=d.clone();i[r]={modelMatrix:S,batchId:v}}t.instances=i}(t,s,0,a),r}(t,e,r,n),await Ro(t,t.gltfFormat,n,i),r}async function ko(t,e=0,r,n,i={}){switch(i.byteOffset=e,i.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),i.type){case Lr.COMPOSITE:return await async function(t,e,r,n,i,o){r=Zn(t,e,r);const s=new DataView(e);for(t.tilesLength=s.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const s={};t.tiles.push(s),r=await o(e,r,n,i,s)}return r}(i,t,e,r,n,ko);case Lr.BATCHED_3D_MODEL:return await Oo(i,t,e,r,n);case Lr.INSTANCED_3D_MODEL:return await xo(i,t,e,r,n);case Lr.POINT_CLOUD:return await si(i,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+i.type)}}function Io(t,e){if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=sr,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return tr;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return rr;case"i3dm":case"b3dm":return er;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return Je;case"ADD":case"add":return $e;default:return t}}(t.refine),t}const Co={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.0.14",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const n=e["3d-tiles"]||{};let i;i="auto"===n.isTileset?r.url&&-1!==r.url.indexOf(".json"):n.isTileset;t=i?await async function(t,e,r){const n=JSON.parse((new TextDecoder).decode(t));return n.loader=e.loader||Co,n.url=r.url,n.basePath=function(t){return Mt.b.dirname(t.url)}(n),n.root=function(t){const e=t.basePath,r=Io(t.root,t),n=[];for(n.push(r);n.length>0;){const t=n.pop().children||[];for(const r of t)Io(r,{basePath:e}),n.push(r)}return r}(n),n.type=or,n.lodMetricType=sr,n.lodMetricValue=n.root.lodMetricValue,n}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await ko(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};var Mo=r(47);async function Do(t,e){if(!e){const r=await async function(t){Object(Ct.a)(t);const e={Authorization:"Bearer "+t},r=await Object(Mo.a)("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){Object(Ct.a)(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let i=await Object(Mo.a)(""+n,{fetch:{headers:r}});if(!i.ok)throw new Error(i.statusText);let o=await i.json();if(i=await Object(Mo.a)(n+"/endpoint",{fetch:{headers:r}}),!i.ok)throw new Error(i.statusText);const s=await i.json();return o={...o,...s},o}(t,e),{type:n,url:i}=r;return Object(Ct.a)("3DTILES"===n&&i),r.headers={Authorization:"Bearer "+r.accessToken},r}const Po={...Co,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return Do(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=Po,Co.parse(t,e,r)),options:{"cesium-ion":{...Co.options["3d-tiles"],accessToken:null}}};var Lo,Bo=r(1),No=new Uint8Array(16);function jo(){if(!Lo&&!(Lo="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lo(No)}var Uo=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Fo=function(t){return"string"==typeof t&&Uo.test(t)},zo=[],Go=0;Go<256;++Go)zo.push((Go+256).toString(16).substr(1));var Ho=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(zo[t[e+0]]+zo[t[e+1]]+zo[t[e+2]]+zo[t[e+3]]+"-"+zo[t[e+4]]+zo[t[e+5]]+"-"+zo[t[e+6]]+zo[t[e+7]]+"-"+zo[t[e+8]]+zo[t[e+9]]+"-"+zo[t[e+10]]+zo[t[e+11]]+zo[t[e+12]]+zo[t[e+13]]+zo[t[e+14]]+zo[t[e+15]]).toLowerCase();if(!Fo(r))throw TypeError("Stringified UUID is invalid");return r};var Wo=function(t,e,r){var n=(t=t||{}).random||(t.rng||jo)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return Ho(n)},qo=r(0),Vo=r.n(qo),Zo=r(8),Qo=r.n(Zo),Ko=r(64),Xo=r.n(Ko);const Yo={folderPattern:{path:"folderPattern",default:"BASIC"},archiveCompressionType:{path:"archiveCompressionType",default:"STORE"},resourceCompressionType:{path:"resourceCompressionType",default:"GZIP"},I3SVersion:{path:"I3SVersion",default:"1.7"},nodeCount:{path:"nodeCount"}};class $o{constructor(t,e){this.nodesPerPage=e,this.nodesCounter=0,this.nodePages=[{}],this.nodePages[0].nodes=[],this.writeFile=t}useWriteFunction(t){this.writeFile=t}getNodeById(t){const e=Math.floor(t/this.nodesPerPage),r=t%this.nodesPerPage;return this.nodePages[e].nodes[r]}updateMaterialByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.material={definition:e,resource:r.index})}updateVertexCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.vertexCount=e)}updateNodeAttributeByNodeId(t){const e=this.getNodeById(t);e.mesh&&(e.mesh.attribute.resource=e.index)}updateFeatureCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.featureCount=e)}updateTexelCountHintByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&r.mesh.material&&(r.mesh.material.texelCountHint=e)}addChildRelation(t,e){if(null===t)return;this.getNodeById(t).children.push(e)}updateResourceInMesh(t){t.mesh&&(t.mesh.geometry.resource=t.index)}push(t,e=null){let r=this.nodePages[this.nodePages.length-1];return r.nodes.length===this.nodesPerPage&&(r={nodes:[]},this.nodePages.push(r)),t.index=this.nodesCounter++,r.nodes.push(t),this.addChildRelation(e,t.index),this.updateResourceInMesh(t),t.index}async save(t,e,r=!1){const n=[];if(r){for(const[r,i]of this.nodePages.entries()){const o=JSON.stringify(i),s=Object(Bo.join)(t,"nodepages");n.push(this.writeFile(s,o,r.toString()+".json")),e[`nodePages/${r.toString()}.json.gz`]=s+".json.gz"}const r=Qo()({nodeCount:this.nodesCounter},Yo),i=!1;e["metadata.json"]=await this.writeFile(t,JSON.stringify(r),"metadata.json",i)}else for(const[e,r]of this.nodePages.entries()){const i=JSON.stringify(r),o=Object(Bo.join)(t,"nodepages",e.toString());n.push(this.writeFile(o,i))}await Promise.all(n)}}var Jo=r(3),ts=r(65),es=r(10);function rs(t){let e=t[0];const r=Math.floor(e/3600);e-=3600*r;const n=Math.floor(e/60);e-=60*n;const i=Math.floor(e),o=t[1]/1e6;let s="";return r&&(s+=r+"h "),n&&(s+=n+"m "),i&&(s+=i+"s"),s||(s+=o+"ms"),s}async function ns(t){const{slpk:e,outputPath:r,tilesetName:n}=t,i=Object(Jo.a)(r);try{if(e){const t=Object(Bo.join)(i,n+".slpk");return(await es.promises.stat(t)).size}const t=Object(Bo.join)(i,n);return await async function t(e){let r=0;const n=await es.promises.readdir(e);for(const i of n){const n=await es.promises.stat(Object(Bo.join)(e,i));n.isDirectory()?r+=await t(Object(Bo.join)(e,i)):r+=n.size}return r}(t)}catch(t){return console.log("Calculate file sizes error: ",t),null}}const is={};class os extends tt{static get ZERO(){return is.ZERO=is.ZERO||Object.freeze(new os(0,0,0,0))}constructor(t=0,e=0,r=0,n=0){super(-0,-0,-0,-0),d(t)&&1===arguments.length?this.copy(t):(h.debug&&(w(t),w(e),w(r),w(n)),this[0]=t,this[1]=e,this[2]=r,this[3]=n)}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return h.debug&&(w(t.x),w(t.y),w(t.z),w(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=w(t)}get w(){return this[3]}set w(t){this[3]=w(t)}transform(t){return H(this,this,t),this.check()}transformByMatrix3(t){return x(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2],t[3]=e[3]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}function ss(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const as={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},us=()=>{};class cs{constructor(t){ss(this,"draco",void 0),ss(this,"dracoEncoder",void 0),ss(this,"dracoMeshBuilder",void 0),ss(this,"dracoMetadataBuilder",void 0),ss(this,"log",void 0),this.draco=t,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(t){t&&this.draco.destroy(t)}encodeSync(t,e={}){return this.log=us,this._setOptions(e),e.pointcloud?this._encodePointCloud(t,e):this._encodeMesh(t,e)}_getAttributesFromMesh(t){const e={...t,...t.attributes};return t.indices&&(e.indices=t.indices),e}_encodePointCloud(t,e){const r=new this.draco.PointCloud;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoPointCloud(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodePointCloudToDracoBuffer(r,!1,i);if(!(t>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),ls(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_encodeMesh(t,e){const r=new this.draco.Mesh;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoMesh(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodeMeshToDracoBuffer(r,i);if(t<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),ls(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_setOptions(t){if("speed"in t&&this.dracoEncoder.SetSpeedOptions(...t.speed),"method"in t){const e=this.draco[t.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(e)}if("quantization"in t)for(const e in t.quantization){const r=t.quantization[e],n=this.draco[e];this.dracoEncoder.SetAttributeQuantization(n,r)}}_createDracoMesh(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=as[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_createDracoPointCloud(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=as[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_addAttributeToMesh(t,e,r,n){if(!ArrayBuffer.isView(r))return-1;const i=this._getDracoAttributeType(e),o=r.length/n;if("indices"===i){const n=r.length/3;return this.log(`Adding attribute ${e}, size ${n}`),this.dracoMeshBuilder.AddFacesToMesh(t,n,r),-1}this.log(`Adding attribute ${e}, size ${o}`);const s=this.dracoMeshBuilder,{buffer:a}=r;switch(r.constructor){case Int8Array:return s.AddInt8Attribute(t,i,n,o,new Int8Array(a));case Int16Array:return s.AddInt16Attribute(t,i,n,o,new Int16Array(a));case Int32Array:return s.AddInt32Attribute(t,i,n,o,new Int32Array(a));case Uint8Array:case Uint8ClampedArray:return s.AddUInt8Attribute(t,i,n,o,new Uint8Array(a));case Uint16Array:return s.AddUInt16Attribute(t,i,n,o,new Uint16Array(a));case Uint32Array:return s.AddUInt32Attribute(t,i,n,o,new Uint32Array(a));case Float32Array:default:return s.AddFloatAttribute(t,i,n,o,new Float32Array(a))}}_getDracoAttributeType(t){switch(t.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(t){for(const e in t){const r=t[e];if(this._getDracoAttributeType(e)===this.draco.POSITION)return r}return null}_addGeometryMetadata(t,e){const r=new this.draco.Metadata;this._populateDracoMetadata(r,e),this.dracoMeshBuilder.AddMetadata(t,r)}_addAttributeMetadata(t,e,r){const n=new this.draco.Metadata;this._populateDracoMetadata(n,r),this.dracoMeshBuilder.SetMetadataForAttribute(t,e,n)}_populateDracoMetadata(t,e){for(const[n,i]of(r=e).entries&&!r.hasOwnProperty("entries")?r.entries():Object.entries(r))switch(typeof i){case"number":Math.trunc(i)===i?this.dracoMetadataBuilder.AddIntEntry(t,n,i):this.dracoMetadataBuilder.AddDoubleEntry(t,n,i);break;case"object":i instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(t,n,i,i.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(t,n,i)}var r}}function ls(t){const e=t.size(),r=new ArrayBuffer(e),n=new Int8Array(r);for(let r=0;r<e;++r)n[r]=t.GetValue(r);return r}const hs={name:"DRACO",id:"draco",module:"draco",version:"3.0.14",extensions:["drc"],encode:async function(t,e={}){const{draco:r}=await xn(e),n=new cs(r);try{return n.encodeSync(t,e.draco)}finally{n.destroy()}},options:{draco:{pointcloud:!1,attributeNameEntry:"name"}}};var fs=r(25),ds=r(19),ps=r(26);async function gs(t,e,r){if(e.encode)return await e.encode(t,r);if(e.encodeSync)return e.encodeSync(t,r);if(e.encodeText)return(new TextEncoder).encode(await e.encodeText(t,r));if(e.encodeInBatches){const n=function(t,e,r){if(e.encodeInBatches){const n=function(t){return[{table:t,start:0,end:t.length}]}(t);return e.encodeInBatches(n,r)}throw new Error("Writer could not encode data in batches")}(t,e,r),i=[];for await(const t of n)i.push(t);return Object(ki.b)(...i)}if(!ds.b&&e.encodeURLtoURL){const n=ms("input");await async function(t,e,r){t=Object(fs.a)(t),ds.b||await Mt.a.writeFile(t,Object(ps.c)(e),{flag:"w"}),Object(Ct.a)(!1)}(n,t);const i=ms("output"),o=await async function(t,e,r,n){if(t=Object(fs.a)(t),e=Object(fs.a)(e),ds.b||!r.encodeURLtoURL)throw new Error;return await r.encodeURLtoURL(t,e,n)}(n,i,e,r);return(await Object(Mo.a)(o)).arrayBuffer()}throw new Error("Writer could not encode data")}function _s(t,e,r){if(e.encodeSync)return e.encodeSync(t,r);throw new Error("Writer could not synchronously encode data")}function ms(t){return"/tmp/"+t}function ys(t){const{positions:e,normals:r,texCoords:n,colors:i,featureIndices:o,triangleCount:s}=t;if(!o.length)return{faceRange:new Uint32Array([0,s-1]),featureIds:[0],featureCount:1,positions:e,normals:r,texCoords:n,colors:i};const{faceRange:a,featureCount:u,featureIds:c}=function(t){let e=1,r=1,n=t[0];const i=[],o=[],s=[n];i[0]=0,o[0]=n;for(let a=1;a<t.length;a++)n!==t[a]&&(i[e]=a/3-1,i[e+1]=a/3,o[r]=t[a],s.includes(t[a])||s.push(t[a]),e+=2,r+=1),n=t[a];i[e]=t.length/3-1;const a=new Uint32Array(i),u=s.length;return{faceRange:a,featureCount:u,featureIds:o}}(o);return{featureCount:u,...function(t){const e=t[0],r=[e.featureId];let n=new Float32Array(e.positions),i=new Float32Array(e.normals),o=new Uint8Array(e.colors),s=new Float32Array(e.texCoords);const a=[0];let u=0,c=0;for(let e=1;e<t.length;e++){const l=t[e];r.push(l.featureId),n=Object(ki.c)(n,l.positions),i=Object(ki.c)(i,l.normals),o=Object(ki.c)(o,l.colors),s=Object(ki.c)(s,l.texCoords);const h=t[u];a.push(h.positions.length/9-1+c),a.push(h.positions.length/9+c),c+=h.positions.length/9,u+=1}a.push(n.length/9-1);return{faceRange:new Uint32Array(a),featureIds:r,positions:n,normals:i,colors:o,texCoords:s}}(function(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r],i=e.find(t=>t.featureId===n.featureId);i?(i.positions=Object(ki.c)(i.positions,n.positions),i.normals=Object(ki.c)(i.normals,n.normals),i.colors=Object(ki.c)(i.colors,n.colors),i.texCoords=Object(ki.c)(i.texCoords,n.texCoords)):e.push(n)}return e}(function(t){const{featureIds:e,positions:r,normals:n,colors:i,texCoords:o,faceRange:s}=t,a=[];let u=new Float32Array(r),c=new Float32Array(n),l=new Uint8Array(i),h=new Float32Array(o),f=0;for(let t=0;t<e.length;t++){const r=s[t+f],n=s[t+f+1],i=bs("positions",r,n),o=bs("normals",r,n),d=bs("colors",r,n),p=bs("texCoords",r,n);a.push({featureId:e[t],positions:u.slice(0,i),normals:c.slice(0,o),colors:l.slice(0,d),texCoords:h.slice(0,p)}),u=u.slice(i),c=c.slice(o),l=l.slice(d),h=h.slice(p),f+=1}return a.sort((t,e)=>t.featureId-e.featureId)}({faceRange:a,featureIds:c,...t})))}}function bs(t,e,r){const n=r-e+1,i=3*n;switch(t){case"positions":case"normals":return 9*n;case"colors":return 4*i;case"texCoords":return 2*i;default:return 0}}const ws=["CUSTOM_ATTRIBUTE_2","_BATCHID","BATCHID"];async function vs(t,e,r,n,i){const o=function(t){const e=[],r=t.gltf.materials;for(const t of r)e.push(Ms(t));return e}(t),s=function(t){const e=new Map;for(const r of t.gltf.materials||[{id:"default"}])e.set(r.id,{positions:new Float32Array(0),normals:new Float32Array(0),texCoords:new Float32Array(0),colors:new Uint8Array(0),featureIndices:[]});Ss(t.gltf.scene.nodes,t,e);for(const t of e.keys()){const r=e.get(t);if(0===r.positions.length){e.delete(t);continue}const n=r.positions.length/3;if(!r.colors.length){r.colors=new Uint8Array(4*n);for(let t=0;t<r.colors.length;t+=4)r.colors.set([255,255,255,255],t)}if(!r.texCoords.length){r.texCoords=new Float32Array(2*n);for(let t=0;t<r.texCoords.length;t+=2)r.texCoords.set([1,1],t)}r.featureIndices=r.featureIndices.reduce((t,e)=>t.concat(e))}return e}(t);s.has("default")&&o.push({material:{alphaMode:"opaque",pbrMetallicRoughness:{}}});const a=[];let u=e;for(let e=0;e<(t.gltf.materials.length||1);e++){const c=t.gltf.materials[e]||{id:"default"};if(!s.has(c.id))continue;const l=s.get(c.id),{material:h,texture:f}=o[e];a.push(await Es({convertedAttributes:l,material:h,texture:f,tileContent:t,nodeId:u,featuresHashArray:r,attributeStorageInfo:n,draco:i})),u++}return a}async function Es({convertedAttributes:t,material:e,texture:r,tileContent:n,nodeId:i,featuresHashArray:o,attributeStorageInfo:s,draco:a}){const u=t.positions.length/3,c=u/3,{faceRange:l,featureIds:h,positions:f,normals:d,colors:p,texCoords:g,featureCount:_}=ys({triangleCount:c,...t});n.batchTableJson&&function(t,e,r,n){const i=function(t,e,r){const n={};for(let i=0;i<t.length;i++){const o=t[i],s=Ns(i,e,r);n[o.toString()]=s}return n}(t,n,r);js(e,i),js(t,i)}(h,t.featureIndices,o,n.batchTableJson);const m=new Uint32Array(2),y=function(t){const e=new BigUint64Array(t.length);for(let r=0;r<t.length;r++)e[r]=BigInt(t[r]);return e}(h);m.set([u,_],0);const b=new Uint8Array(Object(ki.b)(m.buffer,f.buffer,d.buffer,r?g.buffer:new ArrayBuffer(0),p.buffer,y.buffer,l.buffer)),w=a?await async function(t,e,r){const{positions:n,normals:i,texCoords:o,colors:s,featureIds:a,faceRange:u}=r,c=new Uint32Array(t);for(let t=0;t<c.length;t++)c.set([t],t);const l=function(t,e){const r=new Uint32Array(t.length);let n=0,i=0;for(let t=1;t<e.length;t+=2){const o=3*(e[t]+1);r.fill(n,i,o),n++,i=o+1}return r}(new Uint32Array(e.featureIndices.length?e.featureIndices:t),u),h={positions:n,normals:i,colors:s,"feature-index":l};o.length&&(h.texCoords=o);const f={"feature-index":{"i3s-attribute-type":"feature-index","i3s-feature-ids":new Int32Array(a)}};return new Uint8Array(await gs({attributes:h,indices:c},hs,{draco:{method:"MESH_SEQUENTIAL_ENCODING",attributesMetadata:f}}))}(u,t,{positions:f,normals:d,texCoords:r?g:new Float32Array(0),colors:p,featureIds:h,faceRange:l}):null,v=function(t,e,r){const n=[];if(t){const i={OBJECTID:e,...t};for(const t in i){const e=Us(t,r);let o=null;switch(e){case"Oid32":case"Int32":o=Fs(i[t]);break;case"Float64":o=zs(i[t]);break;case"string":o=Gs(i[t]);break;default:o=Gs(i[t])}n.push(o)}}return n}(n.batchTableJson,h,s);return{geometry:b,compressedGeometry:w,texture:r,sharedResources:Ds(n,i),meshMaterial:e,vertexCount:u,attributes:v,featureCount:_}}function Ss(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){if(t)for(const i of t)As(i,e,r,n)}function As(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){const i=t.matrix,o=i?n.multiplyRight(i):n,s=t.mesh;s&&function(t,e,r,n=new J([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){for(const i of t.primitives){let t=null;i.material?t=r.get(i.material.id):r.has("default")&&(t=r.get("default")),Object(Ct.a)(null!==t,"Primitive - material mapping failed");const o=i.attributes;t.positions=Object(ki.c)(t.positions,Ts({vertices:o.POSITION.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Rs})),t.normals=Object(ki.c)(t.normals,Ts({vertices:o.NORMAL&&o.NORMAL.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Os})),t.texCoords=Object(ki.c)(t.texCoords,xs(o.TEXCOORD_0&&o.TEXCOORD_0.value,i.indices.value)),t.colors=Object(ki.c)(t.colors,ks(o.COLOR_0,i.indices.value)),t.featureIndices.push(Is(Cs(o),i.indices.value))}}(s,e,r,o),Ss(t.children,e,r,o)}function Ts(t){const{vertices:e,indices:r,attributeSpecificTransformation:n}=t,i=new Float32Array(3*r.length);if(!e)return i;for(let o=0;o<r.length;o++){const s=3*r[o],a=e.subarray(s,s+3);let u=new nt(Array.from(a));u=n(u,t),i[3*o]=u.x,i[3*o+1]=u.y,i[3*o+2]=u.z}return i}function Rs(t,e){const{cartesianModelMatrix:r,cartographicOrigin:n,nodeMatrix:i}=e;return i&&(t=t.transform(i)),t=t.transform(r),kt.WGS84.cartesianToCartographic([t[0],t[1],t[2]],t),t=t.subtract(n)}function Os(t,e){const{cartesianModelMatrix:r,nodeMatrix:n}=e;return n&&(t=t.transformAsVector(n)),t=t.transformAsVector(r)}function xs(t,e){if(!t)return new Float32Array(0);const r=new Float32Array(2*e.length);for(let n=0;n<e.length;n++){const i=2*e[n],o=t.subarray(i,i+2);r[2*n]=o[0],r[2*n+1]=o[1]}return r}function ks(t,e){if(!t)return new Uint8Array(0);const r=t.components,n=t.value,i=new Uint8Array(e.length*r);for(let t=0;t<e.length;t++){const o=e[t]*r,s=n.subarray(o,o+r),a=new Uint8Array(r);for(let t=0;t<s.length;t++)a[t]=255*s[t];i.set(a,t*r)}return i}function Is(t,e){if(!t.length||!e.length)return[];const r=[];for(let n=0;n<e.length;n++){const i=e[n];r.push(t[i])}return r}function Cs(t){let e=[];for(let r=0;r<ws.length;r++){const n=ws[r];if(t[n]&&t[n].value){e=t[n].value;break}}return e}function Ms(t){const e={doubleSided:t.doubleSided,emissiveFactor:t.emissiveFactor.map(t=>Math.round(255*t)),alphaMode:(t.alphaMode||"OPAQUE").toLowerCase(),pbrMetallicRoughness:{roughnessFactor:t.pbrMetallicRoughness.roughnessFactor,metallicFactor:t.pbrMetallicRoughness.metallicFactor}};let r;if(t.pbrMetallicRoughness.baseColorTexture?(r=t.pbrMetallicRoughness.baseColorTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}):t.emissiveTexture&&(r=t.emissiveTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}),!r){const r=t.pbrMetallicRoughness.baseColorFactor;e.pbrMetallicRoughness.baseColorFactor=r&&r.map(t=>Math.round(255*t))||void 0}return{material:e,texture:r}}function Ds(t,e){const r=t.gltf.materials,n={};if(!r||!r.length)return n;n.materialDefinitionInfos=[];for(const t of r){const{materialDefinitionInfo:r,textureDefinitionInfo:i}=Ps(t,e);n.materialDefinitionInfos.push(r),i&&(n.textureDefinitionInfos=n.textureDefinitionInfos||[],n.textureDefinitionInfos.push(i))}return n}function Ps(t,e){const r=t.pbrMetallicRoughness.baseColorTexture||t.emissiveTexture;let n=null;r&&(n=function(t,e){return{encoding:[t.source.mimeType],images:[{id:Bs(t,e),size:t.source.image.width,length:[t.source.image.data.length]}]}}(r.texture,e));const{baseColorFactor:i,metallicFactor:o}=t.pbrMetallicRoughness;let s=i;return i&&0!==i[3]||!t.emissiveFactor||(s=t.emissiveFactor,s[3]=s[3]||1),{materialDefinitionInfo:Ls(s,o),textureDefinitionInfo:n}}function Ls(t,e=0){const r=new os(0,0,0,1),n=new os(1,1,1,1),i=new os(.04/255,.04/255,.04/255,0),o=new os(t),s=n.subtract(i).multiply(o),a=s.lerp(s,r,e);i[3]=1;const u=i.lerp(i,o,e);return{diffuse:a.toArray(),specular:u.toArray()}}function Bs(t,e){const{width:r,height:n}=t.source.image,i=e+1,o=32-i.toString(2).length,s="0".repeat(o).concat(i.toString(2));return BigInt(`0b${(268435456+(r-1<<12)+(n-1<<0)).toString(2)}${s}`).toString()}function Ns(t,e,r){const n=function(t,e){let r="";for(const n in t)r+=t[n][e];return r}(e,t),i=Xo()(n);return r.includes(i)?r.indexOf(i):r.push(i)-1}function js(t,e){for(let r=0;r<t.length;r++)t[r]=e[t[r]]}function Us(t,e){return e.find(e=>e.name===t).attributeValues.valueType}function Fs(t){const e=new Uint32Array([t.length]),r=new Uint32Array(t);return Object(ki.b)(e.buffer,r.buffer)}function zs(t){const e=new Uint32Array([t.length]),r=new Uint8Array(4),n=new Float64Array(t);return Object(ki.b)(e.buffer,r.buffer,n.buffer)}function Gs(t){const e=new Uint32Array([t.length]);let r=0;const n=new Uint32Array(t.length),i=[];for(let e=0;e<t.length;e++){const o=String(t[e])+"\0",s=Buffer.from(o),a=s.length;r+=a,n[e]=a,i.push(s)}const o=new Uint32Array([r]);return Object(ki.b)(e.buffer,o.buffer,n.buffer,...i)}function Hs(t,e){let r,n,i;const o=t.boundingVolume,s=kt.WGS84.cartesianToCartographic(o.center,new nt);return s[2]=s[2]-e.getHeight(s[1],s[0]),o instanceof De?(n=o.halfSize,r=new nt(n[0],n[1],n[2]).len(),i=o.quaternion):(r=t.boundingVolume.radius,n=[r,r,r],i=(new _e).fromMatrix3(new Kt([n[0],0,0,0,n[1],0,0,0,n[2]])).normalize()),{mbs:[s[0],s[1],s[2],r],obb:{center:[s[0],s[1],s[2]],halfSize:n,quaternion:i}}}function Ws(t){const e=t[3],r=new nt(t[0],t[1],t[2]),n=new Kt([e,0,0,0,e,0,0,0,e]);return new De(r,n)}const qs={serviceItemId:{path:"serviceItemId"},serviceName:{path:"layerName"},name:{path:"layerName"},currentVersion:{path:"currentVersion",default:10.7},serviceVersion:{path:"serviceVersion",default:"1.7"},supportedBindings:{path:"supportedBindings",default:["REST"]},layers:{path:"layers0",transform:t=>[t]}};function Vs(t){let e=(t.header.lodSelection.maxScreenThreshold||{}).maxError;if(!e){const r=t.header.lodSelection.maxScreenThresholdSQ;r&&(e=Math.sqrt(r.maxError/(.25*Math.PI)))}return e||(e=16),2*t.header.mbs[3]*16/e}const Zs=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],Qs=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],Ks=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31];class Xs{constructor(t){this.options=t,this._v00=0,this._v01=0,this._v10=0,this._v11=0,this._t=[],this._ix=this.options._width,this._iy=this.options._height}getHeight(t,e){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(e))return NaN;const r=function(t,e){e=Math.abs(e);let r=Ys(t,e);2*Math.abs(r)===e?r-=Ys(t,2*e)-r:2*Math.abs(r)>e&&(r+=r<0?e:-e);return r}(e,360);let n=(e=-180!==r?r:180)*this.options._rlonres,i=-t*this.options._rlatres,o=Math.floor(n),s=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(i));n-=o,i-=s,s+=(this.options._height-1)/2,o+=o<0?this.options._width:o>=this.options._width?-this.options._width:0;let a=0,u=0,c=0,l=0,h=new Array(10);if(o!==this._ix||s!==this._iy)if(this.options.cubic){const t=[this._rawval(o,s-1),this._rawval(o+1,s-1),this._rawval(o-1,s),this._rawval(o,s),this._rawval(o+1,s),this._rawval(o+2,s),this._rawval(o-1,s+1),this._rawval(o,s+1),this._rawval(o+1,s+1),this._rawval(o+2,s+1),this._rawval(o,s+2),this._rawval(o+1,s+2)];let e=Qs;0!==s&&(e=s===this.options._height-2?Ks:Zs);let r=372;0!==s&&(r=s===this.options._height-2?372:240);for(let n=0;n<10;++n){h[n]=0;for(let r=0;r<12;++r)h[n]+=t[r]*e[10*r+n];h[n]/=r}}else a=this._rawval(o,s),u=this._rawval(o+1,s),c=this._rawval(o,s+1),l=this._rawval(o+1,s+1);else this.options.cubic?h=this._t:(a=this._v00,u=this._v01,c=this._v10,l=this._v11);if(!this.options.cubic){const t=(1-i)*((1-n)*a+n*u)+i*((1-n)*c+n*l),e=this.options._offset+this.options._scale*t;return this._ix=o,this._iy=s,this._v00=a,this._v01=u,this._v10=c,this._v11=l,e}let f=h[0]+n*(h[1]+n*(h[3]+n*h[6]))+i*(h[2]+n*(h[4]+n*h[7])+i*(h[5]+n*h[8]+i*h[9]));return f=this.options._offset+this.options._scale*f,this._ix=o,this._iy=s,this._t=h,f}_rawval(t,e){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(e<0||e>=this.options._height)&&(e=e<0?-e:2*(this.options._height-1)-e,t+=(t<this.options._width/2?1:-1)*this.options._width/2);const r=this.options._datastart+2*(e*this.options._swidth+t);return this.options.data[r]<<8|this.options.data[r+1]}}function Ys(t,e){return t-Math.floor(t/e)*e}function $s(t,e){const r=function*(t){let e=0;do{const r=t.indexOf(10,e);if(-1!==r){const n=t.subarray(e,r);e=r+1,yield{offset:e,line:Js(n)}}else{const r=t.subarray(e,t.length);e=t.length,yield{offset:e,line:Js(r)}}}while(e<t.length);return{offset:e,line:""}}(t);let n=r.next();if(n.done||"P5"!==n.value.line)throw new Error("Geoid model file: File not in PGM format");let i=Number.MAX_VALUE,o=0,s=-1,a=-1,u="NONE",c="UNKNOWN",l=0,h=0,f=null,d=null;do{n=r.next();const t=n.value.line;if(t.length){if("#"!==t[0]){let e=t.split(" ");if(e=e.filter(t=>""!==t),l=parseInt(e[0],10),h=parseInt(e[1],10),!l||!h)throw new Error("Geoid model file: Error reading raster size");break}{const r=t.split(" "),n=r[0],l=r[1];if("#"!==n||!l)continue;const h=r.length>2?r.slice(2):[];if("Description"===l)u=h.join(" ");else if("DateTime"===l)c=h.join(" ");else if("Offset"===l){if(!r[2])throw new Error("Geoid model file: Error reading offset");i=parseInt(r[2],10)}else if("Scale"===l){if(!r[2])throw new Error("Geoid model file: Error reading scale");o=parseFloat(r[2])}else l===(e.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat(r[2]))&&(s=parseFloat(r[2])):l===(e.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat(r[2]))&&(a=parseFloat(r[2]))}}}while(!n.done);n=r.next();const p=parseInt(n.value.line,10);if(n.done)throw new Error("Geoid model file: Error reading maxval");if(65535!==p)throw new Error("Geoid model file: Incorrect value of maxval");if(f=n.value.offset,d=l,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(0===o)throw new Error("Geoid model file: Scale not set");if(o<0)throw new Error("Geoid model file: Scale must be positive");if(h<2||l<2)throw new Error("Geoid model file: Raster size too small");if(1&l)throw new Error("Geoid model file: Raster width is odd");if(!(1&h))throw new Error("Geoid model file: Raster height is even");const g=l/360,_=(h-1)/180;return new Xs({cubic:e.cubic,_width:l,_height:h,_rlonres:g,_rlatres:_,_offset:i,_scale:o,_swidth:d,_datastart:f,_maxerror:s,_rmserror:a,_description:u,_datetime:c,data:t})}function Js(t){let e="";for(const r of t)e+=String.fromCharCode(r);return e}const ta={name:"PGM - Netpbm grayscale image format",id:"pgm",module:"tile-converter",version:"3.0.14",mimeTypes:["image/x-portable-graymap"],parse:(t,e)=>$s(new Uint8Array(t),e),extensions:["pgm"],options:{cubic:!1}},ea={id:{path:"id",transform:t=>t.toUpperCase()},profile:{path:"profile",default:"meshpyramids"},version:{path:"version",default:"1.7"},resourcePattern:{path:"resourcePattern",default:["3dNodeIndexDocument","Attributes","SharedResource","Geometry"]},rootNode:{path:"rootNode",default:"./nodes/root"},extent:{path:"extent"},indexCRS:{path:"indexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},vertexCRS:{path:"vertexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},normalReferenceFrame:{path:"normalReferenceFrame",default:"east-north-up"},attributeEncoding:{path:"attributeEncoding",default:"application/octet-stream; version=1.6"},textureEncoding:{path:"textureEncoding",default:["image/jpeg"]},lodType:{path:"lodType",default:"MeshPyramid"},lodModel:{path:"lodModel",default:"node-switching"},defaultGeometrySchema:{path:"defaultGeometrySchema",default:{geometryType:"triangles",header:[{property:"vertexCount",type:"UInt32"},{property:"featureCount",type:"UInt32"}],topology:"PerAttributeArray",ordering:["position","normal","uv0","color"],vertexAttributes:{position:{valueType:"Float32",valuesPerElement:3},normal:{valueType:"Float32",valuesPerElement:3},uv0:{valueType:"Float32",valuesPerElement:2},color:{valueType:"UInt8",valuesPerElement:4}},featureAttributeOrder:["id","faceRange"],featureAttributes:{id:{valueType:"UInt64",valuesPerElement:1},faceRange:{valueType:"UInt32",valuesPerElement:2}}}}},ra={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},uv0:{type:"Float32",component:2},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},na={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},ia={compressedAttributes:{encoding:"draco",attributes:["position","normal","uv0","color","feature-index"]}},oa={compressedAttributes:{encoding:"draco",attributes:["position","normal","color","feature-index"]}},sa={wkid:{path:"wkid",default:4326},latestWkid:{path:"latestWkid",default:4326},vcsWkid:{path:"vcsWkid",default:5773},latestVcsWkid:{path:"latestVcsWkid",default:5773}},aa={heightModel:{path:"heightModel",default:"gravity_related_height"},vertCRS:{path:"vertCRS",default:"EGM96_Geoid"},heightUnit:{path:"heightUnit",default:"meter"}},ua={nodesPerPage:{path:"nodesPerPage"},lodSelectionMetricType:{path:"lodSelectionMetricType",default:"maxScreenThresholdSQ"}},ca={version:{path:"version",transform:t=>t.toUpperCase()},id:{path:"id",default:0},name:{path:"name"},href:{path:"href",default:"./layers/0"},layerType:{path:"layerType",default:"IntegratedMesh"},spatialReference:{path:"spatialReference",transform:t=>Qo()(t,sa)},capabilities:{path:"capabilities",default:["View","Query"]},store:{path:"store",transform:t=>Qo()(t,ea)},heightModelInfo:{path:"heightModelInfo",transform:t=>Qo()(t,aa)},nodePages:{path:"nodePages",transform:t=>Qo()(t,ua)},materialDefinitions:{path:"materialDefinitions",default:[]},textureSetDefinitions:{path:"textureSetDefinitions",default:[]},geometryDefinitions:{path:"compressGeometry",transform:t=>{const e=[{},{}];return e[0].geometryBuffers=[],e[1].geometryBuffers=[],e[0].geometryBuffers.push(ra),e[1].geometryBuffers.push(na),t&&(e[0].geometryBuffers.push(ia),e[1].geometryBuffers.push(oa)),e},default:[{geometryBuffers:[ra,na]}]},attributeStorageInfo:{path:"attributeStorageInfo",default:[]},fields:{path:"fields",default:[]},popupInfo:{path:"popupInfo",default:null}},la={mbs:{path:"mbs"},obb:{path:"obb"}},ha={id:{path:"id"},href:{path:"href"},...la},fa={version:{path:"version"},id:{path:"id"},path:{path:"path"},level:{path:"level"},...la,lodSelection:{path:"lodSelection",default:[{metricType:"maxScreenThresholdSQ",maxError:196349.54374999998},{metricType:"maxScreenThreshold",maxError:999.9999999999999}]},children:{path:"children",default:null},neighbors:{path:"neighbors",default:null},parentNode:{path:"parentNode",transform:t=>Qo()(t,ha),default:null},sharedResource:{path:"sharedResource",default:null},featureData:{path:"featureData",default:null},geometryData:{path:"geometryData",default:null},textureData:{path:"textureData",default:null},attributeData:{path:"attributeData",default:null}},da={renderMode:{path:"renderMode",default:"solid"},shininess:{path:"shininess",default:1},reflectivity:{path:"reflectivity",default:0},ambient:{path:"ambient",default:[1,1,1,1]},diffuse:{path:"diffuse",default:[1,1,1,1]},specular:{path:"specular",default:[0,0,0,0]},useVertexColorAlpha:{path:"useVertexColorAlpha",default:!1},vertexRegions:{path:"vertexRegions",default:!1},vertexColors:{path:"vertexColors",default:!0}},pa={name:{path:"name",default:"standard"},type:{path:"type",default:"standard"},params:{path:"params",transform:(t,e,r)=>Qo()(r,da)}},ga={id:{path:"id"},size:{path:"size"},href:{path:"href",default:["../textures/0"]},length:{path:"length"}},_a={encoding:{path:"encoding"},wrap:{path:"wrap",default:["none"]},atlas:{path:"atlas",default:!1},uvSet:{path:"uvSet",default:"uv0"},channels:{path:"channels",default:"rgb"},images:{path:"images",transform:(t,e,r)=>t.map(t=>Qo()(t,ga))}},ma={materialDefinitions:{path:"materialDefinitionInfos",transform:function(t,e,r){const n={};for(const[e,i]of t.entries())n[`Mat${r.nodePath}${e}`]=Qo()(i,pa);return n}},textureDefinitions:{path:"textureDefinitionInfos",transform:function(t,e,r){if(!t)return null;const n={};for(const[e,i]of t.entries()){const t=`${r.nodePath}${e}`;i.imageIndex=t,n[t]=Qo()(i,_a)}return n}}};function ya(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const ba={};function wa(t="id"){ba[t]=ba[t]||1;const e=ba[t]++;return"".concat(t,"-").concat(e)}const va={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};const Ea=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),Sa=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),Aa=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),Ta=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),Ra={POSITION:{size:3,value:new Float32Array(Sa)},NORMAL:{size:3,value:new Float32Array(Aa)},TEXCOORD_0:{size:2,value:new Float32Array(Ta)}};class Oa extends class{static get DRAW_MODE(){return va}constructor(t={}){const{id:e=wa("geometry"),drawMode:r=va.TRIANGLES,attributes:n={},indices:i=null,vertexCount:o=null}=t;this.id=e,this.drawMode=0|r,this.attributes={},this.userData={},this._setAttributes(n,i),this.vertexCount=o||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(t){return"Geometry ".concat(this.id," attribute ").concat(t)}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const e in t){let r=t[e];r=ArrayBuffer.isView(r)?{value:r}:r,ya(ArrayBuffer.isView(r.value),"".concat(this._print(e),": must be typed array or object with value as typed array")),"POSITION"!==e&&"positions"!==e||r.size||(r.size=3),"indices"===e?(ya(!this.indices),this.indices=r):this.attributes[e]=r}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let r=1/0;for(const e in t){const n=t[e],{value:i,size:o,constant:s}=n;!s&&i&&o>=1&&(r=Math.min(r,i.length/o))}return ya(Number.isFinite(r)),r}}{constructor(t={}){const{id:e=wa("cube-geometry")}=t;super({...t,id:e,indices:{size:1,value:new Uint16Array(Ea)},attributes:{...Ra,...t.attributes}})}}function xa(t){if(!t.parentNode.obb||!t.parentNode.mbs)return null;const e=[];return function(t,e){const r=function(t){const{center:e,halfSize:r,quaternion:n}=t;return(new De).fromCenterHalfSizeQuaternion(e,r,n)}(e.parentNode.obb),n=function(t){const e=new Oa,r=t.obb.halfSize,{attributes:n}=e,i=new Float32Array(n.POSITION.value),o=kt.WGS84.cartographicToCartesian(t.obb.center);let s=[];for(let e=0;e<i.length;e+=3){const n=new nt(i[e]*=r[0],i[e+1]*=r[1],i[e+2]*=r[2]).transformByQuaternion(t.obb.quaternion).add(o);s=s.concat(n)}return s}(e);if(function(t,e){let r=!0;for(let n=0;n<e.length/3;n+=3){const i=[e[n],e[n+1],e[n+2]],o=kt.WGS84.cartesianToCartographic(i);if(t.distanceTo(o)>0){r=!1;break}}return r}(r,n))return;const i=`OBB of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile OBB`;t.push(i)}(e,t),function(t,e){const r=ka(e.mbs),n=ka(e.parentNode.mbs);if(r.center.distanceTo(n.center)+r.radius>n.radius){const r=`MBS of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile MBS`;t.push(r)}}(e,t),e}function ka(t){return new Gt([t[0],t[1],t[2]],t[3])}function Ia(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Ca=Vo.a.env.IonToken||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ";class Ma{constructor(){Ia(this,"nodePages",void 0),Ia(this,"fileMap",void 0),Ia(this,"options",void 0),Ia(this,"layers0Path",void 0),Ia(this,"materialMap",void 0),Ia(this,"materialDefinitions",void 0),Ia(this,"vertexCounter",void 0),Ia(this,"layers0",void 0),Ia(this,"featuresHashArray",void 0),Ia(this,"refinementCounter",void 0),Ia(this,"validate",void 0),Ia(this,"boundingVolumeWarnings",void 0),Ia(this,"conversionStartTime",void 0),Ia(this,"refreshTokenTime",void 0),Ia(this,"sourceTileset",void 0),Ia(this,"geoidHeightModel",void 0),Ia(this,"Loader",Co),this.nodePages=new $o(Jo.d,64),this.fileMap={},this.options={},this.layers0Path="",this.materialMap=new Map,this.materialDefinitions=[],this.vertexCounter=0,this.layers0=null,this.featuresHashArray=[],this.refinementCounter={tilesCount:0,tilesWithAddRefineCount:0},this.validate=!1,this.boundingVolumeWarnings=null}async convert(t){this.conversionStartTime=Vo.a.hrtime();const{tilesetName:e,slpk:r,egmFilePath:n,inputUrl:i,validate:o,outputPath:s,draco:u,sevenZipExe:c,maxDepth:l,token:h}=t;this.options={maxDepth:l,slpk:r,sevenZipExe:c,egmFilePath:n,draco:u,token:h,inputUrl:i},this.validate=o,this.Loader=-1!==i.indexOf("https://")?Po:Co,console.log("Loading egm file..."),this.geoidHeightModel=await Object(a.a)(n,ta),console.log("Loading egm file completed!"),r&&this.nodePages.useWriteFunction(Jo.e);const f=await this._fetchPreloadOptions(),d={loadOptions:{}};f.headers&&(d.loadOptions.fetch={headers:f.headers}),Object.assign(d,f);const p=await Object(a.a)(i,this.Loader,d.loadOptions);return this.sourceTileset=new Pr(p,d),await this._createAndSaveTileset(s,e),await this._finishConversion({slpk:r,outputPath:s,tilesetName:e}),p}async _createAndSaveTileset(t,e){const r=Object(Bo.join)(""+t,""+e);try{await Object(Jo.b)(r)}catch(t){}this.layers0Path=Object(Bo.join)(r,"SceneServer","layers","0"),this._formLayers0(e),this.materialDefinitions=[],this.materialMap=new Map;const n=this.sourceTileset.root,i=Hs(n,this.geoidHeightModel),o=this.nodePages.push({lodThreshold:0,obb:i.obb,children:[]}),s=this.options.slpk,a=this._formRootNodeIndexDocument(i);await this._convertNodesTree(a,n,o,i),this.layers0.materialDefinitions=this.materialDefinitions,await this._writeLayers0(),async function(t,e,r){const n={serviceItemId:Wo().replace(/-/gi,""),layerName:t,layers0:e},i=Qo()(n,qs),o=Object(Bo.join)(r,"SceneServer");await Object(Jo.d)(o,JSON.stringify(i))}(e,this.layers0,r),await this._writeNodeIndexDocument(a,"root",Object(Bo.join)(this.layers0Path,"nodes","root")),await this.nodePages.save(this.layers0Path,this.fileMap,s),await this._createSlpk(r)}_formLayers0(t){const e=function(t){const e=t.cartesianCenter,r=t.lodMetricValue,n=kt.WGS84.cartesianToCartographic(new nt(e[0]+r,e[1]+r,e[2]),new nt),i=kt.WGS84.cartesianToCartographic(new nt(e[0]-r,e[1]-r,e[2]),new nt),o=n[0]<i[0],s=n[1]<i[1];return[o?n[0]:i[0],s?n[1]:i[1],o?i[0]:n[0],s?i[1]:n[1]]}(this.sourceTileset),r={version:`{${Wo().toUpperCase()}}`,id:0,name:t,href:"./layers/0",store:{id:`{${Wo().toUpperCase()}}`,extent:e},nodePages:{nodesPerPage:64},compressGeometry:this.options.draco};this.layers0=Qo()(r,ca)}_formRootNodeIndexDocument(t){const e={version:`{${Wo().toUpperCase()}}`,id:"root",level:0,lodSelection:[{metricType:"maxScreenThresholdSQ",maxError:0},{metricType:"maxScreenThreshold",maxError:0}],...t,children:[]};return Qo()(e,fa)}async _convertNodesTree(t,e,r,n){if(await this.sourceTileset._loadTile(e),e.content&&"b3dm"===e.content.type){t.children.push({id:"1",href:"./1",...n});const[i]=await this._createNode(t,e,r,0),o=Object(Bo.join)(this.layers0Path,"nodes",i.path);this.options.slpk?this.fileMap["nodes/1/3dNodeIndexDocument.json.gz"]=await Object(Jo.e)(o,JSON.stringify(i),"3dNodeIndexDocument.json"):await Object(Jo.d)(o,JSON.stringify(i))}else await this._addChildrenWithNeighborsAndWriteFile({parentNode:t,sourceTiles:e.children,parentId:r,level:1});await e.unloadContent()}async _writeLayers0(){this.options.slpk?this.fileMap["3dSceneLayer.json.gz"]=await Object(Jo.e)(this.layers0Path,JSON.stringify(this.layers0),"3dSceneLayer.json"):await Object(Jo.d)(this.layers0Path,JSON.stringify(this.layers0))}async _writeNodeIndexDocument(t,e,r){this.options.slpk?this.fileMap[`nodes/${e}/3dNodeIndexDocument.json.gz`]=await Object(Jo.e)(r,JSON.stringify(t),"3dNodeIndexDocument.json"):await Object(Jo.d)(r,JSON.stringify(t))}async _createSlpk(t){if(this.options.slpk){const e=Object(Bo.join)(t,"SceneServer","layers","0"),r=t+".slpk";await Object(ts.b)(e,r,0,".",this.options.sevenZipExe);try{await Object(Jo.b)(t)}catch(t){}}}async _addChildrenWithNeighborsAndWriteFile(t){const e=[];await this._addChildren({...t,childNodes:e}),await this._addNeighborsAndWriteFile(t.parentNode,e)}async _addChildren(t){const{childNodes:e,sourceTiles:r,parentNode:n,parentId:i,level:o}=t;if(!(this.options.maxDepth&&o>this.options.maxDepth))for(const t of r){if("json"===t.type)await this.sourceTileset._loadTile(t),await this._addChildren({parentNode:n,sourceTiles:t.children,childNodes:e,parentId:i,level:o+1}),await t.unloadContent();else{const r=Hs(t,this.geoidHeightModel),s=await this._createNode(n,t,i,o);for(const t of s)n.children.push({id:t.id,href:"../"+t.path,...r}),e.push(t)}t.id&&console.log(t.id)}}async _addNeighborsAndWriteFile(t,e){for(const r of e){const e=Object(Bo.join)(this.layers0Path,"nodes",r.path),n=r.path;if(delete r.path,t.children.length<1e3)for(const e of t.children)r.id!==e.id&&r.neighbors.push({...e});else console.warn(`Node ${r.id}: neighbors attribute is omited because of large number of neigbors`),delete r.neighbors;await this._writeNodeIndexDocument(r,n,e),r.neighbors=[]}}async _createNode(t,e,r,n){var i;this.validate&&this._checkAddRefinementTypeForTile(e),await this._updateTilesetOptions(),await this.sourceTileset._loadTile(e);const o=Hs(e,this.geoidHeightModel),s=function(t,e){const r=[],n=t.boundingVolume,i=t.lodMetricValue||.1,o={metricType:"maxScreenThreshold",maxError:2*e.mbs[3]*16/i},s={metricType:"maxScreenThresholdSQ",maxError:.25*Math.PI*o.maxError*o.maxError};return"OrientedBoundingBox"===n.constructor.name?(r.push(s),r.push(o)):(r.push(o),r.push(s)),r}(e,o),a=s.find(t=>"maxScreenThresholdSQ"===t.metricType)||{maxError:0};(null==e||null===(i=e.content)||void 0===i?void 0:i.batchTableJson)&&this._convertAttributeStorageInfo(e.content);const u=await this._convertResources(e),c=[],l={geometry:null,compressedGeometry:null,texture:null,sharedResources:null,meshMaterial:null,vertexCount:null,attributes:null,featureCount:null};for(const n of u||[l]){const i=this._createNodeInNodePages(a,o,e,r,n),u=this._createNodeIndexDocument(t,o,s,i,n);i.mesh&&await this._writeResources(n,u.path),this.validate&&(this.boundingVolumeWarnings=xa(u),this.boundingVolumeWarnings&&this.boundingVolumeWarnings.length&&console.warn("Bounding Volume Warnings: ",...this.boundingVolumeWarnings)),c.push(u)}e.unloadContent();const h=c[0];return await this._addChildrenWithNeighborsAndWriteFile({parentNode:h,sourceTiles:e.children,parentId:h.id,level:n+1}),c}_convertAttributeStorageInfo(t){const e=t&&t.batchTableJson;e&&!this.layers0.attributeStorageInfo.length&&this._convertBatchTableInfoToNodeAttributes(e)}async _convertResources(t){if(!t.content||"b3dm"!==t.content.type)return null;return await vs(t.content,Number(this.nodePages.nodesCounter),this.featuresHashArray,this.layers0.attributeStorageInfo,this.options.draco)}_createNodeInNodePages(t,e,r,n,i){const{meshMaterial:o,texture:s,vertexCount:a,featureCount:u}=i,c={lodThreshold:t.maxError,obb:e.obb,children:[],mesh:null};r.content&&"b3dm"===r.content.type&&(c.mesh={geometry:{definition:s?0:1},attribute:{}});const l=this.nodePages.push(c,n);if(o&&this.nodePages.updateMaterialByNodeId(l,this._findOrCreateMaterial(o)),s){const t=s.image.height*s.image.width;this.nodePages.updateTexelCountHintByNodeId(l,t)}return a&&(this.vertexCounter+=a,this.nodePages.updateVertexCountByNodeId(l,a)),this.nodePages.updateNodeAttributeByNodeId(l),u&&this.nodePages.updateFeatureCountByNodeId(l,u),c}_createNodeIndexDocument(t,e,r,n,i){const{texture:o,attributes:s}=i,a=n.index,u={version:t.version,id:a.toString(),path:a.toString(),level:t.level+1,...e,lodSelection:r,parentNode:{id:t.id,href:"../"+t.id,mbs:t.mbs,obb:t.obb},children:[],neighbors:[]},c=Qo()(u,fa);if(n.mesh&&(c.geometryData=[{href:"./geometries/0"}],c.sharedResource={href:"./shared"},o&&(c.textureData=[{href:"./textures/0"}]),s&&s.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)){c.attributeData=[];for(let t=0;t<s.length;t++){const e=this.layers0.attributeStorageInfo[t].key;c.attributeData.push({href:`./attributes/${e}/0`})}}return c}async _writeResources(t,e){const{geometry:r,compressedGeometry:n,texture:i,sharedResources:o,attributes:s}=t,a=Object(Bo.join)(this.layers0Path,"nodes",e),u=Object(Bo.join)("nodes",e);await this._writeGeometries(r,n,a,u),await this._writeShared(o,a,u,e),await this._writeTexture(i,a,u),await this._writeAttributes(s,a,u)}async _writeGeometries(t,e,r,n){if(this.options.slpk){const e=Object(Bo.join)(r,"geometries");this.fileMap[n+"/geometries/0.bin.gz"]=await Object(Jo.e)(e,t,"0.bin")}else{const e=Object(Bo.join)(r,"geometries/0/");await Object(Jo.d)(e,t,"index.bin")}if(this.options.draco)if(this.options.slpk){const t=Object(Bo.join)(r,"geometries");this.fileMap[n+"/geometries/1.bin.gz"]=await Object(Jo.e)(t,e,"1.bin")}else{const t=Object(Bo.join)(r,"geometries/1/");await Object(Jo.d)(t,e,"index.bin")}}async _writeShared(t,e,r,n){t.nodePath=n;const i=Qo()(t,ma),o=JSON.stringify(i);if(this.options.slpk){const t=Object(Bo.join)(e,"shared");this.fileMap[r+"/shared/sharedResource.json.gz"]=await Object(Jo.e)(t,o,"sharedResource.json")}else{const t=Object(Bo.join)(e,"shared/");await Object(Jo.d)(t,o)}}async _writeTexture(t,e,r){if(t){const n=this._getFormatByMimeType(t.mimeType);this.layers0.textureSetDefinitions.length||this.layers0.textureSetDefinitions.push({formats:[{name:"0",format:n}]});const i=t.bufferView.data;if(this.options.slpk){const t=Object(Bo.join)(e,"textures"),o=!1;this.fileMap[`${r}/textures/0.${n}`]=await Object(Jo.e)(t,i,"0."+n,o)}else{const t=Object(Bo.join)(e,"textures/0/");await Object(Jo.d)(t,i,"index."+n)}}}async _writeAttributes(t,e,r){if(t.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)for(let n=0;n<t.length;n++){const i=this.layers0.attributeStorageInfo[n].key,o=new Uint8Array(t[n]);if(this.options.slpk){const t=Object(Bo.join)(e,"attributes",i);this.fileMap[`${r}/attributes/${i}.bin.gz`]=await Object(Jo.e)(t,o,"0.bin")}else{const t=Object(Bo.join)(e,`attributes/${i}/0`);await Object(Jo.d)(t,o,"index.bin")}}}_getFormatByMimeType(t){switch(t){case"image/jpeg":return"jpg";case"image/png":return"png";default:return"jpg"}}_findOrCreateMaterial(t){const e=Xo()(JSON.stringify(t));if(this.materialMap.has(e))return this.materialMap.get(e);const r=this.materialDefinitions.push(t)-1;return this.materialMap.set(e,r),r}_createdStorageAttribute(t,e,r){const n={key:"f_"+t,name:e,ordering:["attributeValues"],header:[{property:"count",valueType:"UInt32"}],attributeValues:{valueType:"Int32",valuesPerElement:1}};switch(r){case"OBJECTID":this._setupIdAttribute(n);break;case"string":this._setupStringAttribute(n);break;case"double":this._setupDoubleAttribute(n);break;case"Int32":break;default:this._setupStringAttribute(n)}return n}getAttributeType(t,e){return"OBJECTID"===t?"OBJECTID":"string"==typeof e?"string":"number"==typeof e?Number.isInteger(e)?"Int32":"double":"string"}_setupStringAttribute(t){t.ordering.unshift("attributeByteCounts"),t.header.push({property:"attributeValuesByteCount",valueType:"UInt32"}),t.attributeValues={valueType:"String",encoding:"UTF-8",valuesPerElement:1},t.attributeByteCounts={valueType:"UInt32",valuesPerElement:1}}_setupIdAttribute(t){t.attributeValues={valueType:"Oid32",valuesPerElement:1}}_setupDoubleAttribute(t){t.attributeValues={valueType:"Float64",valuesPerElement:1}}_createFieldAttribute(t,e){return{name:t,type:e,alias:t}}_convertBatchTableInfoToNodeAttributes(t){let e=0;const r={OBJECTID:[0],...t};for(const t in r){const n=r[t][0],i=this.getAttributeType(t,n),o=this._createdStorageAttribute(e,t,i),s=this._getFieldAttributeType(i),a=this._createFieldAttribute(t,s),u=this._createPopupInfo(r);this.layers0.attributeStorageInfo.push(o),this.layers0.fields.push(a),this.layers0.popupInfo=u,this.layers0.layerType="3DObject",e+=1}}_getFieldAttributeType(t){switch(t){case"OBJECTID":return"esriFieldTypeOID";case"string":return"esriFieldTypeString";case"Int32":return"esriFieldTypeInteger";case"double":return"esriFieldTypeDouble";default:return"esriFieldTypeString"}}_createPopupInfo(t){const e=[],r=[];for(const r in t)e.push({fieldName:r,visible:!0,isEditable:!1,label:r});return r.push({fieldInfos:e,type:"fields"}),{title:"{OBJECTID}",mediaInfos:[],popupElements:r,fieldInfos:e,expressionInfos:[]}}async _finishConversion(t){const{tilesCount:e,tilesWithAddRefineCount:r}=this.refinementCounter,n=r?r/e*100:0,i=await ns(t),o=rs(Vo.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finishing conversion of 3DTILES"),console.log("Total conversion time: "+o),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",i," bytes"),console.log('Percentage of tiles with "ADD" refinement type:',n,"%"),console.log("------------------------------------------------")}async _fetchPreloadOptions(){if(!this.Loader.preload)return{};const t={"cesium-ion":{accessToken:this.options.token||Ca}},e=await this.Loader.preload(this.options.inputUrl,t);return this.refreshTokenTime=Vo.a.hrtime(),{...t,...e}}async _updateTilesetOptions(){if(Vo.a.hrtime(this.refreshTokenTime)[0]<1800)return;this.refreshTokenTime=Vo.a.hrtime();const t=await this._fetchPreloadOptions();this.sourceTileset.options={...this.sourceTileset.options,...t},t.headers&&(this.sourceTileset.loadOptions.fetch={...this.sourceTileset.loadOptions.fetch,headers:t.headers},console.log("Authorization Bearer token has been updated"))}_checkAddRefinementTypeForTile(t){1===t.refine&&(this.refinementCounter.tilesWithAddRefineCount+=1,console.warn('This tile uses "ADD" type of refinement')),this.refinementCounter.tilesCount+=1}}var Da=r(150);new Uint8Array([0]);const Pa=[171,75,84,88,32,50,48,187,13,10,26,10];var La,Ba,Na,ja,Ua,Fa,za,Ga,Ha;(Ha=La||(La={}))[Ha.NONE=0]="NONE",Ha[Ha.BASISLZ=1]="BASISLZ",Ha[Ha.ZSTD=2]="ZSTD",Ha[Ha.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(Ba||(Ba={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(Na||(Na={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(ja||(ja={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Ua||(Ua={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Fa||(Fa={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(za||(za={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(Ga||(Ga={}));class Wa{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=La.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:Ba.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:Na.UNSPECIFIED,colorPrimaries:ja.SRGB,transferFunction:ja.SRGB,flags:Fa.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class qa{constructor(t,e,r,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,r),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const r=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&n<t;)n++,this._offset++;return n<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,n)}}function Va(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Za(t,e){const r=new Array(e.mipMapLevels);let n=e.width,i=e.height,o=0;for(let s=0;s<e.mipMapLevels;++s){const a=Ka(e,n,i,t,s),u=Qa(t,s,o,a);r[s]={compressed:!0,format:e.internalFormat,data:u,width:n,height:i,levelSize:a},n=Math.max(1,n>>1),i=Math.max(1,i>>1),o+=a}return r}function Qa(t,e,r,n){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+r,n)}function Ka(t,e,r,n,i){return Array.isArray(n)?t.sizeFunction(n[i]):t.sizeFunction(e,r)}const Xa={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},Ya={131:Xa.COMPRESSED_RGB_S3TC_DXT1_EXT,132:Xa.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:Xa.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:Xa.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:Xa.COMPRESSED_RED_RGTC1_EXT,140:Xa.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:Xa.COMPRESSED_RED_GREEN_RGTC2_EXT,142:Xa.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:Xa.COMPRESSED_RGB8_ETC2,148:Xa.COMPRESSED_SRGB8_ETC2,149:Xa.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:Xa.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:Xa.COMPRESSED_RGBA8_ETC2_EAC,152:Xa.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:Xa.COMPRESSED_R11_EAC,154:Xa.COMPRESSED_SIGNED_R11_EAC,155:Xa.COMPRESSED_RG11_EAC,156:Xa.COMPRESSED_SIGNED_RG11_EAC,157:Xa.COMPRESSED_RGBA_ASTC_4x4_KHR,158:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:Xa.COMPRESSED_RGBA_ASTC_5x4_KHR,160:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:Xa.COMPRESSED_RGBA_ASTC_5x5_KHR,162:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:Xa.COMPRESSED_RGBA_ASTC_6x5_KHR,164:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:Xa.COMPRESSED_RGBA_ASTC_6x6_KHR,166:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:Xa.COMPRESSED_RGBA_ASTC_8x5_KHR,168:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:Xa.COMPRESSED_RGBA_ASTC_8x6_KHR,170:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:Xa.COMPRESSED_RGBA_ASTC_8x8_KHR,172:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:Xa.COMPRESSED_RGBA_ASTC_10x5_KHR,174:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:Xa.COMPRESSED_RGBA_ASTC_10x6_KHR,176:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:Xa.COMPRESSED_RGBA_ASTC_10x8_KHR,178:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:Xa.COMPRESSED_RGBA_ASTC_10x10_KHR,180:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:Xa.COMPRESSED_RGBA_ASTC_12x10_KHR,182:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:Xa.COMPRESSED_RGBA_ASTC_12x12_KHR,184:Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:Xa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:Xa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:Xa.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:Xa.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:Xa.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:Xa.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:Xa.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:Xa.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:Xa.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:Xa.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:Xa.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:Xa.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:Xa.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:Xa.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:Xa.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:Xa.COMPRESSED_RGBA_ASTC_12x12_KHR};const $a=[171,75,84,88,32,50,48,187,13,10,26,10];function Ja(t){const e=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,Pa.length);if(e[0]!==Pa[0]||e[1]!==Pa[1]||e[2]!==Pa[2]||e[3]!==Pa[3]||e[4]!==Pa[4]||e[5]!==Pa[5]||e[6]!==Pa[6]||e[7]!==Pa[7]||e[8]!==Pa[8]||e[9]!==Pa[9]||e[10]!==Pa[10]||e[11]!==Pa[11])throw new Error("Missing KTX 2.0 identifier.");const r=new Wa,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new qa(t,Pa.length,n,!0);r.vkFormat=i._nextUint32(),r.typeSize=i._nextUint32(),r.pixelWidth=i._nextUint32(),r.pixelHeight=i._nextUint32(),r.pixelDepth=i._nextUint32(),r.layerCount=i._nextUint32(),r.faceCount=i._nextUint32();const o=i._nextUint32();r.supercompressionScheme=i._nextUint32();const s=i._nextUint32(),a=i._nextUint32(),u=i._nextUint32(),c=i._nextUint32(),l=i._nextUint64(),h=i._nextUint64(),f=new qa(t,Pa.length+n,3*o*8,!0);for(let e=0;e<o;e++)r.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+f._nextUint64(),f._nextUint64()),uncompressedByteLength:f._nextUint64()});const d=new qa(t,s,a,!0),p={vendorId:d._skip(4)._nextUint16(),descriptorType:d._nextUint16(),versionNumber:d._nextUint16(),descriptorBlockSize:d._nextUint16(),colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:{x:d._nextUint8()+1,y:d._nextUint8()+1,z:d._nextUint8()+1,w:d._nextUint8()+1},bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},g=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<g;t++)p.samples[t]={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelID:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:d._nextUint32(),sampleUpper:d._nextUint32()};r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(p);const _=new qa(t,u,c,!0);for(;_._offset<c;){const t=_._nextUint32(),e=_._scan(t),n=Va(e),i=_._scan(t-e.byteLength);r.keyValue[n]=n.match(/^ktx/i)?Va(i):i,t%4&&_._skip(4-t%4)}if(h<=0)return r;const m=new qa(t,l,h,!0),y=m._nextUint16(),b=m._nextUint16(),w=m._nextUint32(),v=m._nextUint32(),E=m._nextUint32(),S=m._nextUint32(),A=[];for(let t=0;t<o;t++)A.push({imageFlags:m._nextUint32(),rgbSliceByteOffset:m._nextUint32(),rgbSliceByteLength:m._nextUint32(),alphaSliceByteOffset:m._nextUint32(),alphaSliceByteLength:m._nextUint32()});const T=l+m._offset,R=T+w,O=R+v,x=O+E,k=new Uint8Array(t.buffer,t.byteOffset+T,w),I=new Uint8Array(t.buffer,t.byteOffset+R,v),C=new Uint8Array(t.buffer,t.byteOffset+O,E),M=new Uint8Array(t.buffer,t.byteOffset+x,S);return r.globalData={endpointCount:y,selectorCount:b,imageDescs:A,endpointsData:k,selectorsData:I,tablesData:C,extendedData:M},r}(new Uint8Array(t)),r=Math.max(1,e.levels.length),n=e.pixelWidth,i=e.pixelHeight,o=(s=e.vkFormat,Ya[s]);var s;return Za(e.levels,{mipMapLevels:r,width:n,height:i,sizeFunction:t=>t.uncompressedByteLength,internalFormat:o})}const tu={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:Xa.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":Xa.COMPRESSED_RGB_ATC_WEBGL,ATCA:Xa.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:Xa.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:ru,DXT3:nu,DXT5:nu,"ATC ":ru,ATCA:nu,ATCI:nu}};function eu(t){const e=new Int32Array(t,0,tu.HEADER_LENGTH),r=e[tu.HEADER_PF_FOURCC_INDEX];Object(Ct.a)(Boolean(e[tu.HEADER_PF_FLAGS_INDEX]&tu.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");const n=(i=r,String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255));var i;const o=tu.PIXEL_FORMATS[n],s=tu.SIZE_FUNCTIONS[n];Object(Ct.a)(o&&s,"DDS: Unknown pixel format "+r);let a=1;e[tu.HEADER_FLAGS_INDEX]&tu.DDSD_MIPMAPCOUNT&&(a=Math.max(1,e[tu.MIPMAPCOUNT_INDEX]));const u=e[tu.HEADER_WIDTH_INDEX],c=e[tu.HEADER_HEIGHT_INDEX],l=e[tu.HEADER_SIZE_INDEX]+4;return Za(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}function ru(t,e){return(t+3>>2)*(e+3>>2)*8}function nu(t,e){return(t+3>>2)*(e+3>>2)*16}const iu=55727696,ou=1347834371,su=13,au=52,uu=0,cu=2,lu=4,hu=6,fu=7,du=11,pu=12,gu={0:[Xa.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[Xa.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[Xa.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[Xa.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[Xa.COMPRESSED_RGB_ETC1_WEBGL],7:[Xa.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[Xa.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[Xa.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[Xa.COMPRESSED_RGB8_ETC2],23:[Xa.COMPRESSED_RGBA8_ETC2_EAC],24:[Xa.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[Xa.COMPRESSED_R11_EAC],26:[Xa.COMPRESSED_RG11_EAC],27:[Xa.COMPRESSED_RGBA_ASTC_4X4_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[Xa.COMPRESSED_RGBA_ASTC_5X4_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[Xa.COMPRESSED_RGBA_ASTC_5X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[Xa.COMPRESSED_RGBA_ASTC_6X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[Xa.COMPRESSED_RGBA_ASTC_6X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[Xa.COMPRESSED_RGBA_ASTC_8X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[Xa.COMPRESSED_RGBA_ASTC_8X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[Xa.COMPRESSED_RGBA_ASTC_8X8_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[Xa.COMPRESSED_RGBA_ASTC_10X5_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[Xa.COMPRESSED_RGBA_ASTC_10X6_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[Xa.COMPRESSED_RGBA_ASTC_10X8_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[Xa.COMPRESSED_RGBA_ASTC_10X10_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[Xa.COMPRESSED_RGBA_ASTC_12X10_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[Xa.COMPRESSED_RGBA_ASTC_12X12_KHR,Xa.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},_u={0:mu,1:mu,2:yu,3:yu,6:bu,7:bu,9:wu,11:wu,22:bu,23:wu,24:bu,25:bu,26:wu,27:wu,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function mu(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function yu(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function bu(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function wu(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function vu(t){if(function(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,$a.length);return!(e[0]!==$a[0]||e[1]!==$a[1]||e[2]!==$a[2]||e[3]!==$a[3]||e[4]!==$a[4]||e[5]!==$a[5]||e[6]!==$a[6]||e[7]!==$a[7]||e[8]!==$a[8]||e[9]!==$a[9]||e[10]!==$a[10]||e[11]!==$a[11])}(t))return Ja(t);if(function(t){return new Uint32Array(t,0,tu.HEADER_LENGTH)[tu.MAGIC_NUMBER_INDEX]===tu.MAGIC_NUMBER}(t))return eu(t);if(function(t){const e=new Uint32Array(t,0,su)[uu];return e===iu||e===ou}(t))return function(t){const e=new Uint32Array(t,0,su),r=e[cu],n=e[lu],i=gu[r]||[],o=i.length>1&&n?i[1]:i[0],s=_u[r],a=e[du],u=e[fu],c=e[hu],l=au+e[pu];return Za(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}const Eu={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.0.14",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/"}}},Su={...Eu,parse:async t=>vu(t)};function Au(t,e=null){return e?`${t}?token=${e}`:t}var Tu=5121,Ru=5125,Ou=5126,xu=5130;const ku={UInt8:Uint8Array,UInt16:Uint16Array,UInt32:Uint32Array,Float32:Float32Array,UInt64:Float64Array},Iu={UInt8:Tu,UInt16:Ru,Float32:Ou,UInt32:Ru,UInt64:xu},Cu={position:"position",normal:"normal",uv0:"uv0",color:"color",region:"region"},Mu={vertexAttributes:"vertexAttributes",featureAttributeOrder:"featureAttributeOrder",featureAttributes:"featureAttributes"},Du="header",Pu="vertexCount",Lu="featureCount",Bu={UInt8:1,UInt16:2,UInt32:4,Float32:4,UInt64:8},Nu=new nt([0,0,0]),ju={jpeg:Oi,png:Oi,"ktx-etc2":Su,dds:Su};async function Uu(t,e,r,n,i){if(e.content=e.content||{},e.content.featureIds=e.content.featureIds||null,e.content.featureData=function(t,e){const r=e.store.defaultGeometrySchema,n=r;for(const t in Mu)for(const e in Cu){const i=r[t][e];if(i){const{byteOffset:r=0,count:o=0,valueType:s,valuesPerElement:a}=i;n[t][e]={valueType:s,valuesPerElement:a,byteOffset:r,count:o}}}return n.attributesOrder=r.ordering,n}(0,r),e.content.attributes={},e.textureUrl){var o;const t=Au(e.textureUrl,null==n||null===(o=n.i3s)||void 0===o?void 0:o.token),r=ju[e.textureFormat]||Oi,s=await fetch(t),u=await s.arrayBuffer();if(r===Oi){const t={image:{type:"data"}};e.content.texture=await i.parse(u,t)}else if(r===Su){const t=await Object(a.a)(u,Su);e.content.texture={compressed:!0,mipmaps:!1,width:t[0].width,height:t[0].height,data:t}}}return e.content.material=function(t,e){let r;t?r={...t,pbrMetallicRoughness:t.pbrMetallicRoughness?{...t.pbrMetallicRoughness}:{baseColorFactor:[255,255,255,255]}}:(r={pbrMetallicRoughness:{}},e?r.pbrMetallicRoughness.baseColorTexture={texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]);r.alphaCutoff=r.alphaCutoff||.25,r.alphaMode&&(r.alphaMode=r.alphaMode.toUpperCase());r.emissiveFactor&&(r.emissiveFactor=Hu(r.emissiveFactor));r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorFactor&&(r.pbrMetallicRoughness.baseColorFactor=Hu(r.pbrMetallicRoughness.baseColorFactor));return function(t,e){const r={source:{image:e}};t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?t.pbrMetallicRoughness.baseColorTexture={...t.pbrMetallicRoughness.baseColorTexture,texture:r}:t.emissiveTexture?t.emissiveTexture={...t.emissiveTexture,texture:r}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?t.pbrMetallicRoughness.metallicRoughnessTexture={...t.pbrMetallicRoughness.metallicRoughnessTexture,texture:r}:t.normalTexture?t.normalTexture={...t.normalTexture,texture:r}:t.occlusionTexture&&(t.occlusionTexture={...t.occlusionTexture,texture:r})}(r,e),r}(e.materialDefinition,e.content.texture),e.content.material&&(e.content.texture=null),await async function(t,e={},r){if(!e.content)return e;const n=e.content;let i,o,s=0,a=0;if(e.isDracoGeometry){const e=await Object(Da.a)(t,kn,{draco:{attributeNameEntry:"i3s-attribute-type"}});o=e.header.vertexCount;const r=e.indices.value,{POSITION:n,NORMAL:s,COLOR_0:a,TEXCOORD_0:u,"feature-index":c,"uv-region":l}=e.attributes;i={position:n,normal:s,color:a,uv0:u,uvRegion:l,id:c,indices:r},function(t,e){for(const r in e.loaderData.attributes){const n=e.loaderData.attributes[r];switch(n.name){case"POSITION":t.position.metadata=n.metadata;break;case"feature-index":t.id.metadata=n.metadata}}}(i,e);const h=function(t){return t&&t.metadata&&t.metadata["i3s-feature-ids"]&&t.metadata["i3s-feature-ids"].intArray}(c);h&&function(t,e){const r=t.id.value,n=new Float32Array(r.length);for(let t=0;t<r.length;t++)n[t]=e[r[t]];t.id.value=n}(i,h)}else{const{vertexAttributes:e,attributesOrder:r,featureAttributes:u,featureAttributeOrder:c}=n.featureData,l=function(t,e){let r=0,n=0,i=0;const o=t.featureData[Du];for(const t in o){const{property:s,type:a}=o[t],u=ku[a];s===Pu&&(n=new u(e,0,4)[0],r+=Bu[a]),s===Lu&&(i=new u(e,4,4)[0],r+=Bu[a])}return{vertexCount:n,featureCount:i,byteOffset:r}}(n,t);s=l.byteOffset,o=l.vertexCount,a=l.featureCount;const{attributes:h,byteOffset:f}=zu(t,s,e,o,r),{attributes:d}=zu(t,f,u,a,c);!function(t){const{id:e,faceRange:r}=t;if(!e||!r)return;const n=e.value,i=r.value,o=i[i.length-1]+1,s=new Uint32Array(3*o);let a=0,u=0;for(let t=1;t<i.length;t+=2){const e=Number(n[a]),r=i[t],o=i[t-1],c=u+3*(r-o+1);s.fill(e,u,c),a++,u=c}t.id.value=s}(d),i=function(t,e){return{...t,...e}}(h,d)}const{enuMatrix:u,cartographicOrigin:c,cartesianOrigin:l}=function(t,e){const r=e.mbs,n=t.value,i=t.metadata,o=new J,s=new nt(r[0],r[1],r[2]),a=new nt;return kt.WGS84.cartographicToCartesian(s,a),kt.WGS84.eastNorthUpToFixedFrame(a,o),t.value=function(t,e={},r){const n=new Float64Array(t.length),i=e["i3s-scale_x"]&&e["i3s-scale_x"].double||1,o=e["i3s-scale_y"]&&e["i3s-scale_y"].double||1;for(let e=0;e<n.length;e+=3)n[e]=t[e]*i+r.x,n[e+1]=t[e+1]*o+r.y,n[e+2]=t[e+2]+r.z;for(let t=0;t<n.length;t+=3)kt.WGS84.cartographicToCartesian(n.subarray(t,t+3),Nu),n[t]=Nu.x,n[t+1]=Nu.y,n[t+2]=Nu.z;return n}(n,i,s),{enuMatrix:o,fixedFrameToENUMatrix:o.invert(),cartographicOrigin:s,cartesianOrigin:a}}(i.position,e),h=(new J).multiplyRight(u);n.attributes={positions:i.position,normals:i.normal,colors:Fu(i.color),texCoords:i.uv0,uvRegions:Fu(i.uvRegion)},n.indices=i.indices||null,i.id&&i.id.value&&(e.content.featureIds=i.id.value);for(const t in n.attributes)n.attributes[t]||delete n.attributes[t];return n.vertexCount=o,n.cartographicCenter=c,n.cartesianOrigin=l,n.modelMatrix=h.invert(),n.byteLength=t.byteLength,e}(t,e)}function Fu(t){return t?(t.normalized=!0,t):t}function zu(t,e,r,n,i){const o={};for(const s of i)if(r[s]){const{valueType:i,valuesPerElement:a}=r[s],u=n;if(e+u*a>t.byteLength)break;const c=t.slice(e);let l=[];if("UInt64"===i)l=Gu(c,u*a,Bu[i]);else{l=new(0,ku[i])(c,0,u*a)}switch(o[s]={value:l,type:Iu[i],size:a},s){case"color":o.color.normalized=!0}e+=u*a*Bu[i]}return{attributes:o,byteOffset:e}}function Gu(t,e,r){const n=[],i=new DataView(t);let o=0;for(let t=0;t<e;t++){const t=i.getUint32(o,!0)+2**32*i.getUint32(o+4,!0);n.push(t),o+=r}return n}function Hu(t){const e=[...t];for(let r=0;r<t.length;r++)e[r]=t[r]/255;return e}const Wu={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:"3.0.14",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const{tile:n,tileset:i}=(null==e?void 0:e.i3s)||{};return await Uu(t,n,i,e,r),n.content},extensions:["bin"],options:{"i3s-content":{}}};const qu=["","WEBKIT_","MOZ_"],Vu={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let Zu=null;function Qu(t){if(!Zu){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,Zu=new Set;for(const e of qu)for(const r in Vu)if(t&&t.getExtension(`${e}${r}`)){const t=Vu[r];Zu.add(t)}}return Zu}async function Ku(t){return JSON.parse((new TextDecoder).decode(t))}const Xu={name:"I3S Node Page",id:"i3s-node-page",module:"i3s",version:"3.0.14",mimeTypes:["application/json"],parse:async function(t){return t=Ku(t)},extensions:["json"],options:{}};function Yu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class $u{constructor(t,e){Yu(this,"tileset",void 0),Yu(this,"nodePages",void 0),Yu(this,"nodesPerPage",void 0),Yu(this,"options",void 0),Yu(this,"lodSelectionMetricType",void 0),Yu(this,"textureDefinitionsSelectedFormats",void 0),this.tileset={...t},this.nodesPerPage=t.nodePages.nodesPerPage,this.lodSelectionMetricType=t.nodePages.lodSelectionMetricType,this.options=e,this.nodePages=[],this.textureDefinitionsSelectedFormats=[],this._initSelectedFormatsForTextureDefinitions(t)}async getNodeById(t){const e=Math.floor(t/this.nodesPerPage);if(!this.nodePages[e]){var r;const t=Au(`${this.tileset.url}/nodepages/${e}`,null===(r=this.options.i3s)||void 0===r?void 0:r.token);this.nodePages[e]=Object(a.a)(t,Xu,this.options),this.nodePages[e]=await this.nodePages[e]}this.nodePages[e]instanceof Promise&&(this.nodePages[e]=await this.nodePages[e]);const n=t%this.nodesPerPage;return this.nodePages[e].nodes[n]}async formTileFromNodePages(t){const e=await this.getNodeById(t),r=[];for(const t of e.children||[]){const e=await this.getNodeById(t);r.push({id:t,obb:e.obb})}let n=null,i=null,o=null,s="jpeg",a=[],u=!1;if(e&&e.mesh){const{url:t,isDracoGeometry:r}=e.mesh.geometry&&this._getContentUrl(e.mesh.geometry)||{url:null,isDracoGeometry:null};n=t,u=r;const[c,l]=this._getInformationFromMaterial(e.mesh.material);o=l,s=c.format||s,c.name&&(i=`${this.tileset.url}/nodes/${e.mesh.material.resource}/textures/${c.name}`),this.tileset.attributeStorageInfo&&(a=function(t,e){const r=[],{attributeStorageInfo:n,url:i}=t;for(let t=0;t<n.length;t++){const o=n[t].key;r.push(`${i}/nodes/${e}/attributes/${o}/0`)}return r}(this.tileset,e.mesh.attribute.resource))}return Ju({id:t,lodSelection:this._getLodSelection(e),obb:e.obb,contentUrl:n,textureUrl:i,attributeUrls:a,materialDefinition:o,textureFormat:s,children:r,isDracoGeometry:u})}_getContentUrl(t){let e={};const r=this.tileset.geometryDefinitions[t.definition];let n=-1;if(this.options.i3s&&this.options.i3s.useDracoGeometry&&(n=r.geometryBuffers.findIndex(t=>t.compressedAttributes&&"draco"===t.compressedAttributes.encoding)),-1===n&&(n=r.geometryBuffers.findIndex(t=>!t.compressedAttributes)),-1!==n){const i=Boolean(r.geometryBuffers[n].compressedAttributes);e={url:`${this.tileset.url}/nodes/${t.resource}/geometries/${n}`,isDracoGeometry:i}}return e}_getLodSelection(t){const e=[];return"maxScreenThresholdSQ"===this.lodSelectionMetricType&&e.push({metricType:"maxScreenThreshold",maxError:Math.sqrt(t.lodThreshold/(.25*Math.PI))}),e.push({metricType:this.lodSelectionMetricType,maxError:t.lodThreshold}),e}_getInformationFromMaterial(t){const e={name:null,format:null};if(t){const r=this.tileset.materialDefinitions[t.definition],n=r&&r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture&&r.pbrMetallicRoughness.baseColorTexture.textureSetDefinitionId;if(n||0===n){return[this.textureDefinitionsSelectedFormats[n]||e,r]}return[e,r]}return[e,null]}_initSelectedFormatsForTextureDefinitions(t){this.textureDefinitionsSelectedFormats=[];const e=this._getSupportedTextureFormats(),r=t.textureSetDefinitions||[];for(const t of r){const r=t&&t.formats||[];let n=null;for(const t of e){const e=r.find(e=>e.format===t);if(e){n=e;break}}this.textureDefinitionsSelectedFormats.push(n)}}_getSupportedTextureFormats(){const t=[];if(!this.options.i3s||this.options.i3s.useCompressedTextures){const e=Qu();e.has("etc2")&&t.push("ktx-etc2"),e.has("dxt")&&t.push("dds")}return t.push("jpg"),t.push("png"),t}}function Ju(t){const e=t.obb?[...kt.WGS84.cartographicToCartesian(t.obb.center),...t.obb.halfSize,...t.obb.quaternion]:void 0;let r;if(t.mbs)r=[...kt.WGS84.cartographicToCartesian(t.mbs.slice(0,3)),t.mbs[3]];else if(e){const n=(new De).fromCenterHalfSizeQuaternion(e.slice(0,3),t.obb.halfSize,t.obb.quaternion).getBoundingSphere();r=[...n.center,n.radius],t.mbs=[...t.obb.center,n.radius]}return t.boundingVolume={sphere:r,box:e},t.lodMetricType=t.lodSelection[0].metricType,t.lodMetricValue=t.lodSelection[0].maxError,t.transformMatrix=t.transform,t.type=nr,t.refine=Je,t}const tc=/layers\/[0-9]+$/,ec=/nodes\/([0-9-]+|root)$/,rc={name:"I3S (Indexed Scene Layers)",id:"i3s",module:"i3s",version:"3.0.14",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const n=r.url;e.i3s=e.i3s||{};if("504b0304"===function(t){if(t instanceof ArrayBuffer)return[...new Uint8Array(t,0,4)].map(t=>t.toString(16).padStart(2,"0")).join("");return null}(t))throw new Error("Files with .slpk extention currently are not supported by I3SLoader");let i,o;i="auto"===e.i3s.isTileset?tc.test(n):e.i3s.isTileset;o="auto"===e.isTileHeader?ec.test(n):e.i3s.isTileHeader;i?t=await async function(t,e,r){const n=JSON.parse((new TextDecoder).decode(t));return n.loader=rc,await async function(t,e,r){if(t.url=r.url,t.nodePages)t.nodePagesTile=new $u(t,e),t.root=await t.nodePagesTile.formTileFromNodePages(0);else{var n;const r=Au(t.url+"/nodes/root",null===(n=e.i3s)||void 0===n?void 0:n.token);t.root=await Object(a.a)(r,t.loader,{i3s:{loadContent:!1,isTileHeader:!0,isTileset:!1}})}t.basePath=t.url,t.type=ir,t.lodMetricType=t.root.lodMetricType,t.lodMetricValue=t.root.lodMetricValue}(n,e,r),n}(t,e,r):o?(t=await async function(t,e,r){return function(t,e,r){return t.url=r.url,t.featureData&&(t.featureUrl=`${t.url}/${t.featureData[0].href}`),t.geometryData&&(t.contentUrl=`${t.url}/${t.geometryData[0].href}`),t.textureData&&(t.textureUrl=`${t.url}/${t.textureData[0].href}`),t.attributeData&&(t.attributeUrls=function(t){const{url:e,attributeData:r}=t,n=[];for(let t=0;t<r.length;t++){const i=r[t].href.replace("./","");n.push(`${e}/${i}`)}return n}(t)),Ju(t)}(t=JSON.parse((new TextDecoder).decode(t)),0,r)}(t,0,r),e.i3s.loadContent&&(e.i3s.tile=t,await Object(a.a)(t.contentUrl,rc,e))):t=await async function(t,e){return await Object(Da.a)(t,Wu,e)}(t,e);return t},extensions:["bin"],options:{i3s:{loadContent:!0,token:null,isTileset:"auto",isTileHeader:"auto",tile:null,tileset:null,useDracoGeometry:!0,useCompressedTextures:!0}}};async function nc(t,e){const{attributeName:r,attributeType:n}=e;return r?{[r]:n?ic(n,t):null}:{}}function ic(t,e){switch(t){case"String":return function(t){const e=[];try{const r=new DataView(t,0,4).getUint32(0,!0),n=new Uint32Array(t,8,r);let i=8+4*r;for(const r of n){const n=new TextDecoder("utf-8"),o=new Uint8Array(t,i,r);e.push(n.decode(o)),i+=r}}catch(t){console.error("Parse string attribute error: ",t.message)}return e}(e);case"Oid32":return oc(e);case"Float64":return function(t){return new Float64Array(t,8)}(e);default:return oc(e)}}function oc(t){return new Uint32Array(t,4)}const sc={name:"I3S Attribute",id:"i3s-attribute",module:"i3s",version:"3.0.14",mimeTypes:["application/binary"],parse:async function(t,e){return t=nc(t,e)},extensions:["bin"],options:{},binary:!0};function ac(t,e){const r=[t.center[0],t.center[1],t.center[2]+e.getHeight(t.center[1],t.center[0])],n=kt.WGS84.cartographicToCartesian(r,new nt),i=(new De).fromCenterHalfSizeQuaternion(n,t.halfSize,t.quaternion);return[...i.center,...i.halfAxes.toArray()]}const uc={version:{path:"version",default:"1.0"}},cc={boundingVolume:{path:"boundingVolume"},geometricError:{path:"geometricError"},content:{path:"content"},children:{path:"children",transform:t=>t.map(t=>Qo()(t,cc))}},lc={asset:{path:"asset",transform:t=>Qo()(t,uc)},geometricError:{path:"root",transform:t=>t.geometricError},root:{path:"root",transform:t=>Qo()(t,cc)}};var hc=r(82);const fc=1179937895;function dc(t,e,r,n){return function(t,{firstBuffer:e=0}={}){if(t.buffers&&t.buffers.length>e)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(t),function(t,e,r=0,n={}){const{magic:i=fc,version:o=2,json:s={},binary:a}=t,u=r;e&&(e.setUint32(r+0,i,!0),e.setUint32(r+4,o,!0),e.setUint32(r+8,0,!0));const c=r+8,l=r+=12;e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,1313821514,!0)),r+=8;const h=JSON.stringify(s);if(r=Object(hc.b)(e,r,h,4),e){const t=r-l-8;e.setUint32(l+0,t,!0)}if(a){const t=r;if(e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,5130562,!0)),r+=8,r=Object(hc.a)(e,r,a,4),e){const n=r-t-8;e.setUint32(t+0,n,!0)}}if(e){const t=r-u;e.setUint32(c,t,!0)}return r}(t,e,r,n)}const pc={name:"glTF",id:"gltf",module:"gltf",version:"3.0.14",extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(t,e={}){const{byteOffset:r=0}=e,n=dc(t,null,r,e),i=new ArrayBuffer(n),o=new DataView(i);return dc(t,o,r,e),i},options:{gltf:{}}};function gc(t,e,r){if(!e)return r+12;const{magic:n,version:i=1,byteLength:o=12}=t;return Object(Ct.a)(Array.isArray(n)&&Number.isFinite(i)&&Number.isFinite(o)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,i,!0),e.setUint32(r+8,o,!0),r+=12}function _c(t,e,r){t&&t.setUint32(e+8,r,!0)}var mc=r(61);const yc={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function bc(t,e,r,n){switch(Object(Ct.a)("string"==typeof t.type),t.type){case Lr.COMPOSITE:return function(t,e,r,n,i){const o=r;r+=gc(t={magic:Br.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let o=0;o<t.tiles.length;++o)r+=i(t.tiles[o],e,r,n);return _c(e,o,r-o),r}(t,e,r,n,bc);case Lr.POINT_CLOUD:return function(t,e,r,n){const{featureTableJson:i=yc}=t;let o=JSON.stringify(i);o=Object(mc.c)(o,4);const{featureTableJsonByteLength:s=o.length}=t,a=new ArrayBuffer(12),u=a.byteLength,c=r;return r+=gc(t={magic:Br.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,s,!0),e.setUint32(r+4,u,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=Object(mc.b)(e,r,o,s),_c(e,c,(r+=Object(mc.a)(e,r,a,u))-c),r}(t,e,r);case Lr.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=0,batchTable:o}=t,s={BATCH_LENGTH:i},a=JSON.stringify(s),u=o?JSON.stringify(o):"",c=Object(Di.b)(a.length,8),l=u?Object(Di.b)(u.length,8):0,h=r;r=gc(t={magic:Br.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,c,!0),e.setUint32(16,0,!0),e.setUint32(20,l,!0),e.setUint32(24,0,!0)),r+=16,r=Object(hc.b)(e,r,a,8),o&&(r=Object(hc.b)(e,r,u,8));const f=t.gltfEncoded;return f&&(r=Object(mc.a)(e,r,f,f.byteLength)),_c(e,h,r-h),r}(t,e,r);case Lr.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=1,gltfFormat:o=1,gltfUri:s=""}=t,a=s.length,u={INSTANCES_LENGTH:i,POSITION:new Array(3*i).fill(0)},c=JSON.stringify(u),l=c.length,h=r;return r=gc(t={magic:Br.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,l,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,o,!0)),r+=20,r+=Object(mc.b)(e,r,c,l),_c(e,h,(r+=Object(mc.b)(e,r,s,a))-h),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const wc={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.0.14",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=bc(t,null,0,e),n=new ArrayBuffer(r);return bc(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}};const{_encodeImageNode:vc}=ui.a;let Ec=!0;const Sc={name:"Images",id:"image",module:"images",version:"3.0.14",extensions:["jpeg"],options:{image:{mimeType:"image/png",jpegQuality:null}},encode:async function(t,e){return(e=e||{}).image=e.image||{},vc?vc(t,{type:e.image.mimeType}):async function(t,e){const{mimeType:r,jpegQuality:n}=e.image,{width:i,height:o}=function(t){return gi(t)}(t),s=document.createElement("canvas");s.width=i,s.height=o,function(t,e,r=0,n=0){if(0===r&&0===n&&"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const r=e.getContext("bitmaprenderer");if(r)return r.transferFromImageBitmap(t),e}const i=e.getContext("2d");if(t.data){const r=new Uint8ClampedArray(t.data),n=new ImageData(r,t.width,t.height);return i.putImageData(n,0,0),e}i.drawImage(t,0,0)}(t,s);const a=await new Promise(t=>{if(n&&Ec)try{return void s.toBlob(t,r,n)}catch(t){Ec=!1}s.toBlob(t,r)});if(!a)throw new Error("image encoding failed");return await a.arrayBuffer()}(t,e)}},Ac=new J([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]);class Tc{async convert(t,e=null){this.i3sTile=t;const r=await this.buildGltf(t);return _s({gltfEncoded:new Uint8Array(r),type:"b3dm",featuresLength:this._getFeaturesLength(e),batchTable:e},wc)}async buildGltf(t){const{material:e,attributes:r,indices:n,cartesianOrigin:i}=t.content,o=new qi,s=await this._addI3sTextureToGltf(t,o),a=this._convertI3sMaterialToGltfMaterial(e,s),u=o.addMaterial(a),c=r.positions,l=c.value;r.positions.value=this._normalizePositions(l,i),r.normals&&!this._checkNormals(r.normals.value)&&delete r.normals;const h=n||this._generateSynteticIndices(l.length/c.size),f=o.addMesh({attributes:r,indices:h,material:u}),d=this._generateTransformMatrix(i),p=o.addNode({meshIndex:f,matrix:d}),g=o.addScene({nodeIndices:[p]});o.setDefaultScene(g),o.createBinaryChunk();return _s(o.gltf,pc)}async _addI3sTextureToGltf(t,e){const{content:{texture:r,material:n,attributes:i},header:{textureFormat:o}}=t;let s=null,a=r;if(!r&&n&&(a=n.pbrMetallicRoughness&&n.pbrMetallicRoughness.baseColorTexture&&n.pbrMetallicRoughness.baseColorTexture.texture.source.image),a){const t=this._deduceMimeTypeFromFormat(o),r=await gs(a,Sc),n=e.addImage(r,t);s=e.addTexture({imageIndex:n}),delete i.colors}return s}_normalizePositions(t,e){const r=new Float32Array(t.length);for(let n=0;n<t.length;n+=3){const i=t.subarray(n,n+3),o=new nt(e);let s=new nt(Array.from(i));s=s.subtract(o),r.set(s,n)}return r}_generateTransformMatrix(t){return(new J).translate(t).multiplyLeft(Ac)}_generateBatchId(t){const e=3*(t[t.length-1]+1),r=new Float32Array(e);let n=0,i=0;for(let e=0;e<t.length/2;e++){const e=3*t[n],o=3*(t[n+1]+1);r.fill(i,e,o),n+=2,i+=1}return r}_generateSynteticIndices(t){const e=new Uint32Array(t);for(let r=0;r<t;r++)e.set([r],r);return e}_deduceMimeTypeFromFormat(t){switch(t){case"jpg":return"image/jpeg";case"png":return"image/png";default:return console.warn("Unexpected texture format in I3S: "+t),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(t,e){return t?(null!==e&&(t=this._setGltfTexture(t,e)),t):(t={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},null!==e?t.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],t)}_setGltfTexture(t,e){const r={...t,pbrMetallicRoughness:{...t.pbrMetallicRoughness}};return t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?r.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.emissiveTexture?r.emissiveTexture={index:e,texCoord:0}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?r.pbrMetallicRoughness.metallicRoughnessTexture={index:e,texCoord:0}:t.normalTexture?r.normalTexture={index:e,texCoord:0}:t.occlusionTexture&&(r.occlusionTexture={index:e,texCoord:0}),r}_getFeaturesLength(t){if(!t)return 0;return t[Object.keys(t)[0]].length}_checkNormals(t){return t.find(t=>t)}}function Rc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Oc{constructor(){Rc(this,"options",void 0),Rc(this,"tilesetPath",void 0),Rc(this,"vertexCounter",void 0),Rc(this,"conversionStartTime",void 0),Rc(this,"geoidHeightModel",void 0),Rc(this,"sourceTileset",void 0),Rc(this,"attributeStorageInfo",void 0),this.options={},this.tilesetPath="",this.vertexCounter=0,this.conversionStartTime=[0,0],this.geoidHeightModel=null,this.sourceTileset=null,this.attributeStorageInfo=null}async convert(t){const{inputUrl:e,outputPath:r,tilesetName:n,maxDepth:i,egmFilePath:o}=t;this.conversionStartTime=Vo.a.hrtime(),this.options={maxDepth:i},console.log("Loading egm file..."),this.geoidHeightModel=await Object(a.a)(o,ta),console.log("Loading egm file completed!");const s=await Object(a.a)(e,rc,{});this.sourceTileset=new Pr(s,{}),this.sourceTileset.root.header.obb||(this.sourceTileset.root.header.obb=Ws(this.sourceTileset.root.header.mbs)),this.tilesetPath=Object(Bo.join)(""+r,""+n),this.attributeStorageInfo=s.attributeStorageInfo;try{await Object(Jo.b)(this.tilesetPath)}catch(t){}const u={boundingVolume:{box:ac(this.sourceTileset.root.header.obb,this.geoidHeightModel)},geometricError:Vs(this.sourceTileset.root),children:[]};await this._addChildren(this.sourceTileset.root,u,1);const c=Qo()({root:u},lc);await Object(Jo.d)(this.tilesetPath,JSON.stringify(c),"tileset.json"),this._finishConversion({slpk:!1,outputPath:r,tilesetName:n})}async _addChildren(t,e,r){if(!(this.options.maxDepth&&r>this.options.maxDepth))for(const n of t.header.children||[]){const i=await this._loadChildNode(t,n);if(t.children.push(i),i.contentUrl){await this.sourceTileset._loadTile(i),this.vertexCounter+=i.content.vertexCount;let t=null;this.attributeStorageInfo&&(t=await this._loadChildAttributes(i,this.attributeStorageInfo)),i.header.obb||(i.header.obb=Ws(i.header.mbs));const n={box:ac(i.header.obb,this.geoidHeightModel)},o={boundingVolume:n,geometricError:Vs(i),children:[]},s=await(new Tc).convert(i,t);o.content={uri:i.id+".b3dm",boundingVolume:n},await Object(Jo.d)(this.tilesetPath,new Uint8Array(s),i.id+".b3dm"),e.children.push(o),i.unloadContent(),await this._addChildren(i,o,r+1)}else await this._addChildren(i,e,r+1)}}async _loadChildNode(t,e){let r;if(this.sourceTileset.tileset.nodePages)console.log("Node conversion: "+e.id),r=await this.sourceTileset.tileset.nodePagesTile.formTileFromNodePages(e.id);else{const{loader:n}=this.sourceTileset,i=this._relativeUrlToFullUrl(t.url,e.href),o={i3s:{...this.sourceTileset.loadOptions,isTileHeader:!0,loadContent:!1}};console.log("Node conversion: "+i),r=await Object(a.a)(i,n,o)}return new Tr(this.sourceTileset,r,t)}_relativeUrlToFullUrl(t,e){let r=t.split("/");const n=e.split("/");for(const t of n)switch(t){case".":continue;case"..":r=r.slice(0,-1);break;default:r.push(t)}return r.join("/")}async _loadChildAttributes(t,e){const r=[],{attributeUrls:n}=t.header;for(let t=0;t<n.length;t++){const i=n[t],o=e[t],s={attributeName:o.name,attributeType:this._getAttributeType(o)};r.push(Object(a.a)(i,sc,s))}const i=await Promise.all(r);return this._replaceNestedArrays(i),Object.assign({},...i)}_getAttributeType(t){return t.attributeValues?t.attributeValues.valueType:t.objectIds?"Oid32":""}_replaceNestedArrays(t){for(let e=0;e<t.length;e++){const r=t[e];for(const t in r)r[t]=Array.from(r[t])}}async _finishConversion(t){const e=await ns(t),r=rs(Vo.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finish conversion of I3S"),console.log("Total conversion time: "+r),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",e," bytes"),console.log("------------------------------------------------")}}var xc=r(146)},function(t,e,r){"use strict";r.d(e,"a",(function(){return a}));var n=r(4),i=r(17),o=r(18),s=r(150);async function a(t,e,r,a){Array.isArray(e)||Object(i.a)(e)||(void 0,r=e,e=void 0);const u=Object(o.a)(r);let c=t;return"string"==typeof t&&(c=await u(t)),Object(n.b)(t)&&(c=await u(t)),await Object(s.a)(c,e,r)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(66),i=r.n(n);const o={id:"zip",module:"zip",name:"Zip Archive",version:"3.0.14",extensions:["zip"],mimeTypes:["application/zip"],category:"archive",tests:["PK"],options:{},parse:async function(t,e={}){const r=[],n={};try{const o=new i.a;return(await o.loadAsync(t,e)).forEach((t,i)=>{const s=i.name,a=async function(t,e,r={}){try{return await t.file(e).async(r.dataType||"arraybuffer")}catch(t){return r.log.error(`Unable to read ${e} from zip archive: ${t}`),t}}(o,s,e).then(e=>{n[t]=e});r.push(a)}),await Promise.all(r),n}catch(t){throw e.log.error("Unable to read zip archive: "+t),t}}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return _}));var n=r(81);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o="function"==typeof atob?atob:"function"==typeof Buffer?function(t){return Buffer.from(t,"base64").toString("binary")}:f,s=o("AGFzbQEAAAABDANgAX8AYAAAYAABfwIeAgdpbXBvcnRzA2xvZwAAB2ltcG9ydHMDbWVtAgABAzIxAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAgICAgIAAAAAAAaYARt/AUGBxpS6Bgt/AUGJ17b+fgt/AUH+uevFeQt/AUH2qMmBAQt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALB7oCJQhvbmVGdWxsQQAYCG9uZUZ1bGxCABkIb25lRnVsbEMAGghvbmVGdWxsRAAbBWxvb3BzAAEEbG9vcAACBXByaW1lAAMFbG9vcEEABAZsb29wQTEABQZsb29wQTIABgZsb29wQTMABwZsb29wQTQACAVsb29wQgAJBmxvb3BCMQAKBmxvb3BCMgALBmxvb3BCMwAMBmxvb3BCNAANBWxvb3BDAA4GbG9vcEMxAA8GbG9vcEMyABAGbG9vcEMzABEGbG9vcEM0ABIFbG9vcEQAEwZsb29wRDEAFAZsb29wRDIAFQZsb29wRDMAFgZsb29wRDQAFwRnZXRBACgEZ2V0QgApBGdldEMAKgRnZXREACsEZ2V0WAAsBHNldEEALQRzZXRCAC4Ec2V0QwAvBHNldEQAMARzZXRYADEKzA0xWwEBf0EAJAggAEEGdCEBAkADQCMIIAFGDQEjACQEIwEkBSMCJAYjAyQHEAIjBCMAaiQAIwUjAWokASMGIwJqJAIjByMDaiQDIwhBwABqJAgMAAsLIwgjGmokGgsTACMIIxpqJAkQAxAEEAkQDhATC6IBAEEAIwlqKAIAJApBBCMJaigCACQLQQgjCWooAgAkDEEMIwlqKAIAJA1BECMJaigCACQOQRQjCWooAgAkD0EYIwlqKAIAJBBBHCMJaigCACQRQSAjCWooAgAkEkEkIwlqKAIAJBNBKCMJaigCACQUQSwjCWooAgAkFUEwIwlqKAIAJBZBNCMJaigCACQXQTgjCWooAgAkGEE8IwlqKAIAJBkLCgAQBRAGEAcQCAsuAEH4yKq7fSMKahAYQdbunsZ+IwtqEBtB2+GBoQIjDGoQGkHunfeNfCMNahAZCy0AQa+f8Kt/Iw5qEBhBqoyfvAQjD2oQG0GTjMHBeiMQahAaQYGqmmojEWoQGQssAEHYsYLMBiMSahAYQa/vk9p4IxNqEBtBsbd9IxRqEBpBvq/zyngjFWoQGQstAEGiosDcBiMWahAYQZPj4WwjF2oQG0GOh+WzeiMYahAaQaGQ0M0EIxlqEBkLCgAQChALEAwQDQsuAEHiyviwfyMLahAcQcDmgoJ8IxBqEB9B0bT5sgIjFWoQHkGqj9vNfiMKahAdCy0AQd2gvLF9Iw9qEBxB06iQEiMUahAfQYHNh8V9IxlqEB5ByPfPvn4jDmoQHQsuAEHmm4ePAiMTahAcQdaP3Jl8IxhqEB9Bh5vUpn8jDWoQHkHtqeiqBCMSahAdCy0AQYXSj896IxdqEBxB+Me+ZyMMahAfQdmFvLsGIxFqEB5Bipmp6XgjFmoQHQsKABAPEBAQERASCysAQcLyaCMPahAgQYHtx7t4IxJqECNBosL17AYjFWoQIkGM8JRvIxhqECELLgBBxNT7pXojC2oQIEGpn/veBCMOahAjQeCW7bV/IxFqECJB8Pj+9XsjFGoQIQstAEHG/e3EAiMXahAgQfrPhNV+IwpqECNBheG8p30jDWoQIkGFuqAkIxBqECELLgBBuaDTzn0jE2oQIEHls+62fiMWahAjQfj5if0BIxlqECJB5ayxpXwjDGoQIQsKABAUEBUQFhAXCy0AQcTEpKF/IwpqECRBl/+rmQQjEWoQJ0Gnx9DceiMYahAmQbnAzmQjD2oQJQstAEHDs+2qBiMWahAkQZKZs/h4Iw1qECdB/ei/fyMUahAmQdG7kax4IwtqECULLQBBz/yh/QYjEmoQJEHgzbNxIxlqECdBlIaFmHojEGoQJkGho6DwBCMXahAlCy4AQYL9zbp/Iw5qECRBteTr6XsjFWoQJ0G7pd/WAiMMahAmQZGnm9x+IxNqECULKAEBf0F/IwFzIwNxIwEjAnFyIwBqIABqIgFBB3QgAUEZdnIjAWokAAsoAQF/QX8jAnMjAHEjAiMDcXIjAWogAGoiAUEWdCABQQp2ciMCaiQBCygBAX9BfyMDcyMBcSMDIwBxciMCaiAAaiIBQRF0IAFBD3ZyIwNqJAILKAEBf0F/IwBzIwJxIwAjAXFyIwNqIABqIgFBDHQgAUEUdnIjAGokAwsoAQF/IwJBfyMDc3EjASMDcXIjAGogAGoiAUEFdCABQRt2ciMBaiQACygBAX8jA0F/IwBzcSMCIwBxciMBaiAAaiIBQRR0IAFBDHZyIwJqJAELKAEBfyMAQX8jAXNxIwMjAXFyIwJqIABqIgFBDnQgAUESdnIjA2okAgsoAQF/IwFBfyMCc3EjACMCcXIjA2ogAGoiAUEJdCABQRd2ciMAaiQDCyIBAX8jASMCcyMDcyMAaiAAaiIBQQR0IAFBHHZyIwFqJAALIgEBfyMCIwNzIwBzIwFqIABqIgFBF3QgAUEJdnIjAmokAQsiAQF/IwMjAHMjAXMjAmogAGoiAUEQdCABQRB2ciMDaiQCCyIBAX8jACMBcyMCcyMDaiAAaiIBQQt0IAFBFXZyIwBqJAMLJQEBf0F/IwNzIwFyIwJzIwBqIABqIgFBBnQgAUEadnIjAWokAAslAQF/QX8jAHMjAnIjA3MjAWogAGoiAUEVdCABQQt2ciMCaiQBCyUBAX9BfyMBcyMDciMAcyMCaiAAaiIBQQ90IAFBEXZyIwNqJAILJQEBf0F/IwJzIwByIwFzIwNqIABqIgFBCnQgAUEWdnIjAGokAwsEACMACwQAIwELBAAjAgsEACMDCwQAIxoLBgAgACQACwYAIAAkAQsGACAAJAILBgAgACQDCwYAIAAkGgsA6gQEbmFtZQGSAzIAA2xvZwEFbG9vcHMCBGxvb3ADBXByaW1lBAVsb29wQQUGbG9vcEExBgZsb29wQTIHBmxvb3BBMwgGbG9vcEE0CQVsb29wQgoGbG9vcEIxCwZsb29wQjIMBmxvb3BCMw0GbG9vcEI0DgVsb29wQw8GbG9vcEMxEAZsb29wQzIRBmxvb3BDMxIGbG9vcEM0EwVsb29wRBQGbG9vcEQxFQZsb29wRDIWBmxvb3BEMxcGbG9vcEQ0GAhvbmVGdWxsQRkIb25lRnVsbEIaCG9uZUZ1bGxDGwhvbmVGdWxsRBwIdHdvRnVsbEEdCHR3b0Z1bGxCHgh0d29GdWxsQx8IdHdvRnVsbEQgCHRyZUZ1bGxBIQh0cmVGdWxsQiIIdHJlRnVsbEMjCHRyZUZ1bGxEJAhxdWFGdWxsQSUIcXVhRnVsbEImCHF1YUZ1bGxDJwhxdWFGdWxsRCgEZ2V0QSkEZ2V0QioEZ2V0QysEZ2V0RCwEZ2V0WC0Ec2V0QS4Ec2V0Qi8Ec2V0QzAEc2V0RDEEc2V0WALNATIAAQAAAQIAAAEIbnVtbG9vcHMCAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgCAAABAW4ZAgAAAQFuGgIAAAEBbhsCAAABAW4cAgAAAQFuHQIAAAEBbh4CAAABAW4fAgAAAQFuIAIAAAEBbiECAAABAW4iAgAAAQFuIwIAAAEBbiQCAAABAW4lAgAAAQFuJgIAAAEBbicCAAABAW4oACkAKgArACwALQEAAC4BAAAvAQAAMAEAADEBAAA="),a=!(!WebAssembly||o===f)&&function(t){var e,r,n,i=-1;e=t.length-1,r=new ArrayBuffer(t.length),n=new Uint8Array(r);for(;e>i++;)n[i]=t.charCodeAt(i);return n}(s).buffer,u={rotl:function(t,e){return t<<e|t>>>32-e},endian:function(t){if(t.constructor==Number)return 16711935&u.rotl(t,8)|4278255360&u.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=u.endian(t[e]);return t},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")}},c=Math.floor(1048576.00032768),l="Parameter must be Buffer, ArrayBuffer or Uint8Array";function h(t){var e,r,n,i,o,s,h,f,d;const p=function(t,e){var r=u.wordsToBytes(function(t,e){(new Date).getTime();var r,n,i,o,s,a,c,l,h,f,d,p,g,_,m,y,b,w,v,E,S,A=1732584193,T=-271733879,R=-1732584194,O=271733878,x=8*t.length;S=u.bytesToWords(t);for(var k=0;k<S.length;k++)S[k]=16711935&(S[k]<<8|S[k]>>>24)|4278255360&(S[k]<<24|S[k]>>>8);S[x>>>5]|=128<<x%32,S[14+(x+64>>>9<<4)]=x;for(var I=0;I<S.length;I+=16)b=A,w=T,v=R,E=O,r=S[I+0]>>>0,n=S[I+1]>>>0,i=S[I+2]>>>0,o=S[I+3]>>>0,s=S[I+4]>>>0,a=S[I+5]>>>0,c=S[I+6]>>>0,l=S[I+7]>>>0,h=S[I+8]>>>0,f=S[I+9]>>>0,d=S[I+10]>>>0,p=S[I+11]>>>0,g=S[I+12]>>>0,_=S[I+13]>>>0,m=S[I+14]>>>0,y=S[I+15]>>>0,A=C(7,25,A+(T&R|~T&O)+r-680876936)+T,O=C(12,20,O+(A&T|~A&R)+n-389564586)+A,R=C(17,15,R+(O&A|~O&T)+i+606105819)+O,T=C(22,10,T+(R&O|~R&A)+o-1044525330)+R,A=C(7,25,A+(T&R|~T&O)+s-176418897)+T,O=C(12,20,O+(A&T|~A&R)+a+1200080426)+A,R=C(17,15,R+(O&A|~O&T)+c-1473231341)+O,T=C(22,10,T+(R&O|~R&A)+l-45705983)+R,A=C(7,25,A+(T&R|~T&O)+h+1770035416)+T,O=C(12,20,O+(A&T|~A&R)+f-1958414417)+A,R=C(17,15,R+(O&A|~O&T)+d-42063)+O,T=C(22,10,T+(R&O|~R&A)+p-1990404162)+R,A=C(7,25,A+(T&R|~T&O)+g+1804603682)+T,O=C(12,20,O+(A&T|~A&R)+_-40341101)+A,R=C(17,15,R+(O&A|~O&T)+m-1502002290)+O,T=C(22,10,T+(R&O|~R&A)+y+1236535329)+R,A=C(5,27,A+(T&O|R&~O)+n-165796510)+T,O=C(9,23,O+(A&R|T&~R)+c-1069501632)+A,R=C(14,18,R+(O&T|A&~T)+p+643717713)+O,T=C(20,12,T+(R&A|O&~A)+r-373897302)+R,A=C(5,27,A+(T&O|R&~O)+a-701558691)+T,O=C(9,23,O+(A&R|T&~R)+d+38016083)+A,R=C(14,18,R+(O&T|A&~T)+y-660478335)+O,T=C(20,12,T+(R&A|O&~A)+s-405537848)+R,A=C(5,27,A+(T&O|R&~O)+f+568446438)+T,O=C(9,23,O+(A&R|T&~R)+m-1019803690)+A,R=C(14,18,R+(O&T|A&~T)+o-187363961)+O,T=C(20,12,T+(R&A|O&~A)+h+1163531501)+R,A=C(5,27,A+(T&O|R&~O)+_-1444681467)+T,O=C(9,23,O+(A&R|T&~R)+i-51403784)+A,R=C(14,18,R+(O&T|A&~T)+l+1735328473)+O,T=C(20,12,T+(R&A|O&~A)+g-1926607734)+R,A=C(4,28,A+(T^R^O)+a-378558)+T,O=C(11,21,O+(A^T^R)+h-2022574463)+A,R=C(16,16,R+(O^A^T)+p+1839030562)+O,T=C(23,9,T+(R^O^A)+m-35309556)+R,A=C(4,28,A+(T^R^O)+n-1530992060)+T,O=C(11,21,O+(A^T^R)+s+1272893353)+A,R=C(16,16,R+(O^A^T)+l-155497632)+O,T=C(23,9,T+(R^O^A)+d-1094730640)+R,A=C(4,28,A+(T^R^O)+_+681279174)+T,O=C(11,21,O+(A^T^R)+r-358537222)+A,R=C(16,16,R+(O^A^T)+o-722521979)+O,T=C(23,9,T+(R^O^A)+c+76029189)+R,A=C(4,28,A+(T^R^O)+f-640364487)+T,O=C(11,21,O+(A^T^R)+g-421815835)+A,R=C(16,16,R+(O^A^T)+y+530742520)+O,T=C(23,9,T+(R^O^A)+i-995338651)+R,A=C(6,26,A+(R^(T|~O))+r-198630844)+T,O=C(10,22,O+(T^(A|~R))+l+1126891415)+A,R=C(15,17,R+(A^(O|~T))+m-1416354905)+O,T=C(21,11,T+(O^(R|~A))+a-57434055)+R,A=C(6,26,A+(R^(T|~O))+g+1700485571)+T,O=C(10,22,O+(T^(A|~R))+o-1894986606)+A,R=C(15,17,R+(A^(O|~T))+d-1051523)+O,T=C(21,11,T+(O^(R|~A))+n-2054922799)+R,A=C(6,26,A+(R^(T|~O))+h+1873313359)+T,O=C(10,22,O+(T^(A|~R))+y-30611744)+A,R=C(15,17,R+(A^(O|~T))+c-1560198380)+O,T=C(21,11,T+(O^(R|~A))+_+1309151649)+R,A=C(6,26,A+(R^(T|~O))+s-145523070)+T,O=C(10,22,O+(T^(A|~R))+p-1120210379)+A,R=C(15,17,R+(A^(O|~T))+i+718787259)+O,T=C(21,11,T+(O^(R|~A))+f-343485551)+R,A=A+b>>>0,T=T+w>>>0,R=R+v>>>0,O=O+E>>>0;return u.endian([A,T,R,O]);function C(t,e,r){return r<<t|r>>>e}}(t));return e&&e.asBytes?r:u.bytesToHex(r)},g=function(){var t,e,r,n,i,o,s,a,l,h;return function(f,d,p,g){var _;return t=d.loops,d.loop,e=d.getA,n=d.getB,o=d.getC,a=d.getD,d.getX,r=d.setA,i=d.setB,s=d.setC,l=d.setD,d.setX,h=p,_=u.wordsToBytes(function(f){(new Date).getTime();var d,p,g,_,m,y,b,w,v,E,S,A,T,R,O,x,k,I,C,M,D,P,L=1732584193,B=-271733879,N=-1732584194,j=271733878,U=0,F=8*f.length;for(function(t,e){var r,n,i,o,s=-1,a=Math.floor((t.length-1)/4),u=0;for(;a-8>s++;)u=s<<2,e[s]=t[u+0]|t[u+1]<<8|t[u+2]<<16|t[u+3]<<24;s--;for(;a>s++;)r=void 0===t[(u=s<<2)+0]?0:t[u+0],n=void 0===t[u+1]?0:t[u+1],i=void 0===t[u+2]?0:t[u+2],o=void 0===t[u+3]?0:t[u+3],e[s]=r|n<<8|i<<16|o<<24;return a+1}(f,h),h[F>>>5]|=128<<F%32,h[14+(F+64>>>9<<4)]=F,P=15+(F+64>>>9<<4),D=h;U<P;)P>U+c?(r(L),i(B),s(N),l(j),t(61440),U+=983040,L=e(),B=n(),N=o(),j=a()):(k=L,I=B,C=N,M=j,d=D[U+0]>>>0,p=D[U+1]>>>0,g=D[U+2]>>>0,_=D[U+3]>>>0,m=D[U+4]>>>0,y=D[U+5]>>>0,b=D[U+6]>>>0,w=D[U+7]>>>0,v=D[U+8]>>>0,E=D[U+9]>>>0,S=D[U+10]>>>0,A=D[U+11]>>>0,T=D[U+12]>>>0,R=D[U+13]>>>0,O=D[U+14]>>>0,x=D[U+15]>>>0,L=z(7,25,L+(B&N|~B&j)+d-680876936)+B,j=z(12,20,j+(L&B|~L&N)+p-389564586)+L,N=z(17,15,N+(j&L|~j&B)+g+606105819)+j,B=z(22,10,B+(N&j|~N&L)+_-1044525330)+N,L=z(7,25,L+(B&N|~B&j)+m-176418897)+B,j=z(12,20,j+(L&B|~L&N)+y+1200080426)+L,N=z(17,15,N+(j&L|~j&B)+b-1473231341)+j,B=z(22,10,B+(N&j|~N&L)+w-45705983)+N,L=z(7,25,L+(B&N|~B&j)+v+1770035416)+B,j=z(12,20,j+(L&B|~L&N)+E-1958414417)+L,N=z(17,15,N+(j&L|~j&B)+S-42063)+j,B=z(22,10,B+(N&j|~N&L)+A-1990404162)+N,L=z(7,25,L+(B&N|~B&j)+T+1804603682)+B,j=z(12,20,j+(L&B|~L&N)+R-40341101)+L,N=z(17,15,N+(j&L|~j&B)+O-1502002290)+j,B=z(22,10,B+(N&j|~N&L)+x+1236535329)+N,L=z(5,27,L+(B&j|N&~j)+p-165796510)+B,j=z(9,23,j+(L&N|B&~N)+b-1069501632)+L,N=z(14,18,N+(j&B|L&~B)+A+643717713)+j,B=z(20,12,B+(N&L|j&~L)+d-373897302)+N,L=z(5,27,L+(B&j|N&~j)+y-701558691)+B,j=z(9,23,j+(L&N|B&~N)+S+38016083)+L,N=z(14,18,N+(j&B|L&~B)+x-660478335)+j,B=z(20,12,B+(N&L|j&~L)+m-405537848)+N,L=z(5,27,L+(B&j|N&~j)+E+568446438)+B,j=z(9,23,j+(L&N|B&~N)+O-1019803690)+L,N=z(14,18,N+(j&B|L&~B)+_-187363961)+j,B=z(20,12,B+(N&L|j&~L)+v+1163531501)+N,L=z(5,27,L+(B&j|N&~j)+R-1444681467)+B,j=z(9,23,j+(L&N|B&~N)+g-51403784)+L,N=z(14,18,N+(j&B|L&~B)+w+1735328473)+j,B=z(20,12,B+(N&L|j&~L)+T-1926607734)+N,L=z(4,28,L+(B^N^j)+y-378558)+B,j=z(11,21,j+(L^B^N)+v-2022574463)+L,N=z(16,16,N+(j^L^B)+A+1839030562)+j,B=z(23,9,B+(N^j^L)+O-35309556)+N,L=z(4,28,L+(B^N^j)+p-1530992060)+B,j=z(11,21,j+(L^B^N)+m+1272893353)+L,N=z(16,16,N+(j^L^B)+w-155497632)+j,B=z(23,9,B+(N^j^L)+S-1094730640)+N,L=z(4,28,L+(B^N^j)+R+681279174)+B,j=z(11,21,j+(L^B^N)+d-358537222)+L,N=z(16,16,N+(j^L^B)+_-722521979)+j,B=z(23,9,B+(N^j^L)+b+76029189)+N,L=z(4,28,L+(B^N^j)+E-640364487)+B,j=z(11,21,j+(L^B^N)+T-421815835)+L,N=z(16,16,N+(j^L^B)+x+530742520)+j,B=z(23,9,B+(N^j^L)+g-995338651)+N,L=z(6,26,L+(N^(B|~j))+d-198630844)+B,j=z(10,22,j+(B^(L|~N))+w+1126891415)+L,N=z(15,17,N+(L^(j|~B))+O-1416354905)+j,B=z(21,11,B+(j^(N|~L))+y-57434055)+N,L=z(6,26,L+(N^(B|~j))+T+1700485571)+B,j=z(10,22,j+(B^(L|~N))+_-1894986606)+L,N=z(15,17,N+(L^(j|~B))+S-1051523)+j,B=z(21,11,B+(j^(N|~L))+p-2054922799)+N,L=z(6,26,L+(N^(B|~j))+v+1873313359)+B,j=z(10,22,j+(B^(L|~N))+x-30611744)+L,N=z(15,17,N+(L^(j|~B))+b-1560198380)+j,B=z(21,11,B+(j^(N|~L))+R+1309151649)+N,L=z(6,26,L+(N^(B|~j))+m-145523070)+B,j=z(10,22,j+(B^(L|~N))+A-1120210379)+L,N=z(15,17,N+(L^(j|~B))+g+718787259)+j,B=z(21,11,B+(j^(N|~L))+E-343485551)+N,U+=16,L=L+k>>>0,B=B+I>>>0,N=N+C>>>0,j=j+M>>>0);return u.endian([L,B,N,j]);function z(t,e,r){return r<<t|r>>>e}}(f)),g&&g.asBytes?_:u.bytesToHex(_)}}(),_={},m=(new Date).getTime();return _.then=function(t){return s=t,y(),_},_.catch=function(t){return h=t,_},t&&"object"==typeof t?"function"==typeof Buffer&&t.constructor===Buffer?o=t:t.constructor===Uint8Array||t.constructor===ArrayBuffer?o=t.constructor===ArrayBuffer?new Uint8Array(t):t:b(new TypeError(l)):b(new TypeError(l)),o&&(i=o.length,a&&i>c?i>268369920?b(new Error("Parameter exceeds max size of 255.9 Mbytes")):(e=new WebAssembly.Memory({initial:i>32e6?i>64e6?i>128e6?4096:2048:1024:512}),r=new Uint32Array(e.buffer),n={imports:{mem:e,log:console.log}},WebAssembly.instantiate(a,n).then((function(t){y(g(o,t.instance.exports,r))}))):y(p(o))),_;function y(t){var e=Boolean(t)?t:f;Boolean(t)&&(d=(new Date).getTime()),"function"==typeof s?Boolean(e)&&(s(e,d-m),s=h=null):Boolean(t)&&(f=t)}function b(t){"function"==typeof h&&h(t)}}function f(t){return t}function d(t){return t<26?String.fromCharCode(t+"A".charCodeAt(0)):t<52?String.fromCharCode(t-26+"a".charCodeAt(0)):t<62?String.fromCharCode(t-52+"0".charCodeAt(0)):62===t?"+":63===t?"/":void 0}function p(t){t.length%2!=0&&(t="0"+t);return function(t){t=""+t;for(let e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return null;let e="";for(let r=0;r<t.length;r+=3){const n=[void 0,void 0,void 0,void 0];n[0]=t.charCodeAt(r)>>2,n[1]=(3&t.charCodeAt(r))<<4,t.length>r+1&&(n[1]|=t.charCodeAt(r+1)>>4,n[2]=(15&t.charCodeAt(r+1))<<2),t.length>r+2&&(n[2]|=t.charCodeAt(r+2)>>6,n[3]=63&t.charCodeAt(r+2));for(let t=0;t<n.length;t++)void 0===n[t]?e+="=":e+=d(n[t])}return e}(t.match(/\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(""))}function g(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}a||console.log("WebAssembly not available or WASM module could not be decoded; md5WASM will fall back to JavaScript");class _ extends class{constructor(t={}){i(this,"name",void 0),i(this,"options",void 0),this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(t){var e,r,n;const i=[];for await(const e of t)i.push(e),yield e;const o=await this.concatenate(i),s=await this.hash(o);null===(e=this.options)||void 0===e||null===(r=e.crypto)||void 0===r||null===(n=r.onEnd)||void 0===n||n.call(r,{hash:s})}async concatenate(t){return await Object(n.a)(t)}}{constructor(t={}){super(),g(this,"name","md5"),g(this,"options",void 0),this.options=t}async hash(t){const e=new Promise((e,r)=>h(t).then(e).catch(r));return p(await e)}}}])}));
94
94
  //# sourceMappingURL=dist.min.js.map