THREE.DRACOLoader=function(e){THREE.Loader.call(this,e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}},THREE.DRACOLoader.prototype=Object.assign(Object.create(THREE.Loader.prototype),{constructor:THREE.DRACOLoader,setDecoderPath:function(e){return this.decoderPath=e,this},setDecoderConfig:function(e){return this.decoderConfig=e,this},setWorkerLimit:function(e){return this.workerLimit=e,this},setVerbosity:function(){console.warn("THREE.DRACOLoader: The .setVerbosity() method has been removed.")},setDrawMode:function(){console.warn("THREE.DRACOLoader: The .setDrawMode() method has been removed.")},setSkipDequantization:function(){console.warn("THREE.DRACOLoader: The .setSkipDequantization() method has been removed.")},load:function(e,t,o,r){var n=new THREE.FileLoader(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),"use-credentials"===this.crossOrigin&&n.setWithCredentials(!0),n.load(e,(e=>{var o={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,o).then(t).catch(r)}),o,r)},decodeDracoFile:function(e,t,o,r){var n={attributeIDs:o||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!o};this.decodeGeometry(e,n).then(t)},decodeGeometry:function(e,t){for(var o in t.attributeTypes){var r=t.attributeTypes[o];void 0!==r.BYTES_PER_ELEMENT&&(t.attributeTypes[o]=r.name)}var n,i=JSON.stringify(t);if(THREE.DRACOLoader.taskCache.has(e)){var s=THREE.DRACOLoader.taskCache.get(e);if(s.key===i)return s.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}var a=this.workerNextTaskID++,g=e.byteLength,l=this._getWorker(a,g).then((o=>(n=o,new Promise(((o,r)=>{n._callbacks[a]={resolve:o,reject:r},n.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return l.finally((()=>{n&&a&&this._releaseTask(n,a)})),THREE.DRACOLoader.taskCache.set(e,{key:i,promise:l}),l},_createGeometry:function(e){var t=new THREE.BufferGeometry;e.index&&t.setIndex(new THREE.BufferAttribute(e.index.array,1));for(var o=0;o{o.load(e,t,void 0,r)}))},preload:function(){return this._initDecoder(),this},_initDecoder:function(){if(this.decoderPending)return this.decoderPending;var e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{var o=t[0];e||(this.decoderConfig.wasmBinary=t[1]);var r=THREE.DRACOLoader.DRACOWorker.toString(),n=["/* draco decoder */",o,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([n]))})),this.decoderPending},_getWorker:function(e,t){return this._initDecoder().then((()=>{var o;this.workerPool.lengtht._taskLoad?-1:1}));return(o=this.workerPool[this.workerPool.length-1])._taskCosts[e]=t,o._taskLoad+=t,o}))},_releaseTask:function(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]},debug:function(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))},dispose:function(){for(var e=0;e{var t=e.draco,r=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(i),i.byteLength);try{var g=function(e,t,r,n){var i,s,a=n.attributeIDs,g=n.attributeTypes,l=t.GetEncodedGeometryType(r);if(l===e.TRIANGULAR_MESH)i=new e.Mesh,s=t.DecodeBufferToMesh(r,i);else{if(l!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");i=new e.PointCloud,s=t.DecodeBufferToPointCloud(r,i)}if(!s.ok()||0===i.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+s.error_msg());var u={index:null,attributes:[]};for(var p in a){var c,d,f=self[g[p]];if(n.useUniqueIDs)d=a[p],c=t.GetAttributeByUniqueId(i,d);else{if(-1===(d=t.GetAttributeId(i,e[a[p]])))continue;c=t.GetAttribute(i,d)}u.attributes.push(o(e,t,i,p,f,c))}if(l===e.TRIANGULAR_MESH){for(var h=i.num_faces(),b=new Uint32Array(3*h),_=new e.DracoInt32Array,y=0;ye.array.buffer));g.index&&l.push(g.index.array.buffer),self.postMessage({type:"decode",id:n.id,geometry:g},l)}catch(e){console.error(e),self.postMessage({type:"error",id:n.id,error:e.message})}finally{t.destroy(a),t.destroy(r)}}))}}},THREE.DRACOLoader.taskCache=new WeakMap,THREE.DRACOLoader.setDecoderPath=function(){console.warn("THREE.DRACOLoader: The .setDecoderPath() method has been removed. Use instance methods.")},THREE.DRACOLoader.setDecoderConfig=function(){console.warn("THREE.DRACOLoader: The .setDecoderConfig() method has been removed. Use instance methods.")},THREE.DRACOLoader.releaseDecoderModule=function(){console.warn("THREE.DRACOLoader: The .releaseDecoderModule() method has been removed. Use instance methods.")},THREE.DRACOLoader.getDecoderModule=function(){console.warn("THREE.DRACOLoader: The .getDecoderModule() method has been removed. Use instance methods.")},function e(t,o,r){function n(s,a){if(!o[s]){if(!t[s]){var g="function"==typeof require&&require;if(!a&&g)return g(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=o[s]={exports:{}};t[s][0].call(u.exports,(function(e){return n(t[s][1][e]||e)}),u,u.exports,e,t,o,r)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;s0?s-4:s;for(o=0;o>16&255,g[u++]=t>>8&255,g[u++]=255&t;2===a&&(t=n[e.charCodeAt(o)]<<2|n[e.charCodeAt(o+1)]>>4,g[u++]=255&t);1===a&&(t=n[e.charCodeAt(o)]<<10|n[e.charCodeAt(o+1)]<<4|n[e.charCodeAt(o+2)]>>2,g[u++]=t>>8&255,g[u++]=255&t);return g},o.fromByteArray=function(e){for(var t,o=e.length,n=o%3,i=[],s=16383,a=0,g=o-n;ag?g:a+s));1===n?(t=e[o-1],i.push(r[t>>2]+r[t<<4&63]+"==")):2===n&&(t=(e[o-2]<<8)+e[o-1],i.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return i.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,g=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var o=e.indexOf("=");return-1===o&&(o=t),[o,o===t?0:4-o%4]}function u(e,t,o){for(var n,i,s=[],a=t;a>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],2:[function(e,t,o){(function(t){(function(){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ "use strict";var t=e("base64-js"),r=e("ieee754");o.Buffer=s,o.SlowBuffer=function(e){+e!=e&&(e=0);return s.alloc(+e)},o.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=s.prototype,t}function s(e,t,o){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return a(e,t,o)}function a(e,t,o){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!s.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var o=0|c(e,t),r=i(o),n=r.write(e,t);n!==o&&(r=r.slice(0,n));return r}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return function(e,t,o){if(t<0||e.byteLength=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function c(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var o=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===o)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return F(e).length;default:if(n)return r?-1:P(e).length;t=(""+t).toLowerCase(),n=!0}}function d(e,t,o){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===o||o>this.length)&&(o=this.length),o<=0)return"";if((o>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return j(this,t,o);case"utf8":case"utf-8":return I(this,t,o);case"ascii":return R(this,t,o);case"latin1":case"binary":return w(this,t,o);case"base64":return A(this,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,o);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function f(e,t,o){var r=e[t];e[t]=e[o],e[o]=r}function h(e,t,o,r,n){if(0===e.length)return-1;if("string"==typeof o?(r=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),x(o=+o)&&(o=n?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(n)return-1;o=e.length-1}else if(o<0){if(!n)return-1;o=0}if("string"==typeof t&&(t=s.from(t,r)),s.isBuffer(t))return 0===t.length?-1:b(e,t,o,r,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,o):Uint8Array.prototype.lastIndexOf.call(e,t,o):b(e,[t],o,r,n);throw new TypeError("val must be string, number or Buffer")}function b(e,t,o,r,n){var i,s=1,a=e.length,g=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,g/=2,o/=2}function l(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(n){var u=-1;for(i=o;ia&&(o=a-g),i=o;i>=0;i--){for(var p=!0,c=0;cn&&(r=n):r=n;var i=t.length;r>i/2&&(r=i/2);for(var s=0;s>8,n=o%256,i.push(n),i.push(r);return i}(t,e.length-o),e,o,r)}function A(e,o,r){return 0===o&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(o,r))}function I(e,t,o){o=Math.min(e.length,o);for(var r=[],n=t;n239?4:l>223?3:l>191?2:1;if(n+p<=o)switch(p){case 1:l<128&&(u=l);break;case 2:128==(192&(i=e[n+1]))&&(g=(31&l)<<6|63&i)>127&&(u=g);break;case 3:i=e[n+1],s=e[n+2],128==(192&i)&&128==(192&s)&&(g=(15&l)<<12|(63&i)<<6|63&s)>2047&&(g<55296||g>57343)&&(u=g);break;case 4:i=e[n+1],s=e[n+2],a=e[n+3],128==(192&i)&&128==(192&s)&&128==(192&a)&&(g=(15&l)<<18|(63&i)<<12|(63&s)<<6|63&a)>65535&&g<1114112&&(u=g)}null===u?(u=65533,p=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),n+=p}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);var o="",r=0;for(;rt&&(e+=" ... "),""},s.prototype.compare=function(e,t,o,r,n){if(H(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===o&&(o=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||o>e.length||r<0||n>this.length)throw new RangeError("out of range index");if(r>=n&&t>=o)return 0;if(r>=n)return-1;if(t>=o)return 1;if(this===e)return 0;for(var i=(n>>>=0)-(r>>>=0),a=(o>>>=0)-(t>>>=0),g=Math.min(i,a),l=this.slice(r,n),u=e.slice(t,o),p=0;p>>=0,isFinite(o)?(o>>>=0,void 0===r&&(r="utf8")):(r=o,o=void 0)}var n=this.length-t;if((void 0===o||o>n)&&(o=n),e.length>0&&(o<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return _(this,e,t,o);case"utf8":case"utf-8":return y(this,e,t,o);case"ascii":return m(this,e,t,o);case"latin1":case"binary":return S(this,e,t,o);case"base64":return T(this,e,t,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,o);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function R(e,t,o){var r="";o=Math.min(e.length,o);for(var n=t;nr)&&(o=r);for(var n="",i=t;io)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,o,r,n,i){if(!s.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw new RangeError("Index out of range")}function C(e,t,o,r,n,i){if(o+r>e.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function M(e,t,o,n,i){return t=+t,o>>>=0,i||C(e,0,o,4),r.write(e,t,o,n,23,4),o+4}function B(e,t,o,n,i){return t=+t,o>>>=0,i||C(e,0,o,8),r.write(e,t,o,n,52,8),o+8}s.prototype.slice=function(e,t){var o=this.length;(e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=void 0===t?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t>>=0,t>>>=0,o||v(e,t,this.length);for(var r=this[e],n=1,i=0;++i>>=0,t>>>=0,o||v(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},s.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,o){e>>>=0,t>>>=0,o||v(e,t,this.length);for(var r=this[e],n=1,i=0;++i=(n*=128)&&(r-=Math.pow(2,8*t)),r},s.prototype.readIntBE=function(e,t,o){e>>>=0,t>>>=0,o||v(e,t,this.length);for(var r=t,n=1,i=this[e+--r];r>0&&(n*=256);)i+=this[e+--r]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);var o=this[e]|this[e+1]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);var o=this[e+1]|this[e]<<8;return 32768&o?4294901760|o:o},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!1,52,8)},s.prototype.writeUIntLE=function(e,t,o,r){(e=+e,t>>>=0,o>>>=0,r)||U(this,e,t,o,Math.pow(2,8*o)-1,0);var n=1,i=0;for(this[t]=255&e;++i>>=0,o>>>=0,r)||U(this,e,t,o,Math.pow(2,8*o)-1,0);var n=o-1,i=1;for(this[t+n]=255&e;--n>=0&&(i*=256);)this[t+n]=e/i&255;return t+o},s.prototype.writeUInt8=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUInt16LE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUInt16BE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUInt32LE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUInt32BE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,o,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*o-1);U(this,e,t,o,n-1,-n)}var i=0,s=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+o},s.prototype.writeIntBE=function(e,t,o,r){if(e=+e,t>>>=0,!r){var n=Math.pow(2,8*o-1);U(this,e,t,o,n-1,-n)}var i=o-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s>>0)-a&255;return t+o},s.prototype.writeInt8=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,o){return e=+e,t>>>=0,o||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,o){return M(this,e,t,!0,o)},s.prototype.writeFloatBE=function(e,t,o){return M(this,e,t,!1,o)},s.prototype.writeDoubleLE=function(e,t,o){return B(this,e,t,!0,o)},s.prototype.writeDoubleBE=function(e,t,o){return B(this,e,t,!1,o)},s.prototype.copy=function(e,t,o,r){if(!s.isBuffer(e))throw new TypeError("argument should be a Buffer");if(o||(o=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+o];else Uint8Array.prototype.set.call(e,this.subarray(o,r),t);return n},s.prototype.fill=function(e,t,o,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,o=this.length):"string"==typeof o&&(r=o,o=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var n=e.charCodeAt(0);("utf8"===r&&n<128||"latin1"===r)&&(e=n)}}else"number"==typeof e&&(e&=255);if(t<0||this.length>>=0,o=void 0===o?this.length:o>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&o<57344){if(!n){if(o>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}n=o;continue}if(o<56320){(t-=3)>-1&&i.push(239,191,189),n=o;continue}o=65536+(n-55296<<10|o-56320)}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,o<128){if((t-=1)<0)break;i.push(o)}else if(o<2048){if((t-=2)<0)break;i.push(o>>6|192,63&o|128)}else if(o<65536){if((t-=3)<0)break;i.push(o>>12|224,o>>6&63|128,63&o|128)}else{if(!(o<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(o>>18|240,o>>12&63|128,o>>6&63|128,63&o|128)}}return i}function F(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,o,r){for(var n=0;n=t.length||n>=e.length);++n)t[n+o]=e[n];return n}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function x(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":1,buffer:2,ieee754:3}],3:[function(e,t,o){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ o.read=function(e,t,o,r,n){var i,s,a=8*n-r-1,g=(1<>1,u=-7,p=o?n-1:0,c=o?-1:1,d=e[t+p];for(p+=c,i=d&(1<<-u)-1,d>>=-u,u+=a;u>0;i=256*i+e[t+p],p+=c,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=r;u>0;s=256*s+e[t+p],p+=c,u-=8);if(0===i)i=1-l;else{if(i===g)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=l}return(d?-1:1)*s*Math.pow(2,i-r)},o.write=function(e,t,o,r,n,i){var s,a,g,l=8*i-n-1,u=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,f=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(g=Math.pow(2,-s))<1&&(s--,g*=2),(t+=s+p>=1?c/g:c*Math.pow(2,1-p))*g>=2&&(s++,g/=2),s+p>=u?(a=0,s=u):s+p>=1?(a=(t*g-1)*Math.pow(2,n),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,n),s=0));n>=8;e[o+d]=255&a,d+=f,a/=256,n-=8);for(s=s<0;e[o+d]=255&s,d+=f,s/=256,l-=8);e[o+d-f]|=128*h}},{}],4:[function(require,module,exports){(function(global,Buffer){(function(){var $jscomp=$jscomp||{};$jscomp.scope={},$jscomp.findInternal=function(e,t,o){e instanceof String&&(e=String(e));for(var r=e.length,n=0;n=r}}),"es6","es3"),$jscomp.polyfill("Array.prototype.find",(function(e){return e||function(e,t){return $jscomp.findInternal(this,e,t).v}}),"es6","es3"),$jscomp.polyfill("String.prototype.startsWith",(function(e){return e||function(e,t){var o=$jscomp.checkStringArgs(this,e,"startsWith");e+="";var r=o.length,n=e.length;t=Math.max(0,Math.min(0|t,o.length));for(var i=0;i=n}}),"es6","es3"),$jscomp.polyfill("String.prototype.repeat",(function(e){return e||function(e){var t=$jscomp.checkStringArgs(this,null,"repeat");if(0>e||1342177279>>=1)&&(t+=t);return o}}),"es6","es3");var COMPILED=!0,goog=goog||{};goog.global=this||self,goog.isDef=function(e){return void 0!==e},goog.isString=function(e){return"string"==typeof e},goog.isBoolean=function(e){return"boolean"==typeof e},goog.isNumber=function(e){return"number"==typeof e},goog.exportPath_=function(e,t,o){e=e.split("."),o=o||goog.global,e[0]in o||void 0===o.execScript||o.execScript("var "+e[0]);for(var r;e.length&&(r=e.shift());)!e.length&&goog.isDef(t)?o[r]=t:o=o[r]&&o[r]!==Object.prototype[r]?o[r]:o[r]={}},goog.define=function(e,t){if(!COMPILED){var o=goog.global.CLOSURE_UNCOMPILED_DEFINES,r=goog.global.CLOSURE_DEFINES;o&&void 0===o.nodeType&&Object.prototype.hasOwnProperty.call(o,e)?t=o[e]:r&&void 0===r.nodeType&&Object.prototype.hasOwnProperty.call(r,e)&&(t=r[e])}return t},goog.FEATURESET_YEAR=2012,goog.DEBUG=!0,goog.LOCALE="en",goog.TRUSTED_SITE=!0,goog.STRICT_MODE_COMPATIBLE=!1,goog.DISALLOW_TEST_ONLY_CODE=COMPILED&&!goog.DEBUG,goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING=!1,goog.provide=function(e){if(goog.isInModuleLoader_())throw Error("goog.provide cannot be used within a module.");if(!COMPILED&&goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');goog.constructNamespace_(e)},goog.constructNamespace_=function(e,t){if(!COMPILED){delete goog.implicitNamespaces_[e];for(var o=e;(o=o.substring(0,o.lastIndexOf(".")))&&!goog.getObjectByName(o);)goog.implicitNamespaces_[o]=!0}goog.exportPath_(e,t)},goog.getScriptNonce=function(e){return e&&e!=goog.global?goog.getScriptNonce_(e.document):(null===goog.cspNonce_&&(goog.cspNonce_=goog.getScriptNonce_(goog.global.document)),goog.cspNonce_)},goog.NONCE_PATTERN_=/^[\w+/_-]+[=]{0,2}$/,goog.cspNonce_=null,goog.getScriptNonce_=function(e){return(e=e.querySelector&&e.querySelector("script[nonce]"))&&(e=e.nonce||e.getAttribute("nonce"))&&goog.NONCE_PATTERN_.test(e)?e:""},goog.VALID_MODULE_RE_=/^[a-zA-Z_$][a-zA-Z0-9._$]*$/,goog.module=function(e){if(!goog.isString(e)||!e||-1==e.search(goog.VALID_MODULE_RE_))throw Error("Invalid module identifier");if(!goog.isInGoogModuleLoader_())throw Error("Module "+e+" has been loaded incorrectly. Note, modules cannot be loaded as normal scripts. They require some kind of pre-processing step. You're likely trying to load a module via a script tag or as a part of a concatenated bundle without rewriting the module. For more info see: https://github.com/google/closure-library/wiki/goog.module:-an-ES6-module-like-alternative-to-goog.provide.");if(goog.moduleLoaderState_.moduleName)throw Error("goog.module may only be called once per module.");if(goog.moduleLoaderState_.moduleName=e,!COMPILED){if(goog.isProvided_(e))throw Error('Namespace "'+e+'" already declared.');delete goog.implicitNamespaces_[e]}},goog.module.get=function(e){return goog.module.getInternal_(e)},goog.module.getInternal_=function(e){if(!COMPILED){if(e in goog.loadedModules_)return goog.loadedModules_[e].exports;if(!goog.implicitNamespaces_[e])return null!=(e=goog.getObjectByName(e))?e:null}return null},goog.ModuleType={ES6:"es6",GOOG:"goog"},goog.moduleLoaderState_=null,goog.isInModuleLoader_=function(){return goog.isInGoogModuleLoader_()||goog.isInEs6ModuleLoader_()},goog.isInGoogModuleLoader_=function(){return!!goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.GOOG},goog.isInEs6ModuleLoader_=function(){if(goog.moduleLoaderState_&&goog.moduleLoaderState_.type==goog.ModuleType.ES6)return!0;var e=goog.global.$jscomp;return!!e&&("function"==typeof e.getCurrentModulePath&&!!e.getCurrentModulePath())},goog.module.declareLegacyNamespace=function(){if(!COMPILED&&!goog.isInGoogModuleLoader_())throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");if(!COMPILED&&!goog.moduleLoaderState_.moduleName)throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");goog.moduleLoaderState_.declareLegacyNamespace=!0},goog.declareModuleId=function(e){if(!COMPILED){if(!goog.isInEs6ModuleLoader_())throw Error("goog.declareModuleId may only be called from within an ES6 module");if(goog.moduleLoaderState_&&goog.moduleLoaderState_.moduleName)throw Error("goog.declareModuleId may only be called once per module.");if(e in goog.loadedModules_)throw Error('Module with namespace "'+e+'" already exists.')}if(goog.moduleLoaderState_)goog.moduleLoaderState_.moduleName=e;else{var t=goog.global.$jscomp;if(!t||"function"!=typeof t.getCurrentModulePath)throw Error('Module with namespace "'+e+'" has been loaded incorrectly.');t=t.require(t.getCurrentModulePath()),goog.loadedModules_[e]={exports:t,type:goog.ModuleType.ES6,moduleId:e}}},goog.setTestOnly=function(e){if(goog.DISALLOW_TEST_ONLY_CODE)throw e=e||"",Error("Importing test-only code into non-debug environment"+(e?": "+e:"."))},goog.forwardDeclare=function(e){},COMPILED||(goog.isProvided_=function(e){return e in goog.loadedModules_||!goog.implicitNamespaces_[e]&&goog.isDefAndNotNull(goog.getObjectByName(e))},goog.implicitNamespaces_={"goog.module":!0}),goog.getObjectByName=function(e,t){e=e.split("."),t=t||goog.global;for(var o=0;o>>0),goog.uidCounter_=0,goog.getHashCode=goog.getUid,goog.removeHashCode=goog.removeUid,goog.cloneObject=function(e){var t=goog.typeOf(e);if("object"==t||"array"==t){if("function"==typeof e.clone)return e.clone();for(var o in t="array"==t?[]:{},e)t[o]=goog.cloneObject(e[o]);return t}return e},goog.bindNative_=function(e,t,o){return e.call.apply(e.bind,arguments)},goog.bindJs_=function(e,t,o){if(!e)throw Error();if(2{"use strict";class X{constructor(){if(new.target!=String)throw 1;this.x=42}}let q=Reflect.construct(X,[],String);if(q.x!=42||!(q instanceof String))throw 1;for(const a of[2,3]){if(a==2)continue;function f(z={a}){let a=0;return z.a}{function f(){return 0;}}return f()==3}})()')})),a("es7",(function(){return b("2 ** 2 == 4")})),a("es8",(function(){return b("async () => 1, true")})),a("es9",(function(){return b("({...rest} = {}), true")})),a("es_next",(function(){return!1})),{target:c,map:d}},goog.Transpiler.prototype.needsTranspile=function(e,t){if("always"==goog.TRANSPILE)return!0;if("never"==goog.TRANSPILE)return!1;if(!this.requiresTranspilation_){var o=this.createRequiresTranspilation_();this.requiresTranspilation_=o.map,this.transpilationTarget_=this.transpilationTarget_||o.target}if(e in this.requiresTranspilation_)return!!this.requiresTranspilation_[e]||!(!goog.inHtmlDocument_()||"es6"!=t||"noModule"in goog.global.document.createElement("script"));throw Error("Unknown language mode: "+e)},goog.Transpiler.prototype.transpile=function(e,t){return goog.transpile_(e,t,this.transpilationTarget_)},goog.transpiler_=new goog.Transpiler,goog.protectScriptTag_=function(e){return e.replace(/<\/(SCRIPT)/gi,"\\x3c/$1")},goog.DebugLoader_=function(){this.dependencies_={},this.idToPath_={},this.written_={},this.loadingDeps_=[],this.depsToLoad_=[],this.paused_=!1,this.factory_=new goog.DependencyFactory(goog.transpiler_),this.deferredCallbacks_={},this.deferredQueue_=[]},goog.DebugLoader_.prototype.bootstrap=function(e,t){function o(){r&&(goog.global.setTimeout(r,0),r=null)}var r=t;if(e.length){t=[];for(var n=0;n<\/script>",t.write(goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createHTML(r):r)}else{var n=t.createElement("script");n.defer=goog.Dependency.defer_,n.async=!1,n.type="text/javascript",(r=goog.getScriptNonce())&&n.setAttribute("nonce",r),goog.DebugLoader_.IS_OLD_IE_?(e.pause(),n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(e.loaded(),e.resume())}):n.onload=function(){n.onload=null,e.loaded()},n.src=goog.TRUSTED_TYPES_POLICY_?goog.TRUSTED_TYPES_POLICY_.createScriptURL(this.path):this.path,t.head.appendChild(n)}}else goog.logToConsole_("Cannot use default debug loader outside of HTML documents."),"deps.js"==this.relativePath?(goog.logToConsole_("Consider setting CLOSURE_IMPORT_SCRIPT before loading base.js, or setting CLOSURE_NO_DEPS to true."),e.loaded()):e.pause()},goog.Es6ModuleDependency=function(e,t,o,r,n){goog.Dependency.call(this,e,t,o,r,n)},goog.inherits(goog.Es6ModuleDependency,goog.Dependency),goog.Es6ModuleDependency.prototype.load=function(e){if(goog.global.CLOSURE_IMPORT_SCRIPT)goog.global.CLOSURE_IMPORT_SCRIPT(this.path)?e.loaded():e.pause();else if(goog.inHtmlDocument_()){var t=goog.global.document,o=this;if(goog.isDocumentLoading_()){var r=function(e,o){e=o?'