chbim-plugins 0.0.91 → 0.0.93

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.
@@ -2570,7 +2570,7 @@ void main() {
2570
2570
  `},Bn={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]),s;for(s in n)e[s]=n[s]}return e},clone:function(t){var e={},i;for(i in t){e[i]={};for(var n in t[i]){var s=t[i][n];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture)?e[i][n]=s.clone():Array.isArray(s)?e[i][n]=s.slice():e[i][n]=s}}return e}},Qr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Object.assign(L.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this},setScalar:function(t){return this.b=this.g=this.r=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(e,i,n){return 0>n&&(n+=1),1<n&&--n,n<1/6?e+6*(i-e)*n:.5>n?i:n<2/3?e+6*(i-e)*(2/3-n):e}return function(e,i,n){return e=pi.euclideanModulo(e,1),i=pi.clamp(i,0,1),n=pi.clamp(n,0,1),i===0?this.r=this.g=this.b=n:(i=.5>=n?n*(1+i):n+i-n*i,n=2*n-i,this.r=t(n,i,e+1/3),this.g=t(n,i,e),this.b=t(n,i,e-1/3)),this}}(),setStyle:function(t){function e(f){f!==void 0&&1>parseFloat(f)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n=i[2];switch(i[1]){case"rgb":case"rgba":if(i=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(255,parseInt(i[1],10))/255,this.g=Math.min(255,parseInt(i[2],10))/255,this.b=Math.min(255,parseInt(i[3],10))/255,e(i[5]),this;if(i=/^(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n))return this.r=Math.min(100,parseInt(i[1],10))/100,this.g=Math.min(100,parseInt(i[2],10))/100,this.b=Math.min(100,parseInt(i[3],10))/100,e(i[5]),this;break;case"hsl":case"hsla":if(i=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(n)){n=parseFloat(i[1])/360;var s=parseInt(i[2],10)/100,l=parseInt(i[3],10)/100;return e(i[5]),this.setHSL(n,s,l)}}}else if(i=/^#([A-Fa-f0-9]+)$/.exec(t)){if(i=i[1],n=i.length,n===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(n===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&0<t.length&&(i=Qr[t],i!==void 0?this.setHex(i):console.warn("THREE.Color: Unknown color "+t)),this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return e===void 0&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){return e===void 0&&(e=2),e=0<e?1/e:1,this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},copySRGBToLinear:function(){function t(e){return .04045>e?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),copyLinearToSRGB:function(){function t(e){return .0031308>e?12.92*e:1.055*Math.pow(e,.41666)-.055}return function(e){return this.r=t(e.r),this.g=t(e.g),this.b=t(e.b),this}}(),convertSRGBToLinear:function(){return this.copySRGBToLinear(this),this},convertLinearToSRGB:function(){return this.copyLinearToSRGB(this),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){t===void 0&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e=this.r,i=this.g,n=this.b,s=Math.max(e,i,n),l=Math.min(e,i,n),f,p=(l+s)/2;if(l===s)l=f=0;else{var v=s-l;switch(l=.5>=p?v/(s+l):v/(2-s-l),s){case e:f=(i-n)/v+(i<n?6:0);break;case i:f=(n-e)/v+2;break;case n:f=(e-i)/v+4}f/=6}return t.h=f,t.s=l,t.l=p,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:function(){var t={};return function(e,i,n){return this.getHSL(t),t.h+=e,t.s+=i,t.l+=n,this.setHSL(t.h,t.s,t.l),this}}(),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},lerpHSL:function(){var t={h:0,s:0,l:0},e={h:0,s:0,l:0};return function(i,n){this.getHSL(t),i.getHSL(e),i=pi.lerp(t.h,e.h,n);var s=pi.lerp(t.s,e.s,n);return n=pi.lerp(t.l,e.l,n),this.setHSL(i,s,n),this}}(),equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return e===void 0&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var qe={common:{diffuse:{value:new L(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new m},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new o(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new L(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new L(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new m}},sprite:{diffuse:{value:new L(15658734)},opacity:{value:1},center:{value:new o(.5,.5)},rotation:{value:0},map:{value:null},uvTransform:{value:new m}}},xs={basic:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.fog]),vertexShader:bi.meshbasic_vert,fragmentShader:bi.meshbasic_frag},lambert:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.fog,qe.lights,{emissive:{value:new L(0)}}]),vertexShader:bi.meshlambert_vert,fragmentShader:bi.meshlambert_frag},phong:{uniforms:Bn.merge([qe.common,qe.specularmap,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.gradientmap,qe.fog,qe.lights,{emissive:{value:new L(0)},specular:{value:new L(1118481)},shininess:{value:30}}]),vertexShader:bi.meshphong_vert,fragmentShader:bi.meshphong_frag},standard:{uniforms:Bn.merge([qe.common,qe.envmap,qe.aomap,qe.lightmap,qe.emissivemap,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.roughnessmap,qe.metalnessmap,qe.fog,qe.lights,{emissive:{value:new L(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},matcap:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,qe.fog,{matcap:{value:null}}]),vertexShader:bi.meshmatcap_vert,fragmentShader:bi.meshmatcap_frag},points:{uniforms:Bn.merge([qe.points,qe.fog]),vertexShader:bi.points_vert,fragmentShader:bi.points_frag},dashed:{uniforms:Bn.merge([qe.common,qe.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bi.linedashed_vert,fragmentShader:bi.linedashed_frag},depth:{uniforms:Bn.merge([qe.common,qe.displacementmap]),vertexShader:bi.depth_vert,fragmentShader:bi.depth_frag},normal:{uniforms:Bn.merge([qe.common,qe.bumpmap,qe.normalmap,qe.displacementmap,{opacity:{value:1}}]),vertexShader:bi.normal_vert,fragmentShader:bi.normal_frag},sprite:{uniforms:Bn.merge([qe.sprite,qe.fog]),vertexShader:bi.sprite_vert,fragmentShader:bi.sprite_frag},background:{uniforms:{uvTransform:{value:new m},t2D:{value:null}},vertexShader:bi.background_vert,fragmentShader:bi.background_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:bi.cube_vert,fragmentShader:bi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bi.equirect_vert,fragmentShader:bi.equirect_frag},distanceRGBA:{uniforms:Bn.merge([qe.common,qe.displacementmap,{referencePosition:{value:new u},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bi.distanceRGBA_vert,fragmentShader:bi.distanceRGBA_frag},shadow:{uniforms:Bn.merge([qe.lights,qe.fog,{color:{value:new L(0)},opacity:{value:1}}]),vertexShader:bi.shadow_vert,fragmentShader:bi.shadow_frag}};xs.physical={uniforms:Bn.merge([xs.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},Object.assign(R.prototype,{clone:function(){return new this.constructor().copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}}),b.RotationOrders="XYZ YZX ZXY XZY YXZ ZYX".split(" "),b.DefaultOrder="XYZ",Object.defineProperties(b.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(b.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=pi.clamp,s=t.elements;t=s[0];var l=s[4],f=s[8],p=s[1],v=s[5],w=s[9],C=s[2],P=s[6];return s=s[10],e=e||this._order,e==="XYZ"?(this._y=Math.asin(n(f,-1,1)),.99999>Math.abs(f)?(this._x=Math.atan2(-w,s),this._z=Math.atan2(-l,t)):(this._x=Math.atan2(P,v),this._z=0)):e==="YXZ"?(this._x=Math.asin(-n(w,-1,1)),.99999>Math.abs(w)?(this._y=Math.atan2(f,s),this._z=Math.atan2(p,v)):(this._y=Math.atan2(-C,t),this._z=0)):e==="ZXY"?(this._x=Math.asin(n(P,-1,1)),.99999>Math.abs(P)?(this._y=Math.atan2(-C,s),this._z=Math.atan2(-l,v)):(this._y=0,this._z=Math.atan2(p,t))):e==="ZYX"?(this._y=Math.asin(-n(C,-1,1)),.99999>Math.abs(C)?(this._x=Math.atan2(P,s),this._z=Math.atan2(p,t)):(this._x=0,this._z=Math.atan2(-l,v))):e==="YZX"?(this._z=Math.asin(n(p,-1,1)),.99999>Math.abs(p)?(this._x=Math.atan2(-w,v),this._y=Math.atan2(-C,t)):(this._x=0,this._y=Math.atan2(f,s))):e==="XZY"?(this._z=Math.asin(-n(l,-1,1)),.99999>Math.abs(l)?(this._x=Math.atan2(P,v),this._y=Math.atan2(f,t)):(this._x=Math.atan2(-w,s),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,i!==!1&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new c;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:function(){var t=new d;return function(e){return t.setFromEuler(this),this.setFromQuaternion(t,e)}}(),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return t===void 0&&(t=[]),e===void 0&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new u(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(U.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask=this.mask|1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return(this.mask&t.mask)!==0}});var Vc=0;N.DefaultUp=new u(0,1,0),N.DefaultMatrixAutoUpdate=!0,N.prototype=Object.assign(Object.create(a.prototype),{constructor:N,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:function(){var t=new d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.multiply(t),this}}(),rotateOnWorldAxis:function(){var t=new d;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new u(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new u(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new u(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new u;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new u(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new u(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new u(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:function(){var t=new c;return function(e){return e.applyMatrix4(t.getInverse(this.matrixWorld))}}(),lookAt:function(){var t=new d,e=new c,i=new u,n=new u;return function(s,l,f){s.isVector3?i.copy(s):i.set(s,l,f),s=this.parent,this.updateWorldMatrix(!0,!1),n.setFromMatrixPosition(this.matrixWorld),this.isCamera?e.lookAt(n,i,this.up):e.lookAt(i,n,this.up),this.quaternion.setFromRotationMatrix(e),s&&(e.extractRotation(s.matrixWorld),t.setFromRotationMatrix(e),this.quaternion.premultiply(t.inverse()))}}(),add:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(1<arguments.length){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}return e=this.children.indexOf(t),e!==-1&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(e,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var s=this.children[i].getObjectByProperty(t,e);if(s!==void 0)return s}},getWorldPosition:function(t){return t===void 0&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new u),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:function(){var t=new u,e=new u;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),i=new d),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,i,e),i}}(),getWorldScale:function(){var t=new u,e=new d;return function(i){return i===void 0&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new u),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),t=new u),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()},raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(this.visible!==!1){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},updateWorldMatrix:function(t,e){var i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),e===!0)for(t=this.children,e=0,i=t.length;e<i;e++)t[e].updateWorldMatrix(!1,!0)},toJSON:function(t){function e(C,P){return C[P.uuid]===void 0&&(C[P.uuid]=P.toJSON(t)),P.uuid}function i(C){var P=[],B;for(B in C){var H=C[B];delete H.metadata,P.push(H)}return P}var n=t===void 0||typeof t=="string",s={};n&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},s.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var l={};if(l.uuid=this.uuid,l.type=this.type,this.name!==""&&(l.name=this.name),this.castShadow===!0&&(l.castShadow=!0),this.receiveShadow===!0&&(l.receiveShadow=!0),this.visible===!1&&(l.visible=!1),this.frustumCulled===!1&&(l.frustumCulled=!1),this.renderOrder!==0&&(l.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(l.userData=this.userData),l.layers=this.layers.mask,l.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(l.matrixAutoUpdate=!1),this.isMesh||this.isLine||this.isPoints){l.geometry=e(t.geometries,this.geometry);var f=this.geometry.parameters;if(f!==void 0&&f.shapes!==void 0)if(f=f.shapes,Array.isArray(f))for(var p=0,v=f.length;p<v;p++)e(t.shapes,f[p]);else e(t.shapes,f)}if(this.material!==void 0)if(Array.isArray(this.material)){for(f=[],p=0,v=this.material.length;p<v;p++)f.push(e(t.materials,this.material[p]));l.material=f}else l.material=e(t.materials,this.material);if(0<this.children.length)for(l.children=[],p=0;p<this.children.length;p++)l.children.push(this.children[p].toJSON(t).object);if(n){n=i(t.geometries),p=i(t.materials),v=i(t.textures);var w=i(t.images);f=i(t.shapes),0<n.length&&(s.geometries=n),0<p.length&&(s.materials=p),0<v.length&&(s.textures=v),0<w.length&&(s.images=w),0<f.length&&(s.shapes=f)}return s.object=l,s},clone:function(t){return new this.constructor().copy(this,t)},copy:function(t,e){if(e===void 0&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(e=0;e<t.children.length;e++)this.add(t.children[e].clone());return this}});var Wc=0;j.prototype=Object.assign(Object.create(a.prototype),{constructor:j,isGeometry:!0,applyMatrix:function(t){for(var e=new m().getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++)this.vertices[i].applyMatrix4(t);for(i=0,n=this.faces.length;i<n;i++){t=this.faces[i],t.normal.applyMatrix3(e).normalize();for(var s=0,l=t.vertexNormals.length;s<l;s++)t.vertexNormals[s].applyMatrix3(e).normalize()}return this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this.normalsNeedUpdate=this.verticesNeedUpdate=!0,this},rotateX:function(){var t=new c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),fromBufferGeometry:function(t){function e(q,K,rt,xt){var gt=p===void 0?[]:[i.colors[q].clone(),i.colors[K].clone(),i.colors[rt].clone()],At=f===void 0?[]:[new u().fromArray(f,3*q),new u().fromArray(f,3*K),new u().fromArray(f,3*rt)];xt=new R(q,K,rt,At,gt,xt),i.faces.push(xt),v!==void 0&&i.faceVertexUvs[0].push([new o().fromArray(v,2*q),new o().fromArray(v,2*K),new o().fromArray(v,2*rt)]),w!==void 0&&i.faceVertexUvs[1].push([new o().fromArray(w,2*q),new o().fromArray(w,2*K),new o().fromArray(w,2*rt)])}var i=this,n=t.index!==null?t.index.array:void 0,s=t.attributes,l=s.position.array,f=s.normal!==void 0?s.normal.array:void 0,p=s.color!==void 0?s.color.array:void 0,v=s.uv!==void 0?s.uv.array:void 0,w=s.uv2!==void 0?s.uv2.array:void 0;w!==void 0&&(this.faceVertexUvs[1]=[]);for(var C=s=0;s<l.length;s+=3,C+=2)i.vertices.push(new u().fromArray(l,s)),p!==void 0&&i.colors.push(new L().fromArray(p,s));var P=t.groups;if(0<P.length)for(s=0;s<P.length;s++){l=P[s];var B=l.start,H=l.count;for(C=B,B+=H;C<B;C+=3)n!==void 0?e(n[C],n[C+1],n[C+2],l.materialIndex):e(C,C+1,C+2,l.materialIndex)}else if(n!==void 0)for(s=0;s<n.length;s+=3)e(n[s],n[s+1],n[s+2]);else for(s=0;s<l.length/3;s+=3)e(s,s+1,s+2);return this.computeFaceNormals(),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this},center:function(){var t=new u;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius;e=e===0?1:1/e;var i=new c;return i.set(e,0,0,-e*t.x,0,e,0,-e*t.y,0,0,e,-e*t.z,0,0,0,1),this.applyMatrix(i),this},computeFaceNormals:function(){for(var t=new u,e=new u,i=0,n=this.faces.length;i<n;i++){var s=this.faces[i],l=this.vertices[s.a],f=this.vertices[s.b];t.subVectors(this.vertices[s.c],f),e.subVectors(l,f),t.cross(e),t.normalize(),s.normal.copy(t)}},computeVertexNormals:function(t){t===void 0&&(t=!0);var e,i=Array(this.vertices.length),n=0;for(e=this.vertices.length;n<e;n++)i[n]=new u;if(t){var s=new u,l=new u;for(t=0,n=this.faces.length;t<n;t++){e=this.faces[t];var f=this.vertices[e.a],p=this.vertices[e.b],v=this.vertices[e.c];s.subVectors(v,p),l.subVectors(f,p),s.cross(l),i[e.a].add(s),i[e.b].add(s),i[e.c].add(s)}}else for(this.computeFaceNormals(),t=0,n=this.faces.length;t<n;t++)e=this.faces[t],i[e.a].add(e.normal),i[e.b].add(e.normal),i[e.c].add(e.normal);for(n=0,e=this.vertices.length;n<e;n++)i[n].normalize();for(t=0,n=this.faces.length;t<n;t++)e=this.faces[t],f=e.vertexNormals,f.length===3?(f[0].copy(i[e.a]),f[1].copy(i[e.b]),f[2].copy(i[e.c])):(f[0]=i[e.a].clone(),f[1]=i[e.b].clone(),f[2]=i[e.c].clone());0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t;this.computeFaceNormals();var e=0;for(t=this.faces.length;e<t;e++){var i=this.faces[e],n=i.vertexNormals;n.length===3?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}0<this.faces.length&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i=0;for(e=this.faces.length;i<e;i++){var n=this.faces[i];n.__originalFaceNormal?n.__originalFaceNormal.copy(n.normal):n.__originalFaceNormal=n.normal.clone(),n.__originalVertexNormals||(n.__originalVertexNormals=[]);var s=0;for(t=n.vertexNormals.length;s<t;s++)n.__originalVertexNormals[s]?n.__originalVertexNormals[s].copy(n.vertexNormals[s]):n.__originalVertexNormals[s]=n.vertexNormals[s].clone()}var l=new j;for(l.faces=this.faces,s=0,t=this.morphTargets.length;s<t;s++){if(!this.morphNormals[s]){this.morphNormals[s]={},this.morphNormals[s].faceNormals=[],this.morphNormals[s].vertexNormals=[],n=this.morphNormals[s].faceNormals;var f=this.morphNormals[s].vertexNormals;for(i=0,e=this.faces.length;i<e;i++){var p=new u,v={a:new u,b:new u,c:new u};n.push(p),f.push(v)}}for(f=this.morphNormals[s],l.vertices=this.morphTargets[s].vertices,l.computeFaceNormals(),l.computeVertexNormals(),i=0,e=this.faces.length;i<e;i++)n=this.faces[i],p=f.faceNormals[i],v=f.vertexNormals[i],p.copy(n.normal),v.a.copy(n.vertexNormals[0]),v.b.copy(n.vertexNormals[1]),v.c.copy(n.vertexNormals[2])}for(i=0,e=this.faces.length;i<e;i++)n=this.faces[i],n.normal=n.__originalFaceNormal,n.vertexNormals=n.__originalVertexNormals},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new k),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){this.boundingSphere===null&&(this.boundingSphere=new D),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,s=this.vertices.length,l=this.vertices,f=t.vertices,p=this.faces,v=t.faces,w=this.faceVertexUvs[0],C=t.faceVertexUvs[0],P=this.colors,B=t.colors;i===void 0&&(i=0),e!==void 0&&(n=new m().getNormalMatrix(e)),t=0;for(var H=f.length;t<H;t++){var q=f[t].clone();e!==void 0&&q.applyMatrix4(e),l.push(q)}for(t=0,H=B.length;t<H;t++)P.push(B[t].clone());for(t=0,H=v.length;t<H;t++){f=v[t];var K=f.vertexNormals;for(B=f.vertexColors,P=new R(f.a+s,f.b+s,f.c+s),P.normal.copy(f.normal),n!==void 0&&P.normal.applyMatrix3(n).normalize(),e=0,l=K.length;e<l;e++)q=K[e].clone(),n!==void 0&&q.applyMatrix3(n).normalize(),P.vertexNormals.push(q);for(P.color.copy(f.color),e=0,l=B.length;e<l;e++)q=B[e],P.vertexColors.push(q.clone());P.materialIndex=f.materialIndex+i,p.push(P)}for(t=0,H=C.length;t<H;t++)if(i=C[t],n=[],i!==void 0){for(e=0,l=i.length;e<l;e++)n.push(i[e].clone());w.push(n)}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t={},e=[],i=[],n=Math.pow(10,4),s,l=0;for(s=this.vertices.length;l<s;l++){var f=this.vertices[l];f=Math.round(f.x*n)+"_"+Math.round(f.y*n)+"_"+Math.round(f.z*n),t[f]===void 0?(t[f]=l,e.push(this.vertices[l]),i[l]=e.length-1):i[l]=i[t[f]]}for(t=[],l=0,s=this.faces.length;l<s;l++)for(n=this.faces[l],n.a=i[n.a],n.b=i[n.b],n.c=i[n.c],n=[n.a,n.b,n.c],f=0;3>f;f++)if(n[f]===n[(f+1)%3]){t.push(l);break}for(l=t.length-1;0<=l;l--)for(n=t[l],this.faces.splice(n,1),i=0,s=this.faceVertexUvs.length;i<s;i++)this.faceVertexUvs[i].splice(n,1);return l=this.vertices.length-e.length,this.vertices=e,l},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new u(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort(function(v,w){return v.materialIndex-w.materialIndex});var n=this.faceVertexUvs[0],s=this.faceVertexUvs[1],l,f;for(n&&n.length===e&&(l=[]),s&&s.length===e&&(f=[]),i=0;i<e;i++){var p=t[i]._id;l&&l.push(n[p]),f&&f.push(s[p])}l&&(this.faceVertexUvs[0]=l),f&&(this.faceVertexUvs[1]=f)},toJSON:function(){function t(Vt,Z,st){return st?Vt|1<<Z:Vt&~(1<<Z)}function e(Vt){var Z=Vt.x.toString()+Vt.y.toString()+Vt.z.toString();return w[Z]!==void 0||(w[Z]=v.length/3,v.push(Vt.x,Vt.y,Vt.z)),w[Z]}function i(Vt){var Z=Vt.r.toString()+Vt.g.toString()+Vt.b.toString();return P[Z]!==void 0||(P[Z]=C.length,C.push(Vt.getHex())),P[Z]}function n(Vt){var Z=Vt.x.toString()+Vt.y.toString();return H[Z]!==void 0||(H[Z]=B.length/2,B.push(Vt.x,Vt.y)),H[Z]}var s={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.parameters!==void 0){var l=this.parameters,f;for(f in l)l[f]!==void 0&&(s[f]=l[f]);return s}for(l=[],f=0;f<this.vertices.length;f++){var p=this.vertices[f];l.push(p.x,p.y,p.z)}p=[];var v=[],w={},C=[],P={},B=[],H={};for(f=0;f<this.faces.length;f++){var q=this.faces[f],K=this.faceVertexUvs[0][f]!==void 0,rt=0<q.normal.length(),xt=0<q.vertexNormals.length,gt=q.color.r!==1||q.color.g!==1||q.color.b!==1,At=0<q.vertexColors.length,wt=0;wt=t(wt,0,0),wt=t(wt,1,!0),wt=t(wt,2,!1),wt=t(wt,3,K),wt=t(wt,4,rt),wt=t(wt,5,xt),wt=t(wt,6,gt),wt=t(wt,7,At),p.push(wt),p.push(q.a,q.b,q.c),p.push(q.materialIndex),K&&(K=this.faceVertexUvs[0][f],p.push(n(K[0]),n(K[1]),n(K[2]))),rt&&p.push(e(q.normal)),xt&&(rt=q.vertexNormals,p.push(e(rt[0]),e(rt[1]),e(rt[2]))),gt&&p.push(i(q.color)),At&&(q=q.vertexColors,p.push(i(q[0]),i(q[1]),i(q[2])))}return s.data={},s.data.vertices=l,s.data.normals=v,0<C.length&&(s.data.colors=C),0<B.length&&(s.data.uvs=[B]),s.data.faces=p,s},clone:function(){return new j().copy(this)},copy:function(t){var e,i,n;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var s=t.vertices,l=0;for(e=s.length;l<e;l++)this.vertices.push(s[l].clone());for(s=t.colors,l=0,e=s.length;l<e;l++)this.colors.push(s[l].clone());for(s=t.faces,l=0,e=s.length;l<e;l++)this.faces.push(s[l].clone());for(l=0,e=t.faceVertexUvs.length;l<e;l++){var f=t.faceVertexUvs[l];for(this.faceVertexUvs[l]===void 0&&(this.faceVertexUvs[l]=[]),s=0,i=f.length;s<i;s++){var p=f[s],v=[],w=0;for(n=p.length;w<n;w++)v.push(p[w].clone());this.faceVertexUvs[l].push(v)}}for(w=t.morphTargets,l=0,e=w.length;l<e;l++){if(n={},n.name=w[l].name,w[l].vertices!==void 0)for(n.vertices=[],s=0,i=w[l].vertices.length;s<i;s++)n.vertices.push(w[l].vertices[s].clone());if(w[l].normals!==void 0)for(n.normals=[],s=0,i=w[l].normals.length;s<i;s++)n.normals.push(w[l].normals[s].clone());this.morphTargets.push(n)}for(w=t.morphNormals,l=0,e=w.length;l<e;l++){if(n={},w[l].vertexNormals!==void 0)for(n.vertexNormals=[],s=0,i=w[l].vertexNormals.length;s<i;s++)f=w[l].vertexNormals[s],p={},p.a=f.a.clone(),p.b=f.b.clone(),p.c=f.c.clone(),n.vertexNormals.push(p);if(w[l].faceNormals!==void 0)for(n.faceNormals=[],s=0,i=w[l].faceNormals.length;s<i;s++)n.faceNormals.push(w[l].faceNormals[s].clone());this.morphNormals.push(n)}for(s=t.skinWeights,l=0,e=s.length;l<e;l++)this.skinWeights.push(s[l].clone());for(s=t.skinIndices,l=0,e=s.length;l<e;l++)this.skinIndices.push(s[l].clone());for(s=t.lineDistances,l=0,e=s.length;l<e;l++)this.lineDistances.push(s[l]);return l=t.boundingBox,l!==null&&(this.boundingBox=l.clone()),l=t.boundingSphere,l!==null&&(this.boundingSphere=l.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(J.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(J.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,s=this.itemSize;n<s;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,s=t.length;n<s;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),l=new L),e[i++]=l.r,e[i++]=l.g,e[i++]=l.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,s=t.length;n<s;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),l=new o),e[i++]=l.x,e[i++]=l.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,s=t.length;n<s;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),l=new u),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,s=t.length;n<s;n++){var l=t[n];l===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),l=new y),e[i++]=l.x,e[i++]=l.y,e[i++]=l.z,e[i++]=l.w}return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,s){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=s,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),$.prototype=Object.create(J.prototype),$.prototype.constructor=$,ct.prototype=Object.create(J.prototype),ct.prototype.constructor=ct,It.prototype=Object.create(J.prototype),It.prototype.constructor=It,et.prototype=Object.create(J.prototype),et.prototype.constructor=et,yt.prototype=Object.create(J.prototype),yt.prototype.constructor=yt,G.prototype=Object.create(J.prototype),G.prototype.constructor=G,Pt.prototype=Object.create(J.prototype),Pt.prototype.constructor=Pt,Et.prototype=Object.create(J.prototype),Et.prototype.constructor=Et,Ct.prototype=Object.create(J.prototype),Ct.prototype.constructor=Ct,Object.assign(fe.prototype,{computeGroups:function(t){var e=[],i=void 0;t=t.faces;for(var n=0;n<t.length;n++){var s=t[n];if(s.materialIndex!==i){i=s.materialIndex,l!==void 0&&(l.count=3*n-l.start,e.push(l));var l={start:3*n,materialIndex:i}}}l!==void 0&&(l.count=3*n-l.start,e.push(l)),this.groups=e},fromGeometry:function(t){var e=t.faces,i=t.vertices,n=t.faceVertexUvs,s=n[0]&&0<n[0].length,l=n[1]&&0<n[1].length,f=t.morphTargets,p=f.length;if(0<p){for(var v=[],w=0;w<p;w++)v[w]={name:f[w].name,data:[]};this.morphTargets.position=v}var C=t.morphNormals,P=C.length;if(0<P){var B=[];for(w=0;w<P;w++)B[w]={name:C[w].name,data:[]};this.morphTargets.normal=B}var H=t.skinIndices,q=t.skinWeights,K=H.length===i.length,rt=q.length===i.length;for(0<i.length&&e.length===0&&console.error("THREE.DirectGeometry: Faceless geometries are not supported."),w=0;w<e.length;w++){var xt=e[w];this.vertices.push(i[xt.a],i[xt.b],i[xt.c]);var gt=xt.vertexNormals;for(gt.length===3?this.normals.push(gt[0],gt[1],gt[2]):(gt=xt.normal,this.normals.push(gt,gt,gt)),gt=xt.vertexColors,gt.length===3?this.colors.push(gt[0],gt[1],gt[2]):(gt=xt.color,this.colors.push(gt,gt,gt)),s===!0&&(gt=n[0][w],gt!==void 0?this.uvs.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",w),this.uvs.push(new o,new o,new o))),l===!0&&(gt=n[1][w],gt!==void 0?this.uvs2.push(gt[0],gt[1],gt[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",w),this.uvs2.push(new o,new o,new o))),gt=0;gt<p;gt++){var At=f[gt].vertices;v[gt].data.push(At[xt.a],At[xt.b],At[xt.c])}for(gt=0;gt<P;gt++)At=C[gt].vertexNormals[w],B[gt].data.push(At.a,At.b,At.c);K&&this.skinIndices.push(H[xt.a],H[xt.b],H[xt.c]),rt&&this.skinWeights.push(q[xt.a],q[xt.b],q[xt.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var jc=1;Ft.prototype=Object.assign(Object.create(a.prototype),{constructor:Ft,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(65535<re(t)?Pt:yt)(t,1):this.index=t},addAttribute:function(t,e,i){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?t==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new J(e,i)))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:i!==void 0?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;return e!==void 0&&(t.applyToBufferAttribute(e),e.needsUpdate=!0),e=this.attributes.normal,e!==void 0&&(new m().getNormalMatrix(t).applyToBufferAttribute(e),e.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this},rotateX:function(){var t=new c;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new c;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new c;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new c;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new c;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new N;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new u;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){t=new Et(3*e.vertices.length,3);var i=new Et(3*e.colors.length,3);this.addAttribute("position",t.copyVector3sArray(e.vertices)),this.addAttribute("color",i.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length&&(t=new Et(e.lineDistances.length,1),this.addAttribute("lineDistance",t.copyArray(e.lineDistances))),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var s=t[i];e.push(s.x,s.y,s.z||0)}return this.addAttribute("position",new Et(e,3)),this},updateFromObject:function(t){var e=t.geometry;if(t.isMesh){var i=e.__directGeometry;if(e.elementsNeedUpdate===!0&&(i=void 0,e.elementsNeedUpdate=!1),i===void 0)return this.fromGeometry(e);i.verticesNeedUpdate=e.verticesNeedUpdate,i.normalsNeedUpdate=e.normalsNeedUpdate,i.colorsNeedUpdate=e.colorsNeedUpdate,i.uvsNeedUpdate=e.uvsNeedUpdate,i.groupsNeedUpdate=e.groupsNeedUpdate,e.verticesNeedUpdate=!1,e.normalsNeedUpdate=!1,e.colorsNeedUpdate=!1,e.uvsNeedUpdate=!1,e.groupsNeedUpdate=!1,e=i}return e.verticesNeedUpdate===!0&&(i=this.attributes.position,i!==void 0&&(i.copyVector3sArray(e.vertices),i.needsUpdate=!0),e.verticesNeedUpdate=!1),e.normalsNeedUpdate===!0&&(i=this.attributes.normal,i!==void 0&&(i.copyVector3sArray(e.normals),i.needsUpdate=!0),e.normalsNeedUpdate=!1),e.colorsNeedUpdate===!0&&(i=this.attributes.color,i!==void 0&&(i.copyColorsArray(e.colors),i.needsUpdate=!0),e.colorsNeedUpdate=!1),e.uvsNeedUpdate&&(i=this.attributes.uv,i!==void 0&&(i.copyVector2sArray(e.uvs),i.needsUpdate=!0),e.uvsNeedUpdate=!1),e.lineDistancesNeedUpdate&&(i=this.attributes.lineDistance,i!==void 0&&(i.copyArray(e.lineDistances),i.needsUpdate=!0),e.lineDistancesNeedUpdate=!1),e.groupsNeedUpdate&&(e.computeGroups(t.geometry),this.groups=e.groups,e.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=new fe().fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);this.addAttribute("position",new J(e,3).copyVector3sArray(t.vertices)),0<t.normals.length&&(e=new Float32Array(3*t.normals.length),this.addAttribute("normal",new J(e,3).copyVector3sArray(t.normals))),0<t.colors.length&&(e=new Float32Array(3*t.colors.length),this.addAttribute("color",new J(e,3).copyColorsArray(t.colors))),0<t.uvs.length&&(e=new Float32Array(2*t.uvs.length),this.addAttribute("uv",new J(e,2).copyVector2sArray(t.uvs))),0<t.uvs2.length&&(e=new Float32Array(2*t.uvs2.length),this.addAttribute("uv2",new J(e,2).copyVector2sArray(t.uvs2))),this.groups=t.groups;for(var i in t.morphTargets){e=[];for(var n=t.morphTargets[i],s=0,l=n.length;s<l;s++){var f=n[s],p=new Et(3*f.data.length,3);p.name=f.name,e.push(p.copyVector3sArray(f.data))}this.morphAttributes[i]=e}return 0<t.skinIndices.length&&(i=new Et(4*t.skinIndices.length,4),this.addAttribute("skinIndex",i.copyVector4sArray(t.skinIndices))),0<t.skinWeights.length&&(i=new Et(4*t.skinWeights.length,4),this.addAttribute("skinWeight",i.copyVector4sArray(t.skinWeights))),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){this.boundingBox===null&&(this.boundingBox=new k);var t=this.attributes.position;t!==void 0?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new k,e=new u;return function(){this.boundingSphere===null&&(this.boundingSphere=new D);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var s=0,l=0,f=i.count;l<f;l++)e.x=i.getX(l),e.y=i.getY(l),e.z=i.getZ(l),s=Math.max(s,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes;if(e.position){var i=e.position.array;if(e.normal===void 0)this.addAttribute("normal",new J(new Float32Array(i.length),3));else for(var n=e.normal.array,s=0,l=n.length;s<l;s++)n[s]=0;n=e.normal.array;var f=new u,p=new u,v=new u,w=new u,C=new u;if(t){var P=t.array;for(s=0,l=t.count;s<l;s+=3){t=3*P[s+0];var B=3*P[s+1],H=3*P[s+2];f.fromArray(i,t),p.fromArray(i,B),v.fromArray(i,H),w.subVectors(v,p),C.subVectors(f,p),w.cross(C),n[t]+=w.x,n[t+1]+=w.y,n[t+2]+=w.z,n[B]+=w.x,n[B+1]+=w.y,n[B+2]+=w.z,n[H]+=w.x,n[H+1]+=w.y,n[H+2]+=w.z}}else for(s=0,l=i.length;s<l;s+=9)f.fromArray(i,s),p.fromArray(i,s+3),v.fromArray(i,s+6),w.subVectors(v,p),C.subVectors(f,p),w.cross(C),n[s]=w.x,n[s+1]=w.y,n[s+2]=w.z,n[s+3]=w.x,n[s+4]=w.y,n[s+5]=w.z,n[s+6]=w.x,n[s+7]=w.y,n[s+8]=w.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){e===void 0&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes,n;for(n in i)if(t.attributes[n]!==void 0){var s=i[n].array,l=t.attributes[n],f=l.array,p=0;for(l=l.itemSize*e;p<f.length;p++,l++)s[l]=f[p]}return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new u;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new Ft,e=this.index.array,i=this.attributes,n;for(n in i){var s=i[n],l=s.array,f=s.itemSize,p=new l.constructor(e.length*f),v=0;s=0;for(var w=e.length;s<w;s++)for(var C=e[s]*f,P=0;P<f;P++)p[v++]=l[C++];t.addAttribute(n,new J(p,f))}for(e=this.groups,s=0,w=e.length;s<w;s++)i=e[s],t.addGroup(i.start,i.count,i.materialIndex);return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),0<Object.keys(this.userData).length&&(t.userData=this.userData),this.parameters!==void 0){var e=this.parameters;for(s in e)e[s]!==void 0&&(t[s]=e[s]);return t}t.data={attributes:{}};var i=this.index;i!==null&&(e=Array.prototype.slice.call(i.array),t.data.index={type:i.array.constructor.name,array:e}),i=this.attributes;for(s in i){var n=i[s];e=Array.prototype.slice.call(n.array),t.data.attributes[s]={itemSize:n.itemSize,type:n.array.constructor.name,array:e,normalized:n.normalized}}var s=this.groups;return 0<s.length&&(t.data.groups=JSON.parse(JSON.stringify(s))),s=this.boundingSphere,s!==null&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t},clone:function(){return new Ft().copy(this)},copy:function(t){var e;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingSphere=this.boundingBox=null,this.name=t.name;var i=t.index;i!==null&&this.setIndex(i.clone()),i=t.attributes;for(f in i)this.addAttribute(f,i[f].clone());var n=t.morphAttributes;for(f in n){var s=[],l=n[f];for(i=0,e=l.length;i<e;i++)s.push(l[i].clone());this.morphAttributes[f]=s}var f=t.groups;for(i=0,e=f.length;i<e;i++)n=f[i],this.addGroup(n.start,n.count,n.materialIndex);return f=t.boundingBox,f!==null&&(this.boundingBox=f.clone()),f=t.boundingSphere,f!==null&&(this.boundingSphere=f.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Ot.prototype=Object.create(j.prototype),Ot.prototype.constructor=Ot,Bt.prototype=Object.create(Ft.prototype),Bt.prototype.constructor=Bt,ke.prototype=Object.create(j.prototype),ke.prototype.constructor=ke,ce.prototype=Object.create(Ft.prototype),ce.prototype.constructor=ce;var Ru=0;Yt.prototype=Object.assign(Object.create(a.prototype),{constructor:Yt,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(t!==void 0)for(var e in t){var i=t[e];if(i===void 0)console.warn("THREE.Material: '"+e+"' parameter is undefined.");else if(e==="shading")console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===1;else{var n=this[e];n===void 0?console.warn("THREE."+this.type+": '"+e+"' is not a property of this material."):n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]=i}}},toJSON:function(t){function e(s){var l=[],f;for(f in s){var p=s[f];delete p.metadata,l.push(p)}return l}var i=t===void 0||typeof t=="string";i&&(t={textures:{},images:{}});var n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};return n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearCoat!==void 0&&(n.clearCoat=this.clearCoat),this.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,n.reflectivity=this.reflectivity,this.combine!==void 0&&(n.combine=this.combine),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity)),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.size!==void 0&&(n.size=this.size),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==1&&(n.blending=this.blending),this.flatShading===!0&&(n.flatShading=this.flatShading),this.side!==0&&(n.side=this.side),this.vertexColors!==0&&(n.vertexColors=this.vertexColors),1>this.opacity&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),0<this.alphaTest&&(n.alphaTest=this.alphaTest),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),1<this.wireframeLinewidth&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.morphTargets===!0&&(n.morphTargets=!0),this.skinning===!0&&(n.skinning=!0),this.visible===!1&&(n.visible=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),i&&(i=e(t.textures),t=e(t.images),0<i.length&&(n.textures=i),0<t.length&&(n.images=t)),n},clone:function(){return new this.constructor().copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(e!==null){var n=e.length;i=Array(n);for(var s=0;s!==n;++s)i[s]=e[s].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),$e.prototype=Object.create(Yt.prototype),$e.prototype.constructor=$e,$e.prototype.isShaderMaterial=!0,$e.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Bn.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},$e.prototype.toJSON=function(t){var e=Yt.prototype.toJSON.call(this,t);e.uniforms={};for(var i in this.uniforms){var n=this.uniforms[i].value;e.uniforms[i]=n.isTexture?{type:"t",value:n.toJSON(t).uuid}:n.isColor?{type:"c",value:n.getHex()}:n.isVector2?{type:"v2",value:n.toArray()}:n.isVector3?{type:"v3",value:n.toArray()}:n.isVector4?{type:"v4",value:n.toArray()}:n.isMatrix4?{type:"m4",value:n.toArray()}:{value:n}}return 0<Object.keys(this.defines).length&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(Oi.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .at() target is now required"),e=new u),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new u;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){return e===void 0&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new u),e.subVectors(t,this.origin),t=e.dot(this.direction),0>t?e.copy(this.origin):e.copy(this.direction).multiplyScalar(t).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new u;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return 0>i?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:function(){var t=new u,e=new u,i=new u;return function(n,s,l,f){t.copy(n).add(s).multiplyScalar(.5),e.copy(s).sub(n).normalize(),i.copy(this.origin).sub(t);var p=.5*n.distanceTo(s),v=-this.direction.dot(e),w=i.dot(this.direction),C=-i.dot(e),P=i.lengthSq(),B=Math.abs(1-v*v);if(0<B){n=v*C-w,s=v*w-C;var H=p*B;0<=n?s>=-H?s<=H?(p=1/B,n*=p,s*=p,v=n*(n+v*s+2*w)+s*(v*n+s+2*C)+P):(s=p,n=Math.max(0,-(v*s+w)),v=-n*n+s*(s+2*C)+P):(s=-p,n=Math.max(0,-(v*s+w)),v=-n*n+s*(s+2*C)+P):s<=-H?(n=Math.max(0,-(-v*p+w)),s=0<n?-p:Math.min(Math.max(-p,-C),p),v=-n*n+s*(s+2*C)+P):s<=H?(n=0,s=Math.min(Math.max(-p,-C),p),v=s*(s+2*C)+P):(n=Math.max(0,-(v*p+w)),s=0<n?p:Math.min(Math.max(-p,-C),p),v=-n*n+s*(s+2*C)+P)}else s=0<v?-p:p,n=Math.max(0,-(v*s+w)),v=-n*n+s*(s+2*C)+P;return l&&l.copy(this.direction).multiplyScalar(n).add(this.origin),f&&f.copy(e).multiplyScalar(s).add(t),v}}(),intersectSphere:function(){var t=new u;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),s=t.dot(t)-n*n;return e=e.radius*e.radius,s>e?null:(e=Math.sqrt(e-s),s=n-e,n+=e,0>s&&0>n?null:0>s?this.at(n,i):this.at(s,i))}}(),intersectsSphere:function(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);return e===0?t.distanceToPoint(this.origin)===0?0:null:(t=-(this.origin.dot(t.normal)+t.constant)/e,0<=t?t:null)},intersectPlane:function(t,e){return t=this.distanceToPlane(t),t===null?null:this.at(t,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return e===0||0>t.normal.dot(this.direction)*e},intersectBox:function(t,e){var i=1/this.direction.x,n=1/this.direction.y,s=1/this.direction.z,l=this.origin;if(0<=i){var f=(t.min.x-l.x)*i;i*=t.max.x-l.x}else f=(t.max.x-l.x)*i,i*=t.min.x-l.x;if(0<=n){var p=(t.min.y-l.y)*n;n*=t.max.y-l.y}else p=(t.max.y-l.y)*n,n*=t.min.y-l.y;return f>n||p>i||((p>f||f!==f)&&(f=p),(n<i||i!==i)&&(i=n),0<=s?(p=(t.min.z-l.z)*s,t=(t.max.z-l.z)*s):(p=(t.max.z-l.z)*s,t=(t.min.z-l.z)*s),f>t||p>i)?null:((p>f||f!==f)&&(f=p),(t<i||i!==i)&&(i=t),0>i?null:this.at(0<=f?f:i,e))},intersectsBox:function(){var t=new u;return function(e){return this.intersectBox(e,t)!==null}}(),intersectTriangle:function(){var t=new u,e=new u,i=new u,n=new u;return function(s,l,f,p,v){if(e.subVectors(l,s),i.subVectors(f,s),n.crossVectors(e,i),l=this.direction.dot(n),0<l){if(p)return null;p=1}else if(0>l)p=-1,l=-l;else return null;return t.subVectors(this.origin,s),s=p*this.direction.dot(i.crossVectors(t,i)),0>s||(f=p*this.direction.dot(e.cross(t)),0>f||s+f>l)?null:(s=-p*t.dot(n),0>s?null:this.at(s/l,v))}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Oe,{getNormal:function(){var t=new u;return function(e,i,n,s){return s===void 0&&(console.warn("THREE.Triangle: .getNormal() target is now required"),s=new u),s.subVectors(n,i),t.subVectors(e,i),s.cross(t),e=s.lengthSq(),0<e?s.multiplyScalar(1/Math.sqrt(e)):s.set(0,0,0)}}(),getBarycoord:function(){var t=new u,e=new u,i=new u;return function(n,s,l,f,p){t.subVectors(f,s),e.subVectors(l,s),i.subVectors(n,s),n=t.dot(t),s=t.dot(e),l=t.dot(i);var v=e.dot(e);f=e.dot(i);var w=n*v-s*s;return p===void 0&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),p=new u),w===0?p.set(-2,-1,-1):(w=1/w,v=(v*l-s*f)*w,n=(n*f-s*l)*w,p.set(1-v-n,n,v))}}(),containsPoint:function(){var t=new u;return function(e,i,n,s){return Oe.getBarycoord(e,i,n,s,t),0<=t.x&&0<=t.y&&1>=t.x+t.y}}(),getUV:function(){var t=new u;return function(e,i,n,s,l,f,p,v){return this.getBarycoord(e,i,n,s,t),v.set(0,0),v.addScaledVector(l,t.x),v.addScaledVector(f,t.y),v.addScaledVector(p,t.z),v}}()}),Object.assign(Oe.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new u,e=new u;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new u),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Oe.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return t===void 0&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new u),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Oe.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Oe.containsPoint(t,this.a,this.b,this.c)},getUV:function(t,e,i,n,s){return Oe.getUV(t,this.a,this.b,this.c,e,i,n,s)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new u,e=new u,i=new u,n=new u,s=new u,l=new u;return function(f,p){p===void 0&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),p=new u);var v=this.a,w=this.b,C=this.c;t.subVectors(w,v),e.subVectors(C,v),n.subVectors(f,v);var P=t.dot(n),B=e.dot(n);if(0>=P&&0>=B)return p.copy(v);s.subVectors(f,w);var H=t.dot(s),q=e.dot(s);if(0<=H&&q<=H)return p.copy(w);var K=P*q-H*B;if(0>=K&&0<=P&&0>=H)return w=P/(P-H),p.copy(v).addScaledVector(t,w);l.subVectors(f,C),f=t.dot(l);var rt=e.dot(l);return 0<=rt&&f<=rt?p.copy(C):(P=f*B-P*rt,0>=P&&0<=B&&0>=rt?(K=B/(B-rt),p.copy(v).addScaledVector(e,K)):(B=H*rt-f*q,0>=B&&0<=q-H&&0<=f-rt?(i.subVectors(C,w),K=(q-H)/(q-H+(f-rt)),p.copy(w).addScaledVector(i,K)):(C=1/(B+P+K),w=P*C,K*=C,p.copy(v).addScaledVector(t,w).addScaledVector(e,K))))}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Ge.prototype=Object.create(Yt.prototype),Ge.prototype.constructor=Ge,Ge.prototype.isMeshBasicMaterial=!0,Ge.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},di.prototype=Object.assign(Object.create(N.prototype),{constructor:di,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return N.prototype.copy.call(this,t),this.drawMode=t.drawMode,t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t=this.geometry;if(t.isBufferGeometry){t=t.morphAttributes;var e=Object.keys(t);if(0<e.length){var i=t[e[0]];if(i!==void 0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++){var n=i[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t}}}else if(i=t.morphTargets,i!==void 0&&0<i.length)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=i.length;t<e;t++)n=i[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[n]=t},raycast:function(){function t(rt,xt,gt,At,wt,Vt,Z,st){return(xt.side===1?At.intersectTriangle(Z,Vt,wt,!0,st):At.intersectTriangle(wt,Vt,Z,xt.side!==2,st))===null?null:(K.copy(st),K.applyMatrix4(rt.matrixWorld),xt=gt.ray.origin.distanceTo(K),xt<gt.near||xt>gt.far?null:{distance:xt,point:K.clone(),object:rt})}function e(rt,xt,gt,At,wt,Vt,Z,st,zt){return l.fromBufferAttribute(wt,Z),f.fromBufferAttribute(wt,st),p.fromBufferAttribute(wt,zt),(rt=t(rt,xt,gt,At,l,f,p,q))&&(Vt&&(P.fromBufferAttribute(Vt,Z),B.fromBufferAttribute(Vt,st),H.fromBufferAttribute(Vt,zt),rt.uv=Oe.getUV(q,l,f,p,P,B,H,new o)),Vt=new R(Z,st,zt),Oe.getNormal(l,f,p,Vt.normal),rt.face=Vt),rt}var i=new c,n=new Oi,s=new D,l=new u,f=new u,p=new u,v=new u,w=new u,C=new u,P=new o,B=new o,H=new o,q=new u,K=new u;return function(rt,xt){var gt=this.geometry,At=this.material,wt=this.matrixWorld;if(At!==void 0&&(gt.boundingSphere===null&&gt.computeBoundingSphere(),s.copy(gt.boundingSphere),s.applyMatrix4(wt),rt.ray.intersectsSphere(s)!==!1&&(i.getInverse(wt),n.copy(rt.ray).applyMatrix4(i),gt.boundingBox===null||n.intersectsBox(gt.boundingBox)!==!1))){if(gt.isBufferGeometry){var Vt=gt.index,Z=gt.attributes.position,st=gt.attributes.uv,zt=gt.groups;gt=gt.drawRange;var ee;if(Vt!==null)if(Array.isArray(At)){var $t=0;for(ee=zt.length;$t<ee;$t++){var qt=zt[$t],Te=At[qt.materialIndex];wt=Math.max(qt.start,gt.start);var me=Math.min(qt.start+qt.count,gt.start+gt.count);for(qt=wt;qt<me;qt+=3){wt=Vt.getX(qt);var Ie=Vt.getX(qt+1),be=Vt.getX(qt+2);(wt=e(this,Te,rt,n,Z,st,wt,Ie,be))&&(wt.faceIndex=Math.floor(qt/3),xt.push(wt))}}}else for(wt=Math.max(0,gt.start),me=Math.min(Vt.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=Vt.getX($t),Ie=Vt.getX($t+1),be=Vt.getX($t+2),(wt=e(this,At,rt,n,Z,st,wt,Ie,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt));else if(Z!==void 0)if(Array.isArray(At))for($t=0,ee=zt.length;$t<ee;$t++)for(qt=zt[$t],Te=At[qt.materialIndex],wt=Math.max(qt.start,gt.start),me=Math.min(qt.start+qt.count,gt.start+gt.count),qt=wt;qt<me;qt+=3)wt=qt,Ie=qt+1,be=qt+2,(wt=e(this,Te,rt,n,Z,st,wt,Ie,be))&&(wt.faceIndex=Math.floor(qt/3),xt.push(wt));else for(wt=Math.max(0,gt.start),me=Math.min(Z.count,gt.start+gt.count),$t=wt,ee=me;$t<ee;$t+=3)wt=$t,Ie=$t+1,be=$t+2,(wt=e(this,At,rt,n,Z,st,wt,Ie,be))&&(wt.faceIndex=Math.floor($t/3),xt.push(wt))}else if(gt.isGeometry){for(Z=Array.isArray(At),st=gt.vertices,zt=gt.faces,wt=gt.faceVertexUvs[0],0<wt.length&&(Vt=wt),qt=0,me=zt.length;qt<me;qt++)if(Ie=zt[qt],wt=Z?At[Ie.materialIndex]:At,wt!==void 0){if($t=st[Ie.a],ee=st[Ie.b],Te=st[Ie.c],wt.morphTargets===!0){be=gt.morphTargets;var ae=this.morphTargetInfluences;l.set(0,0,0),f.set(0,0,0),p.set(0,0,0);for(var We=0,Qe=be.length;We<Qe;We++){var fi=ae[We];if(fi!==0){var An=be[We].vertices;l.addScaledVector(v.subVectors(An[Ie.a],$t),fi),f.addScaledVector(w.subVectors(An[Ie.b],ee),fi),p.addScaledVector(C.subVectors(An[Ie.c],Te),fi)}}l.add($t),f.add(ee),p.add(Te),$t=l,ee=f,Te=p}(wt=t(this,wt,rt,n,$t,ee,Te,q))&&(Vt&&Vt[qt]&&(be=Vt[qt],P.copy(be[0]),B.copy(be[1]),H.copy(be[2]),wt.uv=Oe.getUV(q,$t,ee,Te,P,B,H,new o)),wt.face=Ie,wt.faceIndex=qt,xt.push(wt))}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),z.prototype=Object.create(_.prototype),z.prototype.constructor=z,z.prototype.isCubeTexture=!0,Object.defineProperty(z.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}}),Q.prototype=Object.create(_.prototype),Q.prototype.constructor=Q,Q.prototype.isDataTexture3D=!0;var Vh=new _,Xc=new Q,Ou=new z,nh=[],Ca=[],yl=new Float32Array(16),Iu=new Float32Array(9),Wh=new Float32Array(4);na.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),vt(e,t)},qa.prototype.setValue=function(t,e,i){for(var n=this.seq,s=0,l=n.length;s!==l;++s){var f=n[s];f.setValue(t,e[f.id],i)}};var jh=/([\w\d_]+)(\])?(\[|\.)?/g;hs.prototype.setValue=function(t,e,i){e=this.map[e],e!==void 0&&e.setValue(t,i,this.renderer)},hs.prototype.setOptional=function(t,e,i){e=e[i],e!==void 0&&this.setValue(t,i,e)},hs.upload=function(t,e,i,n){for(var s=0,l=e.length;s!==l;++s){var f=e[s],p=i[f.id];p.needsUpdate!==!1&&f.setValue(t,p.value,n)}},hs.seqWithValue=function(t,e){for(var i=[],n=0,s=t.length;n!==s;++n){var l=t[n];l.id in e&&i.push(l)}return i};var ks=0,Xh=0;oe.prototype=Object.create(Yt.prototype),oe.prototype.constructor=oe,oe.prototype.isMeshDepthMaterial=!0,oe.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},te.prototype=Object.create(Yt.prototype),te.prototype.constructor=te,te.prototype.isMeshDistanceMaterial=!0,te.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},ci.prototype=Object.assign(Object.create(N.prototype),{constructor:ci,isGroup:!0}),Be.prototype=Object.assign(Object.create(N.prototype),{constructor:Be,isCamera:!0,copy:function(t,e){return N.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this},getWorldDirection:function(t){t===void 0&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),t=new u),this.updateMatrixWorld(!0);var e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()},updateMatrixWorld:function(t){N.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return new this.constructor().copy(this)}}),ye.prototype=Object.assign(Object.create(Be.prototype),{constructor:ye,isPerspectiveCamera:!0,copy:function(t,e){return Be.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){t=.5*this.getFilmHeight()/t,this.fov=2*pi.RAD2DEG*Math.atan(t),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*pi.DEG2RAD*this.fov);return .5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*pi.RAD2DEG*Math.atan(Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,s,l){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=l,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*pi.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,s=-.5*n,l=this.view;if(this.view!==null&&this.view.enabled){var f=l.fullWidth,p=l.fullHeight;s+=l.offsetX*n/f,e-=l.offsetY*i/p,n*=l.width/f,i*=l.height/p}l=this.filmOffset,l!==0&&(s+=t*l/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+n,e,e-i,t,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=N.prototype.toJSON.call(this,t),t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}),Fe.prototype=Object.assign(Object.create(ye.prototype),{constructor:Fe,isArrayCamera:!0});var oo=new u,wr=new u;Le.prototype.isFogExp2=!0,Le.prototype.clone=function(){return new Le(this.color,this.density)},Le.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Sn.prototype.isFog=!0,Sn.prototype.clone=function(){return new Sn(this.color,this.near,this.far)},Sn.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Xn.prototype=Object.assign(Object.create(N.prototype),{constructor:Xn,copy:function(t,e){return N.prototype.copy.call(this,t,e),t.background!==null&&(this.background=t.background.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=N.prototype.toJSON.call(this,t);return this.background!==null&&(e.object.background=this.background.toJSON(t)),this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}}),Object.defineProperty(zi.prototype,"needsUpdate",{set:function(t){t===!0&&this.version++}}),Object.assign(zi.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=t!==void 0?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,s=this.stride;n<s;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return e===void 0&&(e=0),this.array.set(t,e),this},clone:function(){return new this.constructor().copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),Object.defineProperties(ki.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(ki.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,s){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=s,this}}),Hi.prototype=Object.create(Yt.prototype),Hi.prototype.constructor=Hi,Hi.prototype.isSpriteMaterial=!0,Hi.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this};var Pa;nn.prototype=Object.assign(Object.create(N.prototype),{constructor:nn,isSprite:!0,raycast:function(){function t(H,q,K,rt,xt,gt){s.subVectors(H,K).addScalar(.5).multiply(rt),xt!==void 0?(l.x=gt*s.x-xt*s.y,l.y=xt*s.x+gt*s.y):l.copy(s),H.copy(q),H.x+=l.x,H.y+=l.y,H.applyMatrix4(f)}var e=new u,i=new u,n=new u,s=new o,l=new o,f=new c,p=new u,v=new u,w=new u,C=new o,P=new o,B=new o;return function(H,q){i.setFromMatrixScale(this.matrixWorld),f.getInverse(this.modelViewMatrix).premultiply(this.matrixWorld),n.setFromMatrixPosition(this.modelViewMatrix);var K=this.material.rotation;if(K!==0)var rt=Math.cos(K),xt=Math.sin(K);K=this.center,t(p.set(-.5,-.5,0),n,K,i,xt,rt),t(v.set(.5,-.5,0),n,K,i,xt,rt),t(w.set(.5,.5,0),n,K,i,xt,rt),C.set(0,0),P.set(1,0),B.set(1,1);var gt=H.ray.intersectTriangle(p,v,w,!1,e);gt===null&&(t(v.set(-.5,.5,0),n,K,i,xt,rt),P.set(0,1),gt=H.ray.intersectTriangle(p,w,v,!1,e),gt===null)||(xt=H.ray.origin.distanceTo(e),xt<H.near||xt>H.far||q.push({distance:xt,point:e.clone(),uv:Oe.getUV(e,p,v,w,C,P,B,new o),face:null,object:this}))}}(),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return N.prototype.copy.call(this,t),t.center!==void 0&&this.center.copy(t.center),this}}),rn.prototype=Object.assign(Object.create(N.prototype),{constructor:rn,copy:function(t){N.prototype.copy.call(this,t,!1),t=t.levels;for(var e=0,i=t.length;e<i;e++){var n=t[e];this.addLevel(n.object.clone(),n.distance)}return this},addLevel:function(t,e){e===void 0&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:function(){var t=new u;return function(e,i){t.setFromMatrixPosition(this.matrixWorld);var n=e.ray.origin.distanceTo(t);this.getObjectForDistance(n).raycast(e,i)}}(),update:function(){var t=new u,e=new u;return function(i){var n=this.levels;if(1<n.length){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld),i=t.distanceTo(e),n[0].object.visible=!0;for(var s=1,l=n.length;s<l&&i>=n[s].distance;s++)n[s-1].object.visible=!1,n[s].object.visible=!0;for(;s<l;s++)n[s].object.visible=!1}}}(),toJSON:function(t){t=N.prototype.toJSON.call(this,t),t.object.levels=[];for(var e=this.levels,i=0,n=e.length;i<n;i++){var s=e[i];t.object.levels.push({object:s.object.uuid,distance:s.distance})}return t}}),Object.assign(un.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new c;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i=0;for(e=this.bones.length;i<e;i++)(t=this.bones[i])&&t.matrixWorld.getInverse(this.boneInverses[i]);for(i=0,e=this.bones.length;i<e;i++)(t=this.bones[i])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:function(){var t=new c,e=new c;return function(){for(var i=this.bones,n=this.boneInverses,s=this.boneMatrices,l=this.boneTexture,f=0,p=i.length;f<p;f++)t.multiplyMatrices(i[f]?i[f].matrixWorld:e,n[f]),t.toArray(s,16*f);l!==void 0&&(l.needsUpdate=!0)}}(),clone:function(){return new un(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),cn.prototype=Object.assign(Object.create(N.prototype),{constructor:cn,isBone:!0}),Gi.prototype=Object.assign(Object.create(di.prototype),{constructor:Gi,isSkinnedMesh:!0,initBones:function(){var t=[],e;if(this.geometry&&this.geometry.bones!==void 0){var i=0;for(e=this.geometry.bones.length;i<e;i++){var n=this.geometry.bones[i],s=new cn;t.push(s),s.name=n.name,s.position.fromArray(n.pos),s.quaternion.fromArray(n.rotq),n.scl!==void 0&&s.scale.fromArray(n.scl)}for(i=0,e=this.geometry.bones.length;i<e;i++)n=this.geometry.bones[i],n.parent!==-1&&n.parent!==null&&t[n.parent]!==void 0?t[n.parent].add(t[i]):this.add(t[i])}return this.updateMatrixWorld(!0),t},bind:function(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t;if(this.geometry&&this.geometry.isGeometry)for(t=0;t<this.geometry.skinWeights.length;t++){var e=this.geometry.skinWeights[t],i=1/e.manhattanLength();i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){e=new y;var n=this.geometry.attributes.skinWeight;for(t=0;t<n.count;t++)e.x=n.getX(t),e.y=n.getY(t),e.z=n.getZ(t),e.w=n.getW(t),i=1/e.manhattanLength(),i!==1/0?e.multiplyScalar(i):e.set(1,0,0,0),n.setXYZW(t,e.x,e.y,e.z,e.w)}},updateMatrixWorld:function(t){di.prototype.updateMatrixWorld.call(this,t),this.bindMode==="attached"?this.bindMatrixInverse.getInverse(this.matrixWorld):this.bindMode==="detached"?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Bi.prototype=Object.create(Yt.prototype),Bi.prototype.constructor=Bi,Bi.prototype.isLineBasicMaterial=!0,Bi.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},ji.prototype=Object.assign(Object.create(N.prototype),{constructor:ji,isLine:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,s=[0],l=1,f=n.count;l<f;l++)t.fromBufferAttribute(n,l-1),e.fromBufferAttribute(n,l),s[l]=s[l-1],s[l]+=t.distanceTo(e);i.addAttribute("lineDistance",new Et(s,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,s=i.lineDistances,s[0]=0,l=1,f=n.length;l<f;l++)s[l]=s[l-1],s[l]+=n[l-1].distanceTo(n[l]);return this}}(),raycast:function(){var t=new c,e=new Oi,i=new D;return function(n,s){var l=n.linePrecision,f=this.geometry,p=this.matrixWorld;if(f.boundingSphere===null&&f.computeBoundingSphere(),i.copy(f.boundingSphere),i.applyMatrix4(p),i.radius+=l,n.ray.intersectsSphere(i)!==!1){t.getInverse(p),e.copy(n.ray).applyMatrix4(t),l/=(this.scale.x+this.scale.y+this.scale.z)/3,l*=l;var v=new u,w=new u;p=new u;var C=new u,P=this&&this.isLineSegments?2:1;if(f.isBufferGeometry){var B=f.index,H=f.attributes.position.array;if(B!==null){B=B.array,f=0;for(var q=B.length-1;f<q;f+=P){var K=B[f+1];v.fromArray(H,3*B[f]),w.fromArray(H,3*K),K=e.distanceSqToSegment(v,w,C,p),K>l||(C.applyMatrix4(this.matrixWorld),K=n.ray.origin.distanceTo(C),K<n.near||K>n.far||s.push({distance:K,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}else for(f=0,q=H.length/3-1;f<q;f+=P)v.fromArray(H,3*f),w.fromArray(H,3*f+3),K=e.distanceSqToSegment(v,w,C,p),K>l||(C.applyMatrix4(this.matrixWorld),K=n.ray.origin.distanceTo(C),K<n.near||K>n.far||s.push({distance:K,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}else if(f.isGeometry)for(v=f.vertices,w=v.length,f=0;f<w-1;f+=P)K=e.distanceSqToSegment(v[f],v[f+1],C,p),K>l||(C.applyMatrix4(this.matrixWorld),K=n.ray.origin.distanceTo(C),K<n.near||K>n.far||s.push({distance:K,point:p.clone().applyMatrix4(this.matrixWorld),index:f,face:null,faceIndex:null,object:this}))}}}(),copy:function(t){return N.prototype.copy.call(this,t),this.geometry.copy(t.geometry),this.material.copy(t.material),this},clone:function(){return new this.constructor().copy(this)}}),gi.prototype=Object.assign(Object.create(ji.prototype),{constructor:gi,isLineSegments:!0,computeLineDistances:function(){var t=new u,e=new u;return function(){var i=this.geometry;if(i.isBufferGeometry)if(i.index===null){for(var n=i.attributes.position,s=[],l=0,f=n.count;l<f;l+=2)t.fromBufferAttribute(n,l),e.fromBufferAttribute(n,l+1),s[l]=l===0?0:s[l-1],s[l+1]=s[l]+t.distanceTo(e);i.addAttribute("lineDistance",new Et(s,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry)for(n=i.vertices,s=i.lineDistances,l=0,f=n.length;l<f;l+=2)t.copy(n[l]),e.copy(n[l+1]),s[l]=l===0?0:s[l-1],s[l+1]=s[l]+t.distanceTo(e);return this}}()}),cs.prototype=Object.assign(Object.create(ji.prototype),{constructor:cs,isLineLoop:!0}),Fn.prototype=Object.create(Yt.prototype),Fn.prototype.constructor=Fn,Fn.prototype.isPointsMaterial=!0,Fn.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},oa.prototype=Object.assign(Object.create(N.prototype),{constructor:oa,isPoints:!0,raycast:function(){var t=new c,e=new Oi,i=new D;return function(n,s){function l(rt,xt){var gt=e.distanceSqToPoint(rt);gt<C&&(e.closestPointToPoint(rt,P),P.applyMatrix4(v),rt=n.ray.origin.distanceTo(P),rt<n.near||rt>n.far||s.push({distance:rt,distanceToRay:Math.sqrt(gt),point:P.clone(),index:xt,face:null,object:f}))}var f=this,p=this.geometry,v=this.matrixWorld,w=n.params.Points.threshold;if(p.boundingSphere===null&&p.computeBoundingSphere(),i.copy(p.boundingSphere),i.applyMatrix4(v),i.radius+=w,n.ray.intersectsSphere(i)!==!1){t.getInverse(v),e.copy(n.ray).applyMatrix4(t),w/=(this.scale.x+this.scale.y+this.scale.z)/3;var C=w*w;w=new u;var P=new u;if(p.isBufferGeometry){var B=p.index;if(p=p.attributes.position.array,B!==null){var H=B.array;B=0;for(var q=H.length;B<q;B++){var K=H[B];w.fromArray(p,3*K),l(w,K)}}else for(B=0,H=p.length/3;B<H;B++)w.fromArray(p,3*B),l(w,B)}else for(w=p.vertices,B=0,H=w.length;B<H;B++)l(w[B],B)}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Rh.prototype=Object.assign(Object.create(_.prototype),{constructor:Rh,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),qs.prototype=Object.create(_.prototype),qs.prototype.constructor=qs,qs.prototype.isCompressedTexture=!0,Za.prototype=Object.create(_.prototype),Za.prototype.constructor=Za,Za.prototype.isCanvasTexture=!0,Ja.prototype=Object.create(_.prototype),Ja.prototype.constructor=Ja,Ja.prototype.isDepthTexture=!0,aa.prototype=Object.create(Ft.prototype),aa.prototype.constructor=aa,$a.prototype=Object.create(j.prototype),$a.prototype.constructor=$a,la.prototype=Object.create(Ft.prototype),la.prototype.constructor=la,Xi.prototype=Object.create(j.prototype),Xi.prototype.constructor=Xi,xi.prototype=Object.create(Ft.prototype),xi.prototype.constructor=xi,Ka.prototype=Object.create(j.prototype),Ka.prototype.constructor=Ka,ha.prototype=Object.create(xi.prototype),ha.prototype.constructor=ha,Qa.prototype=Object.create(j.prototype),Qa.prototype.constructor=Qa,_o.prototype=Object.create(xi.prototype),_o.prototype.constructor=_o,tl.prototype=Object.create(j.prototype),tl.prototype.constructor=tl,ua.prototype=Object.create(xi.prototype),ua.prototype.constructor=ua,ca.prototype=Object.create(j.prototype),ca.prototype.constructor=ca,fa.prototype=Object.create(xi.prototype),fa.prototype.constructor=fa,gn.prototype=Object.create(j.prototype),gn.prototype.constructor=gn,Ys.prototype=Object.create(Ft.prototype),Ys.prototype.constructor=Ys,Zr.prototype=Object.create(j.prototype),Zr.prototype.constructor=Zr,yo.prototype=Object.create(Ft.prototype),yo.prototype.constructor=yo,xo.prototype=Object.create(j.prototype),xo.prototype.constructor=xo,Un.prototype=Object.create(Ft.prototype),Un.prototype.constructor=Un;var Du={triangulate:function(t,e,i){i=i||2;var n=e&&e.length,s=n?e[0]*i:t.length,l=Oh(t,0,s,i,!0),f=[];if(!l)return f;var p;if(n){var v=i;n=[];var w,C=0;for(w=e.length;C<w;C++){var P=e[C]*v,B=C<w-1?e[C+1]*v:t.length;P=Oh(t,P,B,v,!1),P===P.next&&(P.steiner=!0),n.push(_r(P))}for(n.sort(xu),C=0;C<n.length;C++)e=n[C],v=l,(v=wu(e,v))&&(e=el(v,e),pa(e,e.next)),l=pa(l,l.next)}if(t.length>80*i){var H=p=t[0],q=n=t[1];for(v=i;v<s;v+=i)C=t[v],e=t[v+1],C<H&&(H=C),e<q&&(q=e),C>p&&(p=C),e>n&&(n=e);p=Math.max(p-H,n-q),p=p!==0?1/p:0}return da(l,f,i,H,q,p),f}},ws={area:function(t){for(var e=t.length,i=0,n=e-1,s=0;s<e;n=s++)i+=t[n].x*t[s].y-t[s].x*t[n].y;return .5*i},isClockWise:function(t){return 0>ws.area(t)},triangulateShape:function(t,e){var i=[],n=[],s=[];ql(t),Tu(i,t);var l=t.length;for(e.forEach(ql),t=0;t<e.length;t++)n.push(l),l+=e[t].length,Tu(i,e[t]);for(e=Du.triangulate(i,n),t=0;t<e.length;t+=3)s.push(e.slice(t,t+3));return s}};Cs.prototype=Object.create(j.prototype),Cs.prototype.constructor=Cs,Cs.prototype.toJSON=function(){var t=j.prototype.toJSON.call(this);return Mu(this.parameters.shapes,this.parameters.options,t)},ps.prototype=Object.create(Ft.prototype),ps.prototype.constructor=ps,ps.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Mu(this.parameters.shapes,this.parameters.options,t)};var xl={generateTopUV:function(t,e,i,n,s){t=e[3*n],n=e[3*n+1];var l=e[3*s];return s=e[3*s+1],[new o(e[3*i],e[3*i+1]),new o(t,n),new o(l,s)]},generateSideWallUV:function(t,e,i,n,s,l){t=e[3*i];var f=e[3*i+1];i=e[3*i+2];var p=e[3*n],v=e[3*n+1];n=e[3*n+2];var w=e[3*s],C=e[3*s+1];s=e[3*s+2];var P=e[3*l],B=e[3*l+1];return e=e[3*l+2],.01>Math.abs(f-v)?[new o(t,1-i),new o(p,1-n),new o(w,1-s),new o(P,1-e)]:[new o(f,1-i),new o(v,1-n),new o(C,1-s),new o(B,1-e)]}};il.prototype=Object.create(j.prototype),il.prototype.constructor=il,To.prototype=Object.create(ps.prototype),To.prototype.constructor=To,Zs.prototype=Object.create(j.prototype),Zs.prototype.constructor=Zs,Or.prototype=Object.create(Ft.prototype),Or.prototype.constructor=Or,nl.prototype=Object.create(j.prototype),nl.prototype.constructor=nl,Mo.prototype=Object.create(Ft.prototype),Mo.prototype.constructor=Mo,ma.prototype=Object.create(j.prototype),ma.prototype.constructor=ma,Js.prototype=Object.create(Ft.prototype),Js.prototype.constructor=Js,Ps.prototype=Object.create(j.prototype),Ps.prototype.constructor=Ps,Ps.prototype.toJSON=function(){var t=j.prototype.toJSON.call(this);return Su(this.parameters.shapes,t)},$s.prototype=Object.create(Ft.prototype),$s.prototype.constructor=$s,$s.prototype.toJSON=function(){var t=Ft.prototype.toJSON.call(this);return Su(this.parameters.shapes,t)},Ks.prototype=Object.create(Ft.prototype),Ks.prototype.constructor=Ks,Ls.prototype=Object.create(j.prototype),Ls.prototype.constructor=Ls,Rs.prototype=Object.create(Ft.prototype),Rs.prototype.constructor=Rs,ga.prototype=Object.create(Ls.prototype),ga.prototype.constructor=ga,Gn.prototype=Object.create(Rs.prototype),Gn.prototype.constructor=Gn,So.prototype=Object.create(j.prototype),So.prototype.constructor=So,ds.prototype=Object.create(Ft.prototype),ds.prototype.constructor=ds;var _n=Object.freeze({WireframeGeometry:aa,ParametricGeometry:$a,ParametricBufferGeometry:la,TetrahedronGeometry:Ka,TetrahedronBufferGeometry:ha,OctahedronGeometry:Qa,OctahedronBufferGeometry:_o,IcosahedronGeometry:tl,IcosahedronBufferGeometry:ua,DodecahedronGeometry:ca,DodecahedronBufferGeometry:fa,PolyhedronGeometry:Xi,PolyhedronBufferGeometry:xi,TubeGeometry:gn,TubeBufferGeometry:Ys,TorusKnotGeometry:Zr,TorusKnotBufferGeometry:yo,TorusGeometry:xo,TorusBufferGeometry:Un,TextGeometry:il,TextBufferGeometry:To,SphereGeometry:Zs,SphereBufferGeometry:Or,RingGeometry:nl,RingBufferGeometry:Mo,PlaneGeometry:ke,PlaneBufferGeometry:ce,LatheGeometry:ma,LatheBufferGeometry:Js,ShapeGeometry:Ps,ShapeBufferGeometry:$s,ExtrudeGeometry:Cs,ExtrudeBufferGeometry:ps,EdgesGeometry:Ks,ConeGeometry:ga,ConeBufferGeometry:Gn,CylinderGeometry:Ls,CylinderBufferGeometry:Rs,CircleGeometry:So,CircleBufferGeometry:ds,BoxGeometry:Ot,BoxBufferGeometry:Bt});Qs.prototype=Object.create(Yt.prototype),Qs.prototype.constructor=Qs,Qs.prototype.isShadowMaterial=!0,Qs.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this},Eo.prototype=Object.create($e.prototype),Eo.prototype.constructor=Eo,Eo.prototype.isRawShaderMaterial=!0,ms.prototype=Object.create(Yt.prototype),ms.prototype.constructor=ms,ms.prototype.isMeshStandardMaterial=!0,ms.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},bo.prototype=Object.create(ms.prototype),bo.prototype.constructor=bo,bo.prototype.isMeshPhysicalMaterial=!0,bo.prototype.copy=function(t){return ms.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},Jr.prototype=Object.create(Yt.prototype),Jr.prototype.constructor=Jr,Jr.prototype.isMeshPhongMaterial=!0,Jr.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ao.prototype=Object.create(Jr.prototype),Ao.prototype.constructor=Ao,Ao.prototype.isMeshToonMaterial=!0,Ao.prototype.copy=function(t){return Jr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},Co.prototype=Object.create(Yt.prototype),Co.prototype.constructor=Co,Co.prototype.isMeshNormalMaterial=!0,Co.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Ir.prototype=Object.create(Yt.prototype),Ir.prototype.constructor=Ir,Ir.prototype.isMeshLambertMaterial=!0,Ir.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Po.prototype=Object.create(Yt.prototype),Po.prototype.constructor=Po,Po.prototype.isMeshMatcapMaterial=!0,Po.prototype.copy=function(t){return Yt.prototype.copy.call(this,t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},Lo.prototype=Object.create(Bi.prototype),Lo.prototype.constructor=Lo,Lo.prototype.isLineDashedMaterial=!0,Lo.prototype.copy=function(t){return Bi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var zu=Object.freeze({ShadowMaterial:Qs,SpriteMaterial:Hi,RawShaderMaterial:Eo,ShaderMaterial:$e,PointsMaterial:Fn,MeshPhysicalMaterial:bo,MeshStandardMaterial:ms,MeshPhongMaterial:Jr,MeshToonMaterial:Ao,MeshNormalMaterial:Co,MeshLambertMaterial:Ir,MeshDepthMaterial:oe,MeshDistanceMaterial:te,MeshBasicMaterial:Ge,MeshMatcapMaterial:Po,LineDashedMaterial:Lo,LineBasicMaterial:Bi,Material:Yt}),Yn={arraySlice:function(t,e,i){return Yn.isTypedArray(t)?new t.constructor(t.subarray(e,i!==void 0?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:typeof e.BYTES_PER_ELEMENT=="number"?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=Array(e),n=0;n!==e;++n)i[n]=n;return i.sort(function(s,l){return t[s]-t[l]}),i},sortedArray:function(t,e,i){for(var n=t.length,s=new t.constructor(n),l=0,f=0;f!==n;++l)for(var p=i[l]*e,v=0;v!==e;++v)s[f++]=t[p+v];return s},flattenJSON:function(t,e,i,n){for(var s=1,l=t[0];l!==void 0&&l[n]===void 0;)l=t[s++];if(l!==void 0){var f=l[n];if(f!==void 0)if(Array.isArray(f))do f=l[n],f!==void 0&&(e.push(l.time),i.push.apply(i,f)),l=t[s++];while(l!==void 0);else if(f.toArray!==void 0)do f=l[n],f!==void 0&&(e.push(l.time),f.toArray(i,i.length)),l=t[s++];while(l!==void 0);else do f=l[n],f!==void 0&&(e.push(l.time),i.push(f)),l=t[s++];while(l!==void 0)}}};Object.assign($n.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],s=e[i-1];t:{e:{i:{n:if(!(t<n)){for(var l=i+2;;){if(n===void 0){if(t<s)break n;return this._cachedIndex=i=e.length,this.afterEnd_(i-1,t,s)}if(i===l)break;if(s=n,n=e[++i],t<n)break e}n=e.length;break i}if(t>=s)break t;for(l=e[1],t<l&&(i=2,s=l),l=i-2;;){if(s===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===l)break;if(n=s,s=e[--i-1],t>=s)break e}n=i,i=0}for(;i<n;)s=i+n>>>1,t<e[s]?n=s:i=s+1;if(n=e[i],s=e[i-1],s===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(n===void 0)return this._cachedIndex=i=e.length,this.afterEnd_(i-1,s,t)}this._cachedIndex=i,this.intervalChanged_(i,s,n)}return this.interpolate_(i,s,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize;t*=n;for(var s=0;s!==n;++s)e[s]=i[t+s];return e},interpolate_:function(){throw Error("call to abstract method")},intervalChanged_:function(){}}),Object.assign($n.prototype,{beforeStart_:$n.prototype.copySampleValue_,afterEnd_:$n.prototype.copySampleValue_}),rl.prototype=Object.assign(Object.create($n.prototype),{constructor:rl,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,s=t-2,l=t+1,f=n[s],p=n[l];if(f===void 0)switch(this.getSettings_().endingStart){case 2401:s=t,f=2*e-i;break;case 2402:s=n.length-2,f=e+n[s]-n[s+1];break;default:s=t,f=i}if(p===void 0)switch(this.getSettings_().endingEnd){case 2401:l=t,p=2*i-e;break;case 2402:l=1,p=i+n[1]-n[0];break;default:l=t-1,p=e}t=.5*(i-e),n=this.valueSize,this._weightPrev=t/(e-f),this._weightNext=t/(p-i),this._offsetPrev=s*n,this._offsetNext=l*n},interpolate_:function(t,e,i,n){var s=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f,v=this._offsetPrev,w=this._offsetNext,C=this._weightPrev,P=this._weightNext,B=(i-e)/(n-e);for(i=B*B,n=i*B,e=-C*n+2*C*i-C*B,C=(1+C)*n+(-1.5-2*C)*i+(-.5+C)*B+1,B=(-1-P)*n+(1.5+P)*i+.5*B,P=P*n-P*i,i=0;i!==f;++i)s[i]=e*l[v+i]+C*l[p+i]+B*l[t+i]+P*l[w+i];return s}}),Dr.prototype=Object.assign(Object.create($n.prototype),{constructor:Dr,interpolate_:function(t,e,i,n){var s=this.resultBuffer,l=this.sampleValues,f=this.valueSize;t*=f;var p=t-f;for(e=(i-e)/(n-e),i=1-e,n=0;n!==f;++n)s[n]=l[p+n]*i+l[t+n]*e;return s}}),Ro.prototype=Object.assign(Object.create($n.prototype),{constructor:Ro,interpolate_:function(t){return this.copySampleValue_(t-1)}}),Object.assign(Hn,{toJSON:function(t){var e=t.constructor;if(e.toJSON!==void 0)e=e.toJSON(t);else{e={name:t.name,times:Yn.convertArray(t.times,Array),values:Yn.convertArray(t.values,Array)};var i=t.getInterpolation();i!==t.DefaultInterpolation&&(e.interpolation=i)}return e.type=t.ValueTypeName,e}}),Object.assign(Hn.prototype,{constructor:Hn,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new Ro(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new Dr(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new rl(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){switch(t){case 2300:var e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(e===void 0){if(e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name,this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw Error(e);return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(t!==0)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(t!==1)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,s=0,l=n-1;s!==n&&i[s]<t;)++s;for(;l!==-1&&i[l]>e;)--l;return++l,(s!==0||l!==n)&&(s>=l&&(l=Math.max(l,1),s=l-1),t=this.getValueSize(),this.times=Yn.arraySlice(i,s,l),this.values=Yn.arraySlice(this.values,s*t,l*t)),this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times;e=this.values;var n=i.length;n===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var s=null,l=0;l!==n;l++){var f=i[l];if(typeof f=="number"&&isNaN(f)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,l,f),t=!1;break}if(s!==null&&s>f){console.error("THREE.KeyframeTrack: Out of order keys.",this,l,f,s),t=!1;break}s=f}if(e!==void 0&&Yn.isTypedArray(e)){for(l=0,i=e.length;l!==i;++l)if(n=e[l],isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,l,n),t=!1;break}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=this.getInterpolation()===2302,s=1,l=t.length-1,f=1;f<l;++f){var p=!1,v=t[f];if(v!==t[f+1]&&(f!==1||v!==v[0]))if(n)p=!0;else{var w=f*i,C=w-i,P=w+i;for(v=0;v!==i;++v){var B=e[w+v];if(B!==e[C+v]||B!==e[P+v]){p=!0;break}}}if(p){if(f!==s)for(t[s]=t[f],p=f*i,w=s*i,v=0;v!==i;++v)e[w+v]=e[p+v];++s}}if(0<l){for(t[s]=t[l],p=l*i,w=s*i,v=0;v!==i;++v)e[w+v]=e[p+v];++s}return s!==t.length&&(this.times=Yn.arraySlice(t,0,s),this.values=Yn.arraySlice(e,0,s*i)),this}}),Yl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Yl,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Zl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Zl,ValueTypeName:"color"}),$r.prototype=Object.assign(Object.create(Hn.prototype),{constructor:$r,ValueTypeName:"number"}),ar.prototype=Object.assign(Object.create($n.prototype),{constructor:ar,interpolate_:function(t,e,i,n){var s=this.resultBuffer,l=this.sampleValues,f=this.valueSize;for(t*=f,e=(i-e)/(n-e),i=t+f;t!==i;t+=4)d.slerpFlat(s,0,l,t-f,l,t,e);return s}}),va.prototype=Object.assign(Object.create(Hn.prototype),{constructor:va,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new ar(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),Jl.prototype=Object.assign(Object.create(Hn.prototype),{constructor:Jl,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),_a.prototype=Object.assign(Object.create(Hn.prototype),{constructor:_a,ValueTypeName:"vector"}),Object.assign(yr,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),s=0,l=i.length;s!==l;++s)e.push(Hc(i[s]).scale(n));return new yr(t.name,t.duration,e)},toJSON:function(t){var e=[],i=t.tracks;t={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid};for(var n=0,s=i.length;n!==s;++n)e.push(Hn.toJSON(i[n]));return t},CreateFromMorphTargetSequence:function(t,e,i,n){for(var s=e.length,l=[],f=0;f<s;f++){var p=[],v=[];p.push((f+s-1)%s,f,(f+1)%s),v.push(0,1,0);var w=Yn.getKeyframeOrder(p);p=Yn.sortedArray(p,1,w),v=Yn.sortedArray(v,1,w),n||p[0]!==0||(p.push(s),v.push(v[0])),l.push(new $r(".morphTargetInfluences["+e[f].name+"]",p,v).scale(1/i))}return new yr(t,-1,l)},findByName:function(t,e){var i=t;for(Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations),t=0;t<i.length;t++)if(i[t].name===e)return i[t];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},s=/^([\w-]*?)([\d]+)$/,l=0,f=t.length;l<f;l++){var p=t[l],v=p.name.match(s);if(v&&1<v.length){var w=v[1];(v=n[w])||(n[w]=v=[]),v.push(p)}}t=[];for(w in n)t.push(yr.CreateFromMorphTargetSequence(w,n[w],e,i));return t},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;var i=function(K,rt,xt,gt,At){if(xt.length!==0){var wt=[],Vt=[];Yn.flattenJSON(xt,wt,Vt,gt),wt.length!==0&&At.push(new K(rt,wt,Vt))}},n=[],s=t.name||"default",l=t.length||-1,f=t.fps||30;t=t.hierarchy||[];for(var p=0;p<t.length;p++){var v=t[p].keys;if(v&&v.length!==0)if(v[0].morphTargets){l={};for(var w=0;w<v.length;w++)if(v[w].morphTargets)for(var C=0;C<v[w].morphTargets.length;C++)l[v[w].morphTargets[C]]=-1;for(var P in l){var B=[],H=[];for(C=0;C!==v[w].morphTargets.length;++C){var q=v[w];B.push(q.time),H.push(q.morphTarget===P?1:0)}n.push(new $r(".morphTargetInfluence["+P+"]",B,H))}l=l.length*(f||1)}else w=".bones["+e[p].name+"]",i(_a,w+".position",v,"pos",n),i(va,w+".quaternion",v,"rot",n),i(_a,w+".scale",v,"scl",n)}return n.length===0?null:new yr(s,l,n)}}),Object.assign(yr.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}return this.duration=t,this},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},validate:function(){for(var t=!0,e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}});var Ts={enabled:!1,files:{},add:function(t,e){this.enabled!==!1&&(this.files[t]=e)},get:function(t){if(this.enabled!==!1)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}},tr=new to,Br={};Object.assign(Lt.prototype,{load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,l=Ts.get(t);if(l!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(l),s.manager.itemEnd(t)},0),l;if(Br[t]!==void 0)Br[t].push({onLoad:e,onProgress:i,onError:n});else{var f=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(f){i=f[1];var p=!!f[2];f=f[3],f=decodeURIComponent(f),p&&(f=atob(f));try{var v=(this.responseType||"").toLowerCase();switch(v){case"arraybuffer":case"blob":var w=new Uint8Array(f.length);for(p=0;p<f.length;p++)w[p]=f.charCodeAt(p);var C=v==="blob"?new Blob([w.buffer],{type:i}):w.buffer;break;case"document":C=new DOMParser().parseFromString(f,i);break;case"json":C=JSON.parse(f);break;default:C=f}setTimeout(function(){e&&e(C),s.manager.itemEnd(t)},0)}catch(B){setTimeout(function(){n&&n(B),s.manager.itemError(t),s.manager.itemEnd(t)},0)}}else{Br[t]=[],Br[t].push({onLoad:e,onProgress:i,onError:n});var P=new XMLHttpRequest;P.open("GET",t,!0),P.addEventListener("load",function(B){var H=this.response;Ts.add(t,H);var q=Br[t];if(delete Br[t],this.status===200||this.status===0){this.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var K=0,rt=q.length;K<rt;K++){var xt=q[K];xt.onLoad&&xt.onLoad(H)}}else{for(K=0,rt=q.length;K<rt;K++)xt=q[K],xt.onError&&xt.onError(B);s.manager.itemError(t)}s.manager.itemEnd(t)},!1),P.addEventListener("progress",function(B){for(var H=Br[t],q=0,K=H.length;q<K;q++){var rt=H[q];rt.onProgress&&rt.onProgress(B)}},!1),P.addEventListener("error",function(B){var H=Br[t];delete Br[t];for(var q=0,K=H.length;q<K;q++){var rt=H[q];rt.onError&&rt.onError(B)}s.manager.itemError(t),s.manager.itemEnd(t)},!1),P.addEventListener("abort",function(B){var H=Br[t];delete Br[t];for(var q=0,K=H.length;q<K;q++){var rt=H[q];rt.onError&&rt.onError(B)}s.manager.itemError(t),s.manager.itemEnd(t)},!1),this.responseType!==void 0&&(P.responseType=this.responseType),this.withCredentials!==void 0&&(P.withCredentials=this.withCredentials),P.overrideMimeType&&P.overrideMimeType(this.mimeType!==void 0?this.mimeType:"text/plain");for(p in this.requestHeader)P.setRequestHeader(p,this.requestHeader[p]);P.send(null)}return s.manager.itemStart(t),P}},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(Qt.prototype,{load:function(t,e,i,n){var s=this,l=new Lt(s.manager);l.setPath(s.path),l.load(t,function(f){e(s.parse(JSON.parse(f)))},i,n)},parse:function(t,e){for(var i=[],n=0;n<t.length;n++){var s=yr.parse(t[n]);i.push(s)}e(i)},setPath:function(t){return this.path=t,this}}),Object.assign(Zt.prototype,{load:function(t,e,i,n){function s(B){v.load(t[B],function(H){H=l._parser(H,!0),f[B]={width:H.width,height:H.height,format:H.format,mipmaps:H.mipmaps},w+=1,w===6&&(H.mipmapCount===1&&(p.minFilter=1006),p.format=H.format,p.needsUpdate=!0,e&&e(p))},i,n)}var l=this,f=[],p=new qs;p.image=f;var v=new Lt(this.manager);if(v.setPath(this.path),v.setResponseType("arraybuffer"),Array.isArray(t))for(var w=0,C=0,P=t.length;C<P;++C)s(C);else v.load(t,function(B){if(B=l._parser(B,!0),B.isCubemap)for(var H=B.mipmaps.length/B.mipmapCount,q=0;q<H;q++){f[q]={mipmaps:[]};for(var K=0;K<B.mipmapCount;K++)f[q].mipmaps.push(B.mipmaps[q*B.mipmapCount+K]),f[q].format=B.format,f[q].width=B.width,f[q].height=B.height}else p.image.width=B.width,p.image.height=B.height,p.mipmaps=B.mipmaps;B.mipmapCount===1&&(p.minFilter=1006),p.format=B.format,p.needsUpdate=!0,e&&e(p)},i,n);return p},setPath:function(t){return this.path=t,this}}),Object.assign(Ue.prototype,{load:function(t,e,i,n){var s=this,l=new I,f=new Lt(this.manager);return f.setResponseType("arraybuffer"),f.setPath(this.path),f.load(t,function(p){(p=s._parser(p))&&(p.image!==void 0?l.image=p.image:p.data!==void 0&&(l.image.width=p.width,l.image.height=p.height,l.image.data=p.data),l.wrapS=p.wrapS!==void 0?p.wrapS:1001,l.wrapT=p.wrapT!==void 0?p.wrapT:1001,l.magFilter=p.magFilter!==void 0?p.magFilter:1006,l.minFilter=p.minFilter!==void 0?p.minFilter:1008,l.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.format!==void 0&&(l.format=p.format),p.type!==void 0&&(l.type=p.type),p.mipmaps!==void 0&&(l.mipmaps=p.mipmaps),p.mipmapCount===1&&(l.minFilter=1006),l.needsUpdate=!0,e&&e(l,p))},i,n),l},setPath:function(t){return this.path=t,this}}),Object.assign(ai.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function s(){v.removeEventListener("load",s,!1),v.removeEventListener("error",l,!1),Ts.add(t,this),e&&e(this),f.manager.itemEnd(t)}function l(w){v.removeEventListener("load",s,!1),v.removeEventListener("error",l,!1),n&&n(w),f.manager.itemError(t),f.manager.itemEnd(t)}t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var f=this,p=Ts.get(t);if(p!==void 0)return f.manager.itemStart(t),setTimeout(function(){e&&e(p),f.manager.itemEnd(t)},0),p;var v=document.createElementNS("http://www.w3.org/1999/xhtml","img");return v.addEventListener("load",s,!1),v.addEventListener("error",l,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(v.crossOrigin=this.crossOrigin),f.manager.itemStart(t),v.src=t,v},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ni.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){function s(v){f.load(t[v],function(w){l.images[v]=w,p++,p===6&&(l.needsUpdate=!0,e&&e(l))},void 0,n)}var l=new z,f=new ai(this.manager);f.setCrossOrigin(this.crossOrigin),f.setPath(this.path);var p=0;for(i=0;i<t.length;++i)s(i);return l},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(fn.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var s=new _,l=new ai(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(t,function(f){s.image=f,f=0<t.search(/\.jpe?g$/i)||t.search(/^data:image\/jpeg/)===0,s.format=f?1022:1023,s.needsUpdate=!0,e!==void 0&&e(s)},i,n),s},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ee.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){return t=this.getUtoTmapping(t),this.getPoint(t,e)},getPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){t===void 0&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(t===void 0&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e=[],i=this.getPoint(0),n,s=0;for(e.push(0),n=1;n<=t;n++){var l=this.getPoint(n/t);s+=l.distanceTo(i),e.push(s),i=l}return this.cacheArcLengths=e},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i=this.getLengths(),n=i.length;e=e||t*i[n-1];for(var s=0,l=n-1,f;s<=l;)if(t=Math.floor(s+(l-s)/2),f=i[t]-e,0>f)s=t+1;else if(0<f)l=t-1;else{l=t;break}return t=l,i[t]===e?t/(n-1):(s=i[t],(t+(e-s)/(i[t+1]-s))/(n-1))},getTangent:function(t){var e=t-1e-4;return t+=1e-4,0>e&&(e=0),1<t&&(t=1),e=this.getPoint(e),this.getPoint(t).clone().sub(e).normalize()},getTangentAt:function(t){return t=this.getUtoTmapping(t),this.getTangent(t)},computeFrenetFrames:function(t,e){var i=new u,n=[],s=[],l=[],f=new u,p=new c,v;for(v=0;v<=t;v++){var w=v/t;n[v]=this.getTangentAt(w),n[v].normalize()}s[0]=new u,l[0]=new u,v=Number.MAX_VALUE,w=Math.abs(n[0].x);var C=Math.abs(n[0].y),P=Math.abs(n[0].z);for(w<=v&&(v=w,i.set(1,0,0)),C<=v&&(v=C,i.set(0,1,0)),P<=v&&i.set(0,0,1),f.crossVectors(n[0],i).normalize(),s[0].crossVectors(n[0],f),l[0].crossVectors(n[0],s[0]),v=1;v<=t;v++)s[v]=s[v-1].clone(),l[v]=l[v-1].clone(),f.crossVectors(n[v-1],n[v]),f.length()>Number.EPSILON&&(f.normalize(),i=Math.acos(pi.clamp(n[v-1].dot(n[v]),-1,1)),s[v].applyMatrix4(p.makeRotationAxis(f,i))),l[v].crossVectors(n[v],s[v]);if(e===!0)for(i=Math.acos(pi.clamp(s[0].dot(s[t]),-1,1)),i/=t,0<n[0].dot(f.crossVectors(s[0],s[t]))&&(i=-i),v=1;v<=t;v++)s[v].applyMatrix4(p.makeRotationAxis(n[v],i*v)),l[v].crossVectors(n[v],s[v]);return{tangents:n,normals:s,binormals:l}},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Kn.prototype=Object.create(Ee.prototype),Kn.prototype.constructor=Kn,Kn.prototype.isEllipseCurve=!0,Kn.prototype.getPoint=function(t,e){e=e||new o;for(var i=2*Math.PI,n=this.aEndAngle-this.aStartAngle,s=Math.abs(n)<Number.EPSILON;0>n;)n+=i;for(;n>i;)n-=i;n<Number.EPSILON&&(n=s?0:i),this.aClockwise!==!0||s||(n=n===i?-i:n-i),i=this.aStartAngle+t*n,t=this.aX+this.xRadius*Math.cos(i);var l=this.aY+this.yRadius*Math.sin(i);return this.aRotation!==0&&(i=Math.cos(this.aRotation),n=Math.sin(this.aRotation),s=t-this.aX,l-=this.aY,t=s*i-l*n+this.aX,l=s*n+l*i+this.aY),e.set(t,l)},Kn.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Kn.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Kn.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},ya.prototype=Object.create(Kn.prototype),ya.prototype.constructor=ya,ya.prototype.isArcCurve=!0;var bn=new u,wl=new lr,rh=new lr,Nr=new lr;On.prototype=Object.create(Ee.prototype),On.prototype.constructor=On,On.prototype.isCatmullRomCurve3=!0,On.prototype.getPoint=function(t,e){e=e||new u;var i=this.points,n=i.length;t*=n-(this.closed?0:1);var s=Math.floor(t);if(t-=s,this.closed?s+=0<s?0:(Math.floor(Math.abs(s)/n)+1)*n:t===0&&s===n-1&&(s=n-2,t=1),this.closed||0<s)var l=i[(s-1)%n];else bn.subVectors(i[0],i[1]).add(i[0]),l=bn;var f=i[s%n],p=i[(s+1)%n];if(this.closed||s+2<n?i=i[(s+2)%n]:(bn.subVectors(i[n-1],i[n-2]).add(i[n-1]),i=bn),this.curveType==="centripetal"||this.curveType==="chordal"){var v=this.curveType==="chordal"?.5:.25;n=Math.pow(l.distanceToSquared(f),v),s=Math.pow(f.distanceToSquared(p),v),v=Math.pow(p.distanceToSquared(i),v),1e-4>s&&(s=1),1e-4>n&&(n=s),1e-4>v&&(v=s),wl.initNonuniformCatmullRom(l.x,f.x,p.x,i.x,n,s,v),rh.initNonuniformCatmullRom(l.y,f.y,p.y,i.y,n,s,v),Nr.initNonuniformCatmullRom(l.z,f.z,p.z,i.z,n,s,v)}else this.curveType==="catmullrom"&&(wl.initCatmullRom(l.x,f.x,p.x,i.x,this.tension),rh.initCatmullRom(l.y,f.y,p.y,i.y,this.tension),Nr.initCatmullRom(l.z,f.z,p.z,i.z,this.tension));return e.set(wl.calc(t),rh.calc(t),Nr.calc(t)),e},On.prototype.copy=function(t){Ee.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},On.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},On.prototype.fromJSON=function(t){Ee.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new u().fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},hr.prototype=Object.create(Ee.prototype),hr.prototype.constructor=hr,hr.prototype.isCubicBezierCurve=!0,hr.prototype.getPoint=function(t,e){e=e||new o;var i=this.v0,n=this.v1,s=this.v2,l=this.v3;return e.set(eo(t,i.x,n.x,s.x,l.x),eo(t,i.y,n.y,s.y,l.y)),e},hr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},hr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},hr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Ti.prototype=Object.create(Ee.prototype),Ti.prototype.constructor=Ti,Ti.prototype.isCubicBezierCurve3=!0,Ti.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,s=this.v2,l=this.v3;return e.set(eo(t,i.x,n.x,s.x,l.x),eo(t,i.y,n.y,s.y,l.y),eo(t,i.z,n.z,s.z,l.z)),e},Ti.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Ti.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Ti.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},ur.prototype=Object.create(Ee.prototype),ur.prototype.constructor=ur,ur.prototype.isLineCurve=!0,ur.prototype.getPoint=function(t,e){return e=e||new o,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},ur.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},ur.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},ur.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},ur.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},ur.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},zr.prototype=Object.create(Ee.prototype),zr.prototype.constructor=zr,zr.prototype.isLineCurve3=!0,zr.prototype.getPoint=function(t,e){return e=e||new u,t===1?e.copy(this.v2):(e.copy(this.v2).sub(this.v1),e.multiplyScalar(t).add(this.v1)),e},zr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},zr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},zr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},zr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},cr.prototype=Object.create(Ee.prototype),cr.prototype.constructor=cr,cr.prototype.isQuadraticBezierCurve=!0,cr.prototype.getPoint=function(t,e){e=e||new o;var i=this.v0,n=this.v1,s=this.v2;return e.set(gs(t,i.x,n.x,s.x),gs(t,i.y,n.y,s.y)),e},cr.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},cr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},cr.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},vs.prototype=Object.create(Ee.prototype),vs.prototype.constructor=vs,vs.prototype.isQuadraticBezierCurve3=!0,vs.prototype.getPoint=function(t,e){e=e||new u;var i=this.v0,n=this.v1,s=this.v2;return e.set(gs(t,i.x,n.x,s.x),gs(t,i.y,n.y,s.y),gs(t,i.z,n.z,s.z)),e},vs.prototype.copy=function(t){return Ee.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},vs.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},vs.prototype.fromJSON=function(t){return Ee.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Kr.prototype=Object.create(Ee.prototype),Kr.prototype.constructor=Kr,Kr.prototype.isSplineCurve=!0,Kr.prototype.getPoint=function(t,e){e=e||new o;var i=this.points,n=(i.length-1)*t;t=Math.floor(n),n-=t;var s=i[t===0?t:t-1],l=i[t],f=i[t>i.length-2?i.length-1:t+1];return i=i[t>i.length-3?i.length-1:t+2],e.set(Eu(n,s.x,l.x,f.x,i.x),Eu(n,s.y,l.y,f.y,i.y)),e},Kr.prototype.copy=function(t){Ee.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this},Kr.prototype.toJSON=function(){var t=Ee.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t},Kr.prototype.fromJSON=function(t){Ee.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(new o().fromArray(n))}return this};var sh=Object.freeze({ArcCurve:ya,CatmullRomCurve3:On,CubicBezierCurve:hr,CubicBezierCurve3:Ti,EllipseCurve:Kn,LineCurve:ur,LineCurve3:zr,QuadraticBezierCurve:cr,QuadraticBezierCurve3:vs,SplineCurve:Kr});Os.prototype=Object.assign(Object.create(Ee.prototype),{constructor:Os,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new ur(e,t))},getPoint:function(t){var e=t*this.getLength(),i=this.getCurveLengths();for(t=0;t<i.length;){if(i[t]>=e)return e=i[t]-e,t=this.curves[t],i=t.getLength(),t.getPointAt(i===0?0:1-e/i);t++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t},getSpacedPoints:function(t){t===void 0&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e=[],i,n=0,s=this.curves;n<s.length;n++){var l=s[n];l=l.getPoints(l&&l.isEllipseCurve?2*t:l&&(l.isLineCurve||l.isLineCurve3)?1:l&&l.isSplineCurve?t*l.points.length:t);for(var f=0;f<l.length;f++){var p=l[f];i&&i.equals(p)||(e.push(p),i=p)}}return this.autoClose&&1<e.length&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e},copy:function(t){Ee.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this},toJSON:function(){var t=Ee.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t},fromJSON:function(t){Ee.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(new sh[n.type]().fromJSON(n))}return this}}),fr.prototype=Object.assign(Object.create(Os.prototype),{constructor:fr,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new ur(this.currentPoint.clone(),new o(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){t=new cr(this.currentPoint.clone(),new o(t,e),new o(i,n)),this.curves.push(t),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,s,l){t=new hr(this.currentPoint.clone(),new o(t,e),new o(i,n),new o(s,l)),this.curves.push(t),this.currentPoint.set(s,l)},splineThru:function(t){var e=[this.currentPoint.clone()].concat(t);e=new Kr(e),this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,s,l){this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,n,s,l)},absarc:function(t,e,i,n,s,l){this.absellipse(t,e,i,i,n,s,l)},ellipse:function(t,e,i,n,s,l,f,p){this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,n,s,l,f,p)},absellipse:function(t,e,i,n,s,l,f,p){t=new Kn(t,e,i,n,s,l,f,p),0<this.curves.length&&(e=t.getPoint(0),e.equals(this.currentPoint)||this.lineTo(e.x,e.y)),this.curves.push(t),t=t.getPoint(1),this.currentPoint.copy(t)},copy:function(t){return Os.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Os.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Os.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Qn.prototype=Object.assign(Object.create(fr.prototype),{constructor:Qn,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){fr.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this},toJSON:function(){var t=fr.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t},fromJSON:function(t){fr.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(new fr().fromJSON(n))}return this}}),tn.prototype=Object.assign(Object.create(N.prototype),{constructor:tn,isLight:!0,copy:function(t){return N.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){return t=N.prototype.toJSON.call(this,t),t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}),sl.prototype=Object.assign(Object.create(tn.prototype),{constructor:sl,isHemisphereLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign(_s.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return new this.constructor().copy(this)},toJSON:function(){var t={};return this.bias!==0&&(t.bias=this.bias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ol.prototype=Object.assign(Object.create(_s.prototype),{constructor:ol,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*pi.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height;t=t.distance||e.far,(i!==e.fov||n!==e.aspect||t!==e.far)&&(e.fov=i,e.aspect=n,e.far=t,e.updateProjectionMatrix())}}),al.prototype=Object.assign(Object.create(tn.prototype),{constructor:al,isSpotLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Oo.prototype=Object.assign(Object.create(tn.prototype),{constructor:Oo,isPointLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),xa.prototype=Object.assign(Object.create(Be.prototype),{constructor:xa,isOrthographicCamera:!0,copy:function(t,e){return Be.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,s,l){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=s,this.view.height=l,this.updateProjectionMatrix()},clearViewOffset:function(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,s=i-t;if(i+=t,t=n+e,e=n-e,this.view!==null&&this.view.enabled){i=this.zoom/(this.view.width/this.view.fullWidth),e=this.zoom/(this.view.height/this.view.fullHeight);var l=(this.right-this.left)/this.view.width;n=(this.top-this.bottom)/this.view.height,s+=this.view.offsetX/i*l,i=s+this.view.width/i*l,t-=this.view.offsetY/e*n,e=t-this.view.height/e*n}this.projectionMatrix.makeOrthographic(s,i,t,e,this.near,this.far),this.projectionMatrixInverse.getInverse(this.projectionMatrix)},toJSON:function(t){return t=N.prototype.toJSON.call(this,t),t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}),io.prototype=Object.assign(Object.create(_s.prototype),{constructor:io}),ys.prototype=Object.assign(Object.create(tn.prototype),{constructor:ys,isDirectionalLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),Io.prototype=Object.assign(Object.create(tn.prototype),{constructor:Io,isAmbientLight:!0}),$l.prototype=Object.assign(Object.create(tn.prototype),{constructor:$l,isRectAreaLight:!0,copy:function(t){return tn.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){return t=tn.prototype.toJSON.call(this,t),t.object.width=this.width,t.object.height=this.height,t}}),Object.assign(Kl.prototype,{load:function(t,e,i,n){var s=this,l=new Lt(s.manager);l.setPath(s.path),l.load(t,function(f){e(s.parse(JSON.parse(f)))},i,n)},parse:function(t){function e(f){return i[f]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",f),i[f]}var i=this.textures,n=new zu[t.type];if(t.uuid!==void 0&&(n.uuid=t.uuid),t.name!==void 0&&(n.name=t.name),t.color!==void 0&&n.color.setHex(t.color),t.roughness!==void 0&&(n.roughness=t.roughness),t.metalness!==void 0&&(n.metalness=t.metalness),t.emissive!==void 0&&n.emissive.setHex(t.emissive),t.specular!==void 0&&n.specular.setHex(t.specular),t.shininess!==void 0&&(n.shininess=t.shininess),t.clearCoat!==void 0&&(n.clearCoat=t.clearCoat),t.clearCoatRoughness!==void 0&&(n.clearCoatRoughness=t.clearCoatRoughness),t.vertexColors!==void 0&&(n.vertexColors=t.vertexColors),t.fog!==void 0&&(n.fog=t.fog),t.flatShading!==void 0&&(n.flatShading=t.flatShading),t.blending!==void 0&&(n.blending=t.blending),t.combine!==void 0&&(n.combine=t.combine),t.side!==void 0&&(n.side=t.side),t.opacity!==void 0&&(n.opacity=t.opacity),t.transparent!==void 0&&(n.transparent=t.transparent),t.alphaTest!==void 0&&(n.alphaTest=t.alphaTest),t.depthTest!==void 0&&(n.depthTest=t.depthTest),t.depthWrite!==void 0&&(n.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(n.colorWrite=t.colorWrite),t.wireframe!==void 0&&(n.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(n.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(n.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(n.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(n.rotation=t.rotation),t.linewidth!==1&&(n.linewidth=t.linewidth),t.dashSize!==void 0&&(n.dashSize=t.dashSize),t.gapSize!==void 0&&(n.gapSize=t.gapSize),t.scale!==void 0&&(n.scale=t.scale),t.polygonOffset!==void 0&&(n.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(n.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(n.polygonOffsetUnits=t.polygonOffsetUnits),t.skinning!==void 0&&(n.skinning=t.skinning),t.morphTargets!==void 0&&(n.morphTargets=t.morphTargets),t.dithering!==void 0&&(n.dithering=t.dithering),t.visible!==void 0&&(n.visible=t.visible),t.userData!==void 0&&(n.userData=t.userData),t.uniforms!==void 0)for(var s in t.uniforms){var l=t.uniforms[s];switch(n.uniforms[s]={},l.type){case"t":n.uniforms[s].value=e(l.value);break;case"c":n.uniforms[s].value=new L().setHex(l.value);break;case"v2":n.uniforms[s].value=new o().fromArray(l.value);break;case"v3":n.uniforms[s].value=new u().fromArray(l.value);break;case"v4":n.uniforms[s].value=new y().fromArray(l.value);break;case"m4":n.uniforms[s].value=new c().fromArray(l.value);break;default:n.uniforms[s].value=l.value}}return t.defines!==void 0&&(n.defines=t.defines),t.vertexShader!==void 0&&(n.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(n.fragmentShader=t.fragmentShader),t.shading!==void 0&&(n.flatShading=t.shading===1),t.size!==void 0&&(n.size=t.size),t.sizeAttenuation!==void 0&&(n.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(n.map=e(t.map)),t.alphaMap!==void 0&&(n.alphaMap=e(t.alphaMap),n.transparent=!0),t.bumpMap!==void 0&&(n.bumpMap=e(t.bumpMap)),t.bumpScale!==void 0&&(n.bumpScale=t.bumpScale),t.normalMap!==void 0&&(n.normalMap=e(t.normalMap)),t.normalMapType!==void 0&&(n.normalMapType=t.normalMapType),t.normalScale!==void 0&&(s=t.normalScale,Array.isArray(s)===!1&&(s=[s,s]),n.normalScale=new o().fromArray(s)),t.displacementMap!==void 0&&(n.displacementMap=e(t.displacementMap)),t.displacementScale!==void 0&&(n.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(n.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(n.roughnessMap=e(t.roughnessMap)),t.metalnessMap!==void 0&&(n.metalnessMap=e(t.metalnessMap)),t.emissiveMap!==void 0&&(n.emissiveMap=e(t.emissiveMap)),t.emissiveIntensity!==void 0&&(n.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(n.specularMap=e(t.specularMap)),t.envMap!==void 0&&(n.envMap=e(t.envMap)),t.envMapIntensity!==void 0&&(n.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(n.reflectivity=t.reflectivity),t.lightMap!==void 0&&(n.lightMap=e(t.lightMap)),t.lightMapIntensity!==void 0&&(n.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(n.aoMap=e(t.aoMap)),t.aoMapIntensity!==void 0&&(n.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(n.gradientMap=e(t.gradientMap)),n},setPath:function(t){return this.path=t,this},setTextures:function(t){return this.textures=t,this}});var Fo={decodeText:function(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);for(var e="",i=0,n=t.length;i<n;i++)e+=String.fromCharCode(t[i]);return decodeURIComponent(escape(e))},extractUrlBase:function(t){var e=t.lastIndexOf("/");return e===-1?"./":t.substr(0,e+1)}};Object.assign(Dh.prototype,{load:function(t,e,i,n){var s=this,l=new Lt(s.manager);l.setPath(s.path),l.load(t,function(f){e(s.parse(JSON.parse(f)))},i,n)},parse:function(t){var e=new Ft,i=t.data.index;i!==void 0&&(i=new ao[i.type](i.array),e.setIndex(new J(i,1)));var n=t.data.attributes;for(l in n){var s=n[l];i=new ao[s.type](s.array),e.addAttribute(l,new J(i,s.itemSize,s.normalized))}var l=t.data.groups||t.data.drawcalls||t.data.offsets;if(l!==void 0)for(i=0,n=l.length;i!==n;++i)s=l[i],e.addGroup(s.start,s.count,s.materialIndex);return t=t.data.boundingSphere,t!==void 0&&(l=new u,t.center!==void 0&&l.fromArray(t.center),e.boundingSphere=new D(l,t.radius)),e},setPath:function(t){return this.path=t,this}});var ao={Int8Array,Uint8Array,Uint8ClampedArray:typeof Uint8ClampedArray<"u"?Uint8ClampedArray:Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};Is.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var s=e[i+1];if(e[i].test(t))return s}return null}},Object.assign(Is.prototype,{crossOrigin:"anonymous",onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],s=0;s<t.length;++s)n[s]=this.createMaterial(t[s],e,i);return n},createMaterial:function(){var t={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},e=new L,i=new fn,n=new Kl;return function(s,l,f){function p(B,H,q,K,rt){B=l+B;var xt=Is.Handlers.get(B);return xt!==null?B=xt.load(B):(i.setCrossOrigin(f),B=i.load(B)),H!==void 0&&(B.repeat.fromArray(H),H[0]!==1&&(B.wrapS=1e3),H[1]!==1&&(B.wrapT=1e3)),q!==void 0&&B.offset.fromArray(q),K!==void 0&&(K[0]==="repeat"&&(B.wrapS=1e3),K[0]==="mirror"&&(B.wrapS=1002),K[1]==="repeat"&&(B.wrapT=1e3),K[1]==="mirror"&&(B.wrapT=1002)),rt!==void 0&&(B.anisotropy=rt),H=pi.generateUUID(),v[H]=B,H}var v={},w={uuid:pi.generateUUID(),type:"MeshLambertMaterial"},C;for(C in s){var P=s[C];switch(C){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":w.name=P;break;case"blending":w.blending=t[P];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",C,"is no longer supported.");break;case"colorDiffuse":w.color=e.fromArray(P).getHex();break;case"colorSpecular":w.specular=e.fromArray(P).getHex();break;case"colorEmissive":w.emissive=e.fromArray(P).getHex();break;case"specularCoef":w.shininess=P;break;case"shading":P.toLowerCase()==="basic"&&(w.type="MeshBasicMaterial"),P.toLowerCase()==="phong"&&(w.type="MeshPhongMaterial"),P.toLowerCase()==="standard"&&(w.type="MeshStandardMaterial");break;case"mapDiffuse":w.map=p(P,s.mapDiffuseRepeat,s.mapDiffuseOffset,s.mapDiffuseWrap,s.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":w.emissiveMap=p(P,s.mapEmissiveRepeat,s.mapEmissiveOffset,s.mapEmissiveWrap,s.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":w.lightMap=p(P,s.mapLightRepeat,s.mapLightOffset,s.mapLightWrap,s.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":w.aoMap=p(P,s.mapAORepeat,s.mapAOOffset,s.mapAOWrap,s.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":w.bumpMap=p(P,s.mapBumpRepeat,s.mapBumpOffset,s.mapBumpWrap,s.mapBumpAnisotropy);break;case"mapBumpScale":w.bumpScale=P;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":w.normalMap=p(P,s.mapNormalRepeat,s.mapNormalOffset,s.mapNormalWrap,s.mapNormalAnisotropy);break;case"mapNormalFactor":w.normalScale=P;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":w.specularMap=p(P,s.mapSpecularRepeat,s.mapSpecularOffset,s.mapSpecularWrap,s.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":w.metalnessMap=p(P,s.mapMetalnessRepeat,s.mapMetalnessOffset,s.mapMetalnessWrap,s.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":w.roughnessMap=p(P,s.mapRoughnessRepeat,s.mapRoughnessOffset,s.mapRoughnessWrap,s.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":w.alphaMap=p(P,s.mapAlphaRepeat,s.mapAlphaOffset,s.mapAlphaWrap,s.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":w.side=1;break;case"doubleSided":w.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),w.opacity=P;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":w[C]=P;break;case"vertexColors":P===!0&&(w.vertexColors=2),P==="face"&&(w.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",C,P)}}return w.type==="MeshBasicMaterial"&&delete w.emissive,w.type!=="MeshPhongMaterial"&&delete w.specular,1>w.opacity&&(w.transparent=!0),n.setTextures(v),n.parse(w)}}()}),Object.assign(Do.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var s=this,l=this.path===void 0?Fo.extractUrlBase(t):this.path,f=new Lt(this.manager);f.setPath(this.path),f.setWithCredentials(this.withCredentials),f.load(t,function(p){p=JSON.parse(p);var v=p.metadata;if(v!==void 0&&(v=v.type,v!==void 0&&v.toLowerCase()==="object")){console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.");return}p=s.parse(p,l),e(p.geometry,p.materials)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(){return function(t,e){t.data!==void 0&&(t=t.data),t.scale=t.scale!==void 0?1/t.scale:1;var i=new j,n=t,s,l,f,p=n.faces,v=n.vertices,w=n.normals,C=n.colors,P=n.scale,B=0;if(n.uvs!==void 0){for(s=0;s<n.uvs.length;s++)n.uvs[s].length&&B++;for(s=0;s<B;s++)i.faceVertexUvs[s]=[]}var H=0;for(f=v.length;H<f;)s=new u,s.x=v[H++]*P,s.y=v[H++]*P,s.z=v[H++]*P,i.vertices.push(s);for(H=0,f=p.length;H<f;){v=p[H++];var q=v&1,K=v&2;s=v&8;var rt=v&16,xt=v&32;if(P=v&64,v&=128,q){q=new R,q.a=p[H],q.b=p[H+1],q.c=p[H+3];var gt=new R;if(gt.a=p[H+1],gt.b=p[H+2],gt.c=p[H+3],H+=4,K&&(K=p[H++],q.materialIndex=K,gt.materialIndex=K),K=i.faces.length,s)for(s=0;s<B;s++){var At=n.uvs[s];for(i.faceVertexUvs[s][K]=[],i.faceVertexUvs[s][K+1]=[],l=0;4>l;l++){var wt=p[H++],Vt=At[2*wt];wt=At[2*wt+1],Vt=new o(Vt,wt),l!==2&&i.faceVertexUvs[s][K].push(Vt),l!==0&&i.faceVertexUvs[s][K+1].push(Vt)}}if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt]),gt.normal.copy(q.normal)),xt)for(s=0;4>s;s++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),s!==2&&q.vertexNormals.push(xt),s!==0&&gt.vertexNormals.push(xt);if(P&&(P=p[H++],P=C[P],q.color.setHex(P),gt.color.setHex(P)),v)for(s=0;4>s;s++)P=p[H++],P=C[P],s!==2&&q.vertexColors.push(new L(P)),s!==0&&gt.vertexColors.push(new L(P));i.faces.push(q),i.faces.push(gt)}else{if(q=new R,q.a=p[H++],q.b=p[H++],q.c=p[H++],K&&(K=p[H++],q.materialIndex=K),K=i.faces.length,s)for(s=0;s<B;s++)for(At=n.uvs[s],i.faceVertexUvs[s][K]=[],l=0;3>l;l++)wt=p[H++],Vt=At[2*wt],wt=At[2*wt+1],Vt=new o(Vt,wt),i.faceVertexUvs[s][K].push(Vt);if(rt&&(rt=3*p[H++],q.normal.set(w[rt++],w[rt++],w[rt])),xt)for(s=0;3>s;s++)rt=3*p[H++],xt=new u(w[rt++],w[rt++],w[rt]),q.vertexNormals.push(xt);if(P&&(P=p[H++],q.color.setHex(C[P])),v)for(s=0;3>s;s++)P=p[H++],q.vertexColors.push(new L(C[P]));i.faces.push(q)}}if(n=t,H=n.influencesPerVertex!==void 0?n.influencesPerVertex:2,n.skinWeights)for(f=0,p=n.skinWeights.length;f<p;f+=H)i.skinWeights.push(new y(n.skinWeights[f],1<H?n.skinWeights[f+1]:0,2<H?n.skinWeights[f+2]:0,3<H?n.skinWeights[f+3]:0));if(n.skinIndices)for(f=0,p=n.skinIndices.length;f<p;f+=H)i.skinIndices.push(new y(n.skinIndices[f],1<H?n.skinIndices[f+1]:0,2<H?n.skinIndices[f+2]:0,3<H?n.skinIndices[f+3]:0));if(i.bones=n.bones,i.bones&&0<i.bones.length&&(i.skinWeights.length!==i.skinIndices.length||i.skinIndices.length!==i.vertices.length)&&console.warn("When skinning, number of vertices ("+i.vertices.length+"), skinIndices ("+i.skinIndices.length+"), and skinWeights ("+i.skinWeights.length+") should match."),f=t,p=f.scale,f.morphTargets!==void 0)for(n=0,H=f.morphTargets.length;n<H;n++)for(i.morphTargets[n]={},i.morphTargets[n].name=f.morphTargets[n].name,i.morphTargets[n].vertices=[],w=i.morphTargets[n].vertices,C=f.morphTargets[n].vertices,B=0,v=C.length;B<v;B+=3)P=new u,P.x=C[B]*p,P.y=C[B+1]*p,P.z=C[B+2]*p,w.push(P);if(f.morphColors!==void 0&&0<f.morphColors.length)for(console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.'),p=i.faces,f=f.morphColors[0].colors,n=0,H=p.length;n<H;n++)p[n].color.fromArray(f,3*n);for(f=t,n=[],H=[],f.animation!==void 0&&H.push(f.animation),f.animations!==void 0&&(f.animations.length?H=H.concat(f.animations):H.push(f.animations)),f=0;f<H.length;f++)(p=yr.parseAnimation(H[f],i.bones))&&n.push(p);return i.morphTargets&&(H=yr.CreateClipsFromMorphTargetSequences(i.morphTargets,10),n=n.concat(H)),0<n.length&&(i.animations=n),i.computeFaceNormals(),i.computeBoundingSphere(),t.materials===void 0||t.materials.length===0?{geometry:i}:(t=Is.prototype.initMaterials(t.materials,this.resourcePath||e,this.crossOrigin),{geometry:i,materials:t})}}()}),Object.assign(ll.prototype,{crossOrigin:"anonymous",load:function(t,e,i,n){var s=this,l=this.path===void 0?Fo.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||l,l=new Lt(s.manager),l.setPath(this.path),l.load(t,function(f){var p=null;try{p=JSON.parse(f)}catch(v){n!==void 0&&n(v),console.error("THREE:ObjectLoader: Can't parse "+t+".",v.message);return}f=p.metadata,f===void 0||f.type===void 0||f.type.toLowerCase()==="geometry"?console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead."):s.parse(p,e)},i,n)},setPath:function(t){return this.path=t,this},setResourcePath:function(t){return this.resourcePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes);i=this.parseGeometries(t.geometries,i);var n=this.parseImages(t.images,function(){e!==void 0&&e(s)});n=this.parseTextures(t.textures,n),n=this.parseMaterials(t.materials,n);var s=this.parseObject(t.object,i,n);return t.animations&&(s.animations=this.parseAnimations(t.animations)),t.images!==void 0&&t.images.length!==0||e===void 0||e(s),s},parseShape:function(t){var e={};if(t!==void 0)for(var i=0,n=t.length;i<n;i++){var s=new Qn().fromJSON(t[i]);e[s.uuid]=s}return e},parseGeometries:function(t,e){var i={};if(t!==void 0)for(var n=new Do,s=new Dh,l=0,f=t.length;l<f;l++){var p=t[l];switch(p.type){case"PlaneGeometry":case"PlaneBufferGeometry":var v=new _n[p.type](p.width,p.height,p.widthSegments,p.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":v=new _n[p.type](p.width,p.height,p.depth,p.widthSegments,p.heightSegments,p.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":v=new _n[p.type](p.radius,p.segments,p.thetaStart,p.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":v=new _n[p.type](p.radiusTop,p.radiusBottom,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":v=new _n[p.type](p.radius,p.height,p.radialSegments,p.heightSegments,p.openEnded,p.thetaStart,p.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":v=new _n[p.type](p.radius,p.widthSegments,p.heightSegments,p.phiStart,p.phiLength,p.thetaStart,p.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":v=new _n[p.type](p.radius,p.detail);break;case"RingGeometry":case"RingBufferGeometry":v=new _n[p.type](p.innerRadius,p.outerRadius,p.thetaSegments,p.phiSegments,p.thetaStart,p.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":v=new _n[p.type](p.radius,p.tube,p.radialSegments,p.tubularSegments,p.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":v=new _n[p.type](p.radius,p.tube,p.tubularSegments,p.radialSegments,p.p,p.q);break;case"LatheGeometry":case"LatheBufferGeometry":v=new _n[p.type](p.points,p.segments,p.phiStart,p.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":v=new _n[p.type](p.vertices,p.indices,p.radius,p.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":v=[];for(var w=0,C=p.shapes.length;w<C;w++){var P=e[p.shapes[w]];v.push(P)}v=new _n[p.type](v,p.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(v=[],w=0,C=p.shapes.length;w<C;w++)P=e[p.shapes[w]],v.push(P);w=p.options.extrudePath,w!==void 0&&(p.options.extrudePath=new sh[w.type]().fromJSON(w)),v=new _n[p.type](v,p.options);break;case"BufferGeometry":v=s.parse(p);break;case"Geometry":v=n.parse(p,this.resourcePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+p.type+'"');continue}v.uuid=p.uuid,p.name!==void 0&&(v.name=p.name),v.isBufferGeometry===!0&&p.userData!==void 0&&(v.userData=p.userData),i[p.uuid]=v}return i},parseMaterials:function(t,e){var i={},n={};if(t!==void 0){var s=new Kl;s.setTextures(e),e=0;for(var l=t.length;e<l;e++){var f=t[e];if(f.type==="MultiMaterial"){for(var p=[],v=0;v<f.materials.length;v++){var w=f.materials[v];i[w.uuid]===void 0&&(i[w.uuid]=s.parse(w)),p.push(i[w.uuid])}n[f.uuid]=p}else n[f.uuid]=s.parse(f),i[f.uuid]=n[f.uuid]}}return n},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],s=yr.parse(n);n.uuid!==void 0&&(s.uuid=n.uuid),e.push(s)}return e},parseImages:function(t,e){function i(B){return n.manager.itemStart(B),l.load(B,function(){n.manager.itemEnd(B)},void 0,function(){n.manager.itemError(B),n.manager.itemEnd(B)})}var n=this,s={};if(t!==void 0&&0<t.length){e=new to(e);var l=new ai(e);l.setCrossOrigin(this.crossOrigin),e=0;for(var f=t.length;e<f;e++){var p=t[e],v=p.url;if(Array.isArray(v)){s[p.uuid]=[];for(var w=0,C=v.length;w<C;w++){var P=v[w];P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(P)?P:n.resourcePath+P,s[p.uuid].push(i(P))}}else P=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p.url)?p.url:n.resourcePath+p.url,s[p.uuid]=i(P)}}return s},parseTextures:function(t,e){function i(v,w){return typeof v=="number"?v:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",v),w[v])}var n={};if(t!==void 0)for(var s=0,l=t.length;s<l;s++){var f=t[s];f.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',f.uuid),e[f.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",f.image);var p=Array.isArray(e[f.image])?new z(e[f.image]):new _(e[f.image]);p.needsUpdate=!0,p.uuid=f.uuid,f.name!==void 0&&(p.name=f.name),f.mapping!==void 0&&(p.mapping=i(f.mapping,ku)),f.offset!==void 0&&p.offset.fromArray(f.offset),f.repeat!==void 0&&p.repeat.fromArray(f.repeat),f.center!==void 0&&p.center.fromArray(f.center),f.rotation!==void 0&&(p.rotation=f.rotation),f.wrap!==void 0&&(p.wrapS=i(f.wrap[0],Zn),p.wrapT=i(f.wrap[1],Zn)),f.format!==void 0&&(p.format=f.format),f.minFilter!==void 0&&(p.minFilter=i(f.minFilter,oh)),f.magFilter!==void 0&&(p.magFilter=i(f.magFilter,oh)),f.anisotropy!==void 0&&(p.anisotropy=f.anisotropy),f.flipY!==void 0&&(p.flipY=f.flipY),n[f.uuid]=p}return n},parseObject:function(t,e,i){function n(w){return e[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",w),e[w]}function s(w){if(w!==void 0){if(Array.isArray(w)){for(var C=[],P=0,B=w.length;P<B;P++){var H=w[P];i[H]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",H),C.push(i[H])}return C}return i[w]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",w),i[w]}}switch(t.type){case"Scene":var l=new Xn;t.background!==void 0&&Number.isInteger(t.background)&&(l.background=new L(t.background)),t.fog!==void 0&&(t.fog.type==="Fog"?l.fog=new Sn(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(l.fog=new Le(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":l=new ye(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(l.focus=t.focus),t.zoom!==void 0&&(l.zoom=t.zoom),t.filmGauge!==void 0&&(l.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(l.filmOffset=t.filmOffset),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"OrthographicCamera":l=new xa(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(l.zoom=t.zoom),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"AmbientLight":l=new Io(t.color,t.intensity);break;case"DirectionalLight":l=new ys(t.color,t.intensity);break;case"PointLight":l=new Oo(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":l=new $l(t.color,t.intensity,t.width,t.height);break;case"SpotLight":l=new al(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":l=new sl(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":l=n(t.geometry);var f=s(t.material);l=l.bones&&0<l.bones.length?new Gi(l,f):new di(l,f);break;case"LOD":l=new rn;break;case"Line":l=new ji(n(t.geometry),s(t.material),t.mode);break;case"LineLoop":l=new cs(n(t.geometry),s(t.material));break;case"LineSegments":l=new gi(n(t.geometry),s(t.material));break;case"PointCloud":case"Points":l=new oa(n(t.geometry),s(t.material));break;case"Sprite":l=new nn(s(t.material));break;case"Group":l=new ci;break;default:l=new N}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){f=t.children;for(var p=0;p<f.length;p++)l.add(this.parseObject(f[p],e,i))}if(t.type==="LOD")for(t=t.levels,f=0;f<t.length;f++){p=t[f];var v=l.getObjectByProperty("uuid",p.object);v!==void 0&&l.addLevel(v,p.distance)}return l}});var ku={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Zn={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},oh={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};zh.prototype={constructor:zh,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);var s=this,l=Ts.get(t);if(l!==void 0)return s.manager.itemStart(t),setTimeout(function(){e&&e(l),s.manager.itemEnd(t)},0),l;fetch(t).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,s.options)}).then(function(f){Ts.add(t,f),e&&e(f),s.manager.itemEnd(t)}).catch(function(f){n&&n(f),s.manager.itemError(t),s.manager.itemEnd(t)})},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ql.prototype,{moveTo:function(t,e){this.currentPath=new fr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,s,l){this.currentPath.bezierCurveTo(t,e,i,n,s,l)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(rt){for(var xt=[],gt=0,At=rt.length;gt<At;gt++){var wt=rt[gt],Vt=new Qn;Vt.curves=wt.curves,xt.push(Vt)}return xt}function n(rt,xt){for(var gt=xt.length,At=!1,wt=gt-1,Vt=0;Vt<gt;wt=Vt++){var Z=xt[wt],st=xt[Vt],zt=st.x-Z.x,ee=st.y-Z.y;if(Math.abs(ee)>Number.EPSILON){if(0>ee&&(Z=xt[Vt],zt=-zt,st=xt[wt],ee=-ee),!(rt.y<Z.y||rt.y>st.y))if(rt.y===Z.y){if(rt.x===Z.x)return!0}else{if(wt=ee*(rt.x-Z.x)-zt*(rt.y-Z.y),wt===0)return!0;0>wt||(At=!At)}}else if(rt.y===Z.y&&(st.x<=rt.x&&rt.x<=Z.x||Z.x<=rt.x&&rt.x<=st.x))return!0}return At}var s=ws.isClockWise,l=this.subPaths;if(l.length===0)return[];if(e===!0)return i(l);if(e=[],l.length===1){var f=l[0],p=new Qn;return p.curves=f.curves,e.push(p),e}var v=!s(l[0].getPoints());v=t?!v:v,p=[];var w=[],C=[],P=0;w[P]=void 0,C[P]=[];for(var B=0,H=l.length;B<H;B++){f=l[B];var q=f.getPoints(),K=s(q);(K=t?!K:K)?(!v&&w[P]&&P++,w[P]={s:new Qn,p:q},w[P].s.curves=f.curves,v&&P++,C[P]=[]):C[P].push({h:f,p:q[0]})}if(!w[0])return i(l);if(1<w.length){for(B=!1,t=[],s=0,l=w.length;s<l;s++)p[s]=[];for(s=0,l=w.length;s<l;s++)for(f=C[s],K=0;K<f.length;K++){for(v=f[K],P=!0,q=0;q<w.length;q++)n(v.p,w[q].p)&&(s!==q&&t.push({froms:s,tos:q,hole:K}),P?(P=!1,p[q].push(v)):B=!0);P&&p[s].push(v)}0<t.length&&(B||(C=p))}for(B=0,s=w.length;B<s;B++)for(p=w[B].s,e.push(p),t=C[B],l=0,f=t.length;l<f;l++)p.holes.push(t[l].h);return e}}),Object.assign(kh.prototype,{isFont:!0,generateShapes:function(t,e){e===void 0&&(e=100);var i=[],n=e;e=this.data;var s=Array.from?Array.from(t):String(t).split("");n/=e.resolution;var l=(e.boundingBox.yMax-e.boundingBox.yMin+e.underlineThickness)*n;t=[];for(var f=0,p=0,v=0;v<s.length;v++){var w=s[v];if(w===`
2571
2571
  `)f=0,p-=l;else{var C=n,P=f,B=p;if(w=e.glyphs[w]||e.glyphs["?"]){var H=new Ql;if(w.o)for(var q=w._cachedOutline||(w._cachedOutline=w.o.split(" ")),K=0,rt=q.length;K<rt;)switch(q[K++]){case"m":var xt=q[K++]*C+P,gt=q[K++]*C+B;H.moveTo(xt,gt);break;case"l":xt=q[K++]*C+P,gt=q[K++]*C+B,H.lineTo(xt,gt);break;case"q":var At=q[K++]*C+P,wt=q[K++]*C+B,Vt=q[K++]*C+P,Z=q[K++]*C+B;H.quadraticCurveTo(Vt,Z,At,wt);break;case"b":At=q[K++]*C+P,wt=q[K++]*C+B,Vt=q[K++]*C+P,Z=q[K++]*C+B,xt=q[K++]*C+P,gt=q[K++]*C+B,H.bezierCurveTo(Vt,Z,xt,gt,At,wt)}C={offsetX:w.ha*C,path:H}}else C=void 0;f+=C.offsetX,t.push(C.path)}}for(e=0,s=t.length;e<s;e++)Array.prototype.push.apply(i,t[e].toShapes());return i}}),Object.assign(bu.prototype,{load:function(t,e,i,n){var s=this,l=new Lt(this.manager);l.setPath(this.path),l.load(t,function(f){try{var p=JSON.parse(f)}catch{console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),p=JSON.parse(f.substring(65,f.length-2))}f=s.parse(p),e&&e(f)},i,n)},parse:function(t){return new kh(t)},setPath:function(t){return this.path=t,this}});var ah,qh={getContext:function(){return ah===void 0&&(ah=new(window.AudioContext||window.webkitAudioContext)),ah},setContext:function(t){ah=t}};Object.assign(vn.prototype,{load:function(t,e,i,n){var s=new Lt(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.load(t,function(l){l=l.slice(0),qh.getContext().decodeAudioData(l,function(f){e(f)})},i,n)},setPath:function(t){return this.path=t,this}}),Object.assign(Vn.prototype,{update:function(){var t,e,i,n,s,l,f,p,v=new c,w=new c;return function(C){if(t!==this||e!==C.focus||i!==C.fov||n!==C.aspect*this.aspect||s!==C.near||l!==C.far||f!==C.zoom||p!==this.eyeSep){t=this,e=C.focus,i=C.fov,n=C.aspect*this.aspect,s=C.near,l=C.far,f=C.zoom;var P=C.projectionMatrix.clone();p=this.eyeSep/2;var B=p*s/e,H=s*Math.tan(pi.DEG2RAD*i*.5)/f;w.elements[12]=-p,v.elements[12]=p;var q=-H*n+B,K=H*n+B;P.elements[0]=2*s/(K-q),P.elements[8]=(K+q)/(K-q),this.cameraL.projectionMatrix.copy(P),q=-H*n-B,K=H*n-B,P.elements[0]=2*s/(K-q),P.elements[8]=(K+q)/(K-q),this.cameraR.projectionMatrix.copy(P)}this.cameraL.matrixWorld.copy(C.matrixWorld).multiply(w),this.cameraR.matrixWorld.copy(C.matrixWorld).multiply(v)}}()}),hl.prototype=Object.create(N.prototype),hl.prototype.constructor=hl,Object.assign(Bh.prototype,{start:function(){this.oldTime=this.startTime=(typeof performance>"u"?Date:performance).now(),this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.autoStart=this.running=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=(typeof performance>"u"?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),th.prototype=Object.assign(Object.create(N.prototype),{constructor:th,getInput:function(){return this.gain},removeFilter:function(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this},getFilter:function(){return this.filter},setFilter:function(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this},updateMatrixWorld:function(){var t=new u,e=new d,i=new u,n=new u,s=new Bh;return function(l){N.prototype.updateMatrixWorld.call(this,l),l=this.context.listener;var f=this.up;if(this.timeDelta=s.getDelta(),this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),l.positionX){var p=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(t.x,p),l.positionY.linearRampToValueAtTime(t.y,p),l.positionZ.linearRampToValueAtTime(t.z,p),l.forwardX.linearRampToValueAtTime(n.x,p),l.forwardY.linearRampToValueAtTime(n.y,p),l.forwardZ.linearRampToValueAtTime(n.z,p),l.upX.linearRampToValueAtTime(f.x,p),l.upY.linearRampToValueAtTime(f.y,p),l.upZ.linearRampToValueAtTime(f.z,p)}else l.setPosition(t.x,t.y,t.z),l.setOrientation(n.x,n.y,n.z,f.x,f.y,f.z)}}()}),wa.prototype=Object.assign(Object.create(N.prototype),{constructor:wa,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(this.isPlaying===!0)console.warn("THREE.Audio: Audio is already playing.");else if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else{var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}},pause:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.isPlaying===!0&&(this.source.stop(),this.source.onended=null,this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this},stop:function(){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.source.stop(),this.source.onended=null,this.offset=0,this.isPlaying=!1,this},connect:function(){if(0<this.filters.length){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(0<this.filters.length){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),this.isPlaying===!0?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(this.hasPlaybackControl===!1)console.warn("THREE.Audio: this Audio has no playback control.");else return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),ul.prototype=Object.assign(Object.create(wa.prototype),{constructor:ul,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){return this.panner.refDistance=t,this},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){return this.panner.rolloffFactor=t,this},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){return this.panner.distanceModel=t,this},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){return this.panner.maxDistance=t,this},setDirectionalCone:function(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this},updateMatrixWorld:function(){var t=new u,e=new d,i=new u,n=new u;return function(s){if(N.prototype.updateMatrixWorld.call(this,s),s=this.panner,this.matrixWorld.decompose(t,e,i),n.set(0,0,1).applyQuaternion(e),s.positionX){var l=this.context.currentTime+this.listener.timeDelta;s.positionX.linearRampToValueAtTime(t.x,l),s.positionY.linearRampToValueAtTime(t.y,l),s.positionZ.linearRampToValueAtTime(t.z,l),s.orientationX.linearRampToValueAtTime(n.x,l),s.orientationY.linearRampToValueAtTime(n.y,l),s.orientationZ.linearRampToValueAtTime(n.z,l)}else s.setPosition(t.x,t.y,t.z),s.setOrientation(n.x,n.y,n.z)}}()}),Object.assign(zo.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(cl.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize;t=t*n+n;var s=this.cumulativeWeight;if(s===0){for(s=0;s!==n;++s)i[t+s]=i[s];s=e}else s+=e,this._mixBufferRegion(i,t,0,e/s,n);this.cumulativeWeight=s},apply:function(t){var e=this.valueSize,i=this.buffer;t=t*e+e;var n=this.cumulativeWeight,s=this.binding;this.cumulativeWeight=0,1>n&&this._mixBufferRegion(i,t,3*e,1-n,e),n=e;for(var l=e+e;n!==l;++n)if(i[n]!==i[n+e]){s.setValue(i,t);break}},saveOriginalState:function(){var t=this.buffer,e=this.valueSize,i=3*e;this.binding.getValue(t,i);for(var n=e;n!==i;++n)t[n]=t[i+n%e];this.cumulativeWeight=0},restoreOriginalState:function(){this.binding.setValue(this.buffer,3*this.valueSize)},_select:function(t,e,i,n,s){if(.5<=n)for(n=0;n!==s;++n)t[e+n]=t[i+n]},_slerp:function(t,e,i,n){d.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,s){for(var l=1-n,f=0;f!==s;++f){var p=e+f;t[p]=t[p]*l+t[i+f]*n}}}),Object.assign(ko.prototype,{getValue:function(t,e){this.bind();var i=this._bindings[this._targetGroup.nCachedObjects_];i!==void 0&&i.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,s=i.length;n!==s;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(En,{Composite:ko,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new En.Composite(t,e,i):new En(t,e,i)},sanitizeNodeName:function(){var t=/[\[\]\.:\/]/g;return function(e){return e.replace(/\s/g,"_").replace(t,"")}}(),parseTrackName:function(){var t="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",e=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]");t=/(WCOD+)?/.source.replace("WCOD",t);var i=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),n=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),s=new RegExp("^"+e+t+i+n+"$"),l=["material","materials","bones"];return function(f){var p=s.exec(f);if(!p)throw Error("PropertyBinding: Cannot parse trackName: "+f);p={nodeName:p[2],objectName:p[3],objectIndex:p[4],propertyName:p[5],propertyIndex:p[6]};var v=p.nodeName&&p.nodeName.lastIndexOf(".");if(v!==void 0&&v!==-1){var w=p.nodeName.substring(v+1);l.indexOf(w)!==-1&&(p.nodeName=p.nodeName.substring(0,v),p.objectName=w)}if(p.propertyName===null||p.propertyName.length===0)throw Error("PropertyBinding: can not parse propertyName from trackName: "+f);return p}}(),findNode:function(t,e){if(!e||e===""||e==="root"||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){var n=function(s){for(var l=0;l<s.length;l++){var f=s[l];if(f.name===e||f.uuid===e||(f=n(f.children)))return f}return null};if(t=n(t.children))return t}return null}}),Object.assign(En.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,s=i.length;n!==s;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,s=i.length;n!==s;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,s=i.length;n!==s;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,s=i.length;n!==s;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,s=e.propertyIndex;if(t||(this.node=t=En.findNode(this.rootNode,e.nodeName)||this.rootNode),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var l=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}for(t=t.skeleton.bones,i=0;i<t.length;i++)if(t[i].name===l){l=i;break}break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(l!==void 0){if(t[l]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[l]}}if(l=t[n],l===void 0)console.error("THREE.PropertyBinding: Trying to update property for track: "+e.nodeName+"."+n+" but it wasn't found.",t);else{if(e=this.Versioning.None,this.targetObject=t,t.needsUpdate!==void 0?e=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(e=this.Versioning.MatrixWorldNeedsUpdate),i=this.BindingType.Direct,s!==void 0){if(n==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}for(i=0;i<this.node.geometry.morphAttributes.position.length;i++)if(t.geometry.morphAttributes.position[i].name===s){s=i;break}}else{if(!t.geometry.morphTargets){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);return}for(i=0;i<this.node.geometry.morphTargets.length;i++)if(t.geometry.morphTargets[i].name===s){s=i;break}}}i=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=s}else l.fromArray!==void 0&&l.toArray!==void 0?(i=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(i=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=n;this.getValue=this.GetterByBindingType[i],this.setValue=this.SetterByBindingTypeAndVersioning[i][e]}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),Object.assign(En.prototype,{_getValue_unbound:En.prototype.getValue,_setValue_unbound:En.prototype.setValue}),Object.assign(Ta.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,s=this._paths,l=this._parsedPaths,f=this._bindings,p=f.length,v=void 0,w=0,C=arguments.length;w!==C;++w){var P=arguments[w],B=P.uuid,H=n[B];if(H===void 0){H=e++,n[B]=H,t.push(P),B=0;for(var q=p;B!==q;++B)f[B].push(new En(P,s[B],l[B]))}else if(H<i){v=t[H];var K=--i;for(q=t[K],n[q.uuid]=H,t[H]=q,n[B]=K,t[K]=P,B=0,q=p;B!==q;++B){var rt=f[B],xt=rt[H];rt[H]=rt[K],xt===void 0&&(xt=new En(P,s[B],l[B])),rt[K]=xt}}else t[H]!==v&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,s=n.length,l=0,f=arguments.length;l!==f;++l){var p=arguments[l],v=p.uuid,w=i[v];if(w!==void 0&&w>=e){var C=e++,P=t[C];for(i[P.uuid]=w,t[w]=P,i[v]=C,t[C]=p,p=0,v=s;p!==v;++p){P=n[p];var B=P[w];P[w]=P[C],P[C]=B}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,s=this._bindings,l=s.length,f=0,p=arguments.length;f!==p;++f){var v=arguments[f].uuid,w=n[v];if(w!==void 0)if(delete n[v],w<i){v=--i;var C=t[v],P=--e,B=t[P];for(n[C.uuid]=w,t[w]=C,n[B.uuid]=v,t[v]=B,t.pop(),C=0,B=l;C!==B;++C){var H=s[C],q=H[P];H[w]=H[v],H[v]=q,H.pop()}}else for(P=--e,B=t[P],n[B.uuid]=w,t[w]=B,t.pop(),C=0,B=l;C!==B;++C)H=s[C],H[w]=H[P],H.pop()}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],s=this._bindings;if(n!==void 0)return s[n];var l=this._paths,f=this._parsedPaths,p=this._objects,v=this.nCachedObjects_,w=Array(p.length);for(n=s.length,i[t]=n,l.push(t),f.push(e),s.push(w),i=v,n=p.length;i!==n;++i)w[i]=new En(p[i],t,e);return w},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){var n=this._paths,s=this._parsedPaths,l=this._bindings,f=l.length-1,p=l[f];e[t[f]]=i,l[i]=p,l.pop(),s[i]=s[f],s.pop(),n[i]=n[f],n.pop()}}}),Object.assign(fl.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){i=this._clip.duration;var n=t._clip.duration,s=i/n;t.warp(1,n/i,e),this.warp(s,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,s=n.time,l=this._timeScaleInterpolant,f=this.timeScale;return l===null&&(this._timeScaleInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=s,n[1]=s+i,l[0]=t/f,l[1]=e/f,this},stopWarping:function(){var t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var s=this._startTime;if(s!==null){if(e=(t-s)*i,0>e||i===0)return;this._startTime=null,e*=i}if(e*=this._updateTimeScale(t),i=this._updateTime(e),t=this._updateWeight(t),0<t){e=this._interpolants,s=this._propertyBindings;for(var l=0,f=e.length;l!==f;++l)e[l].evaluate(i),s[l].accumulate(n,t)}}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),n===0&&(this.enabled=!1))}}return this._effectiveWeight=e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(i!==null){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e},_updateTime:function(t){var e=this.time+t,i=this._clip.duration,n=this.loop,s=this._loopCount,l=n===2202;if(t===0)return s===-1?e:l&&(s&1)===1?i-e:e;if(n===2200)t:{if(s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1)),e>=i)e=i;else if(0>e)e=0;else break t;this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:0>t?-1:1})}else{if(s===-1&&(0<=t?(s=0,this._setEndings(!0,this.repetitions===0,l)):this._setEndings(this.repetitions===0,!0,l)),e>=i||0>e){n=Math.floor(e/i),e-=i*n,s+=Math.abs(n);var f=this.repetitions-s;0>=f?(this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=0<t?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:0<t?1:-1})):(f===1?(t=0>t,this._setEndings(t,!t,l)):this._setEndings(!1,!1,l),this._loopCount=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n}))}if(l&&(s&1)===1)return this.time=e,i-e}return this.time=e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,s=n.time,l=this._weightInterpolant;return l===null&&(this._weightInterpolant=l=n._lendControlInterpolant()),n=l.parameterPositions,l=l.sampleValues,n[0]=s,l[0]=e,n[1]=s+t,l[1]=i,this}}),no.prototype=Object.assign(Object.create(a.prototype),{constructor:no,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,s=n.length,l=t._propertyBindings;t=t._interpolants;var f=i.uuid,p=this._bindingsByRootAndName,v=p[f];for(v===void 0&&(v={},p[f]=v),p=0;p!==s;++p){var w=n[p],C=w.name,P=v[C];if(P===void 0){if(P=l[p],P!==void 0){P._cacheIndex===null&&(++P.referenceCount,this._addInactiveBinding(P,f,C));continue}P=new cl(En.create(i,C,e&&e._propertyBindings[p].binding.parsedPath),w.ValueTypeName,w.getValueSize()),++P.referenceCount,this._addInactiveBinding(P,f,C)}l[p]=P,t[p].resultBuffer=P.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var s=e[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var s=e[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){return t=t._cacheIndex,t!==null&&t<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,s=this._actionsByClip,l=s[e];l===void 0?(l={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,s[e]=l):(e=l.knownActions,t._byClipCacheIndex=e.length,e.push(t)),t._cacheIndex=n.length,n.push(t),l.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null,e=t._clip.uuid,i=this._actionsByClip,n=i[e];var s=n.knownActions,l=s[s.length-1],f=t._byClipCacheIndex;l._byClipCacheIndex=f,s[f]=l,s.pop(),t._byClipCacheIndex=null,delete n.actionByRoot[(t._localRoot||this._root).uuid],s.length===0&&delete i[e],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){t=t._propertyBindings;for(var e=0,i=t.length;e!==i;++e){var n=t[e];--n.referenceCount===0&&this._removeInactiveBinding(n)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,s=e[n];t._cacheIndex=n,e[n]=t,s._cacheIndex=i,e[i]=s},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,s=e[n];t._cacheIndex=n,e[n]=t,s._cacheIndex=i,e[i]=s},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,s=n[e],l=this._bindings;s===void 0&&(s={},n[e]=s),s[i]=t,t._cacheIndex=l.length,l.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid;i=i.path;var s=this._bindingsByRootAndName,l=s[n],f=e[e.length-1];t=t._cacheIndex,f._cacheIndex=t,e[t]=f,e.pop(),delete l[i];t:{for(var p in l)break t;delete s[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,s=e[n];t._cacheIndex=n,e[n]=t,s._cacheIndex=i,e[i]=s},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,s=e[n];t._cacheIndex=n,e[n]=t,s._cacheIndex=i,e[i]=s},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return i===void 0&&(i=new Dr(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,s=e[n];t.__cacheIndex=n,e[n]=t,s.__cacheIndex=i,e[i]=s},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid;i=typeof t=="string"?yr.findByName(i,t):t,t=i!==null?i.uuid:t;var s=this._actionsByClip[t],l=null;if(s!==void 0){if(l=s.actionByRoot[n],l!==void 0)return l;l=s.knownActions[0],i===null&&(i=l._clip)}return i===null?null:(e=new fl(this,i,e),this._bindAction(e,l),this._addInactiveAction(e,t,n),e)},existingAction:function(t,e){var i=e||this._root;return e=i.uuid,i=typeof t=="string"?yr.findByName(i,t):t,t=this._actionsByClip[i?i.uuid:t],t!==void 0&&t.actionByRoot[e]||null},stopAllAction:function(){for(var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings,s=this._nActiveBindings=this._nActiveActions=0;s!==e;++s)t[s].reset();for(s=0;s!==n;++s)i[s].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,s=Math.sign(t),l=this._accuIndex^=1,f=0;f!==i;++f)e[f]._update(n,t,s,l);for(t=this._bindings,e=this._nActiveBindings,f=0;f!==e;++f)t[f].apply(l);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions;t=t.uuid;var i=this._actionsByClip,n=i[t];if(n!==void 0){n=n.knownActions;for(var s=0,l=n.length;s!==l;++s){var f=n[s];this._deactivateAction(f);var p=f._cacheIndex,v=e[e.length-1];f._cacheIndex=null,f._byClipCacheIndex=null,v._cacheIndex=p,e[p]=v,e.pop(),this._removeInactiveBindingsForAction(f)}delete i[t]}},uncacheRoot:function(t){t=t.uuid;var e=this._actionsByClip;for(n in e){var i=e[n].actionByRoot[t];i!==void 0&&(this._deactivateAction(i),this._removeInactiveAction(i))}var n=this._bindingsByRootAndName[t];if(n!==void 0)for(var s in n)t=n[s],t.restoreOriginalState(),this._removeInactiveBinding(t)},uncacheAction:function(t,e){t=this.existingAction(t,e),t!==null&&(this._deactivateAction(t),this._removeInactiveAction(t))}}),eh.prototype.clone=function(){return new eh(this.value.clone===void 0?this.value:this.value.clone())},Nh.prototype=Object.assign(Object.create(Ft.prototype),{constructor:Nh,isInstancedBufferGeometry:!0,copy:function(t){return Ft.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return new this.constructor().copy(this)}}),Fh.prototype=Object.assign(Object.create(zi.prototype),{constructor:Fh,isInstancedInterleavedBuffer:!0,copy:function(t){return zi.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Uh.prototype=Object.assign(Object.create(J.prototype),{constructor:Uh,isInstancedBufferAttribute:!0,copy:function(t){return J.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(Au.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){return i=i||[],Bo(t,this,i,e),i.sort(pl),i},intersectObjects:function(t,e,i){if(i=i||[],Array.isArray(t)===!1)return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),i;for(var n=0,s=t.length;n<s;n++)Bo(t[n],this,i,e);return i.sort(pl),i}}),Object.assign(Gh.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?this.phi=this.theta=0:(this.theta=Math.atan2(t,i),this.phi=Math.acos(pi.clamp(e/this.radius,-1,1))),this}}),Object.assign(it.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.setFromCartesianCoords(t.x,t.y,t.z)},setFromCartesianCoords:function(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}}),Object.assign(ro.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new o;return function(e,i){return i=t.copy(i).multiplyScalar(.5),this.min.copy(e).sub(i),this.max.copy(e).add(i),this}}(),clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return t===void 0&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new o),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return t===void 0&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new o),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new o),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return e===void 0&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new o),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new o;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(Ma.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return new this.constructor().copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return t===void 0&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new u),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return t===void 0&&(console.warn("THREE.Line3: .delta() target is now required"),t=new u),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return e===void 0&&(console.warn("THREE.Line3: .at() target is now required"),e=new u),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:function(){var t=new u,e=new u;return function(i,n){return t.subVectors(i,this.start),e.subVectors(this.end,this.start),i=e.dot(e),i=e.dot(t)/i,n&&(i=pi.clamp(i,0,1)),i}}(),closestPointToPoint:function(t,e,i){return t=this.closestPointToPointParameter(t,e),i===void 0&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new u),this.delta(i).multiplyScalar(t).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),qn.prototype=Object.create(N.prototype),qn.prototype.constructor=qn,qn.prototype.isImmediateRenderObject=!0,yi.prototype=Object.create(gi.prototype),yi.prototype.constructor=yi,yi.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var s=this.object.matrixWorld,l=this.geometry.attributes.position,f=this.object.geometry;if(f&&f.isGeometry)for(var p=f.vertices,v=f.faces,w=f=0,C=v.length;w<C;w++)for(var P=v[w],B=0,H=P.vertexNormals.length;B<H;B++){var q=P.vertexNormals[B];t.copy(p[P[n[B]]]).applyMatrix4(s),e.copy(q).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1}else if(f&&f.isBufferGeometry)for(n=f.attributes.position,p=f.attributes.normal,B=f=0,H=n.count;B<H;B++)t.set(n.getX(B),n.getY(B),n.getZ(B)).applyMatrix4(s),e.set(p.getX(B),p.getY(B),p.getZ(B)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),l.setXYZ(f,t.x,t.y,t.z),f+=1,l.setXYZ(f,e.x,e.y,e.z),f+=1;l.needsUpdate=!0}}(),Sa.prototype=Object.create(N.prototype),Sa.prototype.constructor=Sa,Sa.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Sa.prototype.update=function(){var t=new u,e=new u;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Ea.prototype=Object.create(gi.prototype),Ea.prototype.constructor=Ea,Ea.prototype.updateMatrixWorld=function(){var t=new u,e=new c,i=new c;return function(n){var s=this.bones,l=this.geometry,f=l.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var p=0,v=0;p<s.length;p++){var w=s[p];w.parent&&w.parent.isBone&&(e.multiplyMatrices(i,w.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(v,t.x,t.y,t.z),e.multiplyMatrices(i,w.parent.matrixWorld),t.setFromMatrixPosition(e),f.setXYZ(v+1,t.x,t.y,t.z),v+=2)}l.getAttribute("position").needsUpdate=!0,N.prototype.updateMatrixWorld.call(this,n)}}(),kr.prototype=Object.create(di.prototype),kr.prototype.constructor=kr,kr.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},kr.prototype.update=function(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)},ba.prototype=Object.create(N.prototype),ba.prototype.constructor=ba,ba.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},ba.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,this.color!==void 0?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Aa.prototype=Object.create(N.prototype),Aa.prototype.constructor=Aa,Aa.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Aa.prototype.update=function(){var t=new u,e=new L,i=new L;return function(){var n=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{var s=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var l=0,f=s.count;l<f;l++){var p=l<f/2?e:i;s.setXYZ(l,p.r,p.g,p.b)}s.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),dl.prototype=Object.create(gi.prototype),dl.prototype.constructor=dl,ih.prototype=Object.create(gi.prototype),ih.prototype.constructor=ih,ml.prototype=Object.create(gi.prototype),ml.prototype.constructor=ml,ml.prototype.update=function(){var t=new u,e=new u,i=new m;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var n=this.object.matrixWorld,s=this.geometry.attributes.position,l=this.object.geometry,f=l.vertices;l=l.faces;for(var p=0,v=0,w=l.length;v<w;v++){var C=l[v],P=C.normal;t.copy(f[C.a]).add(f[C.b]).add(f[C.c]).divideScalar(3).applyMatrix4(n),e.copy(P).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),s.setXYZ(p,t.x,t.y,t.z),p+=1,s.setXYZ(p,e.x,e.y,e.z),p+=1}s.needsUpdate=!0}}(),pr.prototype=Object.create(N.prototype),pr.prototype.constructor=pr,pr.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},pr.prototype.update=function(){var t=new u,e=new u,i=new u;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(i),this.targetLine.scale.z=i.length()}}(),gl.prototype=Object.create(gi.prototype),gl.prototype.constructor=gl,gl.prototype.update=function(){function t(l,f,p,v){if(n.set(f,p,v).unproject(s),l=i[l],l!==void 0)for(f=e.getAttribute("position"),p=0,v=l.length;p<v;p++)f.setXYZ(l[p],n.x,n.y,n.z)}var e,i,n=new u,s=new Be;return function(){e=this.geometry,i=this.pointMap,s.projectionMatrix.copy(this.camera.projectionMatrix),t("c",0,0,-1),t("t",0,0,1),t("n1",-1,-1,-1),t("n2",1,-1,-1),t("n3",-1,1,-1),t("n4",1,1,-1),t("f1",-1,-1,1),t("f2",1,-1,1),t("f3",-1,1,1),t("f4",1,1,1),t("u1",.7,1.1,-1),t("u2",-.7,1.1,-1),t("u3",0,2,-1),t("cf1",-1,0,1),t("cf2",1,0,1),t("cf3",0,-1,1),t("cf4",0,1,1),t("cn1",-1,0,-1),t("cn2",1,0,-1),t("cn3",0,-1,-1),t("cn4",0,1,-1),e.getAttribute("position").needsUpdate=!0}}(),Ds.prototype=Object.create(gi.prototype),Ds.prototype.constructor=Ds,Ds.prototype.update=function(){var t=new k;return function(e){if(e!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&t.setFromObject(this.object),!t.isEmpty()){e=t.min;var i=t.max,n=this.geometry.attributes.position,s=n.array;s[0]=i.x,s[1]=i.y,s[2]=i.z,s[3]=e.x,s[4]=i.y,s[5]=i.z,s[6]=e.x,s[7]=e.y,s[8]=i.z,s[9]=i.x,s[10]=e.y,s[11]=i.z,s[12]=i.x,s[13]=i.y,s[14]=e.z,s[15]=e.x,s[16]=i.y,s[17]=e.z,s[18]=e.x,s[19]=e.y,s[20]=e.z,s[21]=i.x,s[22]=e.y,s[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),Ds.prototype.setFromObject=function(t){return this.object=t,this.update(),this},Ds.prototype.copy=function(t){return gi.prototype.copy.call(this,t),this.object=t.object,this},Ds.prototype.clone=function(){return new this.constructor().copy(this)},vl.prototype=Object.create(gi.prototype),vl.prototype.constructor=vl,vl.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),N.prototype.updateMatrixWorld.call(this,t))},_l.prototype=Object.create(ji.prototype),_l.prototype.constructor=_l,_l.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;1e-8>Math.abs(e)&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=0>e?1:0,this.lookAt(this.plane.normal),N.prototype.updateMatrixWorld.call(this,t)};var lh,Tl;zs.prototype=Object.create(N.prototype),zs.prototype.constructor=zs,zs.prototype.setDirection=function(){var t=new u,e;return function(i){.99999<i.y?this.quaternion.set(0,0,0,1):-.99999>i.y?this.quaternion.set(1,0,0,0):(t.set(i.z,0,-i.x).normalize(),e=Math.acos(i.y),this.quaternion.setFromAxisAngle(t,e))}}(),zs.prototype.setLength=function(t,e,i){e===void 0&&(e=.2*t),i===void 0&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},zs.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},zs.prototype.copy=function(t){return N.prototype.copy.call(this,t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this},zs.prototype.clone=function(){return new this.constructor().copy(this)},xr.prototype=Object.create(gi.prototype),xr.prototype.constructor=xr,Ee.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Ee.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Os.prototype,{createPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getPoints(t),this.createGeometry(t)},createSpacedPointsGeometry:function(t){return console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."),t=this.getSpacedPoints(t),this.createGeometry(t)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new j,i=0,n=t.length;i<n;i++){var s=t[i];e.vertices.push(new u(s.x,s.y,s.z||0))}return e}}),Object.assign(fr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Pu.prototype=Object.create(On.prototype),Lu.prototype=Object.create(On.prototype),Hh.prototype=Object.create(On.prototype),Object.assign(Hh.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),dl.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Ea.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Is.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Fo.extractUrlBase(t)}}),Object.assign(Do.prototype,{setTexturePath:function(t){return console.warn("THREE.JSONLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ll.prototype,{setTexturePath:function(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}}),Object.assign(ro.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(k.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Ma.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(pi,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),pi.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),pi.ceilPowerOfTwo(t)}}),Object.assign(m.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(c.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return t===void 0&&(t=new u),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,s,l){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,s,l)}}),F.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},d.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(Oi.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Oe.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Oe,{barycoordFromPoint:function(t,e,i,n,s){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Oe.getBarycoord(t,e,i,n,s)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Oe.getNormal(t,e,i,n)}}),Object.assign(Qn.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Cs(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Ps(this,t)}}),Object.assign(o.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(u.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(y.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(j.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(N.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(N.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(rn.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(un.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Ee.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),ye.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(tn.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(J.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(Ft.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){i!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(Ft.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(ps.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(eh.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Yt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new L}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=t===1}}}),Object.defineProperties(Jr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties($e.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(xe.prototype,{clearTarget:function(t,e,i,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(t),this.clear(e,i,n)},animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(xe.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(_e.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(S.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(mi.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}},userHeight:{set:function(){console.warn("THREE.WebVRManager: .userHeight has been removed.")}}}),wa.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return new vn().load(t,function(i){e.setBuffer(i)}),this},zo.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},hl.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)},so.crossOrigin=void 0,so.loadTexture=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");var s=new fn;return s.setCrossOrigin(this.crossOrigin),t=s.load(t,i,void 0,n),e&&(t.mapping=e),t},so.loadTextureCube=function(t,e,i,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");var s=new Ni;return s.setCrossOrigin(this.crossOrigin),t=s.load(t,i,void 0,n),e&&(t.mapping=e),t},so.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},so.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},x.WebGLRenderTargetCube=A,x.WebGLRenderTarget=S,x.WebGLRenderer=xe,x.ShaderLib=xs,x.UniformsLib=qe,x.UniformsUtils=Bn,x.ShaderChunk=bi,x.FogExp2=Le,x.Fog=Sn,x.Scene=Xn,x.Sprite=nn,x.LOD=rn,x.SkinnedMesh=Gi,x.Skeleton=un,x.Bone=cn,x.Mesh=di,x.LineSegments=gi,x.LineLoop=cs,x.Line=ji,x.Points=oa,x.Group=ci,x.VideoTexture=Rh,x.DataTexture=I,x.DataTexture3D=Q,x.CompressedTexture=qs,x.CubeTexture=z,x.CanvasTexture=Za,x.DepthTexture=Ja,x.Texture=_,x.AnimationLoader=Qt,x.CompressedTextureLoader=Zt,x.DataTextureLoader=Ue,x.CubeTextureLoader=Ni,x.TextureLoader=fn,x.ObjectLoader=ll,x.MaterialLoader=Kl,x.BufferGeometryLoader=Dh,x.DefaultLoadingManager=tr,x.LoadingManager=to,x.JSONLoader=Do,x.ImageLoader=ai,x.ImageBitmapLoader=zh,x.FontLoader=bu,x.FileLoader=Lt,x.Loader=Is,x.LoaderUtils=Fo,x.Cache=Ts,x.AudioLoader=vn,x.SpotLightShadow=ol,x.SpotLight=al,x.PointLight=Oo,x.RectAreaLight=$l,x.HemisphereLight=sl,x.DirectionalLightShadow=io,x.DirectionalLight=ys,x.AmbientLight=Io,x.LightShadow=_s,x.Light=tn,x.StereoCamera=Vn,x.PerspectiveCamera=ye,x.OrthographicCamera=xa,x.CubeCamera=hl,x.ArrayCamera=Fe,x.Camera=Be,x.AudioListener=th,x.PositionalAudio=ul,x.AudioContext=qh,x.AudioAnalyser=zo,x.Audio=wa,x.VectorKeyframeTrack=_a,x.StringKeyframeTrack=Jl,x.QuaternionKeyframeTrack=va,x.NumberKeyframeTrack=$r,x.ColorKeyframeTrack=Zl,x.BooleanKeyframeTrack=Yl,x.PropertyMixer=cl,x.PropertyBinding=En,x.KeyframeTrack=Hn,x.AnimationUtils=Yn,x.AnimationObjectGroup=Ta,x.AnimationMixer=no,x.AnimationClip=yr,x.Uniform=eh,x.InstancedBufferGeometry=Nh,x.BufferGeometry=Ft,x.Geometry=j,x.InterleavedBufferAttribute=ki,x.InstancedInterleavedBuffer=Fh,x.InterleavedBuffer=zi,x.InstancedBufferAttribute=Uh,x.Face3=R,x.Object3D=N,x.Raycaster=Au,x.Layers=U,x.EventDispatcher=a,x.Clock=Bh,x.QuaternionLinearInterpolant=ar,x.LinearInterpolant=Dr,x.DiscreteInterpolant=Ro,x.CubicInterpolant=rl,x.Interpolant=$n,x.Triangle=Oe,x.Math=pi,x.Spherical=Gh,x.Cylindrical=it,x.Plane=F,x.Frustum=E,x.Sphere=D,x.Ray=Oi,x.Matrix4=c,x.Matrix3=m,x.Box3=k,x.Box2=ro,x.Line3=Ma,x.Euler=b,x.Vector4=y,x.Vector3=u,x.Vector2=o,x.Quaternion=d,x.Color=L,x.ImmediateRenderObject=qn,x.VertexNormalsHelper=yi,x.SpotLightHelper=Sa,x.SkeletonHelper=Ea,x.PointLightHelper=kr,x.RectAreaLightHelper=ba,x.HemisphereLightHelper=Aa,x.GridHelper=dl,x.PolarGridHelper=ih,x.FaceNormalsHelper=ml,x.DirectionalLightHelper=pr,x.CameraHelper=gl,x.BoxHelper=Ds,x.Box3Helper=vl,x.PlaneHelper=_l,x.ArrowHelper=zs,x.AxesHelper=xr,x.Shape=Qn,x.Path=fr,x.ShapePath=Ql,x.Font=kh,x.CurvePath=Os,x.Curve=Ee,x.ImageUtils=so,x.ShapeUtils=ws,x.WebGLUtils=He,x.WireframeGeometry=aa,x.ParametricGeometry=$a,x.ParametricBufferGeometry=la,x.TetrahedronGeometry=Ka,x.TetrahedronBufferGeometry=ha,x.OctahedronGeometry=Qa,x.OctahedronBufferGeometry=_o,x.IcosahedronGeometry=tl,x.IcosahedronBufferGeometry=ua,x.DodecahedronGeometry=ca,x.DodecahedronBufferGeometry=fa,x.PolyhedronGeometry=Xi,x.PolyhedronBufferGeometry=xi,x.TubeGeometry=gn,x.TubeBufferGeometry=Ys,x.TorusKnotGeometry=Zr,x.TorusKnotBufferGeometry=yo,x.TorusGeometry=xo,x.TorusBufferGeometry=Un,x.TextGeometry=il,x.TextBufferGeometry=To,x.SphereGeometry=Zs,x.SphereBufferGeometry=Or,x.RingGeometry=nl,x.RingBufferGeometry=Mo,x.PlaneGeometry=ke,x.PlaneBufferGeometry=ce,x.LatheGeometry=ma,x.LatheBufferGeometry=Js,x.ShapeGeometry=Ps,x.ShapeBufferGeometry=$s,x.ExtrudeGeometry=Cs,x.ExtrudeBufferGeometry=ps,x.EdgesGeometry=Ks,x.ConeGeometry=ga,x.ConeBufferGeometry=Gn,x.CylinderGeometry=Ls,x.CylinderBufferGeometry=Rs,x.CircleGeometry=So,x.CircleBufferGeometry=ds,x.BoxGeometry=Ot,x.BoxBufferGeometry=Bt,x.ShadowMaterial=Qs,x.SpriteMaterial=Hi,x.RawShaderMaterial=Eo,x.ShaderMaterial=$e,x.PointsMaterial=Fn,x.MeshPhysicalMaterial=bo,x.MeshStandardMaterial=ms,x.MeshPhongMaterial=Jr,x.MeshToonMaterial=Ao,x.MeshNormalMaterial=Co,x.MeshLambertMaterial=Ir,x.MeshDepthMaterial=oe,x.MeshDistanceMaterial=te,x.MeshBasicMaterial=Ge,x.MeshMatcapMaterial=Po,x.LineDashedMaterial=Lo,x.LineBasicMaterial=Bi,x.Material=Yt,x.Float64BufferAttribute=Ct,x.Float32BufferAttribute=Et,x.Uint32BufferAttribute=Pt,x.Int32BufferAttribute=G,x.Uint16BufferAttribute=yt,x.Int16BufferAttribute=et,x.Uint8ClampedBufferAttribute=It,x.Uint8BufferAttribute=ct,x.Int8BufferAttribute=$,x.BufferAttribute=J,x.ArcCurve=ya,x.CatmullRomCurve3=On,x.CubicBezierCurve=hr,x.CubicBezierCurve3=Ti,x.EllipseCurve=Kn,x.LineCurve=ur,x.LineCurve3=zr,x.QuadraticBezierCurve=cr,x.QuadraticBezierCurve3=vs,x.SplineCurve=Kr,x.REVISION="98",x.MOUSE={LEFT:0,MIDDLE:1,RIGHT:2},x.CullFaceNone=0,x.CullFaceBack=1,x.CullFaceFront=2,x.CullFaceFrontBack=3,x.FrontFaceDirectionCW=0,x.FrontFaceDirectionCCW=1,x.BasicShadowMap=0,x.PCFShadowMap=1,x.PCFSoftShadowMap=2,x.FrontSide=0,x.BackSide=1,x.DoubleSide=2,x.FlatShading=1,x.SmoothShading=2,x.NoColors=0,x.FaceColors=1,x.VertexColors=2,x.NoBlending=0,x.NormalBlending=1,x.AdditiveBlending=2,x.SubtractiveBlending=3,x.MultiplyBlending=4,x.CustomBlending=5,x.AddEquation=100,x.SubtractEquation=101,x.ReverseSubtractEquation=102,x.MinEquation=103,x.MaxEquation=104,x.ZeroFactor=200,x.OneFactor=201,x.SrcColorFactor=202,x.OneMinusSrcColorFactor=203,x.SrcAlphaFactor=204,x.OneMinusSrcAlphaFactor=205,x.DstAlphaFactor=206,x.OneMinusDstAlphaFactor=207,x.DstColorFactor=208,x.OneMinusDstColorFactor=209,x.SrcAlphaSaturateFactor=210,x.NeverDepth=0,x.AlwaysDepth=1,x.LessDepth=2,x.LessEqualDepth=3,x.EqualDepth=4,x.GreaterEqualDepth=5,x.GreaterDepth=6,x.NotEqualDepth=7,x.MultiplyOperation=0,x.MixOperation=1,x.AddOperation=2,x.NoToneMapping=0,x.LinearToneMapping=1,x.ReinhardToneMapping=2,x.Uncharted2ToneMapping=3,x.CineonToneMapping=4,x.UVMapping=300,x.CubeReflectionMapping=301,x.CubeRefractionMapping=302,x.EquirectangularReflectionMapping=303,x.EquirectangularRefractionMapping=304,x.SphericalReflectionMapping=305,x.CubeUVReflectionMapping=306,x.CubeUVRefractionMapping=307,x.RepeatWrapping=1e3,x.ClampToEdgeWrapping=1001,x.MirroredRepeatWrapping=1002,x.NearestFilter=1003,x.NearestMipMapNearestFilter=1004,x.NearestMipMapLinearFilter=1005,x.LinearFilter=1006,x.LinearMipMapNearestFilter=1007,x.LinearMipMapLinearFilter=1008,x.UnsignedByteType=1009,x.ByteType=1010,x.ShortType=1011,x.UnsignedShortType=1012,x.IntType=1013,x.UnsignedIntType=1014,x.FloatType=1015,x.HalfFloatType=1016,x.UnsignedShort4444Type=1017,x.UnsignedShort5551Type=1018,x.UnsignedShort565Type=1019,x.UnsignedInt248Type=1020,x.AlphaFormat=1021,x.RGBFormat=1022,x.RGBAFormat=1023,x.LuminanceFormat=1024,x.LuminanceAlphaFormat=1025,x.RGBEFormat=1023,x.DepthFormat=1026,x.DepthStencilFormat=1027,x.RedFormat=1028,x.RGB_S3TC_DXT1_Format=33776,x.RGBA_S3TC_DXT1_Format=33777,x.RGBA_S3TC_DXT3_Format=33778,x.RGBA_S3TC_DXT5_Format=33779,x.RGB_PVRTC_4BPPV1_Format=35840,x.RGB_PVRTC_2BPPV1_Format=35841,x.RGBA_PVRTC_4BPPV1_Format=35842,x.RGBA_PVRTC_2BPPV1_Format=35843,x.RGB_ETC1_Format=36196,x.RGBA_ASTC_4x4_Format=37808,x.RGBA_ASTC_5x4_Format=37809,x.RGBA_ASTC_5x5_Format=37810,x.RGBA_ASTC_6x5_Format=37811,x.RGBA_ASTC_6x6_Format=37812,x.RGBA_ASTC_8x5_Format=37813,x.RGBA_ASTC_8x6_Format=37814,x.RGBA_ASTC_8x8_Format=37815,x.RGBA_ASTC_10x5_Format=37816,x.RGBA_ASTC_10x6_Format=37817,x.RGBA_ASTC_10x8_Format=37818,x.RGBA_ASTC_10x10_Format=37819,x.RGBA_ASTC_12x10_Format=37820,x.RGBA_ASTC_12x12_Format=37821,x.LoopOnce=2200,x.LoopRepeat=2201,x.LoopPingPong=2202,x.InterpolateDiscrete=2300,x.InterpolateLinear=2301,x.InterpolateSmooth=2302,x.ZeroCurvatureEnding=2400,x.ZeroSlopeEnding=2401,x.WrapAroundEnding=2402,x.TrianglesDrawMode=0,x.TriangleStripDrawMode=1,x.TriangleFanDrawMode=2,x.LinearEncoding=3e3,x.sRGBEncoding=3001,x.GammaEncoding=3007,x.RGBEEncoding=3002,x.LogLuvEncoding=3003,x.RGBM7Encoding=3004,x.RGBM16Encoding=3005,x.RGBDEncoding=3006,x.BasicDepthPacking=3200,x.RGBADepthPacking=3201,x.TangentSpaceNormalMap=0,x.ObjectSpaceNormalMap=1,x.CubeGeometry=Ot,x.Face4=function(t,e,i,n,s,l,f){return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."),new R(t,e,i,s,l,f)},x.LineStrip=0,x.LinePieces=1,x.MeshFaceMaterial=function(t){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),t},x.MultiMaterial=function(t){return t===void 0&&(t=[]),console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),t.isMultiMaterial=!0,t.materials=t,t.clone=function(){return t.slice()},t},x.PointCloud=function(t,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new oa(t,e)},x.Particle=function(t){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new nn(t)},x.ParticleSystem=function(t,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new oa(t,e)},x.PointCloudMaterial=function(t){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleBasicMaterial=function(t){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.ParticleSystemMaterial=function(t){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new Fn(t)},x.Vertex=function(t,e,i){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new u(t,e,i)},x.DynamicBufferAttribute=function(t,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setDynamic( true ) instead."),new J(t,e).setDynamic(!0)},x.Int8Attribute=function(t,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new $(t,e)},x.Uint8Attribute=function(t,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new ct(t,e)},x.Uint8ClampedAttribute=function(t,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new It(t,e)},x.Int16Attribute=function(t,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new et(t,e)},x.Uint16Attribute=function(t,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new yt(t,e)},x.Int32Attribute=function(t,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new G(t,e)},x.Uint32Attribute=function(t,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Pt(t,e)},x.Float32Attribute=function(t,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new Et(t,e)},x.Float64Attribute=function(t,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Ct(t,e)},x.ClosedSplineCurve3=Pu,x.SplineCurve3=Lu,x.Spline=Hh,x.AxisHelper=function(t){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new xr(t)},x.BoundingBoxHelper=function(t,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Ds(t,e)},x.EdgesHelper=function(t,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new gi(new Ks(t.geometry),new Bi({color:e!==void 0?e:16777215}))},x.WireframeHelper=function(t,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new gi(new aa(t.geometry),new Bi({color:e!==void 0?e:16777215}))},x.XHRLoader=function(t){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Lt(t)},x.BinaryTextureLoader=function(t){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Ue(t)},x.GeometryUtils={merge:function(t,e,i){if(console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."),e.isMesh){e.matrixAutoUpdate&&e.updateMatrix();var n=e.matrix;e=e.geometry}t.merge(e,n,i)},center:function(t){return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."),t.center()}},x.Projector=function(){console.error("THREE.Projector has been moved to /examples/js/renderers/Projector.js."),this.projectVector=function(t,e){console.warn("THREE.Projector: .projectVector() is now vector.project()."),t.project(e)},this.unprojectVector=function(t,e){console.warn("THREE.Projector: .unprojectVector() is now vector.unproject()."),t.unproject(e)},this.pickingRay=function(){console.error("THREE.Projector: .pickingRay() is now raycaster.setFromCamera().")}},x.CanvasRenderer=function(){console.error("THREE.CanvasRenderer has been removed")},x.SceneUtils={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js")}},x.LensFlare=function(){console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js")},Object.defineProperty(x,"__esModule",{value:!0})}),THREE.Sky=function(){var x=THREE.Sky.SkyShader,a=new THREE.ShaderMaterial({fragmentShader:x.fragmentShader,vertexShader:x.vertexShader,uniforms:THREE.UniformsUtils.clone(x.uniforms),side:THREE.BackSide});THREE.Mesh.call(this,new THREE.BoxBufferGeometry(1,1,1),a)},THREE.Sky.prototype=Object.create(THREE.Mesh.prototype),THREE.Sky.SkyShader={uniforms:{luminance:{value:1},turbidity:{value:2},rayleigh:{value:1},mieCoefficient:{value:.005},mieDirectionalG:{value:.8},sunPosition:{value:new THREE.Vector3}},vertexShader:["uniform vec3 sunPosition;","uniform float rayleigh;","uniform float turbidity;","uniform float mieCoefficient;","varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float e = 2.71828182845904523536028747135266249775724709369995957;","const float pi = 3.141592653589793238462643383279502884197169;","const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );","const vec3 totalRayleigh = vec3( 5.804542996261093E-6, 1.3562911419845635E-5, 3.0265902468824876E-5 );","const float v = 4.0;","const vec3 K = vec3( 0.686, 0.678, 0.666 );","const vec3 MieConst = vec3( 1.8399918514433978E14, 2.7798023919660528E14, 4.0790479543861094E14 );","const float cutoffAngle = 1.6110731556870734;","const float steepness = 1.5;","const float EE = 1000.0;","float sunIntensity( float zenithAngleCos ) {"," zenithAngleCos = clamp( zenithAngleCos, -1.0, 1.0 );"," return EE * max( 0.0, 1.0 - pow( e, -( ( cutoffAngle - acos( zenithAngleCos ) ) / steepness ) ) );","}","vec3 totalMie( float T ) {"," float c = ( 0.2 * T ) * 10E-18;"," return 0.434 * c * MieConst;","}","void main() {"," vec4 worldPosition = modelMatrix * vec4( position, 1.0 );"," vWorldPosition = worldPosition.xyz;"," gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );"," gl_Position.z = gl_Position.w;"," vSunDirection = normalize( sunPosition );"," vSunE = sunIntensity( dot( vSunDirection, up ) );"," vSunfade = 1.0 - clamp( 1.0 - exp( ( sunPosition.y / 450000.0 ) ), 0.0, 1.0 );"," float rayleighCoefficient = rayleigh - ( 1.0 * ( 1.0 - vSunfade ) );"," vBetaR = totalRayleigh * rayleighCoefficient;"," vBetaM = totalMie( turbidity ) * mieCoefficient;","}"].join(`
2572
2572
  `),fragmentShader:["varying vec3 vWorldPosition;","varying vec3 vSunDirection;","varying float vSunfade;","varying vec3 vBetaR;","varying vec3 vBetaM;","varying float vSunE;","uniform float luminance;","uniform float mieDirectionalG;","const vec3 cameraPos = vec3( 0.0, 1.0, 0.0 );","const float pi = 3.141592653589793238462643383279502884197169;","const float n = 1.0003;","const float N = 2.545E25;","const float rayleighZenithLength = 8.4E3;","const float mieZenithLength = 1.25E3;","const vec3 up = vec3( 0.0, 1.0, 0.0 );","const float sunAngularDiameterCos = 0.999956676946448443553574619906976478926848692873900859324;","const float THREE_OVER_SIXTEENPI = 0.05968310365946075;","const float ONE_OVER_FOURPI = 0.07957747154594767;","float rayleighPhase( float cosTheta ) {"," return THREE_OVER_SIXTEENPI * ( 1.0 + pow( cosTheta, 2.0 ) );","}","float hgPhase( float cosTheta, float g ) {"," float g2 = pow( g, 2.0 );"," float inverse = 1.0 / pow( 1.0 - 2.0 * g * cosTheta + g2, 1.5 );"," return ONE_OVER_FOURPI * ( ( 1.0 - g2 ) * inverse );","}","const float A = 0.15;","const float B = 0.50;","const float C = 0.10;","const float D = 0.20;","const float E = 0.02;","const float F = 0.30;","const float whiteScale = 1.0748724675633854;","vec3 Uncharted2Tonemap( vec3 x ) {"," return ( ( x * ( A * x + C * B ) + D * E ) / ( x * ( A * x + B ) + D * F ) ) - E / F;","}","void main() {"," float zenithAngle = acos( max( 0.0, dot( up, normalize( vWorldPosition - cameraPos ) ) ) );"," float inverse = 1.0 / ( cos( zenithAngle ) + 0.15 * pow( 93.885 - ( ( zenithAngle * 180.0 ) / pi ), -1.253 ) );"," float sR = rayleighZenithLength * inverse;"," float sM = mieZenithLength * inverse;"," vec3 Fex = exp( -( vBetaR * sR + vBetaM * sM ) );"," float cosTheta = dot( normalize( vWorldPosition - cameraPos ), vSunDirection );"," float rPhase = rayleighPhase( cosTheta * 0.5 + 0.5 );"," vec3 betaRTheta = vBetaR * rPhase;"," float mPhase = hgPhase( cosTheta, mieDirectionalG );"," vec3 betaMTheta = vBetaM * mPhase;"," vec3 Lin = pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * ( 1.0 - Fex ), vec3( 1.5 ) );"," Lin *= mix( vec3( 1.0 ), pow( vSunE * ( ( betaRTheta + betaMTheta ) / ( vBetaR + vBetaM ) ) * Fex, vec3( 1.0 / 2.0 ) ), clamp( pow( 1.0 - dot( up, vSunDirection ), 5.0 ), 0.0, 1.0 ) );"," vec3 direction = normalize( vWorldPosition - cameraPos );"," float theta = acos( direction.y ); // elevation --> y-axis, [-pi/2, pi/2]"," float phi = atan( direction.z, direction.x ); // azimuth --> x-axis [-pi/2, pi/2]"," vec2 uv = vec2( phi, theta ) / vec2( 2.0 * pi, pi ) + vec2( 0.5, 0.0 );"," vec3 L0 = vec3( 0.1 ) * Fex;"," float sundisk = smoothstep( sunAngularDiameterCos, sunAngularDiameterCos + 0.00002, cosTheta );"," L0 += ( vSunE * 19000.0 * Fex ) * sundisk;"," vec3 texColor = ( Lin + L0 ) * 0.04 + vec3( 0.0, 0.0003, 0.00075 );"," vec3 curr = Uncharted2Tonemap( ( log2( 2.0 / pow( luminance, 4.0 ) ) ) * texColor );"," vec3 color = curr * whiteScale;"," vec3 retColor = pow( color, vec3( 1.0 / ( 1.2 + ( 1.2 * vSunfade ) ) ) );"," gl_FragColor = vec4( retColor, 1.0 );","}"].join(`
2573
- `)},function(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var o=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",d=1,u=function(m){for(var _=m.parentNode,y=m.nodeValue,S=y.length,A=-1;++A<S;){var I=document.createElement(o);c&&(I.className=c+d,d++),I.appendChild(document.createTextNode(y[A])),_.insertBefore(I,m)}_.removeChild(m)};return function m(_){for(var y=[].slice.call(_.childNodes),S=y.length,A=-1;++A<S;)m(y[A]);_.nodeType===Node.TEXT_NODE&&u(_)}(x),x});class nm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,o,c){console.log("customAttributes",c);let d=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,_)=>{let y,S,A,I,k,D,F,E,L;if(typeof a!="object"){let b=this.query(a);b||_("缺少树结构");let{id:U,bimModelExcavationDetails:N,bimModel:j}=b;y=U,S=j.modelType,A=j.tender,I=j.releasedDistance,k=j.modelName,D=j.isDynamicReleased,F={bimModelExcavationDetails:N},E=b.url,L=j.modelColor}else y=a.modelId,S=a.modelType,A=a.tender,I=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color;let T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};c&&(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList));let R=window.map.getLayer(a,"modelId");if(R)return m(R),c.color&&this.editColor(a,c.color,c),!1;if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:y,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(U=>{let N=null;L&&(N={color:{conditions:[["true",L]]}}),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:y,modelType:S,tender:A,releasedDistance:I,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:N,clip:T,flat:M,maximumScreenSpaceError:16,maximumMemoryUsage:1024,cacheBytes:1073741824*2,maximumCacheOverflowBytes:2147483648*2}),this.tilesetLayer.bindPopup(j=>{if(j.graphic){const J=j.graphic.attr;let $=null,ct=null;return JSON.stringify(J)!=="{}"?(J.name&&($=J.name.lastIndexOf("@")),$&&$>-1&&(ct=J.name.slice(0,$)),J.name?`&nbsp;&nbsp;<span>${ct||J.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(j=>{m(j);let{modelId:J}=j.options;j.clip.options.area.forEach($=>{window.bimClip.activeObj[J][$.id].id==null&&(window.bimClip.activeObj[J][$.id].id=$.id)})}).catch(j=>{m()}),this.tilesetLayer.on("click",j=>{j.layer.style==null&&map.bimMapEdit=="0"&&j.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),o&&Object.keys(o).forEach(j=>{this.tilesetLayer.on(u.get(j),J=>{o[j](J)})}),S==0&&this.bimObliquePhotographyId.push(y),d?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(U=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:y,url:E})})})}remove(a,o){let c=o==null?void 0:o.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,o,c,d=!0){return new Promise((u,m)=>{let _=window.map.getLayer(a,"modelId");_?(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),d?_.flyTo({complete:()=>{u(_)}}):u(_)):this.add(a,o,c).then(y=>{y&&(y.style==null&&map.bimMapEdit=="0"&&y.openHighlight({color:"rgba(255,0,0,1)"},!0),d?y.flyTo({complete:()=>{u(y)}}):u(y))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(o=>o.id==a)}queryModel(a){return window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,o,c,d="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(o)u.style={color:{conditions:[[d,o]]}};else{let _=this.query(a).modelColor;_?u.style={color:{conditions:[[d,_]]}}:u.style=null}}editOpacity(a,o){window.map.getLayer(a,"modelId").opacity=o}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const iu=x=>Object.prototype.toString.call(x)==="[object Object]";function nu(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(o=>{if(iu(o)){iu(a)||(a={});for(let c in o)a[c]&&iu(o[c])?a[c]=nu(a[c],o[c]):a[c]=o[c]}else o instanceof Array&&(a instanceof Array||(a=[]),o.forEach((c,d)=>{iu(c)?a[d]=nu(a[d]):a[d]=c}))}),a}let ph={};const Mf=(x,a,o)=>{ph={};let{vectorStyle:c,difference:d}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:_,title:y,font_color:S,content:A,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:b}=c,{theme_color2:U,theme_color3:N}=b;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
2573
+ `)},function(x){typeof module>"u"?window.charming=x:module.exports=x}(function(x,a){a=a||{};var o=a.tagName||"span",c=a.classPrefix!=null?a.classPrefix:"char",d=1,u=function(m){for(var _=m.parentNode,y=m.nodeValue,S=y.length,A=-1;++A<S;){var I=document.createElement(o);c&&(I.className=c+d,d++),I.appendChild(document.createTextNode(y[A])),_.insertBefore(I,m)}_.removeChild(m)};return function m(_){for(var y=[].slice.call(_.childNodes),S=y.length,A=-1;++A<S;)m(y[A]);_.nodeType===Node.TEXT_NODE&&u(_)}(x),x});class nm{constructor(a=[]){mars3d?(this.tilesetLayer,this.modelArr=a,this.bimObliquePhotographyId=[],this.editDate={id:null}):console.error("未引入指定插件")}pushModel(a){this.modelArr.push(a)}add(a,o,c){console.log("customAttributes",c);let d=c==null?void 0:c.isClone;const u=new Map([["click",mars3d.EventType.click],["initialTilesLoaded",mars3d.EventType.initialTilesLoaded]]);return new Promise((m,_)=>{let y,S,A,I,k,D,F,E,L;if(typeof a!="object"){let b=this.query(a);b||_("缺少树结构");let{id:U,bimModelExcavationDetails:N,bimModel:j}=b;y=U,S=j.modelType,A=j.tender,I=j.releasedDistance,k=j.modelName,D=j.isDynamicReleased,F={bimModelExcavationDetails:N},E=b.url,L=j.modelColor}else y=a.modelId,S=a.modelType,A=a.tender,I=a.releasedDistance,k=a.modelTitle,D=a.permission,F=a.customize,E=a.url,L=a.color;let T={enabled:!0,precise:!1,czm:!1},M={enabled:!0,precise:!1,czm:!1};c&&(c.color&&(L=c.color),c.clip&&(T.area=c.clip.handleDataList),c.flat&&(M.area=c.flat.handleDataList));let R=window.map.getLayer(a,"modelId");if(R)return m(R),c.color&&this.editColor(a,c.color,c),!1;if(E.indexOf("tileset.json")<0)return console.error("链接不完整",k),m({tite:"【模型】「"+k+"」链接地址有误",type:"error",id:y,url:E}),!1;new Cesium.Resource({url:E}).fetchJson().then(U=>{let N=null;L&&(N={color:{conditions:[["true",L]]}}),this.tilesetLayer=new mars3d.layer.TilesetLayer({modelId:y,modelType:S,tender:A,releasedDistance:I,modelTitle:k,permission:D,customize:F,url:encodeURI(E),skipLevelOfDetail:!1,loadSiblings:!0,cullRequestsWhileMoving:!0,cullRequestsWhileMovingMultiplier:10,preferLeaves:!0,progressiveResolutionHeightFraction:.5,dynamicScreenSpaceError:!0,preloadWhenHidden:!1,style:N,clip:T,flat:M,maximumScreenSpaceError:16,maximumMemoryUsage:1024}),this.tilesetLayer.bindPopup(j=>{if(j.graphic){const J=j.graphic.attr;let $=null,ct=null;return JSON.stringify(J)!=="{}"?(J.name&&($=J.name.lastIndexOf("@")),$&&$>-1&&(ct=J.name.slice(0,$)),J.name?`&nbsp;&nbsp;<span>${ct||J.name}</span>&nbsp;&nbsp;`:`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`):`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}else return`&nbsp;&nbsp;<span>${k}</span>&nbsp;&nbsp;`}),this.tilesetLayer.readyPromise.then(j=>{m(j);let{modelId:J}=j.options;j.clip.options.area.forEach($=>{window.bimClip.activeObj[J][$.id].id==null&&(window.bimClip.activeObj[J][$.id].id=$.id)})}).catch(j=>{m()}),this.tilesetLayer.on("click",j=>{j.layer.style==null&&map.bimMapEdit=="0"&&j.layer.openHighlight({color:"rgba(255,0,0,1)"},!0)}),o&&Object.keys(o).forEach(j=>{this.tilesetLayer.on(u.get(j),J=>{o[j](J)})}),S==0&&this.bimObliquePhotographyId.push(y),d?window.mapClone&&window.mapClone.mapEx.addLayer(this.tilesetLayer):window.map.addLayer(this.tilesetLayer)}).catch(U=>{console.error("数据加载失败",k),m({tite:"【模型】「"+k+"」无法加载",type:"error",id:y,url:E})})})}remove(a,o){let c=o==null?void 0:o.isClone;window.map.getLayer(a,"modelId")&&(c?(window.mapClone.mapEx.getLayer(a,"modelId").closeHighlight(),window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"modelId"))):(window.map.getLayer(a,"modelId").closeHighlight(),window.map.removeLayer(window.map.getLayer(a,"modelId"))))}selected(a,o,c,d=!0){return new Promise((u,m)=>{let _=window.map.getLayer(a,"modelId");_?(_.style==null&&map.bimMapEdit=="0"&&_.openHighlight({color:"rgba(255,0,0,1)"},!0),d?_.flyTo({complete:()=>{u(_)}}):u(_)):this.add(a,o,c).then(y=>{y&&(y.style==null&&map.bimMapEdit=="0"&&y.openHighlight({color:"rgba(255,0,0,1)"},!0),d?y.flyTo({complete:()=>{u(y)}}):u(y))})})}initial(){this.modelArr=[],this.bimObliquePhotographyId=[],this.tilesetLayer=null}query(a){return this.modelArr.length==0?!1:this.modelArr.find(o=>o.id==a)}queryModel(a){return window.map.getLayer(a,"modelId")}postEditDate(a){this.editDate={id:a}}editColor(a,o,c,d="true"){let u,m=c==null?void 0:c.isClone;if(typeof a!="object"&&(m?u=window.mapClone.mapEx.getLayer(a,"modelId"):u=window.map.getLayer(a,"modelId")),u)if(o)u.style={color:{conditions:[[d,o]]}};else{let _=this.query(a).modelColor;_?u.style={color:{conditions:[[d,_]]}}:u.style=null}}editOpacity(a,o){window.map.getLayer(a,"modelId").opacity=o}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipModelAdd(a)):c("挖洞工具未初始化")})}removeClip(a){window.bimClip?window.bimClip.clipModelremoveClip(a):console.log("挖洞工具未初始化")}}const iu=x=>Object.prototype.toString.call(x)==="[object Object]";function nu(){const x=Array.from(arguments);if(x.length<2)return x[0];let a=x[0];return x.shift(),x.forEach(o=>{if(iu(o)){iu(a)||(a={});for(let c in o)a[c]&&iu(o[c])?a[c]=nu(a[c],o[c]):a[c]=o[c]}else o instanceof Array&&(a instanceof Array||(a=[]),o.forEach((c,d)=>{iu(c)?a[d]=nu(a[d]):a[d]=c}))}),a}let ph={};const Mf=(x,a,o)=>{ph={};let{vectorStyle:c,difference:d}=x;if(c){let{divType:u}=c,m="";if(u){let{theme_color:_,title:y,font_color:S,content:A,scaleByDistance:I,scaleByDistance_far:k,scaleByDistance_farValue:D,scaleByDistance_near:F,scaleByDistance_nearValue:E,distanceDisplayCondition:L,distanceDisplayCondition_far:T,distanceDisplayCondition_near:M,clampToGround:R,divStyle:b}=c,{theme_color2:U,theme_color3:N}=b;switch(u){case"1":m=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${_};--theme-font-color1:${S};">
2574
2574
  <div class="title">${y}</div>
2575
2575
  </div >`;break;case"2":m=`<div class="entity-div-style entity-div-style2" style="--theme-color1:${_};--theme-font-color1:${S};">
2576
2576
  <div class="title">${y}</div>
@@ -2632,7 +2632,7 @@ __p += '`),Fi&&(de+=`' +
2632
2632
  function print() { __p += __j.call(arguments, '') }
2633
2633
  `:`;
2634
2634
  `)+de+`return __p
2635
- }`;var Mi=zd(function(){return Ni(ut,Je+"return "+de).apply(o,_t)});if(Mi.source=de,af(Mi))throw Mi;return Mi}function My(r){return Zi(r).toLowerCase()}function Sy(r){return Zi(r).toUpperCase()}function Ey(r,h,g){if(r=Zi(r),r&&(g||h===o))return ga(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=Qs(O,Y),_t=Eo(O,Y)+1;return xn(O,ut,_t).join("")}function by(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.slice(0,va(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Eo(O,ar(h))+1;return xn(O,0,Y).join("")}function Ay(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.replace(ls,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Qs(O,ar(h));return xn(O,Y).join("")}function Cy(r,h){var g=ct,O=It;if(wn(h)){var Y="separator"in h?h.separator:Y;g="length"in h?wi(h.length):g,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var _t=ar(r);ut=_t.length}if(g>=ut)return r;var bt=g-$r(O);if(bt<1)return O;var Nt=_t?xn(_t,0,bt).join(""):r.slice(0,bt);if(Y===o)return Nt+O;if(_t&&(bt+=Nt.length-bt),lf(Y)){if(r.slice(bt).search(Y)){var se,le=Nt;for(Y.global||(Y=Kn(Y.source,Zi(Gl.exec(Y))+"g")),Y.lastIndex=0;se=Y.exec(le);)var de=se.index;Nt=Nt.slice(0,de===o?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ze=Nt.lastIndexOf(Y);ze>-1&&(Nt=Nt.slice(0,ze))}return Nt+O}function Py(r){return r=Zi(r),r&&Xs.test(r)?r.replace(As,Jl):r}var Ly=De(function(r,h,g){return r+(g?" ":"")+h.toUpperCase()}),cf=Me("toUpperCase");function Dd(r,h,g){return r=Zi(r),h=g?o:h,h===o?Po(r)?Gc(r):il(r):r.match(h)||[]}var zd=ae(function(r,h){try{return _r(r,o,h)}catch(g){return af(g)?g:new ai(g)}}),Ry=Ho(function(r,h){return Ji(h,function(g){g=ho(g),ks(r,g,sf(r[g],r))}),r});function Oy(r){var h=r==null?0:r.length,g=oi();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[g(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(_r(ut[0],this,O))return _r(ut[1],this,O)}})}function Iy(r){return Pa(wr(r,I))}function ff(r){return function(){return r}}function Dy(r,h){return r==null||r!==r?h:r}var zy=Li(),ky=Li(!0);function Gr(r){return r}function pf(r){return H(typeof r=="function"?r:wr(r,I))}function By(r){return gt(wr(r,I))}function Ny(r,h){return At(r,wr(h,I))}var Fy=ae(function(r,h){return function(g){return e(g,r,h)}}),Uy=ae(function(r,h){return function(g){return e(r,g,h)}});function df(r,h,g){var O=Jn(h),Y=Fo(h,O);g==null&&!(wn(h)&&(Y.length||!O.length))&&(g=h,h=r,r=this,Y=Fo(h,Jn(h)));var ut=!(wn(g)&&"chain"in g)||!!g.chain,_t=Wo(r);return Ji(Y,function(bt){var Nt=h[bt];r[bt]=Nt,_t&&(r.prototype[bt]=function(){var se=this.__chain__;if(ut||se){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Nt,args:arguments,thisArg:r}),le.__chain__=se,le}return Nt.apply(r,fs([this.value()],arguments))})}),r}function Gy(){return gn._===this&&(gn._=Kr),this}function mf(){}function Hy(r){return r=wi(r),ae(function(h){return Z(h,r)})}var Vy=Nn(Yi),Wy=Nn(Ih),jy=Nn(Cs);function kd(r){return Kc(r)?Js(ho(r)):$t(r)}function Xy(r){return function(h){return r==null?o:ao(r,h)}}var qy=$h(),Yy=$h(!0);function gf(){return[]}function vf(){return!1}function Zy(){return{}}function Jy(){return""}function $y(){return!0}function Ky(r,h){if(r=wi(r),r<1||r>fe)return[];var g=Ot,O=Vn(r,Ot);h=oi(h),r-=Ot;for(var Y=Ls(O,h);++g<r;)h(g);return Y}function Qy(r){return vi(r)?Yi(r,ho):ts(r)?[r]:er(id(Zi(r)))}function t1(r){var h=++ur;return Zi(r)+h}var e1=Tr(function(r,h){return r+h},0),i1=hh("ceil"),n1=Tr(function(r,h){return r/h},1),r1=hh("floor");function s1(r){return r&&r.length?Ts(r,Gr,oh):o}function o1(r,h){return r&&r.length?Ts(r,oi(h,2),oh):o}function a1(r){return ma(r,Gr)}function l1(r,h){return ma(r,oi(h,2))}function h1(r){return r&&r.length?Ts(r,Gr,rt):o}function u1(r,h){return r&&r.length?Ts(r,oi(h,2),rt):o}var c1=Tr(function(r,h){return r*h},1),f1=hh("round"),p1=Tr(function(r,h){return r-h},0);function d1(r){return r&&r.length?Ks(r,Gr):0}function m1(r,h){return r&&r.length?Ks(r,oi(h,2)):0}return it.after=Bv,it.ary=pd,it.assign=S_,it.assignIn=Ad,it.assignInWith=Zu,it.assignWith=E_,it.at=b_,it.before=dd,it.bind=sf,it.bindAll=Ry,it.bindKey=md,it.castArray=Zv,it.chain=ud,it.chunk=r0,it.compact=s0,it.concat=o0,it.cond=Oy,it.conforms=Iy,it.constant=ff,it.countBy=dv,it.create=A_,it.curry=gd,it.curryRight=vd,it.debounce=_d,it.defaults=C_,it.defaultsDeep=P_,it.defer=Nv,it.delay=Fv,it.difference=a0,it.differenceBy=l0,it.differenceWith=h0,it.drop=u0,it.dropRight=c0,it.dropRightWhile=f0,it.dropWhile=p0,it.fill=d0,it.filter=gv,it.flatMap=yv,it.flatMapDeep=xv,it.flatMapDepth=wv,it.flatten=od,it.flattenDeep=m0,it.flattenDepth=g0,it.flip=Uv,it.flow=zy,it.flowRight=ky,it.fromPairs=v0,it.functions=k_,it.functionsIn=B_,it.groupBy=Tv,it.initial=y0,it.intersection=x0,it.intersectionBy=w0,it.intersectionWith=T0,it.invert=F_,it.invertBy=U_,it.invokeMap=Sv,it.iteratee=pf,it.keyBy=Ev,it.keys=Jn,it.keysIn=Ur,it.map=Vu,it.mapKeys=H_,it.mapValues=V_,it.matches=By,it.matchesProperty=Ny,it.memoize=ju,it.merge=W_,it.mergeWith=Cd,it.method=Fy,it.methodOf=Uy,it.mixin=df,it.negate=Xu,it.nthArg=Hy,it.omit=j_,it.omitBy=X_,it.once=Gv,it.orderBy=bv,it.over=Vy,it.overArgs=Hv,it.overEvery=Wy,it.overSome=jy,it.partial=of,it.partialRight=yd,it.partition=Av,it.pick=q_,it.pickBy=Pd,it.property=kd,it.propertyOf=Xy,it.pull=b0,it.pullAll=ld,it.pullAllBy=A0,it.pullAllWith=C0,it.pullAt=P0,it.range=qy,it.rangeRight=Yy,it.rearg=Vv,it.reject=Lv,it.remove=L0,it.rest=Wv,it.reverse=nf,it.sampleSize=Ov,it.set=Z_,it.setWith=J_,it.shuffle=Iv,it.slice=R0,it.sortBy=kv,it.sortedUniq=N0,it.sortedUniqBy=F0,it.split=yy,it.spread=jv,it.tail=U0,it.take=G0,it.takeRight=H0,it.takeRightWhile=V0,it.takeWhile=W0,it.tap=sv,it.throttle=Xv,it.thru=Hu,it.toArray=Sd,it.toPairs=Ld,it.toPairsIn=Rd,it.toPath=Qy,it.toPlainObject=bd,it.transform=$_,it.unary=qv,it.union=j0,it.unionBy=X0,it.unionWith=q0,it.uniq=Y0,it.uniqBy=Z0,it.uniqWith=J0,it.unset=K_,it.unzip=rf,it.unzipWith=hd,it.update=Q_,it.updateWith=ty,it.values=fh,it.valuesIn=ey,it.without=$0,it.words=Dd,it.wrap=Yv,it.xor=K0,it.xorBy=Q0,it.xorWith=tv,it.zip=ev,it.zipObject=iv,it.zipObjectDeep=nv,it.zipWith=rv,it.entries=Ld,it.entriesIn=Rd,it.extend=Ad,it.extendWith=Zu,df(it,it),it.add=e1,it.attempt=zd,it.camelCase=sy,it.capitalize=Od,it.ceil=i1,it.clamp=iy,it.clone=Jv,it.cloneDeep=Kv,it.cloneDeepWith=Qv,it.cloneWith=$v,it.conformsTo=t_,it.deburr=Id,it.defaultTo=Dy,it.divide=n1,it.endsWith=oy,it.eq=Fs,it.escape=ay,it.escapeRegExp=ly,it.every=mv,it.find=vv,it.findIndex=rd,it.findKey=L_,it.findLast=_v,it.findLastIndex=sd,it.findLastKey=R_,it.floor=r1,it.forEach=cd,it.forEachRight=fd,it.forIn=O_,it.forInRight=I_,it.forOwn=D_,it.forOwnRight=z_,it.get=hf,it.gt=e_,it.gte=i_,it.has=N_,it.hasIn=uf,it.head=ad,it.identity=Gr,it.includes=Mv,it.indexOf=_0,it.inRange=ny,it.invoke=G_,it.isArguments=bl,it.isArray=vi,it.isArrayBuffer=n_,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=r_,it.isBuffer=Da,it.isDate=s_,it.isElement=o_,it.isEmpty=a_,it.isEqual=l_,it.isEqualWith=h_,it.isError=af,it.isFinite=u_,it.isFunction=Wo,it.isInteger=xd,it.isLength=qu,it.isMap=wd,it.isMatch=c_,it.isMatchWith=f_,it.isNaN=p_,it.isNative=d_,it.isNil=g_,it.isNull=m_,it.isNumber=Td,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=eu,it.isRegExp=lf,it.isSafeInteger=v_,it.isSet=Md,it.isString=Yu,it.isSymbol=ts,it.isTypedArray=ch,it.isUndefined=__,it.isWeakMap=y_,it.isWeakSet=x_,it.join=M0,it.kebabCase=hy,it.last=Es,it.lastIndexOf=S0,it.lowerCase=uy,it.lowerFirst=cy,it.lt=w_,it.lte=T_,it.max=s1,it.maxBy=o1,it.mean=a1,it.meanBy=l1,it.min=h1,it.minBy=u1,it.stubArray=gf,it.stubFalse=vf,it.stubObject=Zy,it.stubString=Jy,it.stubTrue=$y,it.multiply=c1,it.nth=E0,it.noConflict=Gy,it.noop=mf,it.now=Wu,it.pad=fy,it.padEnd=py,it.padStart=dy,it.parseInt=my,it.random=ry,it.reduce=Cv,it.reduceRight=Pv,it.repeat=gy,it.replace=vy,it.result=Y_,it.round=f1,it.runInContext=Lt,it.sample=Rv,it.size=Dv,it.snakeCase=_y,it.some=zv,it.sortedIndex=O0,it.sortedIndexBy=I0,it.sortedIndexOf=D0,it.sortedLastIndex=z0,it.sortedLastIndexBy=k0,it.sortedLastIndexOf=B0,it.startCase=xy,it.startsWith=wy,it.subtract=p1,it.sum=d1,it.sumBy=m1,it.template=Ty,it.times=Ky,it.toFinite=jo,it.toInteger=wi,it.toLength=Ed,it.toLower=My,it.toNumber=bs,it.toSafeInteger=M_,it.toString=Zi,it.toUpper=Sy,it.trim=Ey,it.trimEnd=by,it.trimStart=Ay,it.truncate=Cy,it.unescape=Py,it.uniqueId=t1,it.upperCase=Ly,it.upperFirst=cf,it.each=cd,it.eachRight=fd,it.first=ad,df(it,function(){var r={};return Nr(it,function(h,g){Ti.call(it.prototype,g)||(r[g]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){yi.prototype[r]=function(g){g=g===o?1:vn(wi(g),0);var O=this.__filtered__&&!h?new yi(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(g,O.__takeCount__):O.__views__.push({size:Vn(g,Ot),type:r+(O.__dir__<0?"Right":"")}),O},yi.prototype[r+"Right"]=function(g){return this.reverse()[r](g).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var g=h+1,O=g==G||g==Et;yi.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:oi(Y,3),type:g}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var g="take"+(h?"Right":"");yi.prototype[r]=function(){return this[g](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var g="drop"+(h?"":"Right");yi.prototype[r]=function(){return this.__filtered__?new yi(this):this[g](1)}}),yi.prototype.compact=function(){return this.filter(Gr)},yi.prototype.find=function(r){return this.filter(r).head()},yi.prototype.findLast=function(r){return this.reverse().find(r)},yi.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new yi(this):this.map(function(g){return e(g,r,h)})}),yi.prototype.reject=function(r){return this.filter(Xu(oi(r)))},yi.prototype.slice=function(r,h){r=wi(r);var g=this;return g.__filtered__&&(r>0||h<0)?new yi(g):(r<0?g=g.takeRight(-r):r&&(g=g.drop(r)),h!==o&&(h=wi(h),g=h<0?g.dropRight(-h):g.take(h-r)),g)},yi.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},yi.prototype.toArray=function(){return this.take(Ot)},Nr(yi.prototype,function(r,h){var g=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var _t=this.__wrapped__,bt=O?[1]:arguments,Nt=_t instanceof yi,se=bt[0],le=Nt||vi(_t),de=function(Pi){var Fi=Y.apply(it,fs([Pi],bt));return O&&ze?Fi[0]:Fi};le&&g&&typeof se=="function"&&se.length!=1&&(Nt=le=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ze,Mi=Nt&&!Je;if(!ut&&le){_t=Mi?_t:new yi(this);var ui=r.apply(_t,bt);return ui.__actions__.push({func:Hu,args:[de],thisArg:o}),new qn(ui,ze)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],g=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[g](function(_t){return h.apply(vi(_t)?_t:[],Y)})}}),Nr(yi.prototype,function(r,h){var g=it[h];if(g){var O=g.name+"";Ti.call(no,O)||(no[O]=[]),no[O].push({name:h,func:g})}}),no[$i(o,T).name]=[{name:"wrapper",func:o}],yi.prototype.clone=Sa,yi.prototype.reverse=Cu,yi.prototype.value=Ea,it.prototype.at=ov,it.prototype.chain=av,it.prototype.commit=lv,it.prototype.next=hv,it.prototype.plant=cv,it.prototype.reverse=fv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=pv,it.prototype.first=it.prototype.head,io&&(it.prototype[io]=uv),it},to=Hc();Zr?((Zr.exports=to)._=to,Ys._=to):gn._=to}).call(Er)}(ru,ru.exports);var rm=ru.exports;const $u=Ju(rm);class sm{constructor(a,o=[],c=!1){_f(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=o,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=c):console.error("未引入指定插件")}remove(a,o=null){o&&o.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,o){return new Promise((c,d)=>{let u,m=o==null?void 0:o.isClone;if(typeof a!="object"){let k=window.map.getLayer(a,"vectorId");if(k)return c(k);u=this.query(a)}else{let k=window.map.getLayer(a.id,"vectorId");if(k)return c(k);u=a}let{value:_,url:y,id:S,title:A}=u;new Cesium.Resource({url:y}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:b,materialType:U,materialOptions:N,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_near:$,distanceDisplayCondition_far:ct,zIndex:It,label:et,fill:yt,diffHeight:G,outline:Pt,outlineStyle:Et,color:Ct,pixelSize:fe,outlineColor:re,outlineWidth:Ft,classificationType:Ot}=JSON.parse(L),Bt;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:b,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,materialType:U,materialOptions:N,classificationType:Ot,label:et}},hasZIndex:!0,zIndex:It});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:yt,diffHeight:G,clampToGround:j,materialType:U,materialOptions:N,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,outlineStyle:Et,outline:Pt,classificationType:Ot,label:et}}});break;case"Point":case"MultiPoint":Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:Ct,pixelSize:fe,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Bt):window.map.addLayer(Bt),Bt.bindPopup(ce=>{let Yt='<div class="bim-map-popup">';return Object.keys(ce.graphic.attr).forEach(($e,Oi)=>{ce.graphic.attr[$e]&&(Yt+=`<p><b>${$e}</b> : ${ce.graphic.attr[$e]}</p>`)}),Yt+="</div>",Yt});let ke=$u.debounce(ce=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(ce,JSON.parse(L))},500);Bt.readyPromise.then(ce=>{window.dynamicMasking&&ke(ce),c(ce)}).catch(ce=>{console.error("测试shp矢量加载失败",ce),c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})})}else c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】<"+A+">链接地址有误",type:"error",id:S,url:y})})})}updateData(a){this.vectorArr=a}processingKML(a){let o,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:_,areaSideColor:y,transparency:S,isAreaSideColor:A,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:b}=u,U={fill:m,color:_,opacity:S||.5,outline:A,outlineColor:y,outlineWidth:2,clampToGround:b,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:o,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:b||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(o=>o.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,o,c){let d=window.map.getLayer(a,"vectorId"),u=Mf(o,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let o=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(o)}switchDynamicMasking(a){this.isDynamicMasking=a}}class om{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,o=>{console.error("地形服务加载失败",o),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(o=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",o)})):console.error("未引入指定插件")}add(a){let{url:o,id:c}=a;if(this.terrainProviderId==c&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:c,type:"xyz",url:o,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=c}show(){window.map.hasTerrain=!0}hide(){window.map.hasTerrain=!1}on(a,o){a=="load"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class am{constructor(a=[],o){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,o?this.gisTkone={Authorization:`Bearer ${o}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,o=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:_,layerHue:y,layerSaturation:S,layerGamma:A,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let b=this.query(a);b||D("缺少树结构");let{gisInfo:U}=b;F=U.id,L=U.order,E=b.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:_,hue:y,gamma:A,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:o?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,b=>{k(b)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(b=>{this.elevationImageLayer.on(fnType.get(b),U=>{c[b](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(o=>o.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class lm{constructor(a,o,...c){_f(this,"manualFreed",$u.debounce(()=>{let{lng:a,lat:o,alt:c,pitch:d}=this.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,o,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?this.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],o&&o!=null&&(this.map=o),this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,o){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,o){this[a].push(o)}remove(a,o){this[a]=this[a].filter(function(c){return c!==o})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,o,c,d=[],u={}){let m,_,y;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,y=m.find((S,A)=>{if(S.id==o)return _=A,S}),c){case"delete":m.splice(_,1);break;case"update":y.excavationDetails=d;break;case"add":m.push(u);break;case"edit":y.excavationDetails=u.excavationDetails,y.kId=u.kId;break}return m}resourceRelease(){this.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=this.map.getCameraView();a<2e4&&(this.freed=$u.throttle(()=>{let{lng:o,lat:c,alt:d,pitch:u}=this.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let _=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([o,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,_))?this.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!this.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,o,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==o)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,o,c),d))return d}return d}}disTance(a,o,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...o),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,o){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(o-o/5)*(Math.abs(c)/90)+o/5;return Math.round(d)}}class hm{constructor(a=[],o){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,o){a=="change"||a=="collection"||a=="collection"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}offAll(){this.events={}}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}add(a,o=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let _,y,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S));else{if(typeof a!="object"?(_=this.entityLayer.getGraphicByAttr(a,"entityId"),y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a):(_=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||o,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&o&&(S.attr.entityId=o)),_)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(o=>o.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,o=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");o==null||o.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,o=null){(o==null?void 0:o.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){this.entityCloneLayer==null&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((o,c)=>{let{type:d,style:u}=a;if(d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:_,theme_color:y,font_color:S,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(_){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${y};--theme-font-color1:${S};">
2635
+ }`;var Mi=zd(function(){return Ni(ut,Je+"return "+de).apply(o,_t)});if(Mi.source=de,af(Mi))throw Mi;return Mi}function My(r){return Zi(r).toLowerCase()}function Sy(r){return Zi(r).toUpperCase()}function Ey(r,h,g){if(r=Zi(r),r&&(g||h===o))return ga(r);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=ar(h),ut=Qs(O,Y),_t=Eo(O,Y)+1;return xn(O,ut,_t).join("")}function by(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.slice(0,va(r)+1);if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Eo(O,ar(h))+1;return xn(O,0,Y).join("")}function Ay(r,h,g){if(r=Zi(r),r&&(g||h===o))return r.replace(ls,"");if(!r||!(h=Ye(h)))return r;var O=ar(r),Y=Qs(O,ar(h));return xn(O,Y).join("")}function Cy(r,h){var g=ct,O=It;if(wn(h)){var Y="separator"in h?h.separator:Y;g="length"in h?wi(h.length):g,O="omission"in h?Ye(h.omission):O}r=Zi(r);var ut=r.length;if(Ir(r)){var _t=ar(r);ut=_t.length}if(g>=ut)return r;var bt=g-$r(O);if(bt<1)return O;var Nt=_t?xn(_t,0,bt).join(""):r.slice(0,bt);if(Y===o)return Nt+O;if(_t&&(bt+=Nt.length-bt),lf(Y)){if(r.slice(bt).search(Y)){var se,le=Nt;for(Y.global||(Y=Kn(Y.source,Zi(Gl.exec(Y))+"g")),Y.lastIndex=0;se=Y.exec(le);)var de=se.index;Nt=Nt.slice(0,de===o?bt:de)}}else if(r.indexOf(Ye(Y),bt)!=bt){var ze=Nt.lastIndexOf(Y);ze>-1&&(Nt=Nt.slice(0,ze))}return Nt+O}function Py(r){return r=Zi(r),r&&Xs.test(r)?r.replace(As,Jl):r}var Ly=De(function(r,h,g){return r+(g?" ":"")+h.toUpperCase()}),cf=Me("toUpperCase");function Dd(r,h,g){return r=Zi(r),h=g?o:h,h===o?Po(r)?Gc(r):il(r):r.match(h)||[]}var zd=ae(function(r,h){try{return _r(r,o,h)}catch(g){return af(g)?g:new ai(g)}}),Ry=Ho(function(r,h){return Ji(h,function(g){g=ho(g),ks(r,g,sf(r[g],r))}),r});function Oy(r){var h=r==null?0:r.length,g=oi();return r=h?Yi(r,function(O){if(typeof O[1]!="function")throw new lr(m);return[g(O[0]),O[1]]}):[],ae(function(O){for(var Y=-1;++Y<h;){var ut=r[Y];if(_r(ut[0],this,O))return _r(ut[1],this,O)}})}function Iy(r){return Pa(wr(r,I))}function ff(r){return function(){return r}}function Dy(r,h){return r==null||r!==r?h:r}var zy=Li(),ky=Li(!0);function Gr(r){return r}function pf(r){return H(typeof r=="function"?r:wr(r,I))}function By(r){return gt(wr(r,I))}function Ny(r,h){return At(r,wr(h,I))}var Fy=ae(function(r,h){return function(g){return e(g,r,h)}}),Uy=ae(function(r,h){return function(g){return e(r,g,h)}});function df(r,h,g){var O=Jn(h),Y=Fo(h,O);g==null&&!(wn(h)&&(Y.length||!O.length))&&(g=h,h=r,r=this,Y=Fo(h,Jn(h)));var ut=!(wn(g)&&"chain"in g)||!!g.chain,_t=Wo(r);return Ji(Y,function(bt){var Nt=h[bt];r[bt]=Nt,_t&&(r.prototype[bt]=function(){var se=this.__chain__;if(ut||se){var le=r(this.__wrapped__),de=le.__actions__=er(this.__actions__);return de.push({func:Nt,args:arguments,thisArg:r}),le.__chain__=se,le}return Nt.apply(r,fs([this.value()],arguments))})}),r}function Gy(){return gn._===this&&(gn._=Kr),this}function mf(){}function Hy(r){return r=wi(r),ae(function(h){return Z(h,r)})}var Vy=Nn(Yi),Wy=Nn(Ih),jy=Nn(Cs);function kd(r){return Kc(r)?Js(ho(r)):$t(r)}function Xy(r){return function(h){return r==null?o:ao(r,h)}}var qy=$h(),Yy=$h(!0);function gf(){return[]}function vf(){return!1}function Zy(){return{}}function Jy(){return""}function $y(){return!0}function Ky(r,h){if(r=wi(r),r<1||r>fe)return[];var g=Ot,O=Vn(r,Ot);h=oi(h),r-=Ot;for(var Y=Ls(O,h);++g<r;)h(g);return Y}function Qy(r){return vi(r)?Yi(r,ho):ts(r)?[r]:er(id(Zi(r)))}function t1(r){var h=++ur;return Zi(r)+h}var e1=Tr(function(r,h){return r+h},0),i1=hh("ceil"),n1=Tr(function(r,h){return r/h},1),r1=hh("floor");function s1(r){return r&&r.length?Ts(r,Gr,oh):o}function o1(r,h){return r&&r.length?Ts(r,oi(h,2),oh):o}function a1(r){return ma(r,Gr)}function l1(r,h){return ma(r,oi(h,2))}function h1(r){return r&&r.length?Ts(r,Gr,rt):o}function u1(r,h){return r&&r.length?Ts(r,oi(h,2),rt):o}var c1=Tr(function(r,h){return r*h},1),f1=hh("round"),p1=Tr(function(r,h){return r-h},0);function d1(r){return r&&r.length?Ks(r,Gr):0}function m1(r,h){return r&&r.length?Ks(r,oi(h,2)):0}return it.after=Bv,it.ary=pd,it.assign=S_,it.assignIn=Ad,it.assignInWith=Zu,it.assignWith=E_,it.at=b_,it.before=dd,it.bind=sf,it.bindAll=Ry,it.bindKey=md,it.castArray=Zv,it.chain=ud,it.chunk=r0,it.compact=s0,it.concat=o0,it.cond=Oy,it.conforms=Iy,it.constant=ff,it.countBy=dv,it.create=A_,it.curry=gd,it.curryRight=vd,it.debounce=_d,it.defaults=C_,it.defaultsDeep=P_,it.defer=Nv,it.delay=Fv,it.difference=a0,it.differenceBy=l0,it.differenceWith=h0,it.drop=u0,it.dropRight=c0,it.dropRightWhile=f0,it.dropWhile=p0,it.fill=d0,it.filter=gv,it.flatMap=yv,it.flatMapDeep=xv,it.flatMapDepth=wv,it.flatten=od,it.flattenDeep=m0,it.flattenDepth=g0,it.flip=Uv,it.flow=zy,it.flowRight=ky,it.fromPairs=v0,it.functions=k_,it.functionsIn=B_,it.groupBy=Tv,it.initial=y0,it.intersection=x0,it.intersectionBy=w0,it.intersectionWith=T0,it.invert=F_,it.invertBy=U_,it.invokeMap=Sv,it.iteratee=pf,it.keyBy=Ev,it.keys=Jn,it.keysIn=Ur,it.map=Vu,it.mapKeys=H_,it.mapValues=V_,it.matches=By,it.matchesProperty=Ny,it.memoize=ju,it.merge=W_,it.mergeWith=Cd,it.method=Fy,it.methodOf=Uy,it.mixin=df,it.negate=Xu,it.nthArg=Hy,it.omit=j_,it.omitBy=X_,it.once=Gv,it.orderBy=bv,it.over=Vy,it.overArgs=Hv,it.overEvery=Wy,it.overSome=jy,it.partial=of,it.partialRight=yd,it.partition=Av,it.pick=q_,it.pickBy=Pd,it.property=kd,it.propertyOf=Xy,it.pull=b0,it.pullAll=ld,it.pullAllBy=A0,it.pullAllWith=C0,it.pullAt=P0,it.range=qy,it.rangeRight=Yy,it.rearg=Vv,it.reject=Lv,it.remove=L0,it.rest=Wv,it.reverse=nf,it.sampleSize=Ov,it.set=Z_,it.setWith=J_,it.shuffle=Iv,it.slice=R0,it.sortBy=kv,it.sortedUniq=N0,it.sortedUniqBy=F0,it.split=yy,it.spread=jv,it.tail=U0,it.take=G0,it.takeRight=H0,it.takeRightWhile=V0,it.takeWhile=W0,it.tap=sv,it.throttle=Xv,it.thru=Hu,it.toArray=Sd,it.toPairs=Ld,it.toPairsIn=Rd,it.toPath=Qy,it.toPlainObject=bd,it.transform=$_,it.unary=qv,it.union=j0,it.unionBy=X0,it.unionWith=q0,it.uniq=Y0,it.uniqBy=Z0,it.uniqWith=J0,it.unset=K_,it.unzip=rf,it.unzipWith=hd,it.update=Q_,it.updateWith=ty,it.values=fh,it.valuesIn=ey,it.without=$0,it.words=Dd,it.wrap=Yv,it.xor=K0,it.xorBy=Q0,it.xorWith=tv,it.zip=ev,it.zipObject=iv,it.zipObjectDeep=nv,it.zipWith=rv,it.entries=Ld,it.entriesIn=Rd,it.extend=Ad,it.extendWith=Zu,df(it,it),it.add=e1,it.attempt=zd,it.camelCase=sy,it.capitalize=Od,it.ceil=i1,it.clamp=iy,it.clone=Jv,it.cloneDeep=Kv,it.cloneDeepWith=Qv,it.cloneWith=$v,it.conformsTo=t_,it.deburr=Id,it.defaultTo=Dy,it.divide=n1,it.endsWith=oy,it.eq=Fs,it.escape=ay,it.escapeRegExp=ly,it.every=mv,it.find=vv,it.findIndex=rd,it.findKey=L_,it.findLast=_v,it.findLastIndex=sd,it.findLastKey=R_,it.floor=r1,it.forEach=cd,it.forEachRight=fd,it.forIn=O_,it.forInRight=I_,it.forOwn=D_,it.forOwnRight=z_,it.get=hf,it.gt=e_,it.gte=i_,it.has=N_,it.hasIn=uf,it.head=ad,it.identity=Gr,it.includes=Mv,it.indexOf=_0,it.inRange=ny,it.invoke=G_,it.isArguments=bl,it.isArray=vi,it.isArrayBuffer=n_,it.isArrayLike=Fr,it.isArrayLikeObject=Dn,it.isBoolean=r_,it.isBuffer=Da,it.isDate=s_,it.isElement=o_,it.isEmpty=a_,it.isEqual=l_,it.isEqualWith=h_,it.isError=af,it.isFinite=u_,it.isFunction=Wo,it.isInteger=xd,it.isLength=qu,it.isMap=wd,it.isMatch=c_,it.isMatchWith=f_,it.isNaN=p_,it.isNative=d_,it.isNil=g_,it.isNull=m_,it.isNumber=Td,it.isObject=wn,it.isObjectLike=Ln,it.isPlainObject=eu,it.isRegExp=lf,it.isSafeInteger=v_,it.isSet=Md,it.isString=Yu,it.isSymbol=ts,it.isTypedArray=ch,it.isUndefined=__,it.isWeakMap=y_,it.isWeakSet=x_,it.join=M0,it.kebabCase=hy,it.last=Es,it.lastIndexOf=S0,it.lowerCase=uy,it.lowerFirst=cy,it.lt=w_,it.lte=T_,it.max=s1,it.maxBy=o1,it.mean=a1,it.meanBy=l1,it.min=h1,it.minBy=u1,it.stubArray=gf,it.stubFalse=vf,it.stubObject=Zy,it.stubString=Jy,it.stubTrue=$y,it.multiply=c1,it.nth=E0,it.noConflict=Gy,it.noop=mf,it.now=Wu,it.pad=fy,it.padEnd=py,it.padStart=dy,it.parseInt=my,it.random=ry,it.reduce=Cv,it.reduceRight=Pv,it.repeat=gy,it.replace=vy,it.result=Y_,it.round=f1,it.runInContext=Lt,it.sample=Rv,it.size=Dv,it.snakeCase=_y,it.some=zv,it.sortedIndex=O0,it.sortedIndexBy=I0,it.sortedIndexOf=D0,it.sortedLastIndex=z0,it.sortedLastIndexBy=k0,it.sortedLastIndexOf=B0,it.startCase=xy,it.startsWith=wy,it.subtract=p1,it.sum=d1,it.sumBy=m1,it.template=Ty,it.times=Ky,it.toFinite=jo,it.toInteger=wi,it.toLength=Ed,it.toLower=My,it.toNumber=bs,it.toSafeInteger=M_,it.toString=Zi,it.toUpper=Sy,it.trim=Ey,it.trimEnd=by,it.trimStart=Ay,it.truncate=Cy,it.unescape=Py,it.uniqueId=t1,it.upperCase=Ly,it.upperFirst=cf,it.each=cd,it.eachRight=fd,it.first=ad,df(it,function(){var r={};return Nr(it,function(h,g){Ti.call(it.prototype,g)||(r[g]=h)}),r}(),{chain:!1}),it.VERSION=c,Ji(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){it[r].placeholder=it}),Ji(["drop","take"],function(r,h){yi.prototype[r]=function(g){g=g===o?1:vn(wi(g),0);var O=this.__filtered__&&!h?new yi(this):this.clone();return O.__filtered__?O.__takeCount__=Vn(g,O.__takeCount__):O.__views__.push({size:Vn(g,Ot),type:r+(O.__dir__<0?"Right":"")}),O},yi.prototype[r+"Right"]=function(g){return this.reverse()[r](g).reverse()}}),Ji(["filter","map","takeWhile"],function(r,h){var g=h+1,O=g==G||g==Et;yi.prototype[r]=function(Y){var ut=this.clone();return ut.__iteratees__.push({iteratee:oi(Y,3),type:g}),ut.__filtered__=ut.__filtered__||O,ut}}),Ji(["head","last"],function(r,h){var g="take"+(h?"Right":"");yi.prototype[r]=function(){return this[g](1).value()[0]}}),Ji(["initial","tail"],function(r,h){var g="drop"+(h?"":"Right");yi.prototype[r]=function(){return this.__filtered__?new yi(this):this[g](1)}}),yi.prototype.compact=function(){return this.filter(Gr)},yi.prototype.find=function(r){return this.filter(r).head()},yi.prototype.findLast=function(r){return this.reverse().find(r)},yi.prototype.invokeMap=ae(function(r,h){return typeof r=="function"?new yi(this):this.map(function(g){return e(g,r,h)})}),yi.prototype.reject=function(r){return this.filter(Xu(oi(r)))},yi.prototype.slice=function(r,h){r=wi(r);var g=this;return g.__filtered__&&(r>0||h<0)?new yi(g):(r<0?g=g.takeRight(-r):r&&(g=g.drop(r)),h!==o&&(h=wi(h),g=h<0?g.dropRight(-h):g.take(h-r)),g)},yi.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},yi.prototype.toArray=function(){return this.take(Ot)},Nr(yi.prototype,function(r,h){var g=/^(?:filter|find|map|reject)|While$/.test(h),O=/^(?:head|last)$/.test(h),Y=it[O?"take"+(h=="last"?"Right":""):h],ut=O||/^find/.test(h);Y&&(it.prototype[h]=function(){var _t=this.__wrapped__,bt=O?[1]:arguments,Nt=_t instanceof yi,se=bt[0],le=Nt||vi(_t),de=function(Pi){var Fi=Y.apply(it,fs([Pi],bt));return O&&ze?Fi[0]:Fi};le&&g&&typeof se=="function"&&se.length!=1&&(Nt=le=!1);var ze=this.__chain__,Je=!!this.__actions__.length,hi=ut&&!ze,Mi=Nt&&!Je;if(!ut&&le){_t=Mi?_t:new yi(this);var ui=r.apply(_t,bt);return ui.__actions__.push({func:Hu,args:[de],thisArg:o}),new qn(ui,ze)}return hi&&Mi?r.apply(this,bt):(ui=this.thru(de),hi?O?ui.value()[0]:ui.value():ui)})}),Ji(["pop","push","shift","sort","splice","unshift"],function(r){var h=On[r],g=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",O=/^(?:pop|shift)$/.test(r);it.prototype[r]=function(){var Y=arguments;if(O&&!this.__chain__){var ut=this.value();return h.apply(vi(ut)?ut:[],Y)}return this[g](function(_t){return h.apply(vi(_t)?_t:[],Y)})}}),Nr(yi.prototype,function(r,h){var g=it[h];if(g){var O=g.name+"";Ti.call(no,O)||(no[O]=[]),no[O].push({name:h,func:g})}}),no[$i(o,T).name]=[{name:"wrapper",func:o}],yi.prototype.clone=Sa,yi.prototype.reverse=Cu,yi.prototype.value=Ea,it.prototype.at=ov,it.prototype.chain=av,it.prototype.commit=lv,it.prototype.next=hv,it.prototype.plant=cv,it.prototype.reverse=fv,it.prototype.toJSON=it.prototype.valueOf=it.prototype.value=pv,it.prototype.first=it.prototype.head,io&&(it.prototype[io]=uv),it},to=Hc();Zr?((Zr.exports=to)._=to,Ys._=to):gn._=to}).call(Er)}(ru,ru.exports);var rm=ru.exports;const $u=Ju(rm);class sm{constructor(a,o=[],c=!1){_f(this,"simplifyFunc",a=>{try{a=turf.simplify(a,{tolerance:5e-4,highQuality:!1,mutate:!0})}catch{}return a});mars3d?(this.vectorArr=o,this.geoJsonType=new Map([["Point"],["LineString"],["Polygon"],["MultiPoint"],["MultiLineString"],["MultiPolygon"]]),this.avoidanceArr=[],this.editDate={id:""},this.isDynamicMasking=c):console.error("未引入指定插件")}remove(a,o=null){o&&o.isClone=="true"?window.mapClone.mapEx.removeLayer(window.mapClone.mapEx.getLayer(a,"vectorId")):(window.map.removeLayer(window.map.getLayer(a,"vectorId")),window.dynamicMasking&&window.dynamicMasking.remove(a))}add(a,o){return new Promise((c,d)=>{let u,m=o==null?void 0:o.isClone;if(typeof a!="object"){let k=window.map.getLayer(a,"vectorId");if(k)return c(k);u=this.query(a)}else{let k=window.map.getLayer(a.id,"vectorId");if(k)return c(k);u=a}let{value:_,url:y,id:S,title:A}=u;new Cesium.Resource({url:y}).fetchJson().then(k=>{let{id:D,title:F,shpInfo:E}=u,{attributes:L,geometryType:T,geometryCount:M,pointCount:R}=E;if(L){let{width:b,materialType:U,materialOptions:N,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_near:$,distanceDisplayCondition_far:ct,zIndex:It,label:et,fill:yt,diffHeight:G,outline:Pt,outlineStyle:Et,color:Ct,pixelSize:fe,outlineColor:re,outlineWidth:Ft,classificationType:Ot}=JSON.parse(L),Bt;switch(this.isDynamicMasking?(et.color=Cesium.Color.fromCssColorString(et.color).withAlpha(0),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor).withAlpha(.001),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor).withAlpha(.001),et.background=!1,et.outline=!1,et.show=!1):(et.color=Cesium.Color.fromCssColorString(et.color),et.outlineColor=Cesium.Color.fromCssColorString(et.outlineColor),et.backgroundColor=Cesium.Color.fromCssColorString(et.backgroundColor)),T){case"LineString":case"MultiLineString":et.backgroundPadding=5,Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polylineC",styleOptions:{width:b,clampToGround:j,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,materialType:U,materialOptions:N,classificationType:Ot,label:et}},hasZIndex:!0,zIndex:It});break;case"Polygon":case"MultiPolygon":U=="PolyGrass"&&(N={evenColor:new Cesium.Color(.25,.4,.1,1),oddColor:new Cesium.Color(.1,.1,.1,1),frequency:1.5}),Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"polygon",styleOptions:{fill:yt,diffHeight:G,clampToGround:j,materialType:U,materialOptions:N,distanceDisplayCondition:J,distanceDisplayCondition_far:ct,distanceDisplayCondition_near:$,outlineStyle:Et,outline:Pt,classificationType:Ot,label:et}}});break;case"Point":case"MultiPoint":Bt=new mars3d.layer.GeoJsonLayer({data:k,vectorId:D,symbol:{type:"pointP",styleOptions:{color:Ct,pixelSize:fe,outline:Pt,outlineColor:re,outlineWidth:Ft,visibleDepth:!1,label:et}}});break}m?window.mapClone.mapEx.addLayer(Bt):window.map.addLayer(Bt),Bt.bindPopup(ce=>{let Yt='<div class="bim-map-popup">';return Object.keys(ce.graphic.attr).forEach(($e,Oi)=>{ce.graphic.attr[$e]&&(Yt+=`<p><b>${$e}</b> : ${ce.graphic.attr[$e]}</p>`)}),Yt+="</div>",Yt});let ke=$u.debounce(ce=>{console.log("测试shp矢量加载完成"),window.dynamicMasking.add(ce,JSON.parse(L))},500);Bt.readyPromise.then(ce=>{window.dynamicMasking&&ke(ce),c(ce)}).catch(ce=>{console.error("测试shp矢量加载失败",ce),c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})})}else c({tite:"【矢量】<"+F+">无法加载",type:"error",id:D,url:y})}).catch(k=>{console.error("数据有误",k),c({tite:"【矢量】<"+A+">链接地址有误",type:"error",id:S,url:y})})})}updateData(a){this.vectorArr=a}processingKML(a){let o,c=2e3,d=!0,{kmlInfo:u}=a,{fill:m,areaColor:_,areaSideColor:y,transparency:S,isAreaSideColor:A,minDistinct:I,textDistinct:k,textSize:D,textColor:F,fontStyle:E,outLine:L,sideColor:T,backGround:M,backGroundColor:R,clampToGround:b}=u,U={fill:m,color:_,opacity:S||.5,outline:A,outlineColor:y,outlineWidth:2,clampToGround:b,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,classificationType:o,opacity:String(S)},N={text:"{name}",horizontalOrigin:Cesium.HorizontalOrigin.CENTER,verticalOrigin:Cesium.VerticalOrigin.BOTTOM,pixelOffsetY:-10,font_size:26,color:F||"#ffffff",font_family:E||"黑体",outline:L||!0,outlineColor:T||"#000000",outlineWidth:4,scaleByDistance:!0,distanceDisplayCondition:!0,distanceDisplayCondition_far:k||1e6,distanceDisplayCondition_near:I||0,background:M||!1,backgroundColor:R||"",visibleDepth:d,clampToGround:b||!1,disableDepthTestDistance:c};return{...U,label:N}}selected(a){window.map.getLayer(a,"vectorId")&&window.map.getLayer(a,"vectorId").flyTo()}query(a){return this.vectorArr.length==0?!1:this.vectorArr.find(o=>o.id==a)}queryVector(a){return window.map.getLayer(a,"vectorId")}editVector(a,o,c){let d=window.map.getLayer(a,"vectorId"),u=Mf(o,c);d&&(d.eachGraphic(m=>{m.label.show===!1&&(delete m.label.outline,delete m.label.background,delete m.label.outlineColor,delete m.label.backgroundColor),m.setStyle({...u})}),window.dynamicMasking&&dynamicMasking.modify(a,u))}nationalBoundaries(a="/gis/nationalBoundaries.json"){let o=new mars3d.layer.GeoJsonLayer({name:"国界",url:a,format:c=>{try{c=turf.simplify(c,{tolerance:1e-5,highQuality:!1,mutate:!0})}catch(d){console.error(d)}return c},symbol:{type:"polylineC",styleOptions:{width:2,materialType:"Color",materialOptions:{color:"#CD9B1D"},distanceDisplayCondition:!0,distanceDisplayCondition_near:1e3,distanceDisplayCondition_far:2e7,clampToGround:!0,classificationType:Cesium.ClassificationType.TERRAIN}}});map.addLayer(o)}switchDynamicMasking(a){this.isDynamicMasking=a}}class om{constructor(a=[]){mars3d?(this.terrainProviderArr=a,this.terrainProviderId="",this.events={},window.map.on(mars3d.EventType.terrainLoadError,o=>{console.error("地形服务加载失败",o),this.hide()}),window.map.viewer.scene.globe.tileLoadProgressEvent.addEventListener(o=>{window.map.viewer.scene.globe.tilesLoaded&&this.emit("load",o)})):console.error("未引入指定插件")}add(a){let{url:o,id:c}=a;if(this.terrainProviderId==c&&window.map.terrainProvider._layers)return!1;window.map.terrainProvider=mars3d.LayerUtil.createTerrainProvider({imageXyzId:c,type:"xyz",url:o,requestVertexNormals:!0,requestMetadata:!0}),this.terrainProviderId=c}show(){window.map.hasTerrain=!0}hide(){window.map.hasTerrain=!1}on(a,o){a=="load"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}addClip(a){return new Promise((o,c)=>{window.bimClip?o(bimClip.clipGisAdd(a)):c("挖洞工具未初始化")})}}class am{constructor(a=[],o){mars3d?(this.elevationImageArr=a,this.elevationImageLayer,o?this.gisTkone={Authorization:`Bearer ${o}`}:this.gisTkone={},this.form={brightnessVal:1.3,msaaSamples:4,surfaceOpacity:1,layerOpacity:1,layerBrightness:2,layerContrast:1,layerHue:0,layerSaturation:1,layerGamma:1},this.tdtLayer=null):console.error("未引入指定插件")}pushVector(a){this.elevationImageArr.push(a)}add(a,o=!0,c){let d;if(typeof a!="object"?d=a:d=a.imageXyzId,window.map.getLayer(d,"imageXyzId"))return!1;const{layerOpacity:u,layerBrightness:m,layerContrast:_,layerHue:y,layerSaturation:S,layerGamma:A,surfaceOpacity:I}=this.exposureEnvironmentSettings();return new Promise((k,D)=>{let F,E,L,T,M,R;if(typeof a!="object"){let b=this.query(a);b||D("缺少树结构");let{gisInfo:U}=b;F=U.id,L=U.order,E=b.url,T=U.minLevel,M=U.maxLevel}else F=a.imageXyzId,E=a.url,L=a.zIndex,T=a.minimumLevel,M=a.maximumLevel,R=a.chinaCRS;this.elevationImageLayer=new mars3d.layer.XyzLayer({imageXyzId:F,type:"xyz",url:E,hasZIndex:!0,zIndex:L.toString(),brightness:m,opacity:u,saturation:S,contrast:_,hue:y,gamma:A,alpha:I,show:!0,minimumLevel:T||0,maximumLevel:M||15,chinaCRS:R,headers:o?this.gisTkone:null}),this.elevationImageLayer.on(mars3d.EventType.load,b=>{k(b)}),window.map.addLayer(this.elevationImageLayer),c&&Object.keys(c).forEach(b=>{this.elevationImageLayer.on(fnType.get(b),U=>{c[b](U)})})})}remove(a){console.log(a),window.map.removeLayer(window.map.getLayer(a,"imageXyzId"))}query(a){return this.elevationImageArr.length==0?!1:this.elevationImageArr.find(o=>o.id==a)}initial(){this.elevationImageArr=[],this.elevationImageLayer=null}exposureEnvironmentSettings(){return localStorage.getItem("environmentSettings")?JSON.parse(localStorage.getItem("environmentSettings")):(localStorage.setItem("environmentSettings",JSON.stringify(this.form)),JSON.parse(JSON.stringify(this.form)))}}class lm{constructor(a,...o){_f(this,"manualFreed",$u.debounce(()=>{let{lng:a,lat:o,alt:c,pitch:d}=window.map.getCameraView(),u;this.modelArray.forEach(m=>{u=m.releasedDistance?m.releasedDistance:1e4,this.disTance([a,o,c],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(d,u))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):window.map.getLayer(m.id,"modelId")||this.emit("enter",m)})},200));mars3d?(a&&a!=null&&(this.modelArray=a),this.showModelArray=[],this.Cesium=mars3d.Cesium,this.events={}):console.error("未引入指定插件")}on(a,o){a=="enter"||a=="leave"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}say(a){return this[a]}add(a,o){this[a].push(o)}remove(a,o){this[a]=this[a].filter(function(c){return c!==o})}initial(){this.modelArray=[],this.events={}}updateCustomExcavationDetails(a,o,c,d=[],u={}){let m,_,y;switch(m=this.modelArray.find(S=>S.modelId==a).customize.bimModelExcavationDetails,y=m.find((S,A)=>{if(S.id==o)return _=A,S}),c){case"delete":m.splice(_,1);break;case"update":y.excavationDetails=d;break;case"add":m.push(u);break;case"edit":y.excavationDetails=u.excavationDetails,y.kId=u.kId;break}return m}resourceRelease(){window.map.viewer.camera.moveEnd.addEventListener(()=>{this.freed()})}freed(){let{alt:a}=window.map.getCameraView();a<2e4&&(this.freed=$u.throttle(()=>{let{lng:o,lat:c,alt:d,pitch:u}=window.map.getCameraView();this.modelArray&&this.modelArray.forEach(m=>{let _=m.bimModel.releasedDistance?m.bimModel.releasedDistance:1e4;m.center&&this.disTance([o,c,d],[m.center._lng,m.center._lat,m.center._alt],this.calculateDistance(u,_))?window.map.getLayer(m.id,"modelId")&&this.emit("leave",m):this.showModelArray.indexOf(m.id)>=0&&!window.map.getLayer(m.id,"modelId")&&this.emit("enter",m)})},2e3),this.freed())}findPnodeId(a,o,c="id"){let d;if(a){for(var u=0;u<a.length;u++){let m=a[u];if(m[c]==o)return d=m,d;if(m.children&&m.children.length>0&&(d=this.findPnodeId(m.children,o,c),d))return d}return d}}disTance(a,o,c){let d,u,m;return d=Cesium.Cartesian3.fromDegrees(...a),u=Cesium.Cartesian3.fromDegrees(...o),m=Cesium.Cartesian3.distance(d,u),m>c}calculateDistance(a,o){let c=(a+180)%360-180;c=Math.max(-90,Math.min(c,90));let d=(o-o/5)*(Math.abs(c)/90)+o/5;return Math.round(d)}}class hm{constructor(a=[],o){mars3d?(this.entityArr=a,this.entityLayer=new mars3d.layer.GraphicLayer({entityId:"bimEntity"}),window.map.addLayer(this.entityLayer),this.entityItem=null,this.events={},this.entityCloneLayer):console.error("未引入指定插件")}on(a,o){a=="change"||a=="collection"||a=="collection"?this.events[a]?this.events[a].push(o):this.events[a]=[o]:console.log("未开放自定义")}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}offAll(){this.events={}}once(a,o){const c=()=>{o(),this.off(a,c)};this.on(a,c)}add(a,o=null,c){return new Promise((d,u)=>{var m;if(this.entityLayer){let _,y,S;if(c==null?void 0:c.isClone)this.entityCloneLayer&&(y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a,this.entityCloneLayer.addGraphic(S));else{if(typeof a!="object"?(_=this.entityLayer.getGraphicByAttr(a,"entityId"),y=this.query(a),S=JSON.parse(y.bimPlanPainting.graphic),console.log(S),S.attr=S.attr||{},S.attr.entityId=a):(_=this.entityLayer.getGraphicByAttr(a.id,"entityId"),S=JSON.parse(JSON.stringify(a)),S.attr=S.attr||{},S.attr.entityId=S.attr.entityId||o,S.attr==null?S.attr={entityId:a.id}:((m=S.attr)==null?void 0:m.entityId)==null&&o&&(S.attr.entityId=o)),_)return d();this.entityLayer.addGraphic(S),d(S)}}else d(),console.error("未初始化标绘实例图层")})}query(a){return this.entityArr.length==0?!1:this.entityArr.find(o=>o.id==a)}queryEntity(a){if(bimEntity.entityLayer)return bimEntity.entityLayer.getGraphicByAttr(a,"entityId")}selected(a,o=null){let c=this.entityLayer.getGraphicByAttr(a,"entityId");o==null||o.isClone,(c.options.type=="div"||c.options.type=="point")&&c._point?c.flyTo({radius:c._point._alt+500<500?5e3:c._point._alt+500}):c.flyTo()}remove(a,o=null){(o==null?void 0:o.isClone)?this.entityCloneLayer&&this.entityCloneLayer.getGraphicByAttr(a,"entityId").remove():this.entityLayer.getGraphicByAttr(a,"entityId")&&(this.entityLayer.getGraphicByAttr(a,"entityId").remove(),this.entityItem&&(this.entityItem._state=="destroy"||this.entityItem.options.attr.entityId==a)&&(this.entityItem=null))}entityCloneLayerInit(){this.entityCloneLayer==null&&(this.entityCloneLayer=window.mapClone._mapEx.getLayer("bimEntity","entityId"))}entityCloneLayerRemove(){this.entityCloneLayer.remove(),this.entityCloneLayer=null}removeEntityItem(){this.entityItem=null}updateData(a){this.entityArr=a}startDrawGraphic(a){return new Promise((o,c)=>{let{type:d,style:u}=a;if(d=="div")if(u.html)this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m)},500)});else{let{title:m,divType:_,theme_color:y,font_color:S,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M}=u,R={type:"div",style:{pointerEvents:!0,scaleByDistance:A,scaleByDistance_far:I,scaleByDistance_farValue:k,scaleByDistance_near:D,scaleByDistance_nearValue:F,distanceDisplayCondition:E,distanceDisplayCondition_far:L,distanceDisplayCondition_near:T,clampToGround:M,horizontalOrigin:Cesium.HorizontalOrigin.LEFT,verticalOrigin:Cesium.VerticalOrigin.BOTTOM}};switch(_){case"1":R.style.html=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${y};--theme-font-color1:${S};">
2636
2636
  <div class="title">${m}</div>
2637
2637
  </div>`,R.style.horizontalOrigin=Cesium.HorizontalOrigin.CENTER;break}this.entityLayer.startDraw(R).then(b=>{setTimeout(()=>{this.entityItem=b,this.entityLayer.startEditing(b),o(b)},500)})}else this.entityLayer.startDraw(a).then(m=>{setTimeout(()=>{this.entityItem=m,this.entityLayer.startEditing(m),o(m)},500)})})}stopDraw(a=!0){this.entityLayer&&this.entityLayer.stopDraw(),a&&this.entityItem&&(this.entityItem.stopEditing(),this.entityItem.remove(),this.entityItem=null)}updateEntityItem(a){let o=this.entityLayer.getGraphicByAttr(a,"entityId");o?this.entityItem=o:this.removeEntityItem()}edit(a,o,c,d){let u=Mf(o,c);if(o.vectorStyle&&this.entityItem)if(o.vectorStyle.divType==5)this.entityItem.setStyle({...u,horizontalOrigin:Cesium.HorizontalOrigin.LEFT});else{if(this.entityItem.type=="circleP"&&Object.keys(u).length==1&&Object.keys(u)[0]=="radius"&&u.radius==this.entityItem.options.style.radius)return!1;this.entityItem.setStyle({...u})}}enableDragging(a=!0){a?this.entityLayer.startEditing(this.entityItem):(this.entityLayer.stopDraw(),this.entityItem&&this.entityItem.stopEditing())}addRightMenu(){this.entityLayer.bindContextMenu([{text:"编辑对象",callback:a=>{this.emit("change",a)}},{text:"收藏对象",callback:a=>{this.emit("collection",a)}}])}removeRightMenu(){this.entityLayer.hasContextMenu()&&this.entityLayer.unbindContextMenu()}processDivData(a){let o={"--theme-color1":"theme_color","--theme-font-color1":"font_color","--theme-color2":"theme_color2","--theme-color3":"theme_color3"},c={title:"",theme_color:"",font_color:"",content:"",divType:"",divStyle:{},isMirror:!1};const d=document.createElement("div");d.innerHTML=a;const u=d.querySelector(".entity-div-style");return console.log("解耦",u),Object.keys(o).forEach(m=>{m=="--theme-color2"||m=="--theme-color3"?c.divStyle[o[m]]=u.style.getPropertyValue(m)||"#fff":c[o[m]]=u.style.getPropertyValue(m)}),c.title=u.querySelector(".title")?u.querySelector(".title").innerText:"标题",c.content=u.querySelector(".content")?u.querySelector(".content").innerText:"内容",c.divType=u.classList[1]?u.classList[1].replace("entity-div-style",""):"",c.isMirror=u.classList.contains("isMirror"),console.log("解耦",c),c}updateHtml(a,o){let{theme_color:c,font_color:d,title:u,content:m,divStyle:_}=o,{theme_color2:y,theme_color3:S}=_,A="";switch(a){case"1":A=`<div class="entity-div-style entity-div-style1" style="--theme-color1:${c};--theme-font-color1:${d};">
2638
2638
  <div class="title">${u}</div>
@@ -2682,7 +2682,7 @@ function print() { __p += __j.call(arguments, '') }
2682
2682
  JSZip uses the library pako released under the MIT license :
2683
2683
  https://github.com/nodeca/pako/blob/main/LICENSE
2684
2684
  */(function(x,a){(function(o){x.exports=o()})(function(){return function o(c,d,u){function m(S,A){if(!d[S]){if(!c[S]){var I=typeof su=="function"&&su;if(!A&&I)return I(S,!0);if(_)return _(S,!0);var k=new Error("Cannot find module '"+S+"'");throw k.code="MODULE_NOT_FOUND",k}var D=d[S]={exports:{}};c[S][0].call(D.exports,function(F){var E=c[S][1][F];return m(E||F)},D,D.exports,o,c,d,u)}return d[S].exports}for(var _=typeof su=="function"&&su,y=0;y<u.length;y++)m(u[y]);return m}({1:[function(o,c,d){var u=o("./utils"),m=o("./support"),_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.encode=function(y){for(var S,A,I,k,D,F,E,L=[],T=0,M=y.length,R=M,b=u.getTypeOf(y)!=="string";T<y.length;)R=M-T,I=b?(S=y[T++],A=T<M?y[T++]:0,T<M?y[T++]:0):(S=y.charCodeAt(T++),A=T<M?y.charCodeAt(T++):0,T<M?y.charCodeAt(T++):0),k=S>>2,D=(3&S)<<4|A>>4,F=1<R?(15&A)<<2|I>>6:64,E=2<R?63&I:64,L.push(_.charAt(k)+_.charAt(D)+_.charAt(F)+_.charAt(E));return L.join("")},d.decode=function(y){var S,A,I,k,D,F,E=0,L=0,T="data:";if(y.substr(0,T.length)===T)throw new Error("Invalid base64 input, it looks like a data url.");var M,R=3*(y=y.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(y.charAt(y.length-1)===_.charAt(64)&&R--,y.charAt(y.length-2)===_.charAt(64)&&R--,R%1!=0)throw new Error("Invalid base64 input, bad content length.");for(M=m.uint8array?new Uint8Array(0|R):new Array(0|R);E<y.length;)S=_.indexOf(y.charAt(E++))<<2|(k=_.indexOf(y.charAt(E++)))>>4,A=(15&k)<<4|(D=_.indexOf(y.charAt(E++)))>>2,I=(3&D)<<6|(F=_.indexOf(y.charAt(E++))),M[L++]=S,D!==64&&(M[L++]=A),F!==64&&(M[L++]=I);return M}},{"./support":30,"./utils":32}],2:[function(o,c,d){var u=o("./external"),m=o("./stream/DataWorker"),_=o("./stream/Crc32Probe"),y=o("./stream/DataLengthProbe");function S(A,I,k,D,F){this.compressedSize=A,this.uncompressedSize=I,this.crc32=k,this.compression=D,this.compressedContent=F}S.prototype={getContentWorker:function(){var A=new m(u.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new y("data_length")),I=this;return A.on("end",function(){if(this.streamInfo.data_length!==I.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),A},getCompressedWorker:function(){return new m(u.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},S.createWorkerFrom=function(A,I,k){return A.pipe(new _).pipe(new y("uncompressedSize")).pipe(I.compressWorker(k)).pipe(new y("compressedSize")).withStreamInfo("compression",I)},c.exports=S},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(o,c,d){var u=o("./stream/GenericWorker");d.STORE={magic:"\0\0",compressWorker:function(){return new u("STORE compression")},uncompressWorker:function(){return new u("STORE decompression")}},d.DEFLATE=o("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(o,c,d){var u=o("./utils"),m=function(){for(var _,y=[],S=0;S<256;S++){_=S;for(var A=0;A<8;A++)_=1&_?3988292384^_>>>1:_>>>1;y[S]=_}return y}();c.exports=function(_,y){return _!==void 0&&_.length?u.getTypeOf(_)!=="string"?function(S,A,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^A[E])];return-1^S}(0|y,_,_.length,0):function(S,A,I,k){var D=m,F=k+I;S^=-1;for(var E=k;E<F;E++)S=S>>>8^D[255&(S^A.charCodeAt(E))];return-1^S}(0|y,_,_.length,0):0}},{"./utils":32}],5:[function(o,c,d){d.base64=!1,d.binary=!1,d.dir=!1,d.createFolders=!0,d.date=null,d.compression=null,d.compressionOptions=null,d.comment=null,d.unixPermissions=null,d.dosPermissions=null},{}],6:[function(o,c,d){var u=null;u=typeof Promise<"u"?Promise:o("lie"),c.exports={Promise:u}},{lie:37}],7:[function(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",m=o("pako"),_=o("./utils"),y=o("./stream/GenericWorker"),S=u?"uint8array":"array";function A(I,k){y.call(this,"FlateWorker/"+I),this._pako=null,this._pakoAction=I,this._pakoOptions=k,this.meta={}}d.magic="\b\0",_.inherits(A,y),A.prototype.processChunk=function(I){this.meta=I.meta,this._pako===null&&this._createPako(),this._pako.push(_.transformTo(S,I.data),!1)},A.prototype.flush=function(){y.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){y.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new m[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var I=this;this._pako.onData=function(k){I.push({data:k,meta:I.meta})}},d.compressWorker=function(I){return new A("Deflate",I)},d.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(o,c,d){function u(D,F){var E,L="";for(E=0;E<F;E++)L+=String.fromCharCode(255&D),D>>>=8;return L}function m(D,F,E,L,T,M){var R,b,U=D.file,N=D.compression,j=M!==S.utf8encode,J=_.transformTo("string",M(U.name)),$=_.transformTo("string",S.utf8encode(U.name)),ct=U.comment,It=_.transformTo("string",M(ct)),et=_.transformTo("string",S.utf8encode(ct)),yt=$.length!==U.name.length,G=et.length!==ct.length,Pt="",Et="",Ct="",fe=U.dir,re=U.date,Ft={crc32:0,compressedSize:0,uncompressedSize:0};F&&!E||(Ft.crc32=D.crc32,Ft.compressedSize=D.compressedSize,Ft.uncompressedSize=D.uncompressedSize);var Ot=0;F&&(Ot|=8),j||!yt&&!G||(Ot|=2048);var Bt=0,ke=0;fe&&(Bt|=16),T==="UNIX"?(ke=798,Bt|=function(Yt,$e){var Oi=Yt;return Yt||(Oi=$e?16893:33204),(65535&Oi)<<16}(U.unixPermissions,fe)):(ke=20,Bt|=function(Yt){return 63&(Yt||0)}(U.dosPermissions)),R=re.getUTCHours(),R<<=6,R|=re.getUTCMinutes(),R<<=5,R|=re.getUTCSeconds()/2,b=re.getUTCFullYear()-1980,b<<=4,b|=re.getUTCMonth()+1,b<<=5,b|=re.getUTCDate(),yt&&(Et=u(1,1)+u(A(J),4)+$,Pt+="up"+u(Et.length,2)+Et),G&&(Ct=u(1,1)+u(A(It),4)+et,Pt+="uc"+u(Ct.length,2)+Ct);var ce="";return ce+=`
2685
- \0`,ce+=u(Ot,2),ce+=N.magic,ce+=u(R,2),ce+=u(b,2),ce+=u(Ft.crc32,4),ce+=u(Ft.compressedSize,4),ce+=u(Ft.uncompressedSize,4),ce+=u(J.length,2),ce+=u(Pt.length,2),{fileRecord:I.LOCAL_FILE_HEADER+ce+J+Pt,dirRecord:I.CENTRAL_FILE_HEADER+u(ke,2)+ce+u(It.length,2)+"\0\0\0\0"+u(Bt,4)+u(L,4)+J+Pt+It}}var _=o("../utils"),y=o("../stream/GenericWorker"),S=o("../utf8"),A=o("../crc32"),I=o("../signature");function k(D,F,E,L){y.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}_.inherits(k,y),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,y.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return I.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,b,U){var N=_.transformTo("string",U(b));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!y.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){y.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,c,d){var u=o("../compressions"),m=o("./ZipFileWorker");d.generateWorker=function(_,y,S){var A=new m(y.streamFiles,S,y.platform,y.encodeFileName),I=0;try{_.forEach(function(k,D){I++;var F=function(M,R){var b=M||R,U=u[b];if(!U)throw new Error(b+" is not a valid compression method !");return U}(D.options.compression,y.compression),E=D.options.compressionOptions||y.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(A)}),A.entriesCount=I}catch(k){A.error(k)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,c,d){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var m=new u;for(var _ in this)typeof this[_]!="function"&&(m[_]=this[_]);return m}}(u.prototype=o("./object")).loadAsync=o("./load"),u.support=o("./support"),u.defaults=o("./defaults"),u.version="3.10.1",u.loadAsync=function(m,_){return new u().loadAsync(m,_)},u.external=o("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,c,d){var u=o("./utils"),m=o("./external"),_=o("./utf8"),y=o("./zipEntries"),S=o("./stream/Crc32Probe"),A=o("./nodejsUtils");function I(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_.utf8decode}),A.isNode&&A.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new y(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(I(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],b=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=b)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,c,d){var u=o("../utils"),m=o("../stream/GenericWorker");function _(y,S){m.call(this,"Nodejs stream input adapter for "+y),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(_,m),_.prototype._bindStream=function(y){var S=this;(this._stream=y).pause(),y.on("data",function(A){S.push({data:A,meta:{percent:0}})}).on("error",function(A){S.isPaused?this.generatedError=A:S.error(A)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},_.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=_},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,c,d){var u=o("readable-stream").Readable;function m(_,y,S){u.call(this,y),this._helper=_;var A=this;_.on("data",function(I,k){A.push(I)||A._helper.pause(),S&&S(k)}).on("error",function(I){A.emit("error",I)}).on("end",function(){A.push(null)})}o("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(o,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(o,c,d){function u(U,N,j){var J,$=_.getTypeOf(N),ct=_.extend(j||{},A);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(J=L(U))&&M.call(this,J,!0);var It=$==="string"&&ct.binary===!1&&ct.base64===!1;j&&j.binary!==void 0||(ct.binary=!It),(N instanceof I&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",$="string");var et=null;et=N instanceof I||N instanceof y?N:F.isNode&&F.isStream(N)?new E(U,N):_.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var yt=new k(U,et,ct);this.files[U]=yt}var m=o("./utf8"),_=o("./utils"),y=o("./stream/GenericWorker"),S=o("./stream/StreamHelper"),A=o("./defaults"),I=o("./compressedObject"),k=o("./zipObject"),D=o("./generate"),F=o("./nodejsUtils"),E=o("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:A.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,j,J;for(N in this.files)J=this.files[N],(j=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(j,J)},filter:function(U){var N=[];return this.forEach(function(j,J){U(j,J)&&N.push(J)}),N},file:function(U,N,j){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,j),this;if(R(U)){var J=U;return this.filter(function(ct,It){return!It.dir&&J.test(ct)})}var $=this.files[this.root+U];return $&&!$.dir?$:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function($,ct){return ct.dir&&U.test($)});var N=this.root+U,j=M.call(this,N),J=this.clone();return J.root=j.name,J},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var j=this.filter(function($,ct){return ct.name.slice(0,U.length)===U}),J=0;J<j.length;J++)delete this.files[j[J].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,j={};try{if((j=_.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");_.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var J=j.comment||this.comment||"";N=D.generateWorker(this,j,J)}catch($){(N=new y("error")).error($)}return new S(N,j.type||"string",j.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=b},{"./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(o,c,d){c.exports=o("stream")},{stream:void 0}],17:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_);for(var y=0;y<this.data.length;y++)_[y]=255&_[y]}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data[this.zero+_]},m.prototype.lastIndexOfSignature=function(_){for(var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===y&&this.data[k+1]===S&&this.data[k+2]===A&&this.data[k+3]===I)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(_){var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.readData(4);return y===k[0]&&S===k[1]&&A===k[2]&&I===k[3]},m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return[];var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(o,c,d){var u=o("../utils");function m(_){this.data=_,this.length=_.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(_){this.checkIndex(this.index+_)},checkIndex:function(_){if(this.length<this.zero+_||_<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+_+"). Corrupted zip ?")},setIndex:function(_){this.checkIndex(_),this.index=_},skip:function(_){this.setIndex(this.index+_)},byteAt:function(){},readInt:function(_){var y,S=0;for(this.checkOffset(_),y=this.index+_-1;y>=this.index;y--)S=(S<<8)+this.byteAt(y);return this.index+=_,S},readString:function(_){return u.transformTo("string",this.readData(_))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var _=this.readInt(4);return new Date(Date.UTC(1980+(_>>25&127),(_>>21&15)-1,_>>16&31,_>>11&31,_>>5&63,(31&_)<<1))}},c.exports=m},{"../utils":32}],19:[function(o,c,d){var u=o("./Uint8ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data.charCodeAt(this.zero+_)},m.prototype.lastIndexOfSignature=function(_){return this.data.lastIndexOf(_)-this.zero},m.prototype.readAndCheckSignature=function(_){return _===this.readData(4)},m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(o,c,d){var u=o("./ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return new Uint8Array(0);var y=this.data.subarray(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(o,c,d){var u=o("../utils"),m=o("../support"),_=o("./ArrayReader"),y=o("./StringReader"),S=o("./NodeBufferReader"),A=o("./Uint8ArrayReader");c.exports=function(I){var k=u.getTypeOf(I);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(I):m.uint8array?new A(u.transformTo("uint8array",I)):new _(u.transformTo("array",I)):new y(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,c,d){var u=o("./GenericWorker"),m=o("../utils");function _(y){u.call(this,"ConvertWorker to "+y),this.destType=y}m.inherits(_,u),_.prototype.processChunk=function(y){this.push({data:m.transformTo(this.destType,y.data),meta:y.meta})},c.exports=_},{"../utils":32,"./GenericWorker":28}],25:[function(o,c,d){var u=o("./GenericWorker"),m=o("../crc32");function _(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(_,u),_.prototype.processChunk=function(y){this.streamInfo.crc32=m(y.data,this.streamInfo.crc32||0),this.push(y)},c.exports=_},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataLengthProbe for "+y),this.propName=y,this.withStreamInfo(y,0)}u.inherits(_,m),_.prototype.processChunk=function(y){if(y){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+y.data.length}m.prototype.processChunk.call(this,y)},c.exports=_},{"../utils":32,"./GenericWorker":28}],27:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,y.then(function(A){S.dataIsReady=!0,S.data=A,S.max=A&&A.length||0,S.type=u.getTypeOf(A),S.isPaused||S._tickAndRepeat()},function(A){S.error(A)})}u.inherits(_,m),_.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},_.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},_.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var y=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":y=this.data.substring(this.index,S);break;case"uint8array":y=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":y=this.data.slice(this.index,S)}return this.index=S,this.push({data:y,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=_},{"../utils":32,"./GenericWorker":28}],28:[function(o,c,d){function u(m){this.name=m||"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}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,_){return this._listeners[m].push(_),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,_){if(this._listeners[m])for(var y=0;y<this._listeners[m].length;y++)this._listeners[m][y].call(this,_)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var _=this;return m.on("data",function(y){_.processChunk(y)}),m.on("end",function(){_.end()}),m.on("error",function(y){_.error(y)}),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 m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,_){return this.extraStreamInfo[m]=_,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},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 m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(o,c,d){var u=o("../utils"),m=o("./ConvertWorker"),_=o("./GenericWorker"),y=o("../base64"),S=o("../support"),A=o("../external"),I=null;if(S.nodestream)try{I=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new A.Promise(function(L,T){var M=[],R=F._internalType,b=F._outputType,U=F._mimeType;F.on("data",function(N,j){M.push(N),E&&E(j)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(j,J,$){switch(j){case"blob":return u.newBlob(u.transformTo("arraybuffer",J),$);case"base64":return y.encode(J);default:return u.transformTo(j,J)}}(b,function(j,J){var $,ct=0,It=null,et=0;for($=0;$<J.length;$++)et+=J[$].length;switch(j){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":for(It=new Uint8Array(et),$=0;$<J.length;$++)It.set(J[$],ct),ct+=J[$].length;return It;case"nodebuffer":return Buffer.concat(J);default:throw new Error("concat : unsupported type '"+j+"'")}}(R,M),U);L(N)}catch(j){T(j)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new _("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!o("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(o,c,d){for(var u=o("./utils"),m=o("./support"),_=o("./nodejsUtils"),y=o("./stream/GenericWorker"),S=new Array(256),A=0;A<256;A++)S[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;S[254]=S[254]=1;function I(){y.call(this,"utf-8 decode"),this.leftOver=null}function k(){y.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?_.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,b=F.length,U=0;for(M=0;M<b;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,b=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)b[L++]=T;else if(4<(M=S[T]))b[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?b[L++]=65533:T<65536?b[L++]=T:(T-=65536,b[L++]=55296|T>>10&1023,b[L++]=56320|1023&T)}return b.length!==L&&(b.subarray?b=b.subarray(0,L):b.length=L),u.applyFromCharCode(b)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(I,y),I.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var b;for((R=R||M.length)>M.length&&(R=M.length),b=R-1;0<=b&&(192&M[b])==128;)b--;return b<0||b===0?R:b+S[M[b]]>R?b:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=I,u.inherits(k,y),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,c,d){var u=o("./support"),m=o("./base64"),_=o("./nodejsUtils"),y=o("./external");function S(E){return E}function A(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}o("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(E,L,T){var M=[],R=0,b=E.length;if(b<=T)return String.fromCharCode.apply(null,E);for(;R<b;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,b)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,b)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,_.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=I.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=I.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return I.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return I.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return A(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return A(E,new Uint8Array(E.length))},nodebuffer:function(E){return A(E,_.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return _.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&_.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return y.Promise.resolve(L).then(function(b){return u.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new y.Promise(function(U,N){var j=new FileReader;j.onload=function(J){U(J.target.result)},j.onerror=function(J){N(J.target.error)},j.readAsArrayBuffer(b)}):b}).then(function(b){var U=d.getTypeOf(b);return U?(U==="arraybuffer"?b=d.transformTo("uint8array",b):U==="string"&&(R?b=m.decode(b):T&&M!==!0&&(b=function(N){return A(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(b))),b):y.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./signature"),y=o("./zipEntry"),S=o("./support");function A(I){this.files=[],this.loadOptions=I}A.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(I)+")")}},isSignature:function(I,k){var D=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},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 I=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,I);this.zipComment=this.loadOptions.decodeFileName(D)},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 I,k,D,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[I]={id:I,length:k,value:D}},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 I,k;for(I=0;I<this.files.length;I++)k=this.files[I],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(_.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(_.CENTRAL_FILE_HEADER);)(I=new y({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var I=this.reader.lastIndexOfSignature(_.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,_.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(I);var k=I;if(this.checkSignature(_.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,_.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(_.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(_.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,_.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=u(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./compressedObject"),y=o("./crc32"),S=o("./utf8"),A=o("./compressions"),I=o("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((F=function(L){for(var T in A)if(Object.prototype.hasOwnProperty.call(A,T)&&A[T].magic===L)return A[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new _(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=o("./stream/StreamHelper"),_=o("./stream/DataWorker"),y=o("./utf8"),S=o("./compressedObject"),A=o("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new y.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new y.Utf8DecodeWorker))}catch(R){(E=new A("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new y.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof A?this._data:new _(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)u.prototype[I[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,c,d){(function(u){var m,_,y=u.MutationObserver||u.WebKitMutationObserver;if(y){var S=0,A=new y(F),I=u.document.createTextNode("");A.observe(I,{characterData:!0}),m=function(){I.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;_=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}_=!1}c.exports=function(E){D.push(E)!==1||_||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,c,d){var u=o("immediate");function m(){}var _={},y=["REJECTED"],S=["FULFILLED"],A=["PENDING"];function I(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var b;try{b=M(R)}catch(U){return _.reject(T,U)}b===T?_.reject(T,new TypeError("Cannot resolve promise with itself")):_.resolve(T,b)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function b(j){R||(R=!0,_.reject(T,j))}function U(j){R||(R=!0,_.resolve(T,j))}var N=L(function(){M(U,b)});N.status==="error"&&b(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(b){R.status="error",R.value=b}return R}(c.exports=I).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},I.prototype.catch=function(T){return this.then(null,T)},I.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===y)return this;var R=new this.constructor(m);return this.state!==A?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){_.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){_.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},_.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return _.reject(T,R.value);var b=R.value;if(b)E(T,b);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},_.reject=function(T,M){T.state=y,T.outcome=M;for(var R=-1,b=T.queue.length;++R<b;)T.queue[R].callRejected(M);return T},I.resolve=function(T){return T instanceof this?T:_.resolve(new this(m),T)},I.reject=function(T){var M=new this(m);return _.reject(M,T)},I.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,j=-1,J=new this(m);++j<R;)$(T[j],j);return J;function $(ct,It){M.resolve(ct).then(function(et){U[It]=et,++N!==R||b||(b=!0,_.resolve(J,U))},function(et){b||(b=!0,_.reject(J,et))})}},I.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)j=T[U],M.resolve(j).then(function(J){b||(b=!0,_.resolve(N,J))},function(J){b||(b=!0,_.reject(N,J))});var j;return N}},{immediate:36}],38:[function(o,c,d){var u={};(0,o("./lib/utils/common").assign)(u,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,c,d){var u=o("./zlib/deflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/messages"),S=o("./zlib/zstream"),A=Object.prototype.toString,I=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==I)throw new Error(y[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var b;if(b=typeof M.dictionary=="string"?_.string2buf(M.dictionary):A.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,b))!==I)throw new Error(y[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||y[R.err];return R.result}E.prototype.push=function(T,M){var R,b,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;b=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=_.string2buf(T):A.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,b))!==1&&R!==I)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(_.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return b===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===I):b!==2||(this.onEnd(I),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===I&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,c,d){var u=o("./zlib/inflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/constants"),S=o("./zlib/messages"),A=o("./zlib/zstream"),I=o("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==y.Z_OK)throw new Error(S[T]);this.header=new I,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,b,U,N,j=this.strm,J=this.options.chunkSize,$=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?y.Z_FINISH:y.Z_NO_FLUSH,typeof E=="string"?j.input=_.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?j.input=new Uint8Array(E):j.input=E,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new m.Buf8(J),j.next_out=0,j.avail_out=J),(T=u.inflate(j,y.Z_NO_FLUSH))===y.Z_NEED_DICT&&$&&(N=typeof $=="string"?_.string2buf($):k.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,T=u.inflateSetDictionary(this.strm,N)),T===y.Z_BUF_ERROR&&ct===!0&&(T=y.Z_OK,ct=!1),T!==y.Z_STREAM_END&&T!==y.Z_OK)return this.onEnd(T),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&T!==y.Z_STREAM_END&&(j.avail_in!==0||M!==y.Z_FINISH&&M!==y.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=_.utf8border(j.output,j.next_out),b=j.next_out-R,U=_.buf2string(j.output,R),j.next_out=b,j.avail_out=J-b,b&&m.arraySet(j.output,j.output,R,b,0),this.onData(U)):this.onData(m.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(ct=!0)}while((0<j.avail_in||j.avail_out===0)&&T!==y.Z_STREAM_END);return T===y.Z_STREAM_END&&(M=y.Z_FINISH),M===y.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===y.Z_OK):M!==y.Z_SYNC_FLUSH||(this.onEnd(y.Z_OK),!(j.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===y.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.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(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(y){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var A=S.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var I in A)A.hasOwnProperty(I)&&(y[I]=A[I])}}return y},d.shrinkBuf=function(y,S){return y.length===S?y:y.subarray?y.subarray(0,S):(y.length=S,y)};var m={arraySet:function(y,S,A,I,k){if(S.subarray&&y.subarray)y.set(S.subarray(A,A+I),k);else for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){var S,A,I,k,D,F;for(S=I=0,A=y.length;S<A;S++)I+=y[S].length;for(F=new Uint8Array(I),S=k=0,A=y.length;S<A;S++)D=y[S],F.set(D,k),k+=D.length;return F}},_={arraySet:function(y,S,A,I,k){for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){return[].concat.apply([],y)}};d.setTyped=function(y){y?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,_))},d.setTyped(u)},{}],42:[function(o,c,d){var u=o("./common"),m=!0,_=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{_=!1}for(var y=new u.Buf8(256),S=0;S<256;S++)y[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function A(I,k){if(k<65537&&(I.subarray&&_||!I.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(I,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(I[F]);return D}y[254]=y[254]=1,d.string2buf=function(I){var k,D,F,E,L,T=I.length,M=0;for(E=0;E<T;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(I){return A(I,I.length)},d.binstring2buf=function(I){for(var k=new u.Buf8(I.length),D=0,F=k.length;D<F;D++)k[D]=I.charCodeAt(D);return k},d.buf2string=function(I,k){var D,F,E,L,T=k||I.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=I[D++])<128)M[F++]=E;else if(4<(L=y[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&I[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return A(M,F)},d.utf8border=function(I,k){var D;for((k=k||I.length)>I.length&&(k=I.length),D=k-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?k:D+y[I[D]]>k?D:k}},{"./common":41}],43:[function(o,c,d){c.exports=function(u,m,_,y){for(var S=65535&u|0,A=u>>>16&65535|0,I=0;_!==0;){for(_-=I=2e3<_?2e3:_;A=A+(S=S+m[y++]|0)|0,--I;);S%=65521,A%=65521}return S|A<<16|0}},{}],44:[function(o,c,d){c.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(o,c,d){var u=function(){for(var m,_=[],y=0;y<256;y++){m=y;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;_[y]=m}return _}();c.exports=function(m,_,y,S){var A=u,I=S+y;m^=-1;for(var k=S;k<I;k++)m=m>>>8^A[255&(m^_[k])];return-1^m}},{}],46:[function(o,c,d){var u,m=o("../utils/common"),_=o("./trees"),y=o("./adler32"),S=o("./crc32"),A=o("./messages"),I=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,b=286,U=30,N=19,j=2*b+1,J=15,$=3,ct=258,It=ct+$+1,et=42,yt=113,G=1,Pt=2,Et=3,Ct=4;function fe(W,Jt){return W.msg=A[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function Ot(W){var Jt=W.state,Wt=Jt.pending;Wt>W.avail_out&&(Wt=W.avail_out),Wt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,Wt,W.next_out),W.next_out+=Wt,Jt.pending_out+=Wt,W.total_out+=Wt,W.avail_out-=Wt,Jt.pending-=Wt,Jt.pending===0&&(Jt.pending_out=0))}function Bt(W,Jt){_._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,Ot(W.strm)}function ke(W,Jt){W.pending_buf[W.pending++]=Jt}function ce(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Yt(W,Jt){var Wt,pt,dt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-It?W.strstart-(W.w_size-It):0,Q=W.window,ot=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],Xt=Q[Dt+ie];W.prev_length>=W.good_match&&(dt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(Wt=Jt)+ie]===Xt&&Q[Wt+ie-1]===Gt&&Q[Wt]===Q[Dt]&&Q[++Wt]===Q[Dt+1]){Dt+=2,Wt++;do;while(Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Dt<vt);if(pt=ct-(vt-Dt),Dt=vt-ct,ie<pt){if(W.match_start=Jt,Kt<=(ie=pt))break;Gt=Q[Dt+ie-1],Xt=Q[Dt+ie]}}while((Jt=nt[Jt&ot])>z&&--dt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,Wt,pt,dt,Dt,ie,Kt,z,Q,ot,nt=W.w_size;do{if(dt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-It)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=Wt=W.hash_size;pt=W.head[--Jt],W.head[Jt]=nt<=pt?pt-nt:0,--Wt;);for(Jt=Wt=nt;pt=W.prev[--Jt],W.prev[Jt]=nt<=pt?pt-nt:0,--Wt;);dt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=dt,ot=void 0,ot=ie.avail_in,Q<ot&&(ot=Q),Wt=ot===0?0:(ie.avail_in-=ot,m.arraySet(Kt,ie.input,ie.next_in,ot,z),ie.state.wrap===1?ie.adler=y(ie.adler,Kt,ot,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,ot,z)),ie.next_in+=ot,ie.total_in+=ot,ot),W.lookahead+=Wt,W.lookahead+W.insert>=$)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+$-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<$)););}while(W.lookahead<It&&W.strm.avail_in!==0)}function Oi(W,Jt){for(var Wt,pt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),Wt!==0&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt)),W.match_length>=$)if(pt=_._tr_tally(W,W.strstart-W.match_start,W.match_length-$),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=$){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else pt=_._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(pt&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var Wt,pt,dt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=$-1,Wt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt),W.match_length<=5&&(W.strategy===1||W.match_length===$&&4096<W.strstart-W.match_start)&&(W.match_length=$-1)),W.prev_length>=$&&W.match_length<=W.prev_length){for(dt=W.strstart+W.lookahead-$,pt=_._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-$),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=dt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=$-1,W.strstart++,pt&&(Bt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((pt=_._tr_tally(W,0,W.window[W.strstart-1]))&&Bt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(pt=_._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,Wt,pt,dt){this.good_length=W,this.max_lazy=Jt,this.nice_length=Wt,this.max_chain=pt,this.func=dt}function di(){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=M,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 m.Buf16(2*j),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(J+1),this.heap=new m.Buf16(2*b+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*b+1),Ft(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 Ii(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:yt,W.adler=Jt.wrap===2?0:1,Jt.last_flush=I,_._tr_init(Jt),D):fe(W,F)}function mn(W){var Jt=Ii(W);return Jt===D&&function(Wt){Wt.window_size=2*Wt.w_size,Ft(Wt.head),Wt.max_lazy_match=u[Wt.level].max_lazy,Wt.good_match=u[Wt.level].good_length,Wt.nice_match=u[Wt.level].nice_length,Wt.max_chain_length=u[Wt.level].max_chain,Wt.strstart=0,Wt.block_start=0,Wt.lookahead=0,Wt.insert=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,Wt.ins_h=0}(W.state),Jt}function Qi(W,Jt,Wt,pt,dt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),pt<0?(ie=0,pt=-pt):15<pt&&(ie=2,pt-=16),dt<1||R<dt||Wt!==M||pt<8||15<pt||Jt<0||9<Jt||Dt<0||L<Dt)return fe(W,F);pt===8&&(pt=9);var Kt=new di;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=pt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=dt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+$-1)/$),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<dt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=Wt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var Wt=65535;for(Wt>W.pending_buf_size-5&&(Wt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===I)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var pt=W.block_start+Wt;if((W.strstart===0||W.strstart>=pt)&&(W.lookahead=W.strstart-pt,W.strstart=pt,Bt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-It&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):(W.strstart>W.block_start&&(Bt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Oi),new Ge(4,5,16,8,Oi),new Ge(4,6,32,32,Oi),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Ii,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var Wt,pt,dt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?fe(W,F):F;if(pt=W.state,!W.output||!W.input&&W.avail_in!==0||pt.status===666&&Jt!==k)return fe(W,W.avail_out===0?-5:F);if(pt.strm=W,Wt=pt.last_flush,pt.last_flush=Jt,pt.status===et)if(pt.wrap===2)W.adler=0,ke(pt,31),ke(pt,139),ke(pt,8),pt.gzhead?(ke(pt,(pt.gzhead.text?1:0)+(pt.gzhead.hcrc?2:0)+(pt.gzhead.extra?4:0)+(pt.gzhead.name?8:0)+(pt.gzhead.comment?16:0)),ke(pt,255&pt.gzhead.time),ke(pt,pt.gzhead.time>>8&255),ke(pt,pt.gzhead.time>>16&255),ke(pt,pt.gzhead.time>>24&255),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,255&pt.gzhead.os),pt.gzhead.extra&&pt.gzhead.extra.length&&(ke(pt,255&pt.gzhead.extra.length),ke(pt,pt.gzhead.extra.length>>8&255)),pt.gzhead.hcrc&&(W.adler=S(W.adler,pt.pending_buf,pt.pending,0)),pt.gzindex=0,pt.status=69):(ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,3),pt.status=yt);else{var ie=M+(pt.w_bits-8<<4)<<8;ie|=(2<=pt.strategy||pt.level<2?0:pt.level<6?1:pt.level===6?2:3)<<6,pt.strstart!==0&&(ie|=32),ie+=31-ie%31,pt.status=yt,ce(pt,ie),pt.strstart!==0&&(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),W.adler=1}if(pt.status===69)if(pt.gzhead.extra){for(dt=pt.pending;pt.gzindex<(65535&pt.gzhead.extra.length)&&(pt.pending!==pt.pending_buf_size||(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending!==pt.pending_buf_size));)ke(pt,255&pt.gzhead.extra[pt.gzindex]),pt.gzindex++;pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),pt.gzindex===pt.gzhead.extra.length&&(pt.gzindex=0,pt.status=73)}else pt.status=73;if(pt.status===73)if(pt.gzhead.name){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.name.length?255&pt.gzhead.name.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.gzindex=0,pt.status=91)}else pt.status=91;if(pt.status===91)if(pt.gzhead.comment){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.comment.length?255&pt.gzhead.comment.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.status=103)}else pt.status=103;if(pt.status===103&&(pt.gzhead.hcrc?(pt.pending+2>pt.pending_buf_size&&Ot(W),pt.pending+2<=pt.pending_buf_size&&(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),W.adler=0,pt.status=yt)):pt.status=yt),pt.pending!==0){if(Ot(W),W.avail_out===0)return pt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(Wt)&&Jt!==k)return fe(W,-5);if(pt.status===666&&W.avail_in!==0)return fe(W,-5);if(W.avail_in!==0||pt.lookahead!==0||Jt!==I&&pt.status!==666){var Kt=pt.strategy===2?function(z,Q){for(var ot;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===I)return G;break}if(z.match_length=0,ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):pt.strategy===3?function(z,Q){for(var ot,nt,vt,Gt,Xt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===I)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=$&&0<z.strstart&&(nt=Xt[vt=z.strstart-1])===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]){Gt=z.strstart+ct;do;while(nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=$?(ot=_._tr_tally(z,1,z.match_length-$),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):u[pt.level].func(pt,Jt);if(Kt!==Et&&Kt!==Ct||(pt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(pt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?_._tr_align(pt):Jt!==5&&(_._tr_stored_block(pt,0,0,!1),Jt===3&&(Ft(pt.head),pt.lookahead===0&&(pt.strstart=0,pt.block_start=0,pt.insert=0))),Ot(W),W.avail_out===0))return pt.last_flush=-1,D}return Jt!==k?D:pt.wrap<=0?1:(pt.wrap===2?(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),ke(pt,W.adler>>16&255),ke(pt,W.adler>>24&255),ke(pt,255&W.total_in),ke(pt,W.total_in>>8&255),ke(pt,W.total_in>>16&255),ke(pt,W.total_in>>24&255)):(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),Ot(W),0<pt.wrap&&(pt.wrap=-pt.wrap),pt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==yt&&Jt!==666?fe(W,F):(W.state=null,Jt===yt?fe(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var Wt,pt,dt,Dt,ie,Kt,z,Q,ot=Jt.length;if(!W||!W.state||(Dt=(Wt=W.state).wrap)===2||Dt===1&&Wt.status!==et||Wt.lookahead)return F;for(Dt===1&&(W.adler=y(W.adler,Jt,ot,0)),Wt.wrap=0,ot>=Wt.w_size&&(Dt===0&&(Ft(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),Q=new m.Buf8(Wt.w_size),m.arraySet(Q,Jt,ot-Wt.w_size,Wt.w_size,0),Jt=Q,ot=Wt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=ot,W.next_in=0,W.input=Jt,$e(Wt);Wt.lookahead>=$;){for(pt=Wt.strstart,dt=Wt.lookahead-($-1);Wt.ins_h=(Wt.ins_h<<Wt.hash_shift^Wt.window[pt+$-1])&Wt.hash_mask,Wt.prev[pt&Wt.w_mask]=Wt.head[Wt.ins_h],Wt.head[Wt.ins_h]=pt,pt++,--dt;);Wt.strstart=pt,Wt.lookahead=$-1,$e(Wt)}return Wt.strstart+=Wt.lookahead,Wt.block_start=Wt.strstart,Wt.insert=Wt.lookahead,Wt.lookahead=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,Wt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,c,d){c.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(o,c,d){c.exports=function(u,m){var _,y,S,A,I,k,D,F,E,L,T,M,R,b,U,N,j,J,$,ct,It,et,yt,G,Pt;_=u.state,y=u.next_in,G=u.input,S=y+(u.avail_in-5),A=u.next_out,Pt=u.output,I=A-(m-u.avail_out),k=A+(u.avail_out-257),D=_.dmax,F=_.wsize,E=_.whave,L=_.wnext,T=_.window,M=_.hold,R=_.bits,b=_.lencode,U=_.distcode,N=(1<<_.lenbits)-1,j=(1<<_.distbits)-1;t:do{R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=b[M&N];e:for(;;){if(M>>>=$=J>>>24,R-=$,($=J>>>16&255)===0)Pt[A++]=65535&J;else{if(!(16&$)){if(!(64&$)){J=b[(65535&J)+(M&(1<<$)-1)];continue e}if(32&$){_.mode=12;break t}u.msg="invalid literal/length code",_.mode=30;break t}ct=65535&J,($&=15)&&(R<$&&(M+=G[y++]<<R,R+=8),ct+=M&(1<<$)-1,M>>>=$,R-=$),R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=U[M&j];i:for(;;){if(M>>>=$=J>>>24,R-=$,!(16&($=J>>>16&255))){if(!(64&$)){J=U[(65535&J)+(M&(1<<$)-1)];continue i}u.msg="invalid distance code",_.mode=30;break t}if(It=65535&J,R<($&=15)&&(M+=G[y++]<<R,(R+=8)<$&&(M+=G[y++]<<R,R+=8)),D<(It+=M&(1<<$)-1)){u.msg="invalid distance too far back",_.mode=30;break t}if(M>>>=$,R-=$,($=A-I)<It){if(E<($=It-$)&&_.sane){u.msg="invalid distance too far back",_.mode=30;break t}if(yt=T,(et=0)===L){if(et+=F-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}else if(L<$){if(et+=F+L-$,($-=L)<ct){for(ct-=$;Pt[A++]=T[et++],--$;);if(et=0,L<ct){for(ct-=$=L;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}}else if(et+=L-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}for(;2<ct;)Pt[A++]=yt[et++],Pt[A++]=yt[et++],Pt[A++]=yt[et++],ct-=3;ct&&(Pt[A++]=yt[et++],1<ct&&(Pt[A++]=yt[et++]))}else{for(et=A-It;Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],2<(ct-=3););ct&&(Pt[A++]=Pt[et++],1<ct&&(Pt[A++]=Pt[et++]))}break}}break}}while(y<S&&A<k);y-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=y,u.next_out=A,u.avail_in=y<S?S-y+5:5-(y-S),u.avail_out=A<k?k-A+257:257-(A-k),_.hold=M,_.bits=R}},{}],49:[function(o,c,d){var u=o("../utils/common"),m=o("./adler32"),_=o("./crc32"),y=o("./inffast"),S=o("./inftrees"),A=1,I=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){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 u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var yt;return et&&et.state?(yt=et.state,et.total_in=et.total_out=yt.total=0,et.msg="",yt.wrap&&(et.adler=1&yt.wrap),yt.mode=F,yt.last=0,yt.havedict=0,yt.dmax=32768,yt.head=null,yt.hold=0,yt.bits=0,yt.lencode=yt.lendyn=new u.Buf32(E),yt.distcode=yt.distdyn=new u.Buf32(L),yt.sane=1,yt.back=-1,k):D}function b(et){var yt;return et&&et.state?((yt=et.state).wsize=0,yt.whave=0,yt.wnext=0,R(et)):D}function U(et,yt){var G,Pt;return et&&et.state?(Pt=et.state,yt<0?(G=0,yt=-yt):(G=1+(yt>>4),yt<48&&(yt&=15)),yt&&(yt<8||15<yt)?D:(Pt.window!==null&&Pt.wbits!==yt&&(Pt.window=null),Pt.wrap=G,Pt.wbits=yt,b(et))):D}function N(et,yt){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,yt))!==k&&(et.state=null),G):D}var j,J,$=!0;function ct(et){if($){var yt;for(j=new u.Buf32(512),J=new u.Buf32(32),yt=0;yt<144;)et.lens[yt++]=8;for(;yt<256;)et.lens[yt++]=9;for(;yt<280;)et.lens[yt++]=7;for(;yt<288;)et.lens[yt++]=8;for(S(A,et.lens,0,288,j,0,et.work,{bits:9}),yt=0;yt<32;)et.lens[yt++]=5;S(I,et.lens,0,32,J,0,et.work,{bits:5}),$=!1}et.lencode=j,et.lenbits=9,et.distcode=J,et.distbits=5}function It(et,yt,G,Pt){var Et,Ct=et.state;return Ct.window===null&&(Ct.wsize=1<<Ct.wbits,Ct.wnext=0,Ct.whave=0,Ct.window=new u.Buf8(Ct.wsize)),Pt>=Ct.wsize?(u.arraySet(Ct.window,yt,G-Ct.wsize,Ct.wsize,0),Ct.wnext=0,Ct.whave=Ct.wsize):(Pt<(Et=Ct.wsize-Ct.wnext)&&(Et=Pt),u.arraySet(Ct.window,yt,G-Pt,Et,Ct.wnext),(Pt-=Et)?(u.arraySet(Ct.window,yt,G-Pt,Pt,0),Ct.wnext=Pt,Ct.whave=Ct.wsize):(Ct.wnext+=Et,Ct.wnext===Ct.wsize&&(Ct.wnext=0),Ct.whave<Ct.wsize&&(Ct.whave+=Et))),0}d.inflateReset=b,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,yt){var G,Pt,Et,Ct,fe,re,Ft,Ot,Bt,ke,ce,Yt,$e,Oi,Oe,Ge,di,Ii,mn,Qi,W,Jt,Wt,pt,dt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,ke=re,ce=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(2&G.wrap&&Ot===35615){Dt[G.check=0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0),Bt=Ot=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&Ot)<<8)+(Ot>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&Ot)!=8){et.msg="unknown compression method",G.mode=30;break}if(Bt-=4,W=8+(15&(Ot>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&Ot?10:12,Bt=Ot=0;break;case 2:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.flags=Ot,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=Ot>>8&1),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=3;case 3:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.time=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,Dt[2]=Ot>>>16&255,Dt[3]=Ot>>>24&255,G.check=_(G.check,Dt,4,0)),Bt=Ot=0,G.mode=4;case 4:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.xflags=255&Ot,G.head.os=Ot>>8),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=5;case 5:if(1024&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length=Ot,G.head&&(G.head.extra_len=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Yt=G.length)&&(Yt=re),Yt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,Ct,Yt,W)),512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,G.length-=Yt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Bt=Ot=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}et.adler=G.check=T(Ot),Bt=Ot=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,2;et.adler=G.check=1,G.mode=12;case 12:if(yt===5||yt===6)break t;case 13:if(G.last){Ot>>>=7&Bt,Bt-=7&Bt,G.mode=27;break}for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}switch(G.last=1&Ot,Bt-=1,3&(Ot>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,yt!==6)break;Ot>>>=2,Bt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}Ot>>>=2,Bt-=2;break;case 14:for(Ot>>>=7&Bt,Bt-=7&Bt;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if((65535&Ot)!=(Ot>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&Ot,Bt=Ot=0,G.mode=15,yt===6)break t;case 15:G.mode=16;case 16:if(Yt=G.length){if(re<Yt&&(Yt=re),Ft<Yt&&(Yt=Ft),Yt===0)break t;u.arraySet(Et,Pt,Ct,Yt,fe),re-=Yt,Ct+=Yt,Ft-=Yt,fe+=Yt,G.length-=Yt;break}G.mode=12;break;case 17:for(;Bt<14;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.nlen=257+(31&Ot),Ot>>>=5,Bt-=5,G.ndist=1+(31&Ot),Ot>>>=5,Bt-=5,G.ncode=4+(15&Ot),Ot>>>=4,Bt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.lens[ie[G.have++]]=7&Ot,Ot>>>=3,Bt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,Wt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(di<16)Ot>>>=Oe,Bt-=Oe,G.lens[G.have++]=di;else{if(di===16){for(pt=Oe+2;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot>>>=Oe,Bt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Yt=3+(3&Ot),Ot>>>=2,Bt-=2}else if(di===17){for(pt=Oe+3;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=3+(7&(Ot>>>=Oe)),Ot>>>=3,Bt-=3}else{for(pt=Oe+7;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=11+(127&(Ot>>>=Oe)),Ot>>>=7,Bt-=7}if(G.have+Yt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Yt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,Wt={bits:G.lenbits},Jt=S(A,G.lens,0,G.nlen,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,Wt={bits:G.distbits},Jt=S(I,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,Wt),G.distbits=Wt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,yt===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,y(et,ce),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ge&&!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.lencode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,G.length=di,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(dt=G.distcode[Ot&(1<<G.distbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.distcode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=di,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.offset+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Yt=ce-Ft,G.offset>Yt){if((Yt=G.offset-Yt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Yt>G.wnext?(Yt-=G.wnext,G.wsize-Yt):G.wnext-Yt,Yt>G.length&&(Yt=G.length),Oi=G.window}else Oi=Et,$e=fe-G.offset,Yt=G.length;for(Ft<Yt&&(Yt=Ft),Ft-=Yt,G.length-=Yt;Et[fe++]=Oi[$e++],--Yt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[fe++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Bt<32;){if(re===0)break t;re--,Ot|=Pt[Ct++]<<Bt,Bt+=8}if(ce-=Ft,et.total_out+=ce,G.total+=ce,ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,fe-ce):m(G.check,Et,ce,fe-ce)),ce=Ft,(G.flags?Ot:T(Ot))!==G.check){et.msg="incorrect data check",G.mode=30;break}Bt=Ot=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Bt=Ot=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,(G.wsize||ce!==et.avail_out&&G.mode<30&&(G.mode<27||yt!==4))&&It(et,et.output,et.next_out,ce-et.avail_out)?(G.mode=31,-4):(ke-=et.avail_in,ce-=et.avail_out,et.total_in+=ke,et.total_out+=ce,G.total+=ce,G.wrap&&ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,et.next_out-ce):m(G.check,Et,ce,et.next_out-ce)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(ke==0&&ce===0||yt===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var yt=et.state;return yt.window&&(yt.window=null),et.state=null,k},d.inflateGetHeader=function(et,yt){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=yt).done=!1,k):D},d.inflateSetDictionary=function(et,yt){var G,Pt=yt.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,yt,Pt,0)!==G.check?-3:It(et,yt,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,c,d){var u=o("../utils/common"),m=[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],_=[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],y=[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],S=[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];c.exports=function(A,I,k,D,F,E,L,T){var M,R,b,U,N,j,J,$,ct,It=T.bits,et=0,yt=0,G=0,Pt=0,Et=0,Ct=0,fe=0,re=0,Ft=0,Ot=0,Bt=null,ke=0,ce=new u.Buf16(16),Yt=new u.Buf16(16),$e=null,Oi=0;for(et=0;et<=15;et++)ce[et]=0;for(yt=0;yt<D;yt++)ce[I[k+yt]]++;for(Et=It,Pt=15;1<=Pt&&ce[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&ce[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=ce[et])<0)return-1;if(0<re&&(A===0||Pt!==1))return-1;for(Yt[1]=0,et=1;et<15;et++)Yt[et+1]=Yt[et]+ce[et];for(yt=0;yt<D;yt++)I[k+yt]!==0&&(L[Yt[I[k+yt]]++]=yt);if(j=A===0?(Bt=$e=L,19):A===1?(Bt=m,ke-=257,$e=_,Oi-=257,256):(Bt=y,$e=S,-1),et=G,N=E,fe=yt=Ot=0,b=-1,U=(Ft=1<<(Ct=Et))-1,A===1&&852<Ft||A===2&&592<Ft)return 1;for(;;){for(J=et-fe,ct=L[yt]<j?($=0,L[yt]):L[yt]>j?($=$e[Oi+L[yt]],Bt[ke+L[yt]]):($=96,0),M=1<<et-fe,G=R=1<<Ct;F[N+(Ot>>fe)+(R-=M)]=J<<24|$<<16|ct|0,R!==0;);for(M=1<<et-1;Ot&M;)M>>=1;if(M!==0?(Ot&=M-1,Ot+=M):Ot=0,yt++,--ce[et]==0){if(et===Pt)break;et=I[k+L[yt]]}if(Et<et&&(Ot&U)!==b){for(fe===0&&(fe=Et),N+=G,re=1<<(Ct=et-fe);Ct+fe<Pt&&!((re-=ce[Ct+fe])<=0);)Ct++,re<<=1;if(Ft+=1<<Ct,A===1&&852<Ft||A===2&&592<Ft)return 1;F[b=Ot&U]=Et<<24|Ct<<16|N-E|0}}return Ot!==0&&(F[N+Ot]=et-fe<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(o,c,d){c.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(o,c,d){var u=o("../utils/common"),m=0,_=1;function y(dt){for(var Dt=dt.length;0<=--Dt;)dt[Dt]=0}var S=0,A=29,I=256,k=I+1+A,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,b=16,U=17,N=18,j=[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],J=[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],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=new Array(2*(k+2));y(It);var et=new Array(2*D);y(et);var yt=new Array(512);y(yt);var G=new Array(256);y(G);var Pt=new Array(A);y(Pt);var Et,Ct,fe,re=new Array(D);function Ft(dt,Dt,ie,Kt,z){this.static_tree=dt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=dt&&dt.length}function Ot(dt,Dt){this.dyn_tree=dt,this.max_code=0,this.stat_desc=Dt}function Bt(dt){return dt<256?yt[dt]:yt[256+(dt>>>7)]}function ke(dt,Dt){dt.pending_buf[dt.pending++]=255&Dt,dt.pending_buf[dt.pending++]=Dt>>>8&255}function ce(dt,Dt,ie){dt.bi_valid>T-ie?(dt.bi_buf|=Dt<<dt.bi_valid&65535,ke(dt,dt.bi_buf),dt.bi_buf=Dt>>T-dt.bi_valid,dt.bi_valid+=ie-T):(dt.bi_buf|=Dt<<dt.bi_valid&65535,dt.bi_valid+=ie)}function Yt(dt,Dt,ie){ce(dt,ie[2*Dt],ie[2*Dt+1])}function $e(dt,Dt){for(var ie=0;ie|=1&dt,dt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Oi(dt,Dt,ie){var Kt,z,Q=new Array(L+1),ot=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=ot=ot+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=dt[2*z+1];nt!==0&&(dt[2*z]=$e(Q[nt]++,nt))}}function Oe(dt){var Dt;for(Dt=0;Dt<k;Dt++)dt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)dt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)dt.bl_tree[2*Dt]=0;dt.dyn_ltree[2*R]=1,dt.opt_len=dt.static_len=0,dt.last_lit=dt.matches=0}function Ge(dt){8<dt.bi_valid?ke(dt,dt.bi_buf):0<dt.bi_valid&&(dt.pending_buf[dt.pending++]=dt.bi_buf),dt.bi_buf=0,dt.bi_valid=0}function di(dt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return dt[z]<dt[Q]||dt[z]===dt[Q]&&Kt[Dt]<=Kt[ie]}function Ii(dt,Dt,ie){for(var Kt=dt.heap[ie],z=ie<<1;z<=dt.heap_len&&(z<dt.heap_len&&di(Dt,dt.heap[z+1],dt.heap[z],dt.depth)&&z++,!di(Dt,Kt,dt.heap[z],dt.depth));)dt.heap[ie]=dt.heap[z],ie=z,z<<=1;dt.heap[ie]=Kt}function mn(dt,Dt,ie){var Kt,z,Q,ot,nt=0;if(dt.last_lit!==0)for(;Kt=dt.pending_buf[dt.d_buf+2*nt]<<8|dt.pending_buf[dt.d_buf+2*nt+1],z=dt.pending_buf[dt.l_buf+nt],nt++,Kt===0?Yt(dt,z,Dt):(Yt(dt,(Q=G[z])+I+1,Dt),(ot=j[Q])!==0&&ce(dt,z-=Pt[Q],ot),Yt(dt,Q=Bt(--Kt),ie),(ot=J[Q])!==0&&ce(dt,Kt-=re[Q],ot)),nt<dt.last_lit;);Yt(dt,R,Dt)}function Qi(dt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,ot=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(dt.heap_len=0,dt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(dt.heap[++dt.heap_len]=Gt=ie,dt.depth[ie]=0):Q[2*ie+1]=0;for(;dt.heap_len<2;)Q[2*(z=dt.heap[++dt.heap_len]=Gt<2?++Gt:0)]=1,dt.depth[z]=0,dt.opt_len--,nt&&(dt.static_len-=ot[2*z+1]);for(Dt.max_code=Gt,ie=dt.heap_len>>1;1<=ie;ie--)Ii(dt,Q,ie);for(z=vt;ie=dt.heap[1],dt.heap[1]=dt.heap[dt.heap_len--],Ii(dt,Q,1),Kt=dt.heap[1],dt.heap[--dt.heap_max]=ie,dt.heap[--dt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],dt.depth[z]=(dt.depth[ie]>=dt.depth[Kt]?dt.depth[ie]:dt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,dt.heap[1]=z++,Ii(dt,Q,1),2<=dt.heap_len;);dt.heap[--dt.heap_max]=dt.heap[1],function(Xt,jt){var Ne,Re,ge,we,_i,Si,ni=jt.dyn_tree,Ei=jt.max_code,qr=jt.stat_desc.static_tree,or=jt.stat_desc.has_stree,on=jt.stat_desc.extra_bits,As=jt.stat_desc.extra_base,Di=jt.stat_desc.max_length,Xs=0;for(we=0;we<=L;we++)Xt.bl_count[we]=0;for(ni[2*Xt.heap[Xt.heap_max]+1]=0,Ne=Xt.heap_max+1;Ne<E;Ne++)Di<(we=ni[2*ni[2*(Re=Xt.heap[Ne])+1]+1]+1)&&(we=Di,Xs++),ni[2*Re+1]=we,Ei<Re||(Xt.bl_count[we]++,_i=0,As<=Re&&(_i=on[Re-As]),Si=ni[2*Re],Xt.opt_len+=Si*(we+_i),or&&(Xt.static_len+=Si*(qr[2*Re+1]+_i)));if(Xs!==0){do{for(we=Di-1;Xt.bl_count[we]===0;)we--;Xt.bl_count[we]--,Xt.bl_count[we+1]+=2,Xt.bl_count[Di]--,Xs-=2}while(0<Xs);for(we=Di;we!==0;we--)for(Re=Xt.bl_count[we];Re!==0;)Ei<(ge=Xt.heap[--Ne])||(ni[2*ge+1]!==we&&(Xt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Re--)}}(dt,Dt),Oi(Q,Gt,dt.bl_count)}function W(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=ot,ot=Dt[2*(Kt+1)+1],++nt<vt&&z===ot||(nt<Gt?dt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&dt.bl_tree[2*z]++,dt.bl_tree[2*b]++):nt<=10?dt.bl_tree[2*U]++:dt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4))}function Jt(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=ot,ot=Dt[2*(Kt+1)+1],!(++nt<vt&&z===ot)){if(nt<Gt)for(;Yt(dt,z,dt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Yt(dt,z,dt.bl_tree),nt--),Yt(dt,b,dt.bl_tree),ce(dt,nt-3,2)):nt<=10?(Yt(dt,U,dt.bl_tree),ce(dt,nt-3,3)):(Yt(dt,N,dt.bl_tree),ce(dt,nt-11,7));Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4)}}y(re);var Wt=!1;function pt(dt,Dt,ie,Kt){ce(dt,(S<<1)+(Kt?1:0),3),function(z,Q,ot,nt){Ge(z),nt&&(ke(z,ot),ke(z,~ot)),u.arraySet(z.pending_buf,z.window,Q,ot,z.pending),z.pending+=ot}(dt,Dt,ie,!0)}d._tr_init=function(dt){Wt||(function(){var Dt,ie,Kt,z,Q,ot=new Array(L+1);for(z=Kt=0;z<A-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<j[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<J[z];Dt++)yt[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<J[z]-7;Dt++)yt[256+Q++]=z;for(ie=0;ie<=L;ie++)ot[ie]=0;for(Dt=0;Dt<=143;)It[2*Dt+1]=8,Dt++,ot[8]++;for(;Dt<=255;)It[2*Dt+1]=9,Dt++,ot[9]++;for(;Dt<=279;)It[2*Dt+1]=7,Dt++,ot[7]++;for(;Dt<=287;)It[2*Dt+1]=8,Dt++,ot[8]++;for(Oi(It,k+1,ot),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(It,j,I+1,k,L),Ct=new Ft(et,J,0,D,L),fe=new Ft(new Array(0),$,0,F,M)}(),Wt=!0),dt.l_desc=new Ot(dt.dyn_ltree,Et),dt.d_desc=new Ot(dt.dyn_dtree,Ct),dt.bl_desc=new Ot(dt.bl_tree,fe),dt.bi_buf=0,dt.bi_valid=0,Oe(dt)},d._tr_stored_block=pt,d._tr_flush_block=function(dt,Dt,ie,Kt){var z,Q,ot=0;0<dt.level?(dt.strm.data_type===2&&(dt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return _;for(vt=32;vt<I;vt++)if(nt.dyn_ltree[2*vt]!==0)return _;return m}(dt)),Qi(dt,dt.l_desc),Qi(dt,dt.d_desc),ot=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(dt),z=dt.opt_len+3+7>>>3,(Q=dt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?pt(dt,Dt,ie,Kt):dt.strategy===4||Q===z?(ce(dt,2+(Kt?1:0),3),mn(dt,It,et)):(ce(dt,4+(Kt?1:0),3),function(nt,vt,Gt,Xt){var jt;for(ce(nt,vt-257,5),ce(nt,Gt-1,5),ce(nt,Xt-4,4),jt=0;jt<Xt;jt++)ce(nt,nt.bl_tree[2*ct[jt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(dt,dt.l_desc.max_code+1,dt.d_desc.max_code+1,ot+1),mn(dt,dt.dyn_ltree,dt.dyn_dtree)),Oe(dt),Kt&&Ge(dt)},d._tr_tally=function(dt,Dt,ie){return dt.pending_buf[dt.d_buf+2*dt.last_lit]=Dt>>>8&255,dt.pending_buf[dt.d_buf+2*dt.last_lit+1]=255&Dt,dt.pending_buf[dt.l_buf+dt.last_lit]=255&ie,dt.last_lit++,Dt===0?dt.dyn_ltree[2*ie]++:(dt.matches++,Dt--,dt.dyn_ltree[2*(G[ie]+I+1)]++,dt.dyn_dtree[2*Bt(Dt)]++),dt.last_lit===dt.lit_bufsize-1},d._tr_align=function(dt){ce(dt,2,3),Yt(dt,R,It),function(Dt){Dt.bi_valid===16?(ke(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(dt)}},{"../utils/common":41}],53:[function(o,c,d){c.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(o,c,d){(function(u){(function(m,_){if(!m.setImmediate){var y,S,A,I,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,y={}.toString.call(m.process)==="[object process]"?function(b){process.nextTick(function(){M(b)})}:function(){if(m.postMessage&&!m.importScripts){var b=!0,U=m.onmessage;return m.onmessage=function(){b=!1},m.postMessage("","*"),m.onmessage=U,b}}()?(I="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(b){m.postMessage(I+b,"*")}):m.MessageChannel?((A=new MessageChannel).port1.onmessage=function(b){M(b.data)},function(b){A.port2.postMessage(b)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(b){var U=E.createElement("script");U.onreadystatechange=function(){M(b),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(b){setTimeout(M,0,b)},L.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var j={callback:b,args:U};return D[k]=j,y(k),k++},L.clearImmediate=T}function T(b){delete D[b]}function M(b){if(F)setTimeout(M,0,b);else{var U=D[b];if(U){F=!0;try{(function(N){var j=N.callback,J=N.args;switch(J.length){case 0:j();break;case 1:j(J[0]);break;case 2:j(J[0],J[1]);break;case 3:j(J[0],J[1],J[2]);break;default:j.apply(_,J)}})(U)}finally{T(b),F=!1}}}}function R(b){b.source===m&&typeof b.data=="string"&&b.data.indexOf(I)===0&&M(+b.data.slice(I.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Sf);var um=Sf.exports;const cm=Ju(um);var Ef={exports:{}};(function(x,a){(function(o,c){c()})(Er,function(){function o(S,A){return typeof A>"u"?A={autoBom:!1}:typeof A!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,A,I){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){y(k.response,A,I)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var A=new XMLHttpRequest;A.open("HEAD",S,!1);try{A.send()}catch{}return 200<=A.status&&299>=A.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(A)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,_=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!_?function(S,A,I){var k=m.URL||m.webkitURL,D=document.createElement("a");A=A||S.name||"download",D.download=A,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,A,I):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,A,I){if(A=A||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(o(S,I),A);else if(d(S))c(S,A,I);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,A,I,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,A,I);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||_)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=y.saveAs=y,x.exports=y})})(Ef);var fm=Ef.exports;const pm=Ju(fm);class dm{constructor(a,o){window.mars3d?(this.map=a,this.panoramicViewClass=o,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var o,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:_,lng:y,alt:S}=this.map.getCameraView();this.lat=_,this.lng=y,this.alt=S,this.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(o=this.screenshotArray)==null?void 0:o.length]?this.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const o=await this.map.expImage({download:!1}),c=this.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(this.map.container,{filter:u=>u!==c[0]});this.mergeImage(o.image,d,o.width,o.height).then(u=>{var y;let m=Number(a)+1,_={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",_),(y=this.screenshotArray)==null||y.push(_),this.start(!1)})}mergeImage(a,o,c,d){return new Promise((u,m)=>{const _=document.createElement("canvas");_.width=c,_.height=d;const y=_.getContext("2d");if(_&&y){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{y.drawImage(S,0,0,c,d);const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{y.drawImage(A,0,0,c,d);const I=_.toDataURL("image/png");u(I)},A.src=o},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new cm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const A=u.slice(S,S+1024),I=new Array(A.length);for(let D=0;D<A.length;D++)I[D]=A.charCodeAt(D);const k=new Uint8Array(I);m.push(k)}const _=new Blob(m,{type:"image/jpeg"}),y=`${c.name}`;a.file(y,_,{binary:!0})});const o=await a.generateAsync({type:"blob"});pm(o,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const o=document.getElementById("mars3dContainer");o&&(o.style.width="",o.style.height="")}on(a,o){this.events[a]?this.events[a].push(o):this.events[a]=[o]}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}}function uo(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function bf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
2685
+ \0`,ce+=u(Ot,2),ce+=N.magic,ce+=u(R,2),ce+=u(b,2),ce+=u(Ft.crc32,4),ce+=u(Ft.compressedSize,4),ce+=u(Ft.uncompressedSize,4),ce+=u(J.length,2),ce+=u(Pt.length,2),{fileRecord:I.LOCAL_FILE_HEADER+ce+J+Pt,dirRecord:I.CENTRAL_FILE_HEADER+u(ke,2)+ce+u(It.length,2)+"\0\0\0\0"+u(Bt,4)+u(L,4)+J+Pt+It}}var _=o("../utils"),y=o("../stream/GenericWorker"),S=o("../utf8"),A=o("../crc32"),I=o("../signature");function k(D,F,E,L){y.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=F,this.zipPlatform=E,this.encodeFileName=L,this.streamFiles=D,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}_.inherits(k,y),k.prototype.push=function(D){var F=D.meta.percent||0,E=this.entriesCount,L=this._sources.length;this.accumulate?this.contentBuffer.push(D):(this.bytesWritten+=D.data.length,y.prototype.push.call(this,{data:D.data,meta:{currentFile:this.currentFile,percent:E?(F+100*(E-L-1))/E:100}}))},k.prototype.openedSource=function(D){this.currentSourceOffset=this.bytesWritten,this.currentFile=D.file.name;var F=this.streamFiles&&!D.file.dir;if(F){var E=m(D,F,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:E.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(D){this.accumulate=!1;var F=this.streamFiles&&!D.file.dir,E=m(D,F,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(E.dirRecord),F)this.push({data:function(L){return I.DATA_DESCRIPTOR+u(L.crc32,4)+u(L.compressedSize,4)+u(L.uncompressedSize,4)}(D),meta:{percent:100}});else for(this.push({data:E.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var D=this.bytesWritten,F=0;F<this.dirRecords.length;F++)this.push({data:this.dirRecords[F],meta:{percent:100}});var E=this.bytesWritten-D,L=function(T,M,R,b,U){var N=_.transformTo("string",U(b));return I.CENTRAL_DIRECTORY_END+"\0\0\0\0"+u(T,2)+u(T,2)+u(M,4)+u(R,4)+u(N.length,2)+N}(this.dirRecords.length,E,D,this.zipComment,this.encodeFileName);this.push({data:L,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(D){this._sources.push(D);var F=this;return D.on("data",function(E){F.processChunk(E)}),D.on("end",function(){F.closedSource(F.previous.streamInfo),F._sources.length?F.prepareNextSource():F.end()}),D.on("error",function(E){F.error(E)}),this},k.prototype.resume=function(){return!!y.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(D){var F=this._sources;if(!y.prototype.error.call(this,D))return!1;for(var E=0;E<F.length;E++)try{F[E].error(D)}catch{}return!0},k.prototype.lock=function(){y.prototype.lock.call(this);for(var D=this._sources,F=0;F<D.length;F++)D[F].lock()},c.exports=k},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(o,c,d){var u=o("../compressions"),m=o("./ZipFileWorker");d.generateWorker=function(_,y,S){var A=new m(y.streamFiles,S,y.platform,y.encodeFileName),I=0;try{_.forEach(function(k,D){I++;var F=function(M,R){var b=M||R,U=u[b];if(!U)throw new Error(b+" is not a valid compression method !");return U}(D.options.compression,y.compression),E=D.options.compressionOptions||y.compressionOptions||{},L=D.dir,T=D.date;D._compressWorker(F,E).withStreamInfo("file",{name:k,dir:L,date:T,comment:D.comment||"",unixPermissions:D.unixPermissions,dosPermissions:D.dosPermissions}).pipe(A)}),A.entriesCount=I}catch(k){A.error(k)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(o,c,d){function u(){if(!(this instanceof u))return new u;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var m=new u;for(var _ in this)typeof this[_]!="function"&&(m[_]=this[_]);return m}}(u.prototype=o("./object")).loadAsync=o("./load"),u.support=o("./support"),u.defaults=o("./defaults"),u.version="3.10.1",u.loadAsync=function(m,_){return new u().loadAsync(m,_)},u.external=o("./external"),c.exports=u},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(o,c,d){var u=o("./utils"),m=o("./external"),_=o("./utf8"),y=o("./zipEntries"),S=o("./stream/Crc32Probe"),A=o("./nodejsUtils");function I(k){return new m.Promise(function(D,F){var E=k.decompressed.getContentWorker().pipe(new S);E.on("error",function(L){F(L)}).on("end",function(){E.streamInfo.crc32!==k.decompressed.crc32?F(new Error("Corrupted zip : CRC32 mismatch")):D()}).resume()})}c.exports=function(k,D){var F=this;return D=u.extend(D||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:_.utf8decode}),A.isNode&&A.isStream(k)?m.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",k,!0,D.optimizedBinaryString,D.base64).then(function(E){var L=new y(D);return L.load(E),L}).then(function(E){var L=[m.Promise.resolve(E)],T=E.files;if(D.checkCRC32)for(var M=0;M<T.length;M++)L.push(I(T[M]));return m.Promise.all(L)}).then(function(E){for(var L=E.shift(),T=L.files,M=0;M<T.length;M++){var R=T[M],b=R.fileNameStr,U=u.resolve(R.fileNameStr);F.file(U,R.decompressed,{binary:!0,optimizedBinaryString:!0,date:R.date,dir:R.dir,comment:R.fileCommentStr.length?R.fileCommentStr:null,unixPermissions:R.unixPermissions,dosPermissions:R.dosPermissions,createFolders:D.createFolders}),R.dir||(F.file(U).unsafeOriginalName=b)}return L.zipComment.length&&(F.comment=L.zipComment),F})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(o,c,d){var u=o("../utils"),m=o("../stream/GenericWorker");function _(y,S){m.call(this,"Nodejs stream input adapter for "+y),this._upstreamEnded=!1,this._bindStream(S)}u.inherits(_,m),_.prototype._bindStream=function(y){var S=this;(this._stream=y).pause(),y.on("data",function(A){S.push({data:A,meta:{percent:0}})}).on("error",function(A){S.isPaused?this.generatedError=A:S.error(A)}).on("end",function(){S.isPaused?S._upstreamEnded=!0:S.end()})},_.prototype.pause=function(){return!!m.prototype.pause.call(this)&&(this._stream.pause(),!0)},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},c.exports=_},{"../stream/GenericWorker":28,"../utils":32}],13:[function(o,c,d){var u=o("readable-stream").Readable;function m(_,y,S){u.call(this,y),this._helper=_;var A=this;_.on("data",function(I,k){A.push(I)||A._helper.pause(),S&&S(k)}).on("error",function(I){A.emit("error",I)}).on("end",function(){A.push(null)})}o("../utils").inherits(m,u),m.prototype._read=function(){this._helper.resume()},c.exports=m},{"../utils":32,"readable-stream":16}],14:[function(o,c,d){c.exports={isNode:typeof Buffer<"u",newBufferFrom:function(u,m){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(u,m);if(typeof u=="number")throw new Error('The "data" argument must not be a number');return new Buffer(u,m)},allocBuffer:function(u){if(Buffer.alloc)return Buffer.alloc(u);var m=new Buffer(u);return m.fill(0),m},isBuffer:function(u){return Buffer.isBuffer(u)},isStream:function(u){return u&&typeof u.on=="function"&&typeof u.pause=="function"&&typeof u.resume=="function"}}},{}],15:[function(o,c,d){function u(U,N,j){var J,$=_.getTypeOf(N),ct=_.extend(j||{},A);ct.date=ct.date||new Date,ct.compression!==null&&(ct.compression=ct.compression.toUpperCase()),typeof ct.unixPermissions=="string"&&(ct.unixPermissions=parseInt(ct.unixPermissions,8)),ct.unixPermissions&&16384&ct.unixPermissions&&(ct.dir=!0),ct.dosPermissions&&16&ct.dosPermissions&&(ct.dir=!0),ct.dir&&(U=T(U)),ct.createFolders&&(J=L(U))&&M.call(this,J,!0);var It=$==="string"&&ct.binary===!1&&ct.base64===!1;j&&j.binary!==void 0||(ct.binary=!It),(N instanceof I&&N.uncompressedSize===0||ct.dir||!N||N.length===0)&&(ct.base64=!1,ct.binary=!0,N="",ct.compression="STORE",$="string");var et=null;et=N instanceof I||N instanceof y?N:F.isNode&&F.isStream(N)?new E(U,N):_.prepareContent(U,N,ct.binary,ct.optimizedBinaryString,ct.base64);var yt=new k(U,et,ct);this.files[U]=yt}var m=o("./utf8"),_=o("./utils"),y=o("./stream/GenericWorker"),S=o("./stream/StreamHelper"),A=o("./defaults"),I=o("./compressedObject"),k=o("./zipObject"),D=o("./generate"),F=o("./nodejsUtils"),E=o("./nodejs/NodejsStreamInputAdapter"),L=function(U){U.slice(-1)==="/"&&(U=U.substring(0,U.length-1));var N=U.lastIndexOf("/");return 0<N?U.substring(0,N):""},T=function(U){return U.slice(-1)!=="/"&&(U+="/"),U},M=function(U,N){return N=N!==void 0?N:A.createFolders,U=T(U),this.files[U]||u.call(this,U,null,{dir:!0,createFolders:N}),this.files[U]};function R(U){return Object.prototype.toString.call(U)==="[object RegExp]"}var b={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(U){var N,j,J;for(N in this.files)J=this.files[N],(j=N.slice(this.root.length,N.length))&&N.slice(0,this.root.length)===this.root&&U(j,J)},filter:function(U){var N=[];return this.forEach(function(j,J){U(j,J)&&N.push(J)}),N},file:function(U,N,j){if(arguments.length!==1)return U=this.root+U,u.call(this,U,N,j),this;if(R(U)){var J=U;return this.filter(function(ct,It){return!It.dir&&J.test(ct)})}var $=this.files[this.root+U];return $&&!$.dir?$:null},folder:function(U){if(!U)return this;if(R(U))return this.filter(function($,ct){return ct.dir&&U.test($)});var N=this.root+U,j=M.call(this,N),J=this.clone();return J.root=j.name,J},remove:function(U){U=this.root+U;var N=this.files[U];if(N||(U.slice(-1)!=="/"&&(U+="/"),N=this.files[U]),N&&!N.dir)delete this.files[U];else for(var j=this.filter(function($,ct){return ct.name.slice(0,U.length)===U}),J=0;J<j.length;J++)delete this.files[j[J].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(U){var N,j={};try{if((j=_.extend(U||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:m.utf8encode})).type=j.type.toLowerCase(),j.compression=j.compression.toUpperCase(),j.type==="binarystring"&&(j.type="string"),!j.type)throw new Error("No output type specified.");_.checkSupport(j.type),j.platform!=="darwin"&&j.platform!=="freebsd"&&j.platform!=="linux"&&j.platform!=="sunos"||(j.platform="UNIX"),j.platform==="win32"&&(j.platform="DOS");var J=j.comment||this.comment||"";N=D.generateWorker(this,j,J)}catch($){(N=new y("error")).error($)}return new S(N,j.type||"string",j.mimeType)},generateAsync:function(U,N){return this.generateInternalStream(U).accumulate(N)},generateNodeStream:function(U,N){return(U=U||{}).type||(U.type="nodebuffer"),this.generateInternalStream(U).toNodejsStream(N)}};c.exports=b},{"./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(o,c,d){c.exports=o("stream")},{stream:void 0}],17:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_);for(var y=0;y<this.data.length;y++)_[y]=255&_[y]}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data[this.zero+_]},m.prototype.lastIndexOfSignature=function(_){for(var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===y&&this.data[k+1]===S&&this.data[k+2]===A&&this.data[k+3]===I)return k-this.zero;return-1},m.prototype.readAndCheckSignature=function(_){var y=_.charCodeAt(0),S=_.charCodeAt(1),A=_.charCodeAt(2),I=_.charCodeAt(3),k=this.readData(4);return y===k[0]&&S===k[1]&&A===k[2]&&I===k[3]},m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return[];var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],18:[function(o,c,d){var u=o("../utils");function m(_){this.data=_,this.length=_.length,this.index=0,this.zero=0}m.prototype={checkOffset:function(_){this.checkIndex(this.index+_)},checkIndex:function(_){if(this.length<this.zero+_||_<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+_+"). Corrupted zip ?")},setIndex:function(_){this.checkIndex(_),this.index=_},skip:function(_){this.setIndex(this.index+_)},byteAt:function(){},readInt:function(_){var y,S=0;for(this.checkOffset(_),y=this.index+_-1;y>=this.index;y--)S=(S<<8)+this.byteAt(y);return this.index+=_,S},readString:function(_){return u.transformTo("string",this.readData(_))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var _=this.readInt(4);return new Date(Date.UTC(1980+(_>>25&127),(_>>21&15)-1,_>>16&31,_>>11&31,_>>5&63,(31&_)<<1))}},c.exports=m},{"../utils":32}],19:[function(o,c,d){var u=o("./Uint8ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(o,c,d){var u=o("./DataReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.byteAt=function(_){return this.data.charCodeAt(this.zero+_)},m.prototype.lastIndexOfSignature=function(_){return this.data.lastIndexOf(_)-this.zero},m.prototype.readAndCheckSignature=function(_){return _===this.readData(4)},m.prototype.readData=function(_){this.checkOffset(_);var y=this.data.slice(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./DataReader":18}],21:[function(o,c,d){var u=o("./ArrayReader");function m(_){u.call(this,_)}o("../utils").inherits(m,u),m.prototype.readData=function(_){if(this.checkOffset(_),_===0)return new Uint8Array(0);var y=this.data.subarray(this.zero+this.index,this.zero+this.index+_);return this.index+=_,y},c.exports=m},{"../utils":32,"./ArrayReader":17}],22:[function(o,c,d){var u=o("../utils"),m=o("../support"),_=o("./ArrayReader"),y=o("./StringReader"),S=o("./NodeBufferReader"),A=o("./Uint8ArrayReader");c.exports=function(I){var k=u.getTypeOf(I);return u.checkSupport(k),k!=="string"||m.uint8array?k==="nodebuffer"?new S(I):m.uint8array?new A(u.transformTo("uint8array",I)):new _(u.transformTo("array",I)):new y(I)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(o,c,d){d.LOCAL_FILE_HEADER="PK",d.CENTRAL_FILE_HEADER="PK",d.CENTRAL_DIRECTORY_END="PK",d.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",d.ZIP64_CENTRAL_DIRECTORY_END="PK",d.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(o,c,d){var u=o("./GenericWorker"),m=o("../utils");function _(y){u.call(this,"ConvertWorker to "+y),this.destType=y}m.inherits(_,u),_.prototype.processChunk=function(y){this.push({data:m.transformTo(this.destType,y.data),meta:y.meta})},c.exports=_},{"../utils":32,"./GenericWorker":28}],25:[function(o,c,d){var u=o("./GenericWorker"),m=o("../crc32");function _(){u.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}o("../utils").inherits(_,u),_.prototype.processChunk=function(y){this.streamInfo.crc32=m(y.data,this.streamInfo.crc32||0),this.push(y)},c.exports=_},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataLengthProbe for "+y),this.propName=y,this.withStreamInfo(y,0)}u.inherits(_,m),_.prototype.processChunk=function(y){if(y){var S=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=S+y.data.length}m.prototype.processChunk.call(this,y)},c.exports=_},{"../utils":32,"./GenericWorker":28}],27:[function(o,c,d){var u=o("../utils"),m=o("./GenericWorker");function _(y){m.call(this,"DataWorker");var S=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,y.then(function(A){S.dataIsReady=!0,S.data=A,S.max=A&&A.length||0,S.type=u.getTypeOf(A),S.isPaused||S._tickAndRepeat()},function(A){S.error(A)})}u.inherits(_,m),_.prototype.cleanUp=function(){m.prototype.cleanUp.call(this),this.data=null},_.prototype.resume=function(){return!!m.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,u.delay(this._tickAndRepeat,[],this)),!0)},_.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(u.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},_.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var y=null,S=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":y=this.data.substring(this.index,S);break;case"uint8array":y=this.data.subarray(this.index,S);break;case"array":case"nodebuffer":y=this.data.slice(this.index,S)}return this.index=S,this.push({data:y,meta:{percent:this.max?this.index/this.max*100:0}})},c.exports=_},{"../utils":32,"./GenericWorker":28}],28:[function(o,c,d){function u(m){this.name=m||"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}u.prototype={push:function(m){this.emit("data",m)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(m){this.emit("error",m)}return!0},error:function(m){return!this.isFinished&&(this.isPaused?this.generatedError=m:(this.isFinished=!0,this.emit("error",m),this.previous&&this.previous.error(m),this.cleanUp()),!0)},on:function(m,_){return this._listeners[m].push(_),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(m,_){if(this._listeners[m])for(var y=0;y<this._listeners[m].length;y++)this._listeners[m][y].call(this,_)},pipe:function(m){return m.registerPrevious(this)},registerPrevious:function(m){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=m.streamInfo,this.mergeStreamInfo(),this.previous=m;var _=this;return m.on("data",function(y){_.processChunk(y)}),m.on("end",function(){_.end()}),m.on("error",function(y){_.error(y)}),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 m=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),m=!0),this.previous&&this.previous.resume(),!m},flush:function(){},processChunk:function(m){this.push(m)},withStreamInfo:function(m,_){return this.extraStreamInfo[m]=_,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var m in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,m)&&(this.streamInfo[m]=this.extraStreamInfo[m])},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 m="Worker "+this.name;return this.previous?this.previous+" -> "+m:m}},c.exports=u},{}],29:[function(o,c,d){var u=o("../utils"),m=o("./ConvertWorker"),_=o("./GenericWorker"),y=o("../base64"),S=o("../support"),A=o("../external"),I=null;if(S.nodestream)try{I=o("../nodejs/NodejsStreamOutputAdapter")}catch{}function k(F,E){return new A.Promise(function(L,T){var M=[],R=F._internalType,b=F._outputType,U=F._mimeType;F.on("data",function(N,j){M.push(N),E&&E(j)}).on("error",function(N){M=[],T(N)}).on("end",function(){try{var N=function(j,J,$){switch(j){case"blob":return u.newBlob(u.transformTo("arraybuffer",J),$);case"base64":return y.encode(J);default:return u.transformTo(j,J)}}(b,function(j,J){var $,ct=0,It=null,et=0;for($=0;$<J.length;$++)et+=J[$].length;switch(j){case"string":return J.join("");case"array":return Array.prototype.concat.apply([],J);case"uint8array":for(It=new Uint8Array(et),$=0;$<J.length;$++)It.set(J[$],ct),ct+=J[$].length;return It;case"nodebuffer":return Buffer.concat(J);default:throw new Error("concat : unsupported type '"+j+"'")}}(R,M),U);L(N)}catch(j){T(j)}M=[]}).resume()})}function D(F,E,L){var T=E;switch(E){case"blob":case"arraybuffer":T="uint8array";break;case"base64":T="string"}try{this._internalType=T,this._outputType=E,this._mimeType=L,u.checkSupport(T),this._worker=F.pipe(new m(T)),F.lock()}catch(M){this._worker=new _("error"),this._worker.error(M)}}D.prototype={accumulate:function(F){return k(this,F)},on:function(F,E){var L=this;return F==="data"?this._worker.on(F,function(T){E.call(L,T.data,T.meta)}):this._worker.on(F,function(){u.delay(E,arguments,L)}),this},resume:function(){return u.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(F){if(u.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new I(this,{objectMode:this._outputType!=="nodebuffer"},F)}},c.exports=D},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(o,c,d){if(d.base64=!0,d.array=!0,d.string=!0,d.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",d.nodebuffer=typeof Buffer<"u",d.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")d.blob=!1;else{var u=new ArrayBuffer(0);try{d.blob=new Blob([u],{type:"application/zip"}).size===0}catch{try{var m=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);m.append(u),d.blob=m.getBlob("application/zip").size===0}catch{d.blob=!1}}}try{d.nodestream=!!o("readable-stream").Readable}catch{d.nodestream=!1}},{"readable-stream":16}],31:[function(o,c,d){for(var u=o("./utils"),m=o("./support"),_=o("./nodejsUtils"),y=o("./stream/GenericWorker"),S=new Array(256),A=0;A<256;A++)S[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;S[254]=S[254]=1;function I(){y.call(this,"utf-8 decode"),this.leftOver=null}function k(){y.call(this,"utf-8 encode")}d.utf8encode=function(D){return m.nodebuffer?_.newBufferFrom(D,"utf-8"):function(F){var E,L,T,M,R,b=F.length,U=0;for(M=0;M<b;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),U+=L<128?1:L<2048?2:L<65536?3:4;for(E=m.uint8array?new Uint8Array(U):new Array(U),M=R=0;R<U;M++)(64512&(L=F.charCodeAt(M)))==55296&&M+1<b&&(64512&(T=F.charCodeAt(M+1)))==56320&&(L=65536+(L-55296<<10)+(T-56320),M++),L<128?E[R++]=L:(L<2048?E[R++]=192|L>>>6:(L<65536?E[R++]=224|L>>>12:(E[R++]=240|L>>>18,E[R++]=128|L>>>12&63),E[R++]=128|L>>>6&63),E[R++]=128|63&L);return E}(D)},d.utf8decode=function(D){return m.nodebuffer?u.transformTo("nodebuffer",D).toString("utf-8"):function(F){var E,L,T,M,R=F.length,b=new Array(2*R);for(E=L=0;E<R;)if((T=F[E++])<128)b[L++]=T;else if(4<(M=S[T]))b[L++]=65533,E+=M-1;else{for(T&=M===2?31:M===3?15:7;1<M&&E<R;)T=T<<6|63&F[E++],M--;1<M?b[L++]=65533:T<65536?b[L++]=T:(T-=65536,b[L++]=55296|T>>10&1023,b[L++]=56320|1023&T)}return b.length!==L&&(b.subarray?b=b.subarray(0,L):b.length=L),u.applyFromCharCode(b)}(D=u.transformTo(m.uint8array?"uint8array":"array",D))},u.inherits(I,y),I.prototype.processChunk=function(D){var F=u.transformTo(m.uint8array?"uint8array":"array",D.data);if(this.leftOver&&this.leftOver.length){if(m.uint8array){var E=F;(F=new Uint8Array(E.length+this.leftOver.length)).set(this.leftOver,0),F.set(E,this.leftOver.length)}else F=this.leftOver.concat(F);this.leftOver=null}var L=function(M,R){var b;for((R=R||M.length)>M.length&&(R=M.length),b=R-1;0<=b&&(192&M[b])==128;)b--;return b<0||b===0?R:b+S[M[b]]>R?b:R}(F),T=F;L!==F.length&&(m.uint8array?(T=F.subarray(0,L),this.leftOver=F.subarray(L,F.length)):(T=F.slice(0,L),this.leftOver=F.slice(L,F.length))),this.push({data:d.utf8decode(T),meta:D.meta})},I.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:d.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},d.Utf8DecodeWorker=I,u.inherits(k,y),k.prototype.processChunk=function(D){this.push({data:d.utf8encode(D.data),meta:D.meta})},d.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(o,c,d){var u=o("./support"),m=o("./base64"),_=o("./nodejsUtils"),y=o("./external");function S(E){return E}function A(E,L){for(var T=0;T<E.length;++T)L[T]=255&E.charCodeAt(T);return L}o("setimmediate"),d.newBlob=function(E,L){d.checkSupport("blob");try{return new Blob([E],{type:L})}catch{try{var T=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return T.append(E),T.getBlob(L)}catch{throw new Error("Bug : can't construct the Blob.")}}};var I={stringifyByChunk:function(E,L,T){var M=[],R=0,b=E.length;if(b<=T)return String.fromCharCode.apply(null,E);for(;R<b;)L==="array"||L==="nodebuffer"?M.push(String.fromCharCode.apply(null,E.slice(R,Math.min(R+T,b)))):M.push(String.fromCharCode.apply(null,E.subarray(R,Math.min(R+T,b)))),R+=T;return M.join("")},stringifyByChar:function(E){for(var L="",T=0;T<E.length;T++)L+=String.fromCharCode(E[T]);return L},applyCanBeUsed:{uint8array:function(){try{return u.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return u.nodebuffer&&String.fromCharCode.apply(null,_.allocBuffer(1)).length===1}catch{return!1}}()}};function k(E){var L=65536,T=d.getTypeOf(E),M=!0;if(T==="uint8array"?M=I.applyCanBeUsed.uint8array:T==="nodebuffer"&&(M=I.applyCanBeUsed.nodebuffer),M)for(;1<L;)try{return I.stringifyByChunk(E,T,L)}catch{L=Math.floor(L/2)}return I.stringifyByChar(E)}function D(E,L){for(var T=0;T<E.length;T++)L[T]=E[T];return L}d.applyFromCharCode=k;var F={};F.string={string:S,array:function(E){return A(E,new Array(E.length))},arraybuffer:function(E){return F.string.uint8array(E).buffer},uint8array:function(E){return A(E,new Uint8Array(E.length))},nodebuffer:function(E){return A(E,_.allocBuffer(E.length))}},F.array={string:k,array:S,arraybuffer:function(E){return new Uint8Array(E).buffer},uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(E)}},F.arraybuffer={string:function(E){return k(new Uint8Array(E))},array:function(E){return D(new Uint8Array(E),new Array(E.byteLength))},arraybuffer:S,uint8array:function(E){return new Uint8Array(E)},nodebuffer:function(E){return _.newBufferFrom(new Uint8Array(E))}},F.uint8array={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return E.buffer},uint8array:S,nodebuffer:function(E){return _.newBufferFrom(E)}},F.nodebuffer={string:k,array:function(E){return D(E,new Array(E.length))},arraybuffer:function(E){return F.nodebuffer.uint8array(E).buffer},uint8array:function(E){return D(E,new Uint8Array(E.length))},nodebuffer:S},d.transformTo=function(E,L){if(L=L||"",!E)return L;d.checkSupport(E);var T=d.getTypeOf(L);return F[T][E](L)},d.resolve=function(E){for(var L=E.split("/"),T=[],M=0;M<L.length;M++){var R=L[M];R==="."||R===""&&M!==0&&M!==L.length-1||(R===".."?T.pop():T.push(R))}return T.join("/")},d.getTypeOf=function(E){return typeof E=="string"?"string":Object.prototype.toString.call(E)==="[object Array]"?"array":u.nodebuffer&&_.isBuffer(E)?"nodebuffer":u.uint8array&&E instanceof Uint8Array?"uint8array":u.arraybuffer&&E instanceof ArrayBuffer?"arraybuffer":void 0},d.checkSupport=function(E){if(!u[E.toLowerCase()])throw new Error(E+" is not supported by this platform")},d.MAX_VALUE_16BITS=65535,d.MAX_VALUE_32BITS=-1,d.pretty=function(E){var L,T,M="";for(T=0;T<(E||"").length;T++)M+="\\x"+((L=E.charCodeAt(T))<16?"0":"")+L.toString(16).toUpperCase();return M},d.delay=function(E,L,T){setImmediate(function(){E.apply(T||null,L||[])})},d.inherits=function(E,L){function T(){}T.prototype=L.prototype,E.prototype=new T},d.extend=function(){var E,L,T={};for(E=0;E<arguments.length;E++)for(L in arguments[E])Object.prototype.hasOwnProperty.call(arguments[E],L)&&T[L]===void 0&&(T[L]=arguments[E][L]);return T},d.prepareContent=function(E,L,T,M,R){return y.Promise.resolve(L).then(function(b){return u.blob&&(b instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(b))!==-1)&&typeof FileReader<"u"?new y.Promise(function(U,N){var j=new FileReader;j.onload=function(J){U(J.target.result)},j.onerror=function(J){N(J.target.error)},j.readAsArrayBuffer(b)}):b}).then(function(b){var U=d.getTypeOf(b);return U?(U==="arraybuffer"?b=d.transformTo("uint8array",b):U==="string"&&(R?b=m.decode(b):T&&M!==!0&&(b=function(N){return A(N,u.uint8array?new Uint8Array(N.length):new Array(N.length))}(b))),b):y.Promise.reject(new Error("Can't read the data of '"+E+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./signature"),y=o("./zipEntry"),S=o("./support");function A(I){this.files=[],this.loadOptions=I}A.prototype={checkSignature:function(I){if(!this.reader.readAndCheckSignature(I)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+m.pretty(k)+", expected "+m.pretty(I)+")")}},isSignature:function(I,k){var D=this.reader.index;this.reader.setIndex(I);var F=this.reader.readString(4)===k;return this.reader.setIndex(D),F},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 I=this.reader.readData(this.zipCommentLength),k=S.uint8array?"uint8array":"array",D=m.transformTo(k,I);this.zipComment=this.loadOptions.decodeFileName(D)},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 I,k,D,F=this.zip64EndOfCentralSize-44;0<F;)I=this.reader.readInt(2),k=this.reader.readInt(4),D=this.reader.readData(k),this.zip64ExtensibleData[I]={id:I,length:k,value:D}},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 I,k;for(I=0;I<this.files.length;I++)k=this.files[I],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(_.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var I;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(_.CENTRAL_FILE_HEADER);)(I=new y({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(I);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var I=this.reader.lastIndexOfSignature(_.CENTRAL_DIRECTORY_END);if(I<0)throw this.isSignature(0,_.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(I);var k=I;if(this.checkSignature(_.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===m.MAX_VALUE_16BITS||this.diskWithCentralDirStart===m.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===m.MAX_VALUE_16BITS||this.centralDirRecords===m.MAX_VALUE_16BITS||this.centralDirSize===m.MAX_VALUE_32BITS||this.centralDirOffset===m.MAX_VALUE_32BITS){if(this.zip64=!0,(I=this.reader.lastIndexOfSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(I),this.checkSignature(_.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,_.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(_.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(_.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var D=this.centralDirOffset+this.centralDirSize;this.zip64&&(D+=20,D+=12+this.zip64EndOfCentralSize);var F=k-D;if(0<F)this.isSignature(k,_.CENTRAL_FILE_HEADER)||(this.reader.zero=F);else if(F<0)throw new Error("Corrupted zip: missing "+Math.abs(F)+" bytes.")},prepareReader:function(I){this.reader=u(I)},load:function(I){this.prepareReader(I),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},c.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(o,c,d){var u=o("./reader/readerFor"),m=o("./utils"),_=o("./compressedObject"),y=o("./crc32"),S=o("./utf8"),A=o("./compressions"),I=o("./support");function k(D,F){this.options=D,this.loadOptions=F}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(D){var F,E;if(D.skip(22),this.fileNameLength=D.readInt(2),E=D.readInt(2),this.fileName=D.readData(this.fileNameLength),D.skip(E),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((F=function(L){for(var T in A)if(Object.prototype.hasOwnProperty.call(A,T)&&A[T].magic===L)return A[T];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+m.pretty(this.compressionMethod)+" unknown (inner file : "+m.transformTo("string",this.fileName)+")");this.decompressed=new _(this.compressedSize,this.uncompressedSize,this.crc32,F,D.readData(this.compressedSize))},readCentralPart:function(D){this.versionMadeBy=D.readInt(2),D.skip(2),this.bitFlag=D.readInt(2),this.compressionMethod=D.readString(2),this.date=D.readDate(),this.crc32=D.readInt(4),this.compressedSize=D.readInt(4),this.uncompressedSize=D.readInt(4);var F=D.readInt(2);if(this.extraFieldsLength=D.readInt(2),this.fileCommentLength=D.readInt(2),this.diskNumberStart=D.readInt(2),this.internalFileAttributes=D.readInt(2),this.externalFileAttributes=D.readInt(4),this.localHeaderOffset=D.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");D.skip(F),this.readExtraFields(D),this.parseZIP64ExtraField(D),this.fileComment=D.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var D=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),D==0&&(this.dosPermissions=63&this.externalFileAttributes),D==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var D=u(this.extraFields[1].value);this.uncompressedSize===m.MAX_VALUE_32BITS&&(this.uncompressedSize=D.readInt(8)),this.compressedSize===m.MAX_VALUE_32BITS&&(this.compressedSize=D.readInt(8)),this.localHeaderOffset===m.MAX_VALUE_32BITS&&(this.localHeaderOffset=D.readInt(8)),this.diskNumberStart===m.MAX_VALUE_32BITS&&(this.diskNumberStart=D.readInt(4))}},readExtraFields:function(D){var F,E,L,T=D.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});D.index+4<T;)F=D.readInt(2),E=D.readInt(2),L=D.readData(E),this.extraFields[F]={id:F,length:E,value:L};D.setIndex(T)},handleUTF8:function(){var D=I.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=S.utf8decode(this.fileName),this.fileCommentStr=S.utf8decode(this.fileComment);else{var F=this.findExtraFieldUnicodePath();if(F!==null)this.fileNameStr=F;else{var E=m.transformTo(D,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(E)}var L=this.findExtraFieldUnicodeComment();if(L!==null)this.fileCommentStr=L;else{var T=m.transformTo(D,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(T)}}},findExtraFieldUnicodePath:function(){var D=this.extraFields[28789];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileName)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null},findExtraFieldUnicodeComment:function(){var D=this.extraFields[25461];if(D){var F=u(D.value);return F.readInt(1)!==1||y(this.fileComment)!==F.readInt(4)?null:S.utf8decode(F.readData(D.length-5))}return null}},c.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(o,c,d){function u(F,E,L){this.name=F,this.dir=L.dir,this.date=L.date,this.comment=L.comment,this.unixPermissions=L.unixPermissions,this.dosPermissions=L.dosPermissions,this._data=E,this._dataBinary=L.binary,this.options={compression:L.compression,compressionOptions:L.compressionOptions}}var m=o("./stream/StreamHelper"),_=o("./stream/DataWorker"),y=o("./utf8"),S=o("./compressedObject"),A=o("./stream/GenericWorker");u.prototype={internalStream:function(F){var E=null,L="string";try{if(!F)throw new Error("No output type specified.");var T=(L=F.toLowerCase())==="string"||L==="text";L!=="binarystring"&&L!=="text"||(L="string"),E=this._decompressWorker();var M=!this._dataBinary;M&&!T&&(E=E.pipe(new y.Utf8EncodeWorker)),!M&&T&&(E=E.pipe(new y.Utf8DecodeWorker))}catch(R){(E=new A("error")).error(R)}return new m(E,L,"")},async:function(F,E){return this.internalStream(F).accumulate(E)},nodeStream:function(F,E){return this.internalStream(F||"nodebuffer").toNodejsStream(E)},_compressWorker:function(F,E){if(this._data instanceof S&&this._data.compression.magic===F.magic)return this._data.getCompressedWorker();var L=this._decompressWorker();return this._dataBinary||(L=L.pipe(new y.Utf8EncodeWorker)),S.createWorkerFrom(L,F,E)},_decompressWorker:function(){return this._data instanceof S?this._data.getContentWorker():this._data instanceof A?this._data:new _(this._data)}};for(var I=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},D=0;D<I.length;D++)u.prototype[I[D]]=k;c.exports=u},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(o,c,d){(function(u){var m,_,y=u.MutationObserver||u.WebKitMutationObserver;if(y){var S=0,A=new y(F),I=u.document.createTextNode("");A.observe(I,{characterData:!0}),m=function(){I.data=S=++S%2}}else if(u.setImmediate||u.MessageChannel===void 0)m="document"in u&&"onreadystatechange"in u.document.createElement("script")?function(){var E=u.document.createElement("script");E.onreadystatechange=function(){F(),E.onreadystatechange=null,E.parentNode.removeChild(E),E=null},u.document.documentElement.appendChild(E)}:function(){setTimeout(F,0)};else{var k=new u.MessageChannel;k.port1.onmessage=F,m=function(){k.port2.postMessage(0)}}var D=[];function F(){var E,L;_=!0;for(var T=D.length;T;){for(L=D,D=[],E=-1;++E<T;)L[E]();T=D.length}_=!1}c.exports=function(E){D.push(E)!==1||_||m()}}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(o,c,d){var u=o("immediate");function m(){}var _={},y=["REJECTED"],S=["FULFILLED"],A=["PENDING"];function I(T){if(typeof T!="function")throw new TypeError("resolver must be a function");this.state=A,this.queue=[],this.outcome=void 0,T!==m&&E(this,T)}function k(T,M,R){this.promise=T,typeof M=="function"&&(this.onFulfilled=M,this.callFulfilled=this.otherCallFulfilled),typeof R=="function"&&(this.onRejected=R,this.callRejected=this.otherCallRejected)}function D(T,M,R){u(function(){var b;try{b=M(R)}catch(U){return _.reject(T,U)}b===T?_.reject(T,new TypeError("Cannot resolve promise with itself")):_.resolve(T,b)})}function F(T){var M=T&&T.then;if(T&&(typeof T=="object"||typeof T=="function")&&typeof M=="function")return function(){M.apply(T,arguments)}}function E(T,M){var R=!1;function b(j){R||(R=!0,_.reject(T,j))}function U(j){R||(R=!0,_.resolve(T,j))}var N=L(function(){M(U,b)});N.status==="error"&&b(N.value)}function L(T,M){var R={};try{R.value=T(M),R.status="success"}catch(b){R.status="error",R.value=b}return R}(c.exports=I).prototype.finally=function(T){if(typeof T!="function")return this;var M=this.constructor;return this.then(function(R){return M.resolve(T()).then(function(){return R})},function(R){return M.resolve(T()).then(function(){throw R})})},I.prototype.catch=function(T){return this.then(null,T)},I.prototype.then=function(T,M){if(typeof T!="function"&&this.state===S||typeof M!="function"&&this.state===y)return this;var R=new this.constructor(m);return this.state!==A?D(R,this.state===S?T:M,this.outcome):this.queue.push(new k(R,T,M)),R},k.prototype.callFulfilled=function(T){_.resolve(this.promise,T)},k.prototype.otherCallFulfilled=function(T){D(this.promise,this.onFulfilled,T)},k.prototype.callRejected=function(T){_.reject(this.promise,T)},k.prototype.otherCallRejected=function(T){D(this.promise,this.onRejected,T)},_.resolve=function(T,M){var R=L(F,M);if(R.status==="error")return _.reject(T,R.value);var b=R.value;if(b)E(T,b);else{T.state=S,T.outcome=M;for(var U=-1,N=T.queue.length;++U<N;)T.queue[U].callFulfilled(M)}return T},_.reject=function(T,M){T.state=y,T.outcome=M;for(var R=-1,b=T.queue.length;++R<b;)T.queue[R].callRejected(M);return T},I.resolve=function(T){return T instanceof this?T:_.resolve(new this(m),T)},I.reject=function(T){var M=new this(m);return _.reject(M,T)},I.all=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=new Array(R),N=0,j=-1,J=new this(m);++j<R;)$(T[j],j);return J;function $(ct,It){M.resolve(ct).then(function(et){U[It]=et,++N!==R||b||(b=!0,_.resolve(J,U))},function(et){b||(b=!0,_.reject(J,et))})}},I.race=function(T){var M=this;if(Object.prototype.toString.call(T)!=="[object Array]")return this.reject(new TypeError("must be an array"));var R=T.length,b=!1;if(!R)return this.resolve([]);for(var U=-1,N=new this(m);++U<R;)j=T[U],M.resolve(j).then(function(J){b||(b=!0,_.resolve(N,J))},function(J){b||(b=!0,_.reject(N,J))});var j;return N}},{immediate:36}],38:[function(o,c,d){var u={};(0,o("./lib/utils/common").assign)(u,o("./lib/deflate"),o("./lib/inflate"),o("./lib/zlib/constants")),c.exports=u},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(o,c,d){var u=o("./zlib/deflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/messages"),S=o("./zlib/zstream"),A=Object.prototype.toString,I=0,k=-1,D=0,F=8;function E(T){if(!(this instanceof E))return new E(T);this.options=m.assign({level:k,method:F,chunkSize:16384,windowBits:15,memLevel:8,strategy:D,to:""},T||{});var M=this.options;M.raw&&0<M.windowBits?M.windowBits=-M.windowBits:M.gzip&&0<M.windowBits&&M.windowBits<16&&(M.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;var R=u.deflateInit2(this.strm,M.level,M.method,M.windowBits,M.memLevel,M.strategy);if(R!==I)throw new Error(y[R]);if(M.header&&u.deflateSetHeader(this.strm,M.header),M.dictionary){var b;if(b=typeof M.dictionary=="string"?_.string2buf(M.dictionary):A.call(M.dictionary)==="[object ArrayBuffer]"?new Uint8Array(M.dictionary):M.dictionary,(R=u.deflateSetDictionary(this.strm,b))!==I)throw new Error(y[R]);this._dict_set=!0}}function L(T,M){var R=new E(M);if(R.push(T,!0),R.err)throw R.msg||y[R.err];return R.result}E.prototype.push=function(T,M){var R,b,U=this.strm,N=this.options.chunkSize;if(this.ended)return!1;b=M===~~M?M:M===!0?4:0,typeof T=="string"?U.input=_.string2buf(T):A.call(T)==="[object ArrayBuffer]"?U.input=new Uint8Array(T):U.input=T,U.next_in=0,U.avail_in=U.input.length;do{if(U.avail_out===0&&(U.output=new m.Buf8(N),U.next_out=0,U.avail_out=N),(R=u.deflate(U,b))!==1&&R!==I)return this.onEnd(R),!(this.ended=!0);U.avail_out!==0&&(U.avail_in!==0||b!==4&&b!==2)||(this.options.to==="string"?this.onData(_.buf2binstring(m.shrinkBuf(U.output,U.next_out))):this.onData(m.shrinkBuf(U.output,U.next_out)))}while((0<U.avail_in||U.avail_out===0)&&R!==1);return b===4?(R=u.deflateEnd(this.strm),this.onEnd(R),this.ended=!0,R===I):b!==2||(this.onEnd(I),!(U.avail_out=0))},E.prototype.onData=function(T){this.chunks.push(T)},E.prototype.onEnd=function(T){T===I&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=T,this.msg=this.strm.msg},d.Deflate=E,d.deflate=L,d.deflateRaw=function(T,M){return(M=M||{}).raw=!0,L(T,M)},d.gzip=function(T,M){return(M=M||{}).gzip=!0,L(T,M)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(o,c,d){var u=o("./zlib/inflate"),m=o("./utils/common"),_=o("./utils/strings"),y=o("./zlib/constants"),S=o("./zlib/messages"),A=o("./zlib/zstream"),I=o("./zlib/gzheader"),k=Object.prototype.toString;function D(E){if(!(this instanceof D))return new D(E);this.options=m.assign({chunkSize:16384,windowBits:0,to:""},E||{});var L=this.options;L.raw&&0<=L.windowBits&&L.windowBits<16&&(L.windowBits=-L.windowBits,L.windowBits===0&&(L.windowBits=-15)),!(0<=L.windowBits&&L.windowBits<16)||E&&E.windowBits||(L.windowBits+=32),15<L.windowBits&&L.windowBits<48&&!(15&L.windowBits)&&(L.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new A,this.strm.avail_out=0;var T=u.inflateInit2(this.strm,L.windowBits);if(T!==y.Z_OK)throw new Error(S[T]);this.header=new I,u.inflateGetHeader(this.strm,this.header)}function F(E,L){var T=new D(L);if(T.push(E,!0),T.err)throw T.msg||S[T.err];return T.result}D.prototype.push=function(E,L){var T,M,R,b,U,N,j=this.strm,J=this.options.chunkSize,$=this.options.dictionary,ct=!1;if(this.ended)return!1;M=L===~~L?L:L===!0?y.Z_FINISH:y.Z_NO_FLUSH,typeof E=="string"?j.input=_.binstring2buf(E):k.call(E)==="[object ArrayBuffer]"?j.input=new Uint8Array(E):j.input=E,j.next_in=0,j.avail_in=j.input.length;do{if(j.avail_out===0&&(j.output=new m.Buf8(J),j.next_out=0,j.avail_out=J),(T=u.inflate(j,y.Z_NO_FLUSH))===y.Z_NEED_DICT&&$&&(N=typeof $=="string"?_.string2buf($):k.call($)==="[object ArrayBuffer]"?new Uint8Array($):$,T=u.inflateSetDictionary(this.strm,N)),T===y.Z_BUF_ERROR&&ct===!0&&(T=y.Z_OK,ct=!1),T!==y.Z_STREAM_END&&T!==y.Z_OK)return this.onEnd(T),!(this.ended=!0);j.next_out&&(j.avail_out!==0&&T!==y.Z_STREAM_END&&(j.avail_in!==0||M!==y.Z_FINISH&&M!==y.Z_SYNC_FLUSH)||(this.options.to==="string"?(R=_.utf8border(j.output,j.next_out),b=j.next_out-R,U=_.buf2string(j.output,R),j.next_out=b,j.avail_out=J-b,b&&m.arraySet(j.output,j.output,R,b,0),this.onData(U)):this.onData(m.shrinkBuf(j.output,j.next_out)))),j.avail_in===0&&j.avail_out===0&&(ct=!0)}while((0<j.avail_in||j.avail_out===0)&&T!==y.Z_STREAM_END);return T===y.Z_STREAM_END&&(M=y.Z_FINISH),M===y.Z_FINISH?(T=u.inflateEnd(this.strm),this.onEnd(T),this.ended=!0,T===y.Z_OK):M!==y.Z_SYNC_FLUSH||(this.onEnd(y.Z_OK),!(j.avail_out=0))},D.prototype.onData=function(E){this.chunks.push(E)},D.prototype.onEnd=function(E){E===y.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=m.flattenChunks(this.chunks)),this.chunks=[],this.err=E,this.msg=this.strm.msg},d.Inflate=D,d.inflate=F,d.inflateRaw=function(E,L){return(L=L||{}).raw=!0,F(E,L)},d.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(o,c,d){var u=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";d.assign=function(y){for(var S=Array.prototype.slice.call(arguments,1);S.length;){var A=S.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(var I in A)A.hasOwnProperty(I)&&(y[I]=A[I])}}return y},d.shrinkBuf=function(y,S){return y.length===S?y:y.subarray?y.subarray(0,S):(y.length=S,y)};var m={arraySet:function(y,S,A,I,k){if(S.subarray&&y.subarray)y.set(S.subarray(A,A+I),k);else for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){var S,A,I,k,D,F;for(S=I=0,A=y.length;S<A;S++)I+=y[S].length;for(F=new Uint8Array(I),S=k=0,A=y.length;S<A;S++)D=y[S],F.set(D,k),k+=D.length;return F}},_={arraySet:function(y,S,A,I,k){for(var D=0;D<I;D++)y[k+D]=S[A+D]},flattenChunks:function(y){return[].concat.apply([],y)}};d.setTyped=function(y){y?(d.Buf8=Uint8Array,d.Buf16=Uint16Array,d.Buf32=Int32Array,d.assign(d,m)):(d.Buf8=Array,d.Buf16=Array,d.Buf32=Array,d.assign(d,_))},d.setTyped(u)},{}],42:[function(o,c,d){var u=o("./common"),m=!0,_=!0;try{String.fromCharCode.apply(null,[0])}catch{m=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{_=!1}for(var y=new u.Buf8(256),S=0;S<256;S++)y[S]=252<=S?6:248<=S?5:240<=S?4:224<=S?3:192<=S?2:1;function A(I,k){if(k<65537&&(I.subarray&&_||!I.subarray&&m))return String.fromCharCode.apply(null,u.shrinkBuf(I,k));for(var D="",F=0;F<k;F++)D+=String.fromCharCode(I[F]);return D}y[254]=y[254]=1,d.string2buf=function(I){var k,D,F,E,L,T=I.length,M=0;for(E=0;E<T;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),M+=D<128?1:D<2048?2:D<65536?3:4;for(k=new u.Buf8(M),E=L=0;L<M;E++)(64512&(D=I.charCodeAt(E)))==55296&&E+1<T&&(64512&(F=I.charCodeAt(E+1)))==56320&&(D=65536+(D-55296<<10)+(F-56320),E++),D<128?k[L++]=D:(D<2048?k[L++]=192|D>>>6:(D<65536?k[L++]=224|D>>>12:(k[L++]=240|D>>>18,k[L++]=128|D>>>12&63),k[L++]=128|D>>>6&63),k[L++]=128|63&D);return k},d.buf2binstring=function(I){return A(I,I.length)},d.binstring2buf=function(I){for(var k=new u.Buf8(I.length),D=0,F=k.length;D<F;D++)k[D]=I.charCodeAt(D);return k},d.buf2string=function(I,k){var D,F,E,L,T=k||I.length,M=new Array(2*T);for(D=F=0;D<T;)if((E=I[D++])<128)M[F++]=E;else if(4<(L=y[E]))M[F++]=65533,D+=L-1;else{for(E&=L===2?31:L===3?15:7;1<L&&D<T;)E=E<<6|63&I[D++],L--;1<L?M[F++]=65533:E<65536?M[F++]=E:(E-=65536,M[F++]=55296|E>>10&1023,M[F++]=56320|1023&E)}return A(M,F)},d.utf8border=function(I,k){var D;for((k=k||I.length)>I.length&&(k=I.length),D=k-1;0<=D&&(192&I[D])==128;)D--;return D<0||D===0?k:D+y[I[D]]>k?D:k}},{"./common":41}],43:[function(o,c,d){c.exports=function(u,m,_,y){for(var S=65535&u|0,A=u>>>16&65535|0,I=0;_!==0;){for(_-=I=2e3<_?2e3:_;A=A+(S=S+m[y++]|0)|0,--I;);S%=65521,A%=65521}return S|A<<16|0}},{}],44:[function(o,c,d){c.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(o,c,d){var u=function(){for(var m,_=[],y=0;y<256;y++){m=y;for(var S=0;S<8;S++)m=1&m?3988292384^m>>>1:m>>>1;_[y]=m}return _}();c.exports=function(m,_,y,S){var A=u,I=S+y;m^=-1;for(var k=S;k<I;k++)m=m>>>8^A[255&(m^_[k])];return-1^m}},{}],46:[function(o,c,d){var u,m=o("../utils/common"),_=o("./trees"),y=o("./adler32"),S=o("./crc32"),A=o("./messages"),I=0,k=4,D=0,F=-2,E=-1,L=4,T=2,M=8,R=9,b=286,U=30,N=19,j=2*b+1,J=15,$=3,ct=258,It=ct+$+1,et=42,yt=113,G=1,Pt=2,Et=3,Ct=4;function fe(W,Jt){return W.msg=A[Jt],Jt}function re(W){return(W<<1)-(4<W?9:0)}function Ft(W){for(var Jt=W.length;0<=--Jt;)W[Jt]=0}function Ot(W){var Jt=W.state,Wt=Jt.pending;Wt>W.avail_out&&(Wt=W.avail_out),Wt!==0&&(m.arraySet(W.output,Jt.pending_buf,Jt.pending_out,Wt,W.next_out),W.next_out+=Wt,Jt.pending_out+=Wt,W.total_out+=Wt,W.avail_out-=Wt,Jt.pending-=Wt,Jt.pending===0&&(Jt.pending_out=0))}function Bt(W,Jt){_._tr_flush_block(W,0<=W.block_start?W.block_start:-1,W.strstart-W.block_start,Jt),W.block_start=W.strstart,Ot(W.strm)}function ke(W,Jt){W.pending_buf[W.pending++]=Jt}function ce(W,Jt){W.pending_buf[W.pending++]=Jt>>>8&255,W.pending_buf[W.pending++]=255&Jt}function Yt(W,Jt){var Wt,pt,dt=W.max_chain_length,Dt=W.strstart,ie=W.prev_length,Kt=W.nice_match,z=W.strstart>W.w_size-It?W.strstart-(W.w_size-It):0,Q=W.window,ot=W.w_mask,nt=W.prev,vt=W.strstart+ct,Gt=Q[Dt+ie-1],Xt=Q[Dt+ie];W.prev_length>=W.good_match&&(dt>>=2),Kt>W.lookahead&&(Kt=W.lookahead);do if(Q[(Wt=Jt)+ie]===Xt&&Q[Wt+ie-1]===Gt&&Q[Wt]===Q[Dt]&&Q[++Wt]===Q[Dt+1]){Dt+=2,Wt++;do;while(Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Q[++Dt]===Q[++Wt]&&Dt<vt);if(pt=ct-(vt-Dt),Dt=vt-ct,ie<pt){if(W.match_start=Jt,Kt<=(ie=pt))break;Gt=Q[Dt+ie-1],Xt=Q[Dt+ie]}}while((Jt=nt[Jt&ot])>z&&--dt!=0);return ie<=W.lookahead?ie:W.lookahead}function $e(W){var Jt,Wt,pt,dt,Dt,ie,Kt,z,Q,ot,nt=W.w_size;do{if(dt=W.window_size-W.lookahead-W.strstart,W.strstart>=nt+(nt-It)){for(m.arraySet(W.window,W.window,nt,nt,0),W.match_start-=nt,W.strstart-=nt,W.block_start-=nt,Jt=Wt=W.hash_size;pt=W.head[--Jt],W.head[Jt]=nt<=pt?pt-nt:0,--Wt;);for(Jt=Wt=nt;pt=W.prev[--Jt],W.prev[Jt]=nt<=pt?pt-nt:0,--Wt;);dt+=nt}if(W.strm.avail_in===0)break;if(ie=W.strm,Kt=W.window,z=W.strstart+W.lookahead,Q=dt,ot=void 0,ot=ie.avail_in,Q<ot&&(ot=Q),Wt=ot===0?0:(ie.avail_in-=ot,m.arraySet(Kt,ie.input,ie.next_in,ot,z),ie.state.wrap===1?ie.adler=y(ie.adler,Kt,ot,z):ie.state.wrap===2&&(ie.adler=S(ie.adler,Kt,ot,z)),ie.next_in+=ot,ie.total_in+=ot,ot),W.lookahead+=Wt,W.lookahead+W.insert>=$)for(Dt=W.strstart-W.insert,W.ins_h=W.window[Dt],W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+1])&W.hash_mask;W.insert&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[Dt+$-1])&W.hash_mask,W.prev[Dt&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=Dt,Dt++,W.insert--,!(W.lookahead+W.insert<$)););}while(W.lookahead<It&&W.strm.avail_in!==0)}function Oi(W,Jt){for(var Wt,pt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),Wt!==0&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt)),W.match_length>=$)if(pt=_._tr_tally(W,W.strstart-W.match_start,W.match_length-$),W.lookahead-=W.match_length,W.match_length<=W.max_lazy_match&&W.lookahead>=$){for(W.match_length--;W.strstart++,W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart,--W.match_length!=0;);W.strstart++}else W.strstart+=W.match_length,W.match_length=0,W.ins_h=W.window[W.strstart],W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+1])&W.hash_mask;else pt=_._tr_tally(W,0,W.window[W.strstart]),W.lookahead--,W.strstart++;if(pt&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Oe(W,Jt){for(var Wt,pt,dt;;){if(W.lookahead<It){if($e(W),W.lookahead<It&&Jt===I)return G;if(W.lookahead===0)break}if(Wt=0,W.lookahead>=$&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),W.prev_length=W.match_length,W.prev_match=W.match_start,W.match_length=$-1,Wt!==0&&W.prev_length<W.max_lazy_match&&W.strstart-Wt<=W.w_size-It&&(W.match_length=Yt(W,Wt),W.match_length<=5&&(W.strategy===1||W.match_length===$&&4096<W.strstart-W.match_start)&&(W.match_length=$-1)),W.prev_length>=$&&W.match_length<=W.prev_length){for(dt=W.strstart+W.lookahead-$,pt=_._tr_tally(W,W.strstart-1-W.prev_match,W.prev_length-$),W.lookahead-=W.prev_length-1,W.prev_length-=2;++W.strstart<=dt&&(W.ins_h=(W.ins_h<<W.hash_shift^W.window[W.strstart+$-1])&W.hash_mask,Wt=W.prev[W.strstart&W.w_mask]=W.head[W.ins_h],W.head[W.ins_h]=W.strstart),--W.prev_length!=0;);if(W.match_available=0,W.match_length=$-1,W.strstart++,pt&&(Bt(W,!1),W.strm.avail_out===0))return G}else if(W.match_available){if((pt=_._tr_tally(W,0,W.window[W.strstart-1]))&&Bt(W,!1),W.strstart++,W.lookahead--,W.strm.avail_out===0)return G}else W.match_available=1,W.strstart++,W.lookahead--}return W.match_available&&(pt=_._tr_tally(W,0,W.window[W.strstart-1]),W.match_available=0),W.insert=W.strstart<$-1?W.strstart:$-1,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):W.last_lit&&(Bt(W,!1),W.strm.avail_out===0)?G:Pt}function Ge(W,Jt,Wt,pt,dt){this.good_length=W,this.max_lazy=Jt,this.nice_length=Wt,this.max_chain=pt,this.func=dt}function di(){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=M,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 m.Buf16(2*j),this.dyn_dtree=new m.Buf16(2*(2*U+1)),this.bl_tree=new m.Buf16(2*(2*N+1)),Ft(this.dyn_ltree),Ft(this.dyn_dtree),Ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new m.Buf16(J+1),this.heap=new m.Buf16(2*b+1),Ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new m.Buf16(2*b+1),Ft(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 Ii(W){var Jt;return W&&W.state?(W.total_in=W.total_out=0,W.data_type=T,(Jt=W.state).pending=0,Jt.pending_out=0,Jt.wrap<0&&(Jt.wrap=-Jt.wrap),Jt.status=Jt.wrap?et:yt,W.adler=Jt.wrap===2?0:1,Jt.last_flush=I,_._tr_init(Jt),D):fe(W,F)}function mn(W){var Jt=Ii(W);return Jt===D&&function(Wt){Wt.window_size=2*Wt.w_size,Ft(Wt.head),Wt.max_lazy_match=u[Wt.level].max_lazy,Wt.good_match=u[Wt.level].good_length,Wt.nice_match=u[Wt.level].nice_length,Wt.max_chain_length=u[Wt.level].max_chain,Wt.strstart=0,Wt.block_start=0,Wt.lookahead=0,Wt.insert=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,Wt.ins_h=0}(W.state),Jt}function Qi(W,Jt,Wt,pt,dt,Dt){if(!W)return F;var ie=1;if(Jt===E&&(Jt=6),pt<0?(ie=0,pt=-pt):15<pt&&(ie=2,pt-=16),dt<1||R<dt||Wt!==M||pt<8||15<pt||Jt<0||9<Jt||Dt<0||L<Dt)return fe(W,F);pt===8&&(pt=9);var Kt=new di;return(W.state=Kt).strm=W,Kt.wrap=ie,Kt.gzhead=null,Kt.w_bits=pt,Kt.w_size=1<<Kt.w_bits,Kt.w_mask=Kt.w_size-1,Kt.hash_bits=dt+7,Kt.hash_size=1<<Kt.hash_bits,Kt.hash_mask=Kt.hash_size-1,Kt.hash_shift=~~((Kt.hash_bits+$-1)/$),Kt.window=new m.Buf8(2*Kt.w_size),Kt.head=new m.Buf16(Kt.hash_size),Kt.prev=new m.Buf16(Kt.w_size),Kt.lit_bufsize=1<<dt+6,Kt.pending_buf_size=4*Kt.lit_bufsize,Kt.pending_buf=new m.Buf8(Kt.pending_buf_size),Kt.d_buf=1*Kt.lit_bufsize,Kt.l_buf=3*Kt.lit_bufsize,Kt.level=Jt,Kt.strategy=Dt,Kt.method=Wt,mn(W)}u=[new Ge(0,0,0,0,function(W,Jt){var Wt=65535;for(Wt>W.pending_buf_size-5&&(Wt=W.pending_buf_size-5);;){if(W.lookahead<=1){if($e(W),W.lookahead===0&&Jt===I)return G;if(W.lookahead===0)break}W.strstart+=W.lookahead,W.lookahead=0;var pt=W.block_start+Wt;if((W.strstart===0||W.strstart>=pt)&&(W.lookahead=W.strstart-pt,W.strstart=pt,Bt(W,!1),W.strm.avail_out===0)||W.strstart-W.block_start>=W.w_size-It&&(Bt(W,!1),W.strm.avail_out===0))return G}return W.insert=0,Jt===k?(Bt(W,!0),W.strm.avail_out===0?Et:Ct):(W.strstart>W.block_start&&(Bt(W,!1),W.strm.avail_out),G)}),new Ge(4,4,8,4,Oi),new Ge(4,5,16,8,Oi),new Ge(4,6,32,32,Oi),new Ge(4,4,16,16,Oe),new Ge(8,16,32,32,Oe),new Ge(8,16,128,128,Oe),new Ge(8,32,128,256,Oe),new Ge(32,128,258,1024,Oe),new Ge(32,258,258,4096,Oe)],d.deflateInit=function(W,Jt){return Qi(W,Jt,M,15,8,0)},d.deflateInit2=Qi,d.deflateReset=mn,d.deflateResetKeep=Ii,d.deflateSetHeader=function(W,Jt){return W&&W.state?W.state.wrap!==2?F:(W.state.gzhead=Jt,D):F},d.deflate=function(W,Jt){var Wt,pt,dt,Dt;if(!W||!W.state||5<Jt||Jt<0)return W?fe(W,F):F;if(pt=W.state,!W.output||!W.input&&W.avail_in!==0||pt.status===666&&Jt!==k)return fe(W,W.avail_out===0?-5:F);if(pt.strm=W,Wt=pt.last_flush,pt.last_flush=Jt,pt.status===et)if(pt.wrap===2)W.adler=0,ke(pt,31),ke(pt,139),ke(pt,8),pt.gzhead?(ke(pt,(pt.gzhead.text?1:0)+(pt.gzhead.hcrc?2:0)+(pt.gzhead.extra?4:0)+(pt.gzhead.name?8:0)+(pt.gzhead.comment?16:0)),ke(pt,255&pt.gzhead.time),ke(pt,pt.gzhead.time>>8&255),ke(pt,pt.gzhead.time>>16&255),ke(pt,pt.gzhead.time>>24&255),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,255&pt.gzhead.os),pt.gzhead.extra&&pt.gzhead.extra.length&&(ke(pt,255&pt.gzhead.extra.length),ke(pt,pt.gzhead.extra.length>>8&255)),pt.gzhead.hcrc&&(W.adler=S(W.adler,pt.pending_buf,pt.pending,0)),pt.gzindex=0,pt.status=69):(ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,0),ke(pt,pt.level===9?2:2<=pt.strategy||pt.level<2?4:0),ke(pt,3),pt.status=yt);else{var ie=M+(pt.w_bits-8<<4)<<8;ie|=(2<=pt.strategy||pt.level<2?0:pt.level<6?1:pt.level===6?2:3)<<6,pt.strstart!==0&&(ie|=32),ie+=31-ie%31,pt.status=yt,ce(pt,ie),pt.strstart!==0&&(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),W.adler=1}if(pt.status===69)if(pt.gzhead.extra){for(dt=pt.pending;pt.gzindex<(65535&pt.gzhead.extra.length)&&(pt.pending!==pt.pending_buf_size||(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending!==pt.pending_buf_size));)ke(pt,255&pt.gzhead.extra[pt.gzindex]),pt.gzindex++;pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),pt.gzindex===pt.gzhead.extra.length&&(pt.gzindex=0,pt.status=73)}else pt.status=73;if(pt.status===73)if(pt.gzhead.name){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.name.length?255&pt.gzhead.name.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.gzindex=0,pt.status=91)}else pt.status=91;if(pt.status===91)if(pt.gzhead.comment){dt=pt.pending;do{if(pt.pending===pt.pending_buf_size&&(pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Ot(W),dt=pt.pending,pt.pending===pt.pending_buf_size)){Dt=1;break}Dt=pt.gzindex<pt.gzhead.comment.length?255&pt.gzhead.comment.charCodeAt(pt.gzindex++):0,ke(pt,Dt)}while(Dt!==0);pt.gzhead.hcrc&&pt.pending>dt&&(W.adler=S(W.adler,pt.pending_buf,pt.pending-dt,dt)),Dt===0&&(pt.status=103)}else pt.status=103;if(pt.status===103&&(pt.gzhead.hcrc?(pt.pending+2>pt.pending_buf_size&&Ot(W),pt.pending+2<=pt.pending_buf_size&&(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),W.adler=0,pt.status=yt)):pt.status=yt),pt.pending!==0){if(Ot(W),W.avail_out===0)return pt.last_flush=-1,D}else if(W.avail_in===0&&re(Jt)<=re(Wt)&&Jt!==k)return fe(W,-5);if(pt.status===666&&W.avail_in!==0)return fe(W,-5);if(W.avail_in!==0||pt.lookahead!==0||Jt!==I&&pt.status!==666){var Kt=pt.strategy===2?function(z,Q){for(var ot;;){if(z.lookahead===0&&($e(z),z.lookahead===0)){if(Q===I)return G;break}if(z.match_length=0,ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++,ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):pt.strategy===3?function(z,Q){for(var ot,nt,vt,Gt,Xt=z.window;;){if(z.lookahead<=ct){if($e(z),z.lookahead<=ct&&Q===I)return G;if(z.lookahead===0)break}if(z.match_length=0,z.lookahead>=$&&0<z.strstart&&(nt=Xt[vt=z.strstart-1])===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]){Gt=z.strstart+ct;do;while(nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&nt===Xt[++vt]&&vt<Gt);z.match_length=ct-(Gt-vt),z.match_length>z.lookahead&&(z.match_length=z.lookahead)}if(z.match_length>=$?(ot=_._tr_tally(z,1,z.match_length-$),z.lookahead-=z.match_length,z.strstart+=z.match_length,z.match_length=0):(ot=_._tr_tally(z,0,z.window[z.strstart]),z.lookahead--,z.strstart++),ot&&(Bt(z,!1),z.strm.avail_out===0))return G}return z.insert=0,Q===k?(Bt(z,!0),z.strm.avail_out===0?Et:Ct):z.last_lit&&(Bt(z,!1),z.strm.avail_out===0)?G:Pt}(pt,Jt):u[pt.level].func(pt,Jt);if(Kt!==Et&&Kt!==Ct||(pt.status=666),Kt===G||Kt===Et)return W.avail_out===0&&(pt.last_flush=-1),D;if(Kt===Pt&&(Jt===1?_._tr_align(pt):Jt!==5&&(_._tr_stored_block(pt,0,0,!1),Jt===3&&(Ft(pt.head),pt.lookahead===0&&(pt.strstart=0,pt.block_start=0,pt.insert=0))),Ot(W),W.avail_out===0))return pt.last_flush=-1,D}return Jt!==k?D:pt.wrap<=0?1:(pt.wrap===2?(ke(pt,255&W.adler),ke(pt,W.adler>>8&255),ke(pt,W.adler>>16&255),ke(pt,W.adler>>24&255),ke(pt,255&W.total_in),ke(pt,W.total_in>>8&255),ke(pt,W.total_in>>16&255),ke(pt,W.total_in>>24&255)):(ce(pt,W.adler>>>16),ce(pt,65535&W.adler)),Ot(W),0<pt.wrap&&(pt.wrap=-pt.wrap),pt.pending!==0?D:1)},d.deflateEnd=function(W){var Jt;return W&&W.state?(Jt=W.state.status)!==et&&Jt!==69&&Jt!==73&&Jt!==91&&Jt!==103&&Jt!==yt&&Jt!==666?fe(W,F):(W.state=null,Jt===yt?fe(W,-3):D):F},d.deflateSetDictionary=function(W,Jt){var Wt,pt,dt,Dt,ie,Kt,z,Q,ot=Jt.length;if(!W||!W.state||(Dt=(Wt=W.state).wrap)===2||Dt===1&&Wt.status!==et||Wt.lookahead)return F;for(Dt===1&&(W.adler=y(W.adler,Jt,ot,0)),Wt.wrap=0,ot>=Wt.w_size&&(Dt===0&&(Ft(Wt.head),Wt.strstart=0,Wt.block_start=0,Wt.insert=0),Q=new m.Buf8(Wt.w_size),m.arraySet(Q,Jt,ot-Wt.w_size,Wt.w_size,0),Jt=Q,ot=Wt.w_size),ie=W.avail_in,Kt=W.next_in,z=W.input,W.avail_in=ot,W.next_in=0,W.input=Jt,$e(Wt);Wt.lookahead>=$;){for(pt=Wt.strstart,dt=Wt.lookahead-($-1);Wt.ins_h=(Wt.ins_h<<Wt.hash_shift^Wt.window[pt+$-1])&Wt.hash_mask,Wt.prev[pt&Wt.w_mask]=Wt.head[Wt.ins_h],Wt.head[Wt.ins_h]=pt,pt++,--dt;);Wt.strstart=pt,Wt.lookahead=$-1,$e(Wt)}return Wt.strstart+=Wt.lookahead,Wt.block_start=Wt.strstart,Wt.insert=Wt.lookahead,Wt.lookahead=0,Wt.match_length=Wt.prev_length=$-1,Wt.match_available=0,W.next_in=Kt,W.input=z,W.avail_in=ie,Wt.wrap=Dt,D},d.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(o,c,d){c.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(o,c,d){c.exports=function(u,m){var _,y,S,A,I,k,D,F,E,L,T,M,R,b,U,N,j,J,$,ct,It,et,yt,G,Pt;_=u.state,y=u.next_in,G=u.input,S=y+(u.avail_in-5),A=u.next_out,Pt=u.output,I=A-(m-u.avail_out),k=A+(u.avail_out-257),D=_.dmax,F=_.wsize,E=_.whave,L=_.wnext,T=_.window,M=_.hold,R=_.bits,b=_.lencode,U=_.distcode,N=(1<<_.lenbits)-1,j=(1<<_.distbits)-1;t:do{R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=b[M&N];e:for(;;){if(M>>>=$=J>>>24,R-=$,($=J>>>16&255)===0)Pt[A++]=65535&J;else{if(!(16&$)){if(!(64&$)){J=b[(65535&J)+(M&(1<<$)-1)];continue e}if(32&$){_.mode=12;break t}u.msg="invalid literal/length code",_.mode=30;break t}ct=65535&J,($&=15)&&(R<$&&(M+=G[y++]<<R,R+=8),ct+=M&(1<<$)-1,M>>>=$,R-=$),R<15&&(M+=G[y++]<<R,R+=8,M+=G[y++]<<R,R+=8),J=U[M&j];i:for(;;){if(M>>>=$=J>>>24,R-=$,!(16&($=J>>>16&255))){if(!(64&$)){J=U[(65535&J)+(M&(1<<$)-1)];continue i}u.msg="invalid distance code",_.mode=30;break t}if(It=65535&J,R<($&=15)&&(M+=G[y++]<<R,(R+=8)<$&&(M+=G[y++]<<R,R+=8)),D<(It+=M&(1<<$)-1)){u.msg="invalid distance too far back",_.mode=30;break t}if(M>>>=$,R-=$,($=A-I)<It){if(E<($=It-$)&&_.sane){u.msg="invalid distance too far back",_.mode=30;break t}if(yt=T,(et=0)===L){if(et+=F-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}else if(L<$){if(et+=F+L-$,($-=L)<ct){for(ct-=$;Pt[A++]=T[et++],--$;);if(et=0,L<ct){for(ct-=$=L;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}}}else if(et+=L-$,$<ct){for(ct-=$;Pt[A++]=T[et++],--$;);et=A-It,yt=Pt}for(;2<ct;)Pt[A++]=yt[et++],Pt[A++]=yt[et++],Pt[A++]=yt[et++],ct-=3;ct&&(Pt[A++]=yt[et++],1<ct&&(Pt[A++]=yt[et++]))}else{for(et=A-It;Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],Pt[A++]=Pt[et++],2<(ct-=3););ct&&(Pt[A++]=Pt[et++],1<ct&&(Pt[A++]=Pt[et++]))}break}}break}}while(y<S&&A<k);y-=ct=R>>3,M&=(1<<(R-=ct<<3))-1,u.next_in=y,u.next_out=A,u.avail_in=y<S?S-y+5:5-(y-S),u.avail_out=A<k?k-A+257:257-(A-k),_.hold=M,_.bits=R}},{}],49:[function(o,c,d){var u=o("../utils/common"),m=o("./adler32"),_=o("./crc32"),y=o("./inffast"),S=o("./inftrees"),A=1,I=2,k=0,D=-2,F=1,E=852,L=592;function T(et){return(et>>>24&255)+(et>>>8&65280)+((65280&et)<<8)+((255&et)<<24)}function M(){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 u.Buf16(320),this.work=new u.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function R(et){var yt;return et&&et.state?(yt=et.state,et.total_in=et.total_out=yt.total=0,et.msg="",yt.wrap&&(et.adler=1&yt.wrap),yt.mode=F,yt.last=0,yt.havedict=0,yt.dmax=32768,yt.head=null,yt.hold=0,yt.bits=0,yt.lencode=yt.lendyn=new u.Buf32(E),yt.distcode=yt.distdyn=new u.Buf32(L),yt.sane=1,yt.back=-1,k):D}function b(et){var yt;return et&&et.state?((yt=et.state).wsize=0,yt.whave=0,yt.wnext=0,R(et)):D}function U(et,yt){var G,Pt;return et&&et.state?(Pt=et.state,yt<0?(G=0,yt=-yt):(G=1+(yt>>4),yt<48&&(yt&=15)),yt&&(yt<8||15<yt)?D:(Pt.window!==null&&Pt.wbits!==yt&&(Pt.window=null),Pt.wrap=G,Pt.wbits=yt,b(et))):D}function N(et,yt){var G,Pt;return et?(Pt=new M,(et.state=Pt).window=null,(G=U(et,yt))!==k&&(et.state=null),G):D}var j,J,$=!0;function ct(et){if($){var yt;for(j=new u.Buf32(512),J=new u.Buf32(32),yt=0;yt<144;)et.lens[yt++]=8;for(;yt<256;)et.lens[yt++]=9;for(;yt<280;)et.lens[yt++]=7;for(;yt<288;)et.lens[yt++]=8;for(S(A,et.lens,0,288,j,0,et.work,{bits:9}),yt=0;yt<32;)et.lens[yt++]=5;S(I,et.lens,0,32,J,0,et.work,{bits:5}),$=!1}et.lencode=j,et.lenbits=9,et.distcode=J,et.distbits=5}function It(et,yt,G,Pt){var Et,Ct=et.state;return Ct.window===null&&(Ct.wsize=1<<Ct.wbits,Ct.wnext=0,Ct.whave=0,Ct.window=new u.Buf8(Ct.wsize)),Pt>=Ct.wsize?(u.arraySet(Ct.window,yt,G-Ct.wsize,Ct.wsize,0),Ct.wnext=0,Ct.whave=Ct.wsize):(Pt<(Et=Ct.wsize-Ct.wnext)&&(Et=Pt),u.arraySet(Ct.window,yt,G-Pt,Et,Ct.wnext),(Pt-=Et)?(u.arraySet(Ct.window,yt,G-Pt,Pt,0),Ct.wnext=Pt,Ct.whave=Ct.wsize):(Ct.wnext+=Et,Ct.wnext===Ct.wsize&&(Ct.wnext=0),Ct.whave<Ct.wsize&&(Ct.whave+=Et))),0}d.inflateReset=b,d.inflateReset2=U,d.inflateResetKeep=R,d.inflateInit=function(et){return N(et,15)},d.inflateInit2=N,d.inflate=function(et,yt){var G,Pt,Et,Ct,fe,re,Ft,Ot,Bt,ke,ce,Yt,$e,Oi,Oe,Ge,di,Ii,mn,Qi,W,Jt,Wt,pt,dt=0,Dt=new u.Buf8(4),ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!et||!et.state||!et.output||!et.input&&et.avail_in!==0)return D;(G=et.state).mode===12&&(G.mode=13),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,ke=re,ce=Ft,Jt=k;t:for(;;)switch(G.mode){case F:if(G.wrap===0){G.mode=13;break}for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(2&G.wrap&&Ot===35615){Dt[G.check=0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0),Bt=Ot=0,G.mode=2;break}if(G.flags=0,G.head&&(G.head.done=!1),!(1&G.wrap)||(((255&Ot)<<8)+(Ot>>8))%31){et.msg="incorrect header check",G.mode=30;break}if((15&Ot)!=8){et.msg="unknown compression method",G.mode=30;break}if(Bt-=4,W=8+(15&(Ot>>>=4)),G.wbits===0)G.wbits=W;else if(W>G.wbits){et.msg="invalid window size",G.mode=30;break}G.dmax=1<<W,et.adler=G.check=1,G.mode=512&Ot?10:12,Bt=Ot=0;break;case 2:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.flags=Ot,(255&G.flags)!=8){et.msg="unknown compression method",G.mode=30;break}if(57344&G.flags){et.msg="unknown header flags set",G.mode=30;break}G.head&&(G.head.text=Ot>>8&1),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=3;case 3:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.time=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,Dt[2]=Ot>>>16&255,Dt[3]=Ot>>>24&255,G.check=_(G.check,Dt,4,0)),Bt=Ot=0,G.mode=4;case 4:for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.head&&(G.head.xflags=255&Ot,G.head.os=Ot>>8),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0,G.mode=5;case 5:if(1024&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length=Ot,G.head&&(G.head.extra_len=Ot),512&G.flags&&(Dt[0]=255&Ot,Dt[1]=Ot>>>8&255,G.check=_(G.check,Dt,2,0)),Bt=Ot=0}else G.head&&(G.head.extra=null);G.mode=6;case 6:if(1024&G.flags&&(re<(Yt=G.length)&&(Yt=re),Yt&&(G.head&&(W=G.head.extra_len-G.length,G.head.extra||(G.head.extra=new Array(G.head.extra_len)),u.arraySet(G.head.extra,Pt,Ct,Yt,W)),512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,G.length-=Yt),G.length))break t;G.length=0,G.mode=7;case 7:if(2048&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.name+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.name=null);G.length=0,G.mode=8;case 8:if(4096&G.flags){if(re===0)break t;for(Yt=0;W=Pt[Ct+Yt++],G.head&&W&&G.length<65536&&(G.head.comment+=String.fromCharCode(W)),W&&Yt<re;);if(512&G.flags&&(G.check=_(G.check,Pt,Yt,Ct)),re-=Yt,Ct+=Yt,W)break t}else G.head&&(G.head.comment=null);G.mode=9;case 9:if(512&G.flags){for(;Bt<16;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(65535&G.check)){et.msg="header crc mismatch",G.mode=30;break}Bt=Ot=0}G.head&&(G.head.hcrc=G.flags>>9&1,G.head.done=!0),et.adler=G.check=0,G.mode=12;break;case 10:for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}et.adler=G.check=T(Ot),Bt=Ot=0,G.mode=11;case 11:if(G.havedict===0)return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,2;et.adler=G.check=1,G.mode=12;case 12:if(yt===5||yt===6)break t;case 13:if(G.last){Ot>>>=7&Bt,Bt-=7&Bt,G.mode=27;break}for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}switch(G.last=1&Ot,Bt-=1,3&(Ot>>>=1)){case 0:G.mode=14;break;case 1:if(ct(G),G.mode=20,yt!==6)break;Ot>>>=2,Bt-=2;break t;case 2:G.mode=17;break;case 3:et.msg="invalid block type",G.mode=30}Ot>>>=2,Bt-=2;break;case 14:for(Ot>>>=7&Bt,Bt-=7&Bt;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if((65535&Ot)!=(Ot>>>16^65535)){et.msg="invalid stored block lengths",G.mode=30;break}if(G.length=65535&Ot,Bt=Ot=0,G.mode=15,yt===6)break t;case 15:G.mode=16;case 16:if(Yt=G.length){if(re<Yt&&(Yt=re),Ft<Yt&&(Yt=Ft),Yt===0)break t;u.arraySet(Et,Pt,Ct,Yt,fe),re-=Yt,Ct+=Yt,Ft-=Yt,fe+=Yt,G.length-=Yt;break}G.mode=12;break;case 17:for(;Bt<14;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(G.nlen=257+(31&Ot),Ot>>>=5,Bt-=5,G.ndist=1+(31&Ot),Ot>>>=5,Bt-=5,G.ncode=4+(15&Ot),Ot>>>=4,Bt-=4,286<G.nlen||30<G.ndist){et.msg="too many length or distance symbols",G.mode=30;break}G.have=0,G.mode=18;case 18:for(;G.have<G.ncode;){for(;Bt<3;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.lens[ie[G.have++]]=7&Ot,Ot>>>=3,Bt-=3}for(;G.have<19;)G.lens[ie[G.have++]]=0;if(G.lencode=G.lendyn,G.lenbits=7,Wt={bits:G.lenbits},Jt=S(0,G.lens,0,19,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid code lengths set",G.mode=30;break}G.have=0,G.mode=19;case 19:for(;G.have<G.nlen+G.ndist;){for(;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(di<16)Ot>>>=Oe,Bt-=Oe,G.lens[G.have++]=di;else{if(di===16){for(pt=Oe+2;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot>>>=Oe,Bt-=Oe,G.have===0){et.msg="invalid bit length repeat",G.mode=30;break}W=G.lens[G.have-1],Yt=3+(3&Ot),Ot>>>=2,Bt-=2}else if(di===17){for(pt=Oe+3;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=3+(7&(Ot>>>=Oe)),Ot>>>=3,Bt-=3}else{for(pt=Oe+7;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Bt-=Oe,W=0,Yt=11+(127&(Ot>>>=Oe)),Ot>>>=7,Bt-=7}if(G.have+Yt>G.nlen+G.ndist){et.msg="invalid bit length repeat",G.mode=30;break}for(;Yt--;)G.lens[G.have++]=W}}if(G.mode===30)break;if(G.lens[256]===0){et.msg="invalid code -- missing end-of-block",G.mode=30;break}if(G.lenbits=9,Wt={bits:G.lenbits},Jt=S(A,G.lens,0,G.nlen,G.lencode,0,G.work,Wt),G.lenbits=Wt.bits,Jt){et.msg="invalid literal/lengths set",G.mode=30;break}if(G.distbits=6,G.distcode=G.distdyn,Wt={bits:G.distbits},Jt=S(I,G.lens,G.nlen,G.ndist,G.distcode,0,G.work,Wt),G.distbits=Wt.bits,Jt){et.msg="invalid distances set",G.mode=30;break}if(G.mode=20,yt===6)break t;case 20:G.mode=21;case 21:if(6<=re&&258<=Ft){et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,y(et,ce),fe=et.next_out,Et=et.output,Ft=et.avail_out,Ct=et.next_in,Pt=et.input,re=et.avail_in,Ot=G.hold,Bt=G.bits,G.mode===12&&(G.back=-1);break}for(G.back=0;Ge=(dt=G.lencode[Ot&(1<<G.lenbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ge&&!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.lencode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,G.length=di,Ge===0){G.mode=26;break}if(32&Ge){G.back=-1,G.mode=12;break}if(64&Ge){et.msg="invalid literal/length code",G.mode=30;break}G.extra=15&Ge,G.mode=22;case 22:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.length+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}G.was=G.length,G.mode=23;case 23:for(;Ge=(dt=G.distcode[Ot&(1<<G.distbits)-1])>>>16&255,di=65535&dt,!((Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(!(240&Ge)){for(Ii=Oe,mn=Ge,Qi=di;Ge=(dt=G.distcode[Qi+((Ot&(1<<Ii+mn)-1)>>Ii)])>>>16&255,di=65535&dt,!(Ii+(Oe=dt>>>24)<=Bt);){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}Ot>>>=Ii,Bt-=Ii,G.back+=Ii}if(Ot>>>=Oe,Bt-=Oe,G.back+=Oe,64&Ge){et.msg="invalid distance code",G.mode=30;break}G.offset=di,G.extra=15&Ge,G.mode=24;case 24:if(G.extra){for(pt=G.extra;Bt<pt;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}G.offset+=Ot&(1<<G.extra)-1,Ot>>>=G.extra,Bt-=G.extra,G.back+=G.extra}if(G.offset>G.dmax){et.msg="invalid distance too far back",G.mode=30;break}G.mode=25;case 25:if(Ft===0)break t;if(Yt=ce-Ft,G.offset>Yt){if((Yt=G.offset-Yt)>G.whave&&G.sane){et.msg="invalid distance too far back",G.mode=30;break}$e=Yt>G.wnext?(Yt-=G.wnext,G.wsize-Yt):G.wnext-Yt,Yt>G.length&&(Yt=G.length),Oi=G.window}else Oi=Et,$e=fe-G.offset,Yt=G.length;for(Ft<Yt&&(Yt=Ft),Ft-=Yt,G.length-=Yt;Et[fe++]=Oi[$e++],--Yt;);G.length===0&&(G.mode=21);break;case 26:if(Ft===0)break t;Et[fe++]=G.length,Ft--,G.mode=21;break;case 27:if(G.wrap){for(;Bt<32;){if(re===0)break t;re--,Ot|=Pt[Ct++]<<Bt,Bt+=8}if(ce-=Ft,et.total_out+=ce,G.total+=ce,ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,fe-ce):m(G.check,Et,ce,fe-ce)),ce=Ft,(G.flags?Ot:T(Ot))!==G.check){et.msg="incorrect data check",G.mode=30;break}Bt=Ot=0}G.mode=28;case 28:if(G.wrap&&G.flags){for(;Bt<32;){if(re===0)break t;re--,Ot+=Pt[Ct++]<<Bt,Bt+=8}if(Ot!==(4294967295&G.total)){et.msg="incorrect length check",G.mode=30;break}Bt=Ot=0}G.mode=29;case 29:Jt=1;break t;case 30:Jt=-3;break t;case 31:return-4;case 32:default:return D}return et.next_out=fe,et.avail_out=Ft,et.next_in=Ct,et.avail_in=re,G.hold=Ot,G.bits=Bt,(G.wsize||ce!==et.avail_out&&G.mode<30&&(G.mode<27||yt!==4))&&It(et,et.output,et.next_out,ce-et.avail_out)?(G.mode=31,-4):(ke-=et.avail_in,ce-=et.avail_out,et.total_in+=ke,et.total_out+=ce,G.total+=ce,G.wrap&&ce&&(et.adler=G.check=G.flags?_(G.check,Et,ce,et.next_out-ce):m(G.check,Et,ce,et.next_out-ce)),et.data_type=G.bits+(G.last?64:0)+(G.mode===12?128:0)+(G.mode===20||G.mode===15?256:0),(ke==0&&ce===0||yt===4)&&Jt===k&&(Jt=-5),Jt)},d.inflateEnd=function(et){if(!et||!et.state)return D;var yt=et.state;return yt.window&&(yt.window=null),et.state=null,k},d.inflateGetHeader=function(et,yt){var G;return et&&et.state&&2&(G=et.state).wrap?((G.head=yt).done=!1,k):D},d.inflateSetDictionary=function(et,yt){var G,Pt=yt.length;return et&&et.state?(G=et.state).wrap!==0&&G.mode!==11?D:G.mode===11&&m(1,yt,Pt,0)!==G.check?-3:It(et,yt,Pt,Pt)?(G.mode=31,-4):(G.havedict=1,k):D},d.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(o,c,d){var u=o("../utils/common"),m=[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],_=[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],y=[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],S=[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];c.exports=function(A,I,k,D,F,E,L,T){var M,R,b,U,N,j,J,$,ct,It=T.bits,et=0,yt=0,G=0,Pt=0,Et=0,Ct=0,fe=0,re=0,Ft=0,Ot=0,Bt=null,ke=0,ce=new u.Buf16(16),Yt=new u.Buf16(16),$e=null,Oi=0;for(et=0;et<=15;et++)ce[et]=0;for(yt=0;yt<D;yt++)ce[I[k+yt]]++;for(Et=It,Pt=15;1<=Pt&&ce[Pt]===0;Pt--);if(Pt<Et&&(Et=Pt),Pt===0)return F[E++]=20971520,F[E++]=20971520,T.bits=1,0;for(G=1;G<Pt&&ce[G]===0;G++);for(Et<G&&(Et=G),et=re=1;et<=15;et++)if(re<<=1,(re-=ce[et])<0)return-1;if(0<re&&(A===0||Pt!==1))return-1;for(Yt[1]=0,et=1;et<15;et++)Yt[et+1]=Yt[et]+ce[et];for(yt=0;yt<D;yt++)I[k+yt]!==0&&(L[Yt[I[k+yt]]++]=yt);if(j=A===0?(Bt=$e=L,19):A===1?(Bt=m,ke-=257,$e=_,Oi-=257,256):(Bt=y,$e=S,-1),et=G,N=E,fe=yt=Ot=0,b=-1,U=(Ft=1<<(Ct=Et))-1,A===1&&852<Ft||A===2&&592<Ft)return 1;for(;;){for(J=et-fe,ct=L[yt]<j?($=0,L[yt]):L[yt]>j?($=$e[Oi+L[yt]],Bt[ke+L[yt]]):($=96,0),M=1<<et-fe,G=R=1<<Ct;F[N+(Ot>>fe)+(R-=M)]=J<<24|$<<16|ct|0,R!==0;);for(M=1<<et-1;Ot&M;)M>>=1;if(M!==0?(Ot&=M-1,Ot+=M):Ot=0,yt++,--ce[et]==0){if(et===Pt)break;et=I[k+L[yt]]}if(Et<et&&(Ot&U)!==b){for(fe===0&&(fe=Et),N+=G,re=1<<(Ct=et-fe);Ct+fe<Pt&&!((re-=ce[Ct+fe])<=0);)Ct++,re<<=1;if(Ft+=1<<Ct,A===1&&852<Ft||A===2&&592<Ft)return 1;F[b=Ot&U]=Et<<24|Ct<<16|N-E|0}}return Ot!==0&&(F[N+Ot]=et-fe<<24|64<<16|0),T.bits=Et,0}},{"../utils/common":41}],51:[function(o,c,d){c.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(o,c,d){var u=o("../utils/common"),m=0,_=1;function y(dt){for(var Dt=dt.length;0<=--Dt;)dt[Dt]=0}var S=0,A=29,I=256,k=I+1+A,D=30,F=19,E=2*k+1,L=15,T=16,M=7,R=256,b=16,U=17,N=18,j=[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],J=[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],$=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ct=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],It=new Array(2*(k+2));y(It);var et=new Array(2*D);y(et);var yt=new Array(512);y(yt);var G=new Array(256);y(G);var Pt=new Array(A);y(Pt);var Et,Ct,fe,re=new Array(D);function Ft(dt,Dt,ie,Kt,z){this.static_tree=dt,this.extra_bits=Dt,this.extra_base=ie,this.elems=Kt,this.max_length=z,this.has_stree=dt&&dt.length}function Ot(dt,Dt){this.dyn_tree=dt,this.max_code=0,this.stat_desc=Dt}function Bt(dt){return dt<256?yt[dt]:yt[256+(dt>>>7)]}function ke(dt,Dt){dt.pending_buf[dt.pending++]=255&Dt,dt.pending_buf[dt.pending++]=Dt>>>8&255}function ce(dt,Dt,ie){dt.bi_valid>T-ie?(dt.bi_buf|=Dt<<dt.bi_valid&65535,ke(dt,dt.bi_buf),dt.bi_buf=Dt>>T-dt.bi_valid,dt.bi_valid+=ie-T):(dt.bi_buf|=Dt<<dt.bi_valid&65535,dt.bi_valid+=ie)}function Yt(dt,Dt,ie){ce(dt,ie[2*Dt],ie[2*Dt+1])}function $e(dt,Dt){for(var ie=0;ie|=1&dt,dt>>>=1,ie<<=1,0<--Dt;);return ie>>>1}function Oi(dt,Dt,ie){var Kt,z,Q=new Array(L+1),ot=0;for(Kt=1;Kt<=L;Kt++)Q[Kt]=ot=ot+ie[Kt-1]<<1;for(z=0;z<=Dt;z++){var nt=dt[2*z+1];nt!==0&&(dt[2*z]=$e(Q[nt]++,nt))}}function Oe(dt){var Dt;for(Dt=0;Dt<k;Dt++)dt.dyn_ltree[2*Dt]=0;for(Dt=0;Dt<D;Dt++)dt.dyn_dtree[2*Dt]=0;for(Dt=0;Dt<F;Dt++)dt.bl_tree[2*Dt]=0;dt.dyn_ltree[2*R]=1,dt.opt_len=dt.static_len=0,dt.last_lit=dt.matches=0}function Ge(dt){8<dt.bi_valid?ke(dt,dt.bi_buf):0<dt.bi_valid&&(dt.pending_buf[dt.pending++]=dt.bi_buf),dt.bi_buf=0,dt.bi_valid=0}function di(dt,Dt,ie,Kt){var z=2*Dt,Q=2*ie;return dt[z]<dt[Q]||dt[z]===dt[Q]&&Kt[Dt]<=Kt[ie]}function Ii(dt,Dt,ie){for(var Kt=dt.heap[ie],z=ie<<1;z<=dt.heap_len&&(z<dt.heap_len&&di(Dt,dt.heap[z+1],dt.heap[z],dt.depth)&&z++,!di(Dt,Kt,dt.heap[z],dt.depth));)dt.heap[ie]=dt.heap[z],ie=z,z<<=1;dt.heap[ie]=Kt}function mn(dt,Dt,ie){var Kt,z,Q,ot,nt=0;if(dt.last_lit!==0)for(;Kt=dt.pending_buf[dt.d_buf+2*nt]<<8|dt.pending_buf[dt.d_buf+2*nt+1],z=dt.pending_buf[dt.l_buf+nt],nt++,Kt===0?Yt(dt,z,Dt):(Yt(dt,(Q=G[z])+I+1,Dt),(ot=j[Q])!==0&&ce(dt,z-=Pt[Q],ot),Yt(dt,Q=Bt(--Kt),ie),(ot=J[Q])!==0&&ce(dt,Kt-=re[Q],ot)),nt<dt.last_lit;);Yt(dt,R,Dt)}function Qi(dt,Dt){var ie,Kt,z,Q=Dt.dyn_tree,ot=Dt.stat_desc.static_tree,nt=Dt.stat_desc.has_stree,vt=Dt.stat_desc.elems,Gt=-1;for(dt.heap_len=0,dt.heap_max=E,ie=0;ie<vt;ie++)Q[2*ie]!==0?(dt.heap[++dt.heap_len]=Gt=ie,dt.depth[ie]=0):Q[2*ie+1]=0;for(;dt.heap_len<2;)Q[2*(z=dt.heap[++dt.heap_len]=Gt<2?++Gt:0)]=1,dt.depth[z]=0,dt.opt_len--,nt&&(dt.static_len-=ot[2*z+1]);for(Dt.max_code=Gt,ie=dt.heap_len>>1;1<=ie;ie--)Ii(dt,Q,ie);for(z=vt;ie=dt.heap[1],dt.heap[1]=dt.heap[dt.heap_len--],Ii(dt,Q,1),Kt=dt.heap[1],dt.heap[--dt.heap_max]=ie,dt.heap[--dt.heap_max]=Kt,Q[2*z]=Q[2*ie]+Q[2*Kt],dt.depth[z]=(dt.depth[ie]>=dt.depth[Kt]?dt.depth[ie]:dt.depth[Kt])+1,Q[2*ie+1]=Q[2*Kt+1]=z,dt.heap[1]=z++,Ii(dt,Q,1),2<=dt.heap_len;);dt.heap[--dt.heap_max]=dt.heap[1],function(Xt,jt){var Ne,Re,ge,we,_i,Si,ni=jt.dyn_tree,Ei=jt.max_code,qr=jt.stat_desc.static_tree,or=jt.stat_desc.has_stree,on=jt.stat_desc.extra_bits,As=jt.stat_desc.extra_base,Di=jt.stat_desc.max_length,Xs=0;for(we=0;we<=L;we++)Xt.bl_count[we]=0;for(ni[2*Xt.heap[Xt.heap_max]+1]=0,Ne=Xt.heap_max+1;Ne<E;Ne++)Di<(we=ni[2*ni[2*(Re=Xt.heap[Ne])+1]+1]+1)&&(we=Di,Xs++),ni[2*Re+1]=we,Ei<Re||(Xt.bl_count[we]++,_i=0,As<=Re&&(_i=on[Re-As]),Si=ni[2*Re],Xt.opt_len+=Si*(we+_i),or&&(Xt.static_len+=Si*(qr[2*Re+1]+_i)));if(Xs!==0){do{for(we=Di-1;Xt.bl_count[we]===0;)we--;Xt.bl_count[we]--,Xt.bl_count[we+1]+=2,Xt.bl_count[Di]--,Xs-=2}while(0<Xs);for(we=Di;we!==0;we--)for(Re=Xt.bl_count[we];Re!==0;)Ei<(ge=Xt.heap[--Ne])||(ni[2*ge+1]!==we&&(Xt.opt_len+=(we-ni[2*ge+1])*ni[2*ge],ni[2*ge+1]=we),Re--)}}(dt,Dt),Oi(Q,Gt,dt.bl_count)}function W(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Dt[2*(ie+1)+1]=65535,Kt=0;Kt<=ie;Kt++)z=ot,ot=Dt[2*(Kt+1)+1],++nt<vt&&z===ot||(nt<Gt?dt.bl_tree[2*z]+=nt:z!==0?(z!==Q&&dt.bl_tree[2*z]++,dt.bl_tree[2*b]++):nt<=10?dt.bl_tree[2*U]++:dt.bl_tree[2*N]++,Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4))}function Jt(dt,Dt,ie){var Kt,z,Q=-1,ot=Dt[1],nt=0,vt=7,Gt=4;for(ot===0&&(vt=138,Gt=3),Kt=0;Kt<=ie;Kt++)if(z=ot,ot=Dt[2*(Kt+1)+1],!(++nt<vt&&z===ot)){if(nt<Gt)for(;Yt(dt,z,dt.bl_tree),--nt!=0;);else z!==0?(z!==Q&&(Yt(dt,z,dt.bl_tree),nt--),Yt(dt,b,dt.bl_tree),ce(dt,nt-3,2)):nt<=10?(Yt(dt,U,dt.bl_tree),ce(dt,nt-3,3)):(Yt(dt,N,dt.bl_tree),ce(dt,nt-11,7));Q=z,Gt=(nt=0)===ot?(vt=138,3):z===ot?(vt=6,3):(vt=7,4)}}y(re);var Wt=!1;function pt(dt,Dt,ie,Kt){ce(dt,(S<<1)+(Kt?1:0),3),function(z,Q,ot,nt){Ge(z),nt&&(ke(z,ot),ke(z,~ot)),u.arraySet(z.pending_buf,z.window,Q,ot,z.pending),z.pending+=ot}(dt,Dt,ie,!0)}d._tr_init=function(dt){Wt||(function(){var Dt,ie,Kt,z,Q,ot=new Array(L+1);for(z=Kt=0;z<A-1;z++)for(Pt[z]=Kt,Dt=0;Dt<1<<j[z];Dt++)G[Kt++]=z;for(G[Kt-1]=z,z=Q=0;z<16;z++)for(re[z]=Q,Dt=0;Dt<1<<J[z];Dt++)yt[Q++]=z;for(Q>>=7;z<D;z++)for(re[z]=Q<<7,Dt=0;Dt<1<<J[z]-7;Dt++)yt[256+Q++]=z;for(ie=0;ie<=L;ie++)ot[ie]=0;for(Dt=0;Dt<=143;)It[2*Dt+1]=8,Dt++,ot[8]++;for(;Dt<=255;)It[2*Dt+1]=9,Dt++,ot[9]++;for(;Dt<=279;)It[2*Dt+1]=7,Dt++,ot[7]++;for(;Dt<=287;)It[2*Dt+1]=8,Dt++,ot[8]++;for(Oi(It,k+1,ot),Dt=0;Dt<D;Dt++)et[2*Dt+1]=5,et[2*Dt]=$e(Dt,5);Et=new Ft(It,j,I+1,k,L),Ct=new Ft(et,J,0,D,L),fe=new Ft(new Array(0),$,0,F,M)}(),Wt=!0),dt.l_desc=new Ot(dt.dyn_ltree,Et),dt.d_desc=new Ot(dt.dyn_dtree,Ct),dt.bl_desc=new Ot(dt.bl_tree,fe),dt.bi_buf=0,dt.bi_valid=0,Oe(dt)},d._tr_stored_block=pt,d._tr_flush_block=function(dt,Dt,ie,Kt){var z,Q,ot=0;0<dt.level?(dt.strm.data_type===2&&(dt.strm.data_type=function(nt){var vt,Gt=4093624447;for(vt=0;vt<=31;vt++,Gt>>>=1)if(1&Gt&&nt.dyn_ltree[2*vt]!==0)return m;if(nt.dyn_ltree[18]!==0||nt.dyn_ltree[20]!==0||nt.dyn_ltree[26]!==0)return _;for(vt=32;vt<I;vt++)if(nt.dyn_ltree[2*vt]!==0)return _;return m}(dt)),Qi(dt,dt.l_desc),Qi(dt,dt.d_desc),ot=function(nt){var vt;for(W(nt,nt.dyn_ltree,nt.l_desc.max_code),W(nt,nt.dyn_dtree,nt.d_desc.max_code),Qi(nt,nt.bl_desc),vt=F-1;3<=vt&&nt.bl_tree[2*ct[vt]+1]===0;vt--);return nt.opt_len+=3*(vt+1)+5+5+4,vt}(dt),z=dt.opt_len+3+7>>>3,(Q=dt.static_len+3+7>>>3)<=z&&(z=Q)):z=Q=ie+5,ie+4<=z&&Dt!==-1?pt(dt,Dt,ie,Kt):dt.strategy===4||Q===z?(ce(dt,2+(Kt?1:0),3),mn(dt,It,et)):(ce(dt,4+(Kt?1:0),3),function(nt,vt,Gt,Xt){var jt;for(ce(nt,vt-257,5),ce(nt,Gt-1,5),ce(nt,Xt-4,4),jt=0;jt<Xt;jt++)ce(nt,nt.bl_tree[2*ct[jt]+1],3);Jt(nt,nt.dyn_ltree,vt-1),Jt(nt,nt.dyn_dtree,Gt-1)}(dt,dt.l_desc.max_code+1,dt.d_desc.max_code+1,ot+1),mn(dt,dt.dyn_ltree,dt.dyn_dtree)),Oe(dt),Kt&&Ge(dt)},d._tr_tally=function(dt,Dt,ie){return dt.pending_buf[dt.d_buf+2*dt.last_lit]=Dt>>>8&255,dt.pending_buf[dt.d_buf+2*dt.last_lit+1]=255&Dt,dt.pending_buf[dt.l_buf+dt.last_lit]=255&ie,dt.last_lit++,Dt===0?dt.dyn_ltree[2*ie]++:(dt.matches++,Dt--,dt.dyn_ltree[2*(G[ie]+I+1)]++,dt.dyn_dtree[2*Bt(Dt)]++),dt.last_lit===dt.lit_bufsize-1},d._tr_align=function(dt){ce(dt,2,3),Yt(dt,R,It),function(Dt){Dt.bi_valid===16?(ke(Dt,Dt.bi_buf),Dt.bi_buf=0,Dt.bi_valid=0):8<=Dt.bi_valid&&(Dt.pending_buf[Dt.pending++]=255&Dt.bi_buf,Dt.bi_buf>>=8,Dt.bi_valid-=8)}(dt)}},{"../utils/common":41}],53:[function(o,c,d){c.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(o,c,d){(function(u){(function(m,_){if(!m.setImmediate){var y,S,A,I,k=1,D={},F=!1,E=m.document,L=Object.getPrototypeOf&&Object.getPrototypeOf(m);L=L&&L.setTimeout?L:m,y={}.toString.call(m.process)==="[object process]"?function(b){process.nextTick(function(){M(b)})}:function(){if(m.postMessage&&!m.importScripts){var b=!0,U=m.onmessage;return m.onmessage=function(){b=!1},m.postMessage("","*"),m.onmessage=U,b}}()?(I="setImmediate$"+Math.random()+"$",m.addEventListener?m.addEventListener("message",R,!1):m.attachEvent("onmessage",R),function(b){m.postMessage(I+b,"*")}):m.MessageChannel?((A=new MessageChannel).port1.onmessage=function(b){M(b.data)},function(b){A.port2.postMessage(b)}):E&&"onreadystatechange"in E.createElement("script")?(S=E.documentElement,function(b){var U=E.createElement("script");U.onreadystatechange=function(){M(b),U.onreadystatechange=null,S.removeChild(U),U=null},S.appendChild(U)}):function(b){setTimeout(M,0,b)},L.setImmediate=function(b){typeof b!="function"&&(b=new Function(""+b));for(var U=new Array(arguments.length-1),N=0;N<U.length;N++)U[N]=arguments[N+1];var j={callback:b,args:U};return D[k]=j,y(k),k++},L.clearImmediate=T}function T(b){delete D[b]}function M(b){if(F)setTimeout(M,0,b);else{var U=D[b];if(U){F=!0;try{(function(N){var j=N.callback,J=N.args;switch(J.length){case 0:j();break;case 1:j(J[0]);break;case 2:j(J[0],J[1]);break;case 3:j(J[0],J[1],J[2]);break;default:j.apply(_,J)}})(U)}finally{T(b),F=!1}}}}function R(b){b.source===m&&typeof b.data=="string"&&b.data.indexOf(I)===0&&M(+b.data.slice(I.length))}})(typeof self>"u"?u===void 0?this:u:self)}).call(this,typeof Er<"u"?Er:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Sf);var um=Sf.exports;const cm=Ju(um);var Ef={exports:{}};(function(x,a){(function(o,c){c()})(Er,function(){function o(S,A){return typeof A>"u"?A={autoBom:!1}:typeof A!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),A={autoBom:!A}),A.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(S.type)?new Blob(["\uFEFF",S],{type:S.type}):S}function c(S,A,I){var k=new XMLHttpRequest;k.open("GET",S),k.responseType="blob",k.onload=function(){y(k.response,A,I)},k.onerror=function(){console.error("could not download file")},k.send()}function d(S){var A=new XMLHttpRequest;A.open("HEAD",S,!1);try{A.send()}catch{}return 200<=A.status&&299>=A.status}function u(S){try{S.dispatchEvent(new MouseEvent("click"))}catch{var A=document.createEvent("MouseEvents");A.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),S.dispatchEvent(A)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Er=="object"&&Er.global===Er?Er:void 0,_=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!_?function(S,A,I){var k=m.URL||m.webkitURL,D=document.createElement("a");A=A||S.name||"download",D.download=A,D.rel="noopener",typeof S=="string"?(D.href=S,D.origin===location.origin?u(D):d(D.href)?c(S,A,I):u(D,D.target="_blank")):(D.href=k.createObjectURL(S),setTimeout(function(){k.revokeObjectURL(D.href)},4e4),setTimeout(function(){u(D)},0))}:"msSaveOrOpenBlob"in navigator?function(S,A,I){if(A=A||S.name||"download",typeof S!="string")navigator.msSaveOrOpenBlob(o(S,I),A);else if(d(S))c(S,A,I);else{var k=document.createElement("a");k.href=S,k.target="_blank",setTimeout(function(){u(k)})}}:function(S,A,I,k){if(k=k||open("","_blank"),k&&(k.document.title=k.document.body.innerText="downloading..."),typeof S=="string")return c(S,A,I);var D=S.type==="application/octet-stream",F=/constructor/i.test(m.HTMLElement)||m.safari,E=/CriOS\/[\d]+/.test(navigator.userAgent);if((E||D&&F||_)&&typeof FileReader<"u"){var L=new FileReader;L.onloadend=function(){var R=L.result;R=E?R:R.replace(/^data:[^;]*;/,"data:attachment/file;"),k?k.location.href=R:location=R,k=null},L.readAsDataURL(S)}else{var T=m.URL||m.webkitURL,M=T.createObjectURL(S);k?k.location=M:location.href=M,k=null,setTimeout(function(){T.revokeObjectURL(M)},4e4)}});m.saveAs=y.saveAs=y,x.exports=y})})(Ef);var fm=Ef.exports;const pm=Ju(fm);class dm{constructor(a,o){window.mars3d?(this.panoramicViewClass=o,this.coordinate=[{heading:0,pitch:0,stop:5},{heading:90,pitch:0,stop:5},{heading:180,pitch:0,stop:5},{heading:270,pitch:0,stop:5},{heading:0,pitch:90,stop:5},{heading:0,pitch:-90,stop:5}],this.screenshotArray=[],this.events={},this.timestamp=0,this.lat,this.lng,this.alt):console.error("未引入指定插件")}start(a=!0){var o,c;if(a){this.timestamp=new Date().getTime();const d=document.getElementById("app"),u=window.innerHeight,m=document.getElementById("mars3dContainer");m&&(m.style.width=u.toString()+"px",m.style.height=u.toString()+"px"),d!==null&&d.classList.add(this.panoramicViewClass);let{lat:_,lng:y,alt:S}=window.map.getCameraView();this.lat=_,this.lng=y,this.alt=S,window.map.viewer.scene.camera.frustum.fov=window.Cesium.Math.PI_OVER_THREE*1.5}this.screenshotArray&&this.coordinate?this.coordinate[(o=this.screenshotArray)==null?void 0:o.length]?window.map.setCameraView({lat:this.lat,lng:this.lng,alt:this.alt,...this.coordinate[(c=this.screenshotArray)==null?void 0:c.length]},{complete:()=>{setTimeout(()=>{var d;this.screenshot((d=this.screenshotArray)==null?void 0:d.length)},100)}}):(this.downloadImagesAsZip(),this.screenshotArray=[]):(console.error("初始化失效"),this.emit("state",{type:"error"}))}async screenshot(a){const o=await window.map.expImage({download:!1}),c=window.map.container.getElementsByClassName("cesium-viewer-cesiumWidgetContainer"),d=await window.domtoimage.toPng(window.map.container,{filter:u=>u!==c[0]});this.mergeImage(o.image,d,o.width,o.height).then(u=>{var y;let m=Number(a)+1,_={src:u,name:"全景图_"+this.timestamp+"_"+m+".jpg"};this.emit("intercept",_),(y=this.screenshotArray)==null||y.push(_),this.start(!1)})}mergeImage(a,o,c,d){return new Promise((u,m)=>{const _=document.createElement("canvas");_.width=c,_.height=d;const y=_.getContext("2d");if(_&&y){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{y.drawImage(S,0,0,c,d);const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{y.drawImage(A,0,0,c,d);const I=_.toDataURL("image/png");u(I)},A.src=o},S.src=a}else m()})}download(){this.screenshotArray&&this.screenshotArray.forEach(a=>{window.mars3d.Util.downloadBase64Image(a.name,a.src)})}async downloadImagesAsZip(){if(this.screenshotArray){const a=new cm;this.screenshotArray.forEach(c=>{const d=c.src.split(",")[1],u=atob(d),m=[];for(let S=0;S<u.length;S+=1024){const A=u.slice(S,S+1024),I=new Array(A.length);for(let D=0;D<A.length;D++)I[D]=A.charCodeAt(D);const k=new Uint8Array(I);m.push(k)}const _=new Blob(m,{type:"image/jpeg"}),y=`${c.name}`;a.file(y,_,{binary:!0})});const o=await a.generateAsync({type:"blob"});pm(o,"CHBIM-Panorama.zip"),this.emit("state",{type:"success",schedule:100}),this.init()}}init(){const a=document.getElementById("app");a&&a.classList.remove(this.panoramicViewClass);const o=document.getElementById("mars3dContainer");o&&(o.style.width="",o.style.height="")}on(a,o){this.events[a]?this.events[a].push(o):this.events[a]=[o]}emit(a,...o){this.events[a]!=null&&this.events[a].forEach(c=>c(...o))}off(a,o){this.events[a]=this.events[a].filter(c=>c!==o)}}function uo(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}function bf(x,a){x.prototype=Object.create(a.prototype),x.prototype.constructor=x,x.__proto__=a}/*!
2686
2686
  * GSAP 3.12.5
2687
2687
  * https://gsap.com
2688
2688
  *