!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.DT=t():e.DT=t()}(window,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1183)}([function(e,t,i){"use strict";i.r(t),t.default=function(e){return null!=e}},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(3),s=i(5);function l(e,t,i){this.x=Object(a.default)(e,0),this.y=Object(a.default)(t,0),this.z=Object(a.default)(i,0)}l.fromSpherical=function(e,t){n.a.typeOf.object("spherical",e),Object(r.default)(t)||(t=new l);var i=e.clock,o=e.cone,s=Object(a.default)(e.magnitude,1),u=s*Math.sin(o);return t.x=u*Math.cos(i),t.y=u*Math.sin(i),t.z=s*Math.cos(o),t},l.fromElements=function(e,t,i,n){return Object(r.default)(n)?(n.x=e,n.y=t,n.z=i,n):new l(e,t,i)},l.clone=function(e,t){if(Object(r.default)(e))return Object(r.default)(t)?(t.x=e.x,t.y=e.y,t.z=e.z,t):new l(e.x,e.y,e.z)},l.fromCartesian4=l.clone,l.packedLength=3,l.pack=function(e,t,i){return n.a.typeOf.object("value",e),n.a.defined("array",t),i=Object(a.default)(i,0),t[i++]=e.x,t[i++]=e.y,t[i]=e.z,t},l.unpack=function(e,t,i){return n.a.defined("array",e),t=Object(a.default)(t,0),Object(r.default)(i)||(i=new l),i.x=e[t++],i.y=e[t++],i.z=e[t],i},l.packArray=function(e,t){n.a.defined("array",e);var i=e.length,a=3*i;if(Object(r.default)(t)){if(!Array.isArray(t)&&t.length!==a)throw new o.default("If result is a typed array, it must have exactly array.length * 3 elements");t.length!==a&&(t.length=a)}else t=new Array(a);for(var s=0;s=i)throw new a.default("Expected "+e+" to be less than "+i+", actual value was "+t)},r.typeOf.number.lessThanOrEquals=function(e,t,i){if(r.typeOf.number(e,t),t>i)throw new a.default("Expected "+e+" to be less than or equal to "+i+", actual value was "+t)},r.typeOf.number.greaterThan=function(e,t,i){if(r.typeOf.number(e,t),t<=i)throw new a.default("Expected "+e+" to be greater than "+i+", actual value was "+t)},r.typeOf.number.greaterThanOrEquals=function(e,t,i){if(r.typeOf.number(e,t),t0?1:-1})),l.signNotZero=function(e){return e<0?-1:1},l.toSNorm=function(e,t){return t=Object(r.default)(t,255),Math.round((.5*l.clamp(e,-1,1)+.5)*t)},l.fromSNorm=function(e,t){return t=Object(r.default)(t,255),l.clamp(e,0,t)/t*2-1},l.normalize=function(e,t,i){return 0===(i=Math.max(i-t,0))?0:l.clamp((e-t)/i,0,1)},l.sinh=Object(r.default)(Math.sinh,(function(e){return(Math.exp(e)-Math.exp(-e))/2})),l.cosh=Object(r.default)(Math.cosh,(function(e){return(Math.exp(e)+Math.exp(-e))/2})),l.lerp=function(e,t,i){return(1-i)*e+i*t},l.PI=Math.PI,l.ONE_OVER_PI=1/Math.PI,l.PI_OVER_TWO=Math.PI/2,l.PI_OVER_THREE=Math.PI/3,l.PI_OVER_FOUR=Math.PI/4,l.PI_OVER_SIX=Math.PI/6,l.THREE_PI_OVER_TWO=3*Math.PI/2,l.TWO_PI=2*Math.PI,l.ONE_OVER_TWO_PI=1/(2*Math.PI),l.RADIANS_PER_DEGREE=Math.PI/180,l.DEGREES_PER_RADIAN=180/Math.PI,l.RADIANS_PER_ARCSECOND=l.RADIANS_PER_DEGREE/3600,l.toRadians=function(e){if(!Object(o.default)(e))throw new s.default("degrees is required.");return e*l.RADIANS_PER_DEGREE},l.toDegrees=function(e){if(!Object(o.default)(e))throw new s.default("radians is required.");return e*l.DEGREES_PER_RADIAN},l.convertLongitudeRange=function(e){if(!Object(o.default)(e))throw new s.default("angle is required.");var t=l.TWO_PI,i=e-Math.floor(e/t)*t;return i<-Math.PI?i+t:i>=Math.PI?i-t:i},l.clampToLatitudeRange=function(e){if(!Object(o.default)(e))throw new s.default("angle is required.");return l.clamp(e,-1*l.PI_OVER_TWO,l.PI_OVER_TWO)},l.negativePiToPi=function(e){if(!Object(o.default)(e))throw new s.default("angle is required.");return e>=-l.PI&&e<=l.PI?e:l.zeroToTwoPi(e+l.PI)-l.PI},l.zeroToTwoPi=function(e){if(!Object(o.default)(e))throw new s.default("angle is required.");if(e>=0&&e<=l.TWO_PI)return e;var t=l.mod(e,l.TWO_PI);return Math.abs(t)l.EPSILON14?l.TWO_PI:t},l.mod=function(e,t){if(!Object(o.default)(e))throw new s.default("m is required.");if(!Object(o.default)(t))throw new s.default("n is required.");if(0===t)throw new s.default("divisor cannot be 0.");return l.sign(e)===l.sign(t)&&Math.abs(e)i},l.greaterThanOrEquals=function(e,t,i){if(!Object(o.default)(e))throw new s.default("first is required.");if(!Object(o.default)(t))throw new s.default("second is required.");if(!Object(o.default)(i))throw new s.default("absoluteEpsilon is required.");return e-t>-i};var u=[1];l.factorial=function(e){if("number"!=typeof e||e<0)throw new s.default("A number greater than or equal to 0 is required.");var t=u.length;if(e>=t)for(var i=u[t-1],n=t;n<=e;n++){var a=i*n;u.push(a),i=a}return u[e]},l.incrementWrap=function(e,t,i){if(i=Object(r.default)(i,0),!Object(o.default)(e))throw new s.default("n is required.");if(t<=i)throw new s.default("maximumValue must be greater than minimumValue.");return++e>t&&(e=i),e},l.isPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new s.default("A number between 0 and (2^32)-1 is required.");return 0!==e&&0==(e&e-1)},l.nextPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>2147483648)throw new s.default("A number between 0 and 2^31 is required.");return--e,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e},l.previousPowerOfTwo=function(e){if("number"!=typeof e||e<0||e>4294967295)throw new s.default("A number between 0 and (2^32)-1 is required.");return e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e=((e|=e>>32)>>>0)-(e>>>1)},l.clamp=function(e,t,i){if(!Object(o.default)(e))throw new s.default("value is required");if(!Object(o.default)(t))throw new s.default("min is required.");if(!Object(o.default)(i))throw new s.default("max is required.");return ei?i:e};var d=new n.a;l.setRandomNumberSeed=function(e){if(!Object(o.default)(e))throw new s.default("seed is required.");d=new n.a(e)},l.nextRandomNumber=function(){return d.random()},l.randomBetween=function(e,t){return l.nextRandomNumber()*(t-e)+e},l.acosClamped=function(e){if(!Object(o.default)(e))throw new s.default("value is required.");return Math.acos(l.clamp(e,-1,1))},l.asinClamped=function(e){if(!Object(o.default)(e))throw new s.default("value is required.");return Math.asin(l.clamp(e,-1,1))},l.chordLength=function(e,t){if(!Object(o.default)(e))throw new s.default("angle is required.");if(!Object(o.default)(t))throw new s.default("radius is required.");return 2*t*Math.sin(.5*e)},l.logBase=function(e,t){if(!Object(o.default)(e))throw new s.default("number is required.");if(!Object(o.default)(t))throw new s.default("base is required.");return Math.log(e)/Math.log(t)},l.cbrt=Object(r.default)(Math.cbrt,(function(e){var t=Math.pow(Math.abs(e),1/3);return e<0?-t:t})),l.log2=Object(r.default)(Math.log2,(function(e){return Math.log(e)*Math.LOG2E})),l.fog=function(e,t){var i=e*t;return 1-Math.exp(-i*i)},l.fastApproximateAtan=function(e){return a.a.typeOf.number("x",e),e*(-.1784*Math.abs(e)-.0663*e*e+1.0301)},l.fastApproximateAtan2=function(e,t){var i,n;a.a.typeOf.number("x",e),a.a.typeOf.number("y",t);var r=Math.abs(e);i=Math.abs(t),n=Math.max(r,i);var o=(i=Math.min(r,i))/n;if(isNaN(o))throw new s.default("either x or y must be nonzero");return r=l.fastApproximateAtan(o),r=Math.abs(t)>Math.abs(e)?l.PI_OVER_TWO-r:r,r=e<0?l.PI-r:r,r=t<0?-r:r},t.default=l},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(16),r=i(4),o=i(2),s=i(0),l=i(5),u=i(12),d=i(23);function c(e,t,i,n,a,r,s,l,u,d,c,f,h,p,m,_){this[0]=Object(o.default)(e,0),this[1]=Object(o.default)(a,0),this[2]=Object(o.default)(u,0),this[3]=Object(o.default)(h,0),this[4]=Object(o.default)(t,0),this[5]=Object(o.default)(r,0),this[6]=Object(o.default)(d,0),this[7]=Object(o.default)(p,0),this[8]=Object(o.default)(i,0),this[9]=Object(o.default)(s,0),this[10]=Object(o.default)(c,0),this[11]=Object(o.default)(m,0),this[12]=Object(o.default)(n,0),this[13]=Object(o.default)(l,0),this[14]=Object(o.default)(f,0),this[15]=Object(o.default)(_,0)}c.packedLength=16,c.pack=function(e,t,i){return r.a.typeOf.object("value",e),r.a.defined("array",t),i=Object(o.default)(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t[i++]=e[4],t[i++]=e[5],t[i++]=e[6],t[i++]=e[7],t[i++]=e[8],t[i++]=e[9],t[i++]=e[10],t[i++]=e[11],t[i++]=e[12],t[i++]=e[13],t[i++]=e[14],t[i]=e[15],t},c.unpack=function(e,t,i){return r.a.defined("array",e),t=Object(o.default)(t,0),Object(s.default)(i)||(i=new c),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i[4]=e[t++],i[5]=e[t++],i[6]=e[t++],i[7]=e[t++],i[8]=e[t++],i[9]=e[t++],i[10]=e[t++],i[11]=e[t++],i[12]=e[t++],i[13]=e[t++],i[14]=e[t++],i[15]=e[t],i},c.clone=function(e,t){if(Object(s.default)(e))return Object(s.default)(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):new c(e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15])},c.fromArray=c.unpack,c.fromColumnMajorArray=function(e,t){return r.a.defined("values",e),c.clone(e,t)},c.fromRowMajorArray=function(e,t){return r.a.defined("values",e),Object(s.default)(t)?(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t):new c(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},c.fromRotationTranslation=function(e,t,i){return r.a.typeOf.object("rotation",e),t=Object(o.default)(t,n.default.ZERO),Object(s.default)(i)?(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=0,i[4]=e[3],i[5]=e[4],i[6]=e[5],i[7]=0,i[8]=e[6],i[9]=e[7],i[10]=e[8],i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,i):new c(e[0],e[3],e[6],t.x,e[1],e[4],e[7],t.y,e[2],e[5],e[8],t.z,0,0,0,1)},c.fromTranslationQuaternionRotationScale=function(e,t,i,n){r.a.typeOf.object("translation",e),r.a.typeOf.object("rotation",t),r.a.typeOf.object("scale",i),Object(s.default)(n)||(n=new c);var a=i.x,o=i.y,l=i.z,u=t.x*t.x,d=t.x*t.y,f=t.x*t.z,h=t.x*t.w,p=t.y*t.y,m=t.y*t.z,_=t.y*t.w,g=t.z*t.z,v=t.z*t.w,y=t.w*t.w,b=u-p-g+y,w=2*(d-v),O=2*(f+_),x=2*(d+v),A=-u+p-g+y,T=2*(m-h),E=2*(f-_),C=2*(m+h),S=-u-p+g+y;return n[0]=b*a,n[1]=x*a,n[2]=E*a,n[3]=0,n[4]=w*o,n[5]=A*o,n[6]=C*o,n[7]=0,n[8]=O*l,n[9]=T*l,n[10]=S*l,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,n},c.fromTranslationRotationScale=function(e,t){return r.a.typeOf.object("translationRotationScale",e),c.fromTranslationQuaternionRotationScale(e.translation,e.rotation,e.scale,t)},c.fromTranslation=function(e,t){return r.a.typeOf.object("translation",e),c.fromRotationTranslation(u.default.IDENTITY,e,t)},c.fromScale=function(e,t){return r.a.typeOf.object("scale",e),Object(s.default)(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e.y,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e.z,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c(e.x,0,0,0,0,e.y,0,0,0,0,e.z,0,0,0,0,1)},c.fromUniformScale=function(e,t){return r.a.typeOf.number("scale",e),Object(s.default)(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t):new c(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1)};var f=new n.default,h=new n.default,p=new n.default;c.fromCamera=function(e,t){r.a.typeOf.object("camera",e);var i=e.position,a=e.direction,o=e.up;r.a.typeOf.object("camera.position",i),r.a.typeOf.object("camera.direction",a),r.a.typeOf.object("camera.up",o),n.default.normalize(a,f),n.default.normalize(n.default.cross(f,o,h),h),n.default.normalize(n.default.cross(h,f,p),p);var l=h.x,u=h.y,d=h.z,m=f.x,_=f.y,g=f.z,v=p.x,y=p.y,b=p.z,w=i.x,O=i.y,x=i.z,A=l*-w+u*-O+d*-x,T=v*-w+y*-O+b*-x,E=m*w+_*O+g*x;return Object(s.default)(t)?(t[0]=l,t[1]=v,t[2]=-m,t[3]=0,t[4]=u,t[5]=y,t[6]=-_,t[7]=0,t[8]=d,t[9]=b,t[10]=-g,t[11]=0,t[12]=A,t[13]=T,t[14]=E,t[15]=1,t):new c(l,u,d,A,v,y,b,T,-m,-_,-g,E,0,0,0,1)},c.computePerspectiveFieldOfView=function(e,t,i,n,a){r.a.typeOf.number.greaterThan("fovY",e,0),r.a.typeOf.number.lessThan("fovY",e,Math.PI),r.a.typeOf.number.greaterThan("near",i,0),r.a.typeOf.number.greaterThan("far",n,0),r.a.typeOf.object("result",a);var o=1/Math.tan(.5*e),s=o/t,l=(n+i)/(i-n),u=2*n*i/(i-n);return a[0]=s,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=o,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=l,a[11]=-1,a[12]=0,a[13]=0,a[14]=u,a[15]=0,a},c.computeOrthographicOffCenter=function(e,t,i,n,a,o,s){r.a.typeOf.number("left",e),r.a.typeOf.number("right",t),r.a.typeOf.number("bottom",i),r.a.typeOf.number("top",n),r.a.typeOf.number("near",a),r.a.typeOf.number("far",o),r.a.typeOf.object("result",s);var l=1/(t-e),u=1/(n-i),d=1/(o-a),c=-(t+e)*l,f=-(n+i)*u,h=-(o+a)*d;return l*=2,u*=2,d*=-2,s[0]=l,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=d,s[11]=0,s[12]=c,s[13]=f,s[14]=h,s[15]=1,s},c.computePerspectiveOffCenter=function(e,t,i,n,a,o,s){r.a.typeOf.number("left",e),r.a.typeOf.number("right",t),r.a.typeOf.number("bottom",i),r.a.typeOf.number("top",n),r.a.typeOf.number("near",a),r.a.typeOf.number("far",o),r.a.typeOf.object("result",s);var l=2*a/(t-e),u=2*a/(n-i),d=(t+e)/(t-e),c=(n+i)/(n-i),f=-(o+a)/(o-a),h=-2*o*a/(o-a);return s[0]=l,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=u,s[6]=0,s[7]=0,s[8]=d,s[9]=c,s[10]=f,s[11]=-1,s[12]=0,s[13]=0,s[14]=h,s[15]=0,s},c.computeInfinitePerspectiveOffCenter=function(e,t,i,n,a,o){r.a.typeOf.number("left",e),r.a.typeOf.number("right",t),r.a.typeOf.number("bottom",i),r.a.typeOf.number("top",n),r.a.typeOf.number("near",a),r.a.typeOf.object("result",o);var s=2*a/(t-e),l=2*a/(n-i),u=(t+e)/(t-e),d=(n+i)/(n-i),c=-2*a;return o[0]=s,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=l,o[6]=0,o[7]=0,o[8]=u,o[9]=d,o[10]=-1,o[11]=-1,o[12]=0,o[13]=0,o[14]=c,o[15]=0,o},c.computeViewportTransformation=function(e,t,i,n){Object(s.default)(n)||(n=new c),e=Object(o.default)(e,o.default.EMPTY_OBJECT);var a=Object(o.default)(e.x,0),r=Object(o.default)(e.y,0),l=Object(o.default)(e.width,0),u=Object(o.default)(e.height,0);t=Object(o.default)(t,0);var d=.5*l,f=.5*u,h=.5*((i=Object(o.default)(i,1))-t),p=d,m=f,_=h,g=a+d,v=r+f,y=t+h;return n[0]=p,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=m,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=_,n[11]=0,n[12]=g,n[13]=v,n[14]=y,n[15]=1,n},c.computeView=function(e,t,i,a,o){return r.a.typeOf.object("position",e),r.a.typeOf.object("direction",t),r.a.typeOf.object("up",i),r.a.typeOf.object("right",a),r.a.typeOf.object("result",o),o[0]=a.x,o[1]=i.x,o[2]=-t.x,o[3]=0,o[4]=a.y,o[5]=i.y,o[6]=-t.y,o[7]=0,o[8]=a.z,o[9]=i.z,o[10]=-t.z,o[11]=0,o[12]=-n.default.dot(a,e),o[13]=-n.default.dot(i,e),o[14]=n.default.dot(t,e),o[15]=1,o},c.toArray=function(e,t){return r.a.typeOf.object("matrix",e),Object(s.default)(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t):[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]},c.getElementIndex=function(e,t){return r.a.typeOf.number.greaterThanOrEquals("row",t,0),r.a.typeOf.number.lessThanOrEquals("row",t,3),r.a.typeOf.number.greaterThanOrEquals("column",e,0),r.a.typeOf.number.lessThanOrEquals("column",e,3),4*e+t},c.getColumn=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.number.greaterThanOrEquals("index",t,0),r.a.typeOf.number.lessThanOrEquals("index",t,3),r.a.typeOf.object("result",i);var n=4*t,a=e[n],o=e[n+1],s=e[n+2],l=e[n+3];return i.x=a,i.y=o,i.z=s,i.w=l,i},c.setColumn=function(e,t,i,n){r.a.typeOf.object("matrix",e),r.a.typeOf.number.greaterThanOrEquals("index",t,0),r.a.typeOf.number.lessThanOrEquals("index",t,3),r.a.typeOf.object("cartesian",i),r.a.typeOf.object("result",n);var a=4*t;return(n=c.clone(e,n))[a]=i.x,n[a+1]=i.y,n[a+2]=i.z,n[a+3]=i.w,n},c.setTranslation=function(e,t,i){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("translation",t),r.a.typeOf.object("result",i),i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=e[15],i};var m=new n.default;c.setScale=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("scale",t),r.a.typeOf.object("result",i);var a=c.getScale(e,m),o=n.default.divideComponents(t,a,m);return c.multiplyByScale(e,o,i)},c.getRow=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.number.greaterThanOrEquals("index",t,0),r.a.typeOf.number.lessThanOrEquals("index",t,3),r.a.typeOf.object("result",i);var n=e[t],a=e[t+4],o=e[t+8],s=e[t+12];return i.x=n,i.y=a,i.z=o,i.w=s,i},c.setRow=function(e,t,i,n){return r.a.typeOf.object("matrix",e),r.a.typeOf.number.greaterThanOrEquals("index",t,0),r.a.typeOf.number.lessThanOrEquals("index",t,3),r.a.typeOf.object("cartesian",i),r.a.typeOf.object("result",n),(n=c.clone(e,n))[t]=i.x,n[t+4]=i.y,n[t+8]=i.z,n[t+12]=i.w,n};var _=new n.default;c.getScale=function(e,t){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t),t.x=n.default.magnitude(n.default.fromElements(e[0],e[1],e[2],_)),t.y=n.default.magnitude(n.default.fromElements(e[4],e[5],e[6],_)),t.z=n.default.magnitude(n.default.fromElements(e[8],e[9],e[10],_)),t};var g=new n.default;c.getMaximumScale=function(e){return c.getScale(e,g),n.default.maximumComponent(g)},c.multiply=function(e,t,i){r.a.typeOf.object("left",e),r.a.typeOf.object("right",t),r.a.typeOf.object("result",i);var n=e[0],a=e[1],o=e[2],s=e[3],l=e[4],u=e[5],d=e[6],c=e[7],f=e[8],h=e[9],p=e[10],m=e[11],_=e[12],g=e[13],v=e[14],y=e[15],b=t[0],w=t[1],O=t[2],x=t[3],A=t[4],T=t[5],E=t[6],C=t[7],S=t[8],M=t[9],D=t[10],P=t[11],I=t[12],L=t[13],j=t[14],R=t[15],N=n*b+l*w+f*O+_*x,B=a*b+u*w+h*O+g*x,F=o*b+d*w+p*O+v*x,k=s*b+c*w+m*O+y*x,z=n*A+l*T+f*E+_*C,U=a*A+u*T+h*E+g*C,V=o*A+d*T+p*E+v*C,H=s*A+c*T+m*E+y*C,G=n*S+l*M+f*D+_*P,Y=a*S+u*M+h*D+g*P,W=o*S+d*M+p*D+v*P,q=s*S+c*M+m*D+y*P,X=n*I+l*L+f*j+_*R,K=a*I+u*L+h*j+g*R,J=o*I+d*L+p*j+v*R,Z=s*I+c*L+m*j+y*R;return i[0]=N,i[1]=B,i[2]=F,i[3]=k,i[4]=z,i[5]=U,i[6]=V,i[7]=H,i[8]=G,i[9]=Y,i[10]=W,i[11]=q,i[12]=X,i[13]=K,i[14]=J,i[15]=Z,i},c.add=function(e,t,i){return r.a.typeOf.object("left",e),r.a.typeOf.object("right",t),r.a.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i[4]=e[4]+t[4],i[5]=e[5]+t[5],i[6]=e[6]+t[6],i[7]=e[7]+t[7],i[8]=e[8]+t[8],i[9]=e[9]+t[9],i[10]=e[10]+t[10],i[11]=e[11]+t[11],i[12]=e[12]+t[12],i[13]=e[13]+t[13],i[14]=e[14]+t[14],i[15]=e[15]+t[15],i},c.subtract=function(e,t,i){return r.a.typeOf.object("left",e),r.a.typeOf.object("right",t),r.a.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i[4]=e[4]-t[4],i[5]=e[5]-t[5],i[6]=e[6]-t[6],i[7]=e[7]-t[7],i[8]=e[8]-t[8],i[9]=e[9]-t[9],i[10]=e[10]-t[10],i[11]=e[11]-t[11],i[12]=e[12]-t[12],i[13]=e[13]-t[13],i[14]=e[14]-t[14],i[15]=e[15]-t[15],i},c.multiplyTransformation=function(e,t,i){r.a.typeOf.object("left",e),r.a.typeOf.object("right",t),r.a.typeOf.object("result",i);var n=e[0],a=e[1],o=e[2],s=e[4],l=e[5],u=e[6],d=e[8],c=e[9],f=e[10],h=e[12],p=e[13],m=e[14],_=t[0],g=t[1],v=t[2],y=t[4],b=t[5],w=t[6],O=t[8],x=t[9],A=t[10],T=t[12],E=t[13],C=t[14],S=n*_+s*g+d*v,M=a*_+l*g+c*v,D=o*_+u*g+f*v,P=n*y+s*b+d*w,I=a*y+l*b+c*w,L=o*y+u*b+f*w,j=n*O+s*x+d*A,R=a*O+l*x+c*A,N=o*O+u*x+f*A,B=n*T+s*E+d*C+h,F=a*T+l*E+c*C+p,k=o*T+u*E+f*C+m;return i[0]=S,i[1]=M,i[2]=D,i[3]=0,i[4]=P,i[5]=I,i[6]=L,i[7]=0,i[8]=j,i[9]=R,i[10]=N,i[11]=0,i[12]=B,i[13]=F,i[14]=k,i[15]=1,i},c.multiplyByMatrix3=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("rotation",t),r.a.typeOf.object("result",i);var n=e[0],a=e[1],o=e[2],s=e[4],l=e[5],u=e[6],d=e[8],c=e[9],f=e[10],h=t[0],p=t[1],m=t[2],_=t[3],g=t[4],v=t[5],y=t[6],b=t[7],w=t[8],O=n*h+s*p+d*m,x=a*h+l*p+c*m,A=o*h+u*p+f*m,T=n*_+s*g+d*v,E=a*_+l*g+c*v,C=o*_+u*g+f*v,S=n*y+s*b+d*w,M=a*y+l*b+c*w,D=o*y+u*b+f*w;return i[0]=O,i[1]=x,i[2]=A,i[3]=0,i[4]=T,i[5]=E,i[6]=C,i[7]=0,i[8]=S,i[9]=M,i[10]=D,i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},c.multiplyByTranslation=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("translation",t),r.a.typeOf.object("result",i);var n=t.x,a=t.y,o=t.z,s=n*e[0]+a*e[4]+o*e[8]+e[12],l=n*e[1]+a*e[5]+o*e[9]+e[13],u=n*e[2]+a*e[6]+o*e[10]+e[14];return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=s,i[13]=l,i[14]=u,i[15]=e[15],i};var v=new n.default;c.multiplyByUniformScale=function(e,t,i){return r.a.typeOf.object("matrix",e),r.a.typeOf.number("scale",t),r.a.typeOf.object("result",i),v.x=t,v.y=t,v.z=t,c.multiplyByScale(e,v,i)},c.multiplyByScale=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("scale",t),r.a.typeOf.object("result",i);var n=t.x,a=t.y,o=t.z;return 1===n&&1===a&&1===o?c.clone(e,i):(i[0]=n*e[0],i[1]=n*e[1],i[2]=n*e[2],i[3]=0,i[4]=a*e[4],i[5]=a*e[5],i[6]=a*e[6],i[7]=0,i[8]=o*e[8],i[9]=o*e[9],i[10]=o*e[10],i[11]=0,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=1,i)},c.multiplyByVector=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("cartesian",t),r.a.typeOf.object("result",i);var n=t.x,a=t.y,o=t.z,s=t.w,l=e[0]*n+e[4]*a+e[8]*o+e[12]*s,u=e[1]*n+e[5]*a+e[9]*o+e[13]*s,d=e[2]*n+e[6]*a+e[10]*o+e[14]*s,c=e[3]*n+e[7]*a+e[11]*o+e[15]*s;return i.x=l,i.y=u,i.z=d,i.w=c,i},c.multiplyByPointAsVector=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("cartesian",t),r.a.typeOf.object("result",i);var n=t.x,a=t.y,o=t.z,s=e[0]*n+e[4]*a+e[8]*o,l=e[1]*n+e[5]*a+e[9]*o,u=e[2]*n+e[6]*a+e[10]*o;return i.x=s,i.y=l,i.z=u,i},c.multiplyByPoint=function(e,t,i){r.a.typeOf.object("matrix",e),r.a.typeOf.object("cartesian",t),r.a.typeOf.object("result",i);var n=t.x,a=t.y,o=t.z,s=e[0]*n+e[4]*a+e[8]*o+e[12],l=e[1]*n+e[5]*a+e[9]*o+e[13],u=e[2]*n+e[6]*a+e[10]*o+e[14];return i.x=s,i.y=l,i.z=u,i},c.multiplyByScalar=function(e,t,i){return r.a.typeOf.object("matrix",e),r.a.typeOf.number("scalar",t),r.a.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i[4]=e[4]*t,i[5]=e[5]*t,i[6]=e[6]*t,i[7]=e[7]*t,i[8]=e[8]*t,i[9]=e[9]*t,i[10]=e[10]*t,i[11]=e[11]*t,i[12]=e[12]*t,i[13]=e[13]*t,i[14]=e[14]*t,i[15]=e[15]*t,i},c.negate=function(e,t){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},c.transpose=function(e,t){r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t);var i=e[1],n=e[2],a=e[3],o=e[6],s=e[7],l=e[11];return t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=i,t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[10]=e[10],t[11]=e[14],t[12]=a,t[13]=s,t[14]=l,t[15]=e[15],t},c.abs=function(e,t){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t[9]=Math.abs(e[9]),t[10]=Math.abs(e[10]),t[11]=Math.abs(e[11]),t[12]=Math.abs(e[12]),t[13]=Math.abs(e[13]),t[14]=Math.abs(e[14]),t[15]=Math.abs(e[15]),t},c.equals=function(e,t){return e===t||Object(s.default)(e)&&Object(s.default)(t)&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[3]===t[3]&&e[7]===t[7]&&e[11]===t[11]&&e[15]===t[15]},c.equalsEpsilon=function(e,t,i){return i=Object(o.default)(i,0),e===t||Object(s.default)(e)&&Object(s.default)(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i&&Math.abs(e[9]-t[9])<=i&&Math.abs(e[10]-t[10])<=i&&Math.abs(e[11]-t[11])<=i&&Math.abs(e[12]-t[12])<=i&&Math.abs(e[13]-t[13])<=i&&Math.abs(e[14]-t[14])<=i&&Math.abs(e[15]-t[15])<=i},c.getTranslation=function(e,t){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t),t.x=e[12],t.y=e[13],t.z=e[14],t},c.getMatrix3=function(e,t){return r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t),t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t};var y=new u.default,b=new u.default,w=new a.a,O=new a.a(0,0,0,1);c.inverse=function(e,t){r.a.typeOf.object("matrix",e),r.a.typeOf.object("result",t);var i=e[0],n=e[4],o=e[8],s=e[12],f=e[1],h=e[5],p=e[9],m=e[13],_=e[2],g=e[6],v=e[10],x=e[14],A=e[3],T=e[7],E=e[11],C=e[15],S=v*C,M=x*E,D=g*C,P=x*T,I=g*E,L=v*T,j=_*C,R=x*A,N=_*E,B=v*A,F=_*T,k=g*A,z=S*h+P*p+I*m-(M*h+D*p+L*m),U=M*f+j*p+B*m-(S*f+R*p+N*m),V=D*f+R*h+F*m-(P*f+j*h+k*m),H=L*f+N*h+k*p-(I*f+B*h+F*p),G=M*n+D*o+L*s-(S*n+P*o+I*s),Y=S*i+R*o+N*s-(M*i+j*o+B*s),W=P*i+j*n+k*s-(D*i+R*n+F*s),q=I*i+B*n+F*o-(L*i+N*n+k*o),X=(S=o*m)*T+(P=s*h)*E+(I=n*p)*C-((M=s*p)*T+(D=n*m)*E+(L=o*h)*C),K=M*A+(j=i*m)*E+(B=o*f)*C-(S*A+(R=s*f)*E+(N=i*p)*C),J=D*A+R*T+(F=i*h)*C-(P*A+j*T+(k=n*f)*C),Z=L*A+N*T+k*E-(I*A+B*T+F*E),Q=D*v+L*x+M*g-(I*x+S*g+P*v),$=N*x+S*_+R*v-(j*v+B*x+M*_),ee=j*g+k*x+P*_-(F*x+D*_+R*g),te=F*v+I*_+B*g-(N*g+k*v+L*_),ie=i*z+n*U+o*V+s*H;if(Math.abs(ie)1&&(i-=1),6*i<1?e+6*(t-e)*i:2*i<1?t:3*i<2?e+(t-e)*(2/3-i)*6:e}function f(e,t,i,n){this.red=Object(s.default)(e,1),this.green=Object(s.default)(t,1),this.blue=Object(s.default)(i,1),this.alpha=Object(s.default)(n,1)}f.fromCartesian4=function(e,t){return o.a.typeOf.object("cartesian",e),Object(l.default)(t)?(t.red=e.x,t.green=e.y,t.blue=e.z,t.alpha=e.w,t):new f(e.x,e.y,e.z,e.w)},f.fromBytes=function(e,t,i,n,a){return e=f.byteToFloat(Object(s.default)(e,255)),t=f.byteToFloat(Object(s.default)(t,255)),i=f.byteToFloat(Object(s.default)(i,255)),n=f.byteToFloat(Object(s.default)(n,255)),Object(l.default)(a)?(a.red=e,a.green=t,a.blue=i,a.alpha=n,a):new f(e,t,i,n)},f.fromAlpha=function(e,t,i){return o.a.typeOf.object("color",e),o.a.typeOf.number("alpha",t),Object(l.default)(i)?(i.red=e.red,i.green=e.green,i.blue=e.blue,i.alpha=t,i):new f(e.red,e.green,e.blue,t)},u.a.supportsTypedArrays()&&(n=new ArrayBuffer(4),a=new Uint32Array(n),r=new Uint8Array(n)),f.fromRgba=function(e,t){return a[0]=e,f.fromBytes(r[0],r[1],r[2],r[3],t)},f.fromHsl=function(e,t,i,n,a){e=Object(s.default)(e,0)%1,t=Object(s.default)(t,0),i=Object(s.default)(i,0),n=Object(s.default)(n,1);var r=i,o=i,u=i;if(0!==t){var d,h=2*i-(d=i<.5?i*(1+t):i+t-i*t);r=c(h,d,e+1/3),o=c(h,d,e),u=c(h,d,e-1/3)}return Object(l.default)(a)?(a.red=r,a.green=o,a.blue=u,a.alpha=n,a):new f(r,o,u,n)},f.fromRandom=function(e,t){var i=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).red;if(!Object(l.default)(i)){var n=Object(s.default)(e.minimumRed,0),a=Object(s.default)(e.maximumRed,1);o.a.typeOf.number.lessThanOrEquals("minimumRed",n,a),i=n+d.default.nextRandomNumber()*(a-n)}var r=e.green;if(!Object(l.default)(r)){var u=Object(s.default)(e.minimumGreen,0),c=Object(s.default)(e.maximumGreen,1);o.a.typeOf.number.lessThanOrEquals("minimumGreen",u,c),r=u+d.default.nextRandomNumber()*(c-u)}var h=e.blue;if(!Object(l.default)(h)){var p=Object(s.default)(e.minimumBlue,0),m=Object(s.default)(e.maximumBlue,1);o.a.typeOf.number.lessThanOrEquals("minimumBlue",p,m),h=p+d.default.nextRandomNumber()*(m-p)}var _=e.alpha;if(!Object(l.default)(_)){var g=Object(s.default)(e.minimumAlpha,0),v=Object(s.default)(e.maximumAlpha,1);o.a.typeOf.number.lessThanOrEquals("minumumAlpha",g,v),_=g+d.default.nextRandomNumber()*(v-g)}return Object(l.default)(t)?(t.red=i,t.green=r,t.blue=h,t.alpha=_,t):new f(i,r,h,_)};var h=/^#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,p=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i,m=/^rgba?\(\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)\s*,\s*([0-9.]+%?)(?:\s*,\s*([0-9.]+))?\s*\)$/i,_=/^hsla?\(\s*([0-9.]+)\s*,\s*([0-9.]+%)\s*,\s*([0-9.]+%)(?:\s*,\s*([0-9.]+))?\s*\)$/i;f.fromCssColorString=function(e,t){o.a.typeOf.string("color",e),Object(l.default)(t)||(t=new f);var i=f[(e=e.replace(/\s/g,"")).toUpperCase()];if(Object(l.default)(i))return f.clone(i,t),t;var n=h.exec(e);return null!==n?(t.red=parseInt(n[1],16)/15,t.green=parseInt(n[2],16)/15,t.blue=parseInt(n[3],16)/15,t.alpha=parseInt(Object(s.default)(n[4],"f"),16)/15,t):null!==(n=p.exec(e))?(t.red=parseInt(n[1],16)/255,t.green=parseInt(n[2],16)/255,t.blue=parseInt(n[3],16)/255,t.alpha=parseInt(Object(s.default)(n[4],"ff"),16)/255,t):null!==(n=m.exec(e))?(t.red=parseFloat(n[1])/("%"===n[1].substr(-1)?100:255),t.green=parseFloat(n[2])/("%"===n[2].substr(-1)?100:255),t.blue=parseFloat(n[3])/("%"===n[3].substr(-1)?100:255),t.alpha=parseFloat(Object(s.default)(n[4],"1.0")),t):null!==(n=_.exec(e))?f.fromHsl(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(Object(s.default)(n[4],"1.0")),t):t=void 0},f.packedLength=4,f.pack=function(e,t,i){return o.a.typeOf.object("value",e),o.a.defined("array",t),i=Object(s.default)(i,0),t[i++]=e.red,t[i++]=e.green,t[i++]=e.blue,t[i]=e.alpha,t},f.unpack=function(e,t,i){return o.a.defined("array",e),t=Object(s.default)(t,0),Object(l.default)(i)||(i=new f),i.red=e[t++],i.green=e[t++],i.blue=e[t++],i.alpha=e[t],i},f.byteToFloat=function(e){return e/255},f.floatToByte=function(e){return 1===e?255:256*e|0},f.clone=function(e,t){if(Object(l.default)(e))return Object(l.default)(t)?(t.red=e.red,t.green=e.green,t.blue=e.blue,t.alpha=e.alpha,t):new f(e.red,e.green,e.blue,e.alpha)},f.equals=function(e,t){return e===t||Object(l.default)(e)&&Object(l.default)(t)&&e.red===t.red&&e.green===t.green&&e.blue===t.blue&&e.alpha===t.alpha},f.equalsArray=function(e,t,i){return e.red===t[i]&&e.green===t[i+1]&&e.blue===t[i+2]&&e.alpha===t[i+3]},f.prototype.clone=function(e){return f.clone(this,e)},f.prototype.equals=function(e){return f.equals(this,e)},f.prototype.equalsEpsilon=function(e,t){return this===e||Object(l.default)(e)&&Math.abs(this.red-e.red)<=t&&Math.abs(this.green-e.green)<=t&&Math.abs(this.blue-e.blue)<=t&&Math.abs(this.alpha-e.alpha)<=t},f.prototype.toString=function(){return"("+this.red+", "+this.green+", "+this.blue+", "+this.alpha+")"},f.prototype.toCssColorString=function(){var e=f.floatToByte(this.red),t=f.floatToByte(this.green),i=f.floatToByte(this.blue);return 1===this.alpha?"rgb("+e+","+t+","+i+")":"rgba("+e+","+t+","+i+","+this.alpha+")"},f.prototype.toCssHexString=function(){var e=f.floatToByte(this.red).toString(16);e.length<2&&(e="0"+e);var t=f.floatToByte(this.green).toString(16);t.length<2&&(t="0"+t);var i=f.floatToByte(this.blue).toString(16);if(i.length<2&&(i="0"+i),this.alpha<1){var n=f.floatToByte(this.alpha).toString(16);return n.length<2&&(n="0"+n),"#"+e+t+i+n}return"#"+e+t+i},f.prototype.toBytes=function(e){var t=f.floatToByte(this.red),i=f.floatToByte(this.green),n=f.floatToByte(this.blue),a=f.floatToByte(this.alpha);return Object(l.default)(e)?(e[0]=t,e[1]=i,e[2]=n,e[3]=a,e):[t,i,n,a]},f.prototype.toRgba=function(){return r[0]=f.floatToByte(this.red),r[1]=f.floatToByte(this.green),r[2]=f.floatToByte(this.blue),r[3]=f.floatToByte(this.alpha),a[0]},f.prototype.brighten=function(e,t){return o.a.typeOf.number("magnitude",e),o.a.typeOf.number.greaterThanOrEquals("magnitude",e,0),o.a.typeOf.object("result",t),e=1-e,t.red=1-(1-this.red)*e,t.green=1-(1-this.green)*e,t.blue=1-(1-this.blue)*e,t.alpha=this.alpha,t},f.prototype.darken=function(e,t){return o.a.typeOf.number("magnitude",e),o.a.typeOf.number.greaterThanOrEquals("magnitude",e,0),o.a.typeOf.object("result",t),e=1-e,t.red=this.red*e,t.green=this.green*e,t.blue=this.blue*e,t.alpha=this.alpha,t},f.prototype.withAlpha=function(e,t){return f.fromAlpha(this,e,t)},f.add=function(e,t,i){return o.a.typeOf.object("left",e),o.a.typeOf.object("right",t),o.a.typeOf.object("result",i),i.red=e.red+t.red,i.green=e.green+t.green,i.blue=e.blue+t.blue,i.alpha=e.alpha+t.alpha,i},f.subtract=function(e,t,i){return o.a.typeOf.object("left",e),o.a.typeOf.object("right",t),o.a.typeOf.object("result",i),i.red=e.red-t.red,i.green=e.green-t.green,i.blue=e.blue-t.blue,i.alpha=e.alpha-t.alpha,i},f.multiply=function(e,t,i){return o.a.typeOf.object("left",e),o.a.typeOf.object("right",t),o.a.typeOf.object("result",i),i.red=e.red*t.red,i.green=e.green*t.green,i.blue=e.blue*t.blue,i.alpha=e.alpha*t.alpha,i},f.divide=function(e,t,i){return o.a.typeOf.object("left",e),o.a.typeOf.object("right",t),o.a.typeOf.object("result",i),i.red=e.red/t.red,i.green=e.green/t.green,i.blue=e.blue/t.blue,i.alpha=e.alpha/t.alpha,i},f.mod=function(e,t,i){return o.a.typeOf.object("left",e),o.a.typeOf.object("right",t),o.a.typeOf.object("result",i),i.red=e.red%t.red,i.green=e.green%t.green,i.blue=e.blue%t.blue,i.alpha=e.alpha%t.alpha,i},f.lerp=function(e,t,i,n){return o.a.typeOf.object("start",e),o.a.typeOf.object("end",t),o.a.typeOf.number("t",i),o.a.typeOf.object("result",n),n.red=d.default.lerp(e.red,t.red,i),n.green=d.default.lerp(e.green,t.green,i),n.blue=d.default.lerp(e.blue,t.blue,i),n.alpha=d.default.lerp(e.alpha,t.alpha,i),n},f.multiplyByScalar=function(e,t,i){return o.a.typeOf.object("color",e),o.a.typeOf.number("scalar",t),o.a.typeOf.object("result",i),i.red=e.red*t,i.green=e.green*t,i.blue=e.blue*t,i.alpha=e.alpha*t,i},f.divideByScalar=function(e,t,i){return o.a.typeOf.object("color",e),o.a.typeOf.number("scalar",t),o.a.typeOf.object("result",i),i.red=e.red/t,i.green=e.green/t,i.blue=e.blue/t,i.alpha=e.alpha/t,i},f.ALICEBLUE=Object.freeze(f.fromCssColorString("#F0F8FF")),f.ANTIQUEWHITE=Object.freeze(f.fromCssColorString("#FAEBD7")),f.AQUA=Object.freeze(f.fromCssColorString("#00FFFF")),f.AQUAMARINE=Object.freeze(f.fromCssColorString("#7FFFD4")),f.AZURE=Object.freeze(f.fromCssColorString("#F0FFFF")),f.BEIGE=Object.freeze(f.fromCssColorString("#F5F5DC")),f.BISQUE=Object.freeze(f.fromCssColorString("#FFE4C4")),f.BLACK=Object.freeze(f.fromCssColorString("#000000")),f.BLANCHEDALMOND=Object.freeze(f.fromCssColorString("#FFEBCD")),f.BLUE=Object.freeze(f.fromCssColorString("#0000FF")),f.BLUEVIOLET=Object.freeze(f.fromCssColorString("#8A2BE2")),f.BROWN=Object.freeze(f.fromCssColorString("#A52A2A")),f.BURLYWOOD=Object.freeze(f.fromCssColorString("#DEB887")),f.CADETBLUE=Object.freeze(f.fromCssColorString("#5F9EA0")),f.CHARTREUSE=Object.freeze(f.fromCssColorString("#7FFF00")),f.CHOCOLATE=Object.freeze(f.fromCssColorString("#D2691E")),f.CORAL=Object.freeze(f.fromCssColorString("#FF7F50")),f.CORNFLOWERBLUE=Object.freeze(f.fromCssColorString("#6495ED")),f.CORNSILK=Object.freeze(f.fromCssColorString("#FFF8DC")),f.CRIMSON=Object.freeze(f.fromCssColorString("#DC143C")),f.CYAN=Object.freeze(f.fromCssColorString("#00FFFF")),f.DARKBLUE=Object.freeze(f.fromCssColorString("#00008B")),f.DARKCYAN=Object.freeze(f.fromCssColorString("#008B8B")),f.DARKGOLDENROD=Object.freeze(f.fromCssColorString("#B8860B")),f.DARKGRAY=Object.freeze(f.fromCssColorString("#A9A9A9")),f.DARKGREEN=Object.freeze(f.fromCssColorString("#006400")),f.DARKGREY=f.DARKGRAY,f.DARKKHAKI=Object.freeze(f.fromCssColorString("#BDB76B")),f.DARKMAGENTA=Object.freeze(f.fromCssColorString("#8B008B")),f.DARKOLIVEGREEN=Object.freeze(f.fromCssColorString("#556B2F")),f.DARKORANGE=Object.freeze(f.fromCssColorString("#FF8C00")),f.DARKORCHID=Object.freeze(f.fromCssColorString("#9932CC")),f.DARKRED=Object.freeze(f.fromCssColorString("#8B0000")),f.DARKSALMON=Object.freeze(f.fromCssColorString("#E9967A")),f.DARKSEAGREEN=Object.freeze(f.fromCssColorString("#8FBC8F")),f.DARKSLATEBLUE=Object.freeze(f.fromCssColorString("#483D8B")),f.DARKSLATEGRAY=Object.freeze(f.fromCssColorString("#2F4F4F")),f.DARKSLATEGREY=f.DARKSLATEGRAY,f.DARKTURQUOISE=Object.freeze(f.fromCssColorString("#00CED1")),f.DARKVIOLET=Object.freeze(f.fromCssColorString("#9400D3")),f.DEEPPINK=Object.freeze(f.fromCssColorString("#FF1493")),f.DEEPSKYBLUE=Object.freeze(f.fromCssColorString("#00BFFF")),f.DIMGRAY=Object.freeze(f.fromCssColorString("#696969")),f.DIMGREY=f.DIMGRAY,f.DODGERBLUE=Object.freeze(f.fromCssColorString("#1E90FF")),f.FIREBRICK=Object.freeze(f.fromCssColorString("#B22222")),f.FLORALWHITE=Object.freeze(f.fromCssColorString("#FFFAF0")),f.FORESTGREEN=Object.freeze(f.fromCssColorString("#228B22")),f.FUCHSIA=Object.freeze(f.fromCssColorString("#FF00FF")),f.GAINSBORO=Object.freeze(f.fromCssColorString("#DCDCDC")),f.GHOSTWHITE=Object.freeze(f.fromCssColorString("#F8F8FF")),f.GOLD=Object.freeze(f.fromCssColorString("#FFD700")),f.GOLDENROD=Object.freeze(f.fromCssColorString("#DAA520")),f.GRAY=Object.freeze(f.fromCssColorString("#808080")),f.GREEN=Object.freeze(f.fromCssColorString("#008000")),f.GREENYELLOW=Object.freeze(f.fromCssColorString("#ADFF2F")),f.GREY=f.GRAY,f.HONEYDEW=Object.freeze(f.fromCssColorString("#F0FFF0")),f.HOTPINK=Object.freeze(f.fromCssColorString("#FF69B4")),f.INDIANRED=Object.freeze(f.fromCssColorString("#CD5C5C")),f.INDIGO=Object.freeze(f.fromCssColorString("#4B0082")),f.IVORY=Object.freeze(f.fromCssColorString("#FFFFF0")),f.KHAKI=Object.freeze(f.fromCssColorString("#F0E68C")),f.LAVENDER=Object.freeze(f.fromCssColorString("#E6E6FA")),f.LAVENDAR_BLUSH=Object.freeze(f.fromCssColorString("#FFF0F5")),f.LAWNGREEN=Object.freeze(f.fromCssColorString("#7CFC00")),f.LEMONCHIFFON=Object.freeze(f.fromCssColorString("#FFFACD")),f.LIGHTBLUE=Object.freeze(f.fromCssColorString("#ADD8E6")),f.LIGHTCORAL=Object.freeze(f.fromCssColorString("#F08080")),f.LIGHTCYAN=Object.freeze(f.fromCssColorString("#E0FFFF")),f.LIGHTGOLDENRODYELLOW=Object.freeze(f.fromCssColorString("#FAFAD2")),f.LIGHTGRAY=Object.freeze(f.fromCssColorString("#D3D3D3")),f.LIGHTGREEN=Object.freeze(f.fromCssColorString("#90EE90")),f.LIGHTGREY=f.LIGHTGRAY,f.LIGHTPINK=Object.freeze(f.fromCssColorString("#FFB6C1")),f.LIGHTSEAGREEN=Object.freeze(f.fromCssColorString("#20B2AA")),f.LIGHTSKYBLUE=Object.freeze(f.fromCssColorString("#87CEFA")),f.LIGHTSLATEGRAY=Object.freeze(f.fromCssColorString("#778899")),f.LIGHTSLATEGREY=f.LIGHTSLATEGRAY,f.LIGHTSTEELBLUE=Object.freeze(f.fromCssColorString("#B0C4DE")),f.LIGHTYELLOW=Object.freeze(f.fromCssColorString("#FFFFE0")),f.LIME=Object.freeze(f.fromCssColorString("#00FF00")),f.LIMEGREEN=Object.freeze(f.fromCssColorString("#32CD32")),f.LINEN=Object.freeze(f.fromCssColorString("#FAF0E6")),f.MAGENTA=Object.freeze(f.fromCssColorString("#FF00FF")),f.MAROON=Object.freeze(f.fromCssColorString("#800000")),f.MEDIUMAQUAMARINE=Object.freeze(f.fromCssColorString("#66CDAA")),f.MEDIUMBLUE=Object.freeze(f.fromCssColorString("#0000CD")),f.MEDIUMORCHID=Object.freeze(f.fromCssColorString("#BA55D3")),f.MEDIUMPURPLE=Object.freeze(f.fromCssColorString("#9370DB")),f.MEDIUMSEAGREEN=Object.freeze(f.fromCssColorString("#3CB371")),f.MEDIUMSLATEBLUE=Object.freeze(f.fromCssColorString("#7B68EE")),f.MEDIUMSPRINGGREEN=Object.freeze(f.fromCssColorString("#00FA9A")),f.MEDIUMTURQUOISE=Object.freeze(f.fromCssColorString("#48D1CC")),f.MEDIUMVIOLETRED=Object.freeze(f.fromCssColorString("#C71585")),f.MIDNIGHTBLUE=Object.freeze(f.fromCssColorString("#191970")),f.MINTCREAM=Object.freeze(f.fromCssColorString("#F5FFFA")),f.MISTYROSE=Object.freeze(f.fromCssColorString("#FFE4E1")),f.MOCCASIN=Object.freeze(f.fromCssColorString("#FFE4B5")),f.NAVAJOWHITE=Object.freeze(f.fromCssColorString("#FFDEAD")),f.NAVY=Object.freeze(f.fromCssColorString("#000080")),f.OLDLACE=Object.freeze(f.fromCssColorString("#FDF5E6")),f.OLIVE=Object.freeze(f.fromCssColorString("#808000")),f.OLIVEDRAB=Object.freeze(f.fromCssColorString("#6B8E23")),f.ORANGE=Object.freeze(f.fromCssColorString("#FFA500")),f.ORANGERED=Object.freeze(f.fromCssColorString("#FF4500")),f.ORCHID=Object.freeze(f.fromCssColorString("#DA70D6")),f.PALEGOLDENROD=Object.freeze(f.fromCssColorString("#EEE8AA")),f.PALEGREEN=Object.freeze(f.fromCssColorString("#98FB98")),f.PALETURQUOISE=Object.freeze(f.fromCssColorString("#AFEEEE")),f.PALEVIOLETRED=Object.freeze(f.fromCssColorString("#DB7093")),f.PAPAYAWHIP=Object.freeze(f.fromCssColorString("#FFEFD5")),f.PEACHPUFF=Object.freeze(f.fromCssColorString("#FFDAB9")),f.PERU=Object.freeze(f.fromCssColorString("#CD853F")),f.PINK=Object.freeze(f.fromCssColorString("#FFC0CB")),f.PLUM=Object.freeze(f.fromCssColorString("#DDA0DD")),f.POWDERBLUE=Object.freeze(f.fromCssColorString("#B0E0E6")),f.PURPLE=Object.freeze(f.fromCssColorString("#800080")),f.RED=Object.freeze(f.fromCssColorString("#FF0000")),f.ROSYBROWN=Object.freeze(f.fromCssColorString("#BC8F8F")),f.ROYALBLUE=Object.freeze(f.fromCssColorString("#4169E1")),f.SADDLEBROWN=Object.freeze(f.fromCssColorString("#8B4513")),f.SALMON=Object.freeze(f.fromCssColorString("#FA8072")),f.SANDYBROWN=Object.freeze(f.fromCssColorString("#F4A460")),f.SEAGREEN=Object.freeze(f.fromCssColorString("#2E8B57")),f.SEASHELL=Object.freeze(f.fromCssColorString("#FFF5EE")),f.SIENNA=Object.freeze(f.fromCssColorString("#A0522D")),f.SILVER=Object.freeze(f.fromCssColorString("#C0C0C0")),f.SKYBLUE=Object.freeze(f.fromCssColorString("#87CEEB")),f.SLATEBLUE=Object.freeze(f.fromCssColorString("#6A5ACD")),f.SLATEGRAY=Object.freeze(f.fromCssColorString("#708090")),f.SLATEGREY=f.SLATEGRAY,f.SNOW=Object.freeze(f.fromCssColorString("#FFFAFA")),f.SPRINGGREEN=Object.freeze(f.fromCssColorString("#00FF7F")),f.STEELBLUE=Object.freeze(f.fromCssColorString("#4682B4")),f.TAN=Object.freeze(f.fromCssColorString("#D2B48C")),f.TEAL=Object.freeze(f.fromCssColorString("#008080")),f.THISTLE=Object.freeze(f.fromCssColorString("#D8BFD8")),f.TOMATO=Object.freeze(f.fromCssColorString("#FF6347")),f.TURQUOISE=Object.freeze(f.fromCssColorString("#40E0D0")),f.VIOLET=Object.freeze(f.fromCssColorString("#EE82EE")),f.WHEAT=Object.freeze(f.fromCssColorString("#F5DEB3")),f.WHITE=Object.freeze(f.fromCssColorString("#FFFFFF")),f.WHITESMOKE=Object.freeze(f.fromCssColorString("#F5F5F5")),f.YELLOW=Object.freeze(f.fromCssColorString("#FFFF00")),f.YELLOWGREEN=Object.freeze(f.fromCssColorString("#9ACD32")),f.TRANSPARENT=Object.freeze(new f(0,0,0,0)),t.default=f},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(3),s=i(5);function l(e,t){this.x=Object(a.default)(e,0),this.y=Object(a.default)(t,0)}l.fromElements=function(e,t,i){return Object(r.default)(i)?(i.x=e,i.y=t,i):new l(e,t)},l.clone=function(e,t){if(Object(r.default)(e))return Object(r.default)(t)?(t.x=e.x,t.y=e.y,t):new l(e.x,e.y)},l.fromCartesian3=l.clone,l.fromCartesian4=l.clone,l.packedLength=2,l.pack=function(e,t,i){return n.a.typeOf.object("value",e),n.a.defined("array",t),i=Object(a.default)(i,0),t[i++]=e.x,t[i]=e.y,t},l.unpack=function(e,t,i){return n.a.defined("array",e),t=Object(a.default)(t,0),Object(r.default)(i)||(i=new l),i.x=e[t++],i.y=e[t],i},l.packArray=function(e,t){n.a.defined("array",e);var i=e.length,a=2*i;if(Object(r.default)(t)){if(!Array.isArray(t)&&t.length!==a)throw new o.default("If result is a typed array, it must have exactly array.length * 2 elements");t.length!==a&&(t.length=a)}else t=new Array(a);for(var s=0;sn&&(a=r,n=o)}var s=1,d=0,c=h[a],f=p[a];if(Math.abs(e[u.getElementIndex(f,c)])>i){var m,_=(e[u.getElementIndex(f,f)]-e[u.getElementIndex(c,c)])/2/e[u.getElementIndex(f,c)];d=(m=_<0?-1/(-_+Math.sqrt(1+_*_)):1/(_+Math.sqrt(1+_*_)))*(s=1/Math.sqrt(1+m*m))}return(t=u.clone(u.IDENTITY,t))[u.getElementIndex(c,c)]=t[u.getElementIndex(f,f)]=s,t[u.getElementIndex(f,c)]=d,t[u.getElementIndex(c,f)]=-d,t}var g=new u,v=new u;u.computeEigenDecomposition=function(e,t){a.a.typeOf.object("matrix",e);var i=l.default.EPSILON20,n=0,r=0;Object(o.default)(t)||(t={});for(var s=t.unitary=u.clone(u.IDENTITY,t.unitary),d=t.diagonal=u.clone(e,t.diagonal),c=i*function(e){for(var t=0,i=0;i<9;++i){var n=e[i];t+=n*n}return Math.sqrt(t)}(d);r<10&&m(d)>c;)_(d,g),u.transpose(g,v),u.multiply(d,g,d),u.multiply(v,d,d),u.multiply(s,g,s),++n>2&&(++r,n=0);return t},u.abs=function(e,t){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t[4]=Math.abs(e[4]),t[5]=Math.abs(e[5]),t[6]=Math.abs(e[6]),t[7]=Math.abs(e[7]),t[8]=Math.abs(e[8]),t},u.determinant=function(e){a.a.typeOf.object("matrix",e);var t=e[0],i=e[3],n=e[6],r=e[1],o=e[4],s=e[7],l=e[2],u=e[5],d=e[8];return t*(o*d-u*s)+r*(u*n-i*d)+l*(i*s-o*n)},u.inverse=function(e,t){a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t);var i=e[0],n=e[1],r=e[2],o=e[3],d=e[4],c=e[5],f=e[6],h=e[7],p=e[8],m=u.determinant(e);if(Math.abs(m)<=l.default.EPSILON15)throw new s.default("matrix is not invertible");t[0]=d*p-h*c,t[1]=h*r-n*p,t[2]=n*c-d*r,t[3]=f*c-o*p,t[4]=i*p-f*r,t[5]=o*r-i*c,t[6]=o*h-f*d,t[7]=f*n-i*h,t[8]=i*d-o*n;var _=1/m;return u.multiplyByScalar(t,_,t)};var y=new u;u.inverseTranspose=function(e,t){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t),u.inverse(u.transpose(e,y),t)},u.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]},u.equalsEpsilon=function(e,t,i){return i=Object(r.default)(i,0),e===t||Object(o.default)(e)&&Object(o.default)(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i&&Math.abs(e[4]-t[4])<=i&&Math.abs(e[5]-t[5])<=i&&Math.abs(e[6]-t[6])<=i&&Math.abs(e[7]-t[7])<=i&&Math.abs(e[8]-t[8])<=i},u.IDENTITY=Object.freeze(new u(1,0,0,0,1,0,0,0,1)),u.ZERO=Object.freeze(new u(0,0,0,0,0,0,0,0,0)),u.COLUMN0ROW0=0,u.COLUMN0ROW1=1,u.COLUMN0ROW2=2,u.COLUMN1ROW0=3,u.COLUMN1ROW1=4,u.COLUMN1ROW2=5,u.COLUMN2ROW0=6,u.COLUMN2ROW1=7,u.COLUMN2ROW2=8,Object.defineProperties(u.prototype,{length:{get:function(){return u.packedLength}}}),u.prototype.clone=function(e){return u.clone(this,e)},u.prototype.equals=function(e){return u.equals(this,e)},u.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]&&e[4]===t[i+4]&&e[5]===t[i+5]&&e[6]===t[i+6]&&e[7]===t[i+7]&&e[8]===t[i+8]},u.prototype.equalsEpsilon=function(e,t){return u.equalsEpsilon(this,e,t)},u.prototype.toString=function(){return"("+this[0]+", "+this[3]+", "+this[6]+")\n("+this[1]+", "+this[4]+", "+this[7]+")\n("+this[2]+", "+this[5]+", "+this[8]+")"},t.default=u},function(e,t,i){"use strict";i.r(t);var n={MORPHING:0,COLUMBUS_VIEW:1,SCENE2D:2,SCENE3D:3,getMorphTime:function(e){return e===n.SCENE3D?1:e!==n.MORPHING?0:void 0}};t.default=Object.freeze(n)},function(e,t,i){"use strict";i.r(t);var n=i(169),a=i(2),r=i(0),o=i(3),s=i(340),l=i(370),u=i(136),d=i(106),c=i(103),f=new s.a,h=[31,28,31,30,31,30,31,31,30,31,30,31];function p(e,t){return D.compare(e.julianDate,t.julianDate)}var m=new u.a;function _(e){m.julianDate=e;var t=D.leapSeconds,i=Object(n.a)(t,m,p);i<0&&(i=~i),i>=t.length&&(i=t.length-1);var a=t[i].offset;i>0&&(D.secondsDifference(t[i].julianDate,e)>a&&(a=t[--i].offset));D.addSeconds(e,a,e)}function g(e,t){m.julianDate=e;var i=D.leapSeconds,a=Object(n.a)(i,m,p);if(a<0&&(a=~a),0===a)return D.addSeconds(e,-i[0].offset,t);if(a>=i.length)return D.addSeconds(e,-i[a-1].offset,t);var r=D.secondsDifference(i[a].julianDate,e);return 0===r?D.addSeconds(e,-i[a].offset,t):r<=1?void 0:D.addSeconds(e,-i[--a].offset,t)}function v(e,t,i){var n=t/d.a.SECONDS_PER_DAY|0;return e+=n,(t-=d.a.SECONDS_PER_DAY*n)<0&&(e--,t+=d.a.SECONDS_PER_DAY),i.dayNumber=e,i.secondsOfDay=t,i}function y(e,t,i,n,a,r,o){var s=(t-14)/12|0,l=e+4800+s,u=(1461*l/4|0)+(367*(t-2-12*s)/12|0)-(3*((l+100)/100|0)/4|0)+i-32075;(n-=12)<0&&(n+=24);var c=r+(n*d.a.SECONDS_PER_HOUR+a*d.a.SECONDS_PER_MINUTE+o*d.a.SECONDS_PER_MILLISECOND);return c>=43200&&(u-=1),[u,c]}var b=/^(\d{4})$/,w=/^(\d{4})-(\d{2})$/,O=/^(\d{4})-?(\d{3})$/,x=/^(\d{4})-?W(\d{2})-?(\d{1})?$/,A=/^(\d{4})-?(\d{2})-?(\d{2})$/,T=/([Z+\-])?(\d{2})?:?(\d{2})?$/,E=/^(\d{2})(\.\d+)?/.source+T.source,C=/^(\d{2}):?(\d{2})(\.\d+)?/.source+T.source,S=/^(\d{2}):?(\d{2}):?(\d{2})(\.\d+)?/.source+T.source,M="Invalid ISO 8601 date.";function D(e,t,i){this.dayNumber=void 0,this.secondsOfDay=void 0,e=Object(a.default)(e,0),t=Object(a.default)(t,0),i=Object(a.default)(i,c.a.UTC);var n=0|e;v(n,t+=(e-n)*d.a.SECONDS_PER_DAY,this),i===c.a.UTC&&_(this)}D.fromGregorianDate=function(e,t){if(!(e instanceof s.a))throw new o.default("date must be a valid GregorianDate.");var i=y(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond);return Object(r.default)(t)?(v(i[0],i[1],t),_(t),t):new D(i[0],i[1],c.a.UTC)},D.fromDate=function(e,t){if(!(e instanceof Date)||isNaN(e.getTime()))throw new o.default("date must be a valid JavaScript Date.");var i=y(e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds());return Object(r.default)(t)?(v(i[0],i[1],t),_(t),t):new D(i[0],i[1],c.a.UTC)},D.fromIso8601=function(e,t){if("string"!=typeof e)throw new o.default(M);var i,n,a,s,u,d=(e=e.replace(",",".")).split("T"),f=1,p=1,m=0,g=0,T=0,P=0,I=d[0],L=d[1];if(!Object(r.default)(I))throw new o.default(M);if(null!==(d=I.match(A))){if((s=I.split("-").length-1)>0&&2!==s)throw new o.default(M);i=+d[1],f=+d[2],p=+d[3]}else if(null!==(d=I.match(w)))i=+d[1],f=+d[2];else if(null!==(d=I.match(b)))i=+d[1];else{var j;if(null!==(d=I.match(O))){if(i=+d[1],j=+d[2],a=Object(l.a)(i),j<1||a&&j>366||!a&&j>365)throw new o.default(M)}else{if(null===(d=I.match(x)))throw new o.default(M);i=+d[1];var R=+d[2],N=+d[3]||0;if((s=I.split("-").length-1)>0&&(!Object(r.default)(d[3])&&1!==s||Object(r.default)(d[3])&&2!==s))throw new o.default(M);j=7*R+N-new Date(Date.UTC(i,0,4)).getUTCDay()-3}(n=new Date(Date.UTC(i,0,1))).setUTCDate(j),f=n.getUTCMonth()+1,p=n.getUTCDate()}if(a=Object(l.a)(i),f<1||f>12||p<1||(2!==f||!a)&&p>h[f-1]||a&&2===f&&p>29)throw new o.default(M);if(Object(r.default)(L)){if(null!==(d=L.match(S))){if((s=L.split(":").length-1)>0&&2!==s&&3!==s)throw new o.default(M);m=+d[1],g=+d[2],T=+d[3],P=1e3*+(d[4]||0),u=5}else if(null!==(d=L.match(C))){if((s=L.split(":").length-1)>2)throw new o.default(M);m=+d[1],g=+d[2],T=60*+(d[3]||0),u=4}else{if(null===(d=L.match(E)))throw new o.default(M);m=+d[1],g=60*+(d[2]||0),u=3}if(g>=60||T>=61||m>24||24===m&&(g>0||T>0||P>0))throw new o.default(M);var B=d[u],F=+d[u+1],k=+(d[u+2]||0);switch(B){case"+":m-=F,g-=k;break;case"-":m+=F,g+=k;break;case"Z":break;default:g+=new Date(Date.UTC(i,f-1,p,m,g)).getTimezoneOffset()}}var z=60===T;for(z&&T--;g>=60;)g-=60,m++;for(;m>=24;)m-=24,p++;for(n=a&&2===f?29:h[f-1];p>n;)p-=n,++f>12&&(f-=12,i++),n=a&&2===f?29:h[f-1];for(;g<0;)g+=60,m--;for(;m<0;)m+=24,p--;for(;p<1;)--f<1&&(f+=12,i--),p+=n=a&&2===f?29:h[f-1];var U=y(i,f,p,m,g,T,P);return Object(r.default)(t)?(v(U[0],U[1],t),_(t)):t=new D(U[0],U[1],c.a.UTC),z&&D.addSeconds(t,1,t),t},D.now=function(e){return D.fromDate(new Date,e)};var P=new D(0,0,c.a.TAI);D.toGregorianDate=function(e,t){if(!Object(r.default)(e))throw new o.default("julianDate is required.");var i=!1,n=g(e,P);Object(r.default)(n)||(D.addSeconds(e,-1,P),n=g(P,P),i=!0);var a=n.dayNumber,l=n.secondsOfDay;l>=43200&&(a+=1);var u=a+68569|0,c=4*u/146097|0,f=4e3*((u=u-((146097*c+3)/4|0)|0)+1)/1461001|0,h=80*(u=u-(1461*f/4|0)+31|0)/2447|0,p=u-(2447*h/80|0)|0,m=h+2-12*(u=h/11|0)|0,_=100*(c-49)+f+u|0,v=l/d.a.SECONDS_PER_HOUR|0,y=l-v*d.a.SECONDS_PER_HOUR,b=y/d.a.SECONDS_PER_MINUTE|0,w=0|(y-=b*d.a.SECONDS_PER_MINUTE),O=(y-w)/d.a.SECONDS_PER_MILLISECOND;return(v+=12)>23&&(v-=24),i&&(w+=1),Object(r.default)(t)?(t.year=_,t.month=m,t.day=p,t.hour=v,t.minute=b,t.second=w,t.millisecond=O,t.isLeapSecond=i,t):new s.a(_,m,p,v,b,w,O,i)},D.toDate=function(e){if(!Object(r.default)(e))throw new o.default("julianDate is required.");var t=D.toGregorianDate(e,f),i=t.second;return t.isLeapSecond&&(i-=1),new Date(Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,i,t.millisecond))},D.toIso8601=function(e,t){if(!Object(r.default)(e))throw new o.default("julianDate is required.");var i,n=D.toGregorianDate(e,f),a=n.year,s=n.month,l=n.day,u=n.hour,d=n.minute,c=n.second,h=n.millisecond;return 1e4===a&&1===s&&1===l&&0===u&&0===d&&0===c&&0===h&&(a=9999,s=12,l=31,u=24),Object(r.default)(t)||0===h?Object(r.default)(t)&&0!==t?(i=(.01*h).toFixed(t).replace(".","").slice(0,t),a.toString().padStart(4,"0")+"-"+s.toString().padStart(2,"0")+"-"+l.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"."+i+"Z"):a.toString().padStart(4,"0")+"-"+s.toString().padStart(2,"0")+"-"+l.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"Z":(i=(.01*h).toString().replace(".",""),a.toString().padStart(4,"0")+"-"+s.toString().padStart(2,"0")+"-"+l.toString().padStart(2,"0")+"T"+u.toString().padStart(2,"0")+":"+d.toString().padStart(2,"0")+":"+c.toString().padStart(2,"0")+"."+i+"Z")},D.clone=function(e,t){if(Object(r.default)(e))return Object(r.default)(t)?(t.dayNumber=e.dayNumber,t.secondsOfDay=e.secondsOfDay,t):new D(e.dayNumber,e.secondsOfDay,c.a.TAI)},D.compare=function(e,t){if(!Object(r.default)(e))throw new o.default("left is required.");if(!Object(r.default)(t))throw new o.default("right is required.");var i=e.dayNumber-t.dayNumber;return 0!==i?i:e.secondsOfDay-t.secondsOfDay},D.equals=function(e,t){return e===t||Object(r.default)(e)&&Object(r.default)(t)&&e.dayNumber===t.dayNumber&&e.secondsOfDay===t.secondsOfDay},D.equalsEpsilon=function(e,t,i){return i=Object(a.default)(i,0),e===t||Object(r.default)(e)&&Object(r.default)(t)&&Math.abs(D.secondsDifference(e,t))<=i},D.totalDays=function(e){if(!Object(r.default)(e))throw new o.default("julianDate is required.");return e.dayNumber+e.secondsOfDay/d.a.SECONDS_PER_DAY},D.secondsDifference=function(e,t){if(!Object(r.default)(e))throw new o.default("left is required.");if(!Object(r.default)(t))throw new o.default("right is required.");return(e.dayNumber-t.dayNumber)*d.a.SECONDS_PER_DAY+(e.secondsOfDay-t.secondsOfDay)},D.daysDifference=function(e,t){if(!Object(r.default)(e))throw new o.default("left is required.");if(!Object(r.default)(t))throw new o.default("right is required.");return e.dayNumber-t.dayNumber+(e.secondsOfDay-t.secondsOfDay)/d.a.SECONDS_PER_DAY},D.computeTaiMinusUtc=function(e){m.julianDate=e;var t=D.leapSeconds,i=Object(n.a)(t,m,p);return i<0&&(i=~i,--i<0&&(i=0)),t[i].offset},D.addSeconds=function(e,t,i){if(!Object(r.default)(e))throw new o.default("julianDate is required.");if(!Object(r.default)(t))throw new o.default("seconds is required.");if(!Object(r.default)(i))throw new o.default("result is required.");return v(e.dayNumber,e.secondsOfDay+t,i)},D.addMinutes=function(e,t,i){if(!Object(r.default)(e))throw new o.default("julianDate is required.");if(!Object(r.default)(t))throw new o.default("minutes is required.");if(!Object(r.default)(i))throw new o.default("result is required.");var n=e.secondsOfDay+t*d.a.SECONDS_PER_MINUTE;return v(e.dayNumber,n,i)},D.addHours=function(e,t,i){if(!Object(r.default)(e))throw new o.default("julianDate is required.");if(!Object(r.default)(t))throw new o.default("hours is required.");if(!Object(r.default)(i))throw new o.default("result is required.");var n=e.secondsOfDay+t*d.a.SECONDS_PER_HOUR;return v(e.dayNumber,n,i)},D.addDays=function(e,t,i){if(!Object(r.default)(e))throw new o.default("julianDate is required.");if(!Object(r.default)(t))throw new o.default("days is required.");if(!Object(r.default)(i))throw new o.default("result is required.");return v(e.dayNumber+t,e.secondsOfDay,i)},D.lessThan=function(e,t){return D.compare(e,t)<0},D.lessThanOrEquals=function(e,t){return D.compare(e,t)<=0},D.greaterThan=function(e,t){return D.compare(e,t)>0},D.greaterThanOrEquals=function(e,t){return D.compare(e,t)>=0},D.prototype.clone=function(e){return D.clone(this,e)},D.prototype.equals=function(e){return D.equals(this,e)},D.prototype.equalsEpsilon=function(e,t){return D.equalsEpsilon(this,e,t)},D.prototype.toString=function(){return D.toIso8601(this)},D.leapSeconds=[new u.a(new D(2441317,43210,c.a.TAI),10),new u.a(new D(2441499,43211,c.a.TAI),11),new u.a(new D(2441683,43212,c.a.TAI),12),new u.a(new D(2442048,43213,c.a.TAI),13),new u.a(new D(2442413,43214,c.a.TAI),14),new u.a(new D(2442778,43215,c.a.TAI),15),new u.a(new D(2443144,43216,c.a.TAI),16),new u.a(new D(2443509,43217,c.a.TAI),17),new u.a(new D(2443874,43218,c.a.TAI),18),new u.a(new D(2444239,43219,c.a.TAI),19),new u.a(new D(2444786,43220,c.a.TAI),20),new u.a(new D(2445151,43221,c.a.TAI),21),new u.a(new D(2445516,43222,c.a.TAI),22),new u.a(new D(2446247,43223,c.a.TAI),23),new u.a(new D(2447161,43224,c.a.TAI),24),new u.a(new D(2447892,43225,c.a.TAI),25),new u.a(new D(2448257,43226,c.a.TAI),26),new u.a(new D(2448804,43227,c.a.TAI),27),new u.a(new D(2449169,43228,c.a.TAI),28),new u.a(new D(2449534,43229,c.a.TAI),29),new u.a(new D(2450083,43230,c.a.TAI),30),new u.a(new D(2450630,43231,c.a.TAI),31),new u.a(new D(2451179,43232,c.a.TAI),32),new u.a(new D(2453736,43233,c.a.TAI),33),new u.a(new D(2454832,43234,c.a.TAI),34),new u.a(new D(2456109,43235,c.a.TAI),35),new u.a(new D(2457204,43236,c.a.TAI),36),new u.a(new D(2457754,43237,c.a.TAI),37)],t.default=D},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(22),r=i(4),o=i(2),s=i(0),l=i(3),u=i(5),d=i(421);function c(e,t,i,a){t=Object(o.default)(t,0),i=Object(o.default)(i,0),a=Object(o.default)(a,0),r.a.typeOf.number.greaterThanOrEquals("x",t,0),r.a.typeOf.number.greaterThanOrEquals("y",i,0),r.a.typeOf.number.greaterThanOrEquals("z",a,0),e._radii=new n.default(t,i,a),e._radiiSquared=new n.default(t*t,i*i,a*a),e._radiiToTheFourth=new n.default(t*t*t*t,i*i*i*i,a*a*a*a),e._oneOverRadii=new n.default(0===t?0:1/t,0===i?0:1/i,0===a?0:1/a),e._oneOverRadiiSquared=new n.default(0===t?0:1/(t*t),0===i?0:1/(i*i),0===a?0:1/(a*a)),e._minimumRadius=Math.min(t,i,a),e._maximumRadius=Math.max(t,i,a),e._centerToleranceSquared=u.default.EPSILON1,0!==e._radiiSquared.z&&(e._squaredXOverSquaredZ=e._radiiSquared.x/e._radiiSquared.z)}function f(e,t,i){this._radii=void 0,this._radiiSquared=void 0,this._radiiToTheFourth=void 0,this._oneOverRadii=void 0,this._oneOverRadiiSquared=void 0,this._minimumRadius=void 0,this._maximumRadius=void 0,this._centerToleranceSquared=void 0,this._squaredXOverSquaredZ=void 0,c(this,e,t,i)}Object.defineProperties(f.prototype,{radii:{get:function(){return this._radii}},radiiSquared:{get:function(){return this._radiiSquared}},radiiToTheFourth:{get:function(){return this._radiiToTheFourth}},oneOverRadii:{get:function(){return this._oneOverRadii}},oneOverRadiiSquared:{get:function(){return this._oneOverRadiiSquared}},minimumRadius:{get:function(){return this._minimumRadius}},maximumRadius:{get:function(){return this._maximumRadius}}}),f.clone=function(e,t){if(Object(s.default)(e)){var i=e._radii;return Object(s.default)(t)?(n.default.clone(i,t._radii),n.default.clone(e._radiiSquared,t._radiiSquared),n.default.clone(e._radiiToTheFourth,t._radiiToTheFourth),n.default.clone(e._oneOverRadii,t._oneOverRadii),n.default.clone(e._oneOverRadiiSquared,t._oneOverRadiiSquared),t._minimumRadius=e._minimumRadius,t._maximumRadius=e._maximumRadius,t._centerToleranceSquared=e._centerToleranceSquared,t):new f(i.x,i.y,i.z)}},f.fromCartesian3=function(e,t){return Object(s.default)(t)||(t=new f),Object(s.default)(e)?(c(t,e.x,e.y,e.z),t):t},f.WGS84=Object.freeze(new f(6378137,6378137,6356752.314245179)),f.UNIT_SPHERE=Object.freeze(new f(1,1,1)),f.MOON=Object.freeze(new f(u.default.LUNAR_RADIUS,u.default.LUNAR_RADIUS,u.default.LUNAR_RADIUS)),f.prototype.clone=function(e){return f.clone(this,e)},f.packedLength=n.default.packedLength,f.pack=function(e,t,i){return r.a.typeOf.object("value",e),r.a.defined("array",t),i=Object(o.default)(i,0),n.default.pack(e._radii,t,i),t},f.unpack=function(e,t,i){r.a.defined("array",e),t=Object(o.default)(t,0);var a=n.default.unpack(e,t);return f.fromCartesian3(a,i)},f.prototype.geocentricSurfaceNormal=n.default.normalize,f.prototype.geodeticSurfaceNormalCartographic=function(e,t){r.a.typeOf.object("cartographic",e);var i=e.longitude,a=e.latitude,o=Math.cos(a),l=o*Math.cos(i),u=o*Math.sin(i),d=Math.sin(a);return Object(s.default)(t)||(t=new n.default),t.x=l,t.y=u,t.z=d,n.default.normalize(t,t)},f.prototype.geodeticSurfaceNormal=function(e,t){if(!n.default.equalsEpsilon(e,n.default.ZERO,u.default.EPSILON14))return Object(s.default)(t)||(t=new n.default),t=n.default.multiplyComponents(e,this._oneOverRadiiSquared,t),n.default.normalize(t,t)};var h=new n.default,p=new n.default;f.prototype.cartographicToCartesian=function(e,t){var i=h,a=p;this.geodeticSurfaceNormalCartographic(e,i),n.default.multiplyComponents(this._radiiSquared,i,a);var r=Math.sqrt(n.default.dot(i,a));return n.default.divideByScalar(a,r,a),n.default.multiplyByScalar(i,e.height,i),Object(s.default)(t)||(t=new n.default),n.default.add(a,i,t)},f.prototype.cartographicArrayToCartesianArray=function(e,t){r.a.defined("cartographics",e);var i=e.length;Object(s.default)(t)?t.length=i:t=new Array(i);for(var n=0;n=this._radii.z-t))return i};var v=[.14887433898163,.43339539412925,.67940956829902,.86506336668898,.97390652851717,0],y=[.29552422471475,.26926671930999,.21908636251598,.14945134915058,.066671344308684,0];function b(e,t,i){r.a.typeOf.number("a",e),r.a.typeOf.number("b",t),r.a.typeOf.func("func",i);for(var n=.5*(t+e),a=.5*(t-e),o=0,s=0;s<5;s++){var l=a*v[s];o+=y[s]*(i(n+l)+i(n-l))}return o*=a}f.prototype.surfaceArea=function(e){r.a.typeOf.object("rectangle",e);for(var t=e.west,i=e.east,n=e.south,a=e.north;iu.x&&n.default.clone(a,u),pd.y&&n.default.clone(a,d),mc.z&&n.default.clone(a,c)}var M=n.default.magnitudeSquared(n.default.subtract(u,r,A)),D=n.default.magnitudeSquared(n.default.subtract(d,o,A)),P=n.default.magnitudeSquared(n.default.subtract(c,l,A)),I=r,L=u,j=M;D>j&&(j=D,I=o,L=d),P>j&&(j=P,I=l,L=c);var R=T;R.x=.5*(I.x+L.x),R.y=.5*(I.y+L.y),R.z=.5*(I.z+L.z);var N=n.default.magnitudeSquared(n.default.subtract(L,R,A)),B=Math.sqrt(N),F=E;F.x=r.x,F.y=o.y,F.z=l.z;var k=C;k.x=u.x,k.y=d.y,k.z=c.z;var z=n.default.midpoint(F,k,S),U=0;for(i=0;iU&&(U=V);var H=n.default.magnitudeSquared(n.default.subtract(a,R,A));if(H>N){var G=Math.sqrt(H);N=(B=.5*(B+G))*B;var Y=G-B;R.x=(B*R.x+Y*a.x)/G,R.y=(B*R.y+Y*a.y)/G,R.z=(B*R.z+Y*a.z)/G}}return Bh.x&&n.default.clone(l,h),Pp.y&&n.default.clone(l,p),Im.z&&n.default.clone(l,m)}var L=n.default.magnitudeSquared(n.default.subtract(h,d,A)),j=n.default.magnitudeSquared(n.default.subtract(p,c,A)),R=n.default.magnitudeSquared(n.default.subtract(m,f,A)),N=d,B=h,F=L;j>F&&(F=j,N=c,B=p),R>F&&(F=R,N=f,B=m);var k=T;k.x=.5*(N.x+B.x),k.y=.5*(N.y+B.y),k.z=.5*(N.z+B.z);var z=n.default.magnitudeSquared(n.default.subtract(B,k,A)),U=Math.sqrt(z),V=E;V.x=d.x,V.y=c.y,V.z=f.z;var H=C;H.x=h.x,H.y=p.y,H.z=m.z;var G=n.default.midpoint(V,H,S),Y=0;for(u=0;uY&&(Y=W);var q=n.default.magnitudeSquared(n.default.subtract(l,k,A));if(q>z){var X=Math.sqrt(q);z=(U=.5*(U+X))*U;var K=X-U;k.x=(U*k.x+K*l.x)/X,k.y=(U*k.y+K*l.y)/X,k.z=(U*k.z+K*l.z)/X}}return Ud.x&&n.default.clone(a,d),mc.y&&n.default.clone(a,c),Mf.z&&n.default.clone(a,f)}var D=n.default.magnitudeSquared(n.default.subtract(d,o,A)),P=n.default.magnitudeSquared(n.default.subtract(c,l,A)),I=n.default.magnitudeSquared(n.default.subtract(f,u,A)),L=o,j=d,R=D;P>R&&(R=P,L=l,j=c),I>R&&(R=I,L=u,j=f);var N=T;N.x=.5*(L.x+j.x),N.y=.5*(L.y+j.y),N.z=.5*(L.z+j.z);var B=n.default.magnitudeSquared(n.default.subtract(j,N,A)),F=Math.sqrt(B),k=E;k.x=o.x,k.y=l.y,k.z=u.z;var z=C;z.x=d.x,z.y=c.y,z.z=f.z;var U=n.default.midpoint(k,z,S),V=0;for(r=0;rV&&(V=H);var G=n.default.magnitudeSquared(n.default.subtract(a,N,A));if(G>B){var Y=Math.sqrt(G);B=(F=.5*(F+Y))*F;var W=Y-F;N.x=(F*N.x+W*a.x)/Y,N.y=(F*N.y+W*a.y)/Y,N.z=(F*N.z+W*a.z)/Y}}return F=c+u)return e.clone(i),i;if(u>=c+o)return t.clone(i),i;var f=.5*(o+c+u),h=n.default.multiplyByScalar(d,(-o+f)/c,U);return n.default.add(h,a,h),n.default.clone(h,i.center),i.radius=f,i};var V=new n.default;_.expand=function(e,t,i){r.a.typeOf.object("sphere",e),r.a.typeOf.object("point",t),i=_.clone(e,i);var a=n.default.magnitude(n.default.subtract(t,i.center,V));return a>i.radius&&(i.radius=a),i},_.intersectPlane=function(e,t){r.a.typeOf.object("sphere",e),r.a.typeOf.object("plane",t);var i=e.center,a=e.radius,o=t.normal,s=n.default.dot(o,i)+t.distance;return s<-a?d.a.OUTSIDE:s>>0,s=Math.max(0,Math.min(t,_)),u=[],l=_-s+1,d=[],c=o(),s)for(m=c.progress,p=function(e){d.push(e),--l||(f=p=h,c.reject(d))},f=function(e){u.push(e),--s||(f=p=h,c.resolve(u))},g=0;g<_;++g)g in e&&i(e[g],y,v,m);else c.resolve(u);return c.then(n,a,r);function v(e){p(e)}function y(e){f(e)}}))}function u(e,t,i,n){return f(1,arguments),d(e,p).then(t,i,n)}function d(e,t){return i(e,(function(e){var n,a,r,s,l,u;if(r=a=e.length>>>0,n=[],u=o(),r)for(s=function(e,a){i(e,t).then((function(e){n[a]=e,--r||u.resolve(n)}),u.reject)},l=0;le;)if(null!=(i=t[--n])&&"function"!=typeof i)throw new Error("arg "+n+" must be a function")}function h(){}function p(e){return e}return i.defer=o,i.resolve=n,i.reject=function(e){return i(e,r)},i.join=function(){return d(arguments,p)},i.all=u,i.map=d,i.reduce=function(n,a){var r=t.call(arguments,1);return i(n,(function(t){var n;return n=t.length,r[0]=function(e,t,r){return i(e,(function(e){return i(t,(function(t){return a(e,t,r,n)}))}))},e.apply(t,r)}))},i.any=function(e,t,i,n){return l(e,1,(function(e){return t?t(e[0]):e[0]}),i,n)},i.some=l,i.chain=function(e,t,n){var a=arguments.length>2;return i(e,(function(e){return e=a?n:e,t.resolve(e),e}),(function(e){return t.reject(e),r(e)}),t.progress)},i.isPromise=s,a.prototype={always:function(e,t){return this.then(e,e,t)},otherwise:function(e){return this.then(void 0,e)},yield:function(e){return this.then((function(){return e}))},spread:function(e){return this.then((function(t){return u(t,(function(t){return e.apply(void 0,t)}))}))}},t=[].slice,e=[].reduce||function(e){var t,i,n,a,r;if(r=0,a=(t=Object(this)).length>>>0,(i=arguments).length<=1)for(;;){if(r in t){n=t[r++];break}if(++r>=a)throw new TypeError}else n=i[1];for(;r=0?p.longitude:p.longitude+l.default.TWO_PI;r=Math.min(r,m),s=Math.max(s,m)}return n-i>s-r&&(i=r,(n=s)>l.default.PI&&(n-=l.default.TWO_PI),i>l.default.PI&&(i-=l.default.TWO_PI)),Object(o.default)(t)?(t.west=i,t.south=d,t.east=n,t.north=c,t):new u(i,d,n,c)},u.fromCartesianArray=function(e,t,i){a.a.defined("cartesians",e),t=Object(r.default)(t,s.default.WGS84);for(var n=Number.MAX_VALUE,d=-Number.MAX_VALUE,c=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=Number.MAX_VALUE,p=-Number.MAX_VALUE,m=0,_=e.length;m<_;m++){var g=t.cartesianToCartographic(e[m]);n=Math.min(n,g.longitude),d=Math.max(d,g.longitude),h=Math.min(h,g.latitude),p=Math.max(p,g.latitude);var v=g.longitude>=0?g.longitude:g.longitude+l.default.TWO_PI;c=Math.min(c,v),f=Math.max(f,v)}return d-n>f-c&&(n=c,(d=f)>l.default.PI&&(d-=l.default.TWO_PI),n>l.default.PI&&(n-=l.default.TWO_PI)),Object(o.default)(i)?(i.west=n,i.south=h,i.east=d,i.north=p,i):new u(n,h,d,p)},u.clone=function(e,t){if(Object(o.default)(e))return Object(o.default)(t)?(t.west=e.west,t.south=e.south,t.east=e.east,t.north=e.north,t):new u(e.west,e.south,e.east,e.north)},u.equalsEpsilon=function(e,t,i){return i=Object(r.default)(i,0),e===t||Object(o.default)(e)&&Object(o.default)(t)&&Math.abs(e.west-t.west)<=i&&Math.abs(e.south-t.south)<=i&&Math.abs(e.east-t.east)<=i&&Math.abs(e.north-t.north)<=i},u.prototype.clone=function(e){return u.clone(this,e)},u.prototype.equals=function(e){return u.equals(this,e)},u.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e.west===t.west&&e.south===t.south&&e.east===t.east&&e.north===t.north},u.prototype.equalsEpsilon=function(e,t){return u.equalsEpsilon(this,e,t)},u.validate=function(e){a.a.typeOf.object("rectangle",e);var t=e.north;a.a.typeOf.number.greaterThanOrEquals("north",t,-l.default.PI_OVER_TWO),a.a.typeOf.number.lessThanOrEquals("north",t,l.default.PI_OVER_TWO);var i=e.south;a.a.typeOf.number.greaterThanOrEquals("south",i,-l.default.PI_OVER_TWO),a.a.typeOf.number.lessThanOrEquals("south",i,l.default.PI_OVER_TWO);var n=e.west;a.a.typeOf.number.greaterThanOrEquals("west",n,-Math.PI),a.a.typeOf.number.lessThanOrEquals("west",n,Math.PI);var r=e.east;a.a.typeOf.number.greaterThanOrEquals("east",r,-Math.PI),a.a.typeOf.number.lessThanOrEquals("east",r,Math.PI)},u.southwest=function(e,t){return a.a.typeOf.object("rectangle",e),Object(o.default)(t)?(t.longitude=e.west,t.latitude=e.south,t.height=0,t):new n.default(e.west,e.south)},u.northwest=function(e,t){return a.a.typeOf.object("rectangle",e),Object(o.default)(t)?(t.longitude=e.west,t.latitude=e.north,t.height=0,t):new n.default(e.west,e.north)},u.northeast=function(e,t){return a.a.typeOf.object("rectangle",e),Object(o.default)(t)?(t.longitude=e.east,t.latitude=e.north,t.height=0,t):new n.default(e.east,e.north)},u.southeast=function(e,t){return a.a.typeOf.object("rectangle",e),Object(o.default)(t)?(t.longitude=e.east,t.latitude=e.south,t.height=0,t):new n.default(e.east,e.south)},u.center=function(e,t){a.a.typeOf.object("rectangle",e);var i=e.east,r=e.west;i0?n+=l.default.TWO_PI:s0&&(s+=l.default.TWO_PI),n=p))return Object(o.default)(i)?(i.west=c,i.south=h,i.east=f,i.north=p,i):new u(c,h,f,p)}},u.simpleIntersection=function(e,t,i){a.a.typeOf.object("rectangle",e),a.a.typeOf.object("otherRectangle",t);var n=Math.max(e.west,t.west),r=Math.max(e.south,t.south),s=Math.min(e.east,t.east),l=Math.min(e.north,t.north);if(!(r>=l||n>=s))return Object(o.default)(i)?(i.west=n,i.south=r,i.east=s,i.north=l,i):new u(n,r,s,l)},u.union=function(e,t,i){a.a.typeOf.object("rectangle",e),a.a.typeOf.object("otherRectangle",t),Object(o.default)(i)||(i=new u);var n=e.east,r=e.west,s=t.east,d=t.west;n0?n+=l.default.TWO_PI:s0&&(s+=l.default.TWO_PI),nr||l.default.equalsEpsilon(i,r,l.default.EPSILON14))&&(i=e.south&&n<=e.north};var d=new n.default;u.subsample=function(e,t,i,n){a.a.typeOf.object("rectangle",e),t=Object(r.default)(t,s.default.WGS84),i=Object(r.default)(i,0),Object(o.default)(n)||(n=[]);var c=0,f=e.north,h=e.south,p=e.east,m=e.west,_=d;_.height=i,_.longitude=m,_.latitude=f,n[c]=t.cartographicToCartesian(_,n[c]),c++,_.longitude=p,n[c]=t.cartographicToCartesian(_,n[c]),c++,_.latitude=h,n[c]=t.cartographicToCartesian(_,n[c]),c++,_.longitude=m,n[c]=t.cartographicToCartesian(_,n[c]),c++,_.latitude=f<0?f:h>0?h:0;for(var g=1;g<8;++g)_.longitude=-Math.PI+g*l.default.PI_OVER_TWO,u.contains(e,_)&&(n[c]=t.cartographicToCartesian(_,n[c]),c++);return 0===_.latitude&&(_.longitude=m,n[c]=t.cartographicToCartesian(_,n[c]),c++,_.longitude=p,n[c]=t.cartographicToCartesian(_,n[c]),c++),n.length=c,n},u.MAX_VALUE=Object.freeze(new u(-Math.PI,-l.default.PI_OVER_TWO,Math.PI,l.default.PI_OVER_TWO)),t.default=u},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(4),r=i(2),o=i(0),s=i(5),l=i(421);function u(e,t,i){this.longitude=Object(r.default)(e,0),this.latitude=Object(r.default)(t,0),this.height=Object(r.default)(i,0)}u.fromRadians=function(e,t,i,n){return a.a.typeOf.number("longitude",e),a.a.typeOf.number("latitude",t),i=Object(r.default)(i,0),Object(o.default)(n)?(n.longitude=e,n.latitude=t,n.height=i,n):new u(e,t,i)},u.fromDegrees=function(e,t,i,n){return a.a.typeOf.number("longitude",e),a.a.typeOf.number("latitude",t),e=s.default.toRadians(e),t=s.default.toRadians(t),u.fromRadians(e,t,i,n)};var d=new n.default,c=new n.default,f=new n.default,h=new n.default(1/6378137,1/6378137,1/6356752.314245179),p=new n.default(1/40680631590769,1/40680631590769,1/40408299984661.445),m=s.default.EPSILON1;u.fromCartesian=function(e,t,i){var a=Object(o.default)(t)?t.oneOverRadii:h,r=Object(o.default)(t)?t.oneOverRadiiSquared:p,_=Object(o.default)(t)?t._centerToleranceSquared:m,g=Object(l.a)(e,a,r,_,c);if(Object(o.default)(g)){var v=n.default.multiplyComponents(g,r,d);v=n.default.normalize(v,v);var y=n.default.subtract(e,g,f),b=Math.atan2(v.y,v.x),w=Math.asin(v.z),O=s.default.sign(n.default.dot(y,e))*n.default.magnitude(y);return Object(o.default)(i)?(i.longitude=b,i.latitude=w,i.height=O,i):new u(b,w,O)}},u.toCartesian=function(e,t,i){return a.a.defined("cartographic",e),n.default.fromRadians(e.longitude,e.latitude,e.height,t,i)},u.clone=function(e,t){if(Object(o.default)(e))return Object(o.default)(t)?(t.longitude=e.longitude,t.latitude=e.latitude,t.height=e.height,t):new u(e.longitude,e.latitude,e.height)},u.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e.longitude===t.longitude&&e.latitude===t.latitude&&e.height===t.height},u.equalsEpsilon=function(e,t,i){return i=Object(r.default)(i,0),e===t||Object(o.default)(e)&&Object(o.default)(t)&&Math.abs(e.longitude-t.longitude)<=i&&Math.abs(e.latitude-t.latitude)<=i&&Math.abs(e.height-t.height)<=i},u.ZERO=Object.freeze(new u(0,0,0)),u.prototype.clone=function(e){return u.clone(this,e)},u.prototype.equals=function(e){return u.equals(this,e)},u.prototype.equalsEpsilon=function(e,t){return u.equalsEpsilon(this,e,t)},u.prototype.toString=function(){return"("+this.longitude+", "+this.latitude+", "+this.height+")"},t.default=u},function(e,t,i){"use strict";var n=i(0);function a(e){var t;this.name="RuntimeError",this.message=e;try{throw new Error}catch(e){t=e.stack}this.stack=t}Object(n.default)(Object.create)&&(a.prototype=Object.create(Error.prototype),a.prototype.constructor=a),a.prototype.toString=function(){var e=this.name+": "+this.message;return Object(n.default)(this.stack)&&(e+="\n"+this.stack.toString()),e},t.a=a},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(0);function r(){this._listeners=[],this._scopes=[],this._toRemove=[],this._insideRaiseEvent=!1}function o(e,t){return t-e}Object.defineProperties(r.prototype,{numberOfListeners:{get:function(){return this._listeners.length-this._toRemove.length}}}),r.prototype.addEventListener=function(e,t){n.a.typeOf.func("listener",e),this._listeners.push(e),this._scopes.push(t);var i=this;return function(){i.removeEventListener(e,t)}},r.prototype.removeEventListener=function(e,t){n.a.typeOf.func("listener",e);for(var i=this._listeners,a=this._scopes,r=-1,o=0;o0){for(s.sort(o),e=0;e0)l=.5*(i=Math.sqrt(_+1)),i=.5/i,n=(e[u.default.COLUMN1ROW2]-e[u.default.COLUMN2ROW1])*i,r=(e[u.default.COLUMN2ROW0]-e[u.default.COLUMN0ROW2])*i,s=(e[u.default.COLUMN0ROW1]-e[u.default.COLUMN1ROW0])*i;else{var g=0;p>c&&(g=1),m>c&&m>p&&(g=2);var v=f[g],y=f[v];i=Math.sqrt(e[u.default.getElementIndex(g,g)]-e[u.default.getElementIndex(v,v)]-e[u.default.getElementIndex(y,y)]+1);var b=h;b[g]=.5*i,i=.5/i,l=(e[u.default.getElementIndex(y,v)]-e[u.default.getElementIndex(v,y)])*i,b[v]=(e[u.default.getElementIndex(v,g)]+e[u.default.getElementIndex(g,v)])*i,b[y]=(e[u.default.getElementIndex(y,g)]+e[u.default.getElementIndex(g,y)])*i,n=-b[0],r=-b[1],s=-b[2]}return Object(o.default)(t)?(t.x=n,t.y=r,t.z=s,t.w=l,t):new d(n,r,s,l)};var p=new d,m=new d,_=new d,g=new d;d.fromHeadingPitchRoll=function(e,t){return a.a.typeOf.object("headingPitchRoll",e),g=d.fromAxisAngle(n.default.UNIT_X,e.roll,p),_=d.fromAxisAngle(n.default.UNIT_Y,-e.pitch,t),t=d.multiply(_,g,_),m=d.fromAxisAngle(n.default.UNIT_Z,-e.heading,p),d.multiply(m,t,t)};var v=new n.default,y=new n.default,b=new d,w=new d,O=new d;d.packedLength=4,d.pack=function(e,t,i){return a.a.typeOf.object("value",e),a.a.defined("array",t),i=Object(r.default)(i,0),t[i++]=e.x,t[i++]=e.y,t[i++]=e.z,t[i]=e.w,t},d.unpack=function(e,t,i){return a.a.defined("array",e),t=Object(r.default)(t,0),Object(o.default)(i)||(i=new d),i.x=e[t],i.y=e[t+1],i.z=e[t+2],i.w=e[t+3],i},d.packedInterpolationLength=3,d.convertPackedArrayForInterpolation=function(e,t,i,n){d.unpack(e,4*i,O),d.conjugate(O,O);for(var a=0,r=i-t+1;a=0?r=1:(r=-1,o=-o);for(var s=o-1,l=1-i,u=i*i,c=l*l,f=7;f>=0;--f)R[f]=(L[f]*u-j[f])*s,N[f]=(L[f]*c-j[f])*s;var h=r*i*(1+R[0]*(1+R[1]*(1+R[2]*(1+R[3]*(1+R[4]*(1+R[5]*(1+R[6]*(1+R[7])))))))),p=l*(1+N[0]*(1+N[1]*(1+N[2]*(1+N[3]*(1+N[4]*(1+N[5]*(1+N[6]*(1+N[7])))))))),m=d.multiplyByScalar(e,p,P);return d.multiplyByScalar(t,h,n),d.add(m,n,n)},d.fastSquad=function(e,t,i,n,r,o){a.a.typeOf.object("q0",e),a.a.typeOf.object("q1",t),a.a.typeOf.object("s0",i),a.a.typeOf.object("s1",n),a.a.typeOf.number("t",r),a.a.typeOf.object("result",o);var s=d.fastSlerp(e,t,r,M),l=d.fastSlerp(i,n,r,D);return d.fastSlerp(s,l,2*r*(1-r),o)},d.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e.x===t.x&&e.y===t.y&&e.z===t.z&&e.w===t.w},d.equalsEpsilon=function(e,t,i){return i=Object(r.default)(i,0),e===t||Object(o.default)(e)&&Object(o.default)(t)&&Math.abs(e.x-t.x)<=i&&Math.abs(e.y-t.y)<=i&&Math.abs(e.z-t.z)<=i&&Math.abs(e.w-t.w)<=i},d.ZERO=Object.freeze(new d(0,0,0,0)),d.IDENTITY=Object.freeze(new d(0,0,0,1)),d.prototype.clone=function(e){return d.clone(this,e)},d.prototype.equals=function(e){return d.equals(this,e)},d.prototype.equalsEpsilon=function(e,t){return d.equalsEpsilon(this,e,t)},d.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+", "+this.w+")"},t.default=d},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(3);t.default=function(e){if(e=Object(n.default)(e,n.default.EMPTY_OBJECT),!Object(a.default)(e.componentDatatype))throw new r.default("options.componentDatatype is required.");if(!Object(a.default)(e.componentsPerAttribute))throw new r.default("options.componentsPerAttribute is required.");if(e.componentsPerAttribute<1||e.componentsPerAttribute>4)throw new r.default("options.componentsPerAttribute must be between 1 and 4.");if(!Object(a.default)(e.values))throw new r.default("options.values is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=Object(n.default)(e.normalize,!1),this.values=e.values}},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3);function o(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this.position=Object(n.default)(e.position,!1),this.normal=Object(n.default)(e.normal,!1),this.st=Object(n.default)(e.st,!1),this.bitangent=Object(n.default)(e.bitangent,!1),this.tangent=Object(n.default)(e.tangent,!1),this.color=Object(n.default)(e.color,!1)}o.POSITION_ONLY=Object.freeze(new o({position:!0})),o.POSITION_AND_NORMAL=Object.freeze(new o({position:!0,normal:!0})),o.POSITION_NORMAL_AND_ST=Object.freeze(new o({position:!0,normal:!0,st:!0})),o.POSITION_AND_ST=Object.freeze(new o({position:!0,st:!0})),o.POSITION_AND_COLOR=Object.freeze(new o({position:!0,color:!0})),o.ALL=Object.freeze(new o({position:!0,normal:!0,st:!0,tangent:!0,bitangent:!0})),o.DEFAULT=o.POSITION_NORMAL_AND_ST,o.packedLength=6,o.pack=function(e,t,i){if(!Object(a.default)(e))throw new r.default("value is required");if(!Object(a.default)(t))throw new r.default("array is required");return i=Object(n.default)(i,0),t[i++]=e.position?1:0,t[i++]=e.normal?1:0,t[i++]=e.st?1:0,t[i++]=e.tangent?1:0,t[i++]=e.bitangent?1:0,t[i]=e.color?1:0,t},o.unpack=function(e,t,i){if(!Object(a.default)(e))throw new r.default("array is required");return t=Object(n.default)(t,0),Object(a.default)(i)||(i=new o),i.position=1===e[t++],i.normal=1===e[t++],i.st=1===e[t++],i.tangent=1===e[t++],i.bitangent=1===e[t++],i.color=1===e[t],i},o.clone=function(e,t){if(Object(a.default)(e))return Object(a.default)(t)||(t=new o),t.position=e.position,t.normal=e.normal,t.st=e.st,t.tangent=e.tangent,t.bitangent=e.bitangent,t.color=e.color,t},t.a=o},function(e,t,i){"use strict";i.r(t);var n,a=i(115),r=i(18),o=i(551),s=i(4),l=i(50),u=i(60),d=i(2),c=i(0),f=i(3),h=i(281),p=i(552),m=i(422),_=i(423),g=i(424),v=i(350),y=i(425),b=i(5),w=i(426),O=i(277),x=i(164),A=i(412),T=i(217),E=i(120),C=i(23),S=i(502),M=function(){try{var e=new XMLHttpRequest;return e.open("GET","#",!0),e.responseType="blob","blob"===e.responseType}catch(e){return!1}}();function D(e,t,i,n){var a,r=e.query();if(0===r.length)return{};if(-1===r.indexOf("=")){var o={};o[r]=void 0,a=o}else a=Object(O.a)(r);t._queryParameters=i?L(a,t._queryParameters,n):a,e.search("")}function P(e,t){return Object(c.default)(e)?Object(c.default)(e.clone)?e.clone():Object(l.default)(e):t}function I(e){if(e.state===E.a.ISSUED||e.state===E.a.ACTIVE)throw new C.a("The Resource is already being fetched.");e.state=E.a.UNISSUED,e.deferred=void 0}function L(e,t,i){if(!i)return Object(u.default)(e,t);var n=Object(l.default)(e,!0);for(var a in t)if(t.hasOwnProperty(a)){var r=n[a],o=t[a];Object(c.default)(r)?(Array.isArray(r)||(r=n[a]=[r]),n[a]=r.concat(o)):n[a]=Array.isArray(o)?o.slice():o}return n}function j(e){"string"==typeof(e=Object(d.default)(e,d.default.EMPTY_OBJECT))&&(e={url:e}),s.a.typeOf.string("options.url",e.url),this._url=void 0,this._templateValues=P(e.templateValues,{}),this._queryParameters=P(e.queryParameters,{}),this.headers=P(e.headers,{}),this.request=Object(d.default)(e.request,new x.default),this.proxy=e.proxy,this.retryCallback=e.retryCallback,this.retryAttempts=Object(d.default)(e.retryAttempts,0),this._retryCount=0;var t=new a.a(e.url);D(t,this,!0,!0),t.fragment(""),this._url=t.toString()}function R(e){var t=e.resource,i=e.flipY,n=e.skipColorSpaceConversion,a=e.preferImageBitmap,o=t.request;o.url=t.url,o.requestFunction=function(){var e=!1;t.isDataUri||t.isBlobUri||(e=t.isCrossOriginUrl);var s=r.a.defer();return j._Implementations.createImage(o,e,s,i,n,a),s.promise};var s=T.default.request(o);if(Object(c.default)(s))return s.otherwise((function(e){return o.state!==E.a.FAILED?r.a.reject(e):t.retryOnError(e).then((function(s){return s?(o.state=E.a.UNISSUED,o.deferred=void 0,R({resource:t,flipY:i,skipColorSpaceConversion:n,preferImageBitmap:a})):r.a.reject(e)}))}))}j.createIfNeeded=function(e){return e instanceof j?e.getDerivedResource({request:e.request}):"string"!=typeof e?e:new j({url:e})},j.supportsImageBitmapOptions=function(){if(Object(c.default)(n))return n;if("function"!=typeof createImageBitmap)return n=r.a.resolve(!1);return n=j.fetchBlob({url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQImWP4////fwAJ+wP9CNHoHgAAAABJRU5ErkJggg=="}).then((function(e){return createImageBitmap(e,{imageOrientation:"flipY",premultiplyAlpha:"none",colorSpaceConversion:"none"})})).then((function(e){return!0})).otherwise((function(){return!1}))},Object.defineProperties(j,{isBlobSupported:{get:function(){return M}}}),Object.defineProperties(j.prototype,{queryParameters:{get:function(){return this._queryParameters}},templateValues:{get:function(){return this._templateValues}},url:{get:function(){return this.getUrlComponent(!0,!0)},set:function(e){var t=new a.a(e);D(t,this,!1),t.fragment(""),this._url=t.toString()}},extension:{get:function(){return Object(m.a)(this._url)}},isDataUri:{get:function(){return Object(v.a)(this._url)}},isBlobUri:{get:function(){return Object(_.a)(this._url)}},isCrossOriginUrl:{get:function(){return Object(g.a)(this._url)}},hasHeaders:{get:function(){return Object.keys(this.headers).length>0}}}),j.prototype.toString=function(){return this.getUrlComponent(!0,!0)},j.prototype.getUrlComponent=function(e,t){if(this.isDataUri)return this._url;var i=new a.a(this._url);e&&function(e,t){var i=t._queryParameters,n=Object.keys(i);1!==n.length||Object(c.default)(i[n[0]])?e.search(Object(w.a)(i)):e.search(n[0])}(i,this);var n=i.toString().replace(/%7B/g,"{").replace(/%7D/g,"}"),r=this._templateValues;return n=n.replace(/{(.*?)}/g,(function(e,t){var i=r[t];return Object(c.default)(i)?encodeURIComponent(i):e})),t&&Object(c.default)(this.proxy)&&(n=this.proxy.getURL(n)),n},j.prototype.setQueryParameters=function(e,t){this._queryParameters=t?L(this._queryParameters,e,!1):L(e,this._queryParameters,!1)},j.prototype.appendQueryParameters=function(e){this._queryParameters=L(e,this._queryParameters,!0)},j.prototype.setTemplateValues=function(e,t){this._templateValues=t?Object(u.default)(this._templateValues,e):Object(u.default)(e,this._templateValues)},j.prototype.getDerivedResource=function(e){var t=this.clone();if(t._retryCount=0,Object(c.default)(e.url)){var i=new a.a(e.url);D(i,t,!0,Object(d.default)(e.preserveQueryParameters,!1)),i.fragment(""),""!==i.scheme()?t._url=i.toString():t._url=i.absoluteTo(new a.a(Object(h.a)(this._url))).toString()}return Object(c.default)(e.queryParameters)&&(t._queryParameters=Object(u.default)(e.queryParameters,t._queryParameters)),Object(c.default)(e.templateValues)&&(t._templateValues=Object(u.default)(e.templateValues,t.templateValues)),Object(c.default)(e.headers)&&(t.headers=Object(u.default)(e.headers,t.headers)),Object(c.default)(e.proxy)&&(t.proxy=e.proxy),Object(c.default)(e.request)&&(t.request=e.request),Object(c.default)(e.retryCallback)&&(t.retryCallback=e.retryCallback),Object(c.default)(e.retryAttempts)&&(t.retryAttempts=e.retryAttempts),t},j.prototype.retryOnError=function(e){var t=this.retryCallback;if("function"!=typeof t||this._retryCount>=this.retryAttempts)return Object(r.a)(!1);var i=this;return Object(r.a)(t(this,e)).then((function(e){return++i._retryCount,e}))},j.prototype.clone=function(e){return Object(c.default)(e)||(e=new j({url:this._url})),e._url=this._url,e._queryParameters=Object(l.default)(this._queryParameters),e._templateValues=Object(l.default)(this._templateValues),e.headers=Object(l.default)(this.headers),e.proxy=this.proxy,e.retryCallback=this.retryCallback,e.retryAttempts=this.retryAttempts,e._retryCount=0,e.request=this.request.clone(),e},j.prototype.getBaseUri=function(e){return Object(p.a)(this.getUrlComponent(e),e)},j.prototype.appendForwardSlash=function(){this._url=Object(o.a)(this._url)},j.prototype.fetchArrayBuffer=function(){return this.fetch({responseType:"arraybuffer"})},j.fetchArrayBuffer=function(e){return new j(e).fetchArrayBuffer()},j.prototype.fetchBlob=function(){return this.fetch({responseType:"blob"})},j.fetchBlob=function(e){return new j(e).fetchBlob()},j.prototype.fetchImage=function(e){e=Object(d.default)(e,d.default.EMPTY_OBJECT);var t=Object(d.default)(e.preferImageBitmap,!1),i=Object(d.default)(e.preferBlob,!1),n=Object(d.default)(e.flipY,!1),a=Object(d.default)(e.skipColorSpaceConversion,!1);if(I(this.request),!M||this.isDataUri||this.isBlobUri||!this.hasHeaders&&!i)return R({resource:this,flipY:n,skipColorSpaceConversion:a,preferImageBitmap:t});var o,s,l,u=this.fetchBlob();return Object(c.default)(u)?j.supportsImageBitmapOptions().then((function(e){return o=e&&t,u})).then((function(e){if(Object(c.default)(e)){if(l=e,o)return j.createImageBitmapFromBlob(e,{flipY:n,premultiplyAlpha:!1,skipColorSpaceConversion:a});var t=window.URL.createObjectURL(e);return R({resource:s=new j({url:t}),flipY:n,skipColorSpaceConversion:a,preferImageBitmap:!1})}})).then((function(e){if(Object(c.default)(e))return e.blob=l,o||window.URL.revokeObjectURL(s.url),e})).otherwise((function(e){return Object(c.default)(s)&&window.URL.revokeObjectURL(s.url),e.blob=l,r.a.reject(e)})):void 0},j.fetchImage=function(e){return new j(e).fetchImage({flipY:e.flipY,skipColorSpaceConversion:e.skipColorSpaceConversion,preferBlob:e.preferBlob,preferImageBitmap:e.preferImageBitmap})},j.prototype.fetchText=function(){return this.fetch({responseType:"text"})},j.fetchText=function(e){return new j(e).fetchText()},j.prototype.fetchJson=function(){var e=this.fetch({responseType:"text",headers:{Accept:"application/json,*/*;q=0.01"}});if(Object(c.default)(e))return e.then((function(e){if(Object(c.default)(e))return JSON.parse(e)}))},j.fetchJson=function(e){return new j(e).fetchJson()},j.prototype.fetchXML=function(){return this.fetch({responseType:"document",overrideMimeType:"text/xml"})},j.fetchXML=function(e){return new j(e).fetchXML()},j.prototype.fetchJsonp=function(e){var t;e=Object(d.default)(e,"callback"),I(this.request);do{t="loadJsonp"+b.default.nextRandomNumber().toString().substring(2,8)}while(Object(c.default)(window[t]));return function e(t,i,n){var a={};a[i]=n,t.setQueryParameters(a);var o=t.request;o.url=t.url,o.requestFunction=function(){var e=r.a.defer();return window[n]=function(t){e.resolve(t);try{delete window[n]}catch(e){window[n]=void 0}},j._Implementations.loadAndExecuteScript(t.url,n,e),e.promise};var s=T.default.request(o);if(!Object(c.default)(s))return;return s.otherwise((function(a){return o.state!==E.a.FAILED?r.a.reject(a):t.retryOnError(a).then((function(s){return s?(o.state=E.a.UNISSUED,o.deferred=void 0,e(t,i,n)):r.a.reject(a)}))}))}(this,e,t)},j.fetchJsonp=function(e){return new j(e).fetchJsonp(e.callbackParameterName)},j.prototype._makeRequest=function(e){var t=this;I(t.request);var i=t.request;i.url=t.url,i.requestFunction=function(){var n=e.responseType,a=Object(u.default)(e.headers,t.headers),o=e.overrideMimeType,s=e.method,l=e.data,d=r.a.defer(),f=j._Implementations.loadWithXhr(t.url,n,s,l,a,d,o);return Object(c.default)(f)&&Object(c.default)(f.abort)&&(i.cancelFunction=function(){f.abort()}),d.promise};var n=T.default.request(i);if(Object(c.default)(n))return n.then((function(e){return i.cancelFunction=void 0,e})).otherwise((function(n){return i.cancelFunction=void 0,i.state!==E.a.FAILED?r.a.reject(n):t.retryOnError(n).then((function(a){return a?(i.state=E.a.UNISSUED,i.deferred=void 0,t.fetch(e)):r.a.reject(n)}))}))};var N=/^data:(.*?)(;base64)?,(.*)$/;function B(e,t){var i=decodeURIComponent(t);return e?atob(i):i}function F(e,t){for(var i=B(e,t),n=new ArrayBuffer(i.length),a=new Uint8Array(n),r=0;r=300)||p&&0===u.status){var e=u.response,i=u.responseType;if("HEAD"===n||"OPTIONS"===n){var a=u.getAllResponseHeaders().trim().split(/[\r\n]+/),r={};return a.forEach((function(e){var t=e.split(": "),i=t.shift();r[i]=t.join(": ")})),void o.resolve(r)}if(204===u.status)o.resolve();else if(!Object(c.default)(e)||Object(c.default)(t)&&i!==t)if("json"===t&&"string"==typeof e)try{o.resolve(JSON.parse(e))}catch(e){o.reject(e)}else(""===i||"document"===i)&&Object(c.default)(u.responseXML)&&u.responseXML.hasChildNodes()?o.resolve(u.responseXML):""!==i&&"text"!==i||!Object(c.default)(u.responseText)?o.reject(new C.a("Invalid XMLHttpRequest response type.")):o.resolve(u.responseText);else o.resolve(e)}else o.reject(new A.a(u.status,u.response,u.getAllResponseHeaders()))},u.onerror=function(e){o.reject(new A.a)},u.send(a),u}!function(e,t,n,a,r,o,s){var l=i(1185).parse(e),u=(l.protocol,i(969)),d=i(969),c={protocol:l.protocol,hostname:l.hostname,port:l.port,path:l.path,query:l.query,method:n,headers:r};u.request(c).on("response",(function(e){if(e.statusCode<200||e.statusCode>=300)o.reject(new A.a(e.statusCode,e,e.headers));else{var i=[];e.on("data",(function(e){i.push(e)})),e.on("end",(function(){var n=Buffer.concat(i);"gzip"===e.headers["content-encoding"]?d.gunzip(n,(function(e,i){e?o.reject(new C.a("Error decompressing response.")):o.resolve(k(i,t))})):o.resolve(k(n,t))}))}})).on("error",(function(e){o.reject(new A.a)})).end()}(e,t,n,0,r,o)}else o.resolve(function(e,t){t=Object(d.default)(t,"");var i=e[1],n=!!e[2],a=e[3];switch(t){case"":case"text":return B(n,a);case"arraybuffer":return F(n,a);case"blob":var r=F(n,a);return new Blob([r],{type:i});case"document":return(new DOMParser).parseFromString(B(n,a),i);case"json":return JSON.parse(B(n,a));default:throw new f.default("Unhandled responseType: "+t)}}(l,t))},j._Implementations.loadAndExecuteScript=function(e,t,i){return Object(y.a)(e,t).otherwise(i.reject)},j._DefaultImplementations={},j._DefaultImplementations.createImage=j._Implementations.createImage,j._DefaultImplementations.loadWithXhr=j._Implementations.loadWithXhr,j._DefaultImplementations.loadAndExecuteScript=j._Implementations.loadAndExecuteScript,j.DEFAULT=Object.freeze(new j({url:"undefined"==typeof document?"":document.location.href.split("?")[0]})),t.default=j},function(e,t,i){"use strict";(function(e,n,a){var r=i(967);const{toString:o}=Object.prototype,{getPrototypeOf:s}=Object,l=(u=Object.create(null),e=>{const t=o.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const d=e=>(e=e.toLowerCase(),t=>l(t)===e),c=e=>t=>typeof t===e,{isArray:f}=Array,h=c("undefined");const p=d("ArrayBuffer");const m=c("string"),_=c("function"),g=c("number"),v=e=>null!==e&&"object"==typeof e,y=e=>{if("object"!==l(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},b=d("Date"),w=d("File"),O=d("Blob"),x=d("FileList"),A=d("URLSearchParams"),[T,E,C,S]=["ReadableStream","Request","Response","Headers"].map(d);function M(e,t,{allOwnKeys:i=!1}={}){if(null==e)return;let n,a;if("object"!=typeof e&&(e=[e]),f(e))for(n=0,a=e.length;n0;)if(n=i[a],t===n.toLowerCase())return n;return null}const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,I=e=>!h(e)&&e!==P;const L=(j="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>j&&e instanceof j);var j;const R=d("HTMLFormElement"),N=(({hasOwnProperty:e})=>(t,i)=>e.call(t,i))(Object.prototype),B=d("RegExp"),F=(e,t)=>{const i=Object.getOwnPropertyDescriptors(e),n={};M(i,(i,a)=>{let r;!1!==(r=t(i,a,e))&&(n[a]=r||i)}),Object.defineProperties(e,n)},k="abcdefghijklmnopqrstuvwxyz",z={DIGIT:"0123456789",ALPHA:k,ALPHA_DIGIT:k+k.toUpperCase()+"0123456789"};const U=d("AsyncFunction"),V=(H="function"==typeof n,G=_(P.postMessage),H?n:G?(Y="axios@"+Math.random(),W=[],P.addEventListener("message",({source:e,data:t})=>{e===P&&t===Y&&W.length&&W.shift()()},!1),e=>{W.push(e),P.postMessage(Y,"*")}):e=>setTimeout(e));var H,G,Y,W;const q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(P):void 0!==a&&a.nextTick||V;t.a={isArray:f,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||_(e.append)&&("formdata"===(t=l(e))||"object"===t&&_(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:m,isNumber:g,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:y,isReadableStream:T,isRequest:E,isResponse:C,isHeaders:S,isUndefined:h,isDate:b,isFile:w,isBlob:O,isRegExp:B,isFunction:_,isStream:e=>v(e)&&_(e.pipe),isURLSearchParams:A,isTypedArray:L,isFileList:x,forEach:M,merge:function e(){const{caseless:t}=I(this)&&this||{},i={},n=(n,a)=>{const r=t&&D(i,a)||a;y(i[r])&&y(n)?i[r]=e(i[r],n):y(n)?i[r]=e({},n):f(n)?i[r]=n.slice():i[r]=n};for(let e=0,t=arguments.length;e(M(t,(t,n)=>{i&&_(t)?e[n]=Object(r.a)(t,i):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,i,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,t,i,n)=>{let a,r,o;const l={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),r=a.length;r-- >0;)o=a[r],n&&!n(o,e,t)||l[o]||(t[o]=e[o],l[o]=!0);e=!1!==i&&s(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:l,kindOfTest:d,endsWith:(e,t,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;const n=e.indexOf(t,i);return-1!==n&&n===i},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!g(t))return null;const i=new Array(t);for(;t-- >0;)i[t]=e[t];return i},forEachEntry:(e,t)=>{const i=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=i.next())&&!n.done;){const i=n.value;t.call(e,i[0],i[1])}},matchAll:(e,t)=>{let i;const n=[];for(;null!==(i=e.exec(t));)n.push(i);return n},isHTMLForm:R,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:F,freezeMethods:e=>{F(e,(t,i)=>{if(_(e)&&-1!==["arguments","caller","callee"].indexOf(i))return!1;const n=e[i];_(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")}))})},toObjectSet:(e,t)=>{const i={},n=e=>{e.forEach(e=>{i[e]=!0})};return f(e)?n(e):n(String(e).split(t)),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,i){return t.toUpperCase()+i})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:D,global:P,isContextDefined:I,ALPHABET:z,generateString:(e=16,t=z.ALPHA_DIGIT)=>{let i="";const{length:n}=t;for(;e--;)i+=t[Math.random()*n|0];return i},isSpecCompliantForm:function(e){return!!(e&&_(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),i=(e,n)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const a=f(e)?[]:{};return M(e,(e,t)=>{const r=i(e,n+1);!h(r)&&(a[t]=r)}),t[n]=void 0,a}}return e};return i(e,0)},isAsyncFn:U,isThenable:e=>e&&(v(e)||_(e))&&_(e.then)&&_(e.catch),setImmediate:V,asap:q}}).call(this,i(417),i(1205).setImmediate,i(971))},function(e,t,i){"use strict";i.r(t);var n=i(10),a={UNSIGNED_BYTE:n.a.UNSIGNED_BYTE,UNSIGNED_SHORT:n.a.UNSIGNED_SHORT,UNSIGNED_INT:n.a.UNSIGNED_INT,FLOAT:n.a.FLOAT,HALF_FLOAT:n.a.HALF_FLOAT_OES,UNSIGNED_INT_24_8:n.a.UNSIGNED_INT_24_8,UNSIGNED_SHORT_4_4_4_4:n.a.UNSIGNED_SHORT_4_4_4_4,UNSIGNED_SHORT_5_5_5_1:n.a.UNSIGNED_SHORT_5_5_5_1,UNSIGNED_SHORT_5_6_5:n.a.UNSIGNED_SHORT_5_6_5,toWebGLConstant:function(e,t){switch(e){case a.UNSIGNED_BYTE:return n.a.UNSIGNED_BYTE;case a.UNSIGNED_SHORT:return n.a.UNSIGNED_SHORT;case a.UNSIGNED_INT:return n.a.UNSIGNED_INT;case a.FLOAT:return n.a.FLOAT;case a.HALF_FLOAT:return t.webgl2?n.a.HALF_FLOAT:n.a.HALF_FLOAT_OES;case a.UNSIGNED_INT_24_8:return n.a.UNSIGNED_INT_24_8;case a.UNSIGNED_SHORT_4_4_4_4:return n.a.UNSIGNED_SHORT_4_4_4_4;case a.UNSIGNED_SHORT_5_5_5_1:return n.a.UNSIGNED_SHORT_5_5_5_1;case a.UNSIGNED_SHORT_5_6_5:return a.UNSIGNED_SHORT_5_6_5}},isPacked:function(e){return e===a.UNSIGNED_INT_24_8||e===a.UNSIGNED_SHORT_4_4_4_4||e===a.UNSIGNED_SHORT_5_5_5_1||e===a.UNSIGNED_SHORT_5_6_5},sizeInBytes:function(e){switch(e){case a.UNSIGNED_BYTE:return 1;case a.UNSIGNED_SHORT:case a.UNSIGNED_SHORT_4_4_4_4:case a.UNSIGNED_SHORT_5_5_5_1:case a.UNSIGNED_SHORT_5_6_5:case a.HALF_FLOAT:return 2;case a.UNSIGNED_INT:case a.FLOAT:case a.UNSIGNED_INT_24_8:return 4}},validate:function(e){return e===a.UNSIGNED_BYTE||e===a.UNSIGNED_SHORT||e===a.UNSIGNED_INT||e===a.FLOAT||e===a.HALF_FLOAT||e===a.UNSIGNED_INT_24_8||e===a.UNSIGNED_SHORT_4_4_4_4||e===a.UNSIGNED_SHORT_5_5_5_1||e===a.UNSIGNED_SHORT_5_6_5}};t.default=Object.freeze(a)},function(e,t,i){"use strict";i.r(t);var n=i(32),a=i(10),r={DEPTH_COMPONENT:a.a.DEPTH_COMPONENT,DEPTH_STENCIL:a.a.DEPTH_STENCIL,ALPHA:a.a.ALPHA,RGB:a.a.RGB,RGBA:a.a.RGBA,LUMINANCE:a.a.LUMINANCE,LUMINANCE_ALPHA:a.a.LUMINANCE_ALPHA,RGB_DXT1:a.a.COMPRESSED_RGB_S3TC_DXT1_EXT,RGBA_DXT1:a.a.COMPRESSED_RGBA_S3TC_DXT1_EXT,RGBA_DXT3:a.a.COMPRESSED_RGBA_S3TC_DXT3_EXT,RGBA_DXT5:a.a.COMPRESSED_RGBA_S3TC_DXT5_EXT,RGB_PVRTC_4BPPV1:a.a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG,RGB_PVRTC_2BPPV1:a.a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG,RGBA_PVRTC_4BPPV1:a.a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,RGBA_PVRTC_2BPPV1:a.a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,RGBA_ASTC:a.a.COMPRESSED_RGBA_ASTC_4x4_WEBGL,RGB_ETC1:a.a.COMPRESSED_RGB_ETC1_WEBGL,RGB8_ETC2:a.a.COMPRESSED_RGB8_ETC2,RGBA8_ETC2_EAC:a.a.COMPRESSED_RGBA8_ETC2_EAC,RGBA_BC7:a.a.COMPRESSED_RGBA_BPTC_UNORM,componentsLength:function(e){switch(e){case r.RGB:return 3;case r.RGBA:return 4;case r.LUMINANCE_ALPHA:return 2;case r.ALPHA:case r.LUMINANCE:default:return 1}},validate:function(e){return e===r.DEPTH_COMPONENT||e===r.DEPTH_STENCIL||e===r.ALPHA||e===r.RGB||e===r.RGBA||e===r.LUMINANCE||e===r.LUMINANCE_ALPHA||e===r.RGB_DXT1||e===r.RGBA_DXT1||e===r.RGBA_DXT3||e===r.RGBA_DXT5||e===r.RGB_PVRTC_4BPPV1||e===r.RGB_PVRTC_2BPPV1||e===r.RGBA_PVRTC_4BPPV1||e===r.RGBA_PVRTC_2BPPV1||e===r.RGBA_ASTC||e===r.RGB_ETC1||e===r.RGB8_ETC2||e===r.RGBA8_ETC2_EAC||e===r.RGBA_BC7},isColorFormat:function(e){return e===r.ALPHA||e===r.RGB||e===r.RGBA||e===r.LUMINANCE||e===r.LUMINANCE_ALPHA},isDepthFormat:function(e){return e===r.DEPTH_COMPONENT||e===r.DEPTH_STENCIL},isCompressedFormat:function(e){return e===r.RGB_DXT1||e===r.RGBA_DXT1||e===r.RGBA_DXT3||e===r.RGBA_DXT5||e===r.RGB_PVRTC_4BPPV1||e===r.RGB_PVRTC_2BPPV1||e===r.RGBA_PVRTC_4BPPV1||e===r.RGBA_PVRTC_2BPPV1||e===r.RGBA_ASTC||e===r.RGB_ETC1||e===r.RGB8_ETC2||e===r.RGBA8_ETC2_EAC||e===r.RGBA_BC7},isDXTFormat:function(e){return e===r.RGB_DXT1||e===r.RGBA_DXT1||e===r.RGBA_DXT3||e===r.RGBA_DXT5},isPVRTCFormat:function(e){return e===r.RGB_PVRTC_4BPPV1||e===r.RGB_PVRTC_2BPPV1||e===r.RGBA_PVRTC_4BPPV1||e===r.RGBA_PVRTC_2BPPV1},isASTCFormat:function(e){return e===r.RGBA_ASTC},isETC1Format:function(e){return e===r.RGB_ETC1},isETC2Format:function(e){return e===r.RGB8_ETC2||e===r.RGBA8_ETC2_EAC},isBC7Format:function(e){return e===r.RGBA_BC7},compressedTextureSizeInBytes:function(e,t,i){switch(e){case r.RGB_DXT1:case r.RGBA_DXT1:case r.RGB_ETC1:case r.RGB8_ETC2:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*8;case r.RGBA_DXT3:case r.RGBA_DXT5:case r.RGBA_ASTC:case r.RGBA8_ETC2_EAC:return Math.floor((t+3)/4)*Math.floor((i+3)/4)*16;case r.RGB_PVRTC_4BPPV1:case r.RGBA_PVRTC_4BPPV1:return Math.floor((Math.max(t,8)*Math.max(i,8)*4+7)/8);case r.RGB_PVRTC_2BPPV1:case r.RGBA_PVRTC_2BPPV1:return Math.floor((Math.max(t,16)*Math.max(i,8)*2+7)/8);case r.RGBA_BC7:return Math.ceil(t/4)*Math.ceil(i/4)*16;default:return 0}},textureSizeInBytes:function(e,t,i,a){var o=r.componentsLength(e);return n.default.isPacked(t)&&(o=1),o*n.default.sizeInBytes(t)*i*a},alignmentInBytes:function(e,t,i){var n=r.textureSizeInBytes(e,t,i,1)%4;return 0===n?4:2===n?2:1},createTypedArray:function(e,t,i,a){var o=n.default.sizeInBytes(t);return new(o===Uint8Array.BYTES_PER_ELEMENT?Uint8Array:o===Uint16Array.BYTES_PER_ELEMENT?Uint16Array:o===Float32Array.BYTES_PER_ELEMENT&&t===n.default.FLOAT?Float32Array:Uint32Array)(r.componentsLength(e)*i*a)},flipY:function(e,t,i,n,a){if(1===a)return e;for(var o=r.createTypedArray(t,i,n,a),s=r.componentsLength(t),l=n*s,u=0;u0;){var n=e.pop();i.push(n),0===n.requiredBy.length&&t.push(n)}for(;t.length>0;){var a=t.shift();e.push(a);for(var o=0;o=0;--o)n=n+t[o].glslSource+"\n";return n.replace(i.glslSource,"")}function f(e,t,i){var n,s,l,d="",f=e.sources;if(Object(a.default)(f))for(n=0,s=f.length;n>>0;for(t=0;t0)for(i=0;i=0?i?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,i=[];for(t in e)s(e,t)&&i.push(t);return i};var I=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,L=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},R={};function N(e,t,i,n){var a=n;"string"==typeof n&&(a=function(){return this[n]()}),e&&(R[e]=a),t&&(R[t[0]]=function(){return P(a.apply(this,arguments),t[1],t[2])}),i&&(R[i]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function B(e,t){return e.isValid()?(t=F(t,e.localeData()),j[t]=j[t]||function(e){var t,i,n,a=e.match(I);for(t=0,i=a.length;t=0&&L.test(e);)e=e.replace(L,n),L.lastIndex=0,i-=1;return e}var k={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function z(e){return"string"==typeof e?k[e]||k[e.toLowerCase()]:void 0}function U(e){var t,i,n={};for(i in e)s(e,i)&&(t=z(i))&&(n[t]=e[i]);return n}var V,H={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1},G=/\d/,Y=/\d\d/,W=/\d{3}/,q=/\d{4}/,X=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,Z=/\d\d\d\d\d\d?/,Q=/\d{1,3}/,$=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ie=/[+-]?\d+/,ne=/Z|[+-]\d\d:?\d\d/gi,ae=/Z|[+-]\d\d(?::?\d\d)?/gi,re=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe=/^[1-9]\d?/,se=/^([1-9]\d|\d)/;function le(e,t,i){V[e]=S(t)?t:function(e,n){return e&&i?i:t}}function ue(e,t){return s(V,e)?V[e](t._strict,t._locale):new RegExp(de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,i,n,a){return t||i||n||a}))))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function fe(e){var t=+e,i=0;return 0!==t&&isFinite(t)&&(i=ce(t)),i}V={};var he={};function pe(e,t){var i,n,a=t;for("string"==typeof e&&(e=[e]),d(t)&&(a=function(e,i){i[t]=fe(e)}),n=e.length,i=0;i68?1900:2e3)};var ye,be=we("FullYear",!0);function we(e,t){return function(i){return null!=i?(xe(this,e,i),a.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){if(!e.isValid())return NaN;var i=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?i.getUTCMilliseconds():i.getMilliseconds();case"Seconds":return n?i.getUTCSeconds():i.getSeconds();case"Minutes":return n?i.getUTCMinutes():i.getMinutes();case"Hours":return n?i.getUTCHours():i.getHours();case"Date":return n?i.getUTCDate():i.getDate();case"Day":return n?i.getUTCDay():i.getDay();case"Month":return n?i.getUTCMonth():i.getMonth();case"FullYear":return n?i.getUTCFullYear():i.getFullYear();default:return NaN}}function xe(e,t,i){var n,a,r,o,s;if(e.isValid()&&!isNaN(i)){switch(n=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?n.setUTCMilliseconds(i):n.setMilliseconds(i));case"Seconds":return void(a?n.setUTCSeconds(i):n.setSeconds(i));case"Minutes":return void(a?n.setUTCMinutes(i):n.setMinutes(i));case"Hours":return void(a?n.setUTCHours(i):n.setHours(i));case"Date":return void(a?n.setUTCDate(i):n.setDate(i));case"FullYear":break;default:return}r=i,o=e.month(),s=29!==(s=e.date())||1!==o||ge(r)?s:28,a?n.setUTCFullYear(r,o,s):n.setFullYear(r,o,s)}}function Ae(e,t){if(isNaN(e)||isNaN(t))return NaN;var i,n=(t%(i=12)+i)%i;return e+=(t-n)/12,1===n?ge(e)?29:28:31-n%7%2}ye=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0?(s=new Date(e+400,t,i,n,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,i,n,a,r,o),s}function Re(e){var t,i;return e<100&&e>=0?((i=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,i)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,i){var n=7+t-i;return-(7+Re(e,0,n).getUTCDay()-t)%7+n-1}function Be(e,t,i,n,a){var r,o,s=1+7*(t-1)+(7+i-n)%7+Ne(e,n,a);return s<=0?o=ve(r=e-1)+s:s>ve(e)?(r=e+1,o=s-ve(e)):(r=e,o=s),{year:r,dayOfYear:o}}function Fe(e,t,i){var n,a,r=Ne(e.year(),t,i),o=Math.floor((e.dayOfYear()-r-1)/7)+1;return o<1?n=o+ke(a=e.year()-1,t,i):o>ke(e.year(),t,i)?(n=o-ke(e.year(),t,i),a=e.year()+1):(a=e.year(),n=o),{week:n,year:a}}function ke(e,t,i){var n=Ne(e,t,i),a=Ne(e+1,t,i);return(ve(e)-n+a)/7}function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),le("w",K,oe),le("ww",K,Y),le("W",K,oe),le("WW",K,Y),me(["w","ww","W","WW"],(function(e,t,i,n){t[n.substr(0,1)]=fe(e)})),N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),le("d",K),le("e",K),le("E",K),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),me(["dd","ddd","dddd"],(function(e,t,i,n){var a=i._locale.weekdaysParse(e,n,i._strict);null!=a?t.d=a:m(i).invalidWeekday=e})),me(["d","e","E"],(function(e,t,i,n){t[n]=fe(e)}));var Ue="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),He="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ge=re,Ye=re,We=re;function qe(e,t,i){var n,a,r,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)r=p([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(r,"").toLocaleLowerCase();return i?"dddd"===t?-1!==(a=ye.call(this._weekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ye.call(this._shortWeekdaysParse,o))?a:null:-1!==(a=ye.call(this._minWeekdaysParse,o))?a:null:"dddd"===t?-1!==(a=ye.call(this._weekdaysParse,o))||-1!==(a=ye.call(this._shortWeekdaysParse,o))||-1!==(a=ye.call(this._minWeekdaysParse,o))?a:null:"ddd"===t?-1!==(a=ye.call(this._shortWeekdaysParse,o))||-1!==(a=ye.call(this._weekdaysParse,o))||-1!==(a=ye.call(this._minWeekdaysParse,o))?a:null:-1!==(a=ye.call(this._minWeekdaysParse,o))||-1!==(a=ye.call(this._weekdaysParse,o))||-1!==(a=ye.call(this._shortWeekdaysParse,o))?a:null}function Xe(){function e(e,t){return t.length-e.length}var t,i,n,a,r,o=[],s=[],l=[],u=[];for(t=0;t<7;t++)i=p([2e3,1]).day(t),n=de(this.weekdaysMin(i,"")),a=de(this.weekdaysShort(i,"")),r=de(this.weekdays(i,"")),o.push(n),s.push(a),l.push(r),u.push(n),u.push(a),u.push(r);o.sort(e),s.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ke(){return this.hours()%12||12}function Je(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Ze(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Ke),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Ke.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),Je("a",!0),Je("A",!1),le("a",Ze),le("A",Ze),le("H",K,se),le("h",K,oe),le("k",K,oe),le("HH",K,Y),le("hh",K,Y),le("kk",K,Y),le("hmm",J),le("hmmss",Z),le("Hmm",J),le("Hmmss",Z),pe(["H","HH"],3),pe(["k","kk"],(function(e,t,i){var n=fe(e);t[3]=24===n?0:n})),pe(["a","A"],(function(e,t,i){i._isPm=i._locale.isPM(e),i._meridiem=e})),pe(["h","hh"],(function(e,t,i){t[3]=fe(e),m(i).bigHour=!0})),pe("hmm",(function(e,t,i){var n=e.length-2;t[3]=fe(e.substr(0,n)),t[4]=fe(e.substr(n)),m(i).bigHour=!0})),pe("hmmss",(function(e,t,i){var n=e.length-4,a=e.length-2;t[3]=fe(e.substr(0,n)),t[4]=fe(e.substr(n,2)),t[5]=fe(e.substr(a)),m(i).bigHour=!0})),pe("Hmm",(function(e,t,i){var n=e.length-2;t[3]=fe(e.substr(0,n)),t[4]=fe(e.substr(n))})),pe("Hmmss",(function(e,t,i){var n=e.length-4,a=e.length-2;t[3]=fe(e.substr(0,n)),t[4]=fe(e.substr(n,2)),t[5]=fe(e.substr(a))}));var Qe,$e=we("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ee,week:{dow:0,doy:6},weekdays:Ue,weekdaysMin:He,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},tt={},it={};function nt(e,t){var i,n=Math.min(e.length,t.length);for(i=0;i0;){if(n=rt(a.slice(0,t).join("-")))return n;if(i&&i.length>=t&&nt(a,i)>=t-1)break;t--}r++}return Qe}(e)}function ut(e){var t,i=e._a;return i&&-2===m(e).overflow&&(t=i[1]<0||i[1]>11?1:i[2]<1||i[2]>Ae(i[0],i[1])?2:i[3]<0||i[3]>24||24===i[3]&&(0!==i[4]||0!==i[5]||0!==i[6])?3:i[4]<0||i[4]>59?4:i[5]<0||i[5]>59?5:i[6]<0||i[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var dt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ct=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/Z|[+-]\d\d(?::?\d\d)?/,ht=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((-?\d+)/i,_t=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,gt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e){var t,i,n,a,r,o,s=e._i,l=dt.exec(s)||ct.exec(s),u=ht.length,d=pt.length;if(l){for(m(e).iso=!0,t=0,i=u;t7)&&(l=!0)):(r=e._locale._week.dow,o=e._locale._week.doy,u=Fe(Et(),r,o),i=wt(t.gg,e._a[0],u.year),n=wt(t.w,u.week),null!=t.d?((a=t.d)<0||a>6)&&(l=!0):null!=t.e?(a=t.e+r,(t.e<0||t.e>6)&&(l=!0)):a=r),n<1||n>ke(i,r,o)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(s=Be(i,n,a,r,o),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(o=wt(e._a[0],n[0]),(e._dayOfYear>ve(o)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),i=Re(o,0,e._dayOfYear),e._a[1]=i.getUTCMonth(),e._a[2]=i.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=n[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?Re:je).apply(null,s),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0)}}function xt(e){if(e._f!==a.ISO_8601)if(e._f!==a.RFC_2822){e._a=[],m(e).empty=!0;var t,i,n,r,o,s,l,u=""+e._i,d=u.length,c=0;for(l=(n=F(e._f,e._locale).match(I)||[]).length,t=0;t0&&m(e).unusedInput.push(o),u=u.slice(u.indexOf(i)+i.length),c+=i.length),R[r]?(i?m(e).empty=!1:m(e).unusedTokens.push(r),_e(r,i,e)):e._strict&&!i&&m(e).unusedTokens.push(r);m(e).charsLeftOver=d-c,u.length>0&&m(e).unusedInput.push(u),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,i){var n;return null==i?t:null!=e.meridiemHour?e.meridiemHour(t,i):null!=e.isPM?((n=e.isPM(i))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),Ot(e),ut(e)}else bt(e);else vt(e)}function At(e){var t=e._i,i=e._f;return e._locale=e._locale||lt(e._l),null===t||void 0===i&&""===t?g({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),O(t)?new w(ut(t)):(c(t)?e._d=t:r(i)?function(e){var t,i,n,a,r,o,s=!1,l=e._f.length;if(0===l)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(a=0;athis?this:e:g()}));function Mt(e,t){var i,n;if(1===t.length&&r(t[0])&&(t=t[0]),!t.length)return Et();for(i=t[0],n=1;n=0?new Date(e+400,t,i)-126227808e5:new Date(e,t,i).valueOf()}function ai(e,t,i){return e<100&&e>=0?Date.UTC(e+400,t,i)-126227808e5:Date.UTC(e,t,i)}function ri(e,t){return t.erasAbbrRegex(e)}function oi(){var e,t,i,n,a,r=[],o=[],s=[],l=[],u=this.eras();for(e=0,t=u.length;e(r=ke(e,n,a))&&(t=r),ui.call(this,e,t,i,n,a))}function ui(e,t,i,n,a){var r=Be(e,t,i,n,a),o=Re(r.year,0,r.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),le("N",ri),le("NN",ri),le("NNN",ri),le("NNNN",(function(e,t){return t.erasNameRegex(e)})),le("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),pe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,i,n){var a=i._locale.erasParse(e,n,i._strict);a?m(i).era=a:m(i).invalidEra=e})),le("y",te),le("yy",te),le("yyy",te),le("yyyy",te),le("yo",(function(e,t){return t._eraYearOrdinalRegex||te})),pe(["y","yy","yyy","yyyy"],0),pe(["yo"],(function(e,t,i,n){var a;i._locale._eraYearOrdinalRegex&&(a=e.match(i._locale._eraYearOrdinalRegex)),i._locale.eraYearOrdinalParse?t[0]=i._locale.eraYearOrdinalParse(e,a):t[0]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),si("gggg","weekYear"),si("ggggg","weekYear"),si("GGGG","isoWeekYear"),si("GGGGG","isoWeekYear"),le("G",ie),le("g",ie),le("GG",K,Y),le("gg",K,Y),le("GGGG",$,q),le("gggg",$,q),le("GGGGG",ee,X),le("ggggg",ee,X),me(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,i,n){t[n.substr(0,2)]=fe(e)})),me(["gg","GG"],(function(e,t,i,n){t[n]=a.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),le("Q",G),pe("Q",(function(e,t){t[1]=3*(fe(e)-1)})),N("D",["DD",2],"Do","date"),le("D",K,oe),le("DD",K,Y),le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],2),pe("Do",(function(e,t){t[2]=fe(e.match(K)[0])}));var di=we("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),le("DDD",Q),le("DDDD",W),pe(["DDD","DDDD"],(function(e,t,i){i._dayOfYear=fe(e)})),N("m",["mm",2],0,"minute"),le("m",K,se),le("mm",K,Y),pe(["m","mm"],4);var ci=we("Minutes",!1);N("s",["ss",2],0,"second"),le("s",K,se),le("ss",K,Y),pe(["s","ss"],5);var fi,hi,pi=we("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),le("S",Q,G),le("SS",Q,Y),le("SSS",Q,W),fi="SSSS";fi.length<=9;fi+="S")le(fi,te);function mi(e,t){t[6]=fe(1e3*("0."+e))}for(fi="S";fi.length<=9;fi+="S")pe(fi,mi);hi=we("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var _i=w.prototype;function gi(e){return e}_i.add=qt,_i.calendar=function(e,t){1===arguments.length&&(arguments[0]?Jt(arguments[0])?(e=arguments[0],t=void 0):Zt(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var i=e||Et(),n=Bt(i,this).startOf("day"),r=a.calendarFormat(this,n)||"sameElse",o=t&&(S(t[r])?t[r].call(this,i):t[r]);return this.format(o||this.localeData().calendar(r,this,Et(i)))},_i.clone=function(){return new w(this)},_i.diff=function(e,t,i){var n,a,r;if(!this.isValid())return NaN;if(!(n=Bt(e,this)).isValid())return NaN;switch(a=6e4*(n.utcOffset()-this.utcOffset()),t=z(t)){case"year":r=Qt(this,n)/12;break;case"month":r=Qt(this,n);break;case"quarter":r=Qt(this,n)/3;break;case"second":r=(this-n)/1e3;break;case"minute":r=(this-n)/6e4;break;case"hour":r=(this-n)/36e5;break;case"day":r=(this-n-a)/864e5;break;case"week":r=(this-n-a)/6048e5;break;default:r=this-n}return i?r:ce(r)},_i.endOf=function(e){var t,i;if(void 0===(e=z(e))||"millisecond"===e||!this.isValid())return this;switch(i=this._isUTC?ai:ni,e){case"year":t=i(this.year()+1,0,1)-1;break;case"quarter":t=i(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=i(this.year(),this.month()+1,1)-1;break;case"week":t=i(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=i(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=i(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-ii(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-ii(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-ii(t,1e3)-1}return this._d.setTime(t),a.updateOffset(this,!0),this},_i.format=function(e){e||(e=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var t=B(this,e);return this.localeData().postformat(t)},_i.from=function(e,t){return this.isValid()&&(O(e)&&e.isValid()||Et(e).isValid())?Vt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_i.fromNow=function(e){return this.from(Et(),e)},_i.to=function(e,t){return this.isValid()&&(O(e)&&e.isValid()||Et(e).isValid())?Vt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},_i.toNow=function(e){return this.to(Et(),e)},_i.get=function(e){return S(this[e=z(e)])?this[e]():this},_i.invalidAt=function(){return m(this).overflow},_i.isAfter=function(e,t){var i=O(e)?e:Et(e);return!(!this.isValid()||!i.isValid())&&("millisecond"===(t=z(t)||"millisecond")?this.valueOf()>i.valueOf():i.valueOf()9999?B(i,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):S(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",B(i,"Z")):B(i,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},_i.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,i,n="moment",a="";return this.isLocal()||(n=0===this.utcOffset()?"moment.utc":"moment.parseZone",a="Z"),e="["+n+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=a+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+i)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(_i[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),_i.toJSON=function(){return this.isValid()?this.toISOString():null},_i.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},_i.unix=function(){return Math.floor(this.valueOf()/1e3)},_i.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},_i.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},_i.eraName=function(){var e,t,i,n=this.localeData().eras();for(e=0,t=n.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},_i.isLocal=function(){return!!this.isValid()&&!this._isUTC},_i.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},_i.isUtc=kt,_i.isUTC=kt,_i.zoneAbbr=function(){return this._isUTC?"UTC":""},_i.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},_i.dates=A("dates accessor is deprecated. Use date instead.",di),_i.months=A("months accessor is deprecated. Use month instead",Ie),_i.years=A("years accessor is deprecated. Use year instead",be),_i.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),_i.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=At(t))._a?(e=t._isUTC?p(t._a):Et(t._a),this._isDSTShifted=this.isValid()&&function(e,t,i){var n,a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),o=0;for(n=0;n0):this._isDSTShifted=!1,this._isDSTShifted}));var vi=D.prototype;function yi(e,t,i,n){var a=lt(),r=p().set(n,t);return a[i](r,e)}function bi(e,t,i){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return yi(e,t,i,"month");var n,a=[];for(n=0;n<12;n++)a[n]=yi(e,n,i,"month");return a}function wi(e,t,i,n){"boolean"==typeof e?(d(t)&&(i=t,t=void 0),t=t||""):(i=t=e,e=!1,d(t)&&(i=t,t=void 0),t=t||"");var a,r=lt(),o=e?r._week.dow:0,s=[];if(null!=i)return yi(t,(i+o)%7,n,"day");for(a=0;a<7;a++)s[a]=yi(t,(a+o)%7,n,"day");return s}vi.calendar=function(e,t,i){var n=this._calendar[e]||this._calendar.sameElse;return S(n)?n.call(t,i):n},vi.longDateFormat=function(e){var t=this._longDateFormat[e],i=this._longDateFormat[e.toUpperCase()];return t||!i?t:(this._longDateFormat[e]=i.match(I).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},vi.invalidDate=function(){return this._invalidDate},vi.ordinal=function(e){return this._ordinal.replace("%d",e)},vi.preparse=gi,vi.postformat=gi,vi.relativeTime=function(e,t,i,n){var a=this._relativeTime[i];return S(a)?a(e,t,i,n):a.replace(/%d/i,e)},vi.pastFuture=function(e,t){var i=this._relativeTime[e>0?"future":"past"];return S(i)?i(t):i.replace(/%s/i,t)},vi.set=function(e){var t,i;for(i in e)s(e,i)&&(S(t=e[i])?this[i]=t:this["_"+i]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vi.eras=function(e,t){var i,n,r,o=this._eras||lt("en")._eras;for(i=0,n=o.length;i=0)return l[n]},vi.erasConvertYear=function(e,t){var i=e.since<=e.until?1:-1;return void 0===t?a(e.since).year():a(e.since).year()+(t-e.offset)*i},vi.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||oi.call(this),e?this._erasAbbrRegex:this._erasRegex},vi.erasNameRegex=function(e){return s(this,"_erasNameRegex")||oi.call(this),e?this._erasNameRegex:this._erasRegex},vi.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||oi.call(this),e?this._erasNarrowRegex:this._erasRegex},vi.months=function(e,t){return e?r(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ce).test(t)?"format":"standalone"][e.month()]:r(this._months)?this._months:this._months.standalone},vi.monthsShort=function(e,t){return e?r(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ce.test(t)?"format":"standalone"][e.month()]:r(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vi.monthsParse=function(e,t,i){var n,a,r;if(this._monthsParseExact)return De.call(this,e,t,i);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=p([2e3,n]),i&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),i||this._monthsParse[n]||(r="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(r.replace(".",""),"i")),i&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(i&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!i&&this._monthsParse[n].test(e))return n}},vi.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Le.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Me),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vi.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Le.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Se),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vi.week=function(e){return Fe(e,this._week.dow,this._week.doy).week},vi.firstDayOfYear=function(){return this._week.doy},vi.firstDayOfWeek=function(){return this._week.dow},vi.weekdays=function(e,t){var i=r(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(i,this._week.dow):e?i[e.day()]:i},vi.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vi.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vi.weekdaysParse=function(e,t,i){var n,a,r;if(this._weekdaysParseExact)return qe.call(this,e,t,i);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=p([2e3,1]).day(n),i&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(r="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(r.replace(".",""),"i")),i&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(i&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(i&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!i&&this._weekdaysParse[n].test(e))return n}},vi.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ge),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vi.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ye),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vi.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=We),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vi.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vi.meridiem=function(e,t,i){return e>11?i?"pm":"PM":i?"am":"AM"},ot("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===fe(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),a.lang=A("moment.lang is deprecated. Use moment.locale instead.",ot),a.langData=A("moment.langData is deprecated. Use moment.localeData instead.",lt);var Oi=Math.abs;function xi(e,t,i,n){var a=Vt(t,i);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function Ai(e){return e<0?Math.floor(e):Math.ceil(e)}function Ti(e){return 4800*e/146097}function Ei(e){return 146097*e/4800}function Ci(e){return function(){return this.as(e)}}var Si=Ci("ms"),Mi=Ci("s"),Di=Ci("m"),Pi=Ci("h"),Ii=Ci("d"),Li=Ci("w"),ji=Ci("M"),Ri=Ci("Q"),Ni=Ci("y"),Bi=Si;function Fi(e){return function(){return this.isValid()?this._data[e]:NaN}}var ki=Fi("milliseconds"),zi=Fi("seconds"),Ui=Fi("minutes"),Vi=Fi("hours"),Hi=Fi("days"),Gi=Fi("months"),Yi=Fi("years"),Wi=Math.round,qi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Xi(e,t,i,n,a){return a.relativeTime(t||1,!!i,e,n)}var Ki=Math.abs;function Ji(e){return(e>0)-(e<0)||+e}function Zi(){if(!this.isValid())return this.localeData().invalidDate();var e,t,i,n,a,r,o,s,l=Ki(this._milliseconds)/1e3,u=Ki(this._days),d=Ki(this._months),c=this.asSeconds();return c?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,i=ce(d/12),d%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",a=c<0?"-":"",r=Ji(this._months)!==Ji(c)?"-":"",o=Ji(this._days)!==Ji(c)?"-":"",s=Ji(this._milliseconds)!==Ji(c)?"-":"",a+"P"+(i?r+i+"Y":"")+(d?r+d+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(l?s+n+"S":"")):"P0D"}var Qi=Pt.prototype;return Qi.isValid=function(){return this._isValid},Qi.abs=function(){var e=this._data;return this._milliseconds=Oi(this._milliseconds),this._days=Oi(this._days),this._months=Oi(this._months),e.milliseconds=Oi(e.milliseconds),e.seconds=Oi(e.seconds),e.minutes=Oi(e.minutes),e.hours=Oi(e.hours),e.months=Oi(e.months),e.years=Oi(e.years),this},Qi.add=function(e,t){return xi(this,e,t,1)},Qi.subtract=function(e,t){return xi(this,e,t,-1)},Qi.as=function(e){if(!this.isValid())return NaN;var t,i,n=this._milliseconds;if("month"===(e=z(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,i=this._months+Ti(t),e){case"month":return i;case"quarter":return i/3;case"year":return i/12}else switch(t=this._days+Math.round(Ei(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}},Qi.asMilliseconds=Si,Qi.asSeconds=Mi,Qi.asMinutes=Di,Qi.asHours=Pi,Qi.asDays=Ii,Qi.asWeeks=Li,Qi.asMonths=ji,Qi.asQuarters=Ri,Qi.asYears=Ni,Qi.valueOf=Bi,Qi._bubble=function(){var e,t,i,n,a,r=this._milliseconds,o=this._days,s=this._months,l=this._data;return r>=0&&o>=0&&s>=0||r<=0&&o<=0&&s<=0||(r+=864e5*Ai(Ei(s)+o),o=0,s=0),l.milliseconds=r%1e3,e=ce(r/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,i=ce(t/60),l.hours=i%24,o+=ce(i/24),a=ce(Ti(o)),s+=a,o-=Ai(Ei(a)),n=ce(s/12),s%=12,l.days=o,l.months=s,l.years=n,this},Qi.clone=function(){return Vt(this)},Qi.get=function(e){return e=z(e),this.isValid()?this[e+"s"]():NaN},Qi.milliseconds=ki,Qi.seconds=zi,Qi.minutes=Ui,Qi.hours=Vi,Qi.days=Hi,Qi.weeks=function(){return ce(this.days()/7)},Qi.months=Gi,Qi.years=Yi,Qi.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var i,n,a=!1,r=qi;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(a=e),"object"==typeof t&&(r=Object.assign({},qi,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),i=this.localeData(),n=function(e,t,i,n){var a=Vt(e).abs(),r=Wi(a.as("s")),o=Wi(a.as("m")),s=Wi(a.as("h")),l=Wi(a.as("d")),u=Wi(a.as("M")),d=Wi(a.as("w")),c=Wi(a.as("y")),f=r<=i.ss&&["s",r]||r0,f[4]=n,Xi.apply(null,f)}(this,!a,r,i),a&&(n=i.pastFuture(+this,n)),i.postformat(n)},Qi.toISOString=Zi,Qi.toString=Zi,Qi.toJSON=Zi,Qi.locale=$t,Qi.localeData=ti,Qi.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Zi),Qi.lang=ei,N("X",0,0,"unix"),N("x",0,0,"valueOf"),le("x",ie),le("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,i){i._d=new Date(1e3*parseFloat(e))})),pe("x",(function(e,t,i){i._d=new Date(fe(e))})), //! moment.js a.version="2.30.1",t=Et,a.fn=_i,a.min=function(){var e=[].slice.call(arguments,0);return Mt("isBefore",e)},a.max=function(){var e=[].slice.call(arguments,0);return Mt("isAfter",e)},a.now=function(){return Date.now?Date.now():+new Date},a.utc=p,a.unix=function(e){return Et(1e3*e)},a.months=function(e,t){return bi(e,t,"months")},a.isDate=c,a.locale=ot,a.invalid=g,a.duration=Vt,a.isMoment=O,a.weekdays=function(e,t,i){return wi(e,t,i,"weekdays")},a.parseZone=function(){return Et.apply(null,arguments).parseZone()},a.localeData=lt,a.isDuration=It,a.monthsShort=function(e,t){return bi(e,t,"monthsShort")},a.weekdaysMin=function(e,t,i){return wi(e,t,i,"weekdaysMin")},a.defineLocale=st,a.updateLocale=function(e,t){if(null!=t){var i,n,a=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(M(tt[e]._config,t)):(null!=(n=rt(e))&&(a=n._config),t=M(a,t),null==n&&(t.abbr=e),(i=new D(t)).parentLocale=tt[e],tt[e]=i),ot(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===ot()&&ot(e)):null!=tt[e]&&delete tt[e]);return tt[e]},a.locales=function(){return T(tt)},a.weekdaysShort=function(e,t,i){return wi(e,t,i,"weekdaysShort")},a.normalizeUnits=z,a.relativeTimeRounding=function(e){return void 0===e?Wi:"function"==typeof e&&(Wi=e,!0)},a.relativeTimeThreshold=function(e,t){return void 0!==qi[e]&&(void 0===t?qi[e]:(qi[e]=t,"s"===e&&(qi.ss=t-1),!0))},a.calendarFormat=function(e,t){var i=e.diff(t,"days",!0);return i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse"},a.prototype=_i,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a}()}).call(this,i(985)(e))},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(5),o=i(10),s={UNSIGNED_BYTE:o.a.UNSIGNED_BYTE,UNSIGNED_SHORT:o.a.UNSIGNED_SHORT,UNSIGNED_INT:o.a.UNSIGNED_INT,getSizeInBytes:function(e){switch(e){case s.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case s.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case s.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT}throw new a.default("indexDatatype is required and must be a valid IndexDatatype constant.")},fromSizeInBytes:function(e){switch(e){case 2:return s.UNSIGNED_SHORT;case 4:return s.UNSIGNED_INT;case 1:return s.UNSIGNED_BYTE;default:throw new a.default("Size in bytes cannot be mapped to an IndexDatatype")}},validate:function(e){return Object(n.default)(e)&&(e===s.UNSIGNED_BYTE||e===s.UNSIGNED_SHORT||e===s.UNSIGNED_INT)},createTypedArray:function(e,t){if(!Object(n.default)(e))throw new a.default("numberOfVertices is required.");return e>=r.default.SIXTY_FOUR_KILOBYTES?new Uint32Array(t):new Uint16Array(t)},createTypedArrayFromArrayBuffer:function(e,t,i,o){if(!Object(n.default)(e))throw new a.default("numberOfVertices is required.");if(!Object(n.default)(t))throw new a.default("sourceArray is required.");if(!Object(n.default)(i))throw new a.default("byteOffset is required.");return e>=r.default.SIXTY_FOUR_KILOBYTES?new Uint32Array(t,i,o):new Uint16Array(t,i,o)}};t.a=Object.freeze(s)},function(e,t,i){"use strict";i.r(t);var n=i(41),a=i(7),r=i(2),o=i(0),s=i(3),l=i(10),u=i(187),d=i(56),c=i(560);function f(e){return e===l.a.FUNC_ADD||e===l.a.FUNC_SUBTRACT||e===l.a.FUNC_REVERSE_SUBTRACT||e===l.a.MIN||e===l.a.MAX}function h(e){return e===l.a.ZERO||e===l.a.ONE||e===l.a.SRC_COLOR||e===l.a.ONE_MINUS_SRC_COLOR||e===l.a.DST_COLOR||e===l.a.ONE_MINUS_DST_COLOR||e===l.a.SRC_ALPHA||e===l.a.ONE_MINUS_SRC_ALPHA||e===l.a.DST_ALPHA||e===l.a.ONE_MINUS_DST_ALPHA||e===l.a.CONSTANT_COLOR||e===l.a.ONE_MINUS_CONSTANT_COLOR||e===l.a.CONSTANT_ALPHA||e===l.a.ONE_MINUS_CONSTANT_ALPHA||e===l.a.SRC_ALPHA_SATURATE}function p(e){return e===l.a.NEVER||e===l.a.LESS||e===l.a.EQUAL||e===l.a.LEQUAL||e===l.a.GREATER||e===l.a.NOTEQUAL||e===l.a.GEQUAL||e===l.a.ALWAYS}function m(e){return e===l.a.ZERO||e===l.a.KEEP||e===l.a.REPLACE||e===l.a.INCR||e===l.a.DECR||e===l.a.INVERT||e===l.a.INCR_WRAP||e===l.a.DECR_WRAP}function _(e){var t,i,c=Object(r.default)(e,r.default.EMPTY_OBJECT),_=Object(r.default)(c.cull,r.default.EMPTY_OBJECT),g=Object(r.default)(c.polygonOffset,r.default.EMPTY_OBJECT),v=Object(r.default)(c.scissorTest,r.default.EMPTY_OBJECT),y=Object(r.default)(v.rectangle,r.default.EMPTY_OBJECT),b=Object(r.default)(c.depthRange,r.default.EMPTY_OBJECT),w=Object(r.default)(c.depthTest,r.default.EMPTY_OBJECT),O=Object(r.default)(c.colorMask,r.default.EMPTY_OBJECT),x=Object(r.default)(c.blending,r.default.EMPTY_OBJECT),A=Object(r.default)(x.color,r.default.EMPTY_OBJECT),T=Object(r.default)(c.stencilTest,r.default.EMPTY_OBJECT),E=Object(r.default)(T.frontOperation,r.default.EMPTY_OBJECT),C=Object(r.default)(T.backOperation,r.default.EMPTY_OBJECT),S=Object(r.default)(c.sampleCoverage,r.default.EMPTY_OBJECT),M=c.viewport;if(this.frontFace=Object(r.default)(c.frontFace,u.a.COUNTER_CLOCKWISE),this.cull={enabled:Object(r.default)(_.enabled,!1),face:Object(r.default)(_.face,l.a.BACK)},this.lineWidth=Object(r.default)(c.lineWidth,1),this.polygonOffset={enabled:Object(r.default)(g.enabled,!1),factor:Object(r.default)(g.factor,0),units:Object(r.default)(g.units,0)},this.scissorTest={enabled:Object(r.default)(v.enabled,!1),rectangle:n.a.clone(y)},this.depthRange={near:Object(r.default)(b.near,0),far:Object(r.default)(b.far,1)},this.depthTest={enabled:Object(r.default)(w.enabled,!1),func:Object(r.default)(w.func,l.a.LESS)},this.colorMask={red:Object(r.default)(O.red,!0),green:Object(r.default)(O.green,!0),blue:Object(r.default)(O.blue,!0),alpha:Object(r.default)(O.alpha,!0)},this.depthMask=Object(r.default)(c.depthMask,!0),this.stencilMask=Object(r.default)(c.stencilMask,-1),this.blending={enabled:Object(r.default)(x.enabled,!1),color:new a.default(Object(r.default)(A.red,0),Object(r.default)(A.green,0),Object(r.default)(A.blue,0),Object(r.default)(A.alpha,0)),equationRgb:Object(r.default)(x.equationRgb,l.a.FUNC_ADD),equationAlpha:Object(r.default)(x.equationAlpha,l.a.FUNC_ADD),functionSourceRgb:Object(r.default)(x.functionSourceRgb,l.a.ONE),functionSourceAlpha:Object(r.default)(x.functionSourceAlpha,l.a.ONE),functionDestinationRgb:Object(r.default)(x.functionDestinationRgb,l.a.ZERO),functionDestinationAlpha:Object(r.default)(x.functionDestinationAlpha,l.a.ZERO)},this.stencilTest={enabled:Object(r.default)(T.enabled,!1),frontFunction:Object(r.default)(T.frontFunction,l.a.ALWAYS),backFunction:Object(r.default)(T.backFunction,l.a.ALWAYS),reference:Object(r.default)(T.reference,0),mask:Object(r.default)(T.mask,-1),frontOperation:{fail:Object(r.default)(E.fail,l.a.KEEP),zFail:Object(r.default)(E.zFail,l.a.KEEP),zPass:Object(r.default)(E.zPass,l.a.KEEP)},backOperation:{fail:Object(r.default)(C.fail,l.a.KEEP),zFail:Object(r.default)(C.zFail,l.a.KEEP),zPass:Object(r.default)(C.zPass,l.a.KEEP)}},this.sampleCoverage={enabled:Object(r.default)(S.enabled,!1),value:Object(r.default)(S.value,1),invert:Object(r.default)(S.invert,!1)},this.viewport=Object(o.default)(M)?new n.a(M.x,M.y,M.width,M.height):void 0,this.lineWidthd.a.maximumAliasedLineWidth)throw new s.default("renderState.lineWidth is out of range. Check minimumAliasedLineWidth and maximumAliasedLineWidth.");if(!u.a.validate(this.frontFace))throw new s.default("Invalid renderState.frontFace.");if((t=this.cull.face)!==l.a.FRONT&&t!==l.a.BACK&&t!==l.a.FRONT_AND_BACK)throw new s.default("Invalid renderState.cull.face.");if(this.scissorTest.rectangle.width<0||this.scissorTest.rectangle.height<0)throw new s.default("renderState.scissorTest.rectangle.width and renderState.scissorTest.rectangle.height must be greater than or equal to zero.");if(this.depthRange.near>this.depthRange.far)throw new s.default("renderState.depthRange.near can not be greater than renderState.depthRange.far.");if(this.depthRange.near<0)throw new s.default("renderState.depthRange.near must be greater than or equal to zero.");if(this.depthRange.far>1)throw new s.default("renderState.depthRange.far must be less than or equal to one.");if((i=this.depthTest.func)!==l.a.NEVER&&i!==l.a.LESS&&i!==l.a.EQUAL&&i!==l.a.LEQUAL&&i!==l.a.GREATER&&i!==l.a.NOTEQUAL&&i!==l.a.GEQUAL&&i!==l.a.ALWAYS)throw new s.default("Invalid renderState.depthTest.func.");if(this.blending.color.red<0||this.blending.color.red>1||this.blending.color.green<0||this.blending.color.green>1||this.blending.color.blue<0||this.blending.color.blue>1||this.blending.color.alpha<0||this.blending.color.alpha>1)throw new s.default("renderState.blending.color components must be greater than or equal to zero and less than or equal to one.");if(!f(this.blending.equationRgb))throw new s.default("Invalid renderState.blending.equationRgb.");if(!f(this.blending.equationAlpha))throw new s.default("Invalid renderState.blending.equationAlpha.");if(!h(this.blending.functionSourceRgb))throw new s.default("Invalid renderState.blending.functionSourceRgb.");if(!h(this.blending.functionSourceAlpha))throw new s.default("Invalid renderState.blending.functionSourceAlpha.");if(!h(this.blending.functionDestinationRgb))throw new s.default("Invalid renderState.blending.functionDestinationRgb.");if(!h(this.blending.functionDestinationAlpha))throw new s.default("Invalid renderState.blending.functionDestinationAlpha.");if(!p(this.stencilTest.frontFunction))throw new s.default("Invalid renderState.stencilTest.frontFunction.");if(!p(this.stencilTest.backFunction))throw new s.default("Invalid renderState.stencilTest.backFunction.");if(!m(this.stencilTest.frontOperation.fail))throw new s.default("Invalid renderState.stencilTest.frontOperation.fail.");if(!m(this.stencilTest.frontOperation.zFail))throw new s.default("Invalid renderState.stencilTest.frontOperation.zFail.");if(!m(this.stencilTest.frontOperation.zPass))throw new s.default("Invalid renderState.stencilTest.frontOperation.zPass.");if(!m(this.stencilTest.backOperation.fail))throw new s.default("Invalid renderState.stencilTest.backOperation.fail.");if(!m(this.stencilTest.backOperation.zFail))throw new s.default("Invalid renderState.stencilTest.backOperation.zFail.");if(!m(this.stencilTest.backOperation.zPass))throw new s.default("Invalid renderState.stencilTest.backOperation.zPass.");if(Object(o.default)(this.viewport)){if(this.viewport.width<0)throw new s.default("renderState.viewport.width must be greater than or equal to zero.");if(this.viewport.height<0)throw new s.default("renderState.viewport.height must be greater than or equal to zero.");if(this.viewport.width>d.a.maximumViewportWidth)throw new s.default("renderState.viewport.width must be less than or equal to the maximum viewport width ("+d.a.maximumViewportWidth.toString()+"). Check maximumViewportWidth.");if(this.viewport.height>d.a.maximumViewportHeight)throw new s.default("renderState.viewport.height must be less than or equal to the maximum viewport height ("+d.a.maximumViewportHeight.toString()+"). Check maximumViewportHeight.")}this.id=0,this._applyFunctions=[]}var g=0,v={};function y(e,t,i){i?e.enable(t):e.disable(t)}function b(e,t){e.frontFace(t.frontFace)}function w(e,t){var i=t.cull,n=i.enabled;y(e,e.CULL_FACE,n),n&&e.cullFace(i.face)}function O(e,t){e.lineWidth(t.lineWidth)}function x(e,t){var i=t.polygonOffset,n=i.enabled;y(e,e.POLYGON_OFFSET_FILL,n),n&&e.polygonOffset(i.factor,i.units)}function A(e,t,i){var n=t.scissorTest,a=Object(o.default)(i.scissorTest)?i.scissorTest.enabled:n.enabled;if(y(e,e.SCISSOR_TEST,a),a){var r=Object(o.default)(i.scissorTest)?i.scissorTest.rectangle:n.rectangle;e.scissor(r.x,r.y,r.width,r.height)}}function T(e,t){var i=t.depthRange;e.depthRange(i.near,i.far)}function E(e,t){var i=t.depthTest,n=i.enabled;y(e,e.DEPTH_TEST,n),n&&e.depthFunc(i.func)}function C(e,t){var i=t.colorMask;e.colorMask(i.red,i.green,i.blue,i.alpha)}function S(e,t){e.depthMask(t.depthMask)}function M(e,t){e.stencilMask(t.stencilMask)}function D(e,t,i){var n=t.blending,a=Object(o.default)(i.blendingEnabled)?i.blendingEnabled:n.enabled;y(e,e.BLEND,a),a&&(!function(e,t){e.blendColor(t.red,t.green,t.blue,t.alpha)}(e,n.color),e.blendEquationSeparate(n.equationRgb,n.equationAlpha),e.blendFuncSeparate(n.functionSourceRgb,n.functionDestinationRgb,n.functionSourceAlpha,n.functionDestinationAlpha))}function P(e,t){var i=t.stencilTest,n=i.enabled;if(y(e,e.STENCIL_TEST,n),n){var a=i.frontFunction,r=i.backFunction,o=i.reference,s=i.mask;e.stencilFunc(a,o,s),e.stencilFuncSeparate(e.BACK,r,o,s),e.stencilFuncSeparate(e.FRONT,a,o,s);var l=i.frontOperation,u=l.fail,d=l.zFail,c=l.zPass;e.stencilOpSeparate(e.FRONT,u,d,c);var f=i.backOperation,h=f.fail,p=f.zFail,m=f.zPass;e.stencilOpSeparate(e.BACK,h,p,m)}}function I(e,t){var i=t.sampleCoverage,n=i.enabled;y(e,e.SAMPLE_COVERAGE,n),n&&e.sampleCoverage(i.value,i.invert)}_.fromCache=function(e){var t=JSON.stringify(e),i=v[t];if(Object(o.default)(i))return++i.referenceCount,i.state;var n=new _(e),a=JSON.stringify(n);return i=v[a],Object(o.default)(i)||(n.id=g++,i={referenceCount:0,state:n=Object(c.a)(n)},v[a]=i),++i.referenceCount,v[t]={referenceCount:1,state:i.state},i.state},_.removeFromCache=function(e){var t=new _(e),i=JSON.stringify(t),n=v[i],a=JSON.stringify(e),r=v[a];Object(o.default)(r)&&(--r.referenceCount,0===r.referenceCount&&(delete v[a],Object(o.default)(n)&&--n.referenceCount)),Object(o.default)(n)&&0===n.referenceCount&&delete v[i]},_.getCache=function(){return v},_.clearCache=function(){v={}};var L=new n.a;function j(e,t,i){var n=Object(r.default)(t.viewport,i.viewport);Object(o.default)(n)||((n=L).width=i.context.drawingBufferWidth,n.height=i.context.drawingBufferHeight),i.context.uniformState.viewport=n,e.viewport(n.x,n.y,n.width,n.height)}_.apply=function(e,t,i){b(e,t),w(e,t),O(e,t),x(e,t),T(e,t),E(e,t),C(e,t),S(e,t),M(e,t),P(e,t),I(e,t),A(e,t,i),D(e,t,i),j(e,t,i)},_.partialApply=function(e,t,i,n,a,r){if(t!==i){var s=i._applyFunctions[t.id];Object(o.default)(s)||(s=function(e,t){var i=[];return e.frontFace!==t.frontFace&&i.push(b),e.cull.enabled===t.cull.enabled&&e.cull.face===t.cull.face||i.push(w),e.lineWidth!==t.lineWidth&&i.push(O),e.polygonOffset.enabled===t.polygonOffset.enabled&&e.polygonOffset.factor===t.polygonOffset.factor&&e.polygonOffset.units===t.polygonOffset.units||i.push(x),e.depthRange.near===t.depthRange.near&&e.depthRange.far===t.depthRange.far||i.push(T),e.depthTest.enabled===t.depthTest.enabled&&e.depthTest.func===t.depthTest.func||i.push(E),e.colorMask.red===t.colorMask.red&&e.colorMask.green===t.colorMask.green&&e.colorMask.blue===t.colorMask.blue&&e.colorMask.alpha===t.colorMask.alpha||i.push(C),e.depthMask!==t.depthMask&&i.push(S),e.stencilMask!==t.stencilMask&&i.push(M),e.stencilTest.enabled===t.stencilTest.enabled&&e.stencilTest.frontFunction===t.stencilTest.frontFunction&&e.stencilTest.backFunction===t.stencilTest.backFunction&&e.stencilTest.reference===t.stencilTest.reference&&e.stencilTest.mask===t.stencilTest.mask&&e.stencilTest.frontOperation.fail===t.stencilTest.frontOperation.fail&&e.stencilTest.frontOperation.zFail===t.stencilTest.frontOperation.zFail&&e.stencilTest.backOperation.fail===t.stencilTest.backOperation.fail&&e.stencilTest.backOperation.zFail===t.stencilTest.backOperation.zFail&&e.stencilTest.backOperation.zPass===t.stencilTest.backOperation.zPass||i.push(P),e.sampleCoverage.enabled===t.sampleCoverage.enabled&&e.sampleCoverage.value===t.sampleCoverage.value&&e.sampleCoverage.invert===t.sampleCoverage.invert||i.push(I),i}(t,i),i._applyFunctions[t.id]=s);for(var l=s.length,u=0;ui.width?i.width=n:n<0&&(i.width-=n,i.x=t.x),a>i.height?i.height=a:a<0&&(i.height-=a,i.y=t.y),i},c.intersect=function(e,t){r.a.typeOf.object("left",e),r.a.typeOf.object("right",t);var i=e.x,n=e.y,a=t.x,o=t.y;return i>a+t.width||i+e.widtho+t.height?u.a.OUTSIDE:u.a.INTERSECTING},c.equals=function(e,t){return e===t||Object(s.default)(e)&&Object(s.default)(t)&&e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height},c.prototype.clone=function(e){return c.clone(this,e)},c.prototype.intersect=function(e){return c.intersect(this,e)},c.prototype.equals=function(e){return c.equals(this,e)},t.a=c},function(e,t,i){"use strict";t.a=Object.freeze({NONE:0,CLAMP_TO_GROUND:1,RELATIVE_TO_GROUND:2})},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(3),o=i(6);t.default=function(e){if(e=Object(n.default)(e,n.default.EMPTY_OBJECT),!Object(a.default)(e.geometry))throw new r.default("options.geometry is required.");this.geometry=e.geometry,this.modelMatrix=o.default.clone(Object(n.default)(e.modelMatrix,o.default.IDENTITY)),this.id=e.id,this.pickPrimitive=e.pickPrimitive,this.attributes=Object(n.default)(e.attributes,{}),this.westHemisphereGeometry=void 0,this.eastHemisphereGeometry=void 0}},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(35);function o(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this._boundingVolume=e.boundingVolume,this._orientedBoundingBox=e.orientedBoundingBox,this._cull=Object(n.default)(e.cull,!0),this._occlude=Object(n.default)(e.occlude,!0),this._modelMatrix=e.modelMatrix,this._primitiveType=Object(n.default)(e.primitiveType,r.default.TRIANGLES),this._vertexArray=e.vertexArray,this._count=e.count,this._offset=Object(n.default)(e.offset,0),this._instanceCount=Object(n.default)(e.instanceCount,0),this._shaderProgram=e.shaderProgram,this._uniformMap=e.uniformMap,this._renderState=e.renderState,this._framebuffer=e.framebuffer,this._pass=e.pass,this._executeInClosestFrustum=Object(n.default)(e.executeInClosestFrustum,!1),this._owner=e.owner,this._debugShowBoundingVolume=Object(n.default)(e.debugShowBoundingVolume,!1),this._debugOverlappingFrustums=0,this._castShadows=Object(n.default)(e.castShadows,!1),this._receiveShadows=Object(n.default)(e.receiveShadows,!1),this._pickId=e.pickId,this._pickOnly=Object(n.default)(e.pickOnly,!1),this._depthForTranslucentClassification=Object(n.default)(e.depthForTranslucentClassification,!1),this.dirty=!0,this.lastDirtyTime=0,this.derivedCommands={}}Object.defineProperties(o.prototype,{boundingVolume:{get:function(){return this._boundingVolume},set:function(e){this._boundingVolume!==e&&(this._boundingVolume=e,this.dirty=!0)}},orientedBoundingBox:{get:function(){return this._orientedBoundingBox},set:function(e){this._orientedBoundingBox!==e&&(this._orientedBoundingBox=e,this.dirty=!0)}},cull:{get:function(){return this._cull},set:function(e){this._cull!==e&&(this._cull=e,this.dirty=!0)}},occlude:{get:function(){return this._occlude},set:function(e){this._occlude!==e&&(this._occlude=e,this.dirty=!0)}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix!==e&&(this._modelMatrix=e,this.dirty=!0)}},primitiveType:{get:function(){return this._primitiveType},set:function(e){this._primitiveType!==e&&(this._primitiveType=e,this.dirty=!0)}},vertexArray:{get:function(){return this._vertexArray},set:function(e){this._vertexArray!==e&&(this._vertexArray=e,this.dirty=!0)}},count:{get:function(){return this._count},set:function(e){this._count!==e&&(this._count=e,this.dirty=!0)}},offset:{get:function(){return this._offset},set:function(e){this._offset!==e&&(this._offset=e,this.dirty=!0)}},instanceCount:{get:function(){return this._instanceCount},set:function(e){this._instanceCount!==e&&(this._instanceCount=e,this.dirty=!0)}},shaderProgram:{get:function(){return this._shaderProgram},set:function(e){this._shaderProgram!==e&&(this._shaderProgram=e,this.dirty=!0)}},castShadows:{get:function(){return this._castShadows},set:function(e){this._castShadows!==e&&(this._castShadows=e,this.dirty=!0)}},receiveShadows:{get:function(){return this._receiveShadows},set:function(e){this._receiveShadows!==e&&(this._receiveShadows=e,this.dirty=!0)}},uniformMap:{get:function(){return this._uniformMap},set:function(e){this._uniformMap!==e&&(this._uniformMap=e,this.dirty=!0)}},renderState:{get:function(){return this._renderState},set:function(e){this._renderState!==e&&(this._renderState=e,this.dirty=!0)}},framebuffer:{get:function(){return this._framebuffer},set:function(e){this._framebuffer!==e&&(this._framebuffer=e,this.dirty=!0)}},pass:{get:function(){return this._pass},set:function(e){this._pass!==e&&(this._pass=e,this.dirty=!0)}},executeInClosestFrustum:{get:function(){return this._executeInClosestFrustum},set:function(e){this._executeInClosestFrustum!==e&&(this._executeInClosestFrustum=e,this.dirty=!0)}},owner:{get:function(){return this._owner},set:function(e){this._owner!==e&&(this._owner=e,this.dirty=!0)}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolume=e,this.dirty=!0)}},debugOverlappingFrustums:{get:function(){return this._debugOverlappingFrustums},set:function(e){this._debugOverlappingFrustums!==e&&(this._debugOverlappingFrustums=e,this.dirty=!0)}},pickId:{get:function(){return this._pickId},set:function(e){this._pickId!==e&&(this._pickId=e,this.dirty=!0)}},pickOnly:{get:function(){return this._pickOnly},set:function(e){this._pickOnly!==e&&(this._pickOnly=e,this.dirty=!0)}},depthForTranslucentClassification:{get:function(){return this._depthForTranslucentClassification},set:function(e){this._depthForTranslucentClassification!==e&&(this._depthForTranslucentClassification=e,this.dirty=!0)}}}),o.shallowClone=function(e,t){if(Object(a.default)(e))return Object(a.default)(t)||(t=new o),t._boundingVolume=e._boundingVolume,t._orientedBoundingBox=e._orientedBoundingBox,t._cull=e._cull,t._occlude=e._occlude,t._modelMatrix=e._modelMatrix,t._primitiveType=e._primitiveType,t._vertexArray=e._vertexArray,t._count=e._count,t._offset=e._offset,t._instanceCount=e._instanceCount,t._shaderProgram=e._shaderProgram,t._uniformMap=e._uniformMap,t._renderState=e._renderState,t._framebuffer=e._framebuffer,t._pass=e._pass,t._executeInClosestFrustum=e._executeInClosestFrustum,t._owner=e._owner,t._debugShowBoundingVolume=e._debugShowBoundingVolume,t._debugOverlappingFrustums=e._debugOverlappingFrustums,t._castShadows=e._castShadows,t._receiveShadows=e._receiveShadows,t._pickId=e._pickId,t._pickOnly=e._pickOnly,t._depthForTranslucentClassification=e._depthForTranslucentClassification,t.dirty=!0,t.lastDirtyTime=0,t},o.prototype.execute=function(e,t){e.draw(this,t)},t.default=o},function(e,t,i){"use strict";i.r(t);var n=i(8),a=i(4),r=i(99),o=i(2),s=i(0),l=i(19),u=i(3),d=i(5),c=i(33),f=i(56),h=i(287),p=i(32),m=i(58),_=i(118),g=i(62);function v(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),a.a.defined("options.context",e.context);var t=e.context,i=e.width,l=e.height,d=e.source;Object(s.default)(d)&&(Object(s.default)(i)||(i=Object(o.default)(d.videoWidth,d.width)),Object(s.default)(l)||(l=Object(o.default)(d.videoHeight,d.height)));var h=Object(o.default)(e.pixelFormat,c.default.RGBA),_=Object(o.default)(e.pixelDatatype,p.default.UNSIGNED_BYTE),g=c.default.toInternalFormat(h,_,t),v=c.default.isCompressedFormat(g);if(!Object(s.default)(i)||!Object(s.default)(l))throw new u.default("options requires a source field to create an initialized texture or width and height fields to create a blank texture.");if(a.a.typeOf.number.greaterThan("width",i,0),i>f.a.maximumTextureSize)throw new u.default("Width must be less than or equal to the maximum texture size ("+f.a.maximumTextureSize+"). Check maximumTextureSize.");if(a.a.typeOf.number.greaterThan("height",l,0),l>f.a.maximumTextureSize)throw new u.default("Height must be less than or equal to the maximum texture size ("+f.a.maximumTextureSize+"). Check maximumTextureSize.");if(!c.default.validate(h))throw new u.default("Invalid options.pixelFormat.");if(!v&&!p.default.validate(_))throw new u.default("Invalid options.pixelDatatype.");if(h===c.default.DEPTH_COMPONENT&&_!==p.default.UNSIGNED_SHORT&&_!==p.default.UNSIGNED_INT)throw new u.default("When options.pixelFormat is DEPTH_COMPONENT, options.pixelDatatype must be UNSIGNED_SHORT or UNSIGNED_INT.");if(h===c.default.DEPTH_STENCIL&&_!==p.default.UNSIGNED_INT_24_8)throw new u.default("When options.pixelFormat is DEPTH_STENCIL, options.pixelDatatype must be UNSIGNED_INT_24_8.");if(_===p.default.FLOAT&&!t.floatingPointTexture)throw new u.default("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension. Check context.floatingPointTexture.");if(_===p.default.HALF_FLOAT&&!t.halfFloatingPointTexture)throw new u.default("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension. Check context.halfFloatingPointTexture.");if(c.default.isDepthFormat(h)){if(Object(s.default)(d))throw new u.default("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, source cannot be provided.");if(!t.depthTexture)throw new u.default("When options.pixelFormat is DEPTH_COMPONENT or DEPTH_STENCIL, this WebGL implementation must support WEBGL_depth_texture. Check context.depthTexture.")}if(v){if(!Object(s.default)(d)||!Object(s.default)(d.arrayBufferView))throw new u.default("When options.pixelFormat is compressed, options.source.arrayBufferView must be defined.");if(c.default.isDXTFormat(g)&&!t.s3tc)throw new u.default("When options.pixelFormat is S3TC compressed, this WebGL implementation must support the WEBGL_compressed_texture_s3tc extension. Check context.s3tc.");if(c.default.isPVRTCFormat(g)&&!t.pvrtc)throw new u.default("When options.pixelFormat is PVRTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_pvrtc extension. Check context.pvrtc.");if(c.default.isASTCFormat(g)&&!t.astc)throw new u.default("When options.pixelFormat is ASTC compressed, this WebGL implementation must support the WEBGL_compressed_texture_astc extension. Check context.astc.");if(c.default.isETC2Format(g)&&!t.etc)throw new u.default("When options.pixelFormat is ETC2 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc extension. Check context.etc.");if(c.default.isETC1Format(g)&&!t.etc1)throw new u.default("When options.pixelFormat is ETC1 compressed, this WebGL implementation must support the WEBGL_compressed_texture_etc1 extension. Check context.etc1.");if(c.default.isBC7Format(g)&&!t.bc7)throw new u.default("When options.pixelFormat is BC7 compressed, this WebGL implementation must support the EXT_texture_compression_bptc extension. Check context.bc7.");if(c.default.compressedTextureSizeInBytes(g,i,l)!==d.arrayBufferView.byteLength)throw new u.default("The byte length of the array buffer is invalid for the compressed texture with the given width and height.")}var y=e.preMultiplyAlpha||h===c.default.RGB||h===c.default.LUMINANCE,b=Object(o.default)(e.flipY,!0),w=Object(o.default)(e.skipColorSpaceConversion,!1),O=!0,x=t._gl,A=x.TEXTURE_2D,T=x.createTexture();x.activeTexture(x.TEXTURE0),x.bindTexture(A,T);var E,C=4;if(Object(s.default)(d)&&Object(s.default)(d.arrayBufferView)&&!v&&(C=c.default.alignmentInBytes(h,_,i)),x.pixelStorei(x.UNPACK_ALIGNMENT,C),w?x.pixelStorei(x.UNPACK_COLORSPACE_CONVERSION_WEBGL,x.NONE):x.pixelStorei(x.UNPACK_COLORSPACE_CONVERSION_WEBGL,x.BROWSER_DEFAULT_WEBGL),Object(s.default)(d))if(Object(s.default)(d.arrayBufferView)){x.pixelStorei(x.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),x.pixelStorei(x.UNPACK_FLIP_Y_WEBGL,!1);var S,M,D,P=d.arrayBufferView;if(v){if(x.compressedTexImage2D(A,0,g,i,l,0,P),Object(s.default)(d.mipLevels))for(M=i,D=l,S=0;Si.drawingBufferWidth)throw new u.default("framebufferXOffset + width must be less than or equal to drawingBufferWidth");if(l+f>i.drawingBufferHeight)throw new u.default("framebufferYOffset + height must be less than or equal to drawingBufferHeight.");return new v({context:t,width:d,height:f,pixelFormat:n,source:{framebuffer:Object(s.default)(h)?h:t.defaultFramebuffer,xOffset:r,yOffset:l,width:d,height:f}})},Object.defineProperties(v.prototype,{id:{get:function(){return this._id}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=this._context,a=this._pixelFormat,r=this._pixelDatatype,o=t===g.default.NEAREST_MIPMAP_NEAREST||t===g.default.NEAREST_MIPMAP_LINEAR||t===g.default.LINEAR_MIPMAP_NEAREST||t===g.default.LINEAR_MIPMAP_LINEAR;(r===p.default.FLOAT&&!n.textureFloatLinear||r===p.default.HALF_FLOAT&&!n.textureHalfFloatLinear)&&(t=o?g.default.NEAREST_MIPMAP_NEAREST:g.default.NEAREST,i=_.default.NEAREST),n.webgl2&&c.default.isDepthFormat(a)&&(t=g.default.NEAREST,i=_.default.NEAREST);var l=n._gl,u=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(u,this._texture),l.texParameteri(u,l.TEXTURE_MIN_FILTER,t),l.texParameteri(u,l.TEXTURE_MAG_FILTER,i),l.texParameteri(u,l.TEXTURE_WRAP_S,e.wrapS),l.texParameteri(u,l.TEXTURE_WRAP_T,e.wrapT),Object(s.default)(this._textureFilterAnisotropic)&&l.texParameteri(u,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),l.bindTexture(u,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},dimensions:{get:function(){return this._dimensions}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},_target:{get:function(){return this._textureTarget}}}),v.prototype.copyFrom=function(e){a.a.defined("options",e);var t=Object(o.default)(e.xOffset,0),i=Object(o.default)(e.yOffset,0);if(a.a.defined("options.source",e.source),c.default.isDepthFormat(this._pixelFormat))throw new u.default("Cannot call copyFrom when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(c.default.isCompressedFormat(this._pixelFormat))throw new u.default("Cannot call copyFrom with a compressed texture pixel format.");a.a.typeOf.number.greaterThanOrEquals("xOffset",t,0),a.a.typeOf.number.greaterThanOrEquals("yOffset",i,0),a.a.typeOf.number.lessThanOrEquals("xOffset + options.source.width",t+e.source.width,this._width),a.a.typeOf.number.lessThanOrEquals("yOffset + options.source.height",i+e.source.height,this._height);var n=e.source,r=this._context,l=r._gl,d=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(d,this._texture);var f=n.width,h=n.height,m=n.arrayBufferView,_=this._width,g=this._height,v=this._internalFormat,y=this._pixelFormat,b=this._pixelDatatype,w=this._preMultiplyAlpha,O=this._flipY,x=Object(o.default)(e.skipColorSpaceConversion,!1),A=4;Object(s.default)(m)&&(A=c.default.alignmentInBytes(y,b,f)),l.pixelStorei(l.UNPACK_ALIGNMENT,A),x?l.pixelStorei(l.UNPACK_COLORSPACE_CONVERSION_WEBGL,l.NONE):l.pixelStorei(l.UNPACK_COLORSPACE_CONVERSION_WEBGL,l.BROWSER_DEFAULT_WEBGL);var T=!1;if(!this._initialized){if(0===t&&0===i&&f===_&&h===g)Object(s.default)(m)?(l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,!1),O&&(m=c.default.flipY(m,y,b,_,g)),l.texImage2D(d,0,v,_,g,0,y,p.default.toWebGLConstant(b,r),m)):(l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,O),l.texImage2D(d,0,v,y,p.default.toWebGLConstant(b,r),n)),T=!0;else{l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,!1);var E=c.default.createTypedArray(y,b,_,g);l.texImage2D(d,0,v,_,g,0,y,p.default.toWebGLConstant(b,r),E)}this._initialized=!0}T||(Object(s.default)(m)?(l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,!1),O&&(m=c.default.flipY(m,y,b,f,h)),l.texSubImage2D(d,0,t,i,f,h,y,p.default.toWebGLConstant(b,r),m)):(l.pixelStorei(l.UNPACK_PREMULTIPLY_ALPHA_WEBGL,w),l.pixelStorei(l.UNPACK_FLIP_Y_WEBGL,O),l.texSubImage2D(d,0,t,i,y,p.default.toWebGLConstant(b,r),n))),l.bindTexture(d,null)},v.prototype.copyFromFramebuffer=function(e,t,i,n,r,s){if(e=Object(o.default)(e,0),t=Object(o.default)(t,0),i=Object(o.default)(i,0),n=Object(o.default)(n,0),r=Object(o.default)(r,this._width),s=Object(o.default)(s,this._height),c.default.isDepthFormat(this._pixelFormat))throw new u.default("Cannot call copyFromFramebuffer when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(this._pixelDatatype===p.default.FLOAT)throw new u.default("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===p.default.HALF_FLOAT)throw new u.default("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");if(c.default.isCompressedFormat(this._pixelFormat))throw new u.default("Cannot call copyFrom with a compressed texture pixel format.");a.a.typeOf.number.greaterThanOrEquals("xOffset",e,0),a.a.typeOf.number.greaterThanOrEquals("yOffset",t,0),a.a.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),a.a.typeOf.number.greaterThanOrEquals("framebufferYOffset",n,0),a.a.typeOf.number.lessThanOrEquals("xOffset + width",e+r,this._width),a.a.typeOf.number.lessThanOrEquals("yOffset + height",t+s,this._height);var l=this._context._gl,d=this._textureTarget;l.activeTexture(l.TEXTURE0),l.bindTexture(d,this._texture),l.copyTexSubImage2D(d,0,e,t,i,n,r,s),l.bindTexture(d,null),this._initialized=!0},v.prototype.generateMipmap=function(e){if(e=Object(o.default)(e,h.a.DONT_CARE),c.default.isDepthFormat(this._pixelFormat))throw new u.default("Cannot call generateMipmap when the texture pixel format is DEPTH_COMPONENT or DEPTH_STENCIL.");if(c.default.isCompressedFormat(this._pixelFormat))throw new u.default("Cannot call generateMipmap with a compressed pixel format.");if(this._width>1&&!d.default.isPowerOfTwo(this._width))throw new u.default("width must be a power of two to call generateMipmap().");if(this._height>1&&!d.default.isPowerOfTwo(this._height))throw new u.default("height must be a power of two to call generateMipmap().");if(!h.a.validate(e))throw new u.default("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),Object(l.default)(this)},t.default=v},function(e,t,i){"use strict";i.r(t);var n=i(8),a=i(1),r=i(22),o=i(4),s=i(2),l=i(0),u=i(3),d=i(286),c=i(128),f=i(12),h=i(6),p=i(35),m=i(27),_=i(21),g=i(52);function v(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),o.a.typeOf.object("options.attributes",e.attributes),this.attributes=e.attributes,this.indices=e.indices,this.primitiveType=Object(s.default)(e.primitiveType,p.default.TRIANGLES),this.boundingSphere=e.boundingSphere,this.geometryType=Object(s.default)(e.geometryType,d.a.NONE),this.boundingSphereCV=e.boundingSphereCV,this.offsetAttribute=e.offsetAttribute}v.computeNumberOfVertices=function(e){o.a.typeOf.object("geometry",e);var t=-1;for(var i in e.attributes)if(e.attributes.hasOwnProperty(i)&&Object(l.default)(e.attributes[i])&&Object(l.default)(e.attributes[i].values)){var n=e.attributes[i],a=n.values.length/n.componentsPerAttribute;if(t!==a&&-1!==t)throw new u.default("All attribute lists must have the same number of attributes.");t=a}return t};var y=new r.default,b=new a.default,w=new h.default,O=[new r.default,new r.default,new r.default],x=[new n.default,new n.default,new n.default],A=[new n.default,new n.default,new n.default],T=new a.default,E=new m.default,C=new h.default,S=new c.a;v._textureCoordinateRotationPoints=function(e,t,i,o){var s,l=_.default.center(o,y),u=r.default.toCartesian(l,i,b),d=g.default.eastNorthUpToFixedFrame(u,i,w),p=h.default.inverse(d,w),v=x,M=O;M[0].longitude=o.west,M[0].latitude=o.south,M[1].longitude=o.west,M[1].latitude=o.north,M[2].longitude=o.east,M[2].latitude=o.south;var D=T;for(s=0;s<3;s++)r.default.toCartesian(M[s],i,D),D=h.default.multiplyByPointAsVector(p,D,D),v[s].x=D.x,v[s].y=D.y;var P=m.default.fromAxisAngle(a.default.UNIT_Z,-t,E),I=f.default.fromQuaternion(P,C),L=e.length,j=Number.POSITIVE_INFINITY,R=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY,B=Number.NEGATIVE_INFINITY;for(s=0;s0&&(this._hash={},e.length=0)},t.default=r},function(e,t,i){"use strict";t.a=Object.freeze({DONE:0,PENDING:1,FAILED:2})},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(3);function o(e,t){e=Object(n.default)(e,0),this._near=e,t=Object(n.default)(t,Number.MAX_VALUE),this._far=t}Object.defineProperties(o.prototype,{near:{get:function(){return this._near},set:function(e){this._near=e}},far:{get:function(){return this._far},set:function(e){this._far=e}}}),o.packedLength=2,o.pack=function(e,t,i){if(!Object(a.default)(e))throw new r.default("value is required");if(!Object(a.default)(t))throw new r.default("array is required");return i=Object(n.default)(i,0),t[i++]=e.near,t[i]=e.far,t},o.unpack=function(e,t,i){if(!Object(a.default)(e))throw new r.default("array is required");return t=Object(n.default)(t,0),Object(a.default)(i)||(i=new o),i.near=e[t++],i.far=e[t],i},o.equals=function(e,t){return e===t||Object(a.default)(e)&&Object(a.default)(t)&&e.near===t.near&&e.far===t.far},o.clone=function(e,t){if(Object(a.default)(e))return Object(a.default)(t)||(t=new o),t.near=e.near,t.far=e.far,t},o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.equals=function(e){return o.equals(this,e)},t.default=o},function(e,t,i){"use strict";i.r(t);var n=i(2);t.default=function e(t,i){if(null===t||"object"!=typeof t)return t;i=Object(n.default)(i,!1);var a=new t.constructor;for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];i&&(o=e(o,i)),a[r]=o}return a}},function(e,t,i){"use strict";t.a=Object.freeze({VARIABLE:0,UNARY:1,BINARY:2,TERNARY:3,CONDITIONAL:4,MEMBER:5,FUNCTION_CALL:6,ARRAY:7,REGEX:8,VARIABLE_IN_STRING:9,LITERAL_NULL:10,LITERAL_BOOLEAN:11,LITERAL_NUMBER:12,LITERAL_STRING:13,LITERAL_COLOR:14,LITERAL_VECTOR:15,LITERAL_REGEX:16,LITERAL_UNDEFINED:17,BUILTIN_VARIABLE:18})},function(e,t,i){"use strict";i.r(t);var n=i(18),a=i(8),r=i(1),o=i(16),s=i(22),l=i(4),u=i(2),d=i(0),c=i(3),f=i(550),h=i(394),p=i(15),m=i(198),_=i(555),g=i(427),v=i(14),y=i(5),b=i(12),w=i(6),O=i(27),x=i(106),A={},T={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},E={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},C={},S={east:new r.default,north:new r.default,up:new r.default,west:new r.default,south:new r.default,down:new r.default},M=new r.default,D=new r.default,P=new r.default;A.localFrameToFixedFrameGenerator=function(e,t){if(!T.hasOwnProperty(e)||!T[e].hasOwnProperty(t))throw new c.default("firstAxis and secondAxis must be east, north, up, west, south or down.");var i,n=T[e][t],a=e+t;return Object(d.default)(C[a])?i=C[a]:(i=function(i,a,o){if(!Object(d.default)(i))throw new c.default("origin is required.");if(Object(d.default)(o)||(o=new w.default),r.default.equalsEpsilon(i,r.default.ZERO,y.default.EPSILON14))r.default.unpack(E[e],0,M),r.default.unpack(E[t],0,D),r.default.unpack(E[n],0,P);else if(y.default.equalsEpsilon(i.x,0,y.default.EPSILON14)&&y.default.equalsEpsilon(i.y,0,y.default.EPSILON14)){var s=y.default.sign(i.z);r.default.unpack(E[e],0,M),"east"!==e&&"west"!==e&&r.default.multiplyByScalar(M,s,M),r.default.unpack(E[t],0,D),"east"!==t&&"west"!==t&&r.default.multiplyByScalar(D,s,D),r.default.unpack(E[n],0,P),"east"!==n&&"west"!==n&&r.default.multiplyByScalar(P,s,P)}else{(a=Object(u.default)(a,p.default.WGS84)).geodeticSurfaceNormal(i,S.up);var l=S.up,f=S.east;f.x=-i.y,f.y=i.x,f.z=0,r.default.normalize(f,S.east),r.default.cross(l,f,S.north),r.default.multiplyByScalar(S.up,-1,S.down),r.default.multiplyByScalar(S.east,-1,S.west),r.default.multiplyByScalar(S.north,-1,S.south),M=S[e],D=S[t],P=S[n]}return o[0]=M.x,o[1]=M.y,o[2]=M.z,o[3]=0,o[4]=D.x,o[5]=D.y,o[6]=D.z,o[7]=0,o[8]=P.x,o[9]=P.y,o[10]=P.z,o[11]=0,o[12]=i.x,o[13]=i.y,o[14]=i.z,o[15]=1,o},C[a]=i),i},A.eastNorthUpToFixedFrame=A.localFrameToFixedFrameGenerator("east","north"),A.northEastDownToFixedFrame=A.localFrameToFixedFrameGenerator("north","east"),A.northUpEastToFixedFrame=A.localFrameToFixedFrameGenerator("north","up"),A.northWestUpToFixedFrame=A.localFrameToFixedFrameGenerator("north","west");var I=new O.default,L=new r.default(1,1,1),j=new w.default;A.headingPitchRollToFixedFrame=function(e,t,i,n,a){l.a.typeOf.object("HeadingPitchRoll",t),n=Object(u.default)(n,A.eastNorthUpToFixedFrame);var o=O.default.fromHeadingPitchRoll(t,I),s=w.default.fromTranslationQuaternionRotationScale(r.default.ZERO,o,L,j);return a=n(e,i,a),w.default.multiply(a,s,a)};var R=new w.default,N=new b.default;A.headingPitchRollQuaternion=function(e,t,i,n,a){l.a.typeOf.object("HeadingPitchRoll",t);var r=A.headingPitchRollToFixedFrame(e,t,i,n,R),o=w.default.getMatrix3(r,N);return O.default.fromRotationMatrix(o,a)};var B=new r.default(1,1,1),F=new r.default,k=new w.default,z=new w.default,U=new b.default,V=new O.default;A.fixedFrameToHeadingPitchRoll=function(e,t,i,n){l.a.defined("transform",e),t=Object(u.default)(t,p.default.WGS84),i=Object(u.default)(i,A.eastNorthUpToFixedFrame),Object(d.default)(n)||(n=new m.default);var a=w.default.getTranslation(e,F);if(r.default.equals(a,r.default.ZERO))return n.heading=0,n.pitch=0,n.roll=0,n;var o=w.default.inverseTransformation(i(a,t,k),k),s=w.default.setScale(e,B,z);s=w.default.setTranslation(s,r.default.ZERO,s),o=w.default.multiply(o,s,o);var c=O.default.fromRotationMatrix(w.default.getMatrix3(o,U),V);return c=O.default.normalize(c,c),m.default.fromQuaternion(c,n)};var H=y.default.TWO_PI/86400,G=new v.default;A.computeTemeToPseudoFixedMatrix=function(e,t){if(!Object(d.default)(e))throw new c.default("date is required.");var i,n=(G=v.default.addSeconds(e,-v.default.computeTaiMinusUtc(e),G)).dayNumber,a=G.secondsOfDay,r=n-2451545,o=(24110.54841+(i=a>=43200?(r+.5)/x.a.DAYS_PER_JULIAN_CENTURY:(r-.5)/x.a.DAYS_PER_JULIAN_CENTURY)*(8640184.812866+i*(.093104+-62e-7*i)))*H%y.default.TWO_PI+(72921158553e-15+11772758384668e-32*(n-2451545.5))*((a+.5*x.a.SECONDS_PER_DAY)%x.a.SECONDS_PER_DAY),s=Math.cos(o),l=Math.sin(o);return Object(d.default)(t)?(t[0]=s,t[1]=-l,t[2]=0,t[3]=l,t[4]=s,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t):new b.default(s,l,0,-l,s,0,0,0,1)},A.iau2006XysData=new _.a,A.earthOrientationParameters=f.a.NONE;A.preloadIcrfFixed=function(e){var t=e.start.dayNumber,i=e.start.secondsOfDay+32.184,a=e.stop.dayNumber,r=e.stop.secondsOfDay+32.184,o=A.iau2006XysData.preload(t,i,a,r),s=A.earthOrientationParameters.getPromiseToLoad();return n.a.all([o,s])},A.computeIcrfToFixedMatrix=function(e,t){if(!Object(d.default)(e))throw new c.default("date is required.");Object(d.default)(t)||(t=new b.default);var i=A.computeFixedToIcrfMatrix(e,t);if(Object(d.default)(i))return b.default.transpose(i,t)};var Y=new g.a(0,0,0),W=new h.a(0,0,0,0,0,0),q=new b.default,X=new b.default;A.computeFixedToIcrfMatrix=function(e,t){if(!Object(d.default)(e))throw new c.default("date is required.");Object(d.default)(t)||(t=new b.default);var i=A.earthOrientationParameters.compute(e,W);if(Object(d.default)(i)){var n=e.dayNumber,a=e.secondsOfDay+32.184,r=A.iau2006XysData.computeXysRadians(n,a,Y);if(Object(d.default)(r)){var o=r.x+i.xPoleOffset,s=r.y+i.yPoleOffset,l=1/(1+Math.sqrt(1-o*o-s*s)),u=q;u[0]=1-l*o*o,u[3]=-l*o*s,u[6]=o,u[1]=-l*o*s,u[4]=1-l*s*s,u[7]=s,u[2]=-o,u[5]=-s,u[8]=1-l*(o*o+s*s);var f=b.default.fromRotationZ(-r.s,X),h=b.default.multiply(u,f,q),p=e.dayNumber-2451545,m=(e.secondsOfDay-v.default.computeTaiMinusUtc(e)+i.ut1MinusUtc)/x.a.SECONDS_PER_DAY,_=.779057273264+m+.00273781191135448*(p+m);_=_%1*y.default.TWO_PI;var g=b.default.fromRotationZ(_,X),w=b.default.multiply(h,g,q),O=Math.cos(i.xPoleWander),T=Math.cos(i.yPoleWander),E=Math.sin(i.xPoleWander),C=Math.sin(i.yPoleWander),S=n-2451545+a/x.a.SECONDS_PER_DAY,M=-47e-6*(S/=36525)*y.default.RADIANS_PER_DEGREE/3600,D=Math.cos(M),P=Math.sin(M),I=X;return I[0]=O*D,I[1]=O*P,I[2]=E,I[3]=-T*P+C*E*D,I[4]=T*D+C*E*P,I[5]=-C*O,I[6]=-C*P-T*E*D,I[7]=C*D-T*E*P,I[8]=T*O,b.default.multiply(w,I,t)}}};var K=new o.a;A.pointToWindowCoordinates=function(e,t,i,n){return(n=A.pointToGLWindowCoordinates(e,t,i,n)).y=2*t[5]-n.y,n},A.pointToGLWindowCoordinates=function(e,t,i,n){if(!Object(d.default)(e))throw new c.default("modelViewProjectionMatrix is required.");if(!Object(d.default)(t))throw new c.default("viewportTransformation is required.");if(!Object(d.default)(i))throw new c.default("point is required.");Object(d.default)(n)||(n=new a.default);var r=K;return w.default.multiplyByVector(e,o.a.fromElements(i.x,i.y,i.z,1,r),r),o.a.multiplyByScalar(r,1/r.w,r),w.default.multiplyByVector(t,r,r),a.default.fromCartesian4(r,n)};var J=new r.default,Z=new r.default,Q=new r.default;A.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!Object(d.default)(e))throw new c.default("position is required.");if(!Object(d.default)(t))throw new c.default("velocity is required.");var a=Object(u.default)(i,p.default.WGS84).geodeticSurfaceNormal(e,J),o=r.default.cross(t,a,Z);r.default.equalsEpsilon(o,r.default.ZERO,y.default.EPSILON6)&&(o=r.default.clone(r.default.UNIT_X,o));var s=r.default.cross(o,t,Q);return r.default.normalize(s,s),r.default.cross(t,s,o),r.default.negate(o,o),r.default.normalize(o,o),Object(d.default)(n)||(n=new b.default),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=o.x,n[4]=o.y,n[5]=o.z,n[6]=s.x,n[7]=s.y,n[8]=s.z,n};var $=new w.default(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),ee=new s.default,te=new r.default,ie=new r.default,ne=new b.default,ae=new w.default,re=new w.default;A.basisTo2D=function(e,t,i){if(!Object(d.default)(e))throw new c.default("projection is required.");if(!Object(d.default)(t))throw new c.default("matrix is required.");if(!Object(d.default)(i))throw new c.default("result is required.");var n=w.default.getTranslation(t,ie),a=e.ellipsoid,o=a.cartesianToCartographic(n,ee),s=e.project(o,te);r.default.fromElements(s.z,s.x,s.y,s);var l=A.eastNorthUpToFixedFrame(n,a,ae),u=w.default.inverseTransformation(l,re),f=w.default.getMatrix3(t,ne),h=w.default.multiplyByMatrix3(u,f,i);return w.default.multiply($,h,i),w.default.setTranslation(i,s,i),i},A.wgs84To2DModelMatrix=function(e,t,i){if(!Object(d.default)(e))throw new c.default("projection is required.");if(!Object(d.default)(t))throw new c.default("center is required.");if(!Object(d.default)(i))throw new c.default("result is required.");var n=e.ellipsoid,a=A.eastNorthUpToFixedFrame(t,n,ae),o=w.default.inverseTransformation(a,re),s=n.cartesianToCartographic(t,ee),l=e.project(s,te);r.default.fromElements(l.z,l.x,l.y,l);var u=w.default.fromTranslation(l,ae);return w.default.multiply($,o,i),w.default.multiply(u,i,i),i},t.default=A},function(e,t,i){"use strict";i.r(t);var n=i(7),a=i(11),r=i(2),o=i(0),s=i(3);function l(e,t,i,a){e=Object(r.default)(e,1),t=Object(r.default)(t,1),i=Object(r.default)(i,1),a=Object(r.default)(a,1),this.value=new Uint8Array([n.default.floatToByte(e),n.default.floatToByte(t),n.default.floatToByte(i),n.default.floatToByte(a)])}Object.defineProperties(l.prototype,{componentDatatype:{get:function(){return a.default.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 4}},normalize:{get:function(){return!0}}}),l.fromColor=function(e){if(!Object(o.default)(e))throw new s.default("color is required.");return new l(e.red,e.green,e.blue,e.alpha)},l.toValue=function(e,t){if(!Object(o.default)(e))throw new s.default("color is required.");return Object(o.default)(t)?e.toBytes(t):new Uint8Array(e.toBytes())},l.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e.value[0]===t.value[0]&&e.value[1]===t.value[1]&&e.value[2]===t.value[2]&&e.value[3]===t.value[3]},t.default=l},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({NONE:0,GEODESIC:1,RHUMB:2})},function(e,t,i){"use strict";var n=i(4),a={VERTEX:0,FRAGMENT:1,BOTH:2,includesVertexShader:function(e){return n.a.typeOf.number("destination",e),e===a.VERTEX||e===a.BOTH},includesFragmentShader:function(e){return n.a.typeOf.number("destination",e),e===a.FRAGMENT||e===a.BOTH}};t.a=Object.freeze(a)},function(e,t,i){"use strict";var n={_maximumCombinedTextureImageUnits:0,_maximumCubeMapSize:0,_maximumFragmentUniformVectors:0,_maximumTextureImageUnits:0,_maximumRenderbufferSize:0,_maximumTextureSize:0,_maximumVaryingVectors:0,_maximumVertexAttributes:0,_maximumVertexTextureImageUnits:0,_maximumVertexUniformVectors:0,_minimumAliasedLineWidth:0,_maximumAliasedLineWidth:0,_minimumAliasedPointSize:0,_maximumAliasedPointSize:0,_maximumViewportWidth:0,_maximumViewportHeight:0,_maximumTextureFilterAnisotropy:0,_maximumDrawBuffers:0,_maximumColorAttachments:0,_highpFloatSupported:!1,_highpIntSupported:!1};Object.defineProperties(n,{maximumCombinedTextureImageUnits:{get:function(){return n._maximumCombinedTextureImageUnits}},maximumCubeMapSize:{get:function(){return n._maximumCubeMapSize}},maximumFragmentUniformVectors:{get:function(){return n._maximumFragmentUniformVectors}},maximumTextureImageUnits:{get:function(){return n._maximumTextureImageUnits}},maximumRenderbufferSize:{get:function(){return n._maximumRenderbufferSize}},maximumTextureSize:{get:function(){return n._maximumTextureSize}},maximumVaryingVectors:{get:function(){return n._maximumVaryingVectors}},maximumVertexAttributes:{get:function(){return n._maximumVertexAttributes}},maximumVertexTextureImageUnits:{get:function(){return n._maximumVertexTextureImageUnits}},maximumVertexUniformVectors:{get:function(){return n._maximumVertexUniformVectors}},minimumAliasedLineWidth:{get:function(){return n._minimumAliasedLineWidth}},maximumAliasedLineWidth:{get:function(){return n._maximumAliasedLineWidth}},minimumAliasedPointSize:{get:function(){return n._minimumAliasedPointSize}},maximumAliasedPointSize:{get:function(){return n._maximumAliasedPointSize}},maximumViewportWidth:{get:function(){return n._maximumViewportWidth}},maximumViewportHeight:{get:function(){return n._maximumViewportHeight}},maximumTextureFilterAnisotropy:{get:function(){return n._maximumTextureFilterAnisotropy}},maximumDrawBuffers:{get:function(){return n._maximumDrawBuffers}},maximumColorAttachments:{get:function(){return n._maximumColorAttachments}},highpFloatSupported:{get:function(){return n._highpFloatSupported}},highpIntSupported:{get:function(){return n._highpIntSupported}}}),t.a=n},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(19),s=i(3),l=i(38),u=i(10),d=i(36);function c(e){if(e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.defined("options.context",e.context),!Object(r.default)(e.typedArray)&&!Object(r.default)(e.sizeInBytes))throw new s.default("Either options.sizeInBytes or options.typedArray is required.");if(Object(r.default)(e.typedArray)&&Object(r.default)(e.sizeInBytes))throw new s.default("Cannot pass in both options.sizeInBytes and options.typedArray.");if(Object(r.default)(e.typedArray)&&(n.a.typeOf.object("options.typedArray",e.typedArray),n.a.typeOf.number("options.typedArray.byteLength",e.typedArray.byteLength)),!d.default.validate(e.usage))throw new s.default("usage is invalid.");var t=e.context._gl,i=e.bufferTarget,o=e.typedArray,l=e.sizeInBytes,u=e.usage,c=Object(r.default)(o);c&&(l=o.byteLength),n.a.typeOf.number.greaterThan("sizeInBytes",l,0);var f=t.createBuffer();t.bindBuffer(i,f),t.bufferData(i,c?o:l,u),t.bindBuffer(i,null),this._gl=t,this._webgl2=e.context._webgl2,this._bufferTarget=i,this._sizeInBytes=l,this._usage=u,this._buffer=f,this.vertexArrayDestroyable=!0}c.createVertexBuffer=function(e){return n.a.defined("options.context",e.context),new c({context:e.context,bufferTarget:u.a.ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage})},c.createIndexBuffer=function(e){if(n.a.defined("options.context",e.context),!l.a.validate(e.indexDatatype))throw new s.default("Invalid indexDatatype.");if(e.indexDatatype===l.a.UNSIGNED_INT&&!e.context.elementIndexUint)throw new s.default("IndexDatatype.UNSIGNED_INT requires OES_element_index_uint, which is not supported on this system. Check context.elementIndexUint.");var t=e.context,i=e.indexDatatype,a=l.a.getSizeInBytes(i),r=new c({context:t,bufferTarget:u.a.ELEMENT_ARRAY_BUFFER,typedArray:e.typedArray,sizeInBytes:e.sizeInBytes,usage:e.usage}),o=r.sizeInBytes/a;return Object.defineProperties(r,{indexDatatype:{get:function(){return i}},bytesPerIndex:{get:function(){return a}},numberOfIndices:{get:function(){return o}}}),r},Object.defineProperties(c.prototype,{sizeInBytes:{get:function(){return this._sizeInBytes}},usage:{get:function(){return this._usage}}}),c.prototype._getBuffer=function(){return this._buffer},c.prototype.copyFromArrayView=function(e,t){t=Object(a.default)(t,0),n.a.defined("arrayView",e),n.a.typeOf.number.lessThanOrEquals("offsetInBytes + arrayView.byteLength",t+e.byteLength,this._sizeInBytes);var i=this._gl,r=this._bufferTarget;i.bindBuffer(r,this._buffer),i.bufferSubData(r,t,e),i.bindBuffer(r,null)},c.prototype.copyFromBuffer=function(e,t,i,n){if(!this._webgl2)throw new s.default("A WebGL 2 context is required.");if(!Object(r.default)(e))throw new s.default("readBuffer must be defined.");if(!Object(r.default)(n)||n<=0)throw new s.default("sizeInBytes must be defined and be greater than zero.");if(!Object(r.default)(t)||t<0||t+n>e._sizeInBytes)throw new s.default("readOffset must be greater than or equal to zero and readOffset + sizeInBytes must be less than of equal to readBuffer.sizeInBytes.");if(!Object(r.default)(i)||i<0||i+n>this._sizeInBytes)throw new s.default("writeOffset must be greater than or equal to zero and writeOffset + sizeInBytes must be less than of equal to this.sizeInBytes.");if(this._buffer===e._buffer&&(i>=t&&ii&&td)throw new s.default("destinationOffset must be greater than zero and less than the arrayView length.");if(i+o>d)throw new s.default("destinationOffset + length must be less than or equal to the arrayViewLength.");if(t<0||t>this._sizeInBytes)throw new s.default("sourceOffset must be greater than zero and less than the buffers size.");if(t+o*l>this._sizeInBytes)throw new s.default("sourceOffset + length must be less than the buffers size.");var c=this._gl,f=u.a.COPY_READ_BUFFER;c.bindBuffer(f,this._buffer),c.getBufferSubData(f,t,e,i,n),c.bindBuffer(f,null)},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return this._gl.deleteBuffer(this._buffer),Object(o.default)(this)},t.default=c},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(3),s=i(118),l=i(62),u=i(83);function d(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT);var t=Object(a.default)(e.wrapS,u.default.CLAMP_TO_EDGE),i=Object(a.default)(e.wrapT,u.default.CLAMP_TO_EDGE),d=Object(a.default)(e.minificationFilter,l.default.LINEAR),c=Object(a.default)(e.magnificationFilter,s.default.LINEAR),f=Object(r.default)(e.maximumAnisotropy)?e.maximumAnisotropy:1;if(!u.default.validate(t))throw new o.default("Invalid sampler.wrapS.");if(!u.default.validate(i))throw new o.default("Invalid sampler.wrapT.");if(!l.default.validate(d))throw new o.default("Invalid sampler.minificationFilter.");if(!s.default.validate(c))throw new o.default("Invalid sampler.magnificationFilter.");n.a.typeOf.number.greaterThanOrEquals("maximumAnisotropy",f,1),this._wrapS=t,this._wrapT=i,this._minificationFilter=d,this._magnificationFilter=c,this._maximumAnisotropy=f}Object.defineProperties(d.prototype,{wrapS:{get:function(){return this._wrapS}},wrapT:{get:function(){return this._wrapT}},minificationFilter:{get:function(){return this._minificationFilter}},magnificationFilter:{get:function(){return this._magnificationFilter}},maximumAnisotropy:{get:function(){return this._maximumAnisotropy}}}),d.equals=function(e,t){return e===t||Object(r.default)(e)&&Object(r.default)(t)&&e._wrapS===t._wrapS&&e._wrapT===t._wrapT&&e._minificationFilter===t._minificationFilter&&e._magnificationFilter===t._magnificationFilter&&e._maximumAnisotropy===t._maximumAnisotropy},d.NEAREST=Object.freeze(new d({wrapS:u.default.CLAMP_TO_EDGE,wrapT:u.default.CLAMP_TO_EDGE,minificationFilter:l.default.NEAREST,magnificationFilter:s.default.NEAREST})),t.default=d},function(e,t,i){"use strict";var n,a,r,o,s,l,u,d,c,f,h,p,m,_,g,v,y,b=i(18),w=i(2),O=i(0),x=i(3),A=i(179);function T(e){for(var t=e.split("."),i=0,n=t.length;i0&&t.height>0,e.resolve(L._result)},t.onerror=function(){L._result=!1,e.resolve(L._result)},t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",e.promise},Object.defineProperties(L,{initialized:{get:function(){return Object(O.default)(L._result)}}});var j=[];"undefined"!=typeof ArrayBuffer&&(j.push(Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array),"undefined"!=typeof Uint8ClampedArray&&j.push(Uint8ClampedArray),"undefined"!=typeof Uint8ClampedArray&&j.push(Uint8ClampedArray),"undefined"!=typeof BigInt64Array&&j.push(BigInt64Array),"undefined"!=typeof BigUint64Array&&j.push(BigUint64Array));var R={isChrome:E,chromeVersion:function(){return E()&&r},isSafari:C,safariVersion:function(){return C()&&s},isWebkit:S,webkitVersion:function(){return S()&&u},isInternetExplorer:M,internetExplorerVersion:function(){return M()&&c},isEdge:D,edgeVersion:function(){return D()&&h},isFirefox:P,firefoxVersion:function(){return P()&&m},isWindows:function(){return Object(O.default)(_)||(_=/Windows/i.test(n.appVersion)),_},hardwareConcurrency:Object(w.default)(n.hardwareConcurrency,3),supportsPointerEvents:function(){return Object(O.default)(g)||(g=!P()&&"undefined"!=typeof PointerEvent&&(!Object(O.default)(n.pointerEnabled)||n.pointerEnabled)),g},supportsImageRenderingPixelated:I,supportsWebP:L,imageRenderingValue:function(){return I()?v:void 0},typedArrayTypes:j,supportsBasis:function(e){return R.supportsWebAssembly()&&e.context.supportsBasis},supportsFullscreen:function(){return A.a.supportsFullscreen()},supportsTypedArrays:function(){return"undefined"!=typeof ArrayBuffer},supportsBigInt64Array:function(){return"undefined"!=typeof BigInt64Array},supportsBigUint64Array:function(){return"undefined"!=typeof BigUint64Array},supportsBigInt:function(){return"undefined"!=typeof BigInt},supportsWebWorkers:function(){return"undefined"!=typeof Worker},supportsWebAssembly:function(){return"undefined"!=typeof WebAssembly&&!R.isEdge()}};t.a=R},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0);t.default=function e(t,i,r){r=Object(n.default)(r,!1);var o,s,l,u={},d=Object(a.default)(t),c=Object(a.default)(i);if(d)for(o in t)t.hasOwnProperty(o)&&(s=t[o],c&&r&&"object"==typeof s&&i.hasOwnProperty(o)?(l=i[o],u[o]="object"==typeof l?e(s,l,r):s):u[o]=s);if(c)for(o in i)i.hasOwnProperty(o)&&!u.hasOwnProperty(o)&&(l=i[o],u[o]=l);return u}},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(29),r=i(556),o=i(557),s=i(428),l=i(558),u=i(142);function d(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT);var t=Object(n.default)(e.translucent,!0),i=Object(n.default)(e.closed,!1),a=Object(n.default)(e.flat,!1),c=a?l.a:o.a,f=a?s.a:r.a,h=a?d.FLAT_VERTEX_FORMAT:d.VERTEX_FORMAT;this.material=void 0,this.translucent=t,this._vertexShaderSource=Object(n.default)(e.vertexShaderSource,c),this._fragmentShaderSource=Object(n.default)(e.fragmentShaderSource,f),this._renderState=u.a.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._vertexFormat=h,this._flat=a,this._faceForward=Object(n.default)(e.faceForward,!i)}Object.defineProperties(d.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),d.VERTEX_FORMAT=a.a.POSITION_AND_NORMAL,d.FLAT_VERTEX_FORMAT=a.a.POSITION_ONLY,d.prototype.getFragmentShaderSource=u.a.prototype.getFragmentShaderSource,d.prototype.isTranslucent=u.a.prototype.isTranslucent,d.prototype.getRenderState=u.a.prototype.getRenderState,t.default=d},function(e,t,i){"use strict";i.r(t);var n=i(10),a={NEAREST:n.a.NEAREST,LINEAR:n.a.LINEAR,NEAREST_MIPMAP_NEAREST:n.a.NEAREST_MIPMAP_NEAREST,LINEAR_MIPMAP_NEAREST:n.a.LINEAR_MIPMAP_NEAREST,NEAREST_MIPMAP_LINEAR:n.a.NEAREST_MIPMAP_LINEAR,LINEAR_MIPMAP_LINEAR:n.a.LINEAR_MIPMAP_LINEAR,validate:function(e){return e===a.NEAREST||e===a.LINEAR||e===a.NEAREST_MIPMAP_NEAREST||e===a.LINEAR_MIPMAP_NEAREST||e===a.NEAREST_MIPMAP_LINEAR||e===a.LINEAR_MIPMAP_LINEAR}};t.default=Object.freeze(a)},function(e,t,i){"use strict";var n=i(7),a=i(0),r=i(24),o=i(20),s=i(9);function l(e){this._definitionChanged=new r.default,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(l.prototype,{isConstant:{get:function(){return s.default.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Object(o.default)("color")}),l.prototype.getType=function(e){return"Color"},l.prototype.getValue=function(e,t){return Object(a.default)(t)||(t={}),t.color=s.default.getValueOrClonedDefault(this._color,e,n.default.WHITE,t.color),t},l.prototype.equals=function(e){return this===e||e instanceof l&&s.default.equals(this._color,e._color)},t.a=l},function(e,t,i){"use strict";i.r(t);var n=i(17),a=i(8),r=i(1),o=i(16),s=i(22),l=i(50),u=i(7),d=i(60),c=i(11),f=i(2),h=i(0),p=i(19),m=i(3),_=i(100),g=i(59),v=i(46),y=i(28),b=i(82),w=i(71),O=i(78),x=i(6),A=i(80),T=i(23),E=i(559),C=i(126),S=i(36),M=i(56),D=i(44),P=i(26),I=i(39),L=i(67),j=i(34),R=i(104),N=i(18),B=i(429),F=i(140),k=i(223),z=i(476),U=i(180),V=i(13),H=i(86);function G(e){if(e=Object(f.default)(e,f.default.EMPTY_OBJECT),this.geometryInstances=e.geometryInstances,this.appearance=e.appearance,this._appearance=void 0,this._material=void 0,this.depthFailAppearance=e.depthFailAppearance,this._depthFailAppearance=void 0,this._depthFailMaterial=void 0,this.modelMatrix=x.default.clone(Object(f.default)(e.modelMatrix,x.default.IDENTITY)),this._modelMatrix=new x.default,this.show=Object(f.default)(e.show,!0),this._vertexCacheOptimize=Object(f.default)(e.vertexCacheOptimize,!1),this._interleave=Object(f.default)(e.interleave,!1),this._releaseGeometryInstances=Object(f.default)(e.releaseGeometryInstances,!0),this._allowPicking=Object(f.default)(e.allowPicking,!0),this._asynchronous=Object(f.default)(e.asynchronous,!0),this._compressVertices=Object(f.default)(e.compressVertices,!0),this.cull=Object(f.default)(e.cull,!0),this.debugShowBoundingVolume=Object(f.default)(e.debugShowBoundingVolume,!1),this.rtcCenter=e.rtcCenter,Object(h.default)(this.rtcCenter)&&(!Object(h.default)(this.geometryInstances)||Array.isArray(this.geometryInstances)&&1!==this.geometryInstances.length))throw new m.default("Relative-to-center rendering only supports one geometry instance.");this.shadows=Object(f.default)(e.shadows,H.a.DISABLED),this._translucent=void 0,this._state=U.a.READY,this._geometries=[],this._error=void 0,this._numberOfInstances=0,this._boundingSpheres=[],this._boundingSphereWC=[],this._boundingSphereCV=[],this._boundingSphere2D=[],this._boundingSphereMorph=[],this._perInstanceAttributeCache=[],this._instanceIds=[],this._lastPerInstanceAttributeIndex=0,this._va=[],this._attributeLocations=void 0,this._primitiveType=void 0,this._frontFaceRS=void 0,this._backFaceRS=void 0,this._sp=void 0,this._depthFailAppearance=void 0,this._spDepthFail=void 0,this._frontFaceDepthFailRS=void 0,this._backFaceDepthFailRS=void 0,this._pickIds=[],this._colorCommands=[],this._pickCommands=[],this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._createRenderStatesFunction=e._createRenderStatesFunction,this._createShaderProgramFunction=e._createShaderProgramFunction,this._createCommandsFunction=e._createCommandsFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._createPickOffsets=e._createPickOffsets,this._pickOffsets=void 0,this._createGeometryResults=void 0,this._ready=!1,this._readyPromise=N.a.defer(),this._batchTable=void 0,this._batchTableAttributeIndices=void 0,this._offsetInstanceExtend=void 0,this._batchTableOffsetAttribute2DIndex=void 0,this._batchTableOffsetsUpdated=!1,this._instanceBoundingSpheres=void 0,this._instanceBoundingSpheresCV=void 0,this._tempBoundingSpheres=void 0,this._recomputeBoundingSpheres=!1,this._batchTableBoundingSpheresUpdated=!1,this._batchTableBoundingSphereAttributeIndices=void 0}Object.defineProperties(G.prototype,{vertexCacheOptimize:{get:function(){return this._vertexCacheOptimize}},interleave:{get:function(){return this._interleave}},releaseGeometryInstances:{get:function(){return this._releaseGeometryInstances}},allowPicking:{get:function(){return this._allowPicking}},asynchronous:{get:function(){return this._asynchronous}},compressVertices:{get:function(){return this._compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}});var Y=new a.default,W=new r.default,q=new o.a;function X(e){var t=e.length;return 1===t?e[0]:2===t?a.default.unpack(e,0,Y):3===t?r.default.unpack(e,0,W):4===t?o.a.unpack(e,0,q):void 0}function K(e,t){var i=e.geometryInstances,n=Array.isArray(i)?i:[i],a=n.length;if(0!==a){var r,o,s,l,d=function(e){var t,i=e.length,n=[],a=e[0].attributes;for(t in a)if(a.hasOwnProperty(t)&&Object(h.default)(a[t])){for(var r=a[t],o=!0,s=1;s1?"vec"+o:"float")+" "+s+";",u="",d="";n&&(u+="vec2 st;\n",d+=" st = czm_decompressTextureCoordinates("+(o>1?s+".x":s)+");\n");i&&a&&r?(u+="vec3 normal;\nvec3 tangent;\nvec3 bitangent;\n",d+=" czm_octDecode("+s+"."+(n?"yz":"xy")+", normal, tangent, bitangent);\n"):(i&&(u+="vec3 normal;\n",d+=" normal = czm_octDecode("+s+(o>1?"."+(n?"y":"x"):"")+");\n"),a&&(u+="vec3 tangent;\n",d+=" tangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"),r&&(u+="vec3 bitangent;\n",d+=" bitangent = czm_octDecode("+s+"."+(n&&i?"z":"y")+");\n"));var c=t;return c=(c=(c=(c=c.replace(/attribute\s+vec3\s+normal;/g,"")).replace(/attribute\s+vec2\s+st;/g,"")).replace(/attribute\s+vec3\s+tangent;/g,"")).replace(/attribute\s+vec3\s+bitangent;/g,""),[l,u,c=j.default.replaceMain(c,"czm_non_compressed_main"),"void main() \n{ \n"+d+" czm_non_compressed_main(); \n}"].join("\n")}function ie(e,t){var i=e.vertexAttributes;for(var n in i)if(i.hasOwnProperty(n)&&!Object(h.default)(t[n]))throw new m.default("Appearance/Geometry mismatch. The appearance requires vertex shader attribute input '"+n+"', which was not computed as part of the Geometry. Use the appearance's vertexFormat property when constructing the geometry.")}function ne(e,t){return function(){return e[t]}}G._modifyShaderPosition=function(e,t,i){for(var n,a="",r="",o="";null!==(n=Q.exec(t));){var s=n[1],l="vec4 czm_compute"+s[0].toUpperCase()+s.substr(1)+"()";"vec4 czm_computePosition()"!==l&&(a+=l+";\n"),Object(h.default)(e.rtcCenter)?(a+="uniform mat4 u_modifiedModelView;\n",r+="attribute vec4 position;\n",o+=l+"\n{\n return u_modifiedModelView * position;\n}\n\n",t=(t=(t=(t=t.replace(/attribute\s+vec(?:3|4)\s+position3DHigh;/g,"")).replace(/attribute\s+vec(?:3|4)\s+position3DLow;/g,"")).replace(/czm_modelViewRelativeToEye\s+\*\s+/g,"")).replace(/czm_modelViewProjectionRelativeToEye/g,"czm_projection")):i?o+=l+"\n{\n return czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n}\n\n":(r+="attribute vec3 "+s+"2DHigh;\nattribute vec3 "+s+"2DLow;\n",o+=l+"\n{\n vec4 p;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye("+s+"2DHigh.zxy, "+s+"2DLow.zxy),\n czm_translateRelativeToEye("+s+"3DHigh, "+s+"3DLow),\n czm_morphTime);\n }\n return p;\n}\n\n")}return[a,r,t,o].join("\n")},G._appendShowToShader=function(e,t){if(!Object(h.default)(e._batchTableAttributeIndices.show))return t;return j.default.replaceMain(t,"czm_non_show_main")+"\nvoid main() \n{ \n czm_non_show_main(); \n gl_Position *= czm_batchTable_show(batchId); \n}"},G._updateColorAttribute=function(e,t,i){if(!Object(h.default)(e._batchTableAttributeIndices.color)&&!Object(h.default)(e._batchTableAttributeIndices.depthFailColor))return t;if(-1===t.search(/attribute\s+vec4\s+color;/g))return t;if(i&&!Object(h.default)(e._batchTableAttributeIndices.depthFailColor))throw new m.default("A depthFailColor per-instance attribute is required when using a depth fail appearance that uses a color attribute.");var n=t;return n=n.replace(/attribute\s+vec4\s+color;/g,""),n=i?n.replace(/(\b)color(\b)/g,"$1czm_batchTable_depthFailColor(batchId)$2"):n.replace(/(\b)color(\b)/g,"$1czm_batchTable_color(batchId)$2")},G._updatePickColorAttribute=function(e){var t=e.replace(/attribute\s+vec4\s+pickColor;/g,"");return t=t.replace(/(\b)pickColor(\b)/g,"$1czm_batchTable_pickColor(batchId)$2")},G._appendOffsetToShader=function(e,t){if(!Object(h.default)(e._batchTableAttributeIndices.offset))return t;var i=t.replace(/attribute\s+float\s+batchId;/g,"attribute float batchId;\nattribute float applyOffset;");return" if (czm_sceneMode == czm_sceneMode3D)\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0);"," }\n"," else\n"," {\n"," $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0);"," }\n",i=i.replace(/vec4\s+([A-Za-z0-9_]+)\s+=\s+czm_computePosition\(\);/g,"vec4 $1 = czm_computePosition();\n if (czm_sceneMode == czm_sceneMode3D)\n {\n $1 = $1 + vec4(czm_batchTable_offset(batchId) * applyOffset, 0.0); }\n else\n {\n $1 = $1 + vec4(czm_batchTable_offset2D(batchId) * applyOffset, 0.0); }\n")},G._appendDistanceDisplayConditionToShader=function(e,t,i){if(!Object(h.default)(e._batchTableAttributeIndices.distanceDisplayCondition))return t;var n="void main() \n{ \n czm_non_distanceDisplayCondition_main(); \n vec2 distanceDisplayCondition = czm_batchTable_distanceDisplayCondition(batchId);\n vec3 boundingSphereCenter3DHigh = czm_batchTable_boundingSphereCenter3DHigh(batchId);\n vec3 boundingSphereCenter3DLow = czm_batchTable_boundingSphereCenter3DLow(batchId);\n float boundingSphereRadius = czm_batchTable_boundingSphereRadius(batchId);\n";return n+=i?" vec4 centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n":" vec3 boundingSphereCenter2DHigh = czm_batchTable_boundingSphereCenter2DHigh(batchId);\n vec3 boundingSphereCenter2DLow = czm_batchTable_boundingSphereCenter2DLow(batchId);\n vec4 centerRTE;\n if (czm_morphTime == 1.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow);\n }\n else if (czm_morphTime == 0.0)\n {\n centerRTE = czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy);\n }\n else\n {\n centerRTE = czm_columbusViewMorph(\n czm_translateRelativeToEye(boundingSphereCenter2DHigh.zxy, boundingSphereCenter2DLow.zxy),\n czm_translateRelativeToEye(boundingSphereCenter3DHigh, boundingSphereCenter3DLow),\n czm_morphTime);\n }\n",j.default.replaceMain(t,"czm_non_distanceDisplayCondition_main")+"\n"+(n+=" float radiusSq = boundingSphereRadius * boundingSphereRadius; \n float distanceSq; \n if (czm_sceneMode == czm_sceneMode2D) \n { \n distanceSq = czm_eyeHeight2D.y - radiusSq; \n } \n else \n { \n distanceSq = dot(centerRTE.xyz, centerRTE.xyz) - radiusSq; \n } \n distanceSq = max(distanceSq, 0.0); \n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x; \n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y; \n float show = (distanceSq >= nearSq && distanceSq <= farSq) ? 1.0 : 0.0; \n gl_Position *= show; \n}")};var ae,re=Math.max(g.a.hardwareConcurrency-1,1),oe=new C.a("combineGeometry");var se=new _.a,le=new s.default,ue=new r.default,de=new n.default;var ce=new r.default,fe=new r.default;function he(e,t){if(Object(h.default)(e._batchTableAttributeIndices.offset)&&!e._batchTableOffsetsUpdated&&!t.scene3DOnly){for(var i=e._batchTableOffsetAttribute2DIndex,a=t.mapProjection,o=a.ellipsoid,s=e._batchTable,l=e._instanceBoundingSpheres,u=l.length,d=0;d0){if(0===M.a.maximumVertexTextureImageUnits)throw new T.a("Vertex texture fetch support is required to render primitives with per-instance attributes. The maximum number of vertex texture image units must be greater than zero.");this._batchTable.update(e)}if(this._state!==U.a.COMPLETE&&this._state!==U.a.COMBINED&&(this.asynchronous?function(e,t){var i,n,a,r,o=e._instanceIds;if(e._state===U.a.READY){i=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances];var s,l=e._numberOfInstances=i.length,u=[],d=[];for(a=0;a0){var v=new Float64Array(p);for(c=[v.buffer],r=0;r0?(e._recomputeBoundingSpheres=!0,e._state=U.a.COMBINED):Ce(e,t,U.a.FAILED,void 0)})).otherwise((function(i){Ce(e,t,U.a.FAILED,i)}))}}(this,e):function(e,t){var i,n,a=Array.isArray(e.geometryInstances)?e.geometryInstances:[e.geometryInstances],r=e._numberOfInstances=a.length,o=new Array(r),s=e._instanceIds,l=0;for(n=0;n0?(e._recomputeBoundingSpheres=!0,e._state=U.a.COMBINED):Ce(e,t,U.a.FAILED,void 0)}(this,e)),this._state===U.a.COMBINED&&(function(e,t){if(Object(h.default)(e._batchTableAttributeIndices.distanceDisplayCondition)&&!e._batchTableBoundingSpheresUpdated){for(var i=e._batchTableBoundingSphereAttributeIndices,a=i.center3DHigh,r=i.center3DLow,o=i.center2DHigh,s=i.center2DLow,l=i.radius,u=t.mapProjection,d=u.ellipsoid,c=e._batchTable,f=e._instanceBoundingSpheres,p=f.length,m=0;m0||n.default.intersectPlane(_,A.default.ORIGIN_ZX_PLANE)!==O.a.INTERSECTING?f.push(_):(p.push(_),m.push(_))}var g=f[0],v=m[0],y=p[0];for(a=1;a4)throw new m.default("value must be and array with length between 1 and 4.");var o=X(r);e.setBatchedAttribute(t,i,o),"offset"===a&&(n._recomputeBoundingSpheres=!0,n._batchTableOffsetsUpdated=!1)}}var Ee=new r.default;function Ce(e,t,i,n){e._error=n,e._state=i,t.afterRender.push((function(){e._ready=e._state===U.a.COMPLETE||e._state===U.a.FAILED,Object(h.default)(n)?e._readyPromise.reject(n):e._readyPromise.resolve(e)}))}G.prototype.getGeometryInstanceAttributes=function(e){if(!Object(h.default)(e))throw new m.default("id is required");if(!Object(h.default)(this._batchTable))throw new m.default("must call update before calling getGeometryInstanceAttributes");for(var t=-1,i=this._lastPerInstanceAttributeIndex,a=this._instanceIds,o=a.length,s=0;s0&&console.log(_+"Vertex shader compile log: "+u)),m&&(u=e.getShaderInfoLog(o),Object(r.default)(u)&&u.length>0&&console.log(_+"Fragment shader compile log: "+u)),m&&(u=e.getProgramInfoLog(s),Object(r.default)(u)&&u.length>0&&console.log(_+"Shader program link log: "+u)),s}(n,t,t._debugShaders),o=n.getProgramParameter(a,n.ACTIVE_ATTRIBUTES),s=function(e,t){for(var i={},n=[],a=[],o=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),s=0;s=0){if(p=i[u.slice(0,v)],!Object(r.default)(p))continue;(m=p._locations).length<=1&&(_=p.value,null!==(g=e.getUniformLocation(t,u))&&(m.push(g),_.push(e.getUniform(t,g))))}else{m=[];for(var y=0;y>>0,l=Object(a.default)(i,0),u=l<0?Math.max(s+l,0):Math.min(l,s),d=Object(a.default)(o,s),c=d<0?Math.max(s+d,0):Math.min(d,s);u0;for(var a in t)if(t.hasOwnProperty(a))if("diffuse"===a||"emission"===a){var r=n&&q(t[a],e)?t[a]:"czm_gammaCorrect("+t[a]+")";e.shaderSource+="material."+a+" = "+r+"; \n"}else e.shaderSource+="alpha"===a?"material.alpha = "+t.alpha+"; \n":"material."+a+" = "+t[a]+";\n"}e.shaderSource+="return material;\n}\n"}})(t),function(e){var t=e._template.uniforms;for(var i in t)t.hasOwnProperty(i)&&J(e,i)}(t),function(e){var t=e._strict,i=e._template.materials;for(var n in i)if(i.hasOwnProperty(n)){var a=new U({strict:t,fabric:i[n],count:e._count});e._count=a._count,e._uniforms=Object(o.default)(e._uniforms,a._uniforms,!0),e.materials[n]=a,e._translucentFunctions=e._translucentFunctions.concat(a._translucentFunctions);var r="czm_getMaterial_"+e._count++;if(Z(a,"czm_getMaterial",r),e.shaderSource=a.shaderSource+e.shaderSource,0===Z(e,n,r+"(materialInput)")&&t)throw new c.default("strict: shader source does not use material '"+n+"'.")}}(t);var d=0===t._translucentFunctions.length||void 0;if(i=Object(l.default)(i,d),i=Object(l.default)(e.translucent,i),Object(u.default)(i))if("function"==typeof i){t._translucentFunctions.push((function(){return i(t)}))}else t._translucentFunctions.push(i)}(e,this),Object.defineProperties(this,{type:{value:this.type,writable:!1}}),Object(u.default)(U._uniformList[this.type])||(U._uniformList[this.type]=Object.keys(this._uniforms))}function V(e,t,i,n){if(Object(u.default)(e))for(var a in e)if(e.hasOwnProperty(a)){var r=-1!==t.indexOf(a);(n&&!r||!n&&r)&&i(a,t)}}function H(e,t){for(var i="fabric: property name '"+e+"' is not valid. It should be ",n=0;n-1)return!0;return!1}var X={mat2:h.a,mat3:p.default,mat4:m.default},K=/\.ktx2$/i;function J(e,t){var i=e._strict,n=e._template.uniforms,a=n[t],r=function(e){var t=e.type;if(!Object(u.default)(t)){var i=typeof e;if("number"===i)t="float";else if("boolean"===i)t="bool";else if("string"===i||e instanceof _.default||e instanceof HTMLCanvasElement||e instanceof HTMLImageElement)t=/^([rgba]){1,4}$/i.test(e)?"channels":e===U.DefaultCubeMapId?"samplerCube":"sampler2D";else if("object"===i)if(Array.isArray(e))4!==e.length&&9!==e.length&&16!==e.length||(t="mat"+Math.sqrt(e.length));else{var n=0;for(var a in e)e.hasOwnProperty(a)&&(n+=1);n>=2&&n<=4?t="vec"+n:6===n&&(t="samplerCube")}}return t}(a);if(!Object(u.default)(r))throw new c.default("fabric: uniform '"+t+"' has invalid type.");if("channels"===r){if(0===Z(e,t,a,!1)&&i)throw new c.default("strict: shader source does not use channels '"+t+"'.")}else{if("sampler2D"===r){var o=t+"Dimensions";(function(e,t,i){return Z(e,t,t,i)})(e,o)>0&&(n[o]={type:"ivec3",x:1,y:1},J(e,o))}if(!new RegExp("uniform\\s+"+r+"\\s+"+t+"\\s*;").test(e.shaderSource)){var s="uniform "+r+" "+t+";";e.shaderSource=s+e.shaderSource}var l=t+"_"+e._count++;if(1===Z(e,t,l)&&i)throw new c.default("strict: shader source does not use uniform '"+t+"'.");if(e.uniforms[t]=a,"sampler2D"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function(e){var t;return function(i,n){var a=i.uniforms,r=a[e],o=t!==r,s=!Object(u.default)(r)||r===U.DefaultImageId;t=r;var l,d,c=i._textures[e];if(r instanceof HTMLVideoElement)if(r.readyState>=2){if(o&&Object(u.default)(c)&&(c!==n.defaultTexture&&c.destroy(),c=void 0),!Object(u.default)(c)||c===n.defaultTexture){var h=new j.default({minificationFilter:i._minificationFilter,magnificationFilter:i._magnificationFilter});return c=new v.default({context:n,source:r,sampler:h}),void(i._textures[e]=c)}c.copyFrom({source:r})}else Object(u.default)(c)||(i._textures[e]=n.defaultTexture);else{if(r instanceof v.default&&r!==c){i._texturePaths[e]=void 0;var p=i._textures[e];return Object(u.default)(p)&&p!==i._defaultTexture&&p.destroy(),i._textures[e]=r,l=e+"Dimensions",void(a.hasOwnProperty(l)&&((d=a[l]).x=r._width,d.y=r._height))}if(o&&Object(u.default)(c)&&s&&(c!==i._defaultTexture&&c.destroy(),c=void 0),Object(u.default)(c)||(i._texturePaths[e]=void 0,c=i._textures[e]=i._defaultTexture,l=e+"Dimensions",a.hasOwnProperty(l)&&((d=a[l]).x=c._width,d.y=c._height)),!s){var m=r instanceof _.default;if(!Object(u.default)(i._texturePaths[e])||m&&r.url!==i._texturePaths[e].url||!m&&r!==i._texturePaths[e]){if("string"==typeof r||m){var g=m?r:_.default.createIfNeeded(r);(K.test(g.url)?Object(f.a)(g.url):g.fetchImage()).then((function(t){i._loadedImages.push({id:e,image:t})})).otherwise((function(){Object(u.default)(c)&&c!==i._defaultTexture&&c.destroy(),i._textures[e]=i._defaultTexture}))}else(r instanceof HTMLCanvasElement||r instanceof HTMLImageElement)&&i._loadedImages.push({id:e,image:r});i._texturePaths[e]=r}}}}}(t));else if("samplerCube"===r)e._uniforms[l]=function(){return e._textures[t]},e._updateFunctions.push(function(e){return function(t,i){var n=t.uniforms[e];if(n instanceof g.a){var a=t._textures[e];return a!==t._defaultTexture&&a.destroy(),t._texturePaths[e]=void 0,void(t._textures[e]=n)}if(Object(u.default)(t._textures[e])||(t._texturePaths[e]=void 0,t._textures[e]=i.defaultCubeMap),n!==U.DefaultCubeMapId){var r=n.positiveX+n.negativeX+n.positiveY+n.negativeY+n.positiveZ+n.negativeZ;if(r!==t._texturePaths[e]){var o=[_.default.createIfNeeded(n.positiveX).fetchImage(),_.default.createIfNeeded(n.negativeX).fetchImage(),_.default.createIfNeeded(n.positiveY).fetchImage(),_.default.createIfNeeded(n.negativeY).fetchImage(),_.default.createIfNeeded(n.positiveZ).fetchImage(),_.default.createIfNeeded(n.negativeZ).fetchImage()];z.a.all(o).then((function(i){t._loadedCubeMaps.push({id:e,images:i})})),t._texturePaths[e]=r}}}}(t));else if(-1!==r.indexOf("mat")){var d=new X[r];e._uniforms[l]=function(){return X[r].fromColumnMajorArray(e.uniforms[t],d)}}else e._uniforms[l]=function(){return e.uniforms[t]}}}function Z(e,t,i,n){n=Object(l.default)(n,!0);var a=0,r=new RegExp("([\\w"+(n?".":"")+"])?"+t+"([\\w])?","g");return e.shaderSource=e.shaderSource.replace(r,(function(e,t,n){return t||n?e:(a+=1,i)})),a}U._materialCache={_materials:{},addMaterial:function(e,t){this._materials[e]=t},getMaterial:function(e){return this._materials[e]}},U.DefaultImageId="czm_defaultImage",U.DefaultCubeMapId="czm_defaultCubeMap",U.ColorType="Color",U._materialCache.addMaterial(U.ColorType,{fabric:{type:U.ColorType,uniforms:{color:new r.default(1,0,0,.5)},components:{diffuse:"color.rgb",alpha:"color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),U.ImageType="Image",U._materialCache.addMaterial(U.ImageType,{fabric:{type:U.ImageType,uniforms:{image:U.DefaultImageId,repeat:new n.default(1,1),color:new r.default(1,1,1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).rgb * color.rgb",alpha:"texture2D(image, fract(repeat * materialInput.st)).a * color.a"}},translucent:function(e){return e.uniforms.color.alpha<1}}),U.DiffuseMapType="DiffuseMap",U._materialCache.addMaterial(U.DiffuseMapType,{fabric:{type:U.DiffuseMapType,uniforms:{image:U.DefaultImageId,channels:"rgb",repeat:new n.default(1,1)},components:{diffuse:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),U.AlphaMapType="AlphaMap",U._materialCache.addMaterial(U.AlphaMapType,{fabric:{type:U.AlphaMapType,uniforms:{image:U.DefaultImageId,channel:"a",repeat:new n.default(1,1)},components:{alpha:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!0}),U.SpecularMapType="SpecularMap",U._materialCache.addMaterial(U.SpecularMapType,{fabric:{type:U.SpecularMapType,uniforms:{image:U.DefaultImageId,channel:"r",repeat:new n.default(1,1)},components:{specular:"texture2D(image, fract(repeat * materialInput.st)).channel"}},translucent:!1}),U.EmissionMapType="EmissionMap",U._materialCache.addMaterial(U.EmissionMapType,{fabric:{type:U.EmissionMapType,uniforms:{image:U.DefaultImageId,channels:"rgb",repeat:new n.default(1,1)},components:{emission:"texture2D(image, fract(repeat * materialInput.st)).channels"}},translucent:!1}),U.BumpMapType="BumpMap",U._materialCache.addMaterial(U.BumpMapType,{fabric:{type:U.BumpMapType,uniforms:{image:U.DefaultImageId,channel:"r",strength:.8,repeat:new n.default(1,1)},source:b.a},translucent:!1}),U.NormalMapType="NormalMap",U._materialCache.addMaterial(U.NormalMapType,{fabric:{type:U.NormalMapType,uniforms:{image:U.DefaultImageId,channels:"rgb",strength:.8,repeat:new n.default(1,1)},source:S.a},translucent:!1}),U.GridType="Grid",U._materialCache.addMaterial(U.GridType,{fabric:{type:U.GridType,uniforms:{color:new r.default(0,1,0,1),cellAlpha:.1,lineCount:new n.default(8,8),lineThickness:new n.default(1,1),lineOffset:new n.default(0,0)},source:C.a},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.cellAlpha<1}}),U.StripeType="Stripe",U._materialCache.addMaterial(U.StripeType,{fabric:{type:U.StripeType,uniforms:{horizontal:!0,evenColor:new r.default(1,1,1,.5),oddColor:new r.default(0,0,1,.5),offset:0,repeat:5},source:N.a},translucent:function(e){var t=e.uniforms;return t.evenColor.alpha<1||t.oddColor.alpha<1}}),U.CheckerboardType="Checkerboard",U._materialCache.addMaterial(U.CheckerboardType,{fabric:{type:U.CheckerboardType,uniforms:{lightColor:new r.default(1,1,1,.5),darkColor:new r.default(0,0,0,.5),repeat:new n.default(5,5)},source:w.a},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),U.DotType="Dot",U._materialCache.addMaterial(U.DotType,{fabric:{type:U.DotType,uniforms:{lightColor:new r.default(1,1,0,.75),darkColor:new r.default(0,1,1,.75),repeat:new n.default(5,5)},source:O.a},translucent:function(e){var t=e.uniforms;return t.lightColor.alpha<1||t.darkColor.alpha<1}}),U.WaterType="Water",U._materialCache.addMaterial(U.WaterType,{fabric:{type:U.WaterType,uniforms:{baseWaterColor:new r.default(.2,.3,.6,1),blendColor:new r.default(0,1,.699,1),specularMap:U.DefaultImageId,normalMap:U.DefaultImageId,frequency:10,animationSpeed:.01,amplitude:1,specularIntensity:.5,fadeFactor:1},source:k.a},translucent:function(e){var t=e.uniforms;return t.baseWaterColor.alpha<1||t.blendColor.alpha<1}}),U.RimLightingType="RimLighting",U._materialCache.addMaterial(U.RimLightingType,{fabric:{type:U.RimLightingType,uniforms:{color:new r.default(1,0,0,.7),rimColor:new r.default(1,1,1,.4),width:.3},source:L.a},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.rimColor.alpha<1}}),U.FadeType="Fade",U._materialCache.addMaterial(U.FadeType,{fabric:{type:U.FadeType,uniforms:{fadeInColor:new r.default(1,0,0,1),fadeOutColor:new r.default(0,0,0,0),maximumDistance:.5,repeat:!0,fadeDirection:{x:!0,y:!0},time:new n.default(.5,.5)},source:E.a},translucent:function(e){var t=e.uniforms;return t.fadeInColor.alpha<1||t.fadeOutColor.alpha<1}}),U.PolylineArrowType="PolylineArrow",U._materialCache.addMaterial(U.PolylineArrowType,{fabric:{type:U.PolylineArrowType,uniforms:{color:new r.default(1,1,1,1)},source:M.a},translucent:!0}),U.PolylineDashType="PolylineDash",U._materialCache.addMaterial(U.PolylineDashType,{fabric:{type:U.PolylineDashType,uniforms:{color:new r.default(1,0,1,1),gapColor:new r.default(0,0,0,0),dashLength:16,dashPattern:255},source:D.a},translucent:!0}),U.PolylineGlowType="PolylineGlow",U._materialCache.addMaterial(U.PolylineGlowType,{fabric:{type:U.PolylineGlowType,uniforms:{color:new r.default(0,.5,1,1),glowPower:.25,taperPower:1},source:P.a},translucent:!0}),U.PolylineOutlineType="PolylineOutline",U._materialCache.addMaterial(U.PolylineOutlineType,{fabric:{type:U.PolylineOutlineType,uniforms:{color:new r.default(1,1,1,1),outlineColor:new r.default(1,0,0,1),outlineWidth:1},source:I.a},translucent:function(e){var t=e.uniforms;return t.color.alpha<1||t.outlineColor.alpha<1}}),U.ElevationContourType="ElevationContour",U._materialCache.addMaterial(U.ElevationContourType,{fabric:{type:U.ElevationContourType,uniforms:{spacing:100,color:new r.default(1,0,0,1),width:1},source:A.a},translucent:!1}),U.ElevationRampType="ElevationRamp",U._materialCache.addMaterial(U.ElevationRampType,{fabric:{type:U.ElevationRampType,uniforms:{image:U.DefaultImageId,minimumHeight:0,maximumHeight:1e4},source:T.a},translucent:!1}),U.SlopeRampMaterialType="SlopeRamp",U._materialCache.addMaterial(U.SlopeRampMaterialType,{fabric:{type:U.SlopeRampMaterialType,uniforms:{image:U.DefaultImageId},source:R.a},translucent:!1}),U.AspectRampMaterialType="AspectRamp",U._materialCache.addMaterial(U.AspectRampMaterialType,{fabric:{type:U.AspectRampMaterialType,uniforms:{image:U.DefaultImageId},source:y.a},translucent:!1}),U.ElevationBandType="ElevationBand",U._materialCache.addMaterial(U.ElevationBandType,{fabric:{type:U.ElevationBandType,uniforms:{heights:U.DefaultImageId,colors:U.DefaultImageId},source:x.a},translucent:!0}),t.default=U},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o={};function s(e,t){if(!Object(a.default)(e))throw new r.default("identifier is required.");Object(a.default)(o[e])||(o[e]=!0,console.warn(Object(n.default)(t,e)))}s.geometryOutlines="Entity geometry outlines are unsupported on terrain. Outlines will be disabled. To enable outlines, disable geometry terrain clamping by explicitly setting height to 0.",s.geometryZIndex="Entity geometry with zIndex are unsupported when height or extrudedHeight are defined. zIndex will be ignored",s.geometryHeightReference="Entity corridor, ellipse, polygon or rectangle with heightReference must also have a defined height. heightReference will be ignored",s.geometryExtrudedHeightReference="Entity corridor, ellipse, polygon or rectangle with extrudedHeightReference must also have a defined extrudedHeight. extrudedHeightReference will be ignored",t.a=s},function(e,t,i){"use strict";t.a=Object.freeze({NONE:0,TOP:1,ALL:2})},function(e,t,i){"use strict";t.a=Object.freeze({UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,FAILED:4})},function(e,t,i){"use strict";var n=i(17),a=i(8),r=i(1),o=i(16),s=i(50),l=i(0),u=i(128),d=i(12),c=i(6),f=i(27),h=i(23),p=i(10),m=i(34),_=i(144),g=i(25),v=i(161),y=i(150),b=i(90),w={updateForwardAxis:function(e){var t=e.gltf.extras.sourceVersion;(Object(l.default)(t)&&"2.0"!==t||"2.0"!==w.getAssetVersion(e.gltf))&&(e._gltfForwardAxis=b.a.X)},getAssetVersion:function(e){return Object(l.default)(e.asset)&&Object(l.default)(e.asset.version)?e.asset.version:"1.0"},splitIncompatibleMaterials:function(e){var t=e.accessors,i=e.materials,n={};return g.a.mesh(e,(function(e){g.a.meshPrimitive(e,(function(e){var a,r,o=e.material,u=i[o],d=e.attributes.JOINTS_0;if(Object(l.default)(d)){var c=t[d];a=c.componentType,r=c.type}var f=Object(l.default)(d)&&"VEC4"===r,h=Object(l.default)(e.attributes.COLOR_0),p=Object(l.default)(e.targets),m=Object(l.default)(e.attributes.NORMAL),g=Object(l.default)(e.attributes.TANGENT),v=Object(l.default)(e.attributes.TEXCOORD_0),y=v&&Object(l.default)(e.attributes.TEXCOORD_1),b=Object(l.default)(e.extensions)&&Object(l.default)(e.extensions.CESIUM_primitive_outline),w=n[o];if(Object(l.default)(w)){if(w.skinning.skinned!==f||w.hasVertexColors!==h||w.hasMorphTargets!==p||w.hasNormals!==m||w.hasTangents!==g||w.hasTexCoords!==v||w.hasTexCoord1!==y||w.hasOutline!==b){var O=Object(s.default)(u,!0);o=Object(_.a)(i,O),e.material=o,n[o]={skinning:{skinned:f,componentType:a},hasVertexColors:h,hasMorphTargets:p,hasNormals:m,hasTangents:g,hasTexCoords:v,hasTexCoord1:y,hasOutline:b}}}else n[o]={skinning:{skinned:f,componentType:a},hasVertexColors:h,hasMorphTargets:p,hasNormals:m,hasTangents:g,hasTexCoords:v,hasTexCoord1:y,hasOutline:b}}))})),n},getShaderVariable:function(e){return"SCALAR"===e?"float":e.toLowerCase()},ModelState:{NEEDS_LOAD:0,LOADING:1,LOADED:2,FAILED:3},getFailedLoadFunction:function(e,t,i){return function(n){e._state=w.ModelState.FAILED;var a="Failed to load "+t+": "+i;Object(l.default)(n)&&(a+="\n"+n.message),e._readyPromise.reject(new h.a(a))}},parseBuffers:function(e,t){var i=e._loadResources;g.a.buffer(e.gltf,(function(n,a){if(Object(l.default)(n.extras._pipeline.source))i.buffers[a]=n.extras._pipeline.source;else if(Object(l.default)(t)){var r=e._resource.getDerivedResource({url:n.uri});++i.pendingBufferLoads,r.fetchArrayBuffer().then(t(e,a)).otherwise(w.getFailedLoadFunction(e,"buffer",r.url))}}))}},O=new r.default,x=new r.default;function A(e,t){return g.a.techniqueAttribute(e,(function(e,i){if(e.semantic===t)return i}))}function T(e,t,i,n){return Object(v.a)(e,"KHR_techniques_webgl")?function(e,t){if(!(e.semantic!==i||n&&Object(l.default)(e.node)))return t}:function(e,a){var r=t.parameters[e];if(!(r.semantic!==i||n&&Object(l.default)(r.node)))return a}}w.computeBoundingSphere=function(e){for(var t=e.gltf,i=t.nodes,a=t.meshes,o=t.scenes[t.scene].nodes,s=o.length,u=[],d=new r.default(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),f=new r.default(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),h=0;h0;){var m=(p=u.pop())._transformToRoot,_=p.mesh;if(Object(l.default)(_))for(var g=a[_].primitives,v=g.length,y=0;y1?"vec"+p:"float")+" "+h+";\n"+i;var _=3===p&&"COLOR_0"===r;_&&(i=M(i,h,"vec4("+h+", 1.0)"));var g="";if(s.octEncoded){var v=d+"_rangeConstant";i="uniform float "+v+";\n"+i,g="\nvoid main() {\n "+h+" = czm_octDecode("+u+".xy, "+v+").zxy;\n "+f+"();\n}\n"}else{var y=d+"_normConstant",b=d+"_min";i="uniform float "+y+";\nuniform "+c+" "+b+";\n"+i,g="\nvoid main() {\n "+h+" = "+b+" + "+u+(_?".xyz":"")+" * "+y+";\n "+f+"();\n}\n"}i=m.default.replaceMain(i,f),i+=g}}return{shader:i}},w.modifyShaderForQuantizedAttributes=function(e,t,i){var n={},a=t.attributes;for(var r in a)if(a.hasOwnProperty(r)){var o=P(e,t,r),s=t.attributes[r];"_"===r.charAt(0)&&(r=r.substring(1));var u="gltf_u_dec_"+r.toLowerCase(),d=u+"_scale",c=u+"_translate";if(!Object(l.default)(n[u])&&!Object(l.default)(n[d])){var f=D(e,s);if(Object(l.default)(f)){var h,p=f.decodeMatrix,_="gltf_decoded_"+r,g=o.replace("a_","gltf_a_dec_"),v=Math.floor(Math.sqrt(p.length));i=(h=v>2?"vec"+(v-1):"float")+" "+g+";\n"+(i=M(i,o,g));var y="";5===v?(i="uniform vec4 "+c+";\n"+(i="uniform mat4 "+d+";\n"+i),y="\nvoid main() {\n "+g+" = "+d+" * "+o+" + "+c+";\n "+_+"();\n}\n",n[d]={mat:4},n[c]={vec:4}):(i="uniform mat"+v+" "+u+";\n"+i,y="\nvoid main() {\n "+g+" = "+h+"("+u+" * vec"+v+"("+o+",1.0));\n "+_+"();\n}\n",n[u]={mat:v}),i=m.default.replaceMain(i,_),i+=y}}}return{shader:i,uniforms:n}},Object.defineProperties(k.prototype,{value:{get:function(){if(!Object(l.default)(this._value)){var e=this._textures[this._textureId];if(!Object(l.default)(e))return this._defaultTexture;this._value=e}return this._value},set:function(e){this._value=e}}}),k.prototype.clone=function(e){return e},k.prototype.func=void 0;var z={};function U(e){return[e[20],e[21],e[22],e[23]]}z[p.a.FLOAT]=I,z[p.a.FLOAT_VEC2]=L,z[p.a.FLOAT_VEC3]=j,z[p.a.FLOAT_VEC4]=R,z[p.a.INT]=I,z[p.a.INT_VEC2]=L,z[p.a.INT_VEC3]=j,z[p.a.INT_VEC4]=R,z[p.a.BOOL]=I,z[p.a.BOOL_VEC2]=L,z[p.a.BOOL_VEC3]=j,z[p.a.BOOL_VEC4]=R,z[p.a.FLOAT_MAT2]=N,z[p.a.FLOAT_MAT3]=B,z[p.a.FLOAT_MAT4]=F,z[p.a.SAMPLER_2D]=function(e,t,i){var n=new k(e,t,i);return n.func=function(){return n.value},n},w.createUniformFunction=function(e,t,i,n){return z[e](t,i,n)},w.createUniformsForDracoQuantizedAttributes=function(e){var t={};for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],a=n.quantization;if(!Object(l.default)(a))continue;"_"===i.charAt(0)&&(i=i.substring(1));var r="gltf_u_dec_"+i.toLowerCase();if(a.octEncoded){var o=r+"_rangeConstant",s=(1<e.far)throw new o.default("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._width=e.width,e._near=e.near,e._far=e.far;var i=1/e.aspectRatio;t.right=.5*e.width,t.left=-t.right,t.top=i*t.right,t.bottom=-t.top,t.near=e.near,t.far=e.far}}u.packedLength=4,u.pack=function(e,t,i){return n.a.typeOf.object("value",e),n.a.defined("array",t),i=Object(a.default)(i,0),t[i++]=e.width,t[i++]=e.aspectRatio,t[i++]=e.near,t[i]=e.far,t},u.unpack=function(e,t,i){return n.a.defined("array",e),t=Object(a.default)(t,0),Object(r.default)(i)||(i=new u),i.width=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t],i},Object.defineProperties(u.prototype,{projectionMatrix:{get:function(){return d(this),this._offCenterFrustum.projectionMatrix}}}),u.prototype.computeCullingVolume=function(e,t,i){return d(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},u.prototype.getPixelDimensions=function(e,t,i,n,a){return d(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,a)},u.prototype.clone=function(e){return Object(r.default)(e)||(e=new u),e.aspectRatio=this.aspectRatio,e.width=this.width,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._width=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},u.prototype.equals=function(e){return!!(Object(r.default)(e)&&e instanceof u)&&(d(this),d(e),this.width===e.width&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},u.prototype.equalsEpsilon=function(e,t,i){return!!(Object(r.default)(e)&&e instanceof u)&&(d(this),d(e),s.default.equalsEpsilon(this.width,e.width,t,i)&&s.default.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))},t.a=u},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(16),r=i(4),o=i(0),s=i(3),l=i(5),u=i(6);function d(e,t){if(r.a.typeOf.object("normal",e),!l.default.equalsEpsilon(n.default.magnitude(e),1,l.default.EPSILON6))throw new s.default("normal must be normalized.");r.a.typeOf.number("distance",t),this.normal=n.default.clone(e),this.distance=t}d.fromPointNormal=function(e,t,i){if(r.a.typeOf.object("point",e),r.a.typeOf.object("normal",t),!l.default.equalsEpsilon(n.default.magnitude(t),1,l.default.EPSILON6))throw new s.default("normal must be normalized.");var a=-n.default.dot(t,e);return Object(o.default)(i)?(n.default.clone(t,i.normal),i.distance=a,i):new d(t,a)};var c=new n.default;d.fromCartesian4=function(e,t){r.a.typeOf.object("coefficients",e);var i=n.default.fromCartesian4(e,c),a=e.w;if(!l.default.equalsEpsilon(n.default.magnitude(i),1,l.default.EPSILON6))throw new s.default("normal must be normalized.");return Object(o.default)(t)?(n.default.clone(i,t.normal),t.distance=a,t):new d(i,a)},d.getPointDistance=function(e,t){return r.a.typeOf.object("plane",e),r.a.typeOf.object("point",t),n.default.dot(e.normal,t)+e.distance};var f=new n.default;d.projectPointOntoPlane=function(e,t,i){r.a.typeOf.object("plane",e),r.a.typeOf.object("point",t),Object(o.default)(i)||(i=new n.default);var a=d.getPointDistance(e,t),s=n.default.multiplyByScalar(e.normal,a,f);return n.default.subtract(t,s,i)};var h=new u.default,p=new a.a,m=new n.default;d.transform=function(e,t,i){r.a.typeOf.object("plane",e),r.a.typeOf.object("transform",t);var o=e.normal,s=e.distance,l=u.default.inverseTranspose(t,h),c=a.a.fromElements(o.x,o.y,o.z,s,p);c=u.default.multiplyByVector(l,c,c);var f=n.default.fromCartesian4(c,m);return c=a.a.divideByScalar(c,n.default.magnitude(f),c),d.fromCartesian4(c,i)},d.clone=function(e,t){return r.a.typeOf.object("plane",e),Object(o.default)(t)?(n.default.clone(e.normal,t.normal),t.distance=e.distance,t):new d(e.normal,e.distance)},d.equals=function(e,t){return r.a.typeOf.object("left",e),r.a.typeOf.object("right",t),e.distance===t.distance&&n.default.equals(e.normal,t.normal)},d.ORIGIN_XY_PLANE=Object.freeze(new d(n.default.UNIT_Z,0)),d.ORIGIN_YZ_PLANE=Object.freeze(new d(n.default.UNIT_X,0)),d.ORIGIN_ZX_PLANE=Object.freeze(new d(n.default.UNIT_Y,0)),t.default=d},function(e,t,i){"use strict";var n=i(122),a=i(66),r={CESIUM_3D_TILE_MASK:128,SKIP_LOD_MASK:112,SKIP_LOD_BIT_SHIFT:4,CLASSIFICATION_MASK:15,setCesium3DTileBit:function(){return{enabled:!0,frontFunction:n.a.ALWAYS,frontOperation:{fail:a.a.KEEP,zFail:a.a.KEEP,zPass:a.a.REPLACE},backFunction:n.a.ALWAYS,backOperation:{fail:a.a.KEEP,zFail:a.a.KEEP,zPass:a.a.REPLACE},reference:r.CESIUM_3D_TILE_MASK,mask:r.CESIUM_3D_TILE_MASK}}};t.a=Object.freeze(r)},function(e,t,i){"use strict";var n=i(2);t.a=function(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this.position=e.position,this.normal=e.normal,this.st=e.st,this.bitangent=e.bitangent,this.tangent=e.tangent,this.color=e.color}},function(e,t,i){"use strict";i.r(t);var n=i(10),a={CLAMP_TO_EDGE:n.a.CLAMP_TO_EDGE,REPEAT:n.a.REPEAT,MIRRORED_REPEAT:n.a.MIRRORED_REPEAT,validate:function(e){return e===a.CLAMP_TO_EDGE||e===a.REPEAT||e===a.MIRRORED_REPEAT}};t.default=Object.freeze(a)},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({LEFT_DOWN:0,LEFT_UP:1,LEFT_CLICK:2,LEFT_DOUBLE_CLICK:3,RIGHT_DOWN:5,RIGHT_UP:6,RIGHT_CLICK:7,MIDDLE_DOWN:10,MIDDLE_UP:11,MIDDLE_CLICK:12,MOUSE_MOVE:15,WHEEL:16,PINCH_START:17,PINCH_END:18,PINCH_MOVE:19})},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(4),r=i(2),o=i(0);function s(e,t){t=n.default.clone(Object(r.default)(t,n.default.ZERO)),n.default.equals(t,n.default.ZERO)||n.default.normalize(t,t),this.origin=n.default.clone(Object(r.default)(e,n.default.ZERO)),this.direction=t}s.clone=function(e,t){if(Object(o.default)(e))return Object(o.default)(t)?(t.origin=n.default.clone(e.origin),t.direction=n.default.clone(e.direction),t):new s(e.origin,e.direction)},s.getPoint=function(e,t,i){return a.a.typeOf.object("ray",e),a.a.typeOf.number("t",t),Object(o.default)(i)||(i=new n.default),i=n.default.multiplyByScalar(e.direction,t,i),n.default.add(e.origin,i,i)},t.default=s},function(e,t,i){"use strict";var n={DISABLED:0,ENABLED:1,CAST_ONLY:2,RECEIVE_ONLY:3,NUMBER_OF_SHADOW_MODES:4,castShadows:function(e){return e===n.ENABLED||e===n.CAST_ONLY},receiveShadows:function(e){return e===n.ENABLED||e===n.RECEIVE_ONLY},fromCastReceive:function(e,t){return e&&t?n.ENABLED:e?n.CAST_ONLY:t?n.RECEIVE_ONLY:n.DISABLED}};t.a=Object.freeze(n)},function(e,t,i){"use strict";i.r(t);var n=i(11),a=i(2),r=i(0),o=i(3);function s(e){e=Object(a.default)(e,!0),this.value=s.toValue(e)}Object.defineProperties(s.prototype,{componentDatatype:{get:function(){return n.default.UNSIGNED_BYTE}},componentsPerAttribute:{get:function(){return 1}},normalize:{get:function(){return!1}}}),s.toValue=function(e,t){if(!Object(r.default)(e))throw new o.default("show is required.");return Object(r.default)(t)?(t[0]=e,t):new Uint8Array([e])},t.default=s},function(e,t,i){"use strict";t.a={WEST:0,NORTH:1,EAST:2,SOUTH:3,NORTHWEST:4,NORTHEAST:5,SOUTHWEST:6,SOUTHEAST:7}},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({CENTER:0,BOTTOM:1,BASELINE:2,TOP:-1})},function(e,t,i){"use strict";var n=i(4),a=i(5),r=i(12),o=i(6),s={X:0,Y:1,Z:2};s.Y_UP_TO_Z_UP=o.default.fromRotationTranslation(r.default.fromRotationX(a.default.PI_OVER_TWO)),s.Z_UP_TO_Y_UP=o.default.fromRotationTranslation(r.default.fromRotationX(-a.default.PI_OVER_TWO)),s.X_UP_TO_Z_UP=o.default.fromRotationTranslation(r.default.fromRotationY(-a.default.PI_OVER_TWO)),s.Z_UP_TO_X_UP=o.default.fromRotationTranslation(r.default.fromRotationY(a.default.PI_OVER_TWO)),s.X_UP_TO_Y_UP=o.default.fromRotationTranslation(r.default.fromRotationZ(a.default.PI_OVER_TWO)),s.Y_UP_TO_X_UP=o.default.fromRotationTranslation(r.default.fromRotationZ(-a.default.PI_OVER_TWO)),s.fromName=function(e){return n.a.typeOf.string("name",e),s[e]},t.a=Object.freeze(s)},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(19),s=i(3),l=i(33),u=i(56),d=i(32);function c(e,t,i){var n=e._gl;n.framebufferTexture2D(n.FRAMEBUFFER,t,i._target,i._texture,0)}function f(e,t,i){var n=e._gl;n.framebufferRenderbuffer(n.FRAMEBUFFER,t,n.RENDERBUFFER,i._getRenderbuffer())}function h(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).context;n.a.defined("options.context",t);var i=t._gl,o=u.a.maximumColorAttachments;if(this._gl=i,this._framebuffer=i.createFramebuffer(),this._colorTextures=[],this._colorRenderbuffers=[],this._activeColorAttachments=[],this._depthTexture=void 0,this._depthRenderbuffer=void 0,this._stencilRenderbuffer=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this.destroyAttachments=Object(a.default)(e.destroyAttachments,!0),Object(r.default)(e.colorTextures)&&Object(r.default)(e.colorRenderbuffers))throw new s.default("Cannot have both color texture and color renderbuffer attachments.");if(Object(r.default)(e.depthTexture)&&Object(r.default)(e.depthRenderbuffer))throw new s.default("Cannot have both a depth texture and depth renderbuffer attachment.");if(Object(r.default)(e.depthStencilTexture)&&Object(r.default)(e.depthStencilRenderbuffer))throw new s.default("Cannot have both a depth-stencil texture and depth-stencil renderbuffer attachment.");var h,p,m,_,g,v=Object(r.default)(e.depthTexture)||Object(r.default)(e.depthRenderbuffer),y=Object(r.default)(e.depthStencilTexture)||Object(r.default)(e.depthStencilRenderbuffer);if(v&&y)throw new s.default("Cannot have both a depth and depth-stencil attachment.");if(Object(r.default)(e.stencilRenderbuffer)&&y)throw new s.default("Cannot have both a stencil and depth-stencil attachment.");if(v&&Object(r.default)(e.stencilRenderbuffer))throw new s.default("Cannot have both a depth and stencil attachment.");if(this._bind(),Object(r.default)(e.colorTextures)){var b=e.colorTextures;if((_=this._colorTextures.length=this._activeColorAttachments.length=b.length)>o)throw new s.default("The number of color attachments exceeds the number supported.");for(m=0;m<_;++m){if(h=b[m],!l.default.isColorFormat(h.pixelFormat))throw new s.default("The color-texture pixel-format must be a color format.");if(h.pixelDatatype===d.default.FLOAT&&!t.colorBufferFloat)throw new s.default("The color texture pixel datatype is FLOAT and the WebGL implementation does not support the EXT_color_buffer_float or WEBGL_color_buffer_float extensions. See Context.colorBufferFloat.");if(h.pixelDatatype===d.default.HALF_FLOAT&&!t.colorBufferHalfFloat)throw new s.default("The color texture pixel datatype is HALF_FLOAT and the WebGL implementation does not support the EXT_color_buffer_half_float extension. See Context.colorBufferHalfFloat.");c(this,g=this._gl.COLOR_ATTACHMENT0+m,h),this._activeColorAttachments[m]=g,this._colorTextures[m]=h}}if(Object(r.default)(e.colorRenderbuffers)){var w=e.colorRenderbuffers;if((_=this._colorRenderbuffers.length=this._activeColorAttachments.length=w.length)>o)throw new s.default("The number of color attachments exceeds the number supported.");for(m=0;m<_;++m)p=w[m],f(this,g=this._gl.COLOR_ATTACHMENT0+m,p),this._activeColorAttachments[m]=g,this._colorRenderbuffers[m]=p}if(Object(r.default)(e.depthTexture)){if((h=e.depthTexture).pixelFormat!==l.default.DEPTH_COMPONENT)throw new s.default("The depth-texture pixel-format must be DEPTH_COMPONENT.");c(this,this._gl.DEPTH_ATTACHMENT,h),this._depthTexture=h}if(Object(r.default)(e.depthRenderbuffer)&&(p=e.depthRenderbuffer,f(this,this._gl.DEPTH_ATTACHMENT,p),this._depthRenderbuffer=p),Object(r.default)(e.stencilRenderbuffer)&&(p=e.stencilRenderbuffer,f(this,this._gl.STENCIL_ATTACHMENT,p),this._stencilRenderbuffer=p),Object(r.default)(e.depthStencilTexture)){if((h=e.depthStencilTexture).pixelFormat!==l.default.DEPTH_STENCIL)throw new s.default("The depth-stencil pixel-format must be DEPTH_STENCIL.");c(this,this._gl.DEPTH_STENCIL_ATTACHMENT,h),this._depthStencilTexture=h}Object(r.default)(e.depthStencilRenderbuffer)&&(p=e.depthStencilRenderbuffer,f(this,this._gl.DEPTH_STENCIL_ATTACHMENT,p),this._depthStencilRenderbuffer=p),this._unBind()}Object.defineProperties(h.prototype,{status:{get:function(){this._bind();var e=this._gl.checkFramebufferStatus(this._gl.FRAMEBUFFER);return this._unBind(),e}},numberOfColorAttachments:{get:function(){return this._activeColorAttachments.length}},depthTexture:{get:function(){return this._depthTexture}},depthRenderbuffer:{get:function(){return this._depthRenderbuffer}},stencilRenderbuffer:{get:function(){return this._stencilRenderbuffer}},depthStencilTexture:{get:function(){return this._depthStencilTexture}},depthStencilRenderbuffer:{get:function(){return this._depthStencilRenderbuffer}},hasDepthAttachment:{get:function(){return!!(this.depthTexture||this.depthRenderbuffer||this.depthStencilTexture||this.depthStencilRenderbuffer)}}}),h.prototype._bind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,this._framebuffer)},h.prototype._unBind=function(){var e=this._gl;e.bindFramebuffer(e.FRAMEBUFFER,null)},h.prototype._getActiveColorAttachments=function(){return this._activeColorAttachments},h.prototype.getColorTexture=function(e){if(!Object(r.default)(e)||e<0||e>=this._colorTextures.length)throw new s.default("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorTextures[e]},h.prototype.getColorRenderbuffer=function(e){if(!Object(r.default)(e)||e<0||e>=this._colorRenderbuffers.length)throw new s.default("index is required, must be greater than or equal to zero and must be less than the number of color attachments.");return this._colorRenderbuffers[e]},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){if(this.destroyAttachments){for(var e=0,t=this._colorTextures,i=t.length;e=0?Math.min(Number(e)/Number(o.getMaximum(t)),1):-Math.min(Number(e)/Number(o.getMinimum(t)),1)},unnormalize:function(e,t){if(n.a.typeOf.number("value",e),!o.isIntegerType(t))throw new a.default("type must be an integer type");var i=o.getMinimum(t),s=o.getMaximum(t);return e>=0?e*=Number(s):e=-e*Number(i),t!==o.INT64&&t!==o.UINT64||!r.a.supportsBigInt()||(e=BigInt(e)),e>s?s:e=3){var i=6*(t-2),n=y.a.createTypedArray(t,i);M(n,0,e[0],e[1],e[2]);for(var a=6,r=3;r0){for(var t=e.length-1,i=6*(t-1),n=y.a.createTypedArray(t,i),a=e[0],r=0,o=1;oa&&(a=i[r]);e.indices=C.a.tipsify({indices:i,maximumIndex:a,cacheSize:t})}return e},S.fitToUnsignedShortIndices=function(e){if(!Object(f.default)(e))throw new h.default("geometry is required.");if(Object(f.default)(e.indices)&&e.primitiveType!==E.default.TRIANGLES&&e.primitiveType!==E.default.LINES&&e.primitiveType!==E.default.POINTS)throw new h.default("geometry.primitiveType must equal to PrimitiveType.TRIANGLES, PrimitiveType.LINES, or PrimitiveType.POINTS.");var t=[],i=_.default.computeNumberOfVertices(e);if(Object(f.default)(e.indices)&&i>=O.default.SIXTY_FOUR_KILOBYTES){var n,a=[],r=[],o=0,s=D(e.attributes),l=e.indices,u=l.length;e.primitiveType===E.default.TRIANGLES?n=3:e.primitiveType===E.default.LINES?n=2:e.primitiveType===E.default.POINTS&&(n=1);for(var d=0;d=O.default.SIXTY_FOUR_KILOBYTES&&(t.push(new _.default({attributes:s,indices:r,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV})),a=[],r=[],o=0,s=D(e.attributes))}0!==r.length&&t.push(new _.default({attributes:s,indices:r,primitiveType:e.primitiveType,boundingSphere:e.boundingSphere,boundingSphereCV:e.boundingSphereCV}))}else t.push(e);return t};var I=new s.default,L=new u.default;S.projectTo2D=function(e,t,i,n,a){if(!Object(f.default)(e))throw new h.default("geometry is required.");if(!Object(f.default)(t))throw new h.default("attributeName is required.");if(!Object(f.default)(i))throw new h.default("attributeName3D is required.");if(!Object(f.default)(n))throw new h.default("attributeName2D is required.");if(!Object(f.default)(e.attributes[t]))throw new h.default("geometry must have attribute matching the attributeName argument: "+t+".");if(e.attributes[t].componentDatatype!==d.default.DOUBLE)throw new h.default("The attribute componentDatatype must be ComponentDatatype.DOUBLE.");for(var r=e.attributes[t],o=(a=Object(f.default)(a)?a:new m.a).ellipsoid,l=r.values,u=new Float64Array(l.length),c=0,p=0;pj&&(j=R)}return new _.default({attributes:O,indices:w,primitiveType:p,boundingSphere:Object(f.default)(L)?new r.default(L,j):void 0})}S.combineInstances=function(e){if(!Object(f.default)(e)||e.length<1)throw new h.default("instances is required and must have length greater than zero.");for(var t=[],i=[],n=e.length,a=0;a0&&o.push(U(t,"geometry")),i.length>0&&(o.push(U(i,"westHemisphereGeometry")),o.push(U(i,"eastHemisphereGeometry"))),o};var V=new s.default,H=new s.default,G=new s.default,Y=new s.default;S.computeNormal=function(e){if(!Object(f.default)(e))throw new h.default("geometry is required.");if(!Object(f.default)(e.attributes.position)||!Object(f.default)(e.attributes.position.values))throw new h.default("geometry.attributes.position.values is required.");if(!Object(f.default)(e.indices))throw new h.default("geometry.indices is required.");if(e.indices.length<2||e.indices.length%3!=0)throw new h.default("geometry.indices length must be greater than 0 and be a multiple of 3.");if(e.primitiveType!==E.default.TRIANGLES)throw new h.default("geometry.primitiveType must be PrimitiveType.TRIANGLES.");var t,i=e.indices,n=e.attributes,a=n.position.values,r=n.position.values.length/3,o=i.length,l=new Array(r),u=new Array(o/3),c=new Array(o);for(t=0;t0){for(p=0;p3&&(i[3]=0,i[4]=2,i[5]=3);for(var n=6,a=3;a=0||t.x>=0||i.x>=0)){!function(e,t,i){if(0!==e.y&&0!==t.y&&0!==i.y)return te(e,e.y<0),te(t,t.y<0),void te(i,i.y<0);var n=Math.abs(e.y),a=Math.abs(t.y),r=Math.abs(i.y),o=(n>a?n>r?O.default.sign(e.y):O.default.sign(i.y):a>r?O.default.sign(t.y):O.default.sign(i.y))<0;te(e,o),te(t,o),te(i,o)}(e,t,i);var n=e.y<0,a=t.y<0,r=i.y<0,o=0;o+=n?1:0,o+=a?1:0;var s=le.indices;1===(o+=r?1:0)?(s[1]=3,s[2]=4,s[5]=6,s[7]=6,s[8]=5,n?(ne(e,t,ae,oe),ne(e,i,re,se),s[0]=0,s[3]=1,s[4]=2,s[6]=1):a?(ne(t,i,ae,oe),ne(t,e,re,se),s[0]=1,s[3]=2,s[4]=0,s[6]=2):r&&(ne(i,e,ae,oe),ne(i,t,re,se),s[0]=2,s[3]=0,s[4]=1,s[6]=0)):2===o&&(s[2]=4,s[4]=4,s[5]=3,s[7]=5,s[8]=6,n?a?r||(ne(i,e,ae,oe),ne(i,t,re,se),s[0]=0,s[1]=1,s[3]=0,s[6]=2):(ne(t,i,ae,oe),ne(t,e,re,se),s[0]=2,s[1]=0,s[3]=2,s[6]=1):(ne(e,t,ae,oe),ne(e,i,re,se),s[0]=1,s[1]=2,s[3]=1,s[6]=0));var l=le.positions;return l[0]=e,l[1]=t,l[2]=i,l.length=3,1!==o&&2!==o||(l[3]=ae,l[4]=re,l[5]=oe,l[6]=se,l.length=7),le}}function de(e,t){var i=e.attributes;if(0!==i.position.values.length){for(var n in i)if(i.hasOwnProperty(n)&&Object(f.default)(i[n])&&Object(f.default)(i[n].values)){var a=i[n];a.values=d.default.createTypedArray(a.componentDatatype,a.values)}var o=_.default.computeNumberOfVertices(e);return e.indices=y.a.createTypedArray(o,e.indices),t&&(e.boundingSphere=r.default.fromVertices(i.position.values)),e}}function ce(e){var t=e.attributes,i={};for(var n in t)if(t.hasOwnProperty(n)&&Object(f.default)(t[n])&&Object(f.default)(t[n].values)){var a=t[n];i[n]=new g.default({componentDatatype:a.componentDatatype,componentsPerAttribute:a.componentsPerAttribute,normalize:a.normalize,values:[]})}return new _.default({attributes:i,indices:[],primitiveType:e.primitiveType})}function fe(e,t,i){var n=Object(f.default)(e.geometry.boundingSphere);t=de(t,n),i=de(i,n),Object(f.default)(i)&&!Object(f.default)(t)?e.geometry=i:!Object(f.default)(i)&&Object(f.default)(t)?e.geometry=t:(e.westHemisphereGeometry=t,e.eastHemisphereGeometry=i,e.geometry=void 0)}function he(e,t){var i=new e,n=new e,a=new e;return function(r,o,s,l,u,d,c,f){var h=e.fromArray(u,r*t,i),p=e.fromArray(u,o*t,n),m=e.fromArray(u,s*t,a);e.multiplyByScalar(h,l.x,h),e.multiplyByScalar(p,l.y,p),e.multiplyByScalar(m,l.z,m);var _=e.add(h,p,h);e.add(_,m,_),f&&e.normalize(_,_),e.pack(_,d,c*t)}}var pe=he(l.a,4),me=he(s.default,3),_e=he(o.default,2),ge=new s.default,ve=new s.default,ye=new s.default,be=new s.default;function we(e,t,i,n,r,o,l,u,d,c,h,p,m,_,g,v){if(Object(f.default)(o)||Object(f.default)(l)||Object(f.default)(u)||Object(f.default)(d)||Object(f.default)(c)||0!==_){var y=s.default.fromArray(r,3*e,ge),b=s.default.fromArray(r,3*t,ve),w=s.default.fromArray(r,3*i,ye),x=Object(a.a)(n,y,b,w,be);if(Object(f.default)(x)){if(Object(f.default)(o)&&me(e,t,i,x,o,p.normal.values,v,!0),Object(f.default)(c)){var A,T=s.default.fromArray(c,3*e,ge),E=s.default.fromArray(c,3*t,ve),C=s.default.fromArray(c,3*i,ye);s.default.multiplyByScalar(T,x.x,T),s.default.multiplyByScalar(E,x.y,E),s.default.multiplyByScalar(C,x.z,C),s.default.equals(T,s.default.ZERO)&&s.default.equals(E,s.default.ZERO)&&s.default.equals(C,s.default.ZERO)?((A=ge).x=0,A.y=0,A.z=0):(A=s.default.add(T,E,T),s.default.add(A,C,A),s.default.normalize(A,A)),s.default.pack(A,p.extrudeDirection.values,3*v)}if(Object(f.default)(h)&&function(e,t,i,n,a,r,o){var s=a[e]*n.x,l=a[t]*n.y,u=a[i]*n.z;r[o]=s+l+u>O.default.EPSILON6?1:0}(e,t,i,x,h,p.applyOffset.values,v),Object(f.default)(l)&&me(e,t,i,x,l,p.tangent.values,v,!0),Object(f.default)(u)&&me(e,t,i,x,u,p.bitangent.values,v,!0),Object(f.default)(d)&&_e(e,t,i,x,d,p.st.values,v),_>0)for(var S=0;S<_;S++){var M=m[S];Oe(e,t,i,x,v,g[M],p[M])}}}}function Oe(e,t,i,n,a,r,o){var s=r.componentsPerAttribute,l=r.values,u=o.values;switch(s){case 4:pe(e,t,i,n,l,u,a,!1);break;case 3:me(e,t,i,n,l,u,a,!1);break;case 2:_e(e,t,i,n,l,u,a,!1);break;default:u[a]=l[e]*n.x+l[t]*n.y+l[i]*n.z}}function xe(e,t,i,n,a,r){var o=e.position.values.length/3;if(-1!==a){var s=n[a],l=i[s];return-1===l?(i[s]=o,e.position.values.push(r.x,r.y,r.z),t.push(o),o):(t.push(l),l)}return e.position.values.push(r.x,r.y,r.z),t.push(o),o}var Ae={position:!0,normal:!0,bitangent:!0,tangent:!0,st:!0,extrudeDirection:!0,applyOffset:!0};function Te(e){var t=e.geometry,i=t.attributes,n=i.position.values,a=Object(f.default)(i.normal)?i.normal.values:void 0,r=Object(f.default)(i.bitangent)?i.bitangent.values:void 0,o=Object(f.default)(i.tangent)?i.tangent.values:void 0,l=Object(f.default)(i.st)?i.st.values:void 0,u=Object(f.default)(i.extrudeDirection)?i.extrudeDirection.values:void 0,d=Object(f.default)(i.applyOffset)?i.applyOffset.values:void 0,c=t.indices,h=[];for(var p in i)i.hasOwnProperty(p)&&!Ae[p]&&Object(f.default)(i[p])&&h.push(p);var m,_,g,v,y=h.length,b=ce(t),w=ce(t),O=[];O.length=n.length/3;var x=[];for(x.length=n.length/3,v=0;v3)for(var I=P.positions,L=P.indices,j=L.length,R=0;R0)){var u=s.default.unpack(n,o,je);(l.y<0&&u.y>0||l.y>0&&u.y<0)&&(o-3>0?(n[o]=i[o-3],n[o+1]=i[o-2],n[o+2]=i[o-1]):s.default.pack(l,n,o));var d=s.default.unpack(a,o,Re);(l.y<0&&d.y>0||l.y>0&&d.y<0)&&(o+30||r.default.intersectPlane(i,T.default.ORIGIN_ZX_PLANE)!==b.a.INTERSECTING))return e;if(t.geometryType!==v.a.NONE)switch(t.geometryType){case v.a.POLYLINES:!function(e){var t,i,n,a=e.geometry,r=a.attributes,u=r.position.values,d=r.prevPosition.values,c=r.nextPosition.values,h=r.expandAndWidth.values,p=Object(f.default)(r.st)?r.st.values:void 0,m=Object(f.default)(r.color)?r.color.values:void 0,_=ce(a),g=ce(a),v=!1,y=u.length/3;for(t=0;t=0?(i=65536*Math.floor(e/65536),t.high=i,t.low=e-i):(i=65536*Math.floor(-e/65536),t.high=-i,t.low=e+i),t};var s={high:0,low:0};o.fromCartesian=function(e,t){a.a.typeOf.object("cartesian",e),Object(r.default)(t)||(t=new o);var i=t.high,n=t.low;return o.encode(e.x,s),i.x=s.high,n.x=s.low,o.encode(e.y,s),i.y=s.high,n.y=s.low,o.encode(e.z,s),i.z=s.high,n.z=s.low,t};var l=new o;o.writeElements=function(e,t,i){a.a.defined("cartesianArray",t),a.a.typeOf.number("index",i),a.a.typeOf.number.greaterThanOrEquals("index",i,0),o.fromCartesian(e,l);var n=l.high,r=l.low;t[i]=n.x,t[i+1]=n.y,t[i+2]=n.z,t[i+3]=r.x,t[i+4]=r.y,t[i+5]=r.z},t.a=o},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(3),s=i(71),l=i(70),u=i(195),d=i(42),c=i(309),f=i(109),h=i(110),p=i(452),m=new f.default(0);function _(e){h.a.call(this,e),this._zIndex=0,this._terrainOffsetProperty=void 0}Object(r.default)(Object.create)&&(_.prototype=Object.create(h.a.prototype),_.prototype.constructor=_),Object.defineProperties(_.prototype,{zIndex:{get:function(){return this._zIndex}},terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),_.prototype._isOnTerrain=function(e,t){return this._fillEnabled&&!Object(r.default)(t.height)&&!Object(r.default)(t.extrudedHeight)&&u.default.isSupported(this._scene)},_.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight;return 0===t||Object(r.default)(i)&&i!==t},_.prototype._computeCenter=o.default.throwInstantiationError,_.prototype._onEntityPropertyChanged=function(e,t,i,n){if(h.a.prototype._onEntityPropertyChanged.call(this,e,t,i,n),-1!==this._observedPropertyNames.indexOf(t)){var o=this._entity[this._geometryPropertyName];if(Object(r.default)(o)){Object(r.default)(o.zIndex)&&(Object(r.default)(o.height)||Object(r.default)(o.extrudedHeight))&&Object(l.a)(l.a.geometryZIndex),this._zIndex=Object(a.default)(o.zIndex,m),Object(r.default)(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var s=o.heightReference,u=o.extrudedHeightReference;if(Object(r.default)(s)||Object(r.default)(u)){var d=new c.a(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new p.a(this._scene,d,s,u)}}}},_.prototype.destroy=function(){Object(r.default)(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0),h.a.prototype.destroy.call(this)},_.getGeometryHeight=function(e,t){if(n.a.defined("heightReference",t),Object(r.default)(e))return t!==d.a.CLAMP_TO_GROUND?e:0;t!==d.a.NONE&&Object(l.a)(l.a.geometryHeightReference)},_.getGeometryExtrudedHeight=function(e,t){if(n.a.defined("extrudedHeightReference",t),Object(r.default)(e))return t!==d.a.CLAMP_TO_GROUND?e:_.CLAMP_TO_GROUND;t!==d.a.NONE&&Object(l.a)(l.a.geometryExtrudedHeightReference)},_.CLAMP_TO_GROUND="clamp",_.computeGeometryOffsetAttribute=function(e,t,i,n){Object(r.default)(e)&&Object(r.default)(t)||(t=d.a.NONE),Object(r.default)(i)&&Object(r.default)(n)||(n=d.a.NONE);var a=0;return t!==d.a.NONE&&a++,n===d.a.RELATIVE_TO_GROUND&&a++,2===a?s.a.ALL:1===a?s.a.TOP:void 0},t.a=_},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(333);function o(e,t,i,a,r,o,s){this.provider=e,this.message=t,this.x=i,this.y=a,this.level=r,this.timesRetried=Object(n.default)(o,0),this.retry=!1,this.error=s}o.handleError=function(e,t,i,n,s,l,u,d,c){var f=e;return Object(a.default)(e)?(f.provider=t,f.message=n,f.x=s,f.y=l,f.level=u,f.retry=!1,f.error=c,++f.timesRetried):f=new o(t,n,s,l,u,0,c),i.numberOfListeners>0?i.raiseEvent(f):console.log('An error occurred in "'+t.constructor.name+'": '+Object(r.a)(n)),f.retry&&Object(a.default)(d)&&d(),f},o.handleSuccess=function(e){Object(a.default)(e)&&(e.timesRetried=-1)},t.a=o},function(e,t,i){"use strict";t.a=Object.freeze({UTC:0,TAI:1})},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(11),r=i(2),o=i(0),s=i(19),l=i(3),u=i(46),d=i(38),c=i(5),f=i(23),h=i(57),p=i(36),m=i(56);function _(e,t,i,n){var s=Object(o.default)(t.vertexBuffer),u=Object(o.default)(t.value),d=t.value?t.value.length:t.componentsPerAttribute;if(!s&&!u)throw new l.default("attribute must have a vertexBuffer or a value.");if(s&&u)throw new l.default("attribute cannot have both a vertexBuffer and a value. It must have either a vertexBuffer property defining per-vertex data or a value property defining data for all vertices.");if(1!==d&&2!==d&&3!==d&&4!==d){if(u)throw new l.default("attribute.value.length must be in the range [1, 4].");throw new l.default("attribute.componentsPerAttribute must be in the range [1, 4].")}if(Object(o.default)(t.componentDatatype)&&!a.default.validate(t.componentDatatype))throw new l.default("attribute must have a valid componentDatatype or not specify it.");if(Object(o.default)(t.strideInBytes)&&t.strideInBytes>255)throw new l.default("attribute must have a strideInBytes less than or equal to 255 or not specify it.");if(Object(o.default)(t.instanceDivisor)&&t.instanceDivisor>0&&!n.instancedArrays)throw new l.default("instanced arrays is not supported");if(Object(o.default)(t.instanceDivisor)&&t.instanceDivisor<0)throw new l.default("attribute must have an instanceDivisor greater than or equal to zero");if(Object(o.default)(t.instanceDivisor)&&u)throw new l.default("attribute cannot have have an instanceDivisor if it is not backed by a buffer");if(Object(o.default)(t.instanceDivisor)&&t.instanceDivisor>0&&0===t.index)throw new l.default("attribute zero cannot have an instanceDivisor greater than 0");var c={index:Object(r.default)(t.index,i),enabled:Object(r.default)(t.enabled,!0),vertexBuffer:t.vertexBuffer,value:u?t.value.slice(0):void 0,componentsPerAttribute:d,componentDatatype:Object(r.default)(t.componentDatatype,a.default.FLOAT),normalize:Object(r.default)(t.normalize,!1),offsetInBytes:Object(r.default)(t.offsetInBytes,0),strideInBytes:Object(r.default)(t.strideInBytes,0),instanceDivisor:Object(r.default)(t.instanceDivisor,0)};if(s)c.vertexAttrib=function(e){var t=this.index;e.bindBuffer(e.ARRAY_BUFFER,this.vertexBuffer._getBuffer()),e.vertexAttribPointer(t,this.componentsPerAttribute,this.componentDatatype,this.normalize,this.strideInBytes,this.offsetInBytes),e.enableVertexAttribArray(t),this.instanceDivisor>0&&(n.glVertexAttribDivisor(t,this.instanceDivisor),n._vertexAttribDivisors[t]=this.instanceDivisor,n._previousDrawInstanced=!0)},c.disableVertexAttribArray=function(e){e.disableVertexAttribArray(this.index),this.instanceDivisor>0&&n.glVertexAttribDivisor(i,0)};else{switch(c.componentsPerAttribute){case 1:c.vertexAttrib=function(e){e.vertexAttrib1fv(this.index,this.value)};break;case 2:c.vertexAttrib=function(e){e.vertexAttrib2fv(this.index,this.value)};break;case 3:c.vertexAttrib=function(e){e.vertexAttrib3fv(this.index,this.value)};break;case 4:c.vertexAttrib=function(e){e.vertexAttrib4fv(this.index,this.value)}}c.disableVertexAttribArray=function(e){}}e.push(c)}function g(e,t,i){for(var n=0;n0&&(h=!0),Object(o.default)(c[t].value)&&(p=!0);var b,w={};for(t=0;t0)for(r=y(e[s[0]]),t=1;t0){var h=a.default.getSizeInBytes(e[s[0]].componentDatatype),p=d%h;0!==p&&(d+=h-p);var m=new ArrayBuffer(r*d),_={};for(t=0;t=c.default.SIXTY_FOUR_KILOBYTES&&m.elementIndexUint?h.default.createIndexBuffer({context:m,typedArray:new Uint32Array(D),usage:g,indexDatatype:d.a.UNSIGNED_INT}):h.default.createIndexBuffer({context:m,typedArray:new Uint16Array(D),usage:g,indexDatatype:d.a.UNSIGNED_SHORT})),new v({context:m,attributes:A,indexBuffer:l})},Object.defineProperties(v.prototype,{numberOfAttributes:{get:function(){return this._attributes.length}},numberOfVertices:{get:function(){return this._numberOfVertices}},indexBuffer:{get:function(){return this._indexBuffer}}}),v.prototype.getAttribute=function(e){return n.a.defined("index",e),this._attributes[e]},v.prototype._bind=function(){Object(o.default)(this._vao)?(this._context.glBindVertexArray(this._vao),this._context.instancedArrays&&function(e){var t=e._context,i=e._hasInstancedAttributes;if(i||t._previousDrawInstanced){t._previousDrawInstanced=i;var n,a=t._vertexAttribDivisors,r=e._attributes,o=m.a.maximumVertexAttributes;if(i){var s=r.length;for(n=0;n0&&(t.glVertexAttribDivisor(n,0),a[n]=0)}}(this),this._hasConstantAttributes&&function(e,t){for(var i=e._attributes,n=i.length,a=0;au.default.EPSILON6)throw new l.default("vector must be normalized.");if(i.x=e.x/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),i.y=e.y/(Math.abs(e.x)+Math.abs(e.y)+Math.abs(e.z)),e.z<0){var r=i.x,s=i.y;i.x=(1-Math.abs(s))*u.default.signNotZero(r),i.y=(1-Math.abs(r))*u.default.signNotZero(s)}return i.x=u.default.toSNorm(i.x,t),i.y=u.default.toSNorm(i.y,t),i},octEncode:function(e,t){return c.octEncodeInRange(e,255,t)}},f=new n.default,h=new Uint8Array(1);function p(e){return h[0]=e,h[0]}c.octEncodeToCartesian4=function(e,t){return c.octEncodeInRange(e,65535,f),t.x=p(f.x*(1/256)),t.y=p(f.x),t.z=p(f.y*(1/256)),t.w=p(f.y),t},c.octDecodeInRange=function(e,t,i,n){if(o.a.defined("result",n),e<0||e>i||t<0||t>i)throw new l.default("x and y must be unsigned normalized integers between 0 and "+i);if(n.x=u.default.fromSNorm(e,i),n.y=u.default.fromSNorm(t,i),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){var r=n.x;n.x=(1-Math.abs(n.y))*u.default.signNotZero(r),n.y=(1-Math.abs(r))*u.default.signNotZero(n.y)}return a.default.normalize(n,n)},c.octDecode=function(e,t,i){return c.octDecodeInRange(e,t,255,i)},c.octDecodeFromCartesian4=function(e,t){o.a.typeOf.object("encoded",e),o.a.typeOf.object("result",t);var i=e.x,n=e.y,a=e.z,r=e.w;if(i<0||i>255||n<0||n>255||a<0||a>255||r<0||r>255)throw new l.default("x, y, z, and w must be unsigned normalized integers between 0 and 255");var s=256*i+n,u=256*a+r;return c.octDecodeInRange(s,u,65535,t)},c.octPackFloat=function(e){return o.a.defined("encoded",e),256*e.x+e.y};var m=new n.default;function _(e){return e>>1^-(1&e)}c.octEncodeFloat=function(e){return c.octEncode(e,m),c.octPackFloat(m)},c.octDecodeFloat=function(e,t){o.a.defined("value",e);var i=e/256,n=Math.floor(i),a=256*(i-n);return c.octDecode(n,a,t)},c.octPack=function(e,t,i,n){o.a.defined("v1",e),o.a.defined("v2",t),o.a.defined("v3",i),o.a.defined("result",n);var a=c.octEncodeFloat(e),r=c.octEncodeFloat(t),s=c.octEncode(i,m);return n.x=65536*s.x+a,n.y=65536*s.y+r,n},c.octUnpack=function(e,t,i,n){o.a.defined("packed",e),o.a.defined("v1",t),o.a.defined("v2",i),o.a.defined("v3",n);var a=e.x/65536,r=Math.floor(a),s=65536*(a-r);a=e.y/65536;var l=Math.floor(a),u=65536*(a-l);c.octDecodeFloat(s,t),c.octDecodeFloat(u,i),c.octDecode(r,l,n)},c.compressTextureCoordinates=function(e){return o.a.defined("textureCoordinates",e),4096*(4095*e.x|0)+(4095*e.y|0)},c.decompressTextureCoordinates=function(e,t){o.a.defined("compressed",e),o.a.defined("result",t);var i=e/4096,n=Math.floor(i);return t.x=n/4095,t.y=(e-4096*n)/4095,t},c.zigZagDeltaDecode=function(e,t,i){o.a.defined("uBuffer",e),o.a.defined("vBuffer",t),o.a.typeOf.number.equals("uBuffer.length","vBuffer.length",e.length,t.length),Object(s.default)(i)&&o.a.typeOf.number.equals("uBuffer.length","heightBuffer.length",e.length,i.length);for(var n=e.length,a=0,r=0,l=0,u=0;u=n.RENDERED_AND_KICKED},originalResult:function(e){return 3&e},kick:function(e){return 4|e}};t.a=n},function(e,t,i){"use strict";i.r(t);var n=i(7),a=i(2);function r(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),this.color=e.color,this.depth=e.depth,this.stencil=e.stencil,this.renderState=e.renderState,this.framebuffer=e.framebuffer,this.owner=e.owner,this.pass=e.pass}r.ALL=Object.freeze(new r({color:new n.default(0,0,0,0),depth:1,stencil:0})),r.prototype.execute=function(e,t){e.clear(this,t)},t.default=r},function(e,t,i){"use strict";i.r(t);var n=i(0),a=i(24);function r(e){this._value=void 0,this._hasClone=!1,this._hasEquals=!1,this._definitionChanged=new a.default,this.setValue(e)}Object.defineProperties(r.prototype,{isConstant:{value:!0},definitionChanged:{get:function(){return this._definitionChanged}}}),r.prototype.getValue=function(e,t){return this._hasClone?this._value.clone(t):this._value},r.prototype.setValue=function(e){var t=this._value;if(t!==e){var i=Object(n.default)(e),a=i&&"function"==typeof e.clone,r=i&&"function"==typeof e.equals;(!r||!e.equals(t))&&(this._hasClone=a,this._hasEquals=r,this._value=a?e.clone(this._value):e,this._definitionChanged.raiseEvent(this))}},r.prototype.equals=function(e){return this===e||e instanceof r&&(!this._hasEquals&&this._value===e._value||this._hasEquals&&this._value.equals(e._value))},r.prototype.valueOf=function(){return this._value},r.prototype.toString=function(){return String(this._value)},t.default=r},function(e,t,i){"use strict";var n=i(4),a=i(7),r=i(2),o=i(0),s=i(19),l=i(3),u=i(49),d=i(24),c=i(40),f=i(70),h=i(97),p=i(86),m=i(63),_=i(109),g=i(170),v=i(9),y=new m.a(a.default.WHITE),b=new _.default(!0),w=new _.default(!0),O=new _.default(!1),x=new _.default(a.default.BLACK),A=new _.default(p.a.DISABLED),T=new _.default(new u.default),E=new _.default(h.default.BOTH);function C(e){n.a.defined("options.entity",e.entity),n.a.defined("options.scene",e.scene),n.a.defined("options.geometryOptions",e.geometryOptions),n.a.defined("options.geometryPropertyName",e.geometryPropertyName),n.a.defined("options.observedPropertyNames",e.observedPropertyNames);var t=e.entity,i=e.geometryPropertyName;this._entity=t,this._scene=e.scene,this._fillEnabled=!1,this._isClosed=!1,this._onTerrain=!1,this._dynamic=!1,this._outlineEnabled=!1,this._geometryChanged=new d.default,this._showProperty=void 0,this._materialProperty=void 0,this._showOutlineProperty=void 0,this._outlineColorProperty=void 0,this._outlineWidth=1,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._options=e.geometryOptions,this._geometryPropertyName=i,this._id=i+"-"+t.id,this._observedPropertyNames=e.observedPropertyNames,this._supportsMaterialsforEntitiesOnTerrain=g.a.supportsMaterialsforEntitiesOnTerrain(e.scene)}Object.defineProperties(C.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!Object(o.default)(this._entity.availability)&&v.default.isConstant(this._showProperty)&&v.default.isConstant(this._fillProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},outlineEnabled:{get:function(){return this._outlineEnabled}},hasConstantOutline:{get:function(){return!this._outlineEnabled||!Object(o.default)(this._entity.availability)&&v.default.isConstant(this._showProperty)&&v.default.isConstant(this._showOutlineProperty)}},outlineColorProperty:{get:function(){return this._outlineColorProperty}},outlineWidth:{get:function(){return this._outlineWidth}},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{get:function(){return this._isClosed}},onTerrain:{get:function(){return this._onTerrain}},geometryChanged:{get:function(){return this._geometryChanged}}}),C.prototype.isOutlineVisible=function(e){var t=this._entity,i=this._outlineEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e);return Object(r.default)(i,!1)},C.prototype.isFilled=function(e){var t=this._entity,i=this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e);return Object(r.default)(i,!1)},C.prototype.createFillGeometryInstance=l.default.throwInstantiationError,C.prototype.createOutlineGeometryInstance=l.default.throwInstantiationError,C.prototype.isDestroyed=function(){return!1},C.prototype.destroy=function(){Object(s.default)(this)},C.prototype._isHidden=function(e,t){var i=t.show;return Object(o.default)(i)&&i.isConstant&&!i.getValue(c.a.MINIMUM_VALUE)},C.prototype._isOnTerrain=function(e,t){return!1},C.prototype._getIsClosed=function(e){return!0},C.prototype._isDynamic=l.default.throwInstantiationError,C.prototype._setStaticOptions=l.default.throwInstantiationError,C.prototype._onEntityPropertyChanged=function(e,t,i,n){if(-1!==this._observedPropertyNames.indexOf(t)){var a=this._entity[this._geometryPropertyName];if(Object(o.default)(a)){var s=a.fill,l=!Object(o.default)(s)||!s.isConstant||s.getValue(c.a.MINIMUM_VALUE),u=a.outline,d=Object(o.default)(u);if(d&&u.isConstant&&(d=u.getValue(c.a.MINIMUM_VALUE)),l||d){var h=a.show;if(this._isHidden(e,a))(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this));else{this._materialProperty=Object(r.default)(a.material,y),this._fillProperty=Object(r.default)(s,w),this._showProperty=Object(r.default)(h,b),this._showOutlineProperty=Object(r.default)(a.outline,O),this._outlineColorProperty=d?Object(r.default)(a.outlineColor,x):void 0,this._shadowsProperty=Object(r.default)(a.shadows,A),this._distanceDisplayConditionProperty=Object(r.default)(a.distanceDisplayCondition,T),this._classificationTypeProperty=Object(r.default)(a.classificationType,E),this._fillEnabled=l;var p=this._isOnTerrain(e,a)&&(this._supportsMaterialsforEntitiesOnTerrain||this._materialProperty instanceof m.a);if(d&&p&&(Object(f.a)(f.a.geometryOutlines),d=!1),this._onTerrain=p,this._outlineEnabled=d,this._isDynamic(e,a))this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this));else{this._setStaticOptions(e,a),this._isClosed=this._getIsClosed(this._options);var _=a.outlineWidth;this._outlineWidth=Object(o.default)(_)?_.getValue(c.a.MINIMUM_VALUE):1,this._dynamic=!1,this._geometryChanged.raiseEvent(this)}}}else(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this))}else(this._fillEnabled||this._outlineEnabled)&&(this._fillEnabled=!1,this._outlineEnabled=!1,this._geometryChanged.raiseEvent(this))}},C.prototype.createDynamicUpdater=function(e,t){if(n.a.defined("primitives",e),n.a.defined("groundPrimitives",t),!this._dynamic)throw new l.default("This instance does not represent dynamic geometry.");return new this.constructor.DynamicGeometryUpdater(this,e,t)},t.a=C},function(e,t,i){"use strict";var n=i(689),a=i(8),r=i(1),o=i(22),s=i(4),l=i(11),u=i(2),d=i(0),c=i(15),f=i(229),h=i(46),p=i(28),m=i(5),_=i(35),g=i(187),v=new r.default,y=new r.default,b={computeArea2D:function(e){s.a.defined("positions",e),s.a.typeOf.number.greaterThanOrEquals("positions.length",e.length,3);for(var t=e.length,i=0,n=t-1,a=0;a0?g.a.COUNTER_CLOCKWISE:g.a.CLOCKWISE},triangulate:function(e,t){s.a.defined("positions",e);var i=a.default.packArray(e);return Object(n.a)(i,t,2)}},w=new r.default,O=new r.default,x=new r.default,A=new r.default,T=new r.default,E=new r.default,C=new r.default;b.computeSubdivision=function(e,t,i,n){n=Object(u.default)(n,m.default.RADIANS_PER_DEGREE),s.a.typeOf.object("ellipsoid",e),s.a.defined("positions",t),s.a.defined("indices",i),s.a.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),s.a.typeOf.number.equals("indices.length % 3","0",i.length%3,0),s.a.typeOf.number.greaterThan("granularity",n,0);var a,o=i.slice(0),c=t.length,f=new Array(3*c),g=0;for(a=0;a0;){var P,I,L=o.pop(),j=o.pop(),R=o.pop(),N=r.default.fromArray(f,3*R,w),B=r.default.fromArray(f,3*j,O),F=r.default.fromArray(f,3*L,x),k=r.default.multiplyByScalar(r.default.normalize(N,A),S,A),z=r.default.multiplyByScalar(r.default.normalize(B,T),S,T),U=r.default.multiplyByScalar(r.default.normalize(F,E),S,E),V=r.default.magnitudeSquared(r.default.subtract(k,z,C)),H=r.default.magnitudeSquared(r.default.subtract(z,U,C)),G=r.default.magnitudeSquared(r.default.subtract(U,k,C)),Y=Math.max(V,H,G);Y>D?V===Y?(a=b[P=Math.min(R,j)+" "+Math.max(R,j)],Object(d.default)(a)||(I=r.default.add(N,B,C),r.default.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),a=f.length/3-1,b[P]=a),o.push(R,a,L),o.push(a,j,L)):H===Y?(a=b[P=Math.min(j,L)+" "+Math.max(j,L)],Object(d.default)(a)||(I=r.default.add(B,F,C),r.default.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),a=f.length/3-1,b[P]=a),o.push(j,a,R),o.push(a,L,R)):G===Y&&(a=b[P=Math.min(L,R)+" "+Math.max(L,R)],Object(d.default)(a)||(I=r.default.add(F,N,C),r.default.multiplyByScalar(I,.5,I),f.push(I.x,I.y,I.z),a=f.length/3-1,b[P]=a),o.push(L,a,j),o.push(a,R,j)):(y.push(R),y.push(j),y.push(L))}return new h.default({attributes:{position:new p.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:f})},indices:y,primitiveType:_.default.TRIANGLES})};var S=new o.default,M=new o.default,D=new o.default,P=new o.default;b.computeRhumbLineSubdivision=function(e,t,i,n){n=Object(u.default)(n,m.default.RADIANS_PER_DEGREE),s.a.typeOf.object("ellipsoid",e),s.a.defined("positions",t),s.a.defined("indices",i),s.a.typeOf.number.greaterThanOrEquals("indices.length",i.length,3),s.a.typeOf.number.equals("indices.length % 3","0",i.length%3,0),s.a.typeOf.number.greaterThan("granularity",n,0);var a,o=i.slice(0),c=t.length,g=new Array(3*c),v=0;for(a=0;a0;){var R=o.pop(),N=o.pop(),B=o.pop(),F=r.default.fromArray(g,3*B,w),k=r.default.fromArray(g,3*N,O),z=r.default.fromArray(g,3*R,x),U=e.cartesianToCartographic(F,S),V=e.cartesianToCartographic(k,M),H=e.cartesianToCartographic(z,D);I.setEndPoints(U,V);var G=I.surfaceDistance;L.setEndPoints(V,H);var Y=L.surfaceDistance;j.setEndPoints(H,U);var W,q,X,K,J=j.surfaceDistance,Z=Math.max(G,Y,J);Z>E?G===Z?(a=A[W=Math.min(B,N)+" "+Math.max(B,N)],Object(d.default)(a)||(q=I.interpolateUsingFraction(.5,P),X=.5*(U.height+V.height),K=r.default.fromRadians(q.longitude,q.latitude,X,e,C),g.push(K.x,K.y,K.z),a=g.length/3-1,A[W]=a),o.push(B,a,R),o.push(a,N,R)):Y===Z?(a=A[W=Math.min(N,R)+" "+Math.max(N,R)],Object(d.default)(a)||(q=L.interpolateUsingFraction(.5,P),X=.5*(V.height+H.height),K=r.default.fromRadians(q.longitude,q.latitude,X,e,C),g.push(K.x,K.y,K.z),a=g.length/3-1,A[W]=a),o.push(N,a,B),o.push(a,R,B)):J===Z&&(a=A[W=Math.min(R,B)+" "+Math.max(R,B)],Object(d.default)(a)||(q=j.interpolateUsingFraction(.5,P),X=.5*(H.height+U.height),K=r.default.fromRadians(q.longitude,q.latitude,X,e,C),g.push(K.x,K.y,K.z),a=g.length/3-1,A[W]=a),o.push(R,a,N),o.push(a,B,N)):(b.push(B),b.push(N),b.push(R))}return new h.default({attributes:{position:new p.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:g})},indices:b,primitiveType:_.default.TRIANGLES})},b.scaleToGeodeticHeight=function(e,t,i,n){i=Object(u.default)(i,c.default.WGS84);var a=v,o=y;if(t=Object(u.default)(t,0),n=Object(u.default)(n,!0),Object(d.default)(e))for(var s=e.length,l=0;l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,m=String.fromCharCode;function _(e){throw new RangeError(h[e])}function g(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function v(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+g((e=e.replace(f,".")).split("."),t).join(".")}function y(e){for(var t,i,n=[],a=0,r=e.length;a=55296&&t<=56319&&a65535&&(t+=m((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=m(e)})).join("")}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function O(e,t,i){var n=0;for(e=i?p(e/700):e>>1,e+=p(e/t);e>455;n+=36)e=p(e/35);return p(n+36*e/(e+38))}function x(e){var t,i,n,a,r,o,s,l,d,c,f,h=[],m=e.length,g=0,v=128,y=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n=128&&_("not-basic"),h.push(e.charCodeAt(n));for(a=i>0?i+1:0;a=m&&_("invalid-input"),((l=(f=e.charCodeAt(a++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||l>p((u-g)/o))&&_("overflow"),g+=l*o,!(l<(d=s<=y?1:s>=y+26?26:s-y));s+=36)o>p(u/(c=36-d))&&_("overflow"),o*=c;y=O(g-r,t=h.length+1,0==r),p(g/t)>u-v&&_("overflow"),v+=p(g/t),g%=t,h.splice(g++,0,v)}return b(h)}function A(e){var t,i,n,a,r,o,s,l,d,c,f,h,g,v,b,x=[];for(h=(e=y(e)).length,t=128,i=0,r=72,o=0;o=t&&fp((u-i)/(g=n+1))&&_("overflow"),i+=(s-t)*g,t=s,o=0;ou&&_("overflow"),f==t){for(l=i,d=36;!(l<(c=d<=r?1:d>=r+26?26:d-r));d+=36)b=l-c,v=36-c,x.push(m(w(c+b%v,0))),l=p(b/v);x.push(m(w(l,0))),r=O(i,g,n==a),i=0,++n}++i,++t}return x.join("")}if(s={version:"1.3.2",ucs2:{decode:y,encode:b},decode:x,encode:A,toASCII:function(e){return v(e,(function(e){return c.test(e)?"xn--"+A(e):e}))},toUnicode:function(e){return v(e,(function(e){return d.test(e)?x(e.slice(4).toLowerCase()):e}))}},a&&r)if(e.exports==a)r.exports=s;else for(l in s)s.hasOwnProperty(l)&&(a[l]=s[l]);else i.punycode=s}(n.a)})),r=Object(n.b)((function(e){ /*! * URI.js - Mutating URLs * IPv6 Support * * Version: 1.19.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(t,i){e.exports?e.exports=i():t.IPv6=i(t)}(n.a,(function(e){var t=e&&e.IPv6;return{best:function(e){var t,i,n=e.toLowerCase().split(":"),a=n.length,r=8;for(""===n[0]&&""===n[1]&&""===n[2]?(n.shift(),n.shift()):""===n[0]&&""===n[1]?n.shift():""===n[a-1]&&""===n[a-2]&&n.pop(),-1!==n[(a=n.length)-1].indexOf(".")&&(r=7),t=0;t1);s++)i.splice(0,1);n[o]=i.join("")}var l=-1,u=0,d=0,c=-1,f=!1;for(o=0;ou&&(l=c,u=d)):"0"===n[o]&&(f=!0,c=o,d=1);d>u&&(l=c,u=d),u>1&&n.splice(l,u,""),a=n.length;var h="";for(""===n[0]&&(h=":"),o=0;o=e.length-1)return!1;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return!1;var a=i.list[e.slice(t+1)];return!!a&&a.indexOf(" "+e.slice(n+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var n=i.list[e.slice(t+1)];return!!n&&n.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var n=e.lastIndexOf(".",t-1);if(n<=0||n>=t-1)return null;var a=i.list[e.slice(t+1)];return a?a.indexOf(" "+e.slice(n+1,t)+" ")<0?null:e.slice(n+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return i}))})),s=Object(n.b)((function(e){ /*! * URI.js - Mutating URLs * * Version: 1.19.7 * * Author: Rodney Rehm * Web: http://medialize.github.io/URI.js/ * * Licensed under * MIT License http://www.opensource.org/licenses/mit-license * */ !function(t,i){e.exports?e.exports=i(a,r,o):t.URI=i(t.punycode,t.IPv6,t.SecondLevelDomains,t)}(n.a,(function(e,t,i,n){var a=n&&n.URI;function r(e,t){var i=arguments.length>=1,n=arguments.length>=2;if(!(this instanceof r))return i?n?new r(e,t):new r(e):new r;if(void 0===e){if(i)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&i)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}r.version="1.19.7";var o=r.prototype,s=Object.prototype.hasOwnProperty;function l(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function u(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function d(e){return"Array"===u(e)}function c(e,t){var i,n,a={};if("RegExp"===u(t))a=null;else if(d(t))for(i=0,n=t.length;i]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return r.domAttributes[t]}},r.encode=_,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=_,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(e,t){var i=r.encode(e+"");return void 0===t&&(t=r.escapeQuerySpace),t?i.replace(/%20/g,"+"):i},r.decodeQuery=function(e,t){e+="",void 0===t&&(t=r.escapeQuerySpace);try{return r.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var g,v={encode:"encode",decode:"decode"},y=function(e,t){return function(i){try{return r[t](i+"").replace(r.characters[e][t].expression,(function(i){return r.characters[e][t].map[i]}))}catch(e){return i}}};for(g in v)r[g+"PathSegment"]=y("pathname",v[g]),r[g+"UrnPathSegment"]=y("urnpath",v[g]);var b=function(e,t,i){return function(n){var a;a=i?function(e){return r[t](r[i](e))}:r[t];for(var o=(n+"").split(e),s=0,l=o.length;s-1&&(t.fragment=e.substring(i+1)||null,e=e.substring(0,i)),(i=e.indexOf("?"))>-1&&(t.query=e.substring(i+1)||null,e=e.substring(0,i)),"//"===(e=e.replace(/^(https?|ftp|wss?)?:[/\\]*/,"$1://")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=r.parseAuthority(e,t)):(i=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,i)||null,t.protocol&&!t.protocol.match(r.protocol_expression)?t.protocol=void 0:"//"===e.substring(i+1,i+3).replace(/\\/g,"/")?(e=e.substring(i+3),e=r.parseAuthority(e,t)):(e=e.substring(i+1),t.urn=!0)),t.path=e,t},r.parseHost=function(e,t){e||(e="");var i,n,a=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===a&&(a=e.length),"["===e.charAt(0))i=e.indexOf("]"),t.hostname=e.substring(1,i)||null,t.port=e.substring(i+2,a)||null,"/"===t.port&&(t.port=null);else{var o=e.indexOf(":"),s=e.indexOf("/"),l=e.indexOf(":",o+1);-1!==l&&(-1===s||l-1?a:e.length-1);return o>-1&&(-1===a||o-1?h.slice(0,p)+h.slice(p).replace(o,""):h.replace(o,"")).length<=u[0].length||i.ignore&&i.ignore.test(h))){var g=t(h,d,f=d+h.length,e);void 0!==g?(g=String(g),e=e.slice(0,d)+g+e.slice(f),n.lastIndex=d+g.length):n.lastIndex=f}}return n.lastIndex=0,e},r.ensureValidHostname=function(t,i){var n=!!t,a=!1;if(!!i&&(a=f(r.hostProtocols,i)),a&&!n)throw new TypeError("Hostname cannot be empty, if protocol is "+i);if(t&&t.match(r.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},r.noConflict=function(e){if(e){var t={URI:this.noConflict()};return n.URITemplate&&"function"==typeof n.URITemplate.noConflict&&(t.URITemplate=n.URITemplate.noConflict()),n.IPv6&&"function"==typeof n.IPv6.noConflict&&(t.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&"function"==typeof n.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=n.SecondLevelDomains.noConflict()),t}return n.URI===this&&(n.URI=a),this},o.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},o.clone=function(){return new r(this)},o.valueOf=o.toString=function(){return this.build(!1)._string},o.protocol=w("protocol"),o.username=w("username"),o.password=w("password"),o.hostname=w("hostname"),o.port=w("port"),o.query=O("query","?"),o.fragment=O("fragment","#"),o.search=function(e,t){var i=this.query(e,t);return"string"==typeof i&&i.length?"?"+i:i},o.hash=function(e,t){var i=this.fragment(e,t);return"string"==typeof i&&i.length?"#"+i:i},o.pathname=function(e,t){if(void 0===e||!0===e){var i=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?r.decodeUrnPath:r.decodePath)(i):i}return this._parts.urn?this._parts.path=e?r.recodeUrnPath(e):"":this._parts.path=e?r.recodePath(e):"/",this.build(!t),this},o.path=o.pathname,o.href=function(e,t){var i;if(void 0===e)return this.toString();this._string="",this._parts=r._parts();var n=e instanceof r,a="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[r.getDomAttribute(e)]||"",a=!1);if(!n&&a&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=r.parse(String(e),this._parts);else{if(!n&&!a)throw new TypeError("invalid input");var o=n?e._parts:e;for(i in o)"query"!==i&&s.call(this._parts,i)&&(this._parts[i]=o[i]);o.query&&this.query(o.query,!1)}return this.build(!t),this},o.is=function(e){var t=!1,n=!1,a=!1,o=!1,s=!1,l=!1,u=!1,d=!this._parts.urn;switch(this._parts.hostname&&(d=!1,n=r.ip4_expression.test(this._parts.hostname),a=r.ip6_expression.test(this._parts.hostname),s=(o=!(t=n||a))&&i&&i.has(this._parts.hostname),l=o&&r.idn_expression.test(this._parts.hostname),u=o&&r.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return d;case"absolute":return!d;case"domain":case"name":return o;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return n;case"ip6":case"ipv6":case"inet6":return a;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return u}return null};var x=o.protocol,A=o.port,T=o.hostname;o.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(r.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},o.scheme=o.protocol,o.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),r.ensureValidPort(e))),A.call(this,e,t))},o.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var i={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==r.parseHost(e,i))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=i.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(e,this._parts.protocol)}return T.call(this,e,t)},o.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var i=this.protocol();return this.authority()?(i?i+"://":"")+this.authority():""}var n=r(e);return this.protocol(n.protocol()).authority(n.authority()).build(!t),this},o.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?r.buildHost(this._parts):"";if("/"!==r.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},o.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?r.buildAuthority(this._parts):"";if("/"!==r.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},o.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var i=r.buildUserinfo(this._parts);return i?i.substring(0,i.length-1):i}return"@"!==e[e.length-1]&&(e+="@"),r.parseUserinfo(e,this._parts),this.build(!t),this},o.resource=function(e,t){var i;return void 0===e?this.path()+this.search()+this.hash():(i=r.parse(e),this._parts.path=i.path,this._parts.query=i.query,this._parts.fragment=i.fragment,this.build(!t),this)},o.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,i)||""}var n=this._parts.hostname.length-this.domain().length,a=this._parts.hostname.substring(0,n),o=new RegExp("^"+l(a));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&r.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(o,e),this.build(!t),this},o.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.match(/\./g);if(i&&i.length<2)return this._parts.hostname;var n=this._parts.hostname.length-this.tld(t).length-1;return n=this._parts.hostname.lastIndexOf(".",n-1)+1,this._parts.hostname.substring(n)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var a=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(a,e)}return this.build(!t),this},o.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.lastIndexOf("."),a=this._parts.hostname.substring(n+1);return!0!==t&&i&&i.list[a.toLowerCase()]&&i.get(this._parts.hostname)||a}var r;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!i||!i.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');r=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(r,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");r=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(r,e)}return this.build(!t),this},o.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var i=this._parts.path.length-this.filename().length-1,n=this._parts.path.substring(0,i)||(this._parts.hostname?"/":"");return e?r.decodePath(n):n}var a=this._parts.path.length-this.filename().length,o=this._parts.path.substring(0,a),s=new RegExp("^"+l(o));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=r.recodePath(e),this._parts.path=this._parts.path.replace(s,e),this.build(!t),this},o.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var i=this._parts.path.lastIndexOf("/"),n=this._parts.path.substring(i+1);return e?r.decodePathSegment(n):n}var a=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(a=!0);var o=new RegExp(l(this.filename())+"$");return e=r.recodePath(e),this._parts.path=this._parts.path.replace(o,e),a?this.normalizePath(t):this.build(!t),this},o.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var i,n,a=this.filename(),o=a.lastIndexOf(".");return-1===o?"":(i=a.substring(o+1),n=/^[a-z0-9%]+$/i.test(i)?i:"",e?r.decodePathSegment(n):n)}"."===e.charAt(0)&&(e=e.substring(1));var s,u=this.suffix();if(u)s=e?new RegExp(l(u)+"$"):new RegExp(l("."+u)+"$");else{if(!e)return this;this._parts.path+="."+r.recodePath(e)}return s&&(e=r.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},o.segment=function(e,t,i){var n=this._parts.urn?":":"/",a=this.path(),r="/"===a.substring(0,1),o=a.split(n);if(void 0!==e&&"number"!=typeof e&&(i=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(r&&o.shift(),e<0&&(e=Math.max(o.length+e,0)),void 0===t)return void 0===e?o:o[e];if(null===e||void 0===o[e])if(d(t)){o=[];for(var s=0,l=t.length;so?o:t-1}}T.initialize=function(){var e=T._initPromise;return Object(d.default)(e)||(e=m.default.fetchJson(Object(a.a)("Assets/approximateTerrainHeights.json")).then((function(e){T._terrainHeights=e})),T._initPromise=e),e},T.getMinimumMaximumHeights=function(e,t){if(l.a.defined("rectangle",e),!Object(d.default)(T._terrainHeights))throw new c.default("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=Object(u.default)(t,f.default.WGS84);var i=E(e),n=T._defaultMinTerrainHeight,a=T._defaultMaxTerrainHeight;if(Object(d.default)(i)){var r=i.level+"-"+i.x+"-"+i.y,s=T._terrainHeights[r];Object(d.default)(s)&&(n=s[0],a=s[1]),t.cartographicToCartesian(p.default.northeast(e,v),_),t.cartographicToCartesian(p.default.southwest(e,v),g),o.default.midpoint(g,_,y);var h=t.scaleToGeodeticSurface(y,b);if(Object(d.default)(h)){var m=o.default.distance(y,h);n=Math.min(n,-m)}else n=T._defaultMinTerrainHeight}return{minimumTerrainHeight:n=Math.max(T._defaultMinTerrainHeight,n),maximumTerrainHeight:a}},T.getBoundingSphere=function(e,t){if(l.a.defined("rectangle",e),!Object(d.default)(T._terrainHeights))throw new c.default("You must call ApproximateTerrainHeights.initialize and wait for the promise to resolve before using this function");t=Object(u.default)(t,f.default.WGS84);var i=E(e),a=T._defaultMaxTerrainHeight;if(Object(d.default)(i)){var r=i.level+"-"+i.x+"-"+i.y,o=T._terrainHeights[r];Object(d.default)(o)&&(a=o[1])}var s=n.default.fromRectangle3D(e,t,0);return n.default.fromRectangle3D(e,t,a,w),n.default.union(s,w,s)},T._terrainHeightsMaxLevel=6,T._defaultMaxTerrainHeight=9e3,T._defaultMinTerrainHeight=-1e5,T._terrainHeights=void 0,T._initPromise=void 0,Object.defineProperties(T,{initialized:{get:function(){return Object(d.default)(T._terrainHeights)}}}),t.a=T},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(29),o=i(712),s=i(713),l=i(714),u=i(715),d=i(716),c=i(717),f=i(142),h=i(69);function p(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT);var t=Object(n.default)(e.translucent,!0),i=Object(n.default)(e.closed,!1),r=Object(n.default)(e.materialSupport,p.MaterialSupport.TEXTURED);this.material=Object(a.default)(e.material)?e.material:h.default.fromType(h.default.ColorType),this.translucent=t,this._vertexShaderSource=Object(n.default)(e.vertexShaderSource,r.vertexShaderSource),this._fragmentShaderSource=Object(n.default)(e.fragmentShaderSource,r.fragmentShaderSource),this._renderState=f.a.getDefaultRenderState(t,i,e.renderState),this._closed=i,this._materialSupport=r,this._vertexFormat=r.vertexFormat,this._flat=Object(n.default)(e.flat,!1),this._faceForward=Object(n.default)(e.faceForward,!i)}Object.defineProperties(p.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},materialSupport:{get:function(){return this._materialSupport}},vertexFormat:{get:function(){return this._vertexFormat}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}}}),p.prototype.getFragmentShaderSource=f.a.prototype.getFragmentShaderSource,p.prototype.isTranslucent=f.a.prototype.isTranslucent,p.prototype.getRenderState=f.a.prototype.getRenderState,p.MaterialSupport={BASIC:Object.freeze({vertexFormat:r.a.POSITION_AND_NORMAL,vertexShaderSource:u.a,fragmentShaderSource:l.a}),TEXTURED:Object.freeze({vertexFormat:r.a.POSITION_NORMAL_AND_ST,vertexShaderSource:c.a,fragmentShaderSource:d.a}),ALL:Object.freeze({vertexFormat:r.a.ALL,vertexShaderSource:s.a,fragmentShaderSource:o.a})},t.default=p},function(e,t,i){"use strict";i.r(t);var n=i(10),a={NEAREST:n.a.NEAREST,LINEAR:n.a.LINEAR,validate:function(e){return e===a.NEAREST||e===a.LINEAR}};t.default=Object.freeze(a)},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0),o=i(3),s=i(5),l=i(241);function u(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),this._offCenterFrustum=new l.a,this.fov=e.fov,this._fov=void 0,this._fovy=void 0,this._sseDenominator=void 0,this.aspectRatio=e.aspectRatio,this._aspectRatio=void 0,this.near=Object(a.default)(e.near,1),this._near=this.near,this.far=Object(a.default)(e.far,5e8),this._far=this.far,this.xOffset=Object(a.default)(e.xOffset,0),this._xOffset=this.xOffset,this.yOffset=Object(a.default)(e.yOffset,0),this._yOffset=this.yOffset}function d(e){if(!(Object(r.default)(e.fov)&&Object(r.default)(e.aspectRatio)&&Object(r.default)(e.near)&&Object(r.default)(e.far)))throw new o.default("fov, aspectRatio, near, or far parameters are not set.");var t=e._offCenterFrustum;if(e.fov!==e._fov||e.aspectRatio!==e._aspectRatio||e.near!==e._near||e.far!==e._far||e.xOffset!==e._xOffset||e.yOffset!==e._yOffset){if(e.fov<0||e.fov>=Math.PI)throw new o.default("fov must be in the range [0, PI).");if(e.aspectRatio<0)throw new o.default("aspectRatio must be positive.");if(e.near<0||e.near>e.far)throw new o.default("near must be greater than zero and less than far.");e._aspectRatio=e.aspectRatio,e._fov=e.fov,e._fovy=e.aspectRatio<=1?e.fov:2*Math.atan(Math.tan(.5*e.fov)/e.aspectRatio),e._near=e.near,e._far=e.far,e._sseDenominator=2*Math.tan(.5*e._fovy),e._xOffset=e.xOffset,e._yOffset=e.yOffset,t.top=e.near*Math.tan(.5*e._fovy),t.bottom=-t.top,t.right=e.aspectRatio*t.top,t.left=-t.right,t.near=e.near,t.far=e.far,t.right+=e.xOffset,t.left+=e.xOffset,t.top+=e.yOffset,t.bottom+=e.yOffset}}u.packedLength=6,u.pack=function(e,t,i){return n.a.typeOf.object("value",e),n.a.defined("array",t),i=Object(a.default)(i,0),t[i++]=e.fov,t[i++]=e.aspectRatio,t[i++]=e.near,t[i++]=e.far,t[i++]=e.xOffset,t[i]=e.yOffset,t},u.unpack=function(e,t,i){return n.a.defined("array",e),t=Object(a.default)(t,0),Object(r.default)(i)||(i=new u),i.fov=e[t++],i.aspectRatio=e[t++],i.near=e[t++],i.far=e[t++],i.xOffset=e[t++],i.yOffset=e[t],i},Object.defineProperties(u.prototype,{projectionMatrix:{get:function(){return d(this),this._offCenterFrustum.projectionMatrix}},infiniteProjectionMatrix:{get:function(){return d(this),this._offCenterFrustum.infiniteProjectionMatrix}},fovy:{get:function(){return d(this),this._fovy}},sseDenominator:{get:function(){return d(this),this._sseDenominator}}}),u.prototype.computeCullingVolume=function(e,t,i){return d(this),this._offCenterFrustum.computeCullingVolume(e,t,i)},u.prototype.getPixelDimensions=function(e,t,i,n,a){return d(this),this._offCenterFrustum.getPixelDimensions(e,t,i,n,a)},u.prototype.clone=function(e){return Object(r.default)(e)||(e=new u),e.aspectRatio=this.aspectRatio,e.fov=this.fov,e.near=this.near,e.far=this.far,e._aspectRatio=void 0,e._fov=void 0,e._near=void 0,e._far=void 0,this._offCenterFrustum.clone(e._offCenterFrustum),e},u.prototype.equals=function(e){return!!(Object(r.default)(e)&&e instanceof u)&&(d(this),d(e),this.fov===e.fov&&this.aspectRatio===e.aspectRatio&&this._offCenterFrustum.equals(e._offCenterFrustum))},u.prototype.equalsEpsilon=function(e,t,i){return!!(Object(r.default)(e)&&e instanceof u)&&(d(this),d(e),s.default.equalsEpsilon(this.fov,e.fov,t,i)&&s.default.equalsEpsilon(this.aspectRatio,e.aspectRatio,t,i)&&this._offCenterFrustum.equalsEpsilon(e._offCenterFrustum,t,i))},t.default=u},function(e,t,i){"use strict";t.a=Object.freeze({UNISSUED:0,ISSUED:1,ACTIVE:2,RECEIVED:3,CANCELLED:4,FAILED:5})},function(e,t,i){"use strict";var n=i(54),a=i(149),r=i(8),o=i(1),s=i(22),l=i(11),u=i(2),d=i(0),c=i(15),f=i(229),h=i(46),p=i(28),m=i(82),_=i(95),g=i(38),v=i(5),y=i(12),b=i(111),w=i(35),O=i(27),x=i(246),A=i(187),T={computeHierarchyPackedLength:function(e){for(var t=0,i=[e];i.length>0;){var n=i.pop();if(Object(d.default)(n)){t+=2;var a=n.positions,r=n.holes;if(Object(d.default)(a)&&(t+=a.length*o.default.packedLength),Object(d.default)(r))for(var s=r.length,l=0;l0;){var a=n.pop();if(Object(d.default)(a)){var r=a.positions,s=a.holes;if(t[i++]=Object(d.default)(r)?r.length:0,t[i++]=Object(d.default)(s)?s.length:0,Object(d.default)(r))for(var l=r.length,u=0;u0?new Array(n):void 0,s=0;sm.default.TWO_PI)throw new d.default("Rectangle width must be between 0 and 2*pi");if(e.height<0||e.height>m.default.PI)throw new d.default("Rectangle height must be between 0 and pi");if(Object(u.default)(n)&&!m.default.equalsEpsilon(n.radii.x,n.radii.y,m.default.EPSILON15))throw new d.default("Ellipsoid must be an ellipsoid of revolution (radii.x == radii.y)");var s,h,p,_,y,b,w;if(t=Object(l.default)(t,0),i=Object(l.default)(i,0),n=Object(l.default)(n,c.default.WGS84),e.width<=m.default.PI){var O=v.default.center(e,P),x=n.cartographicToCartesian(O,I),A=new f.a(x,n);w=A.plane;var T=O.longitude,E=e.south<0&&e.north>0?0:O.latitude,C=o.default.fromRadians(T,e.north,i,L),S=o.default.fromRadians(e.west,e.north,i,j),M=o.default.fromRadians(e.west,E,i,R),ne=o.default.fromRadians(e.west,e.south,i,N),ae=o.default.fromRadians(T,e.south,i,B),re=n.cartographicToCartesian(C,F),oe=n.cartographicToCartesian(S,k),se=n.cartographicToCartesian(M,z),le=n.cartographicToCartesian(ne,U),ue=n.cartographicToCartesian(ae,V),de=A.projectPointToNearestOnPlane(re,H),ce=A.projectPointToNearestOnPlane(oe,G),fe=A.projectPointToNearestOnPlane(se,Y),he=A.projectPointToNearestOnPlane(le,W),pe=A.projectPointToNearestOnPlane(ue,q);return h=-(s=Math.min(ce.x,fe.x,he.x)),_=Math.max(ce.y,de.y),p=Math.min(he.y,pe.y),S.height=ne.height=t,oe=n.cartographicToCartesian(S,k),le=n.cartographicToCartesian(ne,U),y=Math.min(g.default.getPointDistance(w,oe),g.default.getPointDistance(w,le)),b=i,D(A.origin,A.xAxis,A.yAxis,A.zAxis,s,h,p,_,y,b,a)}var me=e.south>0,_e=e.north<0,ge=me?e.south:_e?e.north:0,ve=v.default.center(e,P).longitude,ye=r.default.fromRadians(ve,ge,i,n,X);ye.z=0;var be=Math.abs(ye.x)=c?h.a.INSIDE:h.a.INTERSECTING};var ne=new r.default,ae=new r.default,re=new r.default,oe=new r.default,se=new r.default,le=new r.default;y.distanceSquaredTo=function(e,t){if(!Object(u.default)(e))throw new d.default("box is required.");if(!Object(u.default)(t))throw new d.default("cartesian is required.");var i=r.default.subtract(t,e.center,S),n=e.halfAxes,a=_.default.getColumn(n,0,ne),o=_.default.getColumn(n,1,ae),s=_.default.getColumn(n,2,re),l=r.default.magnitude(a),c=r.default.magnitude(o),f=r.default.magnitude(s),h=!0,p=!0,g=!0;l>0?r.default.divideByScalar(a,l,a):h=!1,c>0?r.default.divideByScalar(o,c,o):p=!1,f>0?r.default.divideByScalar(s,f,s):g=!1;var v,y,b,w=!h+!p+!g;if(1===w){var O=a;v=o,y=s,p?g||(O=s,y=a):(O=o,v=a),b=r.default.cross(v,y,se),O===a?a=b:O===o?o=b:O===s&&(s=b)}else if(2===w){v=a,p?v=o:g&&(v=s);var x=r.default.UNIT_Y;x.equalsEpsilon(v,m.default.EPSILON3)&&(x=r.default.UNIT_X),y=r.default.cross(v,x,oe),r.default.normalize(y,y),b=r.default.cross(v,y,se),r.default.normalize(b,b),v===a?(o=y,s=b):v===o?(s=y,a=b):v===s&&(a=y,o=b)}else 3===w&&(a=r.default.UNIT_X,o=r.default.UNIT_Y,s=r.default.UNIT_Z);var A=le;A.x=r.default.dot(i,a),A.y=r.default.dot(i,o),A.z=r.default.dot(i,s);var T,E=0;return A.x<-l?E+=(T=A.x+l)*T:A.x>l&&(E+=(T=A.x-l)*T),A.y<-c?E+=(T=A.y+c)*T:A.y>c&&(E+=(T=A.y-c)*T),A.z<-f?E+=(T=A.z+f)*T:A.z>f&&(E+=(T=A.z-f)*T),E};var ue=new r.default,de=new r.default;y.computePlaneDistances=function(e,t,i,n){if(!Object(u.default)(e))throw new d.default("box is required.");if(!Object(u.default)(t))throw new d.default("position is required.");if(!Object(u.default)(i))throw new d.default("direction is required.");Object(u.default)(n)||(n=new p.default);var a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=e.center,l=e.halfAxes,c=_.default.getColumn(l,0,ne),f=_.default.getColumn(l,1,ae),h=_.default.getColumn(l,2,re),m=r.default.add(c,f,ue);r.default.add(m,h,m),r.default.add(m,s,m);var g=r.default.subtract(m,t,de),v=r.default.dot(i,g);return a=Math.min(v,a),o=Math.max(v,o),r.default.add(s,c,m),r.default.add(m,f,m),r.default.subtract(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.add(s,c,m),r.default.subtract(m,f,m),r.default.add(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.add(s,c,m),r.default.subtract(m,f,m),r.default.subtract(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.subtract(s,c,m),r.default.add(m,f,m),r.default.add(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.subtract(s,c,m),r.default.add(m,f,m),r.default.subtract(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.subtract(s,c,m),r.default.subtract(m,f,m),r.default.add(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),r.default.subtract(s,c,m),r.default.subtract(m,f,m),r.default.subtract(m,h,m),r.default.subtract(m,t,g),v=r.default.dot(i,g),a=Math.min(v,a),o=Math.max(v,o),n.start=a,n.stop=o,n};var ce=new n.default;y.isOccluded=function(e,t){if(!Object(u.default)(e))throw new d.default("box is required.");if(!Object(u.default)(t))throw new d.default("occluder is required.");var i=n.default.fromOrientedBoundingBox(e,ce);return!t.isBoundingSphereVisible(i)},y.prototype.intersectPlane=function(e){return y.intersectPlane(this,e)},y.prototype.distanceSquaredTo=function(e){return y.distanceSquaredTo(this,e)},y.prototype.computePlaneDistances=function(e,t,i){return y.computePlaneDistances(this,e,t,i)},y.prototype.isOccluded=function(e){return y.isOccluded(this,e)},y.equals=function(e,t){return e===t||Object(u.default)(e)&&Object(u.default)(t)&&r.default.equals(e.center,t.center)&&_.default.equals(e.halfAxes,t.halfAxes)},y.prototype.clone=function(e){return y.clone(this,e)},y.prototype.equals=function(e){return y.equals(this,e)},t.a=y},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(22),r=i(2),o=i(0),s=i(3),l=i(205),u=i(5),d=i(12),c=i(245),f=i(687),h=i(85),p={rayPlane:function(e,t,i){if(!Object(o.default)(e))throw new s.default("ray is required.");if(!Object(o.default)(t))throw new s.default("plane is required.");Object(o.default)(i)||(i=new n.default);var a=e.origin,r=e.direction,l=t.normal,d=n.default.dot(l,r);if(!(Math.abs(d)T)return;if(c=n.default.cross(d,O,y),(h=n.default.dot(w,c))<0||f+h>T)return;p=n.default.dot(x,c)/T}else{if(Math.abs(T)1)return;if(c=n.default.cross(d,O,y),(h=n.default.dot(w,c)*E)<0||f+h>1)return;p=n.default.dot(x,c)*E}return p},p.rayTriangle=function(e,t,i,a,r,s){var l=p.rayTriangleParametric(e,t,i,a,r);if(Object(o.default)(l)&&!(l<0))return Object(o.default)(s)||(s=new n.default),n.default.multiplyByScalar(e.direction,l,s),n.default.add(e.origin,s,s)};var b=new h.default;p.lineSegmentTriangle=function(e,t,i,a,r,l,u){if(!Object(o.default)(e))throw new s.default("v0 is required.");if(!Object(o.default)(t))throw new s.default("v1 is required.");if(!Object(o.default)(i))throw new s.default("p0 is required.");if(!Object(o.default)(a))throw new s.default("p1 is required.");if(!Object(o.default)(r))throw new s.default("p2 is required.");var d=b;n.default.clone(e,d.origin),n.default.subtract(t,e,d.direction),n.default.normalize(d.direction,d.direction);var c=p.rayTriangleParametric(d,i,a,r,l);if(!(!Object(o.default)(c)||c<0||c>n.default.distance(e,t)))return Object(o.default)(u)||(u=new n.default),n.default.multiplyByScalar(d.direction,c,u),n.default.add(d.origin,u,u)};var w={root0:0,root1:0};function O(e,t,i){Object(o.default)(i)||(i=new l.default);var a=e.origin,r=e.direction,s=t.center,u=t.radius*t.radius,d=n.default.subtract(a,s,g),c=function(e,t,i,n){var a=t*t-4*e*i;if(!(a<0)){if(a>0){var r=1/(2*e),o=Math.sqrt(a),s=(-t+o)*r,l=(-t-o)*r;return su))return a.start=Math.max(a.start,0),a.stop=Math.min(a.stop,u),a};var A=new n.default,T=new n.default;function E(e,t,i){var n=e+t;return u.default.sign(e)!==u.default.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))1){if(m>=0)return;var _=m*m;if(i=p-1,_<(r=(a=n.default.magnitudeSquared(h))*i))return;if(_>r){u=m*m-r;var g=(d=-m+Math.sqrt(u))/a,v=i/d;return g=0)return i}var l=Object(o.default)(this.rayEllipsoid(e,t)),h=t.transformPositionToScaledSpace(a,C),p=n.default.normalize(h,h),m=n.default.mostOrthogonalAxis(h,D),_=n.default.normalize(n.default.cross(m,p,S),S),g=n.default.normalize(n.default.cross(p,_,M),M),v=I;v[0]=p.x,v[1]=p.y,v[2]=p.z,v[3]=_.x,v[4]=_.y,v[5]=_.z,v[6]=g.x,v[7]=g.y,v[8]=g.z;var y=d.default.transpose(v,L),b=d.default.fromScale(t.radii,j),w=d.default.fromScale(t.oneOverRadii,R),O=N;O[0]=0,O[1]=-a.z,O[2]=a.y,O[3]=a.z,O[4]=0,O[5]=-a.x,O[6]=-a.y,O[7]=a.x,O[8]=0;var x,A,T=d.default.multiply(d.default.multiply(y,w,B),O,B),V=d.default.multiply(d.default.multiply(T,b,F),v,F),H=d.default.multiplyByVector(T,i,P),G=function(e,t,i,a,r){var o,s=a*a,l=r*r,h=(e[d.default.COLUMN1ROW1]-e[d.default.COLUMN2ROW2])*l,p=r*(a*E(e[d.default.COLUMN1ROW0],e[d.default.COLUMN0ROW1],u.default.EPSILON15)+t.y),m=e[d.default.COLUMN0ROW0]*s+e[d.default.COLUMN2ROW2]*l+a*t.x+i,_=l*E(e[d.default.COLUMN2ROW1],e[d.default.COLUMN1ROW2],u.default.EPSILON15),g=r*(a*E(e[d.default.COLUMN2ROW0],e[d.default.COLUMN0ROW2])+t.z),v=[];if(0===g&&0===_){if(0===(o=c.a.computeRealRoots(h,p,m)).length)return v;var y=o[0],b=Math.sqrt(Math.max(1-y*y,0));if(v.push(new n.default(a,r*y,r*-b)),v.push(new n.default(a,r*y,r*b)),2===o.length){var w=o[1],O=Math.sqrt(Math.max(1-w*w,0));v.push(new n.default(a,r*w,r*-O)),v.push(new n.default(a,r*w,r*O))}return v}var x=g*g,A=_*_,T=g*_,C=h*h+A,S=2*(p*h+T),M=2*m*h+p*p-A+x,D=2*(m*p-T),P=m*m-x;if(0===C&&0===S&&0===M&&0===D)return v;var I=(o=f.a.computeRealRoots(C,S,M,D,P)).length;if(0===I)return v;for(var L=0;L0?v.push(new n.default(a,r*j,r*-B)):0!==B?(v.push(new n.default(a,r*j,r*-B)),v.push(new n.default(a,r*j,r*B)),++L):v.push(new n.default(a,r*j,r*B))}return v}(V,n.default.negate(H,C),0,0,1),Y=G.length;if(Y>0){for(var W=n.default.clone(n.default.ZERO,z),q=Number.NEGATIVE_INFINITY,X=0;Xq&&(q=J,W=n.default.clone(x,W))}var Z=t.cartesianToCartographic(W,U);return q=u.default.clamp(q,0,1),A=n.default.magnitude(n.default.subtract(W,i,D))*Math.sqrt(1-q*q),A=l?-A:A,Z.height=A,t.cartographicToCartesian(Z,new n.default)}};var V=new n.default;p.lineSegmentPlane=function(e,t,i,a){if(!Object(o.default)(e))throw new s.default("endPoint0 is required.");if(!Object(o.default)(t))throw new s.default("endPoint1 is required.");if(!Object(o.default)(i))throw new s.default("plane is required.");Object(o.default)(a)||(a=new n.default);var r=n.default.subtract(t,e,V),l=i.normal,d=n.default.dot(l,r);if(!(Math.abs(d)1))return n.default.multiplyByScalar(r,f,a),n.default.add(e,a,a),a}},p.trianglePlaneIntersection=function(e,t,i,a){if(!(Object(o.default)(e)&&Object(o.default)(t)&&Object(o.default)(i)&&Object(o.default)(a)))throw new s.default("p0, p1, p2, and plane are required.");var r,l,u=a.normal,d=a.distance,c=n.default.dot(u,e)+d<0,f=n.default.dot(u,t)+d<0,h=n.default.dot(u,i)+d<0,m=0;if(m+=c?1:0,m+=f?1:0,1!==(m+=h?1:0)&&2!==m||(r=new n.default,l=new n.default),1===m){if(c)return p.lineSegmentPlane(e,t,a,r),p.lineSegmentPlane(e,i,a,l),{positions:[e,t,i,r,l],indices:[0,3,4,1,2,4,1,4,3]};if(f)return p.lineSegmentPlane(t,i,a,r),p.lineSegmentPlane(t,e,a,l),{positions:[e,t,i,r,l],indices:[1,3,4,2,0,4,2,4,3]};if(h)return p.lineSegmentPlane(i,e,a,r),p.lineSegmentPlane(i,t,a,l),{positions:[e,t,i,r,l],indices:[2,3,4,0,1,4,0,4,3]}}else if(2===m){if(!c)return p.lineSegmentPlane(t,e,a,r),p.lineSegmentPlane(i,e,a,l),{positions:[e,t,i,r,l],indices:[1,2,4,1,4,3,0,3,4]};if(!f)return p.lineSegmentPlane(i,t,a,r),p.lineSegmentPlane(e,t,a,l),{positions:[e,t,i,r,l],indices:[2,0,4,2,4,3,1,3,4]};if(!h)return p.lineSegmentPlane(e,i,a,r),p.lineSegmentPlane(t,i,a,l),{positions:[e,t,i,r,l],indices:[0,1,4,0,4,3,2,3,4]}}},t.default=p},function(e,t,i){"use strict";var n=i(1),a=i(22),r=i(2),o=i(0),s=i(3),l=i(15);function u(e){this._ellipsoid=Object(r.default)(e,l.default.WGS84),this._semimajorAxis=this._ellipsoid.maximumRadius,this._oneOverSemimajorAxis=1/this._semimajorAxis}Object.defineProperties(u.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),u.prototype.project=function(e,t){var i=this._semimajorAxis,a=e.longitude*i,r=e.latitude*i,s=e.height;return Object(o.default)(t)?(t.x=a,t.y=r,t.z=s,t):new n.default(a,r,s)},u.prototype.unproject=function(e,t){if(!Object(o.default)(e))throw new s.default("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=e.y*i,l=e.z;return Object(o.default)(t)?(t.longitude=n,t.latitude=r,t.height=l,t):new a.default(n,r,l)},t.a=u},function(e,t,i){"use strict";var n=i(115),a=i(18),r=i(77),o=i(2),s=i(0),l=i(19),u=i(3),d=i(24),c=i(59),f=i(424),h=i(30),p=i(23);function m(){if(!Object(s.default)(w._canTransferArrayBuffer)){var e=new Worker(y("Workers/transferTypedArrayTest.js"));e.postMessage=Object(o.default)(e.webkitPostMessage,e.postMessage);var t=new Int8Array([99]);try{e.postMessage({array:t},[t.buffer])}catch(e){return w._canTransferArrayBuffer=!1,w._canTransferArrayBuffer}var i=a.a.defer();e.onmessage=function(t){var n=t.data.array,a=Object(s.default)(n)&&99===n[0];i.resolve(a),e.terminate(),w._canTransferArrayBuffer=a},w._canTransferArrayBuffer=i.promise}return w._canTransferArrayBuffer}var _,g=new d.default;function v(e,t){--e._activeTasks;var i=t.id;if(Object(s.default)(i)){var n=e._deferreds,a=n[i];if(Object(s.default)(t.error)){var r=t.error;"RuntimeError"===r.name?(r=new p.a(t.error.message)).stack=t.error.stack:"DeveloperError"===r.name&&((r=new u.default(t.error.message)).stack=t.error.stack),g.raiseEvent(r),a.reject(r)}else g.raiseEvent(),a.resolve(t.result);delete n[i]}}function y(e){var t=Object(r.a)(e);if(Object(f.a)(t)){var i,n='importScripts("'+t+'");';try{i=new Blob([n],{type:"application/javascript"})}catch(e){var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder);a.append(n),i=a.getBlob("application/javascript")}t=(window.URL||window.webkitURL).createObjectURL(i)}return t}function b(e){var t=new Worker((Object(s.default)(_)||(_=y("Workers/cesiumWorkerBootstrapper.js")),_));t.postMessage=Object(o.default)(t.webkitPostMessage,t.postMessage);var i={loaderConfig:{paths:{Workers:Object(r.a)("Workers")},baseUrl:r.a.getCesiumBaseUrl().url},workerModule:e._workerPath};return t.postMessage(i),t.onmessage=function(t){v(e,t.data)},t}function w(e,t){var i=new n.a(e);this._workerPath=0!==i.scheme().length&&0===i.fragment().length?e:w._workerModulePrefix+e,this._maximumActiveTasks=Object(o.default)(t,Number.POSITIVE_INFINITY),this._activeTasks=0,this._deferreds={},this._nextID=0}var O=[];w.prototype.scheduleTask=function(e,t){if(Object(s.default)(this._worker)||(this._worker=b(this)),!(this._activeTasks>=this._maximumActiveTasks)){++this._activeTasks;var i=this;return Object(a.a)(m(),(function(n){Object(s.default)(t)?n||(t.length=0):t=O;var r=i._nextID++,o=a.a.defer();return i._deferreds[r]=o,i._worker.postMessage({id:r,parameters:e,canTransferArrayBuffer:n},t),o.promise}))}},w.prototype.initWebAssemblyModule=function(e){Object(s.default)(this._worker)||(this._worker=b(this));var t=a.a.defer(),i=this,n=this._worker;return function(e,t){var i={modulePath:void 0,wasmBinaryFile:void 0,wasmBinary:void 0};if(!c.a.supportsWebAssembly()){if(!Object(s.default)(t.fallbackModulePath))throw new p.a("This browser does not support Web Assembly, and no backup module was provided for "+e._workerPath);return i.modulePath=Object(r.a)(t.fallbackModulePath),a.a.resolve(i)}return i.modulePath=Object(r.a)(t.modulePath),i.wasmBinaryFile=Object(r.a)(t.wasmBinaryFile),h.default.fetchArrayBuffer({url:i.wasmBinaryFile}).then((function(e){return i.wasmBinary=e,i}))}(this,e).then((function(e){return Object(a.a)(m(),(function(a){var r,o=e.wasmBinary;Object(s.default)(o)&&a&&(r=[o]),n.onmessage=function(e){n.onmessage=function(e){v(i,e.data)},t.resolve(e.data)},n.postMessage({webAssemblyConfig:e},r)}))})),t},w.prototype.isDestroyed=function(){return!1},w.prototype.destroy=function(){return Object(s.default)(this._worker)&&this._worker.terminate(),Object(l.default)(this)},w.taskCompletedEvent=g,w._defaultWorkerModulePrefix="Workers/",w._workerModulePrefix=w._defaultWorkerModulePrefix,w._canTransferArrayBuffer=void 0,t.a=w},function(e,t,i){"use strict";var n;n="undefined"!=typeof performance&&"function"==typeof performance.now&&isFinite(performance.now())?function(){return performance.now()}:function(){return Date.now()},t.a=n},function(e,t,i){"use strict";var n=i(8),a=i(4),r=i(2),o=i(0);function s(e,t,i,n){this[0]=Object(r.default)(e,0),this[1]=Object(r.default)(i,0),this[2]=Object(r.default)(t,0),this[3]=Object(r.default)(n,0)}s.packedLength=4,s.pack=function(e,t,i){return a.a.typeOf.object("value",e),a.a.defined("array",t),i=Object(r.default)(i,0),t[i++]=e[0],t[i++]=e[1],t[i++]=e[2],t[i++]=e[3],t},s.unpack=function(e,t,i){return a.a.defined("array",e),t=Object(r.default)(t,0),Object(o.default)(i)||(i=new s),i[0]=e[t++],i[1]=e[t++],i[2]=e[t++],i[3]=e[t++],i},s.clone=function(e,t){if(Object(o.default)(e))return Object(o.default)(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):new s(e[0],e[2],e[1],e[3])},s.fromArray=function(e,t,i){return a.a.defined("array",e),t=Object(r.default)(t,0),Object(o.default)(i)||(i=new s),i[0]=e[t],i[1]=e[t+1],i[2]=e[t+2],i[3]=e[t+3],i},s.fromColumnMajorArray=function(e,t){return a.a.defined("values",e),s.clone(e,t)},s.fromRowMajorArray=function(e,t){return a.a.defined("values",e),Object(o.default)(t)?(t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3],t):new s(e[0],e[1],e[2],e[3])},s.fromScale=function(e,t){return a.a.typeOf.object("scale",e),Object(o.default)(t)?(t[0]=e.x,t[1]=0,t[2]=0,t[3]=e.y,t):new s(e.x,0,0,e.y)},s.fromUniformScale=function(e,t){return a.a.typeOf.number("scale",e),Object(o.default)(t)?(t[0]=e,t[1]=0,t[2]=0,t[3]=e,t):new s(e,0,0,e)},s.fromRotation=function(e,t){a.a.typeOf.number("angle",e);var i=Math.cos(e),n=Math.sin(e);return Object(o.default)(t)?(t[0]=i,t[1]=n,t[2]=-n,t[3]=i,t):new s(i,-n,n,i)},s.toArray=function(e,t){return a.a.typeOf.object("matrix",e),Object(o.default)(t)?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t):[e[0],e[1],e[2],e[3]]},s.getElementIndex=function(e,t){return a.a.typeOf.number.greaterThanOrEquals("row",t,0),a.a.typeOf.number.lessThanOrEquals("row",t,1),a.a.typeOf.number.greaterThanOrEquals("column",e,0),a.a.typeOf.number.lessThanOrEquals("column",e,1),2*e+t},s.getColumn=function(e,t,i){a.a.typeOf.object("matrix",e),a.a.typeOf.number.greaterThanOrEquals("index",t,0),a.a.typeOf.number.lessThanOrEquals("index",t,1),a.a.typeOf.object("result",i);var n=2*t,r=e[n],o=e[n+1];return i.x=r,i.y=o,i},s.setColumn=function(e,t,i,n){a.a.typeOf.object("matrix",e),a.a.typeOf.number.greaterThanOrEquals("index",t,0),a.a.typeOf.number.lessThanOrEquals("index",t,1),a.a.typeOf.object("cartesian",i),a.a.typeOf.object("result",n);var r=2*t;return(n=s.clone(e,n))[r]=i.x,n[r+1]=i.y,n},s.getRow=function(e,t,i){a.a.typeOf.object("matrix",e),a.a.typeOf.number.greaterThanOrEquals("index",t,0),a.a.typeOf.number.lessThanOrEquals("index",t,1),a.a.typeOf.object("result",i);var n=e[t],r=e[t+2];return i.x=n,i.y=r,i},s.setRow=function(e,t,i,n){return a.a.typeOf.object("matrix",e),a.a.typeOf.number.greaterThanOrEquals("index",t,0),a.a.typeOf.number.lessThanOrEquals("index",t,1),a.a.typeOf.object("cartesian",i),a.a.typeOf.object("result",n),(n=s.clone(e,n))[t]=i.x,n[t+2]=i.y,n};var l=new n.default;s.getScale=function(e,t){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t),t.x=n.default.magnitude(n.default.fromElements(e[0],e[1],l)),t.y=n.default.magnitude(n.default.fromElements(e[2],e[3],l)),t};var u=new n.default;s.getMaximumScale=function(e){return s.getScale(e,u),n.default.maximumComponent(u)},s.multiply=function(e,t,i){a.a.typeOf.object("left",e),a.a.typeOf.object("right",t),a.a.typeOf.object("result",i);var n=e[0]*t[0]+e[2]*t[1],r=e[0]*t[2]+e[2]*t[3],o=e[1]*t[0]+e[3]*t[1],s=e[1]*t[2]+e[3]*t[3];return i[0]=n,i[1]=o,i[2]=r,i[3]=s,i},s.add=function(e,t,i){return a.a.typeOf.object("left",e),a.a.typeOf.object("right",t),a.a.typeOf.object("result",i),i[0]=e[0]+t[0],i[1]=e[1]+t[1],i[2]=e[2]+t[2],i[3]=e[3]+t[3],i},s.subtract=function(e,t,i){return a.a.typeOf.object("left",e),a.a.typeOf.object("right",t),a.a.typeOf.object("result",i),i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],i[3]=e[3]-t[3],i},s.multiplyByVector=function(e,t,i){a.a.typeOf.object("matrix",e),a.a.typeOf.object("cartesian",t),a.a.typeOf.object("result",i);var n=e[0]*t.x+e[2]*t.y,r=e[1]*t.x+e[3]*t.y;return i.x=n,i.y=r,i},s.multiplyByScalar=function(e,t,i){return a.a.typeOf.object("matrix",e),a.a.typeOf.number("scalar",t),a.a.typeOf.object("result",i),i[0]=e[0]*t,i[1]=e[1]*t,i[2]=e[2]*t,i[3]=e[3]*t,i},s.multiplyByScale=function(e,t,i){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("scale",t),a.a.typeOf.object("result",i),i[0]=e[0]*t.x,i[1]=e[1]*t.x,i[2]=e[2]*t.y,i[3]=e[3]*t.y,i},s.negate=function(e,t){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},s.transpose=function(e,t){a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t);var i=e[0],n=e[2],r=e[1],o=e[3];return t[0]=i,t[1]=n,t[2]=r,t[3]=o,t},s.abs=function(e,t){return a.a.typeOf.object("matrix",e),a.a.typeOf.object("result",t),t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t[3]=Math.abs(e[3]),t},s.equals=function(e,t){return e===t||Object(o.default)(e)&&Object(o.default)(t)&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},s.equalsArray=function(e,t,i){return e[0]===t[i]&&e[1]===t[i+1]&&e[2]===t[i+2]&&e[3]===t[i+3]},s.equalsEpsilon=function(e,t,i){return i=Object(r.default)(i,0),e===t||Object(o.default)(e)&&Object(o.default)(t)&&Math.abs(e[0]-t[0])<=i&&Math.abs(e[1]-t[1])<=i&&Math.abs(e[2]-t[2])<=i&&Math.abs(e[3]-t[3])<=i},s.IDENTITY=Object.freeze(new s(1,0,0,1)),s.ZERO=Object.freeze(new s(0,0,0,0)),s.COLUMN0ROW0=0,s.COLUMN0ROW1=1,s.COLUMN1ROW0=2,s.COLUMN1ROW1=3,Object.defineProperties(s.prototype,{length:{get:function(){return s.packedLength}}}),s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.prototype.equalsEpsilon=function(e,t){return s.equalsEpsilon(this,e,t)},s.prototype.toString=function(){return"("+this[0]+", "+this[2]+")\n("+this[1]+", "+this[3]+")"},t.a=s},function(e,t,i){"use strict";t.a=Object.freeze({CENTER:0,LEFT:1,RIGHT:-1})},function(e,t,i){"use strict";var n=i(1),a=i(22),r=i(2),o=i(0),s=i(3),l=i(15),u=i(282),d=i(229),c=i(124),f=i(5),h=i(6),p=i(80),m={numberOfPoints:function(e,t,i){var a=n.default.distance(e,t);return Math.ceil(a/i)},numberOfPointsRhumbLine:function(e,t,i){var n=Math.pow(e.longitude-t.longitude,2)+Math.pow(e.latitude-t.latitude,2);return Math.max(1,Math.ceil(Math.sqrt(n/(i*i))))}},_=new a.default;m.extractHeights=function(e,t){for(var i=e.length,n=new Array(i),a=0;a0){t=Object(r.default)(t,h.default.IDENTITY);var s=h.default.inverseTransformation(t,g),l=h.default.multiplyByPoint(s,n.default.ZERO,v),u=n.default.normalize(h.default.multiplyByPointAsVector(s,n.default.UNIT_Y,y),y),d=p.default.fromPointNormal(l,u,b),f=n.default.normalize(h.default.multiplyByPointAsVector(s,n.default.UNIT_X,w),w),m=p.default.fromPointNormal(l,f,O),_=1;i.push(n.default.clone(e[0]));for(var T=i[0],E=e.length,C=1;C1?1:d),a)if(void 0!==n[r]){var w=n[r]||0,O=a[r];O instanceof Array?i[r]=p(O,b):("string"==typeof O&&(O="+"===O.charAt(0)||"-"===O.charAt(0)?w+parseFloat(O):parseFloat(O)),"number"==typeof O&&(i[r]=w+(O-w)*b))}if(null!==v&&v.call(i,b),1===d){if(l>0){for(r in isFinite(l)&&l--,o){if("string"==typeof a[r]&&(o[r]=o[r]+parseFloat(a[r])),u){var x=o[r];o[r]=a[r],a[r]=x}n[r]=o[r]}return f=void 0!==t?e+t:e+c,!0}null!==y&&y.call(i,i);for(var A=0,T=m.length;A1?o(e[i],e[i-1],i-n):o(e[a],e[a+1>i?i:a+1],n-a)},Bezier:function(e,t){for(var i=0,n=e.length-1,a=Math.pow,o=r.Interpolation.Utils.Bernstein,s=0;s<=n;s++)i+=a(1-t,n-s)*a(t,s)*e[s]*o(n,s);return i},CatmullRom:function(e,t){var i=e.length-1,n=i*t,a=Math.floor(n),o=r.Interpolation.Utils.CatmullRom;return e[0]===e[i]?(t<0&&(a=Math.floor(n=i*(1+t))),o(e[(a-1+i)%i],e[a],e[(a+1)%i],e[(a+2)%i],n-a)):t<0?e[0]-(o(e[0],e[0],e[1],e[1],-n)-e[0]):t>1?e[i]-(o(e[i],e[i],e[i-1],e[i-1],n-i)-e[i]):o(e[a?a-1:0],e[a],e[i1;i--)t*=i;return a[e]=t,t}),CatmullRom:function(e,t,i,n,a){var r=.5*(i-e),o=.5*(n-t),s=a*a;return(2*t-2*i+r+o)*(a*s)+(-3*t+3*i-2*r-o)*s+r*a+t}}},t.exports=r}))}).call(this,i(971))},function(e,t,i){"use strict";t.a=Object.freeze({LEFT_DRAG:0,RIGHT_DRAG:1,MIDDLE_DRAG:2,WHEEL:3,PINCH:4})},function(e,t,i){"use strict";var n=i(1),a=i(131),r=i(0),o=i(5),s=i(12),l=i(130),u=i(316),d=i(27),c={},f=new n.default,h=new n.default,p=new n.default,m=new n.default,_=[new n.default,new n.default],g=new n.default,v=new n.default,y=new n.default,b=new n.default,w=new n.default,O=new n.default,x=new n.default,A=new n.default,T=new n.default,E=new n.default,C=new d.default,S=new s.default;function M(e,t,i,r,l){var u,c=n.default.angleBetween(n.default.subtract(t,e,f),n.default.subtract(i,e,h)),p=r===a.a.BEVELED?1:Math.ceil(c/o.default.toRadians(5))+1,m=3*p,_=new Array(m);_[m-3]=i.x,_[m-2]=i.y,_[m-1]=i.z,u=l?s.default.fromQuaternion(d.default.fromAxisAngle(n.default.negate(e,f),c/p,C),S):s.default.fromQuaternion(d.default.fromAxisAngle(e,c/p,C),S);var g=0;t=n.default.clone(t,f);for(var v=0;vd.MaximumLatitude?e=d.MaximumLatitude:e<-d.MaximumLatitude&&(e=-d.MaximumLatitude);var t=Math.sin(e);return.5*Math.log((1+t)/(1-t))},d.MaximumLatitude=d.mercatorAngleToGeodeticLatitude(Math.PI),d.prototype.project=function(e,t){var i=this._semimajorAxis,a=e.longitude*i,r=d.geodeticLatitudeToMercatorAngle(e.latitude)*i,s=e.height;return Object(o.default)(t)?(t.x=a,t.y=r,t.z=s,t):new n.default(a,r,s)},d.prototype.unproject=function(e,t){if(!Object(o.default)(e))throw new s.default("cartesian is required");var i=this._oneOverSemimajorAxis,n=e.x*i,r=d.mercatorAngleToGeodeticLatitude(e.y*i),l=e.z;return Object(o.default)(t)?(t.longitude=n,t.latitude=r,t.height=l,t):new a.default(n,r,l)},t.a=d},function(e,t,i){"use strict";t.a=function(e,t){this.julianDate=e,this.offset=t}},function(e,t,i){"use strict";var n=i(8),a=i(4),r=i(2),o=i(0),s=i(15),l=i(125),u=i(5),d=i(21);function c(e){e=Object(r.default)(e,r.default.EMPTY_OBJECT),this._ellipsoid=Object(r.default)(e.ellipsoid,s.default.WGS84),this._rectangle=Object(r.default)(e.rectangle,d.default.MAX_VALUE),this._projection=new l.a(this._ellipsoid),this._numberOfLevelZeroTilesX=Object(r.default)(e.numberOfLevelZeroTilesX,2),this._numberOfLevelZeroTilesY=Object(r.default)(e.numberOfLevelZeroTilesY,1)}Object.defineProperties(c.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},rectangle:{get:function(){return this._rectangle}},projection:{get:function(){return this._projection}}}),c.prototype.getNumberOfXTilesAtLevel=function(e){return this._numberOfLevelZeroTilesX<=r&&(h=r-1);var p=(a.north-e.latitude)/c|0;return p>=s&&(p=s-1),Object(o.default)(i)?(i.x=h,i.y=p,i):new n.default(h,p)}},t.a=c},function(e,t,i){"use strict";var n=i(4),a=i(11),r=i(2),o=i(0);function s(e,t,i){e=Object(r.default)(e,0),t=Object(r.default)(t,0),i=Object(r.default)(i,0),this.value=new Float32Array([e,t,i])}Object.defineProperties(s.prototype,{componentDatatype:{get:function(){return a.default.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),s.fromCartesian3=function(e){return n.a.defined("offset",e),new s(e.x,e.y,e.z)},s.toValue=function(e,t){return n.a.defined("offset",e),Object(o.default)(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t},t.a=s},function(e,t,i){"use strict";var n=i(4),a=i(0),r=i(3);function o(){}Object.defineProperties(o.prototype,{class:{get:function(){r.default.throwInstantiationError()}}}),o.prototype.hasProperty=function(e){r.default.throwInstantiationError()},o.prototype.hasPropertyBySemantic=function(e){r.default.throwInstantiationError()},o.prototype.getPropertyIds=function(e){r.default.throwInstantiationError()},o.prototype.getProperty=function(e){r.default.throwInstantiationError()},o.prototype.setProperty=function(e,t){r.default.throwInstantiationError()},o.prototype.getPropertyBySemantic=function(e){r.default.throwInstantiationError()},o.prototype.setPropertyBySemantic=function(e,t){r.default.throwInstantiationError()},o.hasProperty=function(e,t,i){if(n.a.typeOf.string("propertyId",e),n.a.typeOf.object("properties",t),Object(a.default)(t[e]))return!0;if(Object(a.default)(i)){var r=i.properties[e];if(Object(a.default)(r)&&Object(a.default)(r.default))return!0}return!1},o.hasPropertyBySemantic=function(e,t,i){if(n.a.typeOf.string("semantic",e),n.a.typeOf.object("properties",t),!Object(a.default)(i))return!1;var r=i.propertiesBySemantic[e];return Object(a.default)(r)},o.getPropertyIds=function(e,t,i){for(var r in n.a.typeOf.object("properties",e),(i=Object(a.default)(i)?i:[]).length=0,e)e.hasOwnProperty(r)&&Object(a.default)(e[r])&&i.push(r);if(Object(a.default)(t)){var o=t.properties;for(var s in o)o.hasOwnProperty(s)&&!Object(a.default)(e[s])&&Object(a.default)(o[s].default)&&i.push(s)}return i},o.getProperty=function(e,t,i){n.a.typeOf.string("propertyId",e),n.a.typeOf.object("properties",t);var r,o=t[e];if(Object(a.default)(i)&&(r=i.properties[e]),!Object(a.default)(o)&&Object(a.default)(r)&&(o=r.default),Object(a.default)(o))return Array.isArray(o)&&(o=o.slice()),Object(a.default)(r)&&(o=r.normalize(o),o=r.unpackVectorAndMatrixTypes(o)),o},o.setProperty=function(e,t,i,r){if(n.a.typeOf.string("propertyId",e),n.a.defined("value",t),n.a.typeOf.object("properties",i),!Object(a.default)(i[e]))return!1;if(Array.isArray(t)&&(t=t.slice()),Object(a.default)(r)){var o=r.properties[e];Object(a.default)(o)&&(t=o.packVectorAndMatrixTypes(t),t=o.unnormalize(t))}return i[e]=t,!0},o.getPropertyBySemantic=function(e,t,i){if(n.a.typeOf.string("semantic",e),n.a.typeOf.object("properties",t),Object(a.default)(i)){var r=i.propertiesBySemantic[e];return Object(a.default)(r)?o.getProperty(r.id,t,i):void 0}},o.setPropertyBySemantic=function(e,t,i,r){n.a.typeOf.string("semantic",e),n.a.defined("value",t),n.a.typeOf.object("properties",i),n.a.typeOf.object("classDefinition",r);var s=r.propertiesBySemantic[e];return!!Object(a.default)(s)&&o.setProperty(s.id,t,i,r)},t.a=o},function(e,t,i){"use strict";i.r(t);var n=i(10),a={FRONT:n.a.FRONT,BACK:n.a.BACK,FRONT_AND_BACK:n.a.FRONT_AND_BACK};t.default=Object.freeze(a)},function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var n=i(17),a=i(1),r=i(0),o=i(6),s=i(27),l=i(23),u=i(90),d=i(150),c=i(178);function f(){}f.getFailedLoadFunction=function(e,t,i){return function(n){var a="Failed to load "+t+": "+i;Object(r.default)(n)&&(a+="\n"+n.message),e._readyPromise.reject(new l.a(a))}},f.getNodeTransform=function(e){return Object(r.default)(e.matrix)?e.matrix:o.default.fromTranslationQuaternionRotationScale(Object(r.default)(e.translation)?e.translation:a.default.ZERO,Object(r.default)(e.rotation)?e.rotation:s.default.IDENTITY,Object(r.default)(e.scale)?e.scale:a.default.ONE)},f.getAttributeBySemantic=function(e,t,i){for(var n=e.attributes,a=n.length,o=0;o-1)return i}return e.push(t),e.length-1}},function(e,t,i){"use strict";var n=i(17),a=i(8),r=i(1),o=i(16),s=i(22),l=i(2),u=i(0),d=i(3),c=i(182),f=i(15),h=i(282),p=i(24),m=i(127),_=i(267),g=i(198),v=i(78),y=i(124),b=i(5),w=i(12),O=i(6),x=i(79),A=i(166),T=i(119),E=i(27),C=i(85),S=i(21),M=i(52),D=i(770),P=i(243),I=i(13);function L(e){if(!Object(u.default)(e))throw new d.default("scene is required.");this._scene=e,this._transform=O.default.clone(O.default.IDENTITY),this._invTransform=O.default.clone(O.default.IDENTITY),this._actualTransform=O.default.clone(O.default.IDENTITY),this._actualInvTransform=O.default.clone(O.default.IDENTITY),this._transformChanged=!1,this.position=new r.default,this._position=new r.default,this._positionWC=new r.default,this._positionCartographic=new s.default,this._oldPositionWC=void 0,this.positionWCDeltaMagnitude=0,this.positionWCDeltaMagnitudeLastFrame=0,this.timeSinceMoved=0,this._lastMovedTimestamp=0,this.direction=new r.default,this._direction=new r.default,this._directionWC=new r.default,this.up=new r.default,this._up=new r.default,this._upWC=new r.default,this.right=new r.default,this._right=new r.default,this._rightWC=new r.default,this.frustum=new T.default,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=b.default.toRadians(60),this.defaultMoveAmount=1e5,this.defaultLookAmount=Math.PI/60,this.defaultRotateAmount=Math.PI/3600,this.defaultZoomAmount=1e5,this.constrainedAxis=void 0,this.maximumZoomFactor=1.5,this._moveStart=new p.default,this._moveEnd=new p.default,this._changed=new p.default,this._changedPosition=void 0,this._changedDirection=void 0,this._changedFrustum=void 0,this._changedHeading=void 0,this.percentageChanged=.5,this._viewMatrix=new O.default,this._invViewMatrix=new O.default,j(this),this._mode=I.default.SCENE3D,this._modeChanged=!0;var t=e.mapProjection;this._projection=t,this._maxCoord=t.project(new s.default(Math.PI,b.default.PI_OVER_TWO)),this._max2Dfrustum=void 0,Je(this,L.DEFAULT_VIEW_RECTANGLE,this.position,!0);var i=r.default.magnitude(this.position);i+=i*L.DEFAULT_VIEW_FACTOR,r.default.normalize(this.position,this.position),r.default.multiplyByScalar(this.position,i,this.position)}function j(e){O.default.computeView(e._position,e._direction,e._up,e._right,e._viewMatrix),O.default.multiply(e._viewMatrix,e._actualInvTransform,e._viewMatrix),O.default.inverseTransformation(e._viewMatrix,e._invViewMatrix)}L.TRANSFORM_2D=new O.default(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1),L.TRANSFORM_2D_INVERSE=O.default.inverseTransformation(L.TRANSFORM_2D,new O.default),L.DEFAULT_VIEW_RECTANGLE=S.default.fromDegrees(-95,-20,-70,90),L.DEFAULT_VIEW_FACTOR=.5,L.DEFAULT_OFFSET=new _.a(0,-b.default.PI_OVER_FOUR,0),L.prototype.canPreloadFlight=function(){return Object(u.default)(this._currentFlight)&&this._mode!==I.default.SCENE2D},L.prototype._updateCameraChanged=function(){if(function(e){if(Object(u.default)(e._oldPositionWC)){e.positionWCDeltaMagnitudeLastFrame=e.positionWCDeltaMagnitude;var t=r.default.subtract(e.positionWC,e._oldPositionWC,e._oldPositionWC);e.positionWCDeltaMagnitude=r.default.magnitude(t),e._oldPositionWC=r.default.clone(e.positionWC,e._oldPositionWC),e.positionWCDeltaMagnitude>0?(e.timeSinceMoved=0,e._lastMovedTimestamp=Object(m.a)()):e.timeSinceMoved=Math.max(Object(m.a)()-e._lastMovedTimestamp,0)/1e3}else e._oldPositionWC=r.default.clone(e.positionWC,e._oldPositionWC)}(this),0!==this._changed.numberOfListeners){var e=this.percentageChanged,t=this.heading;Object(u.default)(this._changedHeading)||(this._changedHeading=t);var i=Math.abs(this._changedHeading-t)%b.default.TWO_PI,n=(i=i>b.default.PI?b.default.TWO_PI-i:i)/Math.PI;if(n>e&&(this._changed.raiseEvent(n),this._changedHeading=t),this._mode!==I.default.SCENE2D){if(!Object(u.default)(this._changedDirection))return this._changedPosition=r.default.clone(this.positionWC,this._changedPosition),void(this._changedDirection=r.default.clone(this.directionWC,this._changedDirection));var a,o=b.default.acosClamped(r.default.dot(this.directionWC,this._changedDirection));a=Object(u.default)(this.frustum.fovy)?o/(.5*this.frustum.fovy):o;var s=r.default.distance(this.positionWC,this._changedPosition)/this.positionCartographic.height;(a>e||s>e)&&(this._changed.raiseEvent(Math.max(a,s)),this._changedPosition=r.default.clone(this.positionWC,this._changedPosition),this._changedDirection=r.default.clone(this.directionWC,this._changedDirection))}else{if(!Object(u.default)(this._changedFrustum))return this._changedPosition=r.default.clone(this.position,this._changedPosition),void(this._changedFrustum=this.frustum.clone());var l,d=this.position,c=this._changedPosition,f=this.frustum,h=this._changedFrustum,p=d.x+f.left,_=d.x+f.right,g=c.x+h.left,v=c.x+h.right,y=d.y+f.bottom,w=d.y+f.top,O=c.y+h.bottom,x=c.y+h.top,A=Math.max(p,g),T=Math.min(_,v),E=Math.max(y,O),C=Math.min(w,x);if(A>=T||E>=w)l=1;else{var S=h;pv&&yx&&(S=f),l=1-(T-A)*(C-E)/((S.right-S.left)*(S.top-S.bottom))}l>e&&(this._changed.raiseEvent(l),this._changedPosition=r.default.clone(this.position,this._changedPosition),this._changedFrustum=this.frustum.clone(this._changedFrustum))}}};var R=new s.default,N=new r.default,B=new r.default,F=new o.a,k=new o.a,z=new o.a,U=new o.a,V=new o.a;var H=new r.default;function G(e){var t=e._mode,i=!1,n=0;t===I.default.SCENE2D&&(i=(n=e.frustum.right-e.frustum.left)!==e._positionCartographic.height);var a=e._position,s=!r.default.equals(a,e.position)||i;s&&(a=r.default.clone(e.position,e._position));var l=e._direction,u=!r.default.equals(l,e.direction);u&&(r.default.normalize(e.direction,e.direction),l=r.default.clone(e.direction,e._direction));var d=e._up,c=!r.default.equals(d,e.up);c&&(r.default.normalize(e.up,e.up),d=r.default.clone(e.up,e._up));var f=e._right,h=!r.default.equals(f,e.right);h&&(r.default.normalize(e.right,e.right),f=r.default.clone(e.right,e._right));var p=e._transformChanged||e._modeChanged;e._transformChanged=!1,p&&(O.default.inverseTransformation(e._transform,e._invTransform),e._mode===I.default.COLUMBUS_VIEW||e._mode===I.default.SCENE2D?O.default.equals(O.default.IDENTITY,e._transform)?O.default.clone(L.TRANSFORM_2D,e._actualTransform):e._mode===I.default.COLUMBUS_VIEW?function(e){M.default.basisTo2D(e._projection,e._transform,e._actualTransform)}(e):function(e){var t=e._projection,i=t.ellipsoid,n=O.default.getColumn(e._transform,3,F),a=i.cartesianToCartographic(n,R),s=t.project(a,N),l=k;l.x=s.z,l.y=s.x,l.z=s.y,l.w=1;var u=o.a.clone(o.a.UNIT_X,V),d=o.a.add(O.default.getColumn(e._transform,0,B),n,B);i.cartesianToCartographic(d,a),t.project(a,s);var c=z;c.x=s.z,c.y=s.x,c.z=s.y,c.w=0,r.default.subtract(c,l,c),c.x=0;var f=U;if(r.default.magnitudeSquared(c)>b.default.EPSILON10)r.default.cross(u,c,f);else{var h=o.a.add(O.default.getColumn(e._transform,1,B),n,B);i.cartesianToCartographic(h,a),t.project(a,s),f.x=s.z,f.y=s.x,f.z=s.y,f.w=0,r.default.subtract(f,l,f),f.x=0,r.default.magnitudeSquared(f)b.default.EPSILON2){var v=1/r.default.magnitudeSquared(d),y=r.default.dot(d,l)*v,w=r.default.multiplyByScalar(l,y,H);d=r.default.normalize(r.default.subtract(d,w,e._up),e._up),r.default.clone(d,e.up),f=r.default.cross(l,d,e._right),r.default.clone(f,e.right)}}(u||p)&&(e._directionWC=O.default.multiplyByPointAsVector(m,l,e._directionWC),r.default.normalize(e._directionWC,e._directionWC)),(c||p)&&(e._upWC=O.default.multiplyByPointAsVector(m,d,e._upWC),r.default.normalize(e._upWC,e._upWC)),(h||p)&&(e._rightWC=O.default.multiplyByPointAsVector(m,f,e._rightWC),r.default.normalize(e._rightWC,e._rightWC)),(s||u||c||h||p)&&j(e)}function Y(e,t){var i;return i=b.default.equalsEpsilon(Math.abs(e.z),1,b.default.EPSILON3)?Math.atan2(t.y,t.x)-b.default.PI_OVER_TWO:Math.atan2(e.y,e.x)-b.default.PI_OVER_TWO,b.default.TWO_PI-b.default.zeroToTwoPi(i)}function W(e){return b.default.PI_OVER_TWO-b.default.acosClamped(e.z)}function q(e,t,i){var n=0;return b.default.equalsEpsilon(Math.abs(e.z),1,b.default.EPSILON3)||(n=Math.atan2(-i.z,t.z),n=b.default.zeroToTwoPi(n+b.default.TWO_PI)),n}var X=new O.default,K=new O.default;Object.defineProperties(L.prototype,{transform:{get:function(){return this._transform}},inverseTransform:{get:function(){return G(this),this._invTransform}},viewMatrix:{get:function(){return G(this),this._viewMatrix}},inverseViewMatrix:{get:function(){return G(this),this._invViewMatrix}},positionCartographic:{get:function(){return G(this),this._positionCartographic}},positionWC:{get:function(){return G(this),this._positionWC}},directionWC:{get:function(){return G(this),this._directionWC}},upWC:{get:function(){return G(this),this._upWC}},rightWC:{get:function(){return G(this),this._rightWC}},heading:{get:function(){if(this._mode!==I.default.MORPHING){var e=this._projection.ellipsoid,t=O.default.clone(this._transform,X),i=M.default.eastNorthUpToFixedFrame(this.positionWC,e,K);this._setTransform(i);var n=Y(this.direction,this.up);return this._setTransform(t),n}}},pitch:{get:function(){if(this._mode!==I.default.MORPHING){var e=this._projection.ellipsoid,t=O.default.clone(this._transform,X),i=M.default.eastNorthUpToFixedFrame(this.positionWC,e,K);this._setTransform(i);var n=W(this.direction);return this._setTransform(t),n}}},roll:{get:function(){if(this._mode!==I.default.MORPHING){var e=this._projection.ellipsoid,t=O.default.clone(this._transform,X),i=M.default.eastNorthUpToFixedFrame(this.positionWC,e,K);this._setTransform(i);var n=q(this.direction,this.up,this.right);return this._setTransform(t),n}}},moveStart:{get:function(){return this._moveStart}},moveEnd:{get:function(){return this._moveEnd}},changed:{get:function(){return this._changed}}}),L.prototype.update=function(e){if(!Object(u.default)(e))throw new d.default("mode is required.");if(e===I.default.SCENE2D&&!(this.frustum instanceof A.a))throw new d.default("An OrthographicOffCenterFrustum is required in 2D.");if(!(e!==I.default.SCENE3D&&e!==I.default.COLUMBUS_VIEW||this.frustum instanceof T.default||this.frustum instanceof x.a))throw new d.default("A PerspectiveFrustum or OrthographicFrustum is required in 3D and Columbus view");var t=!1;if(e!==this._mode&&(this._mode=e,this._modeChanged=e!==I.default.MORPHING,t=this._mode===I.default.SCENE2D),t){var i=this._max2Dfrustum=this.frustum.clone();if(!(i instanceof A.a))throw new d.default("The camera frustum is expected to be orthographic for 2D camera control.");var n=i.top/i.right;i.right=2*this._maxCoord.x,i.left=-i.right,i.top=n*i.right,i.bottom=-i.top}this._mode===I.default.SCENE2D&&ge(this,this.position)};var J=new r.default,Z=new r.default,Q=new r.default;L.prototype._setTransform=function(e){var t=r.default.clone(this.positionWC,J),i=r.default.clone(this.upWC,Z),n=r.default.clone(this.directionWC,Q);O.default.clone(e,this._transform),this._transformChanged=!0,G(this);var a=this._actualInvTransform;O.default.multiplyByPoint(a,t,this.position),O.default.multiplyByPointAsVector(a,n,this.direction),O.default.multiplyByPointAsVector(a,i,this.up),r.default.cross(this.direction,this.up,this.right),G(this)};var $=new a.default,ee=new C.default,te=new r.default,ie=new r.default;function ne(e){if(!O.default.equals(O.default.IDENTITY,e.transform))return r.default.magnitude(e.position);var t,i,n,a=e._scene,o=a.globe,s=$;if(s.x=a.drawingBufferWidth/2,s.y=a.drawingBufferHeight/2,Object(u.default)(o)){var l=e.getPickRay(s,ee);t=o.pickWorldCoordinates(l,a,!0,te)}if(a.pickPositionSupported&&(i=a.pickPositionWorldCoordinates(s,ie)),Object(u.default)(t)||Object(u.default)(i)){var d=Object(u.default)(i)?r.default.distance(i,e.positionWC):Number.POSITIVE_INFINITY,c=Object(u.default)(t)?r.default.distance(t,e.positionWC):Number.POSITIVE_INFINITY;n=Math.min(d,c)}else n=Math.max(e.positionCartographic.height,0);return n}L.prototype._adjustOrthographicFrustum=function(e){this.frustum instanceof x.a&&(!e&&this._positionCartographic.height<15e4||(this.frustum.width=ne(this)))};var ae=new r.default,re=new O.default,oe=new O.default,se=new E.default,le=new w.default,ue=new s.default;var de=new r.default,ce=new r.default,fe=new r.default;function he(e,t,i,n){var a=r.default.clone(i.direction,de),o=r.default.clone(i.up,ce);if(e._scene.mode===I.default.SCENE3D){var s=e._projection.ellipsoid,l=M.default.eastNorthUpToFixedFrame(t,s,X),u=O.default.inverseTransformation(l,K);O.default.multiplyByPointAsVector(u,a,a),O.default.multiplyByPointAsVector(u,o,o)}var d=r.default.cross(a,o,fe);return n.heading=Y(a,o),n.pitch=W(a),n.roll=q(a,o,d),n}var pe={destination:void 0,orientation:{direction:void 0,up:void 0,heading:void 0,pitch:void 0,roll:void 0},convert:void 0,endTransform:void 0},me=new g.default;L.prototype.setView=function(e){e=Object(l.default)(e,l.default.EMPTY_OBJECT);var t=Object(l.default)(e.orientation,l.default.EMPTY_OBJECT),i=this._mode;if(i!==I.default.MORPHING){Object(u.default)(e.endTransform)&&this._setTransform(e.endTransform);var n=Object(l.default)(e.convert,!0),o=Object(l.default)(e.destination,r.default.clone(this.positionWC,ae));Object(u.default)(o)&&Object(u.default)(o.west)&&(o=this.getRectangleCameraCoordinates(o,ae),n=!1),Object(u.default)(t.direction)&&(t=he(this,o,t,pe.orientation)),me.heading=Object(l.default)(t.heading,0),me.pitch=Object(l.default)(t.pitch,-b.default.PI_OVER_TWO),me.roll=Object(l.default)(t.roll,0),i===I.default.SCENE3D?function(e,t,i){var n=O.default.clone(e.transform,re),a=M.default.eastNorthUpToFixedFrame(t,e._projection.ellipsoid,oe);e._setTransform(a),r.default.clone(r.default.ZERO,e.position),i.heading=i.heading-b.default.PI_OVER_TWO;var o=E.default.fromHeadingPitchRoll(i,se),s=w.default.fromQuaternion(o,le);w.default.getColumn(s,0,e.direction),w.default.getColumn(s,2,e.up),r.default.cross(e.direction,e.up,e.right),e._setTransform(n),e._adjustOrthographicFrustum(!0)}(this,o,me):i===I.default.SCENE2D?function(e,t,i,n){var o=O.default.clone(e.transform,re);if(e._setTransform(O.default.IDENTITY),!r.default.equals(t,e.positionWC)){if(n){var s=e._projection,l=s.ellipsoid.cartesianToCartographic(t,ue);t=s.project(l,ae)}a.default.clone(t,e.position);var u=.5*-t.z,d=-u,c=e.frustum;if(d>u){var f=c.top/c.right;c.right=d,c.left=u,c.top=c.right*f,c.bottom=-c.top}}if(e._scene.mapMode2D===P.default.ROTATE){i.heading=i.heading-b.default.PI_OVER_TWO,i.pitch=-b.default.PI_OVER_TWO,i.roll=0;var h=E.default.fromHeadingPitchRoll(i,se),p=w.default.fromQuaternion(h,le);w.default.getColumn(p,2,e.up),r.default.cross(e.direction,e.up,e.right)}e._setTransform(o)}(this,o,me,n):function(e,t,i,n){var a=O.default.clone(e.transform,re);if(e._setTransform(O.default.IDENTITY),!r.default.equals(t,e.positionWC)){if(n){var o=e._projection,s=o.ellipsoid.cartesianToCartographic(t,ue);t=o.project(s,ae)}r.default.clone(t,e.position)}i.heading=i.heading-b.default.PI_OVER_TWO;var l=E.default.fromHeadingPitchRoll(i,se),u=w.default.fromQuaternion(l,le);w.default.getColumn(u,0,e.direction),w.default.getColumn(u,2,e.up),r.default.cross(e.direction,e.up,e.right),e._setTransform(a),e._adjustOrthographicFrustum(!0)}(this,o,me,n)}};var _e=new r.default;function ge(e,t){var i,n,a=e._scene.mapMode2D===P.default.ROTATE,r=e._maxCoord.x,o=e._maxCoord.y;a?i=-(n=r):(n=t.x-2*r,i=t.x+2*r),t.x>r&&(t.x=n),t.x<-r&&(t.x=i),t.y>o&&(t.y=o),t.y<-o&&(t.y=-o)}L.prototype.flyHome=function(e){var t=this._mode;if(t===I.default.MORPHING&&this._scene.completeMorph(),t===I.default.SCENE2D)this.flyTo({destination:L.DEFAULT_VIEW_RECTANGLE,duration:e,endTransform:O.default.IDENTITY});else if(t===I.default.SCENE3D){var i=this.getRectangleCameraCoordinates(L.DEFAULT_VIEW_RECTANGLE),n=r.default.magnitude(i);n+=n*L.DEFAULT_VIEW_FACTOR,r.default.normalize(i,i),r.default.multiplyByScalar(i,n,i),this.flyTo({destination:i,duration:e,endTransform:O.default.IDENTITY})}else if(t===I.default.COLUMBUS_VIEW){var a=this._projection.ellipsoid.maximumRadius,o=new r.default(0,-1,1);o=r.default.multiplyByScalar(r.default.normalize(o,o),5*a,o),this.flyTo({destination:o,duration:e,orientation:{heading:0,pitch:-Math.acos(r.default.normalize(o,_e).z),roll:0},endTransform:O.default.IDENTITY,convert:!1})}},L.prototype.worldToCameraCoordinates=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new o.a),G(this),O.default.multiplyByVector(this._actualInvTransform,e,t)},L.prototype.worldToCameraCoordinatesPoint=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new r.default),G(this),O.default.multiplyByPoint(this._actualInvTransform,e,t)},L.prototype.worldToCameraCoordinatesVector=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new r.default),G(this),O.default.multiplyByPointAsVector(this._actualInvTransform,e,t)},L.prototype.cameraToWorldCoordinates=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new o.a),G(this),O.default.multiplyByVector(this._actualTransform,e,t)},L.prototype.cameraToWorldCoordinatesPoint=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new r.default),G(this),O.default.multiplyByPoint(this._actualTransform,e,t)},L.prototype.cameraToWorldCoordinatesVector=function(e,t){if(!Object(u.default)(e))throw new d.default("cartesian is required.");return Object(u.default)(t)||(t=new r.default),G(this),O.default.multiplyByPointAsVector(this._actualTransform,e,t)};var ve=new r.default;L.prototype.move=function(e,t){if(!Object(u.default)(e))throw new d.default("direction is required.");var i=this.position;r.default.multiplyByScalar(e,t,ve),r.default.add(i,ve,i),this._mode===I.default.SCENE2D&&ge(this,i),this._adjustOrthographicFrustum(!0)},L.prototype.moveForward=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this._mode===I.default.SCENE2D?Me(this,e):this.move(this.direction,e)},L.prototype.moveBackward=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this._mode===I.default.SCENE2D?Me(this,-e):this.move(this.direction,-e)},L.prototype.moveUp=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this.move(this.up,e)},L.prototype.moveDown=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this.move(this.up,-e)},L.prototype.moveRight=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this.move(this.right,e)},L.prototype.moveLeft=function(e){e=Object(l.default)(e,this.defaultMoveAmount),this.move(this.right,-e)},L.prototype.lookLeft=function(e){e=Object(l.default)(e,this.defaultLookAmount),this._mode!==I.default.SCENE2D&&this.look(this.up,-e)},L.prototype.lookRight=function(e){e=Object(l.default)(e,this.defaultLookAmount),this._mode!==I.default.SCENE2D&&this.look(this.up,e)},L.prototype.lookUp=function(e){e=Object(l.default)(e,this.defaultLookAmount),this._mode!==I.default.SCENE2D&&this.look(this.right,-e)},L.prototype.lookDown=function(e){e=Object(l.default)(e,this.defaultLookAmount),this._mode!==I.default.SCENE2D&&this.look(this.right,e)};var ye=new E.default,be=new w.default;L.prototype.look=function(e,t){if(!Object(u.default)(e))throw new d.default("axis is required.");var i=Object(l.default)(t,this.defaultLookAmount),n=E.default.fromAxisAngle(e,-i,ye),a=w.default.fromQuaternion(n,be),r=this.direction,o=this.up,s=this.right;w.default.multiplyByVector(a,r,r),w.default.multiplyByVector(a,o,o),w.default.multiplyByVector(a,s,s)},L.prototype.twistLeft=function(e){e=Object(l.default)(e,this.defaultLookAmount),this.look(this.direction,e)},L.prototype.twistRight=function(e){e=Object(l.default)(e,this.defaultLookAmount),this.look(this.direction,-e)};var we=new E.default,Oe=new w.default;L.prototype.rotate=function(e,t){if(!Object(u.default)(e))throw new d.default("axis is required.");var i=Object(l.default)(t,this.defaultRotateAmount),n=E.default.fromAxisAngle(e,-i,we),a=w.default.fromQuaternion(n,Oe);w.default.multiplyByVector(a,this.position,this.position),w.default.multiplyByVector(a,this.direction,this.direction),w.default.multiplyByVector(a,this.up,this.up),r.default.cross(this.direction,this.up,this.right),r.default.cross(this.right,this.direction,this.up),this._adjustOrthographicFrustum(!1)},L.prototype.rotateDown=function(e){Ce(this,e=Object(l.default)(e,this.defaultRotateAmount))},L.prototype.rotateUp=function(e){Ce(this,-(e=Object(l.default)(e,this.defaultRotateAmount)))};var xe=new r.default,Ae=new r.default,Te=new r.default,Ee=new r.default;function Ce(e,t){var i=e.position;if(Object(u.default)(e.constrainedAxis)&&!r.default.equalsEpsilon(e.position,r.default.ZERO,b.default.EPSILON2)){var n=r.default.normalize(i,xe),a=r.default.equalsEpsilon(n,e.constrainedAxis,b.default.EPSILON2),o=r.default.equalsEpsilon(n,r.default.negate(e.constrainedAxis,Ee),b.default.EPSILON2);if(a||o)(a&&t<0||o&&t>0)&&e.rotate(e.right,t);else{var s=r.default.normalize(e.constrainedAxis,Ae),l=r.default.dot(n,s),d=b.default.acosClamped(l);t>0&&t>d&&(t=d-b.default.EPSILON4),l=r.default.dot(n,r.default.negate(s,Ee)),d=b.default.acosClamped(l),t<0&&-t>d&&(t=-d+b.default.EPSILON4);var c=r.default.cross(s,n,Te);e.rotate(c,t)}}else e.rotate(e.right,t)}function Se(e,t){Object(u.default)(e.constrainedAxis)?e.rotate(e.constrainedAxis,t):e.rotate(e.up,t)}function Me(e,t){var i,n=e.frustum;if(!(n instanceof A.a&&Object(u.default)(n.left)&&Object(u.default)(n.right)&&Object(u.default)(n.bottom)&&Object(u.default)(n.top)))throw new d.default("The camera frustum is expected to be orthographic for 2D camera control.");if(t*=.5,Math.abs(n.top)+Math.abs(n.bottom)>Math.abs(n.left)+Math.abs(n.right)){var a=n.top-t,r=n.bottom+t,o=e._maxCoord.y;e._scene.mapMode2D===P.default.ROTATE&&(o*=e.maximumZoomFactor),r>o&&(r=o,a=-o),a<=r&&(a=1,r=-1),i=n.right/n.top,n.top=a,n.bottom=r,n.right=n.top*i,n.left=-n.right}else{var s=n.right-t,l=n.left+t,c=e._maxCoord.x;e._scene.mapMode2D===P.default.ROTATE&&(c*=e.maximumZoomFactor),s>c&&(s=c,l=-c),s<=l&&(s=1,l=-1),i=n.top/n.right,n.right=s,n.left=l,n.top=n.right*i,n.bottom=-n.top}}function De(e,t){e.move(e.direction,t)}L.prototype.rotateRight=function(e){Se(this,-(e=Object(l.default)(e,this.defaultRotateAmount)))},L.prototype.rotateLeft=function(e){Se(this,e=Object(l.default)(e,this.defaultRotateAmount))},L.prototype.zoomIn=function(e){e=Object(l.default)(e,this.defaultZoomAmount),this._mode===I.default.SCENE2D?Me(this,e):De(this,e)},L.prototype.zoomOut=function(e){e=Object(l.default)(e,this.defaultZoomAmount),this._mode===I.default.SCENE2D?Me(this,-e):De(this,-e)},L.prototype.getMagnitude=function(){return this._mode===I.default.SCENE3D?r.default.magnitude(this.position):this._mode===I.default.COLUMBUS_VIEW?Math.abs(this.position.z):this._mode===I.default.SCENE2D?Math.max(this.frustum.right-this.frustum.left,this.frustum.top-this.frustum.bottom):void 0};var Pe=new O.default;L.prototype.lookAt=function(e,t){if(!Object(u.default)(e))throw new d.default("target is required");if(!Object(u.default)(t))throw new d.default("offset is required");if(this._mode===I.default.MORPHING)throw new d.default("lookAt is not supported while morphing.");var i=M.default.eastNorthUpToFixedFrame(e,f.default.WGS84,Pe);this.lookAtTransform(i,t)};var Ie=new r.default,Le=new E.default,je=new E.default,Re=new w.default;function Ne(e,t,i){t=b.default.clamp(t,-b.default.PI_OVER_TWO,b.default.PI_OVER_TWO),e=b.default.zeroToTwoPi(e)-b.default.PI_OVER_TWO;var n=E.default.fromAxisAngle(r.default.UNIT_Y,-t,Le),a=E.default.fromAxisAngle(r.default.UNIT_Z,-e,je),o=E.default.multiply(a,n,a),s=w.default.fromQuaternion(o,Re),l=r.default.clone(r.default.UNIT_X,Ie);return w.default.multiplyByVector(s,l,l),r.default.negate(l,l),r.default.multiplyByScalar(l,i,l),l}L.prototype.lookAtTransform=function(e,t){if(!Object(u.default)(e))throw new d.default("transform is required");if(this._mode===I.default.MORPHING)throw new d.default("lookAtTransform is not supported while morphing.");if(this._setTransform(e),Object(u.default)(t)){var i;if(i=Object(u.default)(t.heading)?Ne(t.heading,t.pitch,t.range):t,this._mode===I.default.SCENE2D){a.default.clone(a.default.ZERO,this.position),r.default.negate(i,this.up),this.up.z=0,r.default.magnitudeSquared(this.up)d&&(d+=b.default.TWO_PI);var f,p=.5*(c+d);if(l<-b.default.PI_OVER_TWO+b.default.RADIANS_PER_DEGREE&&s>b.default.PI_OVER_TWO-b.default.RADIANS_PER_DEGREE)f=0;else{var m=Fe;m.longitude=p,m.latitude=s,m.height=0;var _=ke;_.longitude=p,_.latitude=l,_.height=0;var g=Be;Object(u.default)(g)&&g.ellipsoid===a||(Be=g=new h.a(void 0,void 0,a)),g.setEndPoints(m,_),f=g.interpolateUsingFraction(.5,Fe).latitude}var v=Fe;v.longitude=p,v.latitude=f,v.height=0;var y=a.cartographicToCartesian(v,We),w=Fe;w.longitude=d,w.latitude=s;var O=a.cartographicToCartesian(w,ze);w.longitude=c;var A=a.cartographicToCartesian(w,Ve);w.longitude=p;var T=a.cartographicToCartesian(w,Ge);w.latitude=l;var E=a.cartographicToCartesian(w,Ye);w.longitude=d;var C=a.cartographicToCartesian(w,He);w.longitude=c;var S=a.cartographicToCartesian(w,Ue);r.default.subtract(A,y,A),r.default.subtract(C,y,C),r.default.subtract(O,y,O),r.default.subtract(S,y,S),r.default.subtract(T,y,T),r.default.subtract(E,y,E);var M=a.geodeticSurfaceNormal(y,o.direction);r.default.negate(M,M);var D=r.default.cross(M,r.default.UNIT_Z,o.right);r.default.normalize(D,D);var P,I=r.default.cross(D,M,o.up);if(e.frustum instanceof x.a){var L,j,R=Math.max(r.default.distance(O,A),r.default.distance(C,S)),N=Math.max(r.default.distance(O,C),r.default.distance(A,S)),B=e.frustum._offCenterFrustum.right/e.frustum._offCenterFrustum.top,F=N*B;R>F?j=(L=R)/B:(j=N,L=F),P=Math.max(L,j)}else{var k=Math.tan(.5*e.frustum.fovy),z=e.frustum.aspectRatio*k;if(P=Math.max(Ke(M,I,A,k),Ke(M,I,C,k),Ke(M,I,O,k),Ke(M,I,S,k),Ke(M,I,T,k),Ke(M,I,E,k),Ke(M,D,A,z),Ke(M,D,C,z),Ke(M,D,O,z),Ke(M,D,S,z),Ke(M,D,T,z),Ke(M,D,E,z)),l<0&&s>0){var U=Fe;U.longitude=c,U.latitude=0,U.height=0;var V=a.cartographicToCartesian(U,qe);r.default.subtract(V,y,V),P=Math.max(P,Ke(M,I,V,k),Ke(M,D,V,z)),U.longitude=d,V=a.cartographicToCartesian(U,qe),r.default.subtract(V,y,V),P=Math.max(P,Ke(M,I,V,k),Ke(M,D,V,z))}}return r.default.add(y,r.default.multiplyByScalar(M,-P,qe),i)}var Ze=new s.default,Qe=new r.default,$e=new r.default;var et=new s.default,tt=new r.default,it=new r.default;L.prototype.getRectangleCameraCoordinates=function(e,t){if(!Object(u.default)(e))throw new d.default("rectangle is required");var i=this._mode;return Object(u.default)(t)||(t=new r.default),i===I.default.SCENE3D?Je(this,e,t):i===I.default.COLUMBUS_VIEW?function(e,t,i){var n=e._projection;t.west>t.east&&(t=S.default.MAX_VALUE);var a=e._actualTransform,r=e._actualInvTransform,o=Ze;o.longitude=t.east,o.latitude=t.north;var s=n.project(o,Qe);O.default.multiplyByPoint(a,s,s),O.default.multiplyByPoint(r,s,s),o.longitude=t.west,o.latitude=t.south;var l=n.project(o,$e);if(O.default.multiplyByPoint(a,l,l),O.default.multiplyByPoint(r,l,l),i.x=.5*(s.x-l.x)+l.x,i.y=.5*(s.y-l.y)+l.y,Object(u.default)(e.frustum.fovy)){var d=Math.tan(.5*e.frustum.fovy),c=e.frustum.aspectRatio*d;i.z=.5*Math.max((s.x-l.x)/c,(s.y-l.y)/d)}else{var f=s.x-l.x,h=s.y-l.y;i.z=Math.max(f,h)}return i}(this,e,t):i===I.default.SCENE2D?function(e,t,i){var n=e._projection,a=t.east;t.west>t.east&&(e._scene.mapMode2D===P.default.INFINITE_SCROLL?a+=b.default.TWO_PI:a=(t=S.default.MAX_VALUE).east);var r=et;r.longitude=a,r.latitude=t.north;var o=n.project(r,tt);r.longitude=t.west,r.latitude=t.south;var s,l,u=n.project(r,it),d=.5*Math.abs(o.x-u.x),c=.5*Math.abs(o.y-u.y),f=e.frustum.right/e.frustum.top,h=c*f;return d>h?l=(s=d)/f:(l=c,s=h),c=Math.max(2*s,2*l),i.x=.5*(o.x-u.x)+u.x,i.y=.5*(o.y-u.y)+u.y,(r=n.unproject(i,r)).height=c,i=n.project(r,i)}(this,e,t):void 0};var nt=new C.default;var at=new C.default;var rt=new C.default;L.prototype.pickEllipsoid=function(e,t,i){if(!Object(u.default)(e))throw new d.default("windowPosition is required.");var n=this._scene.canvas;if(0!==n.clientWidth&&0!==n.clientHeight){if(Object(u.default)(i)||(i=new r.default),t=Object(l.default)(t,f.default.WGS84),this._mode===I.default.SCENE3D)i=function(e,t,i,n){i=Object(l.default)(i,f.default.WGS84);var a=e.getPickRay(t,nt),r=y.default.rayEllipsoid(a,i);if(r){var o=r.start>0?r.start:r.stop;return C.default.getPoint(a,o,n)}}(this,e,t,i);else if(this._mode===I.default.SCENE2D)i=function(e,t,i,n){var a=e.getPickRay(t,at).origin;a=r.default.fromElements(a.y,a.z,0,a);var o=i.unproject(a);if(!(o.latitude<-b.default.PI_OVER_TWO||o.latitude>b.default.PI_OVER_TWO))return i.ellipsoid.cartographicToCartesian(o,n)}(this,e,this._projection,i);else{if(this._mode!==I.default.COLUMBUS_VIEW)return;i=function(e,t,i,n){var a=e.getPickRay(t,rt),o=-a.origin.x/a.direction.x;C.default.getPoint(a,o,n);var s=i.unproject(new r.default(n.y,n.z,0));if(!(s.latitude<-b.default.PI_OVER_TWO||s.latitude>b.default.PI_OVER_TWO||s.longitude<-Math.PI||s.longitude>Math.PI))return i.ellipsoid.cartographicToCartesian(s,n)}(this,e,this._projection,i)}return i}};var ot=new r.default,st=new r.default,lt=new r.default;var ut=new r.default;L.prototype.getPickRay=function(e,t){if(!Object(u.default)(e))throw new d.default("windowPosition is required.");Object(u.default)(t)||(t=new C.default);var i=this.frustum;return Object(u.default)(i.aspectRatio)&&Object(u.default)(i.fov)&&Object(u.default)(i.near)?function(e,t,i){var n=e._scene.canvas,a=n.clientWidth,o=n.clientHeight,s=Math.tan(.5*e.frustum.fovy),l=e.frustum.aspectRatio*s,u=e.frustum.near,d=2/a*t.x-1,c=2/o*(o-t.y)-1,f=e.positionWC;r.default.clone(f,i.origin);var h=r.default.multiplyByScalar(e.directionWC,u,ot);r.default.add(f,h,h);var p=r.default.multiplyByScalar(e.rightWC,d*u*l,st),m=r.default.multiplyByScalar(e.upWC,c*u*s,lt),_=r.default.add(h,p,i.direction);return r.default.add(_,m,_),r.default.subtract(_,f,_),r.default.normalize(_,_),i}(this,e,t):function(e,t,i){var n=e._scene.canvas,a=n.clientWidth,o=n.clientHeight,s=e.frustum;Object(u.default)(s._offCenterFrustum)&&(s=s._offCenterFrustum);var l=2/a*t.x-1;l*=.5*(s.right-s.left);var d=2/o*(o-t.y)-1;d*=.5*(s.top-s.bottom);var c=i.origin;return r.default.clone(e.position,c),r.default.multiplyByScalar(e.right,l,ut),r.default.add(ut,c,c),r.default.multiplyByScalar(e.up,d,ut),r.default.add(ut,c,c),r.default.clone(e.directionWC,i.direction),e._mode!==I.default.COLUMBUS_VIEW&&e._mode!==I.default.SCENE2D||r.default.fromElements(i.origin.z,i.origin.x,i.origin.y,i.origin),i}(this,e,t)};var dt=new r.default,ct=new r.default;L.prototype.distanceToBoundingSphere=function(e){if(!Object(u.default)(e))throw new d.default("boundingSphere is required.");var t=r.default.subtract(this.positionWC,e.center,dt),i=r.default.multiplyByScalar(this.directionWC,r.default.dot(t,this.directionWC),ct);return Math.max(0,r.default.magnitude(i)-e.radius)};var ft=new a.default;L.prototype.getPixelSize=function(e,t,i){if(!Object(u.default)(e))throw new d.default("boundingSphere is required.");if(!Object(u.default)(t))throw new d.default("drawingBufferWidth is required.");if(!Object(u.default)(i))throw new d.default("drawingBufferHeight is required.");var n=this.distanceToBoundingSphere(e),a=this.frustum.getPixelDimensions(t,i,n,this._scene.pixelRatio,ft);return Math.max(a.x,a.y)};var ht=new r.default,pt=new r.default,mt=new r.default,_t=new r.default;function gt(e,t){var i=e.position,n=e.direction,a=e.worldToCameraCoordinatesVector(r.default.UNIT_X,ht),o=-r.default.dot(a,i)/r.default.dot(a,n),s=r.default.add(i,r.default.multiplyByScalar(n,o,pt),pt);e.cameraToWorldCoordinatesPoint(s,s),i=e.cameraToWorldCoordinatesPoint(e.position,mt);var l=Math.tan(.5*e.frustum.fovy),u=e.frustum.aspectRatio*l,d=r.default.magnitude(r.default.subtract(i,s,_t)),f=u*d,h=l*d,p=e._maxCoord.x,m=e._maxCoord.y,_=Math.max(f-p,p),g=Math.max(h-m,m);if(i.z<-_||i.z>_||i.y<-g||i.y>g){var v=s.y<-_||s.y>_,y=s.z<-g||s.z>g;if(v||y)return function(e,t,i,n,a,o){var s=r.default.clone(t);return i.y>n?s.y-=i.y-n:i.y<-n&&(s.y+=-n-i.y),i.z>a?s.z-=i.z-a:i.z<-a&&(s.z+=-a-i.z),{easingFunction:c.a.EXPONENTIAL_OUT,startObject:{time:0},stopObject:{time:1},duration:o,update:function(i){var n=r.default.lerp(t,s,i.time,new r.default);e.worldToCameraCoordinatesPoint(n,e.position)}}}(e,i,s,_,g,t)}}L.prototype.createCorrectPositionTween=function(e){if(!Object(u.default)(e))throw new d.default("duration is required.");if(this._mode===I.default.COLUMBUS_VIEW)return gt(this,e)};var vt=new r.default,yt={destination:void 0,heading:void 0,pitch:void 0,roll:void 0,duration:void 0,complete:void 0,cancel:void 0,endTransform:void 0,maximumHeight:void 0,easingFunction:void 0};L.prototype.cancelFlight=function(){Object(u.default)(this._currentFlight)&&(this._currentFlight.cancelTween(),this._currentFlight=void 0)},L.prototype.completeFlight=function(){if(Object(u.default)(this._currentFlight)){this._currentFlight.cancelTween();var e={destination:void 0,orientation:{heading:void 0,pitch:void 0,roll:void 0}};e.destination=yt.destination,e.orientation.heading=yt.heading,e.orientation.pitch=yt.pitch,e.orientation.roll=yt.roll,this.setView(e),Object(u.default)(this._currentFlight.complete)&&this._currentFlight.complete(),this._currentFlight=void 0}},L.prototype.flyTo=function(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).destination;if(!Object(u.default)(t))throw new d.default("destination is required.");if(this._mode!==I.default.MORPHING){this.cancelFlight();var i=Object(l.default)(e.orientation,l.default.EMPTY_OBJECT);if(Object(u.default)(i.direction)&&(i=he(this,t,i,pe.orientation)),Object(u.default)(e.duration)&&e.duration<=0){var n=pe;return n.destination=e.destination,n.orientation.heading=i.heading,n.orientation.pitch=i.pitch,n.orientation.roll=i.roll,n.convert=e.convert,n.endTransform=e.endTransform,this.setView(n),void("function"==typeof e.complete&&e.complete())}var a=Object(u.default)(t.west);a&&(t=this.getRectangleCameraCoordinates(t,vt));var r,o=this;yt.destination=t,yt.heading=i.heading,yt.pitch=i.pitch,yt.roll=i.roll,yt.duration=e.duration,yt.complete=function(){r===o._currentFlight&&(o._currentFlight=void 0),Object(u.default)(e.complete)&&e.complete()},yt.cancel=e.cancel,yt.endTransform=e.endTransform,yt.convert=!a&&e.convert,yt.maximumHeight=e.maximumHeight,yt.pitchAdjustHeight=e.pitchAdjustHeight,yt.flyOverLongitude=e.flyOverLongitude,yt.flyOverLongitudeWeight=e.flyOverLongitudeWeight,yt.easingFunction=e.easingFunction;var s=this._scene,c=D.a.createTween(s,yt);if(0!==c.duration){r=s.tweens.add(c),this._currentFlight=r;var f=this._scene.preloadFlightCamera;this._mode!==I.default.SCENE2D&&(Object(u.default)(f)||(f=L.clone(this)),f.setView({destination:t,orientation:i}),this._scene.preloadFlightCullingVolume=f.frustum.computeCullingVolume(f.positionWC,f.directionWC,f.upWC))}else"function"==typeof c.complete&&c.complete()}};function bt(e,t,i){i=_.a.clone(Object(u.default)(i)?i:L.DEFAULT_OFFSET);var n=e._scene.screenSpaceCameraController.minimumZoomDistance,a=e._scene.screenSpaceCameraController.maximumZoomDistance,r=i.range;if(!Object(u.default)(r)||0===r){var o=t.radius;0===o?i.range=100:e.frustum instanceof x.a||e._mode===I.default.SCENE2D?i.range=function(e,t){var i,n,a=e.frustum;Object(u.default)(a._offCenterFrustum)&&(a=a._offCenterFrustum);var r=a.right/a.top,o=t*r;return t>o?n=(i=t)/r:(n=t,i=o),1.5*Math.max(i,n)}(e,o):i.range=function(e,t){var i=e.frustum,n=Math.tan(.5*i.fovy),a=i.aspectRatio*n;return Math.max(t/a,t/n)}(e,o),i.range=b.default.clamp(i.range,n,a)}return i}L.prototype.viewBoundingSphere=function(e,t){if(!Object(u.default)(e))throw new d.default("boundingSphere is required.");if(this._mode===I.default.MORPHING)throw new d.default("viewBoundingSphere is not supported while morphing.");t=bt(this,e,t),this.lookAt(e.center,t)};var wt=new O.default,Ot=new r.default,xt=new r.default,At=new r.default,Tt=new r.default,Et=new o.a,Ct=new E.default,St=new w.default;L.prototype.flyToBoundingSphere=function(e,t){if(!Object(u.default)(e))throw new d.default("boundingSphere is required.");t=Object(l.default)(t,l.default.EMPTY_OBJECT);var i=this._mode===I.default.SCENE2D||this._mode===I.default.COLUMBUS_VIEW;this._setTransform(O.default.IDENTITY);var n,a=bt(this,e,t.offset);n=i?r.default.multiplyByScalar(r.default.UNIT_Z,a.range,Ot):Ne(a.heading,a.pitch,a.range);var o,s,c=M.default.eastNorthUpToFixedFrame(e.center,f.default.WGS84,wt);if(O.default.multiplyByPoint(c,n,n),!i){if(o=r.default.subtract(e.center,n,xt),r.default.normalize(o,o),s=O.default.multiplyByPointAsVector(c,r.default.UNIT_Z,At),1-Math.abs(r.default.dot(o,s))b.default.PI?h+=b.default.TWO_PI-g:h+=g,p=_}return b.default.equalsEpsilon(Math.abs(h),b.default.TWO_PI,b.default.EPSILON9)&&(t.west=-b.default.PI,t.east=b.default.PI,Nt[0].latitude>=0?t.north=b.default.PI_OVER_TWO:t.south=-b.default.PI_OVER_TWO),t}},L.prototype.switchToPerspectiveFrustum=function(){if(!(this._mode===I.default.SCENE2D||this.frustum instanceof T.default)){var e=this._scene;this.frustum=new T.default,this.frustum.aspectRatio=e.drawingBufferWidth/e.drawingBufferHeight,this.frustum.fov=b.default.toRadians(60)}},L.prototype.switchToOrthographicFrustum=function(){if(!(this._mode===I.default.SCENE2D||this.frustum instanceof x.a)){var e=ne(this),t=this._scene;this.frustum=new x.a,this.frustum.aspectRatio=t.drawingBufferWidth/t.drawingBufferHeight,this.frustum.width=e}},L.clone=function(e,t){return Object(u.default)(t)||(t=new L(e._scene)),r.default.clone(e.position,t.position),r.default.clone(e.direction,t.direction),r.default.clone(e.up,t.up),r.default.clone(e.right,t.right),O.default.clone(e._transform,t.transform),t._transformChanged=!0,t.frustum=e.frustum.clone(),t},t.a=L},function(e,t,i){"use strict";var n=i(41),a=i(8),r=i(1),o=i(16),s=i(22),l=i(4),u=i(7),d=i(99),c=i(2),f=i(0),h=i(3),p=i(49),m=i(6),_=i(65),g=i(30),v=i(42),y=i(129),b=i(13),w=i(177),O=i(89);function x(e,t){if(e=Object(c.default)(e,c.default.EMPTY_OBJECT),Object(f.default)(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new h.default("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.pixelOffsetScaleByDistance,o=e.scaleByDistance,s=e.distanceDisplayCondition;if(Object(f.default)(i)){if(i.far<=i.near)throw new h.default("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=_.a.clone(i)}if(Object(f.default)(n)){if(n.far<=n.near)throw new h.default("pixelOffsetScaleByDistance.far must be greater than pixelOffsetScaleByDistance.near.");n=_.a.clone(n)}if(Object(f.default)(o)){if(o.far<=o.near)throw new h.default("scaleByDistance.far must be greater than scaleByDistance.near.");o=_.a.clone(o)}if(Object(f.default)(s)){if(s.far<=s.near)throw new h.default("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");s=p.default.clone(s)}this._show=Object(c.default)(e.show,!0),this._position=r.default.clone(Object(c.default)(e.position,r.default.ZERO)),this._actualPosition=r.default.clone(this._position),this._pixelOffset=a.default.clone(Object(c.default)(e.pixelOffset,a.default.ZERO)),this._translate=new a.default(0,0),this._eyeOffset=r.default.clone(Object(c.default)(e.eyeOffset,r.default.ZERO)),this._heightReference=Object(c.default)(e.heightReference,v.a.NONE),this._verticalOrigin=Object(c.default)(e.verticalOrigin,O.default.CENTER),this._horizontalOrigin=Object(c.default)(e.horizontalOrigin,y.a.CENTER),this._scale=Object(c.default)(e.scale,1),this._color=u.default.clone(Object(c.default)(e.color,u.default.WHITE)),this._rotation=Object(c.default)(e.rotation,0),this._alignedAxis=r.default.clone(Object(c.default)(e.alignedAxis,r.default.ZERO)),this._width=e.width,this._height=e.height,this._scaleByDistance=o,this._translucencyByDistance=i,this._pixelOffsetScaleByDistance=n,this._sizeInMeters=Object(c.default)(e.sizeInMeters,!1),this._distanceDisplayCondition=s,this._disableDepthTestDistance=e.disableDepthTestDistance,this._id=e.id,this._collection=Object(c.default)(e.collection,t),this._pickId=void 0,this._pickPrimitive=Object(c.default)(e._pickPrimitive,this),this._billboardCollection=t,this._dirty=!1,this._index=-1,this._batchIndex=void 0,this._imageIndex=-1,this._imageIndexPromise=void 0,this._imageId=void 0,this._image=void 0,this._imageSubRegion=void 0,this._imageWidth=void 0,this._imageHeight=void 0,this._labelDimensions=void 0,this._labelHorizontalOrigin=void 0,this._labelTranslate=void 0;var l=e.image,m=e.imageId;Object(f.default)(l)&&(Object(f.default)(m)||(m="string"==typeof l?l:Object(f.default)(l.src)?l.src:Object(d.default)()),this._imageId=m,this._image=l),Object(f.default)(e.imageSubRegion)&&(this._imageId=m,this._imageSubRegion=e.imageSubRegion),Object(f.default)(this._billboardCollection._textureAtlas)&&this._loadImage(),this._actualClampedPosition=void 0,this._removeCallbackFunc=void 0,this._mode=b.default.SCENE3D,this._clusterShow=!0,this._outlineColor=u.default.clone(Object(c.default)(e.outlineColor,u.default.BLACK)),this._outlineWidth=Object(c.default)(e.outlineWidth,0),this._updateClamping()}var A=x.SHOW_INDEX=0,T=x.POSITION_INDEX=1,E=x.PIXEL_OFFSET_INDEX=2,C=x.EYE_OFFSET_INDEX=3,S=x.HORIZONTAL_ORIGIN_INDEX=4,M=x.VERTICAL_ORIGIN_INDEX=5,D=x.SCALE_INDEX=6,P=x.IMAGE_INDEX_INDEX=7,I=x.COLOR_INDEX=8,L=x.ROTATION_INDEX=9,j=x.ALIGNED_AXIS_INDEX=10,R=x.SCALE_BY_DISTANCE_INDEX=11,N=x.TRANSLUCENCY_BY_DISTANCE_INDEX=12,B=x.PIXEL_OFFSET_SCALE_BY_DISTANCE_INDEX=13,F=x.DISTANCE_DISPLAY_CONDITION=14,k=x.DISABLE_DEPTH_DISTANCE=15;x.TEXTURE_COORDINATE_BOUNDS=16;var z=x.SDF_INDEX=17;function U(e,t){var i=e._billboardCollection;Object(f.default)(i)&&(i._updateBillboard(e,t),e._dirty=!0)}x.NUMBER_OF_PROPERTIES=18,Object.defineProperties(x.prototype,{show:{get:function(){return this._show},set:function(e){l.a.typeOf.bool("value",e),this._show!==e&&(this._show=e,U(this,A))}},position:{get:function(){return this._position},set:function(e){l.a.typeOf.object("value",e);var t=this._position;r.default.equals(t,e)||(r.default.clone(e,t),r.default.clone(e,this._actualPosition),this._updateClamping(),U(this,T))}},heightReference:{get:function(){return this._heightReference},set:function(e){l.a.typeOf.number("value",e),e!==this._heightReference&&(this._heightReference=e,this._updateClamping(),U(this,T))}},pixelOffset:{get:function(){return this._pixelOffset},set:function(e){l.a.typeOf.object("value",e);var t=this._pixelOffset;a.default.equals(t,e)||(a.default.clone(e,t),U(this,E))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(Object(f.default)(e)&&(l.a.typeOf.object("value",e),e.far<=e.near))throw new h.default("far distance must be greater than near distance.");var t=this._scaleByDistance;_.a.equals(t,e)||(this._scaleByDistance=_.a.clone(e,t),U(this,R))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(Object(f.default)(e)&&(l.a.typeOf.object("value",e),e.far<=e.near))throw new h.default("far distance must be greater than near distance.");var t=this._translucencyByDistance;_.a.equals(t,e)||(this._translucencyByDistance=_.a.clone(e,t),U(this,N))}},pixelOffsetScaleByDistance:{get:function(){return this._pixelOffsetScaleByDistance},set:function(e){if(Object(f.default)(e)&&(l.a.typeOf.object("value",e),e.far<=e.near))throw new h.default("far distance must be greater than near distance.");var t=this._pixelOffsetScaleByDistance;_.a.equals(t,e)||(this._pixelOffsetScaleByDistance=_.a.clone(e,t),U(this,B))}},eyeOffset:{get:function(){return this._eyeOffset},set:function(e){l.a.typeOf.object("value",e);var t=this._eyeOffset;r.default.equals(t,e)||(r.default.clone(e,t),U(this,C))}},horizontalOrigin:{get:function(){return this._horizontalOrigin},set:function(e){l.a.typeOf.number("value",e),this._horizontalOrigin!==e&&(this._horizontalOrigin=e,U(this,S))}},verticalOrigin:{get:function(){return this._verticalOrigin},set:function(e){l.a.typeOf.number("value",e),this._verticalOrigin!==e&&(this._verticalOrigin=e,U(this,M))}},scale:{get:function(){return this._scale},set:function(e){l.a.typeOf.number("value",e),this._scale!==e&&(this._scale=e,U(this,D))}},color:{get:function(){return this._color},set:function(e){l.a.typeOf.object("value",e);var t=this._color;u.default.equals(t,e)||(u.default.clone(e,t),U(this,I))}},rotation:{get:function(){return this._rotation},set:function(e){l.a.typeOf.number("value",e),this._rotation!==e&&(this._rotation=e,U(this,L))}},alignedAxis:{get:function(){return this._alignedAxis},set:function(e){l.a.typeOf.object("value",e);var t=this._alignedAxis;r.default.equals(t,e)||(r.default.clone(e,t),U(this,j))}},width:{get:function(){return Object(c.default)(this._width,this._imageWidth)},set:function(e){Object(f.default)(e)&&l.a.typeOf.number("value",e),this._width!==e&&(this._width=e,U(this,P))}},height:{get:function(){return Object(c.default)(this._height,this._imageHeight)},set:function(e){Object(f.default)(e)&&l.a.typeOf.number("value",e),this._height!==e&&(this._height=e,U(this,P))}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){l.a.typeOf.bool("value",e),this._sizeInMeters!==e&&(this._sizeInMeters=e,U(this,I))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(!p.default.equals(e,this._distanceDisplayCondition)){if(Object(f.default)(e)&&(l.a.typeOf.object("value",e),e.far<=e.near))throw new h.default("far distance must be greater than near distance.");this._distanceDisplayCondition=p.default.clone(e,this._distanceDisplayCondition),U(this,F)}}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(Object(f.default)(e)&&(l.a.typeOf.number("value",e),e<0))throw new h.default("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance!==e&&(this._disableDepthTestDistance=e,U(this,k))}},id:{get:function(){return this._id},set:function(e){this._id=e,Object(f.default)(this._pickId)&&(this._pickId.object.id=e)}},pickPrimitive:{get:function(){return this._pickPrimitive},set:function(e){this._pickPrimitive=e,Object(f.default)(this._pickId)&&(this._pickId.object.primitive=e)}},pickId:{get:function(){return this._pickId}},image:{get:function(){return this._imageId},set:function(e){Object(f.default)(e)?"string"==typeof e?this.setImage(e,e):e instanceof g.default?this.setImage(e.url,e):Object(f.default)(e.src)?this.setImage(e.src,e):this.setImage(Object(d.default)(),e):(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=void 0,this._image=void 0,this._imageIndexPromise=void 0,U(this,P))}},ready:{get:function(){return-1!==this._imageIndex}},_clampedPosition:{get:function(){return this._actualClampedPosition},set:function(e){this._actualClampedPosition=r.default.clone(e,this._actualClampedPosition),U(this,T)}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,U(this,A))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!Object(f.default)(e))throw new h.default("value is required.");var t=this._outlineColor;u.default.equals(t,e)||(u.default.clone(e,t),U(this,z))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){this._outlineWidth!==e&&(this._outlineWidth=e,U(this,z))}}}),x.prototype.getPickId=function(e){return Object(f.default)(this._pickId)||(this._pickId=e.createPickId({primitive:this._pickPrimitive,collection:this._collection,id:this._id})),this._pickId},x.prototype._updateClamping=function(){x._updateClamping(this._billboardCollection,this)};var V=new s.default,H=new r.default;x._updateClamping=function(e,t){var i=e._scene;if(Object(f.default)(i)&&Object(f.default)(i.globe)){var n=i.globe,a=n.ellipsoid,o=n._surface,l=i.frameState.mode,u=l!==t._mode;if(t._mode=l,(t._heightReference===v.a.NONE||u)&&Object(f.default)(t._removeCallbackFunc)&&(t._removeCallbackFunc(),t._removeCallbackFunc=void 0,t._clampedPosition=void 0),t._heightReference!==v.a.NONE&&Object(f.default)(t._position)){var d=a.cartesianToCartographic(t._position);if(Object(f.default)(d)){Object(f.default)(t._removeCallbackFunc)&&t._removeCallbackFunc(),t._removeCallbackFunc=o.updateHeight(d,p),s.default.clone(d,V);var c=n.getHeight(d);Object(f.default)(c)&&(V.height=c),a.cartographicToCartesian(V,H),p(H)}else t._actualClampedPosition=void 0}}else if(t._heightReference!==v.a.NONE)throw new h.default("Height reference is not supported without a scene and globe.");function p(e){if(t._heightReference===v.a.RELATIVE_TO_GROUND)if(t._mode===b.default.SCENE3D){var i=a.cartesianToCartographic(e,V);i.height+=d.height,a.cartographicToCartesian(i,e)}else e.x+=d.height;t._clampedPosition=r.default.clone(e,t._clampedPosition)}},x.prototype._loadImage=function(){var e,t=this._billboardCollection._textureAtlas,i=this._imageId,a=this._image,r=this._imageSubRegion;if(Object(f.default)(a)&&(e=t.addImage(i,a)),Object(f.default)(r)&&(e=t.addSubRegion(i,r)),this._imageIndexPromise=e,Object(f.default)(e)){var o=this;e.then((function(e){if(o._imageId===i&&o._image===a&&n.a.equals(o._imageSubRegion,r)){var s=t.textureCoordinates[e];o._imageWidth=t.texture.width*s.width,o._imageHeight=t.texture.height*s.height,o._imageIndex=e,o._ready=!0,o._image=void 0,o._imageIndexPromise=void 0,U(o,P)}})).otherwise((function(e){console.error("Error loading image for billboard: "+e),o._imageIndexPromise=void 0}))}},x.prototype.setImage=function(e,t){if(!Object(f.default)(e))throw new h.default("id is required.");if(!Object(f.default)(t))throw new h.default("image is required.");this._imageId!==e&&(this._imageIndex=-1,this._imageSubRegion=void 0,this._imageId=e,this._image=t,Object(f.default)(this._billboardCollection._textureAtlas)&&this._loadImage())},x.prototype.setImageSubRegion=function(e,t){if(!Object(f.default)(e))throw new h.default("id is required.");if(!Object(f.default)(t))throw new h.default("subRegion is required.");this._imageId===e&&n.a.equals(this._imageSubRegion,t)||(this._imageIndex=-1,this._imageId=e,this._imageSubRegion=n.a.clone(t),Object(f.default)(this._billboardCollection._textureAtlas)&&this._loadImage())},x.prototype._setTranslate=function(e){if(!Object(f.default)(e))throw new h.default("value is required.");var t=this._translate;a.default.equals(t,e)||(a.default.clone(e,t),U(this,E))},x.prototype._getActualPosition=function(){return Object(f.default)(this._clampedPosition)?this._clampedPosition:this._actualPosition},x.prototype._setActualPosition=function(e){Object(f.default)(this._clampedPosition)||r.default.clone(e,this._actualPosition),U(this,T)};var G=new o.a;x._computeActualPosition=function(e,t,i,n){return Object(f.default)(e._clampedPosition)?(i.mode!==e._mode&&e._updateClamping(),e._clampedPosition):i.mode===b.default.SCENE3D?t:(m.default.multiplyByPoint(n,t,G),w.default.computeActualWgs84Position(i,G))};var Y=new r.default;x._computeScreenSpacePosition=function(e,t,i,n,r,o){var s=m.default.multiplyByPoint(e,t,Y),l=w.default.wgs84WithEyeOffsetToWindowCoordinates(r,s,i,o);if(Object(f.default)(l))return a.default.add(l,n,l),l};var W=new a.default(0,0);x.prototype.computeScreenSpacePosition=function(e,t){var i=this._billboardCollection;if(Object(f.default)(t)||(t=new a.default),!Object(f.default)(i))throw new h.default("Billboard must be in a collection. Was it removed?");if(!Object(f.default)(e))throw new h.default("scene is required.");a.default.clone(this._pixelOffset,W),a.default.add(W,this._translate,W);var n=i.modelMatrix,r=this._position;if(Object(f.default)(this._clampedPosition)&&(r=this._clampedPosition,e.mode!==b.default.SCENE3D)){var o=e.mapProjection,s=o.ellipsoid,l=o.unproject(r,V);r=s.cartographicToCartesian(l,Y),n=m.default.IDENTITY}return x._computeScreenSpacePosition(n,r,this._eyeOffset,W,e,t)},x.getScreenSpaceBoundingBox=function(e,t,i){var a=e.width,r=e.height,o=e.scale;a*=o,r*=o;var s=t.x;e.horizontalOrigin===y.a.RIGHT?s-=a:e.horizontalOrigin===y.a.CENTER&&(s-=.5*a);var l=t.y;return e.verticalOrigin===O.default.BOTTOM||e.verticalOrigin===O.default.BASELINE?l-=r:e.verticalOrigin===O.default.CENTER&&(l-=.5*r),Object(f.default)(i)||(i=new n.a),i.x=s,i.y=l,i.width=a,i.height=r,i},x.prototype.equals=function(e){return this===e||Object(f.default)(e)&&this._id===e._id&&r.default.equals(this._position,e._position)&&this._imageId===e._imageId&&this._show===e._show&&this._scale===e._scale&&this._verticalOrigin===e._verticalOrigin&&this._horizontalOrigin===e._horizontalOrigin&&this._heightReference===e._heightReference&&n.a.equals(this._imageSubRegion,e._imageSubRegion)&&u.default.equals(this._color,e._color)&&a.default.equals(this._pixelOffset,e._pixelOffset)&&a.default.equals(this._translate,e._translate)&&r.default.equals(this._eyeOffset,e._eyeOffset)&&_.a.equals(this._scaleByDistance,e._scaleByDistance)&&_.a.equals(this._translucencyByDistance,e._translucencyByDistance)&&_.a.equals(this._pixelOffsetScaleByDistance,e._pixelOffsetScaleByDistance)&&p.default.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},x.prototype._destroy=function(){Object(f.default)(this._customData)&&(this._billboardCollection._scene.globe._surface.removeTileCustomData(this._customData),this._customData=void 0),Object(f.default)(this._removeCallbackFunc)&&(this._removeCallbackFunc(),this._removeCallbackFunc=void 0),this.image=void 0,this._pickId=this._pickId&&this._pickId.destroy(),this._billboardCollection=void 0},t.a=x},function(e,t,i){"use strict";t.a=Object.freeze({FAILED:0,UNLOADED:1,RECEIVING:2,RECEIVED:3,TRANSFORMING:4,TRANSFORMED:5,READY:6})},function(e,t,i){"use strict";var n=i(41),a=i(4),r=i(7),o=i(60),s=i(99),l=i(2),u=i(0),d=i(19),c=i(3),f=i(33),h=i(30),p=i(226),m=i(32),_=i(39),g=i(58),v=i(34),y=i(45),b=i(118),w=i(62),O=i(83),x=i(18),A=i(274);function T(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).fragmentShader,i=Object(l.default)(e.textureScale,1),o=Object(l.default)(e.pixelFormat,f.default.RGBA);if(a.a.typeOf.string("options.fragmentShader",t),a.a.typeOf.number.greaterThan("options.textureScale",i,0),a.a.typeOf.number.lessThanOrEquals("options.textureScale",i,1),!f.default.isColorFormat(o))throw new c.default("options.pixelFormat must be a color format.");this._fragmentShader=t,this._uniforms=e.uniforms,this._textureScale=i,this._forcePowerOfTwo=Object(l.default)(e.forcePowerOfTwo,!1),this._sampleMode=Object(l.default)(e.sampleMode,A.a.NEAREST),this._pixelFormat=o,this._pixelDatatype=Object(l.default)(e.pixelDatatype,m.default.UNSIGNED_BYTE),this._clearColor=Object(l.default)(e.clearColor,r.default.BLACK),this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._idTexture=void 0,this._actualUniforms={},this._dirtyUniforms=[],this._texturesToRelease=[],this._texturesToCreate=[],this._texturePromise=void 0;var d=new p.a;d.scissorTest={enabled:!0,rectangle:Object(u.default)(e.scissorRectangle)?n.a.clone(e.scissorRectangle):new n.a},this._passState=d,this._ready=!1;var h=e.name;Object(u.default)(h)||(h=Object(s.default)()),this._name=h,this._logDepthChanged=void 0,this._useLogDepth=void 0,this._selectedIdTexture=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0,this._textureCache=void 0,this._index=void 0,this.enabled=!0,this._enabled=!0}Object.defineProperties(T.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},fragmentShader:{get:function(){return this._fragmentShader}},uniforms:{get:function(){return this._uniforms}},textureScale:{get:function(){return this._textureScale}},forcePowerOfTwo:{get:function(){return this._forcePowerOfTwo}},sampleMode:{get:function(){return this._sampleMode}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},clearColor:{get:function(){return this._clearColor}},scissorRectangle:{get:function(){return this._passState.scissorTest.rectangle}},outputTexture:{get:function(){if(Object(u.default)(this._textureCache)){var e=this._textureCache.getFramebuffer(this._name);if(Object(u.default)(e))return e.getColorTexture(0)}}},selected:{get:function(){return this._selected},set:function(e){this._selected=e}},parentSelected:{get:function(){return this._parentSelected},set:function(e){this._parentSelected=e}}});var E=/uniform\s+sampler2D\s+depthTexture/g;function C(e,t,i){var n=t[i];return("string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData)&&e._dirtyUniforms.push(i),{get:function(){return t[i]},set:function(n){var a=t[i];t[i]=n;var r=e._actualUniforms,o=r[i];Object(u.default)(o)&&o!==a&&o instanceof y.default&&!Object(u.default)(e._textureCache.getStageByName(i))&&(e._texturesToRelease.push(o),delete r[i],delete r[i+"Dimensions"]),a instanceof y.default&&e._texturesToRelease.push(a),"string"==typeof n||n instanceof HTMLCanvasElement||n instanceof HTMLImageElement||n instanceof HTMLVideoElement||n instanceof ImageData?e._dirtyUniforms.push(i):r[i]=n}}}function S(e,t){return function(){var i=e._actualUniforms[t];return"function"==typeof i?i():i}}function M(e,t){return function(){var i=e[t]();if(Object(u.default)(i))return i.dimensions}}function D(e,t){return function(i){e._texturesToCreate.push({name:t,source:i})}}function P(e,t){return function(){return e._textureCache.getOutputTexture(t)}}function I(e){Object(u.default)(e._command)&&(e._command.shaderProgram=e._command.shaderProgram&&e._command.shaderProgram.destroy(),e._command=void 0),e._selectedIdTexture=e._selectedIdTexture&&e._selectedIdTexture.destroy();var t=e._textureCache;if(Object(u.default)(t)){var i=e._uniforms,n=e._actualUniforms;for(var a in n)n.hasOwnProperty(a)&&n[a]instanceof y.default&&(Object(u.default)(t.getStageByName(i[a]))||n[a].destroy(),e._dirtyUniforms.push(a))}}T.prototype._isSupported=function(e){return!E.test(this._fragmentShader)||e.depthTexture},T.prototype.update=function(e,t){if(this.enabled===this._enabled||this.enabled||I(this),this._enabled=this.enabled,this._enabled&&(this._logDepthChanged=t!==this._useLogDepth,this._useLogDepth=t,this._selectedDirty=function(e){var t=Object(u.default)(e._selected)?e._selected.length:0,i=Object(u.default)(e._parentSelected)?e._parentSelected:0,n=e._selected!==e._selectedShadow||t!==e._selectedLength;if(n=n||e._parentSelected!==e._parentSelectedShadow||i!==e._parentSelectedLength,Object(u.default)(e._selected)&&Object(u.default)(e._parentSelected)?e._combinedSelected=e._selected.concat(e._parentSelected):Object(u.default)(e._parentSelected)?e._combinedSelected=e._parentSelected:e._combinedSelected=e._selected,!n&&Object(u.default)(e._combinedSelected)){if(!Object(u.default)(e._combinedSelectedShadow))return!0;t=e._combinedSelected.length;for(var a=0;a0?(e._ready=!1,e._texturePromise=x.a.all(p).then((function(){e._ready=!0,e._texturePromise=void 0}))):e._ready=!0}}else e._ready=!0}(this,e),function(e,t){if(!Object(u.default)(e._command)||e._logDepthChanged||e._selectedDirty){var i=e._fragmentShader;if(Object(u.default)(e._selectedIdTexture))i="#define CZM_SELECTED_FEATURE \nuniform sampler2D czm_idTexture; \nuniform sampler2D czm_selectedIdTexture; \nuniform float czm_selectedIdTextureStep; \nvarying vec2 v_textureCoordinates; \nbool czm_selected(vec2 offset) \n{ \n bool selected = false;\n vec4 id = texture2D(czm_idTexture, v_textureCoordinates + offset); \n for (int i = 0; i < "+e._selectedIdTexture.width+"; ++i) \n { \n vec4 selectedId = texture2D(czm_selectedIdTexture, vec2((float(i) + 0.5) * czm_selectedIdTextureStep, 0.5)); \n if (all(equal(id, selectedId))) \n { \n return true; \n } \n } \n return false; \n} \n\nbool czm_selected() \n{ \n return czm_selected(vec2(0.0)); \n} \n\n"+(i=i.replace(/varying\s+vec2\s+v_textureCoordinates;/g,""));var n=new v.default({defines:[e._useLogDepth?"LOG_DEPTH":""],sources:[i]});e._command=t.createViewportQuadCommand(n,{uniformMap:e._uniformMap,owner:e})}}(this,e),function(e){var t,i;e._sampleMode===A.a.LINEAR?(t=w.default.LINEAR,i=b.default.LINEAR):(t=w.default.NEAREST,i=b.default.NEAREST);var n=e._sampler;Object(u.default)(n)&&n.minificationFilter===t&&n.magnificationFilter===i||(e._sampler=new g.default({wrapS:O.default.CLAMP_TO_EDGE,wrapT:O.default.CLAMP_TO_EDGE,minificationFilter:t,magnificationFilter:i}))}(this),this._selectedDirty=!1,this._ready)){var i=this._textureCache.getFramebuffer(this._name);if(this._command.framebuffer=i,Object(u.default)(i)){var a,s=i.getColorTexture(0);s.width===e.drawingBufferWidth&&s.height===e.drawingBufferHeight||(a=this._renderState,Object(u.default)(a)&&s.width===a.viewport.width&&s.height===a.viewport.height||(this._renderState=_.default.fromCache({viewport:new n.a(0,0,s.width,s.height)}))),this._command.renderState=a}}},T.prototype.execute=function(e,t,i,n){if(Object(u.default)(this._command)&&Object(u.default)(this._command.framebuffer)&&this._ready&&this._enabled){this._colorTexture=t,this._depthTexture=i,this._idTexture=n,g.default.equals(this._colorTexture.sampler,this._sampler)||(this._colorTexture.sampler=this._sampler);var a=this.scissorRectangle.width>0&&this.scissorRectangle.height>0?this._passState:void 0;Object(u.default)(a)&&(a.context=e),this._command.execute(e,a)}},T.prototype.isDestroyed=function(){return!1},T.prototype.destroy=function(){return I(this),Object(d.default)(this)},t.a=T},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(5).default.EPSILON10;t.a=function(e,t,i,s){if(n.a.defined("equalsEpsilon",t),Object(r.default)(e)){i=Object(a.default)(i,!1);var l,u=Object(r.default)(s),d=e.length;if(d<2)return e;var c,f,h=e[0],p=0,m=-1;for(l=1;l=0}},function(e,t,i){"use strict";var n=i(1),a=i(16),r=i(12),o=i(210),s={};function l(){this.baseColorTexture=void 0,this.metallicRoughnessTexture=void 0,this.baseColorFactor=a.a.clone(l.DEFAULT_BASE_COLOR_FACTOR),this.metallicFactor=l.DEFAULT_METALLIC_FACTOR,this.roughnessFactor=l.DEFAULT_ROUGHNESS_FACTOR}function u(){this.diffuseTexture=void 0,this.specularGlossinessTexture=void 0,this.diffuseFactor=a.a.clone(u.DEFAULT_DIFFUSE_FACTOR),this.specularFactor=n.default.clone(u.DEFAULT_SPECULAR_FACTOR),this.glossinessFactor=u.DEFAULT_GLOSSINESS_FACTOR}function d(){this.metallicRoughness=new l,this.specularGlossiness=void 0,this.emissiveTexture=void 0,this.normalTexture=void 0,this.occlusionTexture=void 0,this.emissiveFactor=n.default.clone(d.DEFAULT_EMISSIVE_FACTOR),this.alphaMode=o.a.OPAQUE,this.alphaCutoff=.5,this.doubleSided=!1,this.unlit=!1}l.DEFAULT_BASE_COLOR_FACTOR=a.a.ONE,l.DEFAULT_METALLIC_FACTOR=1,l.DEFAULT_ROUGHNESS_FACTOR=1,u.DEFAULT_DIFFUSE_FACTOR=a.a.ONE,u.DEFAULT_SPECULAR_FACTOR=n.default.ONE,u.DEFAULT_GLOSSINESS_FACTOR=1,d.DEFAULT_EMISSIVE_FACTOR=n.default.ZERO,s.Quantization=function(){this.octEncoded=!1,this.octEncodedZXY=!1,this.normalizationRange=void 0,this.quantizedVolumeOffset=void 0,this.quantizedVolumeDimensions=void 0,this.quantizedVolumeStepSize=void 0,this.componentDatatype=void 0,this.type=void 0},s.Attribute=function(){this.name=void 0,this.semantic=void 0,this.setIndex=void 0,this.componentDatatype=void 0,this.type=void 0,this.normalized=!1,this.count=void 0,this.min=void 0,this.max=void 0,this.constant=void 0,this.quantization=void 0,this.packedTypedArray=void 0,this.buffer=void 0,this.typedArray=void 0,this.byteOffset=0,this.byteStride=void 0},s.Indices=function(){this.indexDatatype=void 0,this.count=void 0,this.buffer=void 0,this.typedArray=void 0},s.FeatureIdAttribute=function(){this.propertyTableId=void 0,this.setIndex=void 0,this.offset=0,this.repeat=void 0},s.FeatureIdTexture=function(){this.propertyTableId=void 0,this.textureReader=void 0},s.MorphTarget=function(){this.attributes=[]},s.Primitive=function(){this.attributes=[],this.morphTargets=[],this.morphWeights=[],this.indices=void 0,this.material=void 0,this.primitiveType=void 0,this.featureIdAttributes=[],this.featureIdTextures=[],this.featureTextureIds=[]},s.Instances=function(){this.attributes=[],this.featureIdAttributes=[]},s.Skin=function(){this.joints=void 0,this.inverseBindMatrices=void 0},s.Node=function(){this.children=[],this.primitives=[],this.instances=void 0,this.skin=void 0,this.matrix=void 0,this.translation=void 0,this.rotation=void 0,this.scale=void 0},s.Scene=function(){this.nodes=[],this.upAxis=void 0,this.forwardAxis=void 0},s.Components=function(){this.scene=void 0,this.nodes=void 0,this.featureMetadata=void 0},s.TextureReader=function(){this.texture=void 0,this.texCoord=0,this.transform=r.default.clone(r.default.IDENTITY),this.channels=void 0},s.MetallicRoughness=l,s.SpecularGlossiness=u,s.Material=d,t.a=s},function(e,t,i){"use strict";t.a=Object.freeze({TICK_DEPENDENT:0,SYSTEM_CLOCK_MULTIPLIER:1,SYSTEM_CLOCK:2})},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(120),o=i(157);function s(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT);var t=Object(n.default)(e.throttleByServer,!1),i=Object(n.default)(e.throttle,!1);this.url=e.url,this.requestFunction=e.requestFunction,this.cancelFunction=e.cancelFunction,this.priorityFunction=e.priorityFunction,this.priority=Object(n.default)(e.priority,0),this.throttle=i,this.throttleByServer=t,this.type=Object(n.default)(e.type,o.a.OTHER),this.serverKey=void 0,this.state=r.a.UNISSUED,this.deferred=void 0,this.cancelled=!1}s.prototype.cancel=function(){this.cancelled=!0},s.prototype.clone=function(e){return Object(a.default)(e)?(e.url=this.url,e.requestFunction=this.requestFunction,e.cancelFunction=this.cancelFunction,e.priorityFunction=this.priorityFunction,e.priority=this.priority,e.throttle=this.throttle,e.throttleByServer=this.throttleByServer,e.type=this.type,e.serverKey=this.serverKey,e.state=this.RequestState.UNISSUED,e.deferred=void 0,e.cancelled=!1,e):new s(this)},t.default=s},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(4),a=i(0),r=i(19),o=i(3),s=i(23);function l(){}Object.defineProperties(l.prototype,{promise:{get:function(){o.default.throwInstantiationError()}},cacheKey:{get:function(){o.default.throwInstantiationError()}}}),l.prototype.load=function(){o.default.throwInstantiationError()},l.prototype.unload=function(){},l.prototype.process=function(e){},l.prototype.getError=function(e,t){return n.a.typeOf.string("errorMessage",e),Object(a.default)(t)&&(e+="\n"+t.message),new s.a(e)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this.unload(),Object(r.default)(this)}},function(e,t,i){"use strict";var n=i(1),a=i(16),r=i(207),o=i(2),s=i(0),l=i(3),u=i(5),d=i(6);function c(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),this.left=e.left,this._left=void 0,this.right=e.right,this._right=void 0,this.top=e.top,this._top=void 0,this.bottom=e.bottom,this._bottom=void 0,this.near=Object(o.default)(e.near,1),this._near=this.near,this.far=Object(o.default)(e.far,5e8),this._far=this.far,this._cullingVolume=new r.a,this._orthographicMatrix=new d.default}function f(e){if(!(Object(s.default)(e.right)&&Object(s.default)(e.left)&&Object(s.default)(e.top)&&Object(s.default)(e.bottom)&&Object(s.default)(e.near)&&Object(s.default)(e.far)))throw new l.default("right, left, top, bottom, near, or far parameters are not set.");if(e.top!==e._top||e.bottom!==e._bottom||e.left!==e._left||e.right!==e._right||e.near!==e._near||e.far!==e._far){if(e.left>e.right)throw new l.default("right must be greater than left.");if(e.bottom>e.top)throw new l.default("top must be greater than bottom.");if(e.near<=0||e.near>e.far)throw new l.default("near must be greater than zero and less than far.");e._left=e.left,e._right=e.right,e._top=e.top,e._bottom=e.bottom,e._near=e.near,e._far=e.far,e._orthographicMatrix=d.default.computeOrthographicOffCenter(e.left,e.right,e.bottom,e.top,e.near,e.far,e._orthographicMatrix)}}Object.defineProperties(c.prototype,{projectionMatrix:{get:function(){return f(this),this._orthographicMatrix}}});var h=new n.default,p=new n.default,m=new n.default,_=new n.default;c.prototype.computeCullingVolume=function(e,t,i){if(!Object(s.default)(e))throw new l.default("position is required.");if(!Object(s.default)(t))throw new l.default("direction is required.");if(!Object(s.default)(i))throw new l.default("up is required.");var r=this._cullingVolume.planes,o=this.top,u=this.bottom,d=this.right,c=this.left,f=this.near,g=this.far,v=n.default.cross(t,i,h);n.default.normalize(v,v);var y=p;n.default.multiplyByScalar(t,f,y),n.default.add(e,y,y);var b=m;n.default.multiplyByScalar(v,c,b),n.default.add(y,b,b);var w=r[0];return Object(s.default)(w)||(w=r[0]=new a.a),w.x=v.x,w.y=v.y,w.z=v.z,w.w=-n.default.dot(v,b),n.default.multiplyByScalar(v,d,b),n.default.add(y,b,b),w=r[1],Object(s.default)(w)||(w=r[1]=new a.a),w.x=-v.x,w.y=-v.y,w.z=-v.z,w.w=-n.default.dot(n.default.negate(v,_),b),n.default.multiplyByScalar(i,u,b),n.default.add(y,b,b),w=r[2],Object(s.default)(w)||(w=r[2]=new a.a),w.x=i.x,w.y=i.y,w.z=i.z,w.w=-n.default.dot(i,b),n.default.multiplyByScalar(i,o,b),n.default.add(y,b,b),w=r[3],Object(s.default)(w)||(w=r[3]=new a.a),w.x=-i.x,w.y=-i.y,w.z=-i.z,w.w=-n.default.dot(n.default.negate(i,_),b),w=r[4],Object(s.default)(w)||(w=r[4]=new a.a),w.x=t.x,w.y=t.y,w.z=t.z,w.w=-n.default.dot(t,y),n.default.multiplyByScalar(t,g,b),n.default.add(e,b,b),w=r[5],Object(s.default)(w)||(w=r[5]=new a.a),w.x=-t.x,w.y=-t.y,w.z=-t.z,w.w=-n.default.dot(n.default.negate(t,_),b),this._cullingVolume},c.prototype.getPixelDimensions=function(e,t,i,n,a){if(f(this),!Object(s.default)(e)||!Object(s.default)(t))throw new l.default("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new l.default("drawingBufferWidth must be greater than zero.");if(t<=0)throw new l.default("drawingBufferHeight must be greater than zero.");if(!Object(s.default)(i))throw new l.default("distance is required.");if(!Object(s.default)(n))throw new l.default("pixelRatio is required.");if(n<=0)throw new l.default("pixelRatio must be greater than zero.");if(!Object(s.default)(a))throw new l.default("A result object is required.");var r=n*(this.right-this.left)/e,o=n*(this.top-this.bottom)/t;return a.x=r,a.y=o,a},c.prototype.clone=function(e){return Object(s.default)(e)||(e=new c),e.left=this.left,e.right=this.right,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},c.prototype.equals=function(e){return Object(s.default)(e)&&e instanceof c&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},c.prototype.equalsEpsilon=function(e,t,i){return e===this||Object(s.default)(e)&&e instanceof c&&u.default.equalsEpsilon(this.right,e.right,t,i)&&u.default.equalsEpsilon(this.left,e.left,t,i)&&u.default.equalsEpsilon(this.top,e.top,t,i)&&u.default.equalsEpsilon(this.bottom,e.bottom,t,i)&&u.default.equalsEpsilon(this.near,e.near,t,i)&&u.default.equalsEpsilon(this.far,e.far,t,i)},t.a=c},function(e,t,i){"use strict";(function(e){i.d(t,"a",(function(){return n})),i.d(t,"b",(function(){return a}));var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};function a(e,t,i){return e(i={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&i.path)}},i.exports),i.exports}}).call(this,i(417))},function(e,t,i){"use strict";t.a=Object.freeze({UNLOADED:0,LOADING:1,PROCESSING:2,READY:3,EXPIRED:4,FAILED:5})},function(e,t,i){"use strict";var n=i(4);t.a=function(e,t,i){n.a.defined("array",e),n.a.defined("itemToFind",t),n.a.defined("comparator",i);for(var a,r,o=0,s=e.length-1;o<=s;)if((r=i(e[a=~~((o+s)/2)],t))<0)o=a+1;else{if(!(r>0))return a;s=a-1}return~(s+1)}},function(e,t,i){"use strict";var n,a=i(1),r=i(22),o=i(4),s=i(99),l=i(2),u=i(0),d=i(3),c=i(24),f=i(5),h=i(12),p=i(6),m=i(27),_=i(52),g=i(263),v=i(195),y=i(42),b=i(252),w=i(434),O=i(238),x=i(435),A=i(20),T=i(260),E=i(436),C=i(437),S=i(438),M=i(352),D=i(353),P=i(440),I=i(354),L=i(731),j=i(441),R=i(305),N=i(254),B=i(442),F=i(9),k=i(256),z=i(306),U=i(355),V=new r.default;function H(e){return new O.a(e)}function G(e,t){return Object(A.default)(e,void 0,(function(e){return e instanceof t?e:new t(e)}))}function Y(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).id;Object(u.default)(t)||(t=Object(s.default)()),this._availability=void 0,this._id=t,this._definitionChanged=new c.default,this._name=e.name,this._show=Object(l.default)(e.show,!0),this._parent=void 0,this._propertyNames=["billboard","box","corridor","cylinder","description","ellipse","ellipsoid","label","model","tileset","orientation","path","plane","point","polygon","polyline","polylineVolume","position","properties","rectangle","viewFrom","wall"],this._billboard=void 0,this._billboardSubscription=void 0,this._box=void 0,this._boxSubscription=void 0,this._corridor=void 0,this._corridorSubscription=void 0,this._cylinder=void 0,this._cylinderSubscription=void 0,this._description=void 0,this._descriptionSubscription=void 0,this._ellipse=void 0,this._ellipseSubscription=void 0,this._ellipsoid=void 0,this._ellipsoidSubscription=void 0,this._label=void 0,this._labelSubscription=void 0,this._model=void 0,this._modelSubscription=void 0,this._tileset=void 0,this._tilesetSubscription=void 0,this._orientation=void 0,this._orientationSubscription=void 0,this._path=void 0,this._pathSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._point=void 0,this._pointSubscription=void 0,this._polygon=void 0,this._polygonSubscription=void 0,this._polyline=void 0,this._polylineSubscription=void 0,this._polylineVolume=void 0,this._polylineVolumeSubscription=void 0,this._position=void 0,this._positionSubscription=void 0,this._properties=void 0,this._propertiesSubscription=void 0,this._rectangle=void 0,this._rectangleSubscription=void 0,this._viewFrom=void 0,this._viewFromSubscription=void 0,this._wall=void 0,this._wallSubscription=void 0,this._children=[],this.entityCollection=void 0,this.parent=e.parent,this.merge(e)}function W(e,t,i){for(var n=t.length,a=0;an[s-1])throw new o.default("time is out of range.");if(e>=n[t=Object(a.default)(t,0)]){if(t+1=0&&e>=n[t-1])return t-1;if(e>n[t])for(i=t;i=n[i]&&e=0&&!(e>=n[i]&&ei&&(e-=(Math.floor((e-i)/r)+1)*r),e},l.prototype.clampTime=function(e){n.a.typeOf.number("time",e);var t=this.times;return s.default.clamp(e,t[0],t[t.length-1])},t.a=l},function(e,t,i){"use strict";t.a=Object.freeze({NONE:-1,PARTIAL:0,FULL:1})},function(e,t,i){"use strict";i.r(t);var n=i(41),a=i(8),r=i(1),o=i(16),s=i(22),l=i(0),u=i(3),d=i(5),c=i(6),f=i(79),h=i(166),p=i(52),m=i(13),_={},g=new o.a(0,0,0,1),v=new o.a,y=new n.a,b=new a.default,w=new a.default;_.wgs84ToWindowCoordinates=function(e,t,i){return _.wgs84WithEyeOffsetToWindowCoordinates(e,t,r.default.ZERO,i)};var O=new o.a,x=new r.default;function A(e,t,i,n){var a=i.viewMatrix,s=c.default.multiplyByVector(a,o.a.fromElements(e.x,e.y,e.z,1,O),O),l=r.default.multiplyComponents(t,r.default.normalize(s,x),x);return s.x+=t.x+l.x,s.y+=t.y+l.y,s.z+=l.z,c.default.multiplyByVector(i.frustum.projectionMatrix,s,n)}var T=new s.default(Math.PI,d.default.PI_OVER_TWO),E=new r.default,C=new r.default;_.wgs84WithEyeOffsetToWindowCoordinates=function(e,t,i,n){if(!Object(l.default)(e))throw new u.default("scene is required.");if(!Object(l.default)(t))throw new u.default("position is required.");var o=e.frameState,s=_.computeActualWgs84Position(o,t,g);if(Object(l.default)(s)){var O=e.canvas,x=y;x.x=0,x.y=0,x.width=O.clientWidth,x.height=O.clientHeight;var S=e.camera,M=!1;if(o.mode===m.default.SCENE2D){var D=e.mapProjection,P=T,I=D.project(P,E),L=r.default.clone(S.position,C),j=S.frustum.clone(),R=c.default.computeViewportTransformation(x,0,1,new c.default),N=S.frustum.projectionMatrix,B=S.positionWC.y,F=r.default.fromElements(d.default.sign(B)*I.x-B,0,-S.positionWC.x),k=p.default.pointToGLWindowCoordinates(N,R,F);if(0===B||k.x<=0||k.x>=O.clientWidth)M=!0;else{if(k.x>.5*O.clientWidth){x.width=k.x,S.frustum.right=I.x-B,v=A(s,i,S,v),_.clipToGLWindowCoordinates(x,v,b),x.x+=k.x,S.position.x=-S.position.x;var z=S.frustum.right;S.frustum.right=-S.frustum.left,S.frustum.left=-z,v=A(s,i,S,v),_.clipToGLWindowCoordinates(x,v,w)}else{x.x+=k.x,x.width-=k.x,S.frustum.left=-I.x-B,v=A(s,i,S,v),_.clipToGLWindowCoordinates(x,v,b),x.x=x.x-x.width,S.position.x=-S.position.x;var U=S.frustum.left;S.frustum.left=-S.frustum.right,S.frustum.right=-U,v=A(s,i,S,v),_.clipToGLWindowCoordinates(x,v,w)}r.default.clone(L,S.position),S.frustum=j.clone(),((n=a.default.clone(b,n)).x<0||n.x>O.clientWidth)&&(n.x=w.x)}}if(o.mode!==m.default.SCENE2D||M){if((v=A(s,i,S,v)).z<0&&!(S.frustum instanceof f.a)&&!(S.frustum instanceof h.a))return;n=_.clipToGLWindowCoordinates(x,v,n)}return n.y=O.clientHeight-n.y,n}},_.wgs84ToDrawingBufferCoordinates=function(e,t,i){if(i=_.wgs84ToWindowCoordinates(e,t,i),Object(l.default)(i))return _.transformWindowToDrawingBuffer(e,i,i)};var S=new r.default,M=new s.default;_.computeActualWgs84Position=function(e,t,i){var n=e.mode;if(n===m.default.SCENE3D)return r.default.clone(t,i);var a=e.mapProjection,o=a.ellipsoid.cartesianToCartographic(t,M);if(Object(l.default)(o)){if(a.project(o,S),n===m.default.COLUMBUS_VIEW)return r.default.fromElements(S.z,S.x,S.y,i);if(n===m.default.SCENE2D)return r.default.fromElements(0,S.x,S.y,i);var s=e.morphTime;return r.default.fromElements(d.default.lerp(S.z,t.x,s),d.default.lerp(S.x,t.y,s),d.default.lerp(S.y,t.z,s),i)}};var D=new r.default,P=new r.default,I=new c.default;_.clipToGLWindowCoordinates=function(e,t,i){return r.default.divideByScalar(t,t.w,D),c.default.computeViewportTransformation(e,0,1,I),c.default.multiplyByPoint(I,D,P),a.default.fromCartesian3(P,i)},_.transformWindowToDrawingBuffer=function(e,t,i){var n=e.canvas,r=e.drawingBufferWidth/n.clientWidth,o=e.drawingBufferHeight/n.clientHeight;return a.default.fromElements(t.x*r,t.y*o,i)};var L=new o.a,j=new o.a;_.drawingBufferToWgs84Coordinates=function(e,t,i,n){var a=e.context.uniformState,s=a.currentFrustum,u=s.x,d=s.y;if(e.frameState.useLogDepth){var f=i*a.log2FarDepthFromNearPlusOne;i=d*(1-u/(Math.pow(2,f)-1+u))/(d-u)}var h,p=e.view.passState.viewport,m=o.a.clone(o.a.UNIT_W,L);m.x=(t.x-p.x)/p.width*2-1,m.y=(t.y-p.y)/p.height*2-1,m.z=2*i-1,m.w=1;var _=e.camera.frustum;if(Object(l.default)(_.fovy)){var g=1/(h=c.default.multiplyByVector(a.inverseViewProjection,m,j)).w;r.default.multiplyByScalar(h,g,h)}else Object(l.default)(_._offCenterFrustum)&&(_=_._offCenterFrustum),(h=j).x=.5*(m.x*(_.right-_.left)+_.left+_.right),h.y=.5*(m.y*(_.top-_.bottom)+_.bottom+_.top),h.z=.5*(m.z*(u-d)-u-d),h.w=1,h=c.default.multiplyByVector(a.inverseView,h,h);return r.default.fromCartesian4(h,n)},t.default=_},function(e,t,i){"use strict";var n=i(4),a=i(0),r=i(3),o={POSITION:"POSITION",NORMAL:"NORMAL",TANGENT:"TANGENT",TEXCOORD:"TEXCOORD",COLOR:"COLOR",JOINTS:"JOINTS",WEIGHTS:"WEIGHTS",FEATURE_ID:"FEATURE_ID"};o.hasSetIndex=function(e){switch(n.a.typeOf.string("semantic",e),e){case o.POSITION:case o.NORMAL:case o.TANGENT:return!1;case o.TEXCOORD:case o.COLOR:case o.JOINTS:case o.WEIGHTS:case o.FEATURE_ID:return!0;default:throw new r.default("semantic is not a valid value.")}},o.fromGltfSemantic=function(e){n.a.typeOf.string("gltfSemantic",e);var t=e,i=/^(\w+)_\d+$/.exec(e);switch(null!==i&&(t=i[1]),t){case"POSITION":return o.POSITION;case"NORMAL":return o.NORMAL;case"TANGENT":return o.TANGENT;case"TEXCOORD":return o.TEXCOORD;case"COLOR":return o.COLOR;case"JOINTS":return o.JOINTS;case"WEIGHTS":return o.WEIGHTS;case"_FEATURE_ID":case"FEATURE_ID":case"_BATCHID":case"BATCHID":return o.FEATURE_ID}},o.fromPntsSemantic=function(e){switch(n.a.typeOf.string("pntsSemantic",e),e){case"POSITION":case"POSITION_QUANTIZED":return o.POSITION;case"RGBA":case"RGB":case"RGB565":return o.COLOR;case"NORMAL":case"NORMAL_OCT16P":return o.NORMAL;case"BATCH_ID":return o.FEATURE_ID;default:throw new r.default("pntsSemantic is not a valid value.")}},o.getGlslType=function(e){switch(n.a.typeOf.string("semantic",e),e){case o.POSITION:case o.NORMAL:case o.TANGENT:return"vec3";case o.TEXCOORD:return"vec2";case o.COLOR:return"vec4";case o.JOINTS:return"ivec4";case o.WEIGHTS:return"vec4";case o.FEATURE_ID:return"int";default:throw new r.default("semantic is not a valid value.")}},o.getVariableName=function(e,t){n.a.typeOf.string("semantic",e);var i=function(e){switch(e){case o.POSITION:return"positionMC";case o.NORMAL:return"normalMC";case o.TANGENT:return"tangentMC";case o.TEXCOORD:return"texCoord";case o.COLOR:return"color";case o.JOINTS:return"joints";case o.WEIGHTS:return"weights";case o.FEATURE_ID:return"featureId";default:throw new r.default("semantic is not a valid value.")}}(e);return Object(a.default)(t)&&(i+="_"+t),i},t.a=Object.freeze(o)},function(e,t,i){"use strict";var n,a=i(0),r={requestFullscreen:void 0,exitFullscreen:void 0,fullscreenEnabled:void 0,fullscreenElement:void 0,fullscreenchange:void 0,fullscreenerror:void 0},o={};Object.defineProperties(o,{element:{get:function(){if(o.supportsFullscreen())return document[r.fullscreenElement]}},changeEventName:{get:function(){if(o.supportsFullscreen())return r.fullscreenchange}},errorEventName:{get:function(){if(o.supportsFullscreen())return r.fullscreenerror}},enabled:{get:function(){if(o.supportsFullscreen())return document[r.fullscreenEnabled]}},fullscreen:{get:function(){if(o.supportsFullscreen())return null!==o.element}}}),o.supportsFullscreen=function(){if(Object(a.default)(n))return n;n=!1;var e=document.body;if("function"==typeof e.requestFullscreen)return r.requestFullscreen="requestFullscreen",r.exitFullscreen="exitFullscreen",r.fullscreenEnabled="fullscreenEnabled",r.fullscreenElement="fullscreenElement",r.fullscreenchange="fullscreenchange",r.fullscreenerror="fullscreenerror",n=!0;for(var t,i=["webkit","moz","o","ms","khtml"],o=0,s=i.length;o0?new Array(a):void 0;for(n=0;n0){var j=0,R=I[0];w=w.filter((function(e,t){return!(A?t===R||0===t&&1===R:t+1===R)||(j++,R=I[j],!1)}))}var N=L.length;if(!(N<2||c<=0)){if(T===n.default.GEODESIC||T===n.default.RHUMB){var B,F;T===n.default.GEODESIC?(B=v.default.chordLength(E,C.maximumRadius),F=y.a.numberOfPoints):(B=E,F=y.a.numberOfPointsRhumbLine);var k=y.a.extractHeights(L,C);if(Object(d.default)(w)){var z=1;for(t=0;t=o&&(f=o-1);var h=(this._rectangleNortheastInMeters.y-c.y)/d|0;return h>=l&&(h=l-1),Object(r.default)(i)?(i.x=f,i.y=h,i):new n.default(f,h)}},t.a=u},function(e,t,i){"use strict";var n=i(10),a={CLOCKWISE:n.a.CW,COUNTER_CLOCKWISE:n.a.CCW,validate:function(e){return e===a.CLOCKWISE||e===a.COUNTER_CLOCKWISE}};t.a=Object.freeze(a)},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(38),o=i(5);function s(){a.default.throwInstantiationError()}Object.defineProperties(s.prototype,{errorEvent:{get:a.default.throwInstantiationError},credit:{get:a.default.throwInstantiationError},tilingScheme:{get:a.default.throwInstantiationError},ready:{get:a.default.throwInstantiationError},readyPromise:{get:a.default.throwInstantiationError},hasWaterMask:{get:a.default.throwInstantiationError},hasVertexNormals:{get:a.default.throwInstantiationError},availability:{get:a.default.throwInstantiationError}});var l=[];s.getRegularGridIndices=function(e,t){if(e*t>=o.default.FOUR_GIGABYTES)throw new a.default("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=l[e];Object(n.default)(i)||(l[e]=i=[]);var r=i[t];return Object(n.default)(r)||f(e,t,r=e*t=o.default.FOUR_GIGABYTES)throw new a.default("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=u[e];Object(n.default)(i)||(u[e]=i=[]);var r=i[t];if(!Object(n.default)(r)){var l=s.getRegularGridIndices(e,t),d=c(e,t),f=d.westIndicesSouthToNorth,h=d.southIndicesEastToWest,p=d.eastIndicesNorthToSouth,m=d.northIndicesWestToEast;r=i[t]={indices:l,westIndicesSouthToNorth:f,southIndicesEastToWest:h,eastIndicesNorthToSouth:p,northIndicesWestToEast:m}}return r};var d=[];function c(e,t){var i,n=new Array(t),a=new Array(e),r=new Array(t),o=new Array(e);for(i=0;i=o.default.FOUR_GIGABYTES)throw new a.default("The total number of vertices (width * height) must be less than 4,294,967,296.");var i=d[e];Object(n.default)(i)||(d[e]=i=[]);var l=i[t];if(!Object(n.default)(l)){var u=e*t,h=(e-1)*(t-1)*6,p=2*e+2*t,m=u+p,_=h+6*Math.max(0,p-4),g=c(e,t),v=g.westIndicesSouthToNorth,y=g.southIndicesEastToWest,b=g.eastIndicesNorthToSouth,w=g.northIndicesWestToEast,O=r.a.createTypedArray(m,_);f(e,t,O,0),s.addSkirtIndices(v,y,b,w,u,O,h),l=i[t]={indices:O,westIndicesSouthToNorth:v,southIndicesEastToWest:y,eastIndicesNorthToSouth:b,northIndicesWestToEast:w,indexCountWithoutSkirts:h}}return l},s.addSkirtIndices=function(e,t,i,n,a,r,o){var s=a;o=h(e,s,r,o),o=h(t,s+=e.length,r,o),o=h(i,s+=t.length,r,o),h(n,s+=i.length,r,o)},s.heightmapTerrainQuality=.25,s.getEstimatedLevelZeroGeometricErrorForAHeightmap=function(e,t,i){return 2*e.maximumRadius*Math.PI*s.heightmapTerrainQuality/(t*i)},s.prototype.requestTileGeometry=a.default.throwInstantiationError,s.prototype.getLevelMaximumGeometricError=a.default.throwInstantiationError,s.prototype.getTileDataAvailable=a.default.throwInstantiationError,s.prototype.loadTileDataAvailability=a.default.throwInstantiationError,t.a=s},function(e,t,i){"use strict";i.r(t);var n=i(169),a=i(2),r=i(0),o=i(3),s=i(24),l=i(340),u=i(370),d=i(40),c=i(14),f=i(76);function h(e,t){return c.default.compare(e.start,t.start)}function p(e){if(this._intervals=[],this._changedEvent=new s.default,Object(r.default)(e))for(var t=e.length,i=0;i0&&(this._intervals.length=0,this._changedEvent.raiseEvent(this))},p.prototype.findIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t]:void 0},p.prototype.findDataForIntervalContainingDate=function(e){var t=this.indexOf(e);return t>=0?this._intervals[t].data:void 0},p.prototype.contains=function(e){return this.indexOf(e)>=0};var m=new f.default;p.prototype.indexOf=function(e){if(!Object(r.default)(e))throw new o.default("date is required");var t=this._intervals;m.start=e,m.stop=e;var i=Object(n.a)(t,m,h);return i>=0?t[i].isStartIncluded?i:i>0&&t[i-1].stop.equals(e)&&t[i-1].isStopIncluded?i-1:~i:(i=~i)>0&&i-10&&e.isStartIncluded&&i[s-1].isStartIncluded&&i[s-1].start.equals(e.start)?--s:s0&&((a=c.default.compare(i[s-1].stop,e.start))>0||0===a&&(i[s-1].isStopIncluded||e.isStartIncluded))&&((Object(r.default)(t)?t(i[s-1].data,e.data):i[s-1].data===e.data)?(e=c.default.greaterThan(e.stop,i[s-1].stop)?new f.default({start:i[s-1].start,stop:e.stop,isStartIncluded:i[s-1].isStartIncluded,isStopIncluded:e.isStopIncluded,data:e.data}):new f.default({start:i[s-1].start,stop:i[s-1].stop,isStartIncluded:i[s-1].isStartIncluded,isStopIncluded:i[s-1].isStopIncluded||e.stop.equals(i[s-1].stop)&&e.isStopIncluded,data:e.data}),i.splice(s-1,1),--s):(((a=c.default.compare(i[s-1].stop,e.stop))>0||0===a&&i[s-1].isStopIncluded&&!e.isStopIncluded)&&i.splice(s,0,new f.default({start:e.stop,stop:i[s-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[s-1].isStopIncluded,data:i[s-1].data})),i[s-1]=new f.default({start:i[s-1].start,stop:e.start,isStartIncluded:i[s-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:i[s-1].data})));s0||0===a&&(e.isStopIncluded||i[s].isStartIncluded));)if(Object(r.default)(t)?t(i[s].data,e.data):i[s].data===e.data)e=new f.default({start:e.start,stop:c.default.greaterThan(i[s].stop,e.stop)?i[s].stop:e.stop,isStartIncluded:e.isStartIncluded,isStopIncluded:c.default.greaterThan(i[s].stop,e.stop)?i[s].isStopIncluded:e.isStopIncluded,data:e.data}),i.splice(s,1);else{if(i[s]=new f.default({start:e.stop,stop:i[s].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:i[s].isStopIncluded,data:i[s].data}),!i[s].isEmpty)break;i.splice(s,1)}i.splice(s,0,e),this._changedEvent.raiseEvent(this)}},p.prototype.removeInterval=function(e){if(!Object(r.default)(e))throw new o.default("interval is required");if(e.isEmpty)return!1;var t=this._intervals,i=Object(n.a)(t,e,h);i<0&&(i=~i);var a=!1;for(i>0&&(c.default.greaterThan(t[i-1].stop,e.start)||t[i-1].stop.equals(e.start)&&t[i-1].isStopIncluded&&e.isStartIncluded)&&(a=!0,(c.default.greaterThan(t[i-1].stop,e.stop)||t[i-1].isStopIncluded&&!e.isStopIncluded&&t[i-1].stop.equals(e.stop))&&t.splice(i,0,new f.default({start:e.stop,stop:t[i-1].stop,isStartIncluded:!e.isStopIncluded,isStopIncluded:t[i-1].isStopIncluded,data:t[i-1].data})),t[i-1]=new f.default({start:t[i-1].start,stop:e.start,isStartIncluded:t[i-1].isStartIncluded,isStopIncluded:!e.isStartIncluded,data:t[i-1].data})),i=1e3&&(a+=Math.floor(n/1e3),n%=1e3),a>=60&&(o+=Math.floor(a/60),a%=60),o>=60&&(s+=Math.floor(o/60),o%=60),s>=24&&(l+=Math.floor(s/24),s%=24),g[2]=Object(u.a)(f)?29:28;l>g[d]||d>=13;)l>g[d]&&(l-=g[d],++d),d>=13&&(--d,f+=Math.floor(d/12),d%=12,++d),g[2]=Object(u.a)(f)?29:28;return _.millisecond=n,_.second=a,_.minute=o,_.hour=s,_.day=l,_.month=d,_.year=f,c.default.fromGregorianDate(_,i)}var y=new c.default,b=/P(?:([\d.,]+)Y)?(?:([\d.,]+)M)?(?:([\d.,]+)W)?(?:([\d.,]+)D)?(?:T(?:([\d.,]+)H)?(?:([\d.,]+)M)?(?:([\d.,]+)S)?)?/;function w(e,t){if(!Object(r.default)(e)||0===e.length)return!1;if(t.year=0,t.month=0,t.day=0,t.hour=0,t.minute=0,t.second=0,t.millisecond=0,"P"===e[0]){var i=e.match(b);if(!Object(r.default)(i))return!1;if(Object(r.default)(i[1])&&(t.year=Number(i[1].replace(",","."))),Object(r.default)(i[2])&&(t.month=Number(i[2].replace(",","."))),Object(r.default)(i[3])&&(t.day=7*Number(i[3].replace(",","."))),Object(r.default)(i[4])&&(t.day+=Number(i[4].replace(",","."))),Object(r.default)(i[5])&&(t.hour=Number(i[5].replace(",","."))),Object(r.default)(i[6])&&(t.minute=Number(i[6].replace(",","."))),Object(r.default)(i[7])){var n=Number(i[7].replace(",","."));t.second=Math.floor(n),t.millisecond=n%1*1e3}}else"Z"!==e[e.length-1]&&(e+="Z"),c.default.toGregorianDate(c.default.fromIso8601(e,y),t);return t.year||t.month||t.day||t.hour||t.minute||t.second||t.millisecond}var O=new l.a;p.fromIso8601=function(e,t){if(!Object(r.default)(e))throw new o.default("options is required.");if(!Object(r.default)(e.iso8601))throw new o.default("options.iso8601 is required.");var i=e.iso8601.split("/"),n=c.default.fromIso8601(i[0]),a=c.default.fromIso8601(i[1]),s=[];if(w(i[2],O)){var l=c.default.clone(n);for(s.push(l);c.default.compare(l,a)<0;){l=v(l,O),c.default.compare(a,l)<=0&&c.default.clone(a,l),s.push(l)}}else s.push(n,a);return p.fromJulianDateArray({julianDates:s,isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},p.fromIso8601DateArray=function(e,t){if(!Object(r.default)(e))throw new o.default("options is required.");if(!Object(r.default)(e.iso8601Dates))throw new o.default("options.iso8601Dates is required.");return p.fromJulianDateArray({julianDates:e.iso8601Dates.map((function(e){return c.default.fromIso8601(e)})),isStartIncluded:e.isStartIncluded,isStopIncluded:e.isStopIncluded,leadingInterval:e.leadingInterval,trailingInterval:e.trailingInterval,dataCallback:e.dataCallback},t)},p.fromIso8601DurationArray=function(e,t){if(!Object(r.default)(e))throw new o.default("options is required.");if(!Object(r.default)(e.epoch))throw new o.default("options.epoch is required.");if(!Object(r.default)(e.iso8601Durations))throw new o.default("options.iso8601Durations is required.");for(var i,n,s=e.epoch,l=e.iso8601Durations,u=Object(a.default)(e.relativeToPrevious,!1),d=[],c=l.length,f=0;fthis._primitives.length)throw new s.default("index must be less than or equal to the number of primitives.")}var n=e._external=e._external||{};return(n._composites=n._composites||{})[this._guid]={collection:this},i?this._primitives.splice(t,0,e):this._primitives.push(e),e},l.prototype.remove=function(e){if(this.contains(e)){var t=this._primitives.indexOf(e);if(-1!==t)return this._primitives.splice(t,1),delete e._external._composites[this._guid],this.destroyPrimitives&&e.destroy(),!0}return!1},l.prototype.removeAndDestroy=function(e){var t=this.remove(e);return t&&!this.destroyPrimitives&&e.destroy(),t},l.prototype.removeAll=function(){for(var e=this._primitives,t=e.length,i=0;i0)return t.byteStride}return a.default.getSizeInBytes(t.componentType)*Object(n.a)(t.type)}},function(e,t,i){"use strict";t.a=function(e){switch(e){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}}},function(e,t,i){"use strict";i.r(t);var n=i(5),a={HIGHLIGHT:0,REPLACE:1,MIX:2,getColorBlend:function(e,t){return e===a.HIGHLIGHT?0:e===a.REPLACE?1:e===a.MIX?n.default.clamp(t,n.default.EPSILON4,1):void 0}};t.default=Object.freeze(a)},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({UNBOUNDED:0,CLAMPED:1,LOOP_STOP:2})},function(e,t,i){"use strict";i.r(t);var n=i(116),a=i(17),r=i(1),o=i(22),s=i(4),l=i(2),u=i(0),d=i(19),c=i(3),f=i(43),h=i(123),p=i(21),m=i(242),_=i(503),g=i(97),v=i(61),y=i(13),b=i(271),w=i(18),O={u_globeMinimumAltitude:function(){return 55e3}};function x(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).appearance,i=e.geometryInstances;if(!Object(u.default)(t)&&Object(u.default)(i))for(var a=Array.isArray(i)?i:[i],r=a.length,o=0;o0&&(U=!0,F+=P-1),M0&&l!==N-1&&0!==d&&d!==B-1&&(q[ue]=!0),ue++;for(L=0,l=1;l=Te&&lm?l.default.TWO_PI-_+m:m-_)/((u=Math.ceil(p/t)+1)-1),h=T/((c=Math.ceil(T/t)+1)-1);var E=d.default.northwest(e,r),C=d.default.center(e,g);0===i&&0===n||(C.longitudel.default.PI_OVER_TWO||O<-l.default.PI_OVER_TWO||O>l.default.PI_OVER_TWO)throw new o.default("Rotated rectangle is invalid. It crosses over either the north or south pole.");P.granYCos=I.granYCos,P.granYSin=I.granYSin,P.granXCos=I.granXCos,P.granXSin=I.granXSin,D.north=w,D.south=O,D.east=m,D.west=_}if(0!==n){i-=n;var L=d.default.northwest(D,s),j=b(L,i,f,h,0,u,c);P.stGranYCos=j.granYCos,P.stGranXCos=j.granXCos,P.stGranYSin=j.granYSin,P.stGranXSin=j.granXSin,P.stNwCorner=L,P.stWest=j.west,P.stSouth=j.south}return P},t.a=p},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(3),o=i(5);function s(e,t,i){this.heading=Object(n.default)(e,0),this.pitch=Object(n.default)(t,0),this.roll=Object(n.default)(i,0)}s.fromQuaternion=function(e,t){if(!Object(a.default)(e))throw new r.default("quaternion is required");Object(a.default)(t)||(t=new s);var i=2*(e.w*e.y-e.z*e.x),n=1-2*(e.x*e.x+e.y*e.y),l=2*(e.w*e.x+e.y*e.z),u=1-2*(e.y*e.y+e.z*e.z),d=2*(e.w*e.z+e.x*e.y);return t.heading=-Math.atan2(d,u),t.roll=Math.atan2(l,n),t.pitch=-o.default.asinClamped(i),t},s.fromDegrees=function(e,t,i,n){if(!Object(a.default)(e))throw new r.default("heading is required");if(!Object(a.default)(t))throw new r.default("pitch is required");if(!Object(a.default)(i))throw new r.default("roll is required");return Object(a.default)(n)||(n=new s),n.heading=e*o.default.RADIANS_PER_DEGREE,n.pitch=t*o.default.RADIANS_PER_DEGREE,n.roll=i*o.default.RADIANS_PER_DEGREE,n},s.clone=function(e,t){if(Object(a.default)(e))return Object(a.default)(t)?(t.heading=e.heading,t.pitch=e.pitch,t.roll=e.roll,t):new s(e.heading,e.pitch,e.roll)},s.equals=function(e,t){return e===t||Object(a.default)(e)&&Object(a.default)(t)&&e.heading===t.heading&&e.pitch===t.pitch&&e.roll===t.roll},s.equalsEpsilon=function(e,t,i,n){return e===t||Object(a.default)(e)&&Object(a.default)(t)&&o.default.equalsEpsilon(e.heading,t.heading,i,n)&&o.default.equalsEpsilon(e.pitch,t.pitch,i,n)&&o.default.equalsEpsilon(e.roll,t.roll,i,n)},s.prototype.clone=function(e){return s.clone(this,e)},s.prototype.equals=function(e){return s.equals(this,e)},s.prototype.equalsEpsilon=function(e,t,i){return s.equalsEpsilon(this,e,t,i)},s.prototype.toString=function(){return"("+this.heading+", "+this.pitch+", "+this.roll+")"},t.default=s},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({SHIFT:0,CTRL:1,ALT:2})},function(e,t,i){"use strict";t.a=Object.freeze({START:0,LOADING:1,DONE:2,FAILED:3})},function(e,t,i){"use strict";t.a=Object.freeze({FONT_SIZE:48,PADDING:10,RADIUS:8,CUTOFF:.25})},function(e,t,i){"use strict";t.a=Object.freeze({NONE:0,BITS12:1})},function(e,t,i){"use strict";var n=i(41),a=i(8),r=i(1),o=i(16),s=i(7),l=i(2),u=i(0),d=i(3),c=i(49),f=i(6),h=i(65),p=i(13),m=i(177);function _(e,t){if(e=Object(l.default)(e,l.default.EMPTY_OBJECT),Object(u.default)(e.disableDepthTestDistance)&&e.disableDepthTestDistance<0)throw new d.default("disableDepthTestDistance must be greater than or equal to 0.0.");var i=e.translucencyByDistance,n=e.scaleByDistance,a=e.distanceDisplayCondition;if(Object(u.default)(i)){if(i.far<=i.near)throw new d.default("translucencyByDistance.far must be greater than translucencyByDistance.near.");i=h.a.clone(i)}if(Object(u.default)(n)){if(n.far<=n.near)throw new d.default("scaleByDistance.far must be greater than scaleByDistance.near.");n=h.a.clone(n)}if(Object(u.default)(a)){if(a.far<=a.near)throw new d.default("distanceDisplayCondition.far must be greater than distanceDisplayCondition.near.");a=c.default.clone(a)}this._show=Object(l.default)(e.show,!0),this._position=r.default.clone(Object(l.default)(e.position,r.default.ZERO)),this._actualPosition=r.default.clone(this._position),this._color=s.default.clone(Object(l.default)(e.color,s.default.WHITE)),this._outlineColor=s.default.clone(Object(l.default)(e.outlineColor,s.default.TRANSPARENT)),this._outlineWidth=Object(l.default)(e.outlineWidth,0),this._pixelSize=Object(l.default)(e.pixelSize,10),this._scaleByDistance=n,this._translucencyByDistance=i,this._distanceDisplayCondition=a,this._disableDepthTestDistance=Object(l.default)(e.disableDepthTestDistance,0),this._id=e.id,this._collection=Object(l.default)(e.collection,t),this._clusterShow=!0,this._pickId=void 0,this._pointPrimitiveCollection=t,this._dirty=!1,this._index=-1}var g=_.SHOW_INDEX=0,v=_.POSITION_INDEX=1,y=_.COLOR_INDEX=2,b=_.OUTLINE_COLOR_INDEX=3,w=_.OUTLINE_WIDTH_INDEX=4,O=_.PIXEL_SIZE_INDEX=5,x=_.SCALE_BY_DISTANCE_INDEX=6,A=_.TRANSLUCENCY_BY_DISTANCE_INDEX=7,T=_.DISTANCE_DISPLAY_CONDITION_INDEX=8,E=_.DISABLE_DEPTH_DISTANCE_INDEX=9;function C(e,t){var i=e._pointPrimitiveCollection;Object(u.default)(i)&&(i._updatePointPrimitive(e,t),e._dirty=!0)}_.NUMBER_OF_PROPERTIES=10,Object.defineProperties(_.prototype,{show:{get:function(){return this._show},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");this._show!==e&&(this._show=e,C(this,g))}},position:{get:function(){return this._position},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");var t=this._position;r.default.equals(t,e)||(r.default.clone(e,t),r.default.clone(e,this._actualPosition),C(this,v))}},scaleByDistance:{get:function(){return this._scaleByDistance},set:function(e){if(Object(u.default)(e)&&e.far<=e.near)throw new d.default("far distance must be greater than near distance.");var t=this._scaleByDistance;h.a.equals(t,e)||(this._scaleByDistance=h.a.clone(e,t),C(this,x))}},translucencyByDistance:{get:function(){return this._translucencyByDistance},set:function(e){if(Object(u.default)(e)&&e.far<=e.near)throw new d.default("far distance must be greater than near distance.");var t=this._translucencyByDistance;h.a.equals(t,e)||(this._translucencyByDistance=h.a.clone(e,t),C(this,A))}},pixelSize:{get:function(){return this._pixelSize},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");this._pixelSize!==e&&(this._pixelSize=e,C(this,O))}},color:{get:function(){return this._color},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");var t=this._color;s.default.equals(t,e)||(s.default.clone(e,t),C(this,y))}},outlineColor:{get:function(){return this._outlineColor},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");var t=this._outlineColor;s.default.equals(t,e)||(s.default.clone(e,t),C(this,b))}},outlineWidth:{get:function(){return this._outlineWidth},set:function(e){if(!Object(u.default)(e))throw new d.default("value is required.");this._outlineWidth!==e&&(this._outlineWidth=e,C(this,w))}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(Object(u.default)(e)&&e.far<=e.near)throw new d.default("far must be greater than near");c.default.equals(this._distanceDisplayCondition,e)||(this._distanceDisplayCondition=c.default.clone(e,this._distanceDisplayCondition),C(this,T))}},disableDepthTestDistance:{get:function(){return this._disableDepthTestDistance},set:function(e){if(this._disableDepthTestDistance!==e){if(!Object(u.default)(e)||e<0)throw new d.default("disableDepthTestDistance must be greater than or equal to 0.0.");this._disableDepthTestDistance=e,C(this,E)}}},id:{get:function(){return this._id},set:function(e){this._id=e,Object(u.default)(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},clusterShow:{get:function(){return this._clusterShow},set:function(e){this._clusterShow!==e&&(this._clusterShow=e,C(this,g))}}}),_.prototype.getPickId=function(e){return Object(u.default)(this._pickId)||(this._pickId=e.createPickId({primitive:this,collection:this._collection,id:this._id})),this._pickId},_.prototype._getActualPosition=function(){return this._actualPosition},_.prototype._setActualPosition=function(e){r.default.clone(e,this._actualPosition),C(this,v)};var S=new o.a;_._computeActualPosition=function(e,t,i){return t.mode===p.default.SCENE3D?e:(f.default.multiplyByPoint(i,e,S),m.default.computeActualWgs84Position(t,S))};var M=new o.a;_._computeScreenSpacePosition=function(e,t,i,n){var a=f.default.multiplyByVector(e,o.a.fromElements(t.x,t.y,t.z,1,M),M);return m.default.wgs84ToWindowCoordinates(i,a,n)},_.prototype.computeScreenSpacePosition=function(e,t){var i=this._pointPrimitiveCollection;if(Object(u.default)(t)||(t=new a.default),!Object(u.default)(i))throw new d.default("PointPrimitive must be in a collection.");if(!Object(u.default)(e))throw new d.default("scene is required.");var n=i.modelMatrix,r=_._computeScreenSpacePosition(n,this._actualPosition,e,t);if(Object(u.default)(r))return r.y=e.canvas.clientHeight-r.y,r},_.getScreenSpaceBoundingBox=function(e,t,i){var a=e.pixelSize,r=.5*a,o=t.x-r,s=t.y-r,l=a,d=a;return Object(u.default)(i)||(i=new n.a),i.x=o,i.y=s,i.width=l,i.height=d,i},_.prototype.equals=function(e){return this===e||Object(u.default)(e)&&this._id===e._id&&r.default.equals(this._position,e._position)&&s.default.equals(this._color,e._color)&&this._pixelSize===e._pixelSize&&this._outlineWidth===e._outlineWidth&&this._show===e._show&&s.default.equals(this._outlineColor,e._outlineColor)&&h.a.equals(this._scaleByDistance,e._scaleByDistance)&&h.a.equals(this._translucencyByDistance,e._translucencyByDistance)&&c.default.equals(this._distanceDisplayCondition,e._distanceDisplayCondition)&&this._disableDepthTestDistance===e._disableDepthTestDistance},_.prototype._destroy=function(){this._pickId=this._pickId&&this._pickId.destroy(),this._pointPrimitiveCollection=void 0},t.a=_},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i0){i=new Array(t);for(var a=0;a0&&(!Object(o.default)(i)||i.length!==n))throw new s.default("derivatives length must be equal to the number of derivatives.");this._property.addSample(e,t,i)},h.prototype.addSamples=function(e,t,i){this._property.addSamples(e,t,i)},h.prototype.addSamplesPackedArray=function(e,t){this._property.addSamplesPackedArray(e,t)},h.prototype.removeSample=function(e){return this._property.removeSample(e)},h.prototype.removeSamples=function(e){this._property.removeSamples(e)},h.prototype.equals=function(e){return this===e||e instanceof h&&c.default.equals(this._property,e._property)&&this._referenceFrame===e._referenceFrame},t.default=h},function(e,t,i){"use strict";t.a=Object.freeze({NONE:0,REPEAT:1,MIRRORED_REPEAT:2})},function(e,t,i){"use strict";t.a=Object.freeze({OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"})},function(e,t,i){"use strict";var n=i(3);function a(){n.default.throwInstantiationError()}Object.defineProperties(a.prototype,{name:{get:n.default.throwInstantiationError},clock:{get:n.default.throwInstantiationError},entities:{get:n.default.throwInstantiationError},isLoading:{get:n.default.throwInstantiationError},changedEvent:{get:n.default.throwInstantiationError},errorEvent:{get:n.default.throwInstantiationError},loadingEvent:{get:n.default.throwInstantiationError},show:{get:n.default.throwInstantiationError},clustering:{get:n.default.throwInstantiationError}}),a.prototype.update=function(e){n.default.throwInstantiationError()},a.setLoading=function(e,t){e._isLoading!==t&&(t?e._entityCollection.suspendEvents():e._entityCollection.resumeEvents(),e._isLoading=t,e._loading.raiseEvent(e,t))},t.a=a},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(98),l=i(232),u=i(9);function d(e){this._referenceFrame=Object(n.default)(e,s.default.FIXED),this._definitionChanged=new o.default,this._composite=new l.a,this._composite.definitionChanged.addEventListener(d.prototype._raiseDefinitionChanged,this)}Object.defineProperties(d.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite.intervals}},referenceFrame:{get:function(){return this._referenceFrame},set:function(e){this._referenceFrame=e}}}),d.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,s.default.FIXED,t)},d.prototype.getValueInReferenceFrame=function(e,t,i){if(!Object(a.default)(e))throw new r.default("time is required.");if(!Object(a.default)(t))throw new r.default("referenceFrame is required.");var n=this._composite._intervals.findDataForIntervalContainingDate(e);if(Object(a.default)(n))return n.getValueInReferenceFrame(e,t,i)},d.prototype.equals=function(e){return this===e||e instanceof d&&this._referenceFrame===e._referenceFrame&&this._composite.equals(e._composite,u.default.equals)},d.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},t.a=d},function(e,t,i){"use strict";var n=i(18),a=i(17),r=i(1),o=i(4),s=i(2),l=i(0),u=i(3),d=i(125),c=i(341),f=i(506),h=i(5),p=i(123),m=i(21),_=i(126),g=i(315),v=i(225),y=i(283),b=i(188);function w(e){if(!Object(l.default)(e)||!Object(l.default)(e.buffer))throw new u.default("options.buffer is required.");if(!Object(l.default)(e.width))throw new u.default("options.width is required.");if(!Object(l.default)(e.height))throw new u.default("options.height is required.");this._buffer=e.buffer,this._width=e.width,this._height=e.height,this._childTileMask=Object(s.default)(e.childTileMask,15),this._encoding=Object(s.default)(e.encoding,c.a.NONE);var t=f.a.DEFAULT_STRUCTURE,i=e.structure;Object(l.default)(i)?i!==t&&(i.heightScale=Object(s.default)(i.heightScale,t.heightScale),i.heightOffset=Object(s.default)(i.heightOffset,t.heightOffset),i.elementsPerHeight=Object(s.default)(i.elementsPerHeight,t.elementsPerHeight),i.stride=Object(s.default)(i.stride,t.stride),i.elementMultiplier=Object(s.default)(i.elementMultiplier,t.elementMultiplier),i.isBigEndian=Object(s.default)(i.isBigEndian,t.isBigEndian)):i=t,this._structure=i,this._createdByUpsampling=Object(s.default)(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._skirtHeight=void 0,this._bufferType=this._encoding===c.a.LERC?Float32Array:this._buffer.constructor,this._mesh=void 0}Object.defineProperties(w.prototype,{credits:{get:function(){}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}}});var O=new _.a("createVerticesFromHeightmap"),x=new _.a("createVerticesFromHeightmap",g.a.maximumAsynchronousTasks);function A(e,t,i,n,a,r,o,s,l){var u=(s-a.west)*(r-1)/(a.east-a.west),d=(l-a.south)*(o-1)/(a.north-a.south),c=0|u,f=c+1;f>=r&&(f=r-1,c=r-2);var h=0|d,p=h+1;p>=o&&(p=o-1,h=o-2);var m=d-h;return h=o-1-h,p=o-1-p,T(u-c,m,(t.decodeHeight(e,h*r+c)-i)/n,(t.decodeHeight(e,h*r+f)-i)/n,(t.decodeHeight(e,p*r+c)-i)/n,(t.decodeHeight(e,p*r+f)-i)/n)}function T(e,t,i,n,a,r){return t=0;--o)s=s*i+e[r+o];return s}function C(e,t,i,n,a,r,o,s){var l;if(o*=a,r)for(l=0;l0;--l)e[o+l]=s/n|0,s-=e[o+l]*n,n/=i;e[o+l]=s}w.prototype.createMesh=function(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),o.a.typeOf.object("options.tilingScheme",e.tilingScheme),o.a.typeOf.number("options.x",e.x),o.a.typeOf.number("options.y",e.y),o.a.typeOf.number("options.level",e.level);var t=e.tilingScheme,i=e.x,u=e.y,c=e.level,f=Object(s.default)(e.exaggeration,1),h=Object(s.default)(e.exaggerationRelativeHeight,0),_=Object(s.default)(e.throttle,!0),g=t.ellipsoid,w=t.tileXYToNativeRectangle(i,u,c),A=t.tileXYToRectangle(i,u,c),T=g.cartographicToCartesian(m.default.center(A)),E=this._structure,C=b.a.getEstimatedLevelZeroGeometricErrorForAHeightmap(g,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?b.a.getRegularGridAndSkirtIndicesAndEdgeIndices(e.gridWidth,e.gridHeight):b.a.getRegularGridIndicesAndEdgeIndices(e.gridWidth,e.gridHeight);var i=e.gridWidth*e.gridHeight;return M._mesh=new y.a(T,new Float32Array(e.vertices),t.indices,t.indexCountWithoutSkirts,i,e.minimumHeight,e.maximumHeight,a.default.clone(e.boundingSphere3D),r.default.clone(e.occludeePointInScaledSpace),e.numberOfAttributes,p.a.clone(e.orientedBoundingBox),v.a.clone(e.encoding),t.westIndicesSouthToNorth,t.southIndicesEastToWest,t.eastIndicesNorthToSouth,t.northIndicesWestToEast),M._buffer=void 0,M._mesh}))}},w.prototype._createMeshSync=function(e){o.a.typeOf.object("options.tilingScheme",e.tilingScheme),o.a.typeOf.number("options.x",e.x),o.a.typeOf.number("options.y",e.y),o.a.typeOf.number("options.level",e.level);var t=e.tilingScheme,i=e.x,n=e.y,a=e.level,r=Object(s.default)(e.exaggeration,1),l=Object(s.default)(e.exaggerationRelativeHeight,0),u=t.ellipsoid,c=t.tileXYToNativeRectangle(i,n,a),h=t.tileXYToRectangle(i,n,a),p=u.cartographicToCartesian(m.default.center(h)),_=this._structure,g=b.a.getEstimatedLevelZeroGeometricErrorForAHeightmap(u,this._width,t.getNumberOfXTilesAtLevel(0))/(1<0?b.a.getRegularGridAndSkirtIndicesAndEdgeIndices(this._width,this._height):b.a.getRegularGridIndicesAndEdgeIndices(this._width,this._height);var O=w.gridWidth*w.gridHeight;return this._mesh=new y.a(p,w.vertices,v.indices,v.indexCountWithoutSkirts,O,w.minimumHeight,w.maximumHeight,w.boundingSphere3D,w.occludeePointInScaledSpace,w.encoding.stride,w.orientedBoundingBox,w.encoding,v.westIndicesSouthToNorth,v.southIndicesEastToWest,v.eastIndicesNorthToSouth,v.northIndicesWestToEast),this._mesh},w.prototype.interpolateHeight=function(e,t,i){var n=this._width,a=this._height,r=this._structure,o=r.stride,s=r.elementsPerHeight,u=r.elementMultiplier,d=r.isBigEndian,f=r.heightOffset,h=r.heightScale,p=Object(l.default)(this._mesh),m=this._encoding===c.a.LERC;if(!(!p&&m)){var _;if(p)_=A(this._mesh.vertices,this._mesh.encoding,f,h,e,n,a,t,i);else _=(_=function(e,t,i,n,a,r,o,s,l,u){var d=(l-r.west)*(o-1)/(r.east-r.west),c=(u-r.south)*(s-1)/(r.north-r.south),f=0|d,h=f+1;h>=o&&(h=o-1,f=o-2);var p=0|c,m=p+1;m>=s&&(m=s-1,p=s-2);var _=d-f,g=c-p;m=s-1-m;var v=E(e,t,i,n,a,(p=s-1-p)*o+f),y=E(e,t,i,n,a,p*o+h),b=E(e,t,i,n,a,m*o+f),w=E(e,t,i,n,a,m*o+h);return T(_,g,v,y,b,w)}(this._buffer,s,u,o,d,e,n,a,t,i))*h+f;return _}},w.prototype.upsample=function(e,t,i,n,a,r,o){if(!Object(l.default)(e))throw new u.default("tilingScheme is required.");if(!Object(l.default)(t))throw new u.default("thisX is required.");if(!Object(l.default)(i))throw new u.default("thisY is required.");if(!Object(l.default)(n))throw new u.default("thisLevel is required.");if(!Object(l.default)(a))throw new u.default("descendantX is required.");if(!Object(l.default)(r))throw new u.default("descendantY is required.");if(!Object(l.default)(o))throw new u.default("descendantLevel is required.");if(o-n>1)throw new u.default("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(Object(l.default)(s)){for(var d=this._width,c=this._height,f=this._structure,p=f.stride,m=new this._bufferType(d*c*p),_=s.vertices,g=s.encoding,v=e.tileXYToRectangle(t,i,n),y=e.tileXYToRectangle(a,r,o),b=f.heightOffset,O=f.heightScale,x=f.elementsPerHeight,T=f.elementMultiplier,E=f.isBigEndian,S=Math.pow(T,x-1),M=0;Mf.highestEncodedHeight?f.highestEncodedHeight:I)}return new w({buffer:m,width:d,height:c,childTileMask:0,structure:this._structure,createdByUpsampling:!0})}},w.prototype.isChildAvailable=function(e,t,i,n){if(!Object(l.default)(e))throw new u.default("thisX is required.");if(!Object(l.default)(t))throw new u.default("thisY is required.");if(!Object(l.default)(i))throw new u.default("childX is required.");if(!Object(l.default)(n))throw new u.default("childY is required.");var a=2;return i!==2*e&&++a,n!==2*t&&(a-=2),0!=(this._childTileMask&1<0?t._subdomains=t._subdomains.split(""):t._subdomains=["a","b","c"],t._tileWidth=Object(l.default)(e.tileWidth,256),t._tileHeight=Object(l.default)(e.tileHeight,256),t._minimumLevel=Object(l.default)(e.minimumLevel,0),t._maximumLevel=e.maximumLevel,t._tilingScheme=Object(l.default)(e.tilingScheme,new _.a({ellipsoid:e.ellipsoid})),t._rectangle=Object(l.default)(e.rectangle,t._tilingScheme.rectangle),t._rectangle=p.default.intersection(t._rectangle,t._tilingScheme.rectangle),t._hasAlphaChannel=Object(l.default)(e.hasAlphaChannel,!0);var f=e.credit;return"string"==typeof f&&(f=new s.a(f)),t._credit=f,t._resource=r,t._tags=n,t._pickFeaturesResource=c,t._pickFeaturesTags=a,!0}))},O.prototype.getTileCredits=function(e,t,i){if(!this.ready)throw new d.default("getTileCredits must not be called before the imagery provider is ready.")},O.prototype.requestImage=function(e,t,i,n){if(!this.ready)throw new d.default("requestImage must not be called before the imagery provider is ready.");return v.a.loadImage(this,function(e,t,i,n,a){x=!1,T=!1;var r=e._resource,o=r.getUrlComponent(!0),s=e._tags,l={},d=o.match(y);Object(u.default)(d)&&d.forEach((function(a){var r=a.substring(1,a.length-1);Object(u.default)(s[r])&&(l[r]=s[r](e,t,i,n))}));return r.getDerivedResource({request:a,templateValues:l})}(this,e,t,i,n))},O.prototype.pickFeatures=function(e,t,i,n,a){if(!this.ready)throw new d.default("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures&&Object(u.default)(this._pickFeaturesResource)&&0!==this._getFeatureInfoFormats.length){var r=0,o=this;return function l(){if(r>=o._getFeatureInfoFormats.length)return Object(g.a)([]);var d=o._getFeatureInfoFormats[r],c=function(e,t,i,n,a,r,o){x=!1,T=!1,C=!1,M=!1;var s=e._pickFeaturesResource,l=s.getUrlComponent(!0),d=e._pickFeaturesTags,c={},f=l.match(y);Object(u.default)(f)&&f.forEach((function(s){var l=s.substring(1,s.length-1);Object(u.default)(d[l])&&(c[l]=d[l](e,t,i,n,a,r,o))}));return s.getDerivedResource({templateValues:c})}(o,e,t,i,n,a,d.format);return++r,"json"===d.type?c.fetchJson().then(d.callback).otherwise(l):"xml"===d.type?c.fetchXML().then(d.callback).otherwise(l):"text"===d.type||"html"===d.type?c.fetchText().then(d.callback).otherwise(l):c.fetch({responseType:d.format}).then(s.bind(void 0,d)).otherwise(l)}()}function s(e,t){return e.callback(t)}};var x=!1,A=new p.default,T=!1,E=new p.default;var C=!1,S=new n.default,M=!1;function D(e,t,i){if(e&&e.urlSchemeZeroPadding&&e.urlSchemeZeroPadding.hasOwnProperty(t)){var n=e.urlSchemeZeroPadding[t];if("string"==typeof n){var a=n.length;a>1&&(i=i.length>=a?i:new Array(a-i.toString().length+1).join("0")+i)}}return i}function P(e,t,i,n){x||(e.tilingScheme.tileXYToRectangle(t,i,n,A),A.west=h.default.toDegrees(A.west),A.south=h.default.toDegrees(A.south),A.east=h.default.toDegrees(A.east),A.north=h.default.toDegrees(A.north),x=!0)}function I(e,t,i,n){T||(e.tilingScheme.tileXYToNativeRectangle(t,i,n,E),T=!0)}var L=new p.default,j=new a.default;function R(e,t,i,n,a,r,o){if(!C){B(e,t,i,n,a,r);var s=j,l=e.tilingScheme.tileXYToNativeRectangle(t,i,n,L);S.x=e.tileWidth*(s.x-l.west)/l.width|0,S.y=e.tileHeight*(l.north-s.y)/l.height|0,C=!0}}var N=new r.default;function B(e,t,i,n,a,r,o){if(!M){if(e.tilingScheme.projection instanceof f.a)j.x=h.default.toDegrees(a),j.y=h.default.toDegrees(r);else{var s=N;s.longitude=a,s.latitude=r,e.tilingScheme.projection.project(s,j)}M=!0}}t.a=O},function(e,t,i){"use strict";i.r(t);var n=i(115),a=i(18),r=i(4),o=i(2),s=i(0),l=i(24),u=i(554),d=i(423),c=i(350),f=i(120);var h={numberOfAttemptedRequests:0,numberOfActiveRequests:0,numberOfCancelledRequests:0,numberOfCancelledActiveRequests:0,numberOfFailedRequests:0,numberOfActiveRequestsEver:0,lastNumberOfActiveRequests:0},p=20,m=new u.a({comparator:function(e,t){return e.priority-t.priority}});m.maximumLength=p,m.reserve(p);var _=[],g={},v="undefined"!=typeof document?new n.a(document.location.href):new n.a,y=new l.default;function b(){}function w(e){Object(s.default)(e.priorityFunction)&&(e.priority=e.priorityFunction())}function O(e){return e.state===f.a.UNISSUED&&(e.state=f.a.ISSUED,e.deferred=a.a.defer()),e.deferred.promise}function x(e){var t=O(e);return e.state=f.a.ACTIVE,_.push(e),++h.numberOfActiveRequests,++h.numberOfActiveRequestsEver,++g[e.serverKey],e.requestFunction().then(function(e){return function(t){if(e.state!==f.a.CANCELLED){var i=e.deferred;--h.numberOfActiveRequests,--g[e.serverKey],y.raiseEvent(),e.state=f.a.RECEIVED,e.deferred=void 0,i.resolve(t)}}}(e)).otherwise(function(e){return function(t){e.state!==f.a.CANCELLED&&(++h.numberOfFailedRequests,--h.numberOfActiveRequests,--g[e.serverKey],y.raiseEvent(t),e.state=f.a.FAILED,e.deferred.reject(t))}}(e)),t}function A(e){var t=e.state===f.a.ACTIVE;if(e.state=f.a.CANCELLED,++h.numberOfCancelledRequests,Object(s.default)(e.deferred)){var i=e.deferred;e.deferred=void 0,i.reject()}t&&(--h.numberOfActiveRequests,--g[e.serverKey],++h.numberOfCancelledActiveRequests),Object(s.default)(e.cancelFunction)&&e.cancelFunction()}b.maximumRequests=50,b.maximumRequestsPerServer=6,b.requestsByServer={"api.cesium.com:443":18,"assets.cesium.com:443":18},b.throttleRequests=!0,b.debugShowStatistics=!1,b.requestCompletedEvent=y,Object.defineProperties(b,{statistics:{get:function(){return h}},priorityHeapLength:{get:function(){return p},set:function(e){if(ee;){A(m.pop())}p=e,m.maximumLength=e,m.reserve(e)}}}),b.serverHasOpenSlots=function(e,t){t=Object(o.default)(t,1);var i=Object(o.default)(b.requestsByServer[e],b.maximumRequestsPerServer);return g[e]+t<=i},b.heapHasOpenSlots=function(e){return m.length+e<=p},b.update=function(){var e,t,i=0,n=_.length;for(e=0;e0&&(_[e-i]=t):++i;_.length-=i;var a=m.internalArray,r=m.length;for(e=0;e0;)(t=m.pop()).cancelled?A(t):!t.throttleByServer||b.serverHasOpenSlots(t.serverKey)?(x(t),++s):A(t);!function(){if(!b.debugShowStatistics)return;0===h.numberOfActiveRequests&&h.lastNumberOfActiveRequests>0&&(h.numberOfAttemptedRequests>0&&(console.log("Number of attempted requests: "+h.numberOfAttemptedRequests),h.numberOfAttemptedRequests=0),h.numberOfCancelledRequests>0&&(console.log("Number of cancelled requests: "+h.numberOfCancelledRequests),h.numberOfCancelledRequests=0),h.numberOfCancelledActiveRequests>0&&(console.log("Number of cancelled active requests: "+h.numberOfCancelledActiveRequests),h.numberOfCancelledActiveRequests=0),h.numberOfFailedRequests>0&&(console.log("Number of failed requests: "+h.numberOfFailedRequests),h.numberOfFailedRequests=0));h.lastNumberOfActiveRequests=h.numberOfActiveRequests}()},b.getServerKey=function(e){r.a.typeOf.string("url",e);var t=new n.a(e);""===t.scheme()&&(t=new n.a(e).absoluteTo(v)).normalize();var i=t.authority();/:/.test(i)||(i=i+":"+("https"===t.scheme()?"443":"80"));var a=g[i];return Object(s.default)(a)||(g[i]=0),i},b.request=function(e){if(r.a.typeOf.object("request",e),r.a.typeOf.string("request.url",e.url),r.a.typeOf.func("request.requestFunction",e.requestFunction),Object(c.a)(e.url)||Object(d.a)(e.url))return y.raiseEvent(),e.state=f.a.RECEIVED,e.requestFunction();if(++h.numberOfAttemptedRequests,Object(s.default)(e.serverKey)||(e.serverKey=b.getServerKey(e.url)),!b.throttleRequests||!e.throttleByServer||b.serverHasOpenSlots(e.serverKey)){if(!b.throttleRequests||!e.throttle)return x(e);if(!(_.length>=b.maximumRequests)){w(e);var t=m.insert(e);if(Object(s.default)(t)){if(t===e)return;A(t)}return O(e)}}},b.clearForSpecs=function(){for(;m.length>0;){A(m.pop())}for(var e=_.length,t=0;tK.mouseEmulationIgnoreMilliseconds}function x(e,t,i){var n=e.x-t.x,a=e.y-t.y;return Math.sqrt(n*n+a*a)0?-120*t.detail:t.wheelDelta;if(Object(o.default)(i)){var a=m(t),r=e.getInputAction(f.default.WHEEL,a);Object(o.default)(r)&&(r(i),t.preventDefault())}}function j(e,t){w(e);var i,n,r,o=t.changedTouches,s=o.length,l=e._positions;for(i=0;id.a.maximumCubeMapSize)throw new s.default("Width and height must be less than or equal to the maximum cube map size ("+d.a.maximumCubeMapSize+"). Check maximumCubeMapSize.");if(!u.default.validate(v))throw new s.default("Invalid options.pixelFormat.");if(u.default.isDepthFormat(v))throw new s.default("options.pixelFormat cannot be DEPTH_COMPONENT or DEPTH_STENCIL.");if(!h.default.validate(g))throw new s.default("Invalid options.pixelDatatype.");if(g===h.default.FLOAT&&!o.floatingPointTexture)throw new s.default("When options.pixelDatatype is FLOAT, this WebGL implementation must support the OES_texture_float extension.");if(g===h.default.HALF_FLOAT&&!o.halfFloatingPointTexture)throw new s.default("When options.pixelDatatype is HALF_FLOAT, this WebGL implementation must support the OES_texture_half_float extension.");var b=6*u.default.textureSizeInBytes(v,g,_,_),w=e.preMultiplyAlpha||v===u.default.RGB||v===u.default.LUMINANCE,O=Object(a.default)(e.flipY,!0),x=Object(a.default)(e.skipColorSpaceConversion,!1),A=o._gl,T=A.TEXTURE_CUBE_MAP,E=A.createTexture();function C(e,i,n,a,s){var l=i.arrayBufferView;Object(r.default)(l)||(l=i.bufferView);var d=4;Object(r.default)(l)&&(d=u.default.alignmentInBytes(v,g,t)),A.pixelStorei(A.UNPACK_ALIGNMENT,d),s?A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,A.NONE):A.pixelStorei(A.UNPACK_COLORSPACE_CONVERSION_WEBGL,A.BROWSER_DEFAULT_WEBGL),Object(r.default)(l)?(A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,!1),a&&(l=u.default.flipY(l,v,g,_,_)),A.texImage2D(e,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),l)):(A.pixelStorei(A.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n),A.pixelStorei(A.UNPACK_FLIP_Y_WEBGL,a),A.texImage2D(e,0,y,v,h.default.toWebGLConstant(g,o),i))}A.activeTexture(A.TEXTURE0),A.bindTexture(T,E),Object(r.default)(l)?(C(A.TEXTURE_CUBE_MAP_POSITIVE_X,l.positiveX,w,O,x),C(A.TEXTURE_CUBE_MAP_NEGATIVE_X,l.negativeX,w,O,x),C(A.TEXTURE_CUBE_MAP_POSITIVE_Y,l.positiveY,w,O,x),C(A.TEXTURE_CUBE_MAP_NEGATIVE_Y,l.negativeY,w,O,x),C(A.TEXTURE_CUBE_MAP_POSITIVE_Z,l.positiveZ,w,O,x),C(A.TEXTURE_CUBE_MAP_NEGATIVE_Z,l.negativeZ,w,O,x)):(A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_X,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null),A.texImage2D(A.TEXTURE_CUBE_MAP_NEGATIVE_X,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null),A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_Y,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null),A.texImage2D(A.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null),A.texImage2D(A.TEXTURE_CUBE_MAP_POSITIVE_Z,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null),A.texImage2D(A.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,y,_,_,0,v,h.default.toWebGLConstant(g,o),null)),A.bindTexture(T,null),this._context=o,this._textureFilterAnisotropic=o._textureFilterAnisotropic,this._textureTarget=T,this._texture=E,this._pixelFormat=v,this._pixelDatatype=g,this._size=_,this._hasMipmap=!1,this._sizeInBytes=b,this._preMultiplyAlpha=w,this._flipY=O,this._sampler=void 0;var S=Object(r.default)(l);this._positiveX=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_POSITIVE_X,y,v,g,_,w,O,S),this._negativeX=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_NEGATIVE_X,y,v,g,_,w,O,S),this._positiveY=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_POSITIVE_Y,y,v,g,_,w,O,S),this._negativeY=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_NEGATIVE_Y,y,v,g,_,w,O,S),this._positiveZ=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_POSITIVE_Z,y,v,g,_,w,O,S),this._negativeZ=new c.a(o,E,T,A.TEXTURE_CUBE_MAP_NEGATIVE_Z,y,v,g,_,w,O,S),this.sampler=Object(r.default)(e.sampler)?e.sampler:new p.default}Object.defineProperties(g.prototype,{positiveX:{get:function(){return this._positiveX}},negativeX:{get:function(){return this._negativeX}},positiveY:{get:function(){return this._positiveY}},negativeY:{get:function(){return this._negativeY}},positiveZ:{get:function(){return this._positiveZ}},negativeZ:{get:function(){return this._negativeZ}},sampler:{get:function(){return this._sampler},set:function(e){var t=e.minificationFilter,i=e.magnificationFilter,n=t===_.default.NEAREST_MIPMAP_NEAREST||t===_.default.NEAREST_MIPMAP_LINEAR||t===_.default.LINEAR_MIPMAP_NEAREST||t===_.default.LINEAR_MIPMAP_LINEAR,a=this._context,o=this._pixelDatatype;(o===h.default.FLOAT&&!a.textureFloatLinear||o===h.default.HALF_FLOAT&&!a.textureHalfFloatLinear)&&(t=n?_.default.NEAREST_MIPMAP_NEAREST:_.default.NEAREST,i=m.default.NEAREST);var s=a._gl,l=this._textureTarget;s.activeTexture(s.TEXTURE0),s.bindTexture(l,this._texture),s.texParameteri(l,s.TEXTURE_MIN_FILTER,t),s.texParameteri(l,s.TEXTURE_MAG_FILTER,i),s.texParameteri(l,s.TEXTURE_WRAP_S,e.wrapS),s.texParameteri(l,s.TEXTURE_WRAP_T,e.wrapT),Object(r.default)(this._textureFilterAnisotropic)&&s.texParameteri(l,this._textureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,e.maximumAnisotropy),s.bindTexture(l,null),this._sampler=e}},pixelFormat:{get:function(){return this._pixelFormat}},pixelDatatype:{get:function(){return this._pixelDatatype}},width:{get:function(){return this._size}},height:{get:function(){return this._size}},sizeInBytes:{get:function(){return this._hasMipmap?Math.floor(4*this._sizeInBytes/3):this._sizeInBytes}},preMultiplyAlpha:{get:function(){return this._preMultiplyAlpha}},flipY:{get:function(){return this._flipY}},_target:{get:function(){return this._textureTarget}}}),g.prototype.generateMipmap=function(e){if(e=Object(a.default)(e,f.a.DONT_CARE),this._size>1&&!l.default.isPowerOfTwo(this._size))throw new s.default("width and height must be a power of two to call generateMipmap().");if(!f.a.validate(e))throw new s.default("hint is invalid.");this._hasMipmap=!0;var t=this._context._gl,i=this._textureTarget;t.hint(t.GENERATE_MIPMAP_HINT,e),t.activeTexture(t.TEXTURE0),t.bindTexture(i,this._texture),t.generateMipmap(i),t.bindTexture(i,null)},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return this._context._gl.deleteTexture(this._texture),this._positiveX=Object(o.default)(this._positiveX),this._negativeX=Object(o.default)(this._negativeX),this._positiveY=Object(o.default)(this._positiveY),this._negativeY=Object(o.default)(this._negativeY),this._positiveZ=Object(o.default)(this._positiveZ),this._negativeZ=Object(o.default)(this._negativeZ),Object(o.default)(this)},t.a=g},function(e,t,i){"use strict";var n=i(105),a=i(8),r=i(1),o=i(11),s=i(2),l=i(0),u=i(5),d=i(6),c=i(242),f=i(202),h=new r.default,p=new r.default,m=new a.default,_=new d.default,g=new d.default,v=Math.pow(2,12);function y(e,t,i,n,a,o,u,c,m,y){var b,w,O=f.a.NONE;if(Object(l.default)(t)&&Object(l.default)(i)&&Object(l.default)(n)&&Object(l.default)(a)){var x=t.minimum,A=t.maximum,T=r.default.subtract(A,x,p),E=n-i;O=Math.max(r.default.maximumComponent(T),E)e.byteLength)throw new r.default("sub-region exceeds array bounds.");return t=Object(n.default)(t,0),i=Object(n.default)(i,e.byteLength-t),e=e.subarray(t,t+i),s.decode(e)}function l(e,t,i){return t<=e&&e<=i}s.decodeWithTextDecoder=function(e){return new TextDecoder("utf-8").decode(e)},s.decodeWithFromCharCode=function(e){for(var t="",i=function(e){for(var t=0,i=0,n=0,a=128,r=191,s=[],u=e.length,d=0;d>10),56320+(1023&r)))}return t},"undefined"!=typeof TextDecoder?s.decode=s.decodeWithTextDecoder:s.decode=s.decodeWithFromCharCode,t.a=s},function(e,t,i){"use strict";var n=i(10),a={RGBA4:n.a.RGBA4,RGB5_A1:n.a.RGB5_A1,RGB565:n.a.RGB565,DEPTH_COMPONENT16:n.a.DEPTH_COMPONENT16,STENCIL_INDEX8:n.a.STENCIL_INDEX8,DEPTH_STENCIL:n.a.DEPTH_STENCIL,validate:function(e){return e===a.RGBA4||e===a.RGB5_A1||e===a.RGB565||e===a.DEPTH_COMPONENT16||e===a.STENCIL_INDEX8||e===a.DEPTH_STENCIL}};t.a=Object.freeze(a)},function(e,t,i){"use strict";var n=i(1),a=i(22),r=i(4),o=i(2),s=i(0),l=i(3),u=i(15),d=i(5);function c(e,t,i){if(0===e)return t*i;var n=e*e,a=n*n,r=a*n,o=r*n,s=o*n,l=s*n,u=i;return t*((1-n/4-3*a/64-5*r/256-175*o/16384-441*s/65536-4851*l/1048576)*u-(3*n/8+3*a/32+45*r/1024+105*o/4096+2205*s/131072+6237*l/524288)*Math.sin(2*u)+(15*a/256+45*r/1024+525*o/16384+1575*s/65536+155925*l/8388608)*Math.sin(4*u)-(35*r/3072+175*o/12288+3675*s/262144+13475*l/1048576)*Math.sin(6*u)+(315*o/131072+2205*s/524288+43659*l/8388608)*Math.sin(8*u)-(693*s/1310720+6237*l/5242880)*Math.sin(10*u)+1001*l/8388608*Math.sin(12*u))}function f(e,t){if(0===e)return Math.log(Math.tan(.5*(d.default.PI_OVER_TWO+t)));var i=e*Math.sin(t);return Math.log(Math.tan(.5*(d.default.PI_OVER_TWO+t)))-e/2*Math.log((1+i)/(1-i))}var h=new n.default,p=new n.default;function m(e,t,i,o){var s=n.default.normalize(o.cartographicToCartesian(t,p),h),l=n.default.normalize(o.cartographicToCartesian(i,p),p);r.a.typeOf.number.greaterThanOrEquals("value",Math.abs(Math.abs(n.default.angleBetween(s,l))-Math.PI),.0125);var u=o.maximumRadius,m=o.minimumRadius,_=u*u,g=m*m;e._ellipticitySquared=(_-g)/_,e._ellipticity=Math.sqrt(e._ellipticitySquared),e._start=a.default.clone(t,e._start),e._start.height=0,e._end=a.default.clone(i,e._end),e._end.height=0,e._heading=function(e,t,i,n,a){var r=f(e._ellipticity,i),o=f(e._ellipticity,a);return Math.atan2(d.default.negativePiToPi(n-t),o-r)}(e,t.longitude,t.latitude,i.longitude,i.latitude),e._distance=function(e,t,i,n,a,r,o){var s=e._heading,l=r-n,u=0;if(d.default.equalsEpsilon(Math.abs(s),d.default.PI_OVER_TWO,d.default.EPSILON8))if(t===i)u=t*Math.cos(a)*d.default.negativePiToPi(l);else{var f=Math.sin(a);u=t*Math.cos(a)*d.default.negativePiToPi(l)/Math.sqrt(1-e._ellipticitySquared*f*f)}else{var h=c(e._ellipticity,t,a);u=(c(e._ellipticity,t,o)-h)/Math.cos(s)}return Math.abs(u)}(e,o.maximumRadius,o.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude)}function _(e,t,i,n,r,o){if(0===i)return a.default.clone(e,o);var l,u,h,p=r*r;if(Math.abs(d.default.PI_OVER_TWO-Math.abs(t))>d.default.EPSILON8){u=function(e,t,i){var n=e/i;if(0===t)return n;var a=n*n,r=a*n,o=r*n,s=t*t,l=s*s,u=l*s,d=u*s,c=d*s,f=c*s,h=Math.sin(2*n),p=Math.cos(2*n),m=Math.sin(4*n),_=Math.cos(4*n),g=Math.sin(6*n),v=Math.cos(6*n),y=Math.sin(8*n),b=Math.cos(8*n),w=Math.sin(10*n);return n+n*s/4+7*n*l/64+15*n*u/256+579*n*d/16384+1515*n*c/65536+16837*n*f/1048576+(3*n*l/16+45*n*u/256-n*(32*a-561)*d/4096-n*(232*a-1677)*c/16384+n*(399985-90560*a+512*o)*f/5242880)*p+(21*n*u/256+483*n*d/4096-n*(224*a-1969)*c/16384-n*(33152*a-112599)*f/1048576)*_+(151*n*d/4096+4681*n*c/65536+1479*n*f/16384-453*r*f/32768)*v+(1097*n*c/65536+42783*n*f/1048576)*b+8011*n*f/1048576*Math.cos(10*n)+(3*s/8+3*l/16+213*u/2048-3*a*u/64+255*d/4096-33*a*d/512+20861*c/524288-33*a*c/512+o*c/1024+28273*f/1048576-471*a*f/8192+9*o*f/4096)*h+(21*l/256+21*u/256+533*d/8192-21*a*d/512+197*c/4096-315*a*c/4096+584039*f/16777216-12517*a*f/131072+7*o*f/2048)*m+(151*u/6144+151*d/4096+5019*c/131072-453*a*c/16384+26965*f/786432-8607*a*f/131072)*g+(1097*d/131072+1097*c/65536+225797*f/10485760-1097*a*f/65536)*y+(8011*c/2621440+8011*f/1048576)*w+293393*f/251658240*Math.sin(12*n)}(c(r,n,e.latitude)+i*Math.cos(t),r,n);var m=f(r,e.latitude),_=f(r,u);h=Math.tan(t)*(_-m),l=d.default.negativePiToPi(e.longitude+h)}else{var g;if(u=e.latitude,0===r)g=n*Math.cos(e.latitude);else{var v=Math.sin(e.latitude);g=n*Math.cos(e.latitude)/Math.sqrt(1-p*v*v)}h=i/g,l=t>0?d.default.negativePiToPi(e.longitude+h):d.default.negativePiToPi(e.longitude-h)}return Object(s.default)(o)?(o.longitude=l,o.latitude=u,o.height=0,o):new a.default(l,u,0)}function g(e,t,i){var n=Object(o.default)(i,u.default.WGS84);this._ellipsoid=n,this._start=new a.default,this._end=new a.default,this._heading=void 0,this._distance=void 0,this._ellipticity=void 0,this._ellipticitySquared=void 0,Object(s.default)(e)&&Object(s.default)(t)&&m(this,e,t,n)}Object.defineProperties(g.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return r.a.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},heading:{get:function(){return r.a.defined("distance",this._distance),this._heading}}}),g.fromStartHeadingDistance=function(e,t,i,n,a){r.a.defined("start",e),r.a.defined("heading",t),r.a.defined("distance",i),r.a.typeOf.number.greaterThan("distance",i,0);var l=Object(o.default)(n,u.default.WGS84),c=l.maximumRadius,f=l.minimumRadius,h=c*c,p=f*f,m=Math.sqrt((h-p)/h),v=_(e,t=d.default.negativePiToPi(t),i,l.maximumRadius,m);return!Object(s.default)(a)||Object(s.default)(n)&&!n.equals(a.ellipsoid)?new g(e,v,l):(a.setEndPoints(e,v),a)},g.prototype.setEndPoints=function(e,t){r.a.defined("start",e),r.a.defined("end",t),m(this,e,t,this._ellipsoid)},g.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(e*this._distance,t)},g.prototype.interpolateUsingSurfaceDistance=function(e,t){if(r.a.typeOf.number("distance",e),!Object(s.default)(this._distance)||0===this._distance)throw new l.default("EllipsoidRhumbLine must have distinct start and end set.");return _(this._start,this._heading,e,this._ellipsoid.maximumRadius,this._ellipticity,t)},g.prototype.findIntersectionWithLongitude=function(e,t){if(r.a.typeOf.number("intersectionLongitude",e),!Object(s.default)(this._distance)||0===this._distance)throw new l.default("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,o=Math.abs(n),u=this._start;if(e=d.default.negativePiToPi(e),d.default.equalsEpsilon(Math.abs(e),Math.PI,d.default.EPSILON14)&&(e=d.default.sign(u.longitude)*Math.PI),Object(s.default)(t)||(t=new a.default),Math.abs(d.default.PI_OVER_TWO-o)<=d.default.EPSILON8)return t.longitude=e,t.latitude=u.latitude,t.height=0,t;if(d.default.equalsEpsilon(Math.abs(d.default.PI_OVER_TWO-o),d.default.PI_OVER_TWO,d.default.EPSILON8)){if(d.default.equalsEpsilon(e,u.longitude,d.default.EPSILON12))return;return t.longitude=e,t.latitude=d.default.PI_OVER_TWO*d.default.sign(d.default.PI_OVER_TWO-n),t.height=0,t}var c,f=u.latitude,h=i*Math.sin(f),p=Math.tan(.5*(d.default.PI_OVER_TWO+f))*Math.exp((e-u.longitude)/Math.tan(n)),m=(1+h)/(1-h),_=u.latitude;do{c=_;var g=i*Math.sin(c),v=(1+g)/(1-g);_=2*Math.atan(p*Math.pow(v/m,i/2))-d.default.PI_OVER_TWO}while(!d.default.equalsEpsilon(_,c,d.default.EPSILON12));return t.longitude=e,t.latitude=_,t.height=0,t},g.prototype.findIntersectionWithLatitude=function(e,t){if(r.a.typeOf.number("intersectionLatitude",e),!Object(s.default)(this._distance)||0===this._distance)throw new l.default("EllipsoidRhumbLine must have distinct start and end set.");var i=this._ellipticity,n=this._heading,o=this._start;if(!d.default.equalsEpsilon(Math.abs(n),d.default.PI_OVER_TWO,d.default.EPSILON8)){var u=f(i,o.latitude),c=f(i,e),h=Math.tan(n)*(c-u),p=d.default.negativePiToPi(o.longitude+h);return Object(s.default)(t)?(t.longitude=p,t.latitude=e,t.height=0,t):new a.default(p,e,0)}},t.a=g},function(e,t,i){"use strict";i.r(t);var n=i(68),a=i(17),r=i(8),o=i(1),s=i(22),l=i(4),u=i(11),d=i(2),c=i(0),f=i(3),h=i(261),p=i(15),m=i(125),_=i(46),g=i(28),v=i(82),y=i(43),b=i(71),w=i(95),O=i(38),x=i(5),A=i(12),T=i(35),E=i(27),C=i(21),S=i(29),M=new o.default,D=new o.default,P=new o.default,I=new o.default,L=new r.default,j=new A.default,R=new A.default,N=new E.default,B=new o.default,F=new o.default,k=new o.default,z=new s.default,U=new o.default,V=new r.default,H=new r.default;function G(e,t,i){var a=t.vertexFormat,s=t.center,l=t.semiMajorAxis,d=t.semiMinorAxis,f=t.ellipsoid,p=t.stRotation,_=i?e.length/3*2:e.length/3,y=t.shadowVolume,w=a.st?new Float32Array(2*_):void 0,O=a.normal?new Float32Array(3*_):void 0,x=a.tangent?new Float32Array(3*_):void 0,T=a.bitangent?new Float32Array(3*_):void 0,C=y?new Float32Array(3*_):void 0,S=0,I=B,G=F,Y=k,W=new m.a(f),q=W.project(f.cartesianToCartographic(s,z),U),X=f.scaleToGeodeticSurface(s,M);f.geodeticSurfaceNormal(X,X);var K=j,J=R;if(0!==p){var Z=E.default.fromAxisAngle(X,p,N);K=A.default.fromQuaternion(Z,K),Z=E.default.fromAxisAngle(X,-p,N),J=A.default.fromQuaternion(Z,J)}else K=A.default.clone(A.default.IDENTITY,K),J=A.default.clone(A.default.IDENTITY,J);for(var Q=r.default.fromElements(Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,V),$=r.default.fromElements(Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,H),ee=e.length,te=i?ee:0,ie=te/3*2,ne=0;ne1;--a){for(o[s++]=t++,o[s++]=t,o[s++]=n,i=2*a,r=0;rx.default.PI&&(f.north=f.north>0?x.default.PI_OVER_TWO-x.default.EPSILON7:f.north,f.south=f.south<0?x.default.EPSILON7-x.default.PI_OVER_TWO:f.south,f.east=x.default.PI,f.west=-x.default.PI),f}function Z(e){var t=(e=Object(d.default)(e,d.default.EMPTY_OBJECT)).center,i=Object(d.default)(e.ellipsoid,p.default.WGS84),n=e.semiMajorAxis,a=e.semiMinorAxis,r=Object(d.default)(e.granularity,x.default.RADIANS_PER_DEGREE),s=Object(d.default)(e.vertexFormat,S.a.DEFAULT);if(l.a.defined("options.center",t),l.a.typeOf.number("options.semiMajorAxis",n),l.a.typeOf.number("options.semiMinorAxis",a),n4)throw new r.default("options.componentsPerAttribute must be between 1 and 4.");if(!Object(a.default)(e.value))throw new r.default("options.value is required.");this.componentDatatype=e.componentDatatype,this.componentsPerAttribute=e.componentsPerAttribute,this.normalize=Object(n.default)(e.normalize,!1),this.value=e.value}},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._show=!0,t.autoUpdate=!0,t}return a(t,e),t.prototype.afterAdded=function(e){this.parent=e},Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e},enumerable:!1,configurable:!0}),t}(i(487).default);t.default=r},function(e,t,i){"use strict";i.r(t);var n=i(41),a=i(8),r=i(7),o=i(2),s=i(0),l=i(19),u=i(3),d=i(6),c=i(431),f=i(721),h=i(251),p=i(154),m=i(42),_=i(129),g=i(397),v=i(174),y=i(201),b=i(396),w=i(89),O=i(722);function x(){this.textureInfo=void 0,this.dimensions=void 0,this.billboard=void 0}function A(e,t,i){this.labelCollection=e,this.index=t,this.dimensions=i}var T=new a.default(4,4),E=new n.a(1,1,1,1);var C={};function S(e,t,i,n,a,o,s){return C.font=t,C.fillColor=i,C.strokeColor=n,C.strokeWidth=a,C.padding=y.a.PADDING,s===w.default.CENTER?C.textBaseline="middle":s===w.default.TOP?C.textBaseline="top":C.textBaseline="bottom",C.fill=o===v.a.FILL||o===v.a.FILL_AND_OUTLINE,C.stroke=o===v.a.OUTLINE||o===v.a.FILL_AND_OUTLINE,C.backgroundColor=r.default.BLACK,Object(c.a)(e,C)}function M(e,t){t.textureInfo=void 0,t.dimensions=void 0;var i=t.billboard;Object(s.default)(i)&&(i.show=!1,i.image=void 0,Object(s.default)(i._removeCallbackFunc)&&(i._removeCallbackFunc(),i._removeCallbackFunc=void 0),e._spareBillboards.push(i),t.billboard=void 0)}function D(e,t,i,n){e.addImage(t,i).then((function(e){n.index=e}))}var P=new O.a;function I(e,t){var i,n,o,l=t._renderedText,u=P.splitGraphemes(l),d=u.length,c=t._glyphs,h=c.length;if(t._relativeSize=t._fontSize/y.a.FONT_SIZE,d0,m=t._backgroundBillboard,g=e._backgroundBillboardCollection;p?(Object(s.default)(m)||(m=g.add({collection:e,image:"ID_WHITE_PIXEL",imageSubRegion:E}),t._backgroundBillboard=m),m.color=t._backgroundColor,m.show=t._show,m.position=t._position,m.eyeOffset=t._eyeOffset,m.pixelOffset=t._pixelOffset,m.horizontalOrigin=_.a.LEFT,m.verticalOrigin=t._verticalOrigin,m.heightReference=t._heightReference,m.scale=t.totalScale,m.pickPrimitive=t,m.id=t._id,m.translucencyByDistance=t._translucencyByDistance,m.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,m.scaleByDistance=t._scaleByDistance,m.distanceDisplayCondition=t._distanceDisplayCondition,m.disableDepthTestDistance=t._disableDepthTestDistance):Object(s.default)(m)&&(g.remove(m),t._backgroundBillboard=m=void 0);var b=e._glyphTextureCache;for(o=0;o0&&I.height>0){for(var L=Object(f.a)(I,{cutoff:y.a.CUTOFF,radius:y.a.RADIUS}),j=I.getContext("2d"),R=I.width,N=I.height,B=j.getImageData(0,0,R,N),F=0;F0?H=G.pop():((H=e._billboardCollection.add({collection:e}))._labelDimensions=new a.default,H._labelTranslate=new a.default),i.billboard=H),H.show=t._show,H.position=t._position,H.eyeOffset=t._eyeOffset,H.pixelOffset=t._pixelOffset,H.horizontalOrigin=_.a.LEFT,H.verticalOrigin=t._verticalOrigin,H.heightReference=t._heightReference,H.scale=t.totalScale,H.pickPrimitive=t,H.id=t._id,H.image=T,H.translucencyByDistance=t._translucencyByDistance,H.pixelOffsetScaleByDistance=t._pixelOffsetScaleByDistance,H.scaleByDistance=t._scaleByDistance,H.distanceDisplayCondition=t._distanceDisplayCondition,H.disableDepthTestDistance=t._disableDepthTestDistance,H._batchIndex=t._batchIndex,H.outlineColor=t.outlineColor,t.style===v.a.FILL_AND_OUTLINE?(H.color=t._fillColor,H.outlineWidth=t.outlineWidth):t.style===v.a.FILL?(H.color=t._fillColor,H.outlineWidth=0):t.style===v.a.OUTLINE&&(H.color=r.default.TRANSPARENT,H.outlineWidth=t.outlineWidth)}}t._repositionAllGlyphs=!0}function L(e,t,i){return t===_.a.CENTER?-e/2:t===_.a.RIGHT?-(e+i.x):i.x}var j=new a.default,R=new a.default;function N(e){var t,i,n,r=e._glyphs,o=e._renderedText,l=0,u=0,d=[],c=Number.NEGATIVE_INFINITY,f=0,h=1,p=r.length,g=e._backgroundBillboard,v=a.default.clone(Object(s.default)(g)?e._backgroundPadding:a.default.ZERO,R);for(v.x/=e._relativeSize,v.y/=e._relativeSize,n=0;n0&&(C=x===_.a.CENTER?-u/2-v.x:x===_.a.RIGHT?-(u+2*v.x):0,j.x=C*O,A===w.default.TOP?j.y=b-f-c:A===w.default.CENTER?j.y=(b-f)/2-c:A===w.default.BASELINE?j.y=-v.y-c:j.y=0,j.y=j.y*O,g.width=D,g.height=P,g._setTranslate(j),g._labelTranslate=a.default.clone(j,g._labelTranslate)),e.heightReference===m.a.CLAMP_TO_GROUND)for(n=0;n0?p.a.TRANSLUCENT:this.blendOption;t.blendOption=d,i.blendOption=d,t._highlightColor=this._highlightColor,i._highlightColor=this._highlightColor,this._labelsToUpdate.length=0,i.update(e),t.update(e)}},F.prototype.isDestroyed=function(){return!1},F.prototype.destroy=function(){return this.removeAll(),this._billboardCollection=this._billboardCollection.destroy(),this._textureAtlas=this._textureAtlas&&this._textureAtlas.destroy(),this._backgroundBillboardCollection=this._backgroundBillboardCollection.destroy(),this._backgroundTextureAtlas=this._backgroundTextureAtlas&&this._backgroundTextureAtlas.destroy(),Object(l.default)(this)},t.default=F},function(e,t,i){"use strict";var n=i(4),a=i(0),r=i(3),o=i(215),s=i(30);function l(){this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,r.default.throwInstantiationError()}Object.defineProperties(l.prototype,{ready:{get:r.default.throwInstantiationError},readyPromise:{get:r.default.throwInstantiationError},rectangle:{get:r.default.throwInstantiationError},tileWidth:{get:r.default.throwInstantiationError},tileHeight:{get:r.default.throwInstantiationError},maximumLevel:{get:r.default.throwInstantiationError},minimumLevel:{get:r.default.throwInstantiationError},tilingScheme:{get:r.default.throwInstantiationError},tileDiscardPolicy:{get:r.default.throwInstantiationError},errorEvent:{get:r.default.throwInstantiationError},credit:{get:r.default.throwInstantiationError},proxy:{get:r.default.throwInstantiationError},hasAlphaChannel:{get:r.default.throwInstantiationError}}),l.prototype.getTileCredits=function(e,t,i){r.default.throwInstantiationError()},l.prototype.requestImage=function(e,t,i,n){r.default.throwInstantiationError()},l.prototype.pickFeatures=function(e,t,i,n,a){r.default.throwInstantiationError()};var u=/\.ktx2$/i;l.loadImage=function(e,t){n.a.defined("url",t);var i=s.default.createIfNeeded(t);return u.test(i.url)?Object(o.a)(i):Object(a.default)(e)&&Object(a.default)(e.tileDiscardPolicy)?i.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}):i.fetchImage({preferImageBitmap:!0,flipY:!0})},t.a=l},function(e,t,i){"use strict";var n=i(8),a=i(4),r=i(50),o=i(7),s=i(60),l=i(2),u=i(0),d=i(214),c=i(19),f=i(3),h=i(5),p=i(23),m=i(56),_=i(44),g=i(26),v=i(39),y=i(34),b=i(248),w=i(463),O=i(74),x=i(259),A=i(140),T=i(289),E=i(81),C=i(122),S=i(66),M=b.a.DEFAULT_COLOR_VALUE,D=b.a.DEFAULT_SHOW_VALUE;function P(e,t,i,n,a){var o;this.featuresLength=t,Object(u.default)(i)&&(o=i.extensions),this._extensions=Object(l.default)(o,{});var s=function(e){var t={};if(!Object(u.default)(e))return t;for(var i in e)e.hasOwnProperty(i)&&"HIERARCHY"!==i&&"extensions"!==i&&"extras"!==i&&(t[i]=Object(r.default)(e[i],!0));return t}(i);this._properties=s,this._batchTableHierarchy=function(e,t,i){if(!Object(u.default)(t))return;var n=e._extensions["3DTILES_batch_table_hierarchy"],a=t.HIERARCHY;Object(u.default)(a)&&(P._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),e._extensions["3DTILES_batch_table_hierarchy"]=a,n=a);if(!Object(u.default)(n))return;return new w.a({extension:n,binaryBody:i})}(this,i,n),this._batchTableBinaryProperties=I(t,s,n),this._content=e,this._batchTexture=new b.a({featuresLength:t,colorChangedCallback:a,owner:e,statistics:e.tileset.statistics})}function I(e,t,i){var n;for(var a in t)if(t.hasOwnProperty(a)){var r=t[a],o=r.byteOffset;if(Object(u.default)(o)){var s=r.componentType,l=r.type;if(!Object(u.default)(s))throw new p.a("componentType is required.");if(!Object(u.default)(l))throw new p.a("type is required.");if(!Object(u.default)(i))throw new p.a("Property "+a+" requires a batch table binary.");var d=Object(T.a)(r),c=d.componentsPerAttribute,f=d.classType,h=d.createArrayBufferView(i.buffer,i.byteOffset+o,e);Object(u.default)(n)||(n={}),n[a]={typedArray:h,componentCount:c,type:f}}}return n}P._deprecationWarning=d.a,Object.defineProperties(P.prototype,{memorySizeInBytes:{get:function(){return this._batchTexture.memorySizeInBytes}}}),P.getBinaryProperties=function(e,t,i){return I(e,t,i)},P.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)},P.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)},P.prototype.getShow=function(e){return this._batchTexture.getShow(e)},P.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)},P.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)},P.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)},P.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)};var L=new o.default;function j(e,t){if(!Object(u.default)(e)||e<0||e>=t)throw new f.default("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}function R(e,t){return e=y.default.replaceMain(e,"tile_main"),t?e+"uniform float tile_colorBlend; \nvoid tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n tile_featureColor = czm_gammaCorrect(tile_featureColor); \n gl_FragColor.a *= tile_featureColor.a; \n float highlight = ceil(tile_colorBlend); \n gl_FragColor.rgb *= mix(tile_featureColor.rgb, vec3(1.0), highlight); \n} \n":e+"void tile_color(vec4 tile_featureColor) \n{ \n tile_main(); \n} \n"}function N(e,t,i){if(!Object(u.default)(t))return R(e,i);var n=new RegExp("(uniform|attribute|in)\\s+(vec[34]|sampler2D)\\s+"+t+";"),a=e.match(n);if(!Object(u.default)(a))return R(e,i);var r=a[0],o=a[2];e=(e=y.default.replaceMain(e,"tile_main")).replace(r,"");var s;if("vec3"===o||"vec4"===o){var l="vec3"===o?"vec4("+t+", 1.0)":t,d="vec3"===o?"tile_diffuse.xyz":"tile_diffuse";n=new RegExp(t,"g"),e=e.replace(n,d),s=" vec4 source = "+l+"; \n tile_diffuse = tile_diffuse_final(source, tile_featureColor); \n tile_main(); \n"}else"sampler2D"===o&&(e=function(e,t){for(var i,n="texture2D("+t,a=0,r=e.indexOf(n,a);r>-1;){for(var o=0,s=r;s0?(r="",e&&(r+="uniform bool tile_translucentCommand; \n"),r+="uniform sampler2D tile_batchTexture; \nvarying vec4 tile_featureColor; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec2 st = computeSt("+t+"); \n vec4 featureProperties = texture2D(tile_batchTexture, st); \n tile_color(featureProperties); \n float show = ceil(featureProperties.a); \n gl_Position *= show; \n",e&&(r+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n gl_Position *= 0.0; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n gl_Position *= 0.0; \n } \n } \n"),r+=" tile_featureColor = featureProperties; \n tile_featureSt = st; \n}"):r="varying vec2 tile_featureSt; \nvoid main() \n{ \n tile_color(vec4(1.0)); \n tile_featureSt = computeSt("+t+"); \n}",o+"\n"+(1===n._batchTexture.textureDimensions.y?"uniform vec4 tile_textureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n return vec2(centerX + (batchId * stepX), 0.5); \n} \n":"uniform vec4 tile_textureStep; \nuniform vec2 tile_textureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = tile_textureStep.x; \n float centerX = tile_textureStep.y; \n float stepY = tile_textureStep.z; \n float centerY = tile_textureStep.w; \n float xId = mod(batchId, tile_textureDimensions.x); \n float yId = floor(batchId / tile_textureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n")+r}}},P.prototype.getFragmentShaderCallback=function(e,t,i){if(0!==this.featuresLength)return function(n){return n=N(n,t,!0),m.a.maximumVertexTextureImageUnits>0?(n+="uniform sampler2D tile_pickTexture; \nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_color(tile_featureColor); \n",i&&(n+=" gl_FragColor.rgb *= gl_FragColor.a; \n"),n+="}"):(e&&(n+="uniform bool tile_translucentCommand; \n"),n+="uniform sampler2D tile_pickTexture; \nuniform sampler2D tile_batchTexture; \nvarying vec2 tile_featureSt; \nvoid main() \n{ \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n",e&&(n+=" bool isStyleTranslucent = (featureProperties.a != 1.0); \n if (czm_pass == czm_passTranslucent) \n { \n if (!isStyleTranslucent && !tile_translucentCommand) \n { \n discard; \n } \n } \n else \n { \n if (isStyleTranslucent) \n { \n discard; \n } \n } \n"),n+=" tile_color(featureProperties); \n",i&&(n+=" gl_FragColor.rgb *= gl_FragColor.a; \n"),n+="} \n"),n}},P.prototype.getClassificationFragmentShaderCallback=function(){if(0!==this.featuresLength)return function(e){return e=y.default.replaceMain(e,"tile_main"),m.a.maximumVertexTextureImageUnits>0?e+="uniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvarying vec4 tile_featureColor; \nvoid main() \n{ \n tile_main(); \n gl_FragColor = tile_featureColor; \n gl_FragColor.rgb *= gl_FragColor.a; \n}":e+="uniform sampler2D tile_batchTexture; \nuniform sampler2D tile_pickTexture;\nvarying vec2 tile_featureSt; \nvoid main() \n{ \n tile_main(); \n vec4 featureProperties = texture2D(tile_batchTexture, tile_featureSt); \n if (featureProperties.a == 0.0) { \n discard; \n } \n gl_FragColor = featureProperties; \n gl_FragColor.rgb *= gl_FragColor.a; \n} \n",e}},P.prototype.getUniformMapCallback=function(){if(0!==this.featuresLength){var e=this;return function(t){var i={tile_batchTexture:function(){return Object(l.default)(e._batchTexture.batchTexture,e._batchTexture.defaultTexture)},tile_textureDimensions:function(){return e._batchTexture.textureDimensions},tile_textureStep:function(){return e._batchTexture.textureStep},tile_colorBlend:function(){return function(e){var t=e._content.tileset,i=t.colorBlendMode,n=t.colorBlendAmount;if(i===x.a.HIGHLIGHT)return 0;if(i===x.a.REPLACE)return 1;if(i===x.a.MIX)return h.default.clamp(n,h.default.EPSILON4,1);throw new f.default('Invalid color blend mode "'+i+'".')}(e)},tile_pickTexture:function(){return e._batchTexture.pickTexture}};return Object(s.default)(t,i)}}},P.prototype.getPickId=function(){return"texture2D(tile_pickTexture, tile_featureSt)"};var B=0,F=1,k=2;function z(e){var t=_.default.shallowClone(e),i=t.pass===g.default.TRANSLUCENT;return t.uniformMap=Object(u.default)(t.uniformMap)?t.uniformMap:{},t.uniformMap.tile_translucentCommand=function(){return i},t}function U(e){var t,i,n=_.default.shallowClone(e);return n.pass=g.default.TRANSLUCENT,n.renderState=(t=e.renderState,(i=Object(r.default)(t,!0)).cull.enabled=!1,i.depthTest.enabled=!0,i.depthMask=!1,i.blending=O.default.ALPHA_BLEND,i.stencilTest=E.a.setCesium3DTileBit(),i.stencilMask=E.a.CESIUM_3D_TILE_MASK,v.default.fromCache(i)),n}function V(e){var t,i,n=_.default.shallowClone(e);return n.renderState=(t=e.renderState,(i=Object(r.default)(t,!0)).stencilTest=E.a.setCesium3DTileBit(),i.stencilMask=E.a.CESIUM_3D_TILE_MASK,v.default.fromCache(i)),n}function H(e,t){var i=_.default.shallowClone(t),a=Object(r.default)(i.renderState,!0);a.cull.enabled=!0,a.cull.face=A.default.FRONT,a.colorMask={red:!1,green:!1,blue:!1,alpha:!1},a.polygonOffset={enabled:!0,factor:5,units:5},a.stencilTest=E.a.setCesium3DTileBit(),a.stencilMask=E.a.CESIUM_3D_TILE_MASK,i.renderState=v.default.fromCache(a),i.castShadows=!1,i.receiveShadows=!1,i.uniformMap=Object(r.default)(t.uniformMap);var o=new n.default(5,5);return i.uniformMap.u_polygonOffset=function(){return o},i.shaderProgram=function(e,t){var i=e.shaderCache.getDerivedShaderProgram(t,"zBackfaceLogDepth");if(!Object(u.default)(i)){var n=t.fragmentShaderSource.clone();n.defines=Object(u.default)(n.defines)?n.defines.slice(0):[],n.defines.push("POLYGON_OFFSET"),n.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),i=e.shaderCache.createDerivedShaderProgram(t,"zBackfaceLogDepth",{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:n,attributeLocations:t._attributeLocations})}return i}(e,t.shaderProgram),i}function G(e,t){var i=_.default.shallowClone(e),n=Object(r.default)(i.renderState,!0);return n.stencilTest.enabled=!0,n.stencilTest.mask=E.a.SKIP_LOD_MASK,n.stencilTest.reference=E.a.CESIUM_3D_TILE_MASK|t<>>E.a.SKIP_LOD_BIT_SHIFT)||(f.renderState.depthMask?h.stencil=G(p,r._selectionDepth):h.stencil=h.opaque)));var m=l?h.stencil:h.opaque,_=h.translucent;f.pass!==g.default.TRANSLUCENT?(d===B&&(n[c]=m),d===F&&(n[c]=_),d===k&&(n[c]=m,n.push(_))):n[c]=p}},P.prototype.update=function(e,t){this._batchTexture.update(e,t)},P.prototype.isDestroyed=function(){return!1},P.prototype.destroy=function(){return this._batchTexture=this._batchTexture&&this._batchTexture.destroy(),Object(c.default)(this)},t.a=P},function(e,t,i){"use strict";var n=i(1),a=i(2),r=i(0),o=i(3),s=i(24),l=i(98),u=i(303);function d(e,t){this._definitionChanged=new s.default,this._value=n.default.clone(e),this._referenceFrame=Object(a.default)(t,l.default.FIXED)}Object.defineProperties(d.prototype,{isConstant:{get:function(){return!Object(r.default)(this._value)||this._referenceFrame===l.default.FIXED}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return this._referenceFrame}}}),d.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,l.default.FIXED,t)},d.prototype.setValue=function(e,t){var i=!1;n.default.equals(this._value,e)||(i=!0,this._value=n.default.clone(e)),Object(r.default)(t)&&this._referenceFrame!==t&&(i=!0,this._referenceFrame=t),i&&this._definitionChanged.raiseEvent(this)},d.prototype.getValueInReferenceFrame=function(e,t,i){if(!Object(r.default)(e))throw new o.default("time is required.");if(!Object(r.default)(t))throw new o.default("referenceFrame is required.");return u.default.convertToReferenceFrame(e,this._value,this._referenceFrame,t,i)},d.prototype.equals=function(e){return this===e||e instanceof d&&n.default.equals(this._value,e._value)&&this._referenceFrame===e._referenceFrame},t.a=d},function(e,t,i){"use strict";i.r(t);var n=i(169),a=i(4),r=i(2),o=i(0),s=i(3),l=i(24),u=i(278),d=i(14),c=i(328),f={packedLength:1,pack:function(e,t,i){t[i=Object(r.default)(i,0)]=e},unpack:function(e,t,i){return e[t=Object(r.default)(t,0)]}};function h(e,t,i){var n,a=e.length,r=i.length,o=a+r;if(e.length=o,a!==t){var s=a-1;for(n=o-1;n>=t;n--)e[n]=e[s--]}for(n=0;n=0||Object(o.default)(g)&&d.default.compare(f,g)>=0));){for(m[y++]=f,v+=1,s=0;s0&&(_.length=b,h(i,c,_),m.length=y,h(t,u,m))}else{for(s=0;ss)return;if(this._backwardExtrapolationType===u.a.HOLD)return l.unpack(c,0,t)}if(f>=r){var p=i[f=r-1];if(s=this._forwardExtrapolationDuration,this._forwardExtrapolationType===u.a.NONE||0!==s&&d.default.secondsDifference(e,p)>s)return;if(this._forwardExtrapolationType===u.a.HOLD)return f=r-1,l.unpack(c,f*l.packedLength,t)}var m=this._xTable,_=this._yTable,g=this._interpolationAlgorithm,v=this._packedInterpolationLength,y=this._inputOrder;if(this._updateTableLength){this._updateTableLength=!1;var b=Math.min(g.getRequiredDataPoints(this._interpolationDegree,y),r);b!==this._numberOfPoints&&(this._numberOfPoints=b,m.length=b,_.length=b*v)}var w=this._numberOfPoints-1;if(w<1)return;var O=0,x=r-1;if(x-O+1>=w+1){var A=f-(w/2|0)-1;Ax&&(A=(T=x)-w)e.far)throw new l.default("near must be greater than zero and less than far.");e._left=a,e._right=n,e._top=t,e._bottom=i,e._near=r,e._far=o,e._perspectiveMatrix=d.default.computePerspectiveOffCenter(a,n,i,t,r,o,e._perspectiveMatrix),e._infinitePerspective=d.default.computeInfinitePerspectiveOffCenter(a,n,i,t,r,e._infinitePerspective)}}Object.defineProperties(c.prototype,{projectionMatrix:{get:function(){return f(this),this._perspectiveMatrix}},infiniteProjectionMatrix:{get:function(){return f(this),this._infinitePerspective}}});var h=new n.default,p=new n.default,m=new n.default,_=new n.default;c.prototype.computeCullingVolume=function(e,t,i){if(!Object(s.default)(e))throw new l.default("position is required.");if(!Object(s.default)(t))throw new l.default("direction is required.");if(!Object(s.default)(i))throw new l.default("up is required.");var r=this._cullingVolume.planes,o=this.top,u=this.bottom,d=this.right,c=this.left,f=this.near,g=this.far,v=n.default.cross(t,i,h),y=p;n.default.multiplyByScalar(t,f,y),n.default.add(e,y,y);var b=m;n.default.multiplyByScalar(t,g,b),n.default.add(e,b,b);var w=_;n.default.multiplyByScalar(v,c,w),n.default.add(y,w,w),n.default.subtract(w,e,w),n.default.normalize(w,w),n.default.cross(w,i,w),n.default.normalize(w,w);var O=r[0];return Object(s.default)(O)||(O=r[0]=new a.a),O.x=w.x,O.y=w.y,O.z=w.z,O.w=-n.default.dot(w,e),n.default.multiplyByScalar(v,d,w),n.default.add(y,w,w),n.default.subtract(w,e,w),n.default.cross(i,w,w),n.default.normalize(w,w),O=r[1],Object(s.default)(O)||(O=r[1]=new a.a),O.x=w.x,O.y=w.y,O.z=w.z,O.w=-n.default.dot(w,e),n.default.multiplyByScalar(i,u,w),n.default.add(y,w,w),n.default.subtract(w,e,w),n.default.cross(v,w,w),n.default.normalize(w,w),O=r[2],Object(s.default)(O)||(O=r[2]=new a.a),O.x=w.x,O.y=w.y,O.z=w.z,O.w=-n.default.dot(w,e),n.default.multiplyByScalar(i,o,w),n.default.add(y,w,w),n.default.subtract(w,e,w),n.default.cross(w,v,w),n.default.normalize(w,w),O=r[3],Object(s.default)(O)||(O=r[3]=new a.a),O.x=w.x,O.y=w.y,O.z=w.z,O.w=-n.default.dot(w,e),O=r[4],Object(s.default)(O)||(O=r[4]=new a.a),O.x=t.x,O.y=t.y,O.z=t.z,O.w=-n.default.dot(t,y),n.default.negate(t,w),O=r[5],Object(s.default)(O)||(O=r[5]=new a.a),O.x=w.x,O.y=w.y,O.z=w.z,O.w=-n.default.dot(w,b),this._cullingVolume},c.prototype.getPixelDimensions=function(e,t,i,n,a){if(f(this),!Object(s.default)(e)||!Object(s.default)(t))throw new l.default("Both drawingBufferWidth and drawingBufferHeight are required.");if(e<=0)throw new l.default("drawingBufferWidth must be greater than zero.");if(t<=0)throw new l.default("drawingBufferHeight must be greater than zero.");if(!Object(s.default)(i))throw new l.default("distance is required.");if(!Object(s.default)(n))throw new l.default("pixelRatio is required");if(n<=0)throw new l.default("pixelRatio must be greater than zero.");if(!Object(s.default)(a))throw new l.default("A result object is required.");var r=1/this.near,o=this.top*r,u=2*n*i*o/t,d=2*n*i*(o=this.right*r)/e;return a.x=d,a.y=u,a},c.prototype.clone=function(e){return Object(s.default)(e)||(e=new c),e.right=this.right,e.left=this.left,e.top=this.top,e.bottom=this.bottom,e.near=this.near,e.far=this.far,e._left=void 0,e._right=void 0,e._top=void 0,e._bottom=void 0,e._near=void 0,e._far=void 0,e},c.prototype.equals=function(e){return Object(s.default)(e)&&e instanceof c&&this.right===e.right&&this.left===e.left&&this.top===e.top&&this.bottom===e.bottom&&this.near===e.near&&this.far===e.far},c.prototype.equalsEpsilon=function(e,t,i){return e===this||Object(s.default)(e)&&e instanceof c&&u.default.equalsEpsilon(this.right,e.right,t,i)&&u.default.equalsEpsilon(this.left,e.left,t,i)&&u.default.equalsEpsilon(this.top,e.top,t,i)&&u.default.equalsEpsilon(this.bottom,e.bottom,t,i)&&u.default.equalsEpsilon(this.near,e.near,t,i)&&u.default.equalsEpsilon(this.far,e.far,t,i)},t.a=c},function(e,t,i){"use strict";var n=i(1),a={getHeight:function(e,t,i){return(e-i)*t+i}},r=new n.default;a.getPosition=function(e,t,i,o,s){var l=t.cartesianToCartographic(e,r),u=a.getHeight(l.height,i,o);return n.default.fromRadians(l.longitude,l.latitude,u,t,s)},t.a=a},function(e,t,i){"use strict";i.r(t);t.default=Object.freeze({ROTATE:0,INFINITE_SCROLL:1})},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(colorTexture, v_textureCoordinates);\n}\n"},function(e,t,i){"use strict";var n=i(3),a=i(5),r={};function o(e,t,i){var n=e+t;return a.default.sign(e)!==a.default.sign(t)&&Math.abs(n/Math.max(Math.abs(e),Math.abs(t)))l&&l/s0?[c/e,i/c]:[i/c,c/e]},t.a=r},function(e,t,i){"use strict";function n(){this._array=[],this._offset=0,this._length=0}Object.defineProperties(n.prototype,{length:{get:function(){return this._length}}}),n.prototype.enqueue=function(e){this._array.push(e),this._length++},n.prototype.dequeue=function(){if(0!==this._length){var e=this._array,t=this._offset,i=e[t];return e[t]=void 0,++t>10&&2*t>e.length&&(this._array=e.slice(t),t=0),this._offset=t,this._length--,i}},n.prototype.peek=function(){if(0!==this._length)return this._array[this._offset]},n.prototype.contains=function(e){return-1!==this._array.indexOf(e)},n.prototype.clear=function(){this._array.length=this._offset=this._length=0},n.prototype.sort=function(e){this._offset>0&&(this._array=this._array.slice(this._offset),this._offset=0),this._array.sort(e)},t.a=n},function(e,t,i){"use strict";var n=i(4),a=i(99),r=i(2),o=i(0),s=i(19);function l(e){e=Object(r.default)(e,r.default.EMPTY_OBJECT),n.a.defined("options.stages",e.stages),n.a.typeOf.number.greaterThan("options.stages.length",e.stages.length,0),this._stages=e.stages,this._inputPreviousStageTexture=Object(r.default)(e.inputPreviousStageTexture,!0);var t=e.name;Object(o.default)(t)||(t=Object(a.default)()),this._name=t,this._uniforms=e.uniforms,this._textureCache=void 0,this._index=void 0,this._selected=void 0,this._selectedShadow=void 0,this._parentSelected=void 0,this._parentSelectedShadow=void 0,this._combinedSelected=void 0,this._combinedSelectedShadow=void 0,this._selectedLength=0,this._parentSelectedLength=0,this._selectedDirty=!0}Object.defineProperties(l.prototype,{ready:{get:function(){for(var e=this._stages,t=e.length,i=0;i0){var s=Math.min(n,f.a.maximumTextureSize),l=Math.ceil(n/f.a.maximumTextureSize),u=1/s,d=.5*u,c=1/l,h=.5*c;t=new a.default(s,l),i=new r.a(u,d,c,h)}this._translucentFeaturesLength=0,this._featuresLength=n,this._textureDimensions=t,this._textureStep=i,this._owner=e.owner,this._statistics=e.statistics,this._colorChangedCallback=e.colorChangedCallback}function g(e){var t=e._textureDimensions;return t.x*t.y*4}function v(e){if(!Object(l.default)(e._batchValues)){var t=g(e),i=new Uint8Array(t);Object(n.a)(i,255),e._batchValues=i}return e._batchValues}function y(e){if(!Object(l.default)(e._showAlphaProperties)){var t=2*e._featuresLength,i=new Uint8Array(t);Object(n.a)(i,255),e._showAlphaProperties=i}return e._showAlphaProperties}function b(e,t){if(!Object(l.default)(e)||e<0||e>=t)throw new d.default("batchId is required and between zero and featuresLength - 1 ("+t-NaN)}Object.defineProperties(_.prototype,{translucentFeaturesLength:{get:function(){return this._translucentFeaturesLength}},memorySizeInBytes:{get:function(){var e=0;return Object(l.default)(this._pickTexture)&&(e+=this._pickTexture.sizeInBytes),Object(l.default)(this._batchTexture)&&(e+=this._batchTexture.sizeInBytes),e}},textureDimensions:{get:function(){return this._textureDimensions}},textureStep:{get:function(){return this._textureStep}},batchTexture:{get:function(){return this._batchTexture}},defaultTexture:{get:function(){return this._defaultTexture}},pickTexture:{get:function(){return this._pickTexture}}}),_.DEFAULT_COLOR_VALUE=s.default.WHITE,_.DEFAULT_SHOW_VALUE=!0,_.prototype.setShow=function(e,t){if(b(e,this._featuresLength),o.a.typeOf.bool("show",t),!t||Object(l.default)(this._showAlphaProperties)){var i=y(this),n=2*e,a=t?255:0;if(i[n]!==a)i[n]=a,v(this)[4*e+3]=t?i[n+1]:0,this._batchValuesDirty=!0}},_.prototype.setAllShow=function(e){o.a.typeOf.bool("show",e);for(var t=this._featuresLength,i=0;i0){for(var n=e._pickIds,a=g(e),r=new Uint8Array(a),o=e._owner,u=e._statistics,d=0;d>8&255]+Vi[e>>16&255]+Vi[e>>24&255]+"-"+Vi[255&t]+Vi[t>>8&255]+"-"+Vi[t>>16&15|64]+Vi[t>>24&255]+"-"+Vi[63&i|128]+Vi[i>>8&255]+"-"+Vi[i>>16&255]+Vi[i>>24&255]+Vi[255&n]+Vi[n>>8&255]+Vi[n>>16&255]+Vi[n>>24&255]).toLowerCase()}function qi(e,t,i){return Math.max(t,Math.min(i,e))}function Xi(e,t){return(e%t+t)%t}function Ki(e,t,i){return(1-i)*e+i*t}function Ji(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Zi(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Qi={DEG2RAD:Gi,RAD2DEG:Yi,generateUUID:Wi,clamp:qi,euclideanModulo:Xi,mapLinear:function(e,t,i,n,a){return n+(e-t)*(a-n)/(i-t)},inverseLerp:function(e,t,i){return e!==t?(i-e)/(t-e):0},lerp:Ki,damp:function(e,t,i,n){return Ki(e,t,1-Math.exp(-i*n))},pingpong:function(e,t=1){return t-Math.abs(Xi(e,2*t)-t)},smoothstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*(3-2*e)},smootherstep:function(e,t,i){return e<=t?0:e>=i?1:(e=(e-t)/(i-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(Hi=e);let t=Hi+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*Gi},radToDeg:function(e){return e*Yi},isPowerOfTwo:function(e){return 0==(e&e-1)&&0!==e},ceilPowerOfTwo:function(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},floorPowerOfTwo:function(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))},setQuaternionFromProperEuler:function(e,t,i,n,a){const r=Math.cos,o=Math.sin,s=r(i/2),l=o(i/2),u=r((t+n)/2),d=o((t+n)/2),c=r((t-n)/2),f=o((t-n)/2),h=r((n-t)/2),p=o((n-t)/2);switch(a){case"XYX":e.set(s*d,l*c,l*f,s*u);break;case"YZY":e.set(l*f,s*d,l*c,s*u);break;case"ZXZ":e.set(l*c,l*f,s*d,s*u);break;case"XZX":e.set(s*d,l*p,l*h,s*u);break;case"YXY":e.set(l*h,s*d,l*p,s*u);break;case"ZYZ":e.set(l*p,l*h,s*d,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+a)}},normalize:Zi,denormalize:Ji};class $i{constructor(e=0,t=0){$i.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,n=e.elements;return this.x=n[0]*t+n[3]*i+n[6],this.y=n[1]*t+n[4]*i+n[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(qi(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),n=Math.sin(t),a=this.x-e.x,r=this.y-e.y;return this.x=a*i-r*n+e.x,this.y=a*n+r*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class en{constructor(e,t,i,n,a,r,o,s,l){en.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,i,n,a,r,o,s,l)}set(e,t,i,n,a,r,o,s,l){const u=this.elements;return u[0]=e,u[1]=n,u[2]=o,u[3]=t,u[4]=a,u[5]=s,u[6]=i,u[7]=r,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,a=this.elements,r=i[0],o=i[3],s=i[6],l=i[1],u=i[4],d=i[7],c=i[2],f=i[5],h=i[8],p=n[0],m=n[3],_=n[6],g=n[1],v=n[4],y=n[7],b=n[2],w=n[5],O=n[8];return a[0]=r*p+o*g+s*b,a[3]=r*m+o*v+s*w,a[6]=r*_+o*y+s*O,a[1]=l*p+u*g+d*b,a[4]=l*m+u*v+d*w,a[7]=l*_+u*y+d*O,a[2]=c*p+f*g+h*b,a[5]=c*m+f*v+h*w,a[8]=c*_+f*y+h*O,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],r=e[4],o=e[5],s=e[6],l=e[7],u=e[8];return t*r*u-t*o*l-i*a*u+i*o*s+n*a*l-n*r*s}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],r=e[4],o=e[5],s=e[6],l=e[7],u=e[8],d=u*r-o*l,c=o*s-u*a,f=l*a-r*s,h=t*d+i*c+n*f;if(0===h)return this.set(0,0,0,0,0,0,0,0,0);const p=1/h;return e[0]=d*p,e[1]=(n*l-u*i)*p,e[2]=(o*i-n*r)*p,e[3]=c*p,e[4]=(u*t-n*s)*p,e[5]=(n*a-o*t)*p,e[6]=f*p,e[7]=(i*s-l*t)*p,e[8]=(r*t-i*a)*p,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,n,a,r,o){const s=Math.cos(a),l=Math.sin(a);return this.set(i*s,i*l,-i*(s*r+l*o)+r+e,-n*l,n*s,-n*(-l*r+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(tn.makeScale(e,t)),this}rotate(e){return this.premultiply(tn.makeRotation(-e)),this}translate(e,t){return this.premultiply(tn.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<9;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const tn=new en;function nn(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const an={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function rn(e,t){return new an[e](t)}function on(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function sn(){const e=on("canvas");return e.style.display="block",e}const ln={};function un(e){e in ln||(ln[e]=!0,console.warn(e))}const dn=(new en).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),cn=(new en).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),fn={[Zt]:{transfer:ei,primaries:ii,toReference:e=>e,fromReference:e=>e},[Jt]:{transfer:ti,primaries:ii,toReference:e=>e.convertSRGBToLinear(),fromReference:e=>e.convertLinearToSRGB()},[$t]:{transfer:ei,primaries:ni,toReference:e=>e.applyMatrix3(cn),fromReference:e=>e.applyMatrix3(dn)},[Qt]:{transfer:ti,primaries:ni,toReference:e=>e.convertSRGBToLinear().applyMatrix3(cn),fromReference:e=>e.applyMatrix3(dn).convertLinearToSRGB()}},hn=new Set([Zt,$t]),pn={enabled:!0,_workingColorSpace:Zt,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(e){if(!hn.has(e))throw new Error(`Unsupported working color space, "${e}".`);this._workingColorSpace=e},convert:function(e,t,i){if(!1===this.enabled||t===i||!t||!i)return e;const n=fn[t].toReference;return(0,fn[i].fromReference)(n(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this._workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this._workingColorSpace)},getPrimaries:function(e){return fn[e].primaries},getTransfer:function(e){return e===Kt?ei:fn[e].transfer}};function mn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function _n(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}let gn;class vn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===gn&&(gn=on("canvas")),gn.width=e.width,gn.height=e.height;const i=gn.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=gn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=on("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const n=i.getImageData(0,0,e.width,e.height),a=n.data;for(let e=0;e0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==de)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case _e:e.x=e.x-Math.floor(e.x);break;case ge:e.x=e.x<0?0:1;break;case ve:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case _e:e.y=e.y-Math.floor(e.y);break;case ge:e.y=e.y<0?0:1;break;case ve:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){!0===e&&this.pmremVersion++}}xn.DEFAULT_IMAGE=null,xn.DEFAULT_MAPPING=de,xn.DEFAULT_ANISOTROPY=1;class An{constructor(e=0,t=0,i=0,n=1){An.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=n}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,n){return this.x=e,this.y=t,this.z=i,this.w=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,a=this.w,r=e.elements;return this.x=r[0]*t+r[4]*i+r[8]*n+r[12]*a,this.y=r[1]*t+r[5]*i+r[9]*n+r[13]*a,this.z=r[2]*t+r[6]*i+r[10]*n+r[14]*a,this.w=r[3]*t+r[7]*i+r[11]*n+r[15]*a,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,n,a;const r=e.elements,o=r[0],s=r[4],l=r[8],u=r[1],d=r[5],c=r[9],f=r[2],h=r[6],p=r[10];if(Math.abs(s-u)<.01&&Math.abs(l-f)<.01&&Math.abs(c-h)<.01){if(Math.abs(s+u)<.1&&Math.abs(l+f)<.1&&Math.abs(c+h)<.1&&Math.abs(o+d+p-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(o+1)/2,r=(d+1)/2,m=(p+1)/2,_=(s+u)/4,g=(l+f)/4,v=(c+h)/4;return e>r&&e>m?e<.01?(i=0,n=.707106781,a=.707106781):(i=Math.sqrt(e),n=_/i,a=g/i):r>m?r<.01?(i=.707106781,n=0,a=.707106781):(n=Math.sqrt(r),i=_/n,a=v/n):m<.01?(i=.707106781,n=.707106781,a=0):(a=Math.sqrt(m),i=g/a,n=v/a),this.set(i,n,a,t),this}let m=Math.sqrt((h-c)*(h-c)+(l-f)*(l-f)+(u-s)*(u-s));return Math.abs(m)<.001&&(m=1),this.x=(h-c)/m,this.y=(l-f)/m,this.z=(u-s)/m,this.w=Math.acos((o+d+p-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Tn extends Ui{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new An(0,0,e,t),this.scissorTest=!1,this.viewport=new An(0,0,e,t);const n={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Ae,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0,count:1},i);const a=new xn(n,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);a.flipY=!1,a.generateMipmaps=i.generateMipmaps,a.internalFormat=i.internalFormat,this.textures=[];const r=i.count;for(let e=0;e=0?1:-1,n=1-t*t;if(n>Number.EPSILON){const a=Math.sqrt(n),r=Math.atan2(a,t*i);e=Math.sin(e*r)/a,o=Math.sin(o*r)/a}const a=o*i;if(s=s*e+c*a,l=l*e+f*a,u=u*e+h*a,d=d*e+p*a,e===1-o){const e=1/Math.sqrt(s*s+l*l+u*u+d*d);s*=e,l*=e,u*=e,d*=e}}e[t]=s,e[t+1]=l,e[t+2]=u,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,n,a,r){const o=i[n],s=i[n+1],l=i[n+2],u=i[n+3],d=a[r],c=a[r+1],f=a[r+2],h=a[r+3];return e[t]=o*h+u*d+s*f-l*c,e[t+1]=s*h+u*c+l*d-o*f,e[t+2]=l*h+u*f+o*c-s*d,e[t+3]=u*h-o*d-s*c-l*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,n){return this._x=e,this._y=t,this._z=i,this._w=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const i=e._x,n=e._y,a=e._z,r=e._order,o=Math.cos,s=Math.sin,l=o(i/2),u=o(n/2),d=o(a/2),c=s(i/2),f=s(n/2),h=s(a/2);switch(r){case"XYZ":this._x=c*u*d+l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d-c*f*h;break;case"YXZ":this._x=c*u*d+l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d+c*f*h;break;case"ZXY":this._x=c*u*d-l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d-c*f*h;break;case"ZYX":this._x=c*u*d-l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d+c*f*h;break;case"YZX":this._x=c*u*d+l*f*h,this._y=l*f*d+c*u*h,this._z=l*u*h-c*f*d,this._w=l*u*d-c*f*h;break;case"XZY":this._x=c*u*d-l*f*h,this._y=l*f*d-c*u*h,this._z=l*u*h+c*f*d,this._w=l*u*d+c*f*h;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+r)}return!0===t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,n=Math.sin(i);return this._x=e.x*n,this._y=e.y*n,this._z=e.z*n,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],n=t[4],a=t[8],r=t[1],o=t[5],s=t[9],l=t[2],u=t[6],d=t[10],c=i+o+d;if(c>0){const e=.5/Math.sqrt(c+1);this._w=.25/e,this._x=(u-s)*e,this._y=(a-l)*e,this._z=(r-n)*e}else if(i>o&&i>d){const e=2*Math.sqrt(1+i-o-d);this._w=(u-s)/e,this._x=.25*e,this._y=(n+r)/e,this._z=(a+l)/e}else if(o>d){const e=2*Math.sqrt(1+o-i-d);this._w=(a-l)/e,this._x=(n+r)/e,this._y=.25*e,this._z=(s+u)/e}else{const e=2*Math.sqrt(1+d-i-o);this._w=(r-n)/e,this._x=(a+l)/e,this._y=(s+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(qi(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(0===i)return this;const n=Math.min(1,t/i);return this.slerp(e,n),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,n=e._y,a=e._z,r=e._w,o=t._x,s=t._y,l=t._z,u=t._w;return this._x=i*u+r*o+n*l-a*s,this._y=n*u+r*s+a*o-i*l,this._z=a*u+r*l+i*s-n*o,this._w=r*u-i*o-n*s-a*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const i=this._x,n=this._y,a=this._z,r=this._w;let o=r*e._w+i*e._x+n*e._y+a*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=r,this._x=i,this._y=n,this._z=a,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*r+t*this._w,this._x=e*i+t*this._x,this._y=e*n+t*this._y,this._z=e*a+t*this._z,this.normalize(),this}const l=Math.sqrt(s),u=Math.atan2(l,o),d=Math.sin((1-t)*u)/l,c=Math.sin(t*u)/l;return this._w=r*d+this._w*c,this._x=i*d+this._x*c,this._y=n*d+this._y*c,this._z=a*d+this._z*c,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),n=Math.sqrt(1-i),a=Math.sqrt(i);return this.set(n*Math.sin(e),n*Math.cos(e),a*Math.sin(t),a*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class In{constructor(e=0,t=0,i=0){In.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return void 0===i&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(jn.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(jn.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[3]*i+a[6]*n,this.y=a[1]*t+a[4]*i+a[7]*n,this.z=a[2]*t+a[5]*i+a[8]*n,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,n=this.z,a=e.elements,r=1/(a[3]*t+a[7]*i+a[11]*n+a[15]);return this.x=(a[0]*t+a[4]*i+a[8]*n+a[12])*r,this.y=(a[1]*t+a[5]*i+a[9]*n+a[13])*r,this.z=(a[2]*t+a[6]*i+a[10]*n+a[14])*r,this}applyQuaternion(e){const t=this.x,i=this.y,n=this.z,a=e.x,r=e.y,o=e.z,s=e.w,l=2*(r*n-o*i),u=2*(o*t-a*n),d=2*(a*i-r*t);return this.x=t+s*l+r*d-o*u,this.y=i+s*u+o*l-a*d,this.z=n+s*d+a*u-r*l,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,n=this.z,a=e.elements;return this.x=a[0]*t+a[4]*i+a[8]*n,this.y=a[1]*t+a[5]*i+a[9]*n,this.z=a[2]*t+a[6]*i+a[10]*n,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,n=e.y,a=e.z,r=t.x,o=t.y,s=t.z;return this.x=n*s-a*o,this.y=a*r-i*s,this.z=i*o-n*r,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Ln.copy(this).projectOnVector(e),this.sub(Ln)}reflect(e){return this.sub(Ln.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(qi(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const n=Math.sin(t)*e;return this.x=n*Math.sin(i),this.y=Math.cos(t)*e,this.z=n*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),n=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=n,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=2*Math.random()-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Ln=new In,jn=new Pn;class Rn{constructor(e=new In(1/0,1/0,1/0),t=new In(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Bn),Bn.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Yn),Wn.subVectors(this.max,Yn),kn.subVectors(e.a,Yn),zn.subVectors(e.b,Yn),Un.subVectors(e.c,Yn),Vn.subVectors(zn,kn),Hn.subVectors(Un,zn),Gn.subVectors(kn,Un);let t=[0,-Vn.z,Vn.y,0,-Hn.z,Hn.y,0,-Gn.z,Gn.y,Vn.z,0,-Vn.x,Hn.z,0,-Hn.x,Gn.z,0,-Gn.x,-Vn.y,Vn.x,0,-Hn.y,Hn.x,0,-Gn.y,Gn.x,0];return!!Kn(t,kn,zn,Un,Wn)&&(t=[1,0,0,0,1,0,0,0,1],!!Kn(t,kn,zn,Un,Wn)&&(qn.crossVectors(Vn,Hn),t=[qn.x,qn.y,qn.z],Kn(t,kn,zn,Un,Wn)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Bn).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(Bn).length()),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(Nn[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Nn[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Nn[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Nn[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Nn[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Nn[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Nn[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Nn[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Nn)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Nn=[new In,new In,new In,new In,new In,new In,new In,new In],Bn=new In,Fn=new Rn,kn=new In,zn=new In,Un=new In,Vn=new In,Hn=new In,Gn=new In,Yn=new In,Wn=new In,qn=new In,Xn=new In;function Kn(e,t,i,n,a){for(let r=0,o=e.length-3;r<=o;r+=3){Xn.fromArray(e,r);const o=a.x*Math.abs(Xn.x)+a.y*Math.abs(Xn.y)+a.z*Math.abs(Xn.z),s=t.dot(Xn),l=i.dot(Xn),u=n.dot(Xn);if(Math.max(-Math.max(s,l,u),Math.min(s,l,u))>o)return!1}return!0}const Jn=new Rn,Zn=new In,Qn=new In;class $n{constructor(e=new In,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;void 0!==t?i.copy(t):Jn.setFromPoints(e).getCenter(i);let n=0;for(let t=0,a=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Zn.subVectors(e,this.center);const t=Zn.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),i=.5*(e-this.radius);this.center.addScaledVector(Zn,i/e),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Qn.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Zn.copy(e.center).add(Qn)),this.expandByPoint(Zn.copy(e.center).sub(Qn))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const ea=new In,ta=new In,ia=new In,na=new In,aa=new In,ra=new In,oa=new In;class sa{constructor(e=new In,t=new In(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,ea)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ea.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ea.copy(this.origin).addScaledVector(this.direction,t),ea.distanceToSquared(e))}distanceSqToSegment(e,t,i,n){ta.copy(e).add(t).multiplyScalar(.5),ia.copy(t).sub(e).normalize(),na.copy(this.origin).sub(ta);const a=.5*e.distanceTo(t),r=-this.direction.dot(ia),o=na.dot(this.direction),s=-na.dot(ia),l=na.lengthSq(),u=Math.abs(1-r*r);let d,c,f,h;if(u>0)if(d=r*s-o,c=r*o-s,h=a*u,d>=0)if(c>=-h)if(c<=h){const e=1/u;d*=e,c*=e,f=d*(d+r*c+2*o)+c*(r*d+c+2*s)+l}else c=a,d=Math.max(0,-(r*c+o)),f=-d*d+c*(c+2*s)+l;else c=-a,d=Math.max(0,-(r*c+o)),f=-d*d+c*(c+2*s)+l;else c<=-h?(d=Math.max(0,-(-r*a+o)),c=d>0?-a:Math.min(Math.max(-a,-s),a),f=-d*d+c*(c+2*s)+l):c<=h?(d=0,c=Math.min(Math.max(-a,-s),a),f=c*(c+2*s)+l):(d=Math.max(0,-(r*a+o)),c=d>0?a:Math.min(Math.max(-a,-s),a),f=-d*d+c*(c+2*s)+l);else c=r>0?-a:a,d=Math.max(0,-(r*c+o)),f=-d*d+c*(c+2*s)+l;return i&&i.copy(this.origin).addScaledVector(this.direction,d),n&&n.copy(ta).addScaledVector(ia,c),f}intersectSphere(e,t){ea.subVectors(e.center,this.origin);const i=ea.dot(this.direction),n=ea.dot(ea)-i*i,a=e.radius*e.radius;if(n>a)return null;const r=Math.sqrt(a-n),o=i-r,s=i+r;return s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return null===i?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,n,a,r,o,s;const l=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,c=this.origin;return l>=0?(i=(e.min.x-c.x)*l,n=(e.max.x-c.x)*l):(i=(e.max.x-c.x)*l,n=(e.min.x-c.x)*l),u>=0?(a=(e.min.y-c.y)*u,r=(e.max.y-c.y)*u):(a=(e.max.y-c.y)*u,r=(e.min.y-c.y)*u),i>r||a>n?null:((a>i||isNaN(i))&&(i=a),(r=0?(o=(e.min.z-c.z)*d,s=(e.max.z-c.z)*d):(o=(e.max.z-c.z)*d,s=(e.min.z-c.z)*d),i>s||o>n?null:((o>i||i!=i)&&(i=o),(s=0?i:n,t)))}intersectsBox(e){return null!==this.intersectBox(e,ea)}intersectTriangle(e,t,i,n,a){aa.subVectors(t,e),ra.subVectors(i,e),oa.crossVectors(aa,ra);let r,o=this.direction.dot(oa);if(o>0){if(n)return null;r=1}else{if(!(o<0))return null;r=-1,o=-o}na.subVectors(this.origin,e);const s=r*this.direction.dot(ra.crossVectors(na,ra));if(s<0)return null;const l=r*this.direction.dot(aa.cross(na));if(l<0)return null;if(s+l>o)return null;const u=-r*na.dot(oa);return u<0?null:this.at(u/o,a)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class la{constructor(e,t,i,n,a,r,o,s,l,u,d,c,f,h,p,m){la.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,i,n,a,r,o,s,l,u,d,c,f,h,p,m)}set(e,t,i,n,a,r,o,s,l,u,d,c,f,h,p,m){const _=this.elements;return _[0]=e,_[4]=t,_[8]=i,_[12]=n,_[1]=a,_[5]=r,_[9]=o,_[13]=s,_[2]=l,_[6]=u,_[10]=d,_[14]=c,_[3]=f,_[7]=h,_[11]=p,_[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new la).fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,n=1/ua.setFromMatrixColumn(e,0).length(),a=1/ua.setFromMatrixColumn(e,1).length(),r=1/ua.setFromMatrixColumn(e,2).length();return t[0]=i[0]*n,t[1]=i[1]*n,t[2]=i[2]*n,t[3]=0,t[4]=i[4]*a,t[5]=i[5]*a,t[6]=i[6]*a,t[7]=0,t[8]=i[8]*r,t[9]=i[9]*r,t[10]=i[10]*r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,n=e.y,a=e.z,r=Math.cos(i),o=Math.sin(i),s=Math.cos(n),l=Math.sin(n),u=Math.cos(a),d=Math.sin(a);if("XYZ"===e.order){const e=r*u,i=r*d,n=o*u,a=o*d;t[0]=s*u,t[4]=-s*d,t[8]=l,t[1]=i+n*l,t[5]=e-a*l,t[9]=-o*s,t[2]=a-e*l,t[6]=n+i*l,t[10]=r*s}else if("YXZ"===e.order){const e=s*u,i=s*d,n=l*u,a=l*d;t[0]=e+a*o,t[4]=n*o-i,t[8]=r*l,t[1]=r*d,t[5]=r*u,t[9]=-o,t[2]=i*o-n,t[6]=a+e*o,t[10]=r*s}else if("ZXY"===e.order){const e=s*u,i=s*d,n=l*u,a=l*d;t[0]=e-a*o,t[4]=-r*d,t[8]=n+i*o,t[1]=i+n*o,t[5]=r*u,t[9]=a-e*o,t[2]=-r*l,t[6]=o,t[10]=r*s}else if("ZYX"===e.order){const e=r*u,i=r*d,n=o*u,a=o*d;t[0]=s*u,t[4]=n*l-i,t[8]=e*l+a,t[1]=s*d,t[5]=a*l+e,t[9]=i*l-n,t[2]=-l,t[6]=o*s,t[10]=r*s}else if("YZX"===e.order){const e=r*s,i=r*l,n=o*s,a=o*l;t[0]=s*u,t[4]=a-e*d,t[8]=n*d+i,t[1]=d,t[5]=r*u,t[9]=-o*u,t[2]=-l*u,t[6]=i*d+n,t[10]=e-a*d}else if("XZY"===e.order){const e=r*s,i=r*l,n=o*s,a=o*l;t[0]=s*u,t[4]=-d,t[8]=l*u,t[1]=e*d+a,t[5]=r*u,t[9]=i*d-n,t[2]=n*d-i,t[6]=o*u,t[10]=a*d+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(ca,e,fa)}lookAt(e,t,i){const n=this.elements;return ma.subVectors(e,t),0===ma.lengthSq()&&(ma.z=1),ma.normalize(),ha.crossVectors(i,ma),0===ha.lengthSq()&&(1===Math.abs(i.z)?ma.x+=1e-4:ma.z+=1e-4,ma.normalize(),ha.crossVectors(i,ma)),ha.normalize(),pa.crossVectors(ma,ha),n[0]=ha.x,n[4]=pa.x,n[8]=ma.x,n[1]=ha.y,n[5]=pa.y,n[9]=ma.y,n[2]=ha.z,n[6]=pa.z,n[10]=ma.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,n=t.elements,a=this.elements,r=i[0],o=i[4],s=i[8],l=i[12],u=i[1],d=i[5],c=i[9],f=i[13],h=i[2],p=i[6],m=i[10],_=i[14],g=i[3],v=i[7],y=i[11],b=i[15],w=n[0],O=n[4],x=n[8],A=n[12],T=n[1],E=n[5],C=n[9],S=n[13],M=n[2],D=n[6],P=n[10],I=n[14],L=n[3],j=n[7],R=n[11],N=n[15];return a[0]=r*w+o*T+s*M+l*L,a[4]=r*O+o*E+s*D+l*j,a[8]=r*x+o*C+s*P+l*R,a[12]=r*A+o*S+s*I+l*N,a[1]=u*w+d*T+c*M+f*L,a[5]=u*O+d*E+c*D+f*j,a[9]=u*x+d*C+c*P+f*R,a[13]=u*A+d*S+c*I+f*N,a[2]=h*w+p*T+m*M+_*L,a[6]=h*O+p*E+m*D+_*j,a[10]=h*x+p*C+m*P+_*R,a[14]=h*A+p*S+m*I+_*N,a[3]=g*w+v*T+y*M+b*L,a[7]=g*O+v*E+y*D+b*j,a[11]=g*x+v*C+y*P+b*R,a[15]=g*A+v*S+y*I+b*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],n=e[8],a=e[12],r=e[1],o=e[5],s=e[9],l=e[13],u=e[2],d=e[6],c=e[10],f=e[14];return e[3]*(+a*s*d-n*l*d-a*o*c+i*l*c+n*o*f-i*s*f)+e[7]*(+t*s*f-t*l*c+a*r*c-n*r*f+n*l*u-a*s*u)+e[11]*(+t*l*d-t*o*f-a*r*d+i*r*f+a*o*u-i*l*u)+e[15]*(-n*o*u-t*s*d+t*o*c+n*r*d-i*r*c+i*s*u)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const n=this.elements;return e.isVector3?(n[12]=e.x,n[13]=e.y,n[14]=e.z):(n[12]=e,n[13]=t,n[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],n=e[2],a=e[3],r=e[4],o=e[5],s=e[6],l=e[7],u=e[8],d=e[9],c=e[10],f=e[11],h=e[12],p=e[13],m=e[14],_=e[15],g=d*m*l-p*c*l+p*s*f-o*m*f-d*s*_+o*c*_,v=h*c*l-u*m*l-h*s*f+r*m*f+u*s*_-r*c*_,y=u*p*l-h*d*l+h*o*f-r*p*f-u*o*_+r*d*_,b=h*d*s-u*p*s-h*o*c+r*p*c+u*o*m-r*d*m,w=t*g+i*v+n*y+a*b;if(0===w)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const O=1/w;return e[0]=g*O,e[1]=(p*c*a-d*m*a-p*n*f+i*m*f+d*n*_-i*c*_)*O,e[2]=(o*m*a-p*s*a+p*n*l-i*m*l-o*n*_+i*s*_)*O,e[3]=(d*s*a-o*c*a-d*n*l+i*c*l+o*n*f-i*s*f)*O,e[4]=v*O,e[5]=(u*m*a-h*c*a+h*n*f-t*m*f-u*n*_+t*c*_)*O,e[6]=(h*s*a-r*m*a-h*n*l+t*m*l+r*n*_-t*s*_)*O,e[7]=(r*c*a-u*s*a+u*n*l-t*c*l-r*n*f+t*s*f)*O,e[8]=y*O,e[9]=(h*d*a-u*p*a-h*i*f+t*p*f+u*i*_-t*d*_)*O,e[10]=(r*p*a-h*o*a+h*i*l-t*p*l-r*i*_+t*o*_)*O,e[11]=(u*o*a-r*d*a-u*i*l+t*d*l+r*i*f-t*o*f)*O,e[12]=b*O,e[13]=(u*p*n-h*d*n+h*i*c-t*p*c-u*i*m+t*d*m)*O,e[14]=(h*o*n-r*p*n-h*i*s+t*p*s+r*i*m-t*o*m)*O,e[15]=(r*d*n-u*o*n+u*i*s-t*d*s-r*i*c+t*o*c)*O,this}scale(e){const t=this.elements,i=e.x,n=e.y,a=e.z;return t[0]*=i,t[4]*=n,t[8]*=a,t[1]*=i,t[5]*=n,t[9]*=a,t[2]*=i,t[6]*=n,t[10]*=a,t[3]*=i,t[7]*=n,t[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],n=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}makeTranslation(e,t,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),n=Math.sin(t),a=1-i,r=e.x,o=e.y,s=e.z,l=a*r,u=a*o;return this.set(l*r+i,l*o-n*s,l*s+n*o,0,l*o+n*s,u*o+i,u*s-n*r,0,l*s-n*o,u*s+n*r,a*s*s+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,n,a,r){return this.set(1,i,a,0,e,1,r,0,t,n,1,0,0,0,0,1),this}compose(e,t,i){const n=this.elements,a=t._x,r=t._y,o=t._z,s=t._w,l=a+a,u=r+r,d=o+o,c=a*l,f=a*u,h=a*d,p=r*u,m=r*d,_=o*d,g=s*l,v=s*u,y=s*d,b=i.x,w=i.y,O=i.z;return n[0]=(1-(p+_))*b,n[1]=(f+y)*b,n[2]=(h-v)*b,n[3]=0,n[4]=(f-y)*w,n[5]=(1-(c+_))*w,n[6]=(m+g)*w,n[7]=0,n[8]=(h+v)*O,n[9]=(m-g)*O,n[10]=(1-(c+p))*O,n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this}decompose(e,t,i){const n=this.elements;let a=ua.set(n[0],n[1],n[2]).length();const r=ua.set(n[4],n[5],n[6]).length(),o=ua.set(n[8],n[9],n[10]).length();this.determinant()<0&&(a=-a),e.x=n[12],e.y=n[13],e.z=n[14],da.copy(this);const s=1/a,l=1/r,u=1/o;return da.elements[0]*=s,da.elements[1]*=s,da.elements[2]*=s,da.elements[4]*=l,da.elements[5]*=l,da.elements[6]*=l,da.elements[8]*=u,da.elements[9]*=u,da.elements[10]*=u,t.setFromRotationMatrix(da),i.x=a,i.y=r,i.z=o,this}makePerspective(e,t,i,n,a,r,o=ki){const s=this.elements,l=2*a/(t-e),u=2*a/(i-n),d=(t+e)/(t-e),c=(i+n)/(i-n);let f,h;if(o===ki)f=-(r+a)/(r-a),h=-2*r*a/(r-a);else{if(o!==zi)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);f=-r/(r-a),h=-r*a/(r-a)}return s[0]=l,s[4]=0,s[8]=d,s[12]=0,s[1]=0,s[5]=u,s[9]=c,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=h,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,i,n,a,r,o=ki){const s=this.elements,l=1/(t-e),u=1/(i-n),d=1/(r-a),c=(t+e)*l,f=(i+n)*u;let h,p;if(o===ki)h=(r+a)*d,p=-2*d;else{if(o!==zi)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);h=a*d,p=-1*d}return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-c,s[1]=0,s[5]=2*u,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=p,s[14]=-h,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let e=0;e<16;e++)if(t[e]!==i[e])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const ua=new In,da=new la,ca=new In(0,0,0),fa=new In(1,1,1),ha=new In,pa=new In,ma=new In,_a=new la,ga=new Pn;class va{constructor(e=0,t=0,i=0,n=va.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=n}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,n=this._order){return this._x=e,this._y=t,this._z=i,this._order=n,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const n=e.elements,a=n[0],r=n[4],o=n[8],s=n[1],l=n[5],u=n[9],d=n[2],c=n[6],f=n[10];switch(t){case"XYZ":this._y=Math.asin(qi(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-r,a)):(this._x=Math.atan2(c,l),this._z=0);break;case"YXZ":this._x=Math.asin(-qi(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(o,f),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-d,a),this._z=0);break;case"ZXY":this._x=Math.asin(qi(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-r,l)):(this._y=0,this._z=Math.atan2(s,a));break;case"ZYX":this._y=Math.asin(-qi(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(c,f),this._z=Math.atan2(s,a)):(this._x=0,this._z=Math.atan2(-r,l));break;case"YZX":this._z=Math.asin(qi(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-d,a)):(this._x=0,this._y=Math.atan2(o,f));break;case"XZY":this._z=Math.asin(-qi(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(c,l),this._y=Math.atan2(o,a)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===i&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return _a.makeRotationFromQuaternion(e),this.setFromRotationMatrix(_a,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ga.setFromEuler(this),this.setFromQuaternion(ga,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}va.DEFAULT_ORDER="XYZ";class ya{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0&&(n.userData=this.userData),n.layers=this.layers.mask,n.matrix=this.matrix.toArray(),n.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),this.isInstancedMesh&&(n.type="InstancedMesh",n.count=this.count,n.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(n.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(n.type="BatchedMesh",n.perObjectFrustumCulled=this.perObjectFrustumCulled,n.sortObjects=this.sortObjects,n.drawRanges=this._drawRanges,n.reservedRanges=this._reservedRanges,n.visibility=this._visibility,n.active=this._active,n.bounds=this._bounds.map(e=>({boxInitialized:e.boxInitialized,boxMin:e.box.min.toArray(),boxMax:e.box.max.toArray(),sphereInitialized:e.sphereInitialized,sphereRadius:e.sphere.radius,sphereCenter:e.sphere.center.toArray()})),n.maxGeometryCount=this._maxGeometryCount,n.maxVertexCount=this._maxVertexCount,n.maxIndexCount=this._maxIndexCount,n.geometryInitialized=this._geometryInitialized,n.geometryCount=this._geometryCount,n.matricesTexture=this._matricesTexture.toJSON(e),null!==this.boundingSphere&&(n.boundingSphere={center:n.boundingSphere.center.toArray(),radius:n.boundingSphere.radius}),null!==this.boundingBox&&(n.boundingBox={min:n.boundingBox.min.toArray(),max:n.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?n.background=this.background.toJSON():this.background.isTexture&&(n.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(n.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){n.geometry=a(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const i=t.shapes;if(Array.isArray(i))for(let t=0,n=i.length;t0){n.children=[];for(let t=0;t0){n.animations=[];for(let t=0;t0&&(i.geometries=t),n.length>0&&(i.materials=n),a.length>0&&(i.textures=a),o.length>0&&(i.images=o),s.length>0&&(i.shapes=s),l.length>0&&(i.skeletons=l),u.length>0&&(i.animations=u),d.length>0&&(i.nodes=d)}return i.object=n,i;function r(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?n.multiplyScalar(1/Math.sqrt(a)):n.set(0,0,0)}static getBarycoord(e,t,i,n,a){Na.subVectors(n,t),Ba.subVectors(i,t),Fa.subVectors(e,t);const r=Na.dot(Na),o=Na.dot(Ba),s=Na.dot(Fa),l=Ba.dot(Ba),u=Ba.dot(Fa),d=r*l-o*o;if(0===d)return a.set(0,0,0),null;const c=1/d,f=(l*s-o*u)*c,h=(r*u-o*s)*c;return a.set(1-f-h,h,f)}static containsPoint(e,t,i,n){return null!==this.getBarycoord(e,t,i,n,ka)&&(ka.x>=0&&ka.y>=0&&ka.x+ka.y<=1)}static getInterpolation(e,t,i,n,a,r,o,s){return null===this.getBarycoord(e,t,i,n,ka)?(s.x=0,s.y=0,"z"in s&&(s.z=0),"w"in s&&(s.w=0),null):(s.setScalar(0),s.addScaledVector(a,ka.x),s.addScaledVector(r,ka.y),s.addScaledVector(o,ka.z),s)}static isFrontFacing(e,t,i,n){return Na.subVectors(i,t),Ba.subVectors(e,t),Na.cross(Ba).dot(n)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,n){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[n]),this}setFromAttributeAndIndices(e,t,i,n){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Na.subVectors(this.c,this.b),Ba.subVectors(this.a,this.b),.5*Na.cross(Ba).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Wa.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Wa.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,n,a){return Wa.getInterpolation(e,this.a,this.b,this.c,t,i,n,a)}containsPoint(e){return Wa.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Wa.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,n=this.b,a=this.c;let r,o;za.subVectors(n,i),Ua.subVectors(a,i),Ha.subVectors(e,i);const s=za.dot(Ha),l=Ua.dot(Ha);if(s<=0&&l<=0)return t.copy(i);Ga.subVectors(e,n);const u=za.dot(Ga),d=Ua.dot(Ga);if(u>=0&&d<=u)return t.copy(n);const c=s*d-u*l;if(c<=0&&s>=0&&u<=0)return r=s/(s-u),t.copy(i).addScaledVector(za,r);Ya.subVectors(e,a);const f=za.dot(Ya),h=Ua.dot(Ya);if(h>=0&&f<=h)return t.copy(a);const p=f*l-s*h;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(Ua,o);const m=u*h-f*d;if(m<=0&&d-u>=0&&f-h>=0)return Va.subVectors(a,n),o=(d-u)/(d-u+(f-h)),t.copy(n).addScaledVector(Va,o);const _=1/(m+p+c);return r=p*_,o=c*_,t.copy(i).addScaledVector(za,r).addScaledVector(Ua,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const qa={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},Xa={h:0,s:0,l:0},Ka={h:0,s:0,l:0};function Ja(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+6*(t-e)*(2/3-i):e}class Za{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(void 0===t&&void 0===i){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Jt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,pn.toWorkingColorSpace(this,t),this}setRGB(e,t,i,n=pn.workingColorSpace){return this.r=e,this.g=t,this.b=i,pn.toWorkingColorSpace(this,n),this}setHSL(e,t,i,n=pn.workingColorSpace){if(e=Xi(e,1),t=qi(t,0,1),i=qi(i,0,1),0===t)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+t):i+t-i*t,a=2*i-n;this.r=Ja(a,n,e+1/3),this.g=Ja(a,n,e),this.b=Ja(a,n,e-1/3)}return pn.toWorkingColorSpace(this,n),this}setStyle(e,t=Jt){function i(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let n;if(n=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const r=n[1],o=n[2];switch(r){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,t);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,t);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(e)){const i=n[1],a=i.length;if(3===a)return this.setRGB(parseInt(i.charAt(0),16)/15,parseInt(i.charAt(1),16)/15,parseInt(i.charAt(2),16)/15,t);if(6===a)return this.setHex(parseInt(i,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Jt){const i=qa[e.toLowerCase()];return void 0!==i?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=mn(e.r),this.g=mn(e.g),this.b=mn(e.b),this}copyLinearToSRGB(e){return this.r=_n(e.r),this.g=_n(e.g),this.b=_n(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Jt){return pn.fromWorkingColorSpace(Qa.copy(this),e),65536*Math.round(qi(255*Qa.r,0,255))+256*Math.round(qi(255*Qa.g,0,255))+Math.round(qi(255*Qa.b,0,255))}getHexString(e=Jt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=pn.workingColorSpace){pn.fromWorkingColorSpace(Qa.copy(this),t);const i=Qa.r,n=Qa.g,a=Qa.b,r=Math.max(i,n,a),o=Math.min(i,n,a);let s,l;const u=(o+r)/2;if(o===r)s=0,l=0;else{const e=r-o;switch(l=u<=.5?e/(r+o):e/(2-r-o),r){case i:s=(n-a)/e+(n0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const i=e[t];if(void 0===i){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const n=this[t];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[t]=i:console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function n(e){const t=[];for(const i in e){const n=e[i];delete n.metadata,t.push(n)}return t}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapRotation&&(i.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==v&&(i.blending=this.blending),this.side!==p&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),this.blendSrc!==I&&(i.blendSrc=this.blendSrc),this.blendDst!==L&&(i.blendDst=this.blendDst),this.blendEquation!==x&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==W&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==yi&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ri&&(i.stencilFail=this.stencilFail),this.stencilZFail!==ri&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==ri&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),t){const t=n(e.textures),a=n(e.images);t.length>0&&(i.textures=t),a.length>0&&(i.images=a)}return i}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(null!==t){const e=t.length;i=new Array(e);for(let n=0;n!==e;++n)i[n]=t[n].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class tr extends er{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Za(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new va,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const ir=nr();function nr(){const e=new ArrayBuffer(4),t=new Float32Array(e),i=new Uint32Array(e),n=new Uint32Array(512),a=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(n[e]=0,n[256|e]=32768,a[e]=24,a[256|e]=24):t<-14?(n[e]=1024>>-t-14,n[256|e]=1024>>-t-14|32768,a[e]=-t-1,a[256|e]=-t-1):t<=15?(n[e]=t+15<<10,n[256|e]=t+15<<10|32768,a[e]=13,a[256|e]=13):t<128?(n[e]=31744,n[256|e]=64512,a[e]=24,a[256|e]=24):(n[e]=31744,n[256|e]=64512,a[e]=13,a[256|e]=13)}const r=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,i=0;for(;0==(8388608&t);)t<<=1,i-=8388608;t&=-8388609,i+=947912704,r[e]=t|i}for(let e=1024;e<2048;++e)r[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:i,baseTable:n,shiftTable:a,mantissaTable:r,exponentTable:o,offsetTable:s}}function ar(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=qi(e,-65504,65504),ir.floatView[0]=e;const t=ir.uint32View[0],i=t>>23&511;return ir.baseTable[i]+((8388607&t)>>ir.shiftTable[i])}function rr(e){const t=e>>10;return ir.uint32View[0]=ir.mantissaTable[ir.offsetTable[t]+(1023&e)]+ir.exponentTable[t],ir.floatView[0]}const or={toHalfFloat:ar,fromHalfFloat:rr},sr=new In,lr=new $i;class ur{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=i,this.usage=Si,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Re,this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return un("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let n=0,a=this.itemSize;n0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const i in t)void 0!==t[i]&&(e[i]=t[i]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const t in i){const n=i[t];e.data.attributes[t]=n.toJSON(e.data)}const n={};let a=!1;for(const t in this.morphAttributes){const i=this.morphAttributes[t],r=[];for(let t=0,n=i.length;t0&&(n[t]=r,a=!0)}a&&(e.data.morphAttributes=n,e.data.morphTargetsRelative=this.morphTargetsRelative);const r=this.groups;r.length>0&&(e.data.groups=JSON.parse(JSON.stringify(r)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;null!==i&&this.setIndex(i.clone(t));const n=e.attributes;for(const e in n){const i=n[e];this.setAttribute(e,i.clone(t))}const a=e.morphAttributes;for(const e in a){const i=[],n=a[e];for(let e=0,a=n.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e(e.far-e.near)**2)return}Cr.copy(a).invert(),Sr.copy(e.ray).applyMatrix4(Cr),null!==i.boundingBox&&!1===Sr.intersectsBox(i.boundingBox)||this._computeIntersections(e,t,Sr)}}_computeIntersections(e,t,i){let n;const a=this.geometry,r=this.material,o=a.index,s=a.attributes.position,l=a.attributes.uv,u=a.attributes.uv1,d=a.attributes.normal,c=a.groups,f=a.drawRange;if(null!==o)if(Array.isArray(r))for(let a=0,s=c.length;ai.far?null:{distance:u,point:Hr.clone(),object:e}}(e,t,i,n,Pr,Ir,Lr,Vr);if(d){a&&(Nr.fromBufferAttribute(a,s),Br.fromBufferAttribute(a,l),Fr.fromBufferAttribute(a,u),d.uv=Wa.getInterpolation(Vr,Pr,Ir,Lr,Nr,Br,Fr,new $i)),r&&(Nr.fromBufferAttribute(r,s),Br.fromBufferAttribute(r,l),Fr.fromBufferAttribute(r,u),d.uv1=Wa.getInterpolation(Vr,Pr,Ir,Lr,Nr,Br,Fr,new $i)),o&&(kr.fromBufferAttribute(o,s),zr.fromBufferAttribute(o,l),Ur.fromBufferAttribute(o,u),d.normal=Wa.getInterpolation(Vr,Pr,Ir,Lr,kr,zr,Ur,new In),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));const e={a:s,b:l,c:u,normal:new In,materialIndex:0};Wa.getNormal(Pr,Ir,Lr,e.normal),d.face=e}return d}class Wr extends Er{constructor(e=1,t=1,i=1,n=1,a=1,r=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:n,heightSegments:a,depthSegments:r};const o=this;n=Math.floor(n),a=Math.floor(a),r=Math.floor(r);const s=[],l=[],u=[],d=[];let c=0,f=0;function h(e,t,i,n,a,r,h,p,m,_,g){const v=r/m,y=h/_,b=r/2,w=h/2,O=p/2,x=m+1,A=_+1;let T=0,E=0;const C=new In;for(let r=0;r0?1:-1,u.push(C.x,C.y,C.z),d.push(s/m),d.push(1-r/_),T+=1}}for(let e=0;e<_;e++)for(let t=0;t0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const e in this.extensions)!0===this.extensions[e]&&(i[e]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class Qr extends Ra{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new la,this.projectionMatrix=new la,this.projectionMatrixInverse=new la,this.coordinateSystem=ki}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const $r=new In,eo=new $i,to=new $i;class io extends Qr{constructor(e=50,t=1,i=.1,n=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=n,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*Yi*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Gi*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*Yi*Math.atan(Math.tan(.5*Gi*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){$r.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set($r.x,$r.y).multiplyScalar(-e/$r.z),$r.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set($r.x,$r.y).multiplyScalar(-e/$r.z)}getViewSize(e,t){return this.getViewBounds(e,eo,to),t.subVectors(to,eo)}setViewOffset(e,t,i,n,a,r){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*Gi*this.fov)/this.zoom,i=2*t,n=this.aspect*i,a=-.5*n;const r=this.view;if(null!==this.view&&this.view.enabled){const e=r.fullWidth,o=r.fullHeight;a+=r.offsetX*n/e,t-=r.offsetY*i/o,n*=r.width/e,i*=r.height/o}const o=this.filmOffset;0!==o&&(a+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+n,t,t-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return 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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}class no extends Ra{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const n=new io(-90,1,e,t);n.layers=this.layers,this.add(n);const a=new io(-90,1,e,t);a.layers=this.layers,this.add(a);const r=new io(-90,1,e,t);r.layers=this.layers,this.add(r);const o=new io(-90,1,e,t);o.layers=this.layers,this.add(o);const s=new io(-90,1,e,t);s.layers=this.layers,this.add(s);const l=new io(-90,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,n,a,r,o,s]=t;for(const e of t)this.remove(e);if(e===ki)i.up.set(0,1,0),i.lookAt(1,0,0),n.up.set(0,1,0),n.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),r.up.set(0,0,1),r.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),s.up.set(0,1,0),s.lookAt(0,0,-1);else{if(e!==zi)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);i.up.set(0,-1,0),i.lookAt(-1,0,0),n.up.set(0,-1,0),n.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),r.up.set(0,0,-1),r.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),s.up.set(0,-1,0),s.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:n}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,r,o,s,l,u]=this.children,d=e.getRenderTarget(),c=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),h=e.xr.enabled;e.xr.enabled=!1;const p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,n),e.render(t,a),e.setRenderTarget(i,1,n),e.render(t,r),e.setRenderTarget(i,2,n),e.render(t,o),e.setRenderTarget(i,3,n),e.render(t,s),e.setRenderTarget(i,4,n),e.render(t,l),i.texture.generateMipmaps=p,e.setRenderTarget(i,5,n),e.render(t,u),e.setRenderTarget(d,c,f),e.xr.enabled=h,i.texture.needsPMREMUpdate=!0}}class ao extends xn{constructor(e,t,i,n,a,r,o,s,l,u){super(e=void 0!==e?e:[],t=void 0!==t?t:ce,i,n,a,r,o,s,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class ro extends En{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},n=[i,i,i,i,i,i];this.texture=new ao(n,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:Ae}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},n=new Wr(5,5,5),a=new Zr({name:"CubemapFromEquirect",uniforms:qr(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:m,blending:g});a.uniforms.tEquirect.value=t;const r=new Gr(n,a),o=t.minFilter;t.minFilter===Ce&&(t.minFilter=Ae);return new no(1,10,this).update(e,r),t.minFilter=o,r.geometry.dispose(),r.material.dispose(),this}clear(e,t,i,n){const a=e.getRenderTarget();for(let a=0;a<6;a++)e.setRenderTarget(this,a),e.clear(t,i,n);e.setRenderTarget(a)}}const oo=new In,so=new In,lo=new en;class uo{constructor(e=new In(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,n){return this.normal.set(e,t,i),this.constant=n,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const n=oo.subVectors(i,t).cross(so.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(n,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(oo),n=this.normal.dot(i);if(0===n)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/n;return a<0||a>1?null:t.copy(e.start).addScaledVector(i,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||lo.getNormalMatrix(e),n=this.coplanarPoint(oo).applyMatrix4(e),a=this.normal.applyMatrix3(i).normalize();return this.constant=-n.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const co=new $n,fo=new In;class ho{constructor(e=new uo,t=new uo,i=new uo,n=new uo,a=new uo,r=new uo){this.planes=[e,t,i,n,a,r]}set(e,t,i,n,a,r){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(i),o[3].copy(n),o[4].copy(a),o[5].copy(r),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=ki){const i=this.planes,n=e.elements,a=n[0],r=n[1],o=n[2],s=n[3],l=n[4],u=n[5],d=n[6],c=n[7],f=n[8],h=n[9],p=n[10],m=n[11],_=n[12],g=n[13],v=n[14],y=n[15];if(i[0].setComponents(s-a,c-l,m-f,y-_).normalize(),i[1].setComponents(s+a,c+l,m+f,y+_).normalize(),i[2].setComponents(s+r,c+u,m+h,y+g).normalize(),i[3].setComponents(s-r,c-u,m-h,y-g).normalize(),i[4].setComponents(s-o,c-d,m-p,y-v).normalize(),t===ki)i[5].setComponents(s+o,c+d,m+p,y+v).normalize();else{if(t!==zi)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);i[5].setComponents(o,d,p,v).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),co.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),co.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(co)}intersectsSprite(e){return co.center.set(0,0,0),co.radius=.7071067811865476,co.applyMatrix4(e.matrixWorld),this.intersectsSphere(co)}intersectsSphere(e){const t=this.planes,i=e.center,n=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(i)0?e.max.x:e.min.x,fo.y=n.normal.y>0?e.max.y:e.min.y,fo.z=n.normal.z>0?e.max.z:e.min.z,n.distanceToPoint(fo)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function po(){let e=null,t=!1,i=null,n=null;function a(t,r){i(t,r),n=e.requestAnimationFrame(a)}return{start:function(){!0!==t&&null!==i&&(n=e.requestAnimationFrame(a),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(e){i=e},setContext:function(t){e=t}}}function mo(e){const t=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),t.get(e)},remove:function(i){i.isInterleavedBufferAttribute&&(i=i.data);const n=t.get(i);n&&(e.deleteBuffer(n.buffer),t.delete(i))},update:function(i,n){if(i.isGLBufferAttribute){const e=t.get(i);return void((!e||e.version 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn sRGBTransferOETF( value );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( LEGACY_LIGHTS )\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#else\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[MORPHTARGETS_COUNT];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t#endif\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\t#ifndef USE_INSTANCING_MORPH\n\t\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\t#endif\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tfloat startCompression = 0.8 - 0.04;\n\tfloat desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min(color.r, min(color.g, color.b));\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max(color.r, max(color.g, color.b));\n\tif (peak < startCompression) return color;\n\tfloat d = 1. - startCompression;\n\tfloat newPeak = 1. - d * d / (peak + d - startCompression);\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / (desaturation * (peak - newPeak) + 1.);\n\treturn mix(color, newPeak * vec3(1, 1, 1), g);\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},vo={common:{diffuse:{value:new Za(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new en},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new en}},envmap:{envMap:{value:null},envMapRotation:{value:new en},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new en}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new en}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new en},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new en},normalScale:{value:new $i(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new en},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new en}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new en}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new en}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Za(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Za(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0},uvTransform:{value:new en}},sprite:{diffuse:{value:new Za(16777215)},opacity:{value:1},center:{value:new $i(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new en},alphaMap:{value:null},alphaMapTransform:{value:new en},alphaTest:{value:0}}},yo={basic:{uniforms:Xr([vo.common,vo.specularmap,vo.envmap,vo.aomap,vo.lightmap,vo.fog]),vertexShader:go.meshbasic_vert,fragmentShader:go.meshbasic_frag},lambert:{uniforms:Xr([vo.common,vo.specularmap,vo.envmap,vo.aomap,vo.lightmap,vo.emissivemap,vo.bumpmap,vo.normalmap,vo.displacementmap,vo.fog,vo.lights,{emissive:{value:new Za(0)}}]),vertexShader:go.meshlambert_vert,fragmentShader:go.meshlambert_frag},phong:{uniforms:Xr([vo.common,vo.specularmap,vo.envmap,vo.aomap,vo.lightmap,vo.emissivemap,vo.bumpmap,vo.normalmap,vo.displacementmap,vo.fog,vo.lights,{emissive:{value:new Za(0)},specular:{value:new Za(1118481)},shininess:{value:30}}]),vertexShader:go.meshphong_vert,fragmentShader:go.meshphong_frag},standard:{uniforms:Xr([vo.common,vo.envmap,vo.aomap,vo.lightmap,vo.emissivemap,vo.bumpmap,vo.normalmap,vo.displacementmap,vo.roughnessmap,vo.metalnessmap,vo.fog,vo.lights,{emissive:{value:new Za(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:go.meshphysical_vert,fragmentShader:go.meshphysical_frag},toon:{uniforms:Xr([vo.common,vo.aomap,vo.lightmap,vo.emissivemap,vo.bumpmap,vo.normalmap,vo.displacementmap,vo.gradientmap,vo.fog,vo.lights,{emissive:{value:new Za(0)}}]),vertexShader:go.meshtoon_vert,fragmentShader:go.meshtoon_frag},matcap:{uniforms:Xr([vo.common,vo.bumpmap,vo.normalmap,vo.displacementmap,vo.fog,{matcap:{value:null}}]),vertexShader:go.meshmatcap_vert,fragmentShader:go.meshmatcap_frag},points:{uniforms:Xr([vo.points,vo.fog]),vertexShader:go.points_vert,fragmentShader:go.points_frag},dashed:{uniforms:Xr([vo.common,vo.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:go.linedashed_vert,fragmentShader:go.linedashed_frag},depth:{uniforms:Xr([vo.common,vo.displacementmap]),vertexShader:go.depth_vert,fragmentShader:go.depth_frag},normal:{uniforms:Xr([vo.common,vo.bumpmap,vo.normalmap,vo.displacementmap,{opacity:{value:1}}]),vertexShader:go.meshnormal_vert,fragmentShader:go.meshnormal_frag},sprite:{uniforms:Xr([vo.sprite,vo.fog]),vertexShader:go.sprite_vert,fragmentShader:go.sprite_frag},background:{uniforms:{uvTransform:{value:new en},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:go.background_vert,fragmentShader:go.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new en}},vertexShader:go.backgroundCube_vert,fragmentShader:go.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:go.cube_vert,fragmentShader:go.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:go.equirect_vert,fragmentShader:go.equirect_frag},distanceRGBA:{uniforms:Xr([vo.common,vo.displacementmap,{referencePosition:{value:new In},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:go.distanceRGBA_vert,fragmentShader:go.distanceRGBA_frag},shadow:{uniforms:Xr([vo.lights,vo.fog,{color:{value:new Za(0)},opacity:{value:1}}]),vertexShader:go.shadow_vert,fragmentShader:go.shadow_frag}};yo.physical={uniforms:Xr([yo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new en},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new en},clearcoatNormalScale:{value:new $i(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new en},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new en},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new en},sheen:{value:0},sheenColor:{value:new Za(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new en},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new en},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new en},transmissionSamplerSize:{value:new $i},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new en},attenuationDistance:{value:0},attenuationColor:{value:new Za(0)},specularColor:{value:new Za(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new en},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new en},anisotropyVector:{value:new $i},anisotropyMap:{value:null},anisotropyMapTransform:{value:new en}}]),vertexShader:go.meshphysical_vert,fragmentShader:go.meshphysical_frag};const bo={r:0,b:0,g:0},wo=new va,Oo=new la;function xo(e,t,i,n,a,r,o){const s=new Za(0);let l,u,d=!0===r?0:1,c=null,f=0,h=null;function _(t,i){t.getRGB(bo,Kr(e)),n.buffers.color.setClear(bo.r,bo.g,bo.b,i,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),d=t,_(s,d)},getClearAlpha:function(){return d},setClearAlpha:function(e){d=e,_(s,d)},render:function(r,g){let v=!1,y=!0===g.isScene?g.background:null;if(y&&y.isTexture){y=(g.backgroundBlurriness>0?i:t).get(y)}null===y?_(s,d):y&&y.isColor&&(_(y,1),v=!0);const b=e.xr.getEnvironmentBlendMode();"additive"===b?n.buffers.color.setClear(0,0,0,1,o):"alpha-blend"===b&&n.buffers.color.setClear(0,0,0,0,o),(e.autoClear||v)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),y&&(y.isCubeTexture||y.mapping===me)?(void 0===u&&(u=new Gr(new Wr(1,1,1),new Zr({name:"BackgroundCubeMaterial",uniforms:qr(yo.backgroundCube.uniforms),vertexShader:yo.backgroundCube.vertexShader,fragmentShader:yo.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(e,t,i){this.matrixWorld.copyPosition(i.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),a.update(u)),wo.copy(g.backgroundRotation),wo.x*=-1,wo.y*=-1,wo.z*=-1,y.isCubeTexture&&!1===y.isRenderTargetTexture&&(wo.y*=-1,wo.z*=-1),u.material.uniforms.envMap.value=y,u.material.uniforms.flipEnvMap.value=y.isCubeTexture&&!1===y.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=g.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(Oo.makeRotationFromEuler(wo)),u.material.toneMapped=pn.getTransfer(y.colorSpace)!==ti,c===y&&f===y.version&&h===e.toneMapping||(u.material.needsUpdate=!0,c=y,f=y.version,h=e.toneMapping),u.layers.enableAll(),r.unshift(u,u.geometry,u.material,0,0,null)):y&&y.isTexture&&(void 0===l&&(l=new Gr(new _o(2,2),new Zr({name:"BackgroundMaterial",uniforms:qr(yo.background.uniforms),vertexShader:yo.background.vertexShader,fragmentShader:yo.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),a.update(l)),l.material.uniforms.t2D.value=y,l.material.uniforms.backgroundIntensity.value=g.backgroundIntensity,l.material.toneMapped=pn.getTransfer(y.colorSpace)!==ti,!0===y.matrixAutoUpdate&&y.updateMatrix(),l.material.uniforms.uvTransform.value.copy(y.matrix),c===y&&f===y.version&&h===e.toneMapping||(l.material.needsUpdate=!0,c=y,f=y.version,h=e.toneMapping),l.layers.enableAll(),r.unshift(l,l.geometry,l.material,0,0,null))}}}function Ao(e,t){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),n={},a=u(null);let r=a,o=!1;function s(t){return e.bindVertexArray(t)}function l(t){return e.deleteVertexArray(t)}function u(e){const t=[],n=[],a=[];for(let e=0;e=0){const i=a[t];let n=o[t];if(void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor)),void 0===i)return!0;if(i.attribute!==n)return!0;if(n&&i.data!==n.data)return!0;s++}}return r.attributesNum!==s||r.index!==n}(i,m,l,_),g&&function(e,t,i,n){const a={},o=t.attributes;let s=0;const l=i.getAttributes();for(const t in l){if(l[t].location>=0){let i=o[t];void 0===i&&("instanceMatrix"===t&&e.instanceMatrix&&(i=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(i=e.instanceColor));const n={};n.attribute=i,i&&i.data&&(n.data=i.data),a[t]=n,s++}}r.attributes=a,r.attributesNum=s,r.index=n}(i,m,l,_),null!==_&&t.update(_,e.ELEMENT_ARRAY_BUFFER),(g||o)&&(o=!1,function(i,n,a,r){d();const o=r.attributes,s=a.getAttributes(),l=n.defaultAttributeValues;for(const n in s){const a=s[n];if(a.location>=0){let s=o[n];if(void 0===s&&("instanceMatrix"===n&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===n&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){const n=s.normalized,o=s.itemSize,l=t.get(s);if(void 0===l)continue;const u=l.buffer,d=l.type,h=l.bytesPerElement,m=d===e.INT||d===e.UNSIGNED_INT||s.gpuType===Le;if(s.isInterleavedBufferAttribute){const t=s.data,l=t.stride,_=s.offset;if(t.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let r=void 0!==i.precision?i.precision:"highp";const o=a(r);o!==r&&(console.warn("THREE.WebGLRenderer:",r,"not supported, using",o,"instead."),r=o);const s=!0===i.logarithmicDepthBuffer,l=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),u=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==n)return n;if(!0===t.has("EXT_texture_filter_anisotropic")){const i=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n},getMaxPrecision:a,precision:r,logarithmicDepthBuffer:s,maxTextures:l,maxVertexTextures:u,maxTextureSize:e.getParameter(e.MAX_TEXTURE_SIZE),maxCubemapSize:e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:e.getParameter(e.MAX_VERTEX_ATTRIBS),maxVertexUniforms:e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:e.getParameter(e.MAX_VARYING_VECTORS),maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:u>0,maxSamples:e.getParameter(e.MAX_SAMPLES)}}function Co(e){const t=this;let i=null,n=0,a=!1,r=!1;const o=new uo,s=new en,l={value:null,needsUpdate:!1};function u(e,i,n,a){const r=null!==e?e.length:0;let u=null;if(0!==r){if(u=l.value,!0!==a||null===u){const t=n+4*r,a=i.matrixWorldInverse;s.getNormalMatrix(a),(null===u||u.length0);t.numPlanes=n,t.numIntersection=0}();else{const e=r?0:n,t=4*e;let a=p.clippingState||null;l.value=a,a=u(c,s,t,d);for(let e=0;e!==t;++e)a[e]=i[e];p.clippingState=a,this.numIntersection=f?this.numPlanes:0,this.numPlanes+=e}}}function So(e){let t=new WeakMap;function i(e,t){return t===he?e.mapping=ce:t===pe&&(e.mapping=fe),e}function n(e){const i=e.target;i.removeEventListener("dispose",n);const a=t.get(i);void 0!==a&&(t.delete(i),a.dispose())}return{get:function(a){if(a&&a.isTexture){const r=a.mapping;if(r===he||r===pe){if(t.has(a)){return i(t.get(a).texture,a.mapping)}{const r=a.image;if(r&&r.height>0){const o=new ro(r.height);return o.fromEquirectangularTexture(e,a),t.set(a,o),a.addEventListener("dispose",n),i(o.texture,a.mapping)}return null}}}return a},dispose:function(){t=new WeakMap}}}class Mo extends Qr{constructor(e=-1,t=1,i=1,n=-1,a=.1,r=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=n,this.near=a,this.far=r,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,i,n,a,r){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=n,this.view.width=a,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2;let a=i-e,r=i+e,o=n+t,s=n-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=e*this.view.offsetX,r=a+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(a,r,o,s,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return 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,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const Do=[.125,.215,.35,.446,.526,.582],Po=new Mo,Io=new Za;let Lo=null,jo=0,Ro=0,No=!1;const Bo=(1+Math.sqrt(5))/2,Fo=1/Bo,ko=[new In(1,1,1),new In(-1,1,1),new In(1,1,-1),new In(-1,1,-1),new In(0,Bo,Fo),new In(0,Bo,-Fo),new In(Fo,0,Bo),new In(-Fo,0,Bo),new In(Bo,Fo,0),new In(-Bo,Fo,0)];class zo{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,n=100){Lo=this._renderer.getRenderTarget(),jo=this._renderer.getActiveCubeFace(),Ro=this._renderer.getActiveMipmapLevel(),No=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,i,n,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Go(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Ho(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?s=Do[o-e+4-1]:0===o&&(s=0),n.push(s);const l=1/(r-2),u=-l,d=1+l,c=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,h=6,p=3,m=2,_=1,g=new Float32Array(p*h*f),v=new Float32Array(m*h*f),y=new Float32Array(_*h*f);for(let e=0;e2?0:-1,n=[t,i,0,t+2/3,i,0,t+2/3,i+1,0,t,i,0,t+2/3,i+1,0,t,i+1,0];g.set(n,p*h*e),v.set(c,m*h*e);const a=[e,e,e,e,e,e];y.set(a,_*h*e)}const b=new Er;b.setAttribute("position",new ur(g,p)),b.setAttribute("uv",new ur(v,m)),b.setAttribute("faceIndex",new ur(y,_)),t.push(b),a>4&&a--}return{lodPlanes:t,sizeLods:i,sigmas:n}}(n)),this._blurMaterial=function(e,t,i){const n=new Float32Array(20),a=new In(0,1,0);return new Zr({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/i,CUBEUV_MAX_MIP:e+".0"},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:a}},vertexShader:Yo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:g,depthTest:!1,depthWrite:!1})}(n,e,t)}return n}_compileMaterial(e){const t=new Gr(this._lodPlanes[0],e);this._renderer.compile(t,Po)}_sceneToCubeUV(e,t,i,n){const a=new io(90,1,t,i),r=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,u=s.toneMapping;s.getClearColor(Io),s.toneMapping=ee,s.autoClear=!1;const d=new tr({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),c=new Gr(new Wr,d);let f=!1;const h=e.background;h?h.isColor&&(d.color.copy(h),e.background=null,f=!0):(d.color.copy(Io),f=!0);for(let t=0;t<6;t++){const i=t%3;0===i?(a.up.set(0,r[t],0),a.lookAt(o[t],0,0)):1===i?(a.up.set(0,0,r[t]),a.lookAt(0,o[t],0)):(a.up.set(0,r[t],0),a.lookAt(0,0,o[t]));const l=this._cubeSize;Vo(n,i*l,t>2?l:0,l,l),s.setRenderTarget(n),f&&s.render(c,a),s.render(e,a)}c.geometry.dispose(),c.material.dispose(),s.toneMapping=u,s.autoClear=l,e.background=h}_textureToCubeUV(e,t){const i=this._renderer,n=e.mapping===ce||e.mapping===fe;n?(null===this._cubemapMaterial&&(this._cubemapMaterial=Go()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Ho());const a=n?this._cubemapMaterial:this._equirectMaterial,r=new Gr(this._lodPlanes[0],a);a.uniforms.envMap.value=e;const o=this._cubeSize;Vo(t,0,0,3*o,2*o),i.setRenderTarget(t),i.render(r,Po)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let _=0;for(let e=0;e<20;++e){const t=e/h,i=Math.exp(-t*t/2);m.push(i),0===e?_+=i:eg-4?n-g+4:0),4*(this._cubeSize-v),3*v,2*v),s.setRenderTarget(t),s.render(u,Po)}}function Uo(e,t,i){const n=new En(e,t,i);return n.texture.mapping=me,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function Vo(e,t,i,n,a){e.viewport.set(t,i,n,a),e.scissor.set(t,i,n,a)}function Ho(){return new Zr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Yo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:g,depthTest:!1,depthWrite:!1})}function Go(){return new Zr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Yo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:g,depthTest:!1,depthWrite:!1})}function Yo(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Wo(e){let t=new WeakMap,i=null;function n(e){const i=e.target;i.removeEventListener("dispose",n);const a=t.get(i);void 0!==a&&(t.delete(i),a.dispose())}return{get:function(a){if(a&&a.isTexture){const r=a.mapping,o=r===he||r===pe,s=r===ce||r===fe;if(o||s){let r=t.get(a);const l=void 0!==r?r.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==l)return null===i&&(i=new zo(e)),r=o?i.fromEquirectangular(a,r):i.fromCubemap(a,r),r.texture.pmremVersion=a.pmremVersion,t.set(a,r),r.texture;if(void 0!==r)return r.texture;{const l=a.image;return o&&l&&l.height>0||s&&l&&function(e){let t=0;for(let i=0;i<6;i++)void 0!==e[i]&&t++;return 6===t}(l)?(null===i&&(i=new zo(e)),r=o?i.fromEquirectangular(a):i.fromCubemap(a),r.texture.pmremVersion=a.pmremVersion,t.set(a,r),a.addEventListener("dispose",n),r.texture):null}}}return a},dispose:function(){t=new WeakMap,null!==i&&(i.dispose(),i=null)}}}function qo(e){const t={};function i(i){if(void 0!==t[i])return t[i];let n;switch(i){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(i)}return t[i]=n,n}return{has:function(e){return null!==i(e)},init:function(){i("EXT_color_buffer_float"),i("WEBGL_clip_cull_distance"),i("OES_texture_float_linear"),i("EXT_color_buffer_half_float"),i("WEBGL_multisampled_render_to_texture"),i("WEBGL_render_shared_exponent")},get:function(e){const t=i(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function Xo(e,t,i,n){const a={},r=new WeakMap;function o(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);for(const e in s.morphAttributes){const i=s.morphAttributes[e];for(let e=0,n=i.length;et.maxTextureSize&&(p=Math.ceil(h/t.maxTextureSize),h=t.maxTextureSize);const m=new Float32Array(h*p*4*d),_=new Cn(m,h,p,d);_.type=Re,_.needsUpdate=!0;const g=4*f;for(let t=0;t0)return e;const a=t*i;let r=rs[a];if(void 0===r&&(r=new Float32Array(a),rs[a]=r),0!==t){n.toArray(r,0);for(let n=1,a=0;n!==t;++n)a+=i,e[n].toArray(r,a)}return r}function cs(e,t){if(e.length!==t.length)return!1;for(let i=0,n=e.length;i":" "} ${a}: ${i[e]}`)}return n.join("\n")}(e.getShaderSource(t),n)}return a}function ll(e,t){const i=function(e){const t=pn.getPrimaries(pn.workingColorSpace),i=pn.getPrimaries(e);let n;switch(t===i?n="":t===ni&&i===ii?n="LinearDisplayP3ToLinearSRGB":t===ii&&i===ni&&(n="LinearSRGBToLinearDisplayP3"),e){case Zt:case $t:return[n,"LinearTransferOETF"];case Jt:case Qt:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),[n,"LinearTransferOETF"]}}(t);return`vec4 ${e}( vec4 value ) { return ${i[0]}( ${i[1]}( value ) ); }`}function ul(e,t){let i;switch(t){case te:i="Linear";break;case ie:i="Reinhard";break;case ne:i="OptimizedCineon";break;case ae:i="ACESFilmic";break;case oe:i="AgX";break;case se:i="Neutral";break;case re:i="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),i="Linear"}return"vec3 "+e+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function dl(e){return""!==e}function cl(e,t){const i=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,i).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function fl(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const hl=/^[ \t]*#include +<([\w\d./]+)>/gm;function pl(e){return e.replace(hl,_l)}const ml=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function _l(e,t){let i=go[t];if(void 0===i){const e=ml.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");i=go[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return pl(i)}const gl=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function vl(e){return e.replace(gl,yl)}function yl(e,t,i,n){let a="";for(let e=parseInt(t);e0&&(y+="\n"),b=["#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,g].filter(dl).join("\n"),b.length>0&&(b+="\n")):(y=[bl(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,g,i.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",i.batching?"#define USE_BATCHING":"",i.instancing?"#define USE_INSTANCING":"",i.instancingColor?"#define USE_INSTANCING_COLOR":"",i.instancingMorph?"#define USE_INSTANCING_MORPH":"",i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.map?"#define USE_MAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+d:"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.displacementMap?"#define USE_DISPLACEMENTMAP":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.mapUv?"#define MAP_UV "+i.mapUv:"",i.alphaMapUv?"#define ALPHAMAP_UV "+i.alphaMapUv:"",i.lightMapUv?"#define LIGHTMAP_UV "+i.lightMapUv:"",i.aoMapUv?"#define AOMAP_UV "+i.aoMapUv:"",i.emissiveMapUv?"#define EMISSIVEMAP_UV "+i.emissiveMapUv:"",i.bumpMapUv?"#define BUMPMAP_UV "+i.bumpMapUv:"",i.normalMapUv?"#define NORMALMAP_UV "+i.normalMapUv:"",i.displacementMapUv?"#define DISPLACEMENTMAP_UV "+i.displacementMapUv:"",i.metalnessMapUv?"#define METALNESSMAP_UV "+i.metalnessMapUv:"",i.roughnessMapUv?"#define ROUGHNESSMAP_UV "+i.roughnessMapUv:"",i.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+i.anisotropyMapUv:"",i.clearcoatMapUv?"#define CLEARCOATMAP_UV "+i.clearcoatMapUv:"",i.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+i.clearcoatNormalMapUv:"",i.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+i.clearcoatRoughnessMapUv:"",i.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+i.iridescenceMapUv:"",i.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+i.iridescenceThicknessMapUv:"",i.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+i.sheenColorMapUv:"",i.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+i.sheenRoughnessMapUv:"",i.specularMapUv?"#define SPECULARMAP_UV "+i.specularMapUv:"",i.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+i.specularColorMapUv:"",i.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+i.specularIntensityMapUv:"",i.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+i.transmissionMapUv:"",i.thicknessMapUv?"#define THICKNESSMAP_UV "+i.thicknessMapUv:"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.flatShading?"#define FLAT_SHADED":"",i.skinning?"#define USE_SKINNING":"",i.morphTargets?"#define USE_MORPHTARGETS":"",i.morphNormals&&!1===i.flatShading?"#define USE_MORPHNORMALS":"",i.morphColors?"#define USE_MORPHCOLORS":"",i.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE":"",i.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+i.morphTextureStride:"",i.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+i.morphTargetsCount:"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+l:"",i.sizeAttenuation?"#define USE_SIZEATTENUATION":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(dl).join("\n"),b=[bl(i),"#define SHADER_TYPE "+i.shaderType,"#define SHADER_NAME "+i.shaderName,g,i.useFog&&i.fog?"#define USE_FOG":"",i.useFog&&i.fogExp2?"#define FOG_EXP2":"",i.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",i.map?"#define USE_MAP":"",i.matcap?"#define USE_MATCAP":"",i.envMap?"#define USE_ENVMAP":"",i.envMap?"#define "+u:"",i.envMap?"#define "+d:"",i.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",i.lightMap?"#define USE_LIGHTMAP":"",i.aoMap?"#define USE_AOMAP":"",i.bumpMap?"#define USE_BUMPMAP":"",i.normalMap?"#define USE_NORMALMAP":"",i.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",i.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",i.emissiveMap?"#define USE_EMISSIVEMAP":"",i.anisotropy?"#define USE_ANISOTROPY":"",i.anisotropyMap?"#define USE_ANISOTROPYMAP":"",i.clearcoat?"#define USE_CLEARCOAT":"",i.clearcoatMap?"#define USE_CLEARCOATMAP":"",i.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",i.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",i.iridescence?"#define USE_IRIDESCENCE":"",i.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",i.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",i.specularMap?"#define USE_SPECULARMAP":"",i.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",i.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",i.roughnessMap?"#define USE_ROUGHNESSMAP":"",i.metalnessMap?"#define USE_METALNESSMAP":"",i.alphaMap?"#define USE_ALPHAMAP":"",i.alphaTest?"#define USE_ALPHATEST":"",i.alphaHash?"#define USE_ALPHAHASH":"",i.sheen?"#define USE_SHEEN":"",i.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",i.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",i.transmission?"#define USE_TRANSMISSION":"",i.transmissionMap?"#define USE_TRANSMISSIONMAP":"",i.thicknessMap?"#define USE_THICKNESSMAP":"",i.vertexTangents&&!1===i.flatShading?"#define USE_TANGENT":"",i.vertexColors||i.instancingColor?"#define USE_COLOR":"",i.vertexAlphas?"#define USE_COLOR_ALPHA":"",i.vertexUv1s?"#define USE_UV1":"",i.vertexUv2s?"#define USE_UV2":"",i.vertexUv3s?"#define USE_UV3":"",i.pointsUvs?"#define USE_POINTS_UV":"",i.gradientMap?"#define USE_GRADIENTMAP":"",i.flatShading?"#define FLAT_SHADED":"",i.doubleSided?"#define DOUBLE_SIDED":"",i.flipSided?"#define FLIP_SIDED":"",i.shadowMapEnabled?"#define USE_SHADOWMAP":"",i.shadowMapEnabled?"#define "+l:"",i.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",i.numLightProbes>0?"#define USE_LIGHT_PROBES":"",i.useLegacyLights?"#define LEGACY_LIGHTS":"",i.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",i.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",i.toneMapping!==ee?"#define TONE_MAPPING":"",i.toneMapping!==ee?go.tonemapping_pars_fragment:"",i.toneMapping!==ee?ul("toneMapping",i.toneMapping):"",i.dithering?"#define DITHERING":"",i.opaque?"#define OPAQUE":"",go.colorspace_pars_fragment,ll("linearToOutputTexel",i.outputColorSpace),i.useDepthPacking?"#define DEPTH_PACKING "+i.depthPacking:"","\n"].filter(dl).join("\n")),o=pl(o),o=cl(o,i),o=fl(o,i),s=pl(s),s=cl(s,i),s=fl(s,i),o=vl(o),s=vl(s),!0!==i.isRawShaderMaterial&&(w="#version 300 es\n",y=[_,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,b=["#define varying in",i.glslVersion===Fi?"":"layout(location = 0) out highp vec4 pc_fragColor;",i.glslVersion===Fi?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const O=w+y+o,x=w+b+s,A=rl(a,a.VERTEX_SHADER,O),T=rl(a,a.FRAGMENT_SHADER,x);function E(t){if(e.debug.checkShaderErrors){const i=a.getProgramInfoLog(v).trim(),n=a.getShaderInfoLog(A).trim(),r=a.getShaderInfoLog(T).trim();let o=!0,s=!0;if(!1===a.getProgramParameter(v,a.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(a,v,A,T);else{const e=sl(a,A,"vertex"),n=sl(a,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(v,a.VALIDATE_STATUS)+"\n\nMaterial Name: "+t.name+"\nMaterial Type: "+t.type+"\n\nProgram Info Log: "+i+"\n"+e+"\n"+n)}else""!==i?console.warn("THREE.WebGLProgram: Program Info Log:",i):""!==n&&""!==r||(s=!1);s&&(t.diagnostics={runnable:o,programLog:i,vertexShader:{log:n,prefix:y},fragmentShader:{log:r,prefix:b}})}a.deleteShader(A),a.deleteShader(T),C=new al(a,v),S=function(e,t){const i={},n=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let a=0;a0,K=r.clearcoat>0,J=r.iridescence>0,Z=r.sheen>0,Q=r.transmission>0,$=X&&!!r.anisotropyMap,te=K&&!!r.clearcoatMap,ie=K&&!!r.clearcoatNormalMap,ne=K&&!!r.clearcoatRoughnessMap,ae=J&&!!r.iridescenceMap,re=J&&!!r.iridescenceThicknessMap,oe=Z&&!!r.sheenColorMap,se=Z&&!!r.sheenRoughnessMap,le=!!r.specularMap,ue=!!r.specularColorMap,de=!!r.specularIntensityMap,ce=Q&&!!r.transmissionMap,fe=Q&&!!r.thicknessMap,he=!!r.gradientMap,pe=!!r.alphaMap,_e=r.alphaTest>0,ge=!!r.alphaHash,ve=!!r.extensions;let ye=ee;r.toneMapped&&(null!==j&&!0!==j.isXRRenderTarget||(ye=e.toneMapping));const be={shaderID:E,shaderType:r.type,shaderName:r.name,vertexShader:M,fragmentShader:D,defines:r.defines,customVertexShaderID:P,customFragmentShaderID:I,isRawShaderMaterial:!0===r.isRawShaderMaterial,glslVersion:r.glslVersion,precision:h,batching:N,instancing:R,instancingColor:R&&null!==b.instanceColor,instancingMorph:R&&null!==b.morphTexture,supportsVertexTextures:f,outputColorSpace:null===j?e.outputColorSpace:!0===j.isXRRenderTarget?j.texture.colorSpace:Zt,alphaToCoverage:!!r.alphaToCoverage,map:B,matcap:F,envMap:k,envMapMode:k&&A.mapping,envMapCubeUVHeight:T,aoMap:z,lightMap:U,bumpMap:V,normalMap:H,displacementMap:f&&G,emissiveMap:Y,normalMapObjectSpace:H&&r.normalMapType===Xt,normalMapTangentSpace:H&&r.normalMapType===qt,metalnessMap:W,roughnessMap:q,anisotropy:X,anisotropyMap:$,clearcoat:K,clearcoatMap:te,clearcoatNormalMap:ie,clearcoatRoughnessMap:ne,iridescence:J,iridescenceMap:ae,iridescenceThicknessMap:re,sheen:Z,sheenColorMap:oe,sheenRoughnessMap:se,specularMap:le,specularColorMap:ue,specularIntensityMap:de,transmission:Q,transmissionMap:ce,thicknessMap:fe,gradientMap:he,opaque:!1===r.transparent&&r.blending===v&&!1===r.alphaToCoverage,alphaMap:pe,alphaTest:_e,alphaHash:ge,combine:r.combine,mapUv:B&&g(r.map.channel),aoMapUv:z&&g(r.aoMap.channel),lightMapUv:U&&g(r.lightMap.channel),bumpMapUv:V&&g(r.bumpMap.channel),normalMapUv:H&&g(r.normalMap.channel),displacementMapUv:G&&g(r.displacementMap.channel),emissiveMapUv:Y&&g(r.emissiveMap.channel),metalnessMapUv:W&&g(r.metalnessMap.channel),roughnessMapUv:q&&g(r.roughnessMap.channel),anisotropyMapUv:$&&g(r.anisotropyMap.channel),clearcoatMapUv:te&&g(r.clearcoatMap.channel),clearcoatNormalMapUv:ie&&g(r.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ne&&g(r.clearcoatRoughnessMap.channel),iridescenceMapUv:ae&&g(r.iridescenceMap.channel),iridescenceThicknessMapUv:re&&g(r.iridescenceThicknessMap.channel),sheenColorMapUv:oe&&g(r.sheenColorMap.channel),sheenRoughnessMapUv:se&&g(r.sheenRoughnessMap.channel),specularMapUv:le&&g(r.specularMap.channel),specularColorMapUv:ue&&g(r.specularColorMap.channel),specularIntensityMapUv:de&&g(r.specularIntensityMap.channel),transmissionMapUv:ce&&g(r.transmissionMap.channel),thicknessMapUv:fe&&g(r.thicknessMap.channel),alphaMapUv:pe&&g(r.alphaMap.channel),vertexTangents:!!O.attributes.tangent&&(H||X),vertexColors:r.vertexColors,vertexAlphas:!0===r.vertexColors&&!!O.attributes.color&&4===O.attributes.color.itemSize,pointsUvs:!0===b.isPoints&&!!O.attributes.uv&&(B||pe),fog:!!w,useFog:!0===r.fog,fogExp2:!!w&&w.isFogExp2,flatShading:!0===r.flatShading,sizeAttenuation:!0===r.sizeAttenuation,logarithmicDepthBuffer:c,skinning:!0===b.isSkinnedMesh,morphTargets:void 0!==O.morphAttributes.position,morphNormals:void 0!==O.morphAttributes.normal,morphColors:void 0!==O.morphAttributes.color,morphTargetsCount:S,morphTextureStride:L,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numLightProbes:s.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:r.dithering,shadowMapEnabled:e.shadowMap.enabled&&d.length>0,shadowMapType:e.shadowMap.type,toneMapping:ye,useLegacyLights:e._useLegacyLights,decodeVideoTexture:B&&!0===r.map.isVideoTexture&&pn.getTransfer(r.map.colorSpace)===ti,premultipliedAlpha:r.premultipliedAlpha,doubleSided:r.side===_,flipSided:r.side===m,useDepthPacking:r.depthPacking>=0,depthPacking:r.depthPacking||0,index0AttributeName:r.index0AttributeName,extensionClipCullDistance:ve&&!0===r.extensions.clipCullDistance&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:ve&&!0===r.extensions.multiDraw&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:r.customProgramCacheKey()};return be.vertexUv1s=u.has(1),be.vertexUv2s=u.has(2),be.vertexUv3s=u.has(3),u.clear(),be},getProgramCacheKey:function(t){const i=[];if(t.shaderID?i.push(t.shaderID):(i.push(t.customVertexShaderID),i.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)i.push(e),i.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.numLightProbes),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(i,t),function(e,t){s.disableAll(),t.supportsVertexTextures&&s.enable(0);t.instancing&&s.enable(1);t.instancingColor&&s.enable(2);t.instancingMorph&&s.enable(3);t.matcap&&s.enable(4);t.envMap&&s.enable(5);t.normalMapObjectSpace&&s.enable(6);t.normalMapTangentSpace&&s.enable(7);t.clearcoat&&s.enable(8);t.iridescence&&s.enable(9);t.alphaTest&&s.enable(10);t.vertexColors&&s.enable(11);t.vertexAlphas&&s.enable(12);t.vertexUv1s&&s.enable(13);t.vertexUv2s&&s.enable(14);t.vertexUv3s&&s.enable(15);t.vertexTangents&&s.enable(16);t.anisotropy&&s.enable(17);t.alphaHash&&s.enable(18);t.batching&&s.enable(19);e.push(s.mask),s.disableAll(),t.fog&&s.enable(0);t.useFog&&s.enable(1);t.flatShading&&s.enable(2);t.logarithmicDepthBuffer&&s.enable(3);t.skinning&&s.enable(4);t.morphTargets&&s.enable(5);t.morphNormals&&s.enable(6);t.morphColors&&s.enable(7);t.premultipliedAlpha&&s.enable(8);t.shadowMapEnabled&&s.enable(9);t.useLegacyLights&&s.enable(10);t.doubleSided&&s.enable(11);t.flipSided&&s.enable(12);t.useDepthPacking&&s.enable(13);t.dithering&&s.enable(14);t.transmission&&s.enable(15);t.sheen&&s.enable(16);t.opaque&&s.enable(17);t.pointsUvs&&s.enable(18);t.decodeVideoTexture&&s.enable(19);t.alphaToCoverage&&s.enable(20);e.push(s.mask)}(i,t),i.push(e.outputColorSpace)),i.push(t.customProgramCacheKey),i.join()},getUniforms:function(e){const t=p[e.type];let i;if(t){const e=yo[t];i=Jr.clone(e.uniforms)}else i=e.uniforms;return i},acquireProgram:function(t,i){let n;for(let e=0,t=d.length;e0?n.push(d):!0===o.transparent?a.push(d):i.push(d)},unshift:function(e,t,o,s,l,u){const d=r(e,t,o,s,l,u);o.transmission>0?n.unshift(d):!0===o.transparent?a.unshift(d):i.unshift(d)},finish:function(){for(let i=t,n=e.length;i1&&i.sort(e||Cl),n.length>1&&n.sort(t||Sl),a.length>1&&a.sort(t||Sl)}}}function Dl(){let e=new WeakMap;return{get:function(t,i){const n=e.get(t);let a;return void 0===n?(a=new Ml,e.set(t,[a])):i>=n.length?(a=new Ml,n.push(a)):a=n[i],a},dispose:function(){e=new WeakMap}}}function Pl(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":i={direction:new In,color:new Za};break;case"SpotLight":i={position:new In,direction:new In,color:new Za,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":i={position:new In,color:new Za,distance:0,decay:0};break;case"HemisphereLight":i={direction:new In,skyColor:new Za,groundColor:new Za};break;case"RectAreaLight":i={color:new Za,position:new In,halfWidth:new In,halfHeight:new In}}return e[t.id]=i,i}}}let Il=0;function Ll(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function jl(e){const t=new Pl,i=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let i;switch(t.type){case"DirectionalLight":case"SpotLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $i};break;case"PointLight":i={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $i,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=i,i}}}(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)n.probe.push(new In);const a=new In,r=new la,o=new la;return{setup:function(a,r){let o=0,s=0,l=0;for(let e=0;e<9;e++)n.probe[e].set(0,0,0);let u=0,d=0,c=0,f=0,h=0,p=0,m=0,_=0,g=0,v=0,y=0;a.sort(Ll);const b=!0===r?Math.PI:1;for(let e=0,r=a.length;e0&&(!0===e.has("OES_texture_float_linear")?(n.rectAreaLTC1=vo.LTC_FLOAT_1,n.rectAreaLTC2=vo.LTC_FLOAT_2):(n.rectAreaLTC1=vo.LTC_HALF_1,n.rectAreaLTC2=vo.LTC_HALF_2)),n.ambient[0]=o,n.ambient[1]=s,n.ambient[2]=l;const w=n.hash;w.directionalLength===u&&w.pointLength===d&&w.spotLength===c&&w.rectAreaLength===f&&w.hemiLength===h&&w.numDirectionalShadows===p&&w.numPointShadows===m&&w.numSpotShadows===_&&w.numSpotMaps===g&&w.numLightProbes===y||(n.directional.length=u,n.spot.length=c,n.rectArea.length=f,n.point.length=d,n.hemi.length=h,n.directionalShadow.length=p,n.directionalShadowMap.length=p,n.pointShadow.length=m,n.pointShadowMap.length=m,n.spotShadow.length=_,n.spotShadowMap.length=_,n.directionalShadowMatrix.length=p,n.pointShadowMatrix.length=m,n.spotLightMatrix.length=_+g-v,n.spotLightMap.length=g,n.numSpotLightShadowsWithMaps=v,n.numLightProbes=y,w.directionalLength=u,w.pointLength=d,w.spotLength=c,w.rectAreaLength=f,w.hemiLength=h,w.numDirectionalShadows=p,w.numPointShadows=m,w.numSpotShadows=_,w.numSpotMaps=g,w.numLightProbes=y,n.version=Il++)},setupView:function(e,t){let i=0,s=0,l=0,u=0,d=0;const c=t.matrixWorldInverse;for(let t=0,f=e.length;t=a.length?(r=new Rl(e),a.push(r)):r=a[n],r},dispose:function(){t=new WeakMap}}}class Bl extends er{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Yt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Fl extends er{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function kl(e,t,i){let n=new ho;const a=new $i,r=new $i,o=new An,s=new Bl({depthPacking:Wt}),l=new Fl,u={},d=i.maxTextureSize,f={[p]:m,[m]:p,[_]:_},v=new Zr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new $i},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),y=v.clone();y.defines.HORIZONTAL_PASS=1;const b=new Er;b.setAttribute("position",new ur(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const w=new Gr(b,v),O=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=c;let x=this.type;function A(i,n){const r=t.update(w);v.defines.VSM_SAMPLES!==i.blurSamples&&(v.defines.VSM_SAMPLES=i.blurSamples,y.defines.VSM_SAMPLES=i.blurSamples,v.needsUpdate=!0,y.needsUpdate=!0),null===i.mapPass&&(i.mapPass=new En(a.x,a.y)),v.uniforms.shadow_pass.value=i.map.texture,v.uniforms.resolution.value=i.mapSize,v.uniforms.radius.value=i.radius,e.setRenderTarget(i.mapPass),e.clear(),e.renderBufferDirect(n,null,r,v,w,null),y.uniforms.shadow_pass.value=i.mapPass.texture,y.uniforms.resolution.value=i.mapSize,y.uniforms.radius.value=i.radius,e.setRenderTarget(i.map),e.clear(),e.renderBufferDirect(n,null,r,y,w,null)}function T(t,i,n,a){let r=null;const o=!0===n.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==o)r=o;else if(r=!0===n.isPointLight?l:s,e.localClippingEnabled&&!0===i.clipShadows&&Array.isArray(i.clippingPlanes)&&0!==i.clippingPlanes.length||i.displacementMap&&0!==i.displacementScale||i.alphaMap&&i.alphaTest>0||i.map&&i.alphaTest>0){const e=r.uuid,t=i.uuid;let n=u[e];void 0===n&&(n={},u[e]=n);let a=n[t];void 0===a&&(a=r.clone(),n[t]=a,i.addEventListener("dispose",C)),r=a}if(r.visible=i.visible,r.wireframe=i.wireframe,r.side=a===h?null!==i.shadowSide?i.shadowSide:i.side:null!==i.shadowSide?i.shadowSide:f[i.side],r.alphaMap=i.alphaMap,r.alphaTest=i.alphaTest,r.map=i.map,r.clipShadows=i.clipShadows,r.clippingPlanes=i.clippingPlanes,r.clipIntersection=i.clipIntersection,r.displacementMap=i.displacementMap,r.displacementScale=i.displacementScale,r.displacementBias=i.displacementBias,r.wireframeLinewidth=i.wireframeLinewidth,r.linewidth=i.linewidth,!0===n.isPointLight&&!0===r.isMeshDistanceMaterial){e.properties.get(r).light=n}return r}function E(i,a,r,o,s){if(!1===i.visible)return;if(i.layers.test(a.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&s===h)&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(r.matrixWorldInverse,i.matrixWorld);const n=t.update(i),l=i.material;if(Array.isArray(l)){const t=n.groups;for(let u=0,d=t.length;ud||a.y>d)&&(a.x>d&&(r.x=Math.floor(d/_.x),a.x=r.x*_.x,c.mapSize.x=r.x),a.y>d&&(r.y=Math.floor(d/_.y),a.y=r.y*_.y,c.mapSize.y=r.y)),null===c.map||!0===p||!0===m){const e=this.type!==h?{minFilter:ye,magFilter:ye}:{};null!==c.map&&c.map.dispose(),c.map=new En(a.x,a.y,e),c.map.texture.name=u.name+".shadowMap",c.camera.updateProjectionMatrix()}e.setRenderTarget(c.map),e.clear();const g=c.getViewportCount();for(let e=0;e=1):-1!==me.indexOf("OpenGL ES")&&(pe=parseFloat(/^OpenGL ES (\d)/.exec(me)[1]),he=pe>=2);let _e=null,ge={};const ve=e.getParameter(e.SCISSOR_BOX),ye=e.getParameter(e.VIEWPORT),be=(new An).fromArray(ve),we=(new An).fromArray(ye);function Oe(t,i,n,a){const r=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;oi||a.height>i)&&(n=i/Math.max(a.width,a.height)),n<1){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){const i=Math.floor(n*a.width),r=Math.floor(n*a.height);void 0===c&&(c=p(i,r));const o=t?p(i,r):c;o.width=i,o.height=r;return o.getContext("2d").drawImage(e,0,0,i,r),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+a.width+"x"+a.height+") to ("+i+"x"+r+")."),o}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+a.width+"x"+a.height+")."),e}return e}function _(e){return e.generateMipmaps&&e.minFilter!==ye&&e.minFilter!==Ae}function g(t){e.generateMipmap(t)}function v(i,n,a,r,o=!1){if(null!==i){if(void 0!==e[i])return e[i];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+i+"'")}let s=n;if(n===e.RED&&(a===e.FLOAT&&(s=e.R32F),a===e.HALF_FLOAT&&(s=e.R16F),a===e.UNSIGNED_BYTE&&(s=e.R8)),n===e.RED_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.R8UI),a===e.UNSIGNED_SHORT&&(s=e.R16UI),a===e.UNSIGNED_INT&&(s=e.R32UI),a===e.BYTE&&(s=e.R8I),a===e.SHORT&&(s=e.R16I),a===e.INT&&(s=e.R32I)),n===e.RG&&(a===e.FLOAT&&(s=e.RG32F),a===e.HALF_FLOAT&&(s=e.RG16F),a===e.UNSIGNED_BYTE&&(s=e.RG8)),n===e.RG_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.RG8UI),a===e.UNSIGNED_SHORT&&(s=e.RG16UI),a===e.UNSIGNED_INT&&(s=e.RG32UI),a===e.BYTE&&(s=e.RG8I),a===e.SHORT&&(s=e.RG16I),a===e.INT&&(s=e.RG32I)),n===e.RGB&&a===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),n===e.RGBA){const t=o?ei:pn.getTransfer(r);a===e.FLOAT&&(s=e.RGBA32F),a===e.HALF_FLOAT&&(s=e.RGBA16F),a===e.UNSIGNED_BYTE&&(s=t===ti?e.SRGB8_ALPHA8:e.RGBA8),a===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),a===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return s!==e.R16F&&s!==e.R32F&&s!==e.RG16F&&s!==e.RG32F&&s!==e.RGBA16F&&s!==e.RGBA32F||t.get("EXT_color_buffer_float"),s}function y(e,t){return!0===_(e)||e.isFramebufferTexture&&e.minFilter!==ye&&e.minFilter!==Ae?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function b(e){const t=e.target;t.removeEventListener("dispose",b),function(e){const t=n.get(e);if(void 0===t.__webglInit)return;const i=e.source,a=f.get(i);if(a){const n=a[t.__cacheKey];n.usedTimes--,0===n.usedTimes&&O(e),0===Object.keys(a).length&&f.delete(i)}n.remove(e)}(t),t.isVideoTexture&&d.delete(t)}function w(t){const i=t.target;i.removeEventListener("dispose",w),function(t){const i=n.get(t);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++){if(Array.isArray(i.__webglFramebuffer[t]))for(let n=0;n0&&r.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void D(r,t,a);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}i.bindTexture(e.TEXTURE_2D,r.__webglTexture,e.TEXTURE0+a)}const T={[_e]:e.REPEAT,[ge]:e.CLAMP_TO_EDGE,[ve]:e.MIRRORED_REPEAT},E={[ye]:e.NEAREST,[be]:e.NEAREST_MIPMAP_NEAREST,[Oe]:e.NEAREST_MIPMAP_LINEAR,[Ae]:e.LINEAR,[Te]:e.LINEAR_MIPMAP_NEAREST,[Ce]:e.LINEAR_MIPMAP_LINEAR},C={[bi]:e.NEVER,[Ci]:e.ALWAYS,[wi]:e.LESS,[xi]:e.LEQUAL,[Oi]:e.EQUAL,[Ei]:e.GEQUAL,[Ai]:e.GREATER,[Ti]:e.NOTEQUAL};function S(i,r){if(r.type!==Re||!1!==t.has("OES_texture_float_linear")||r.magFilter!==Ae&&r.magFilter!==Te&&r.magFilter!==Oe&&r.magFilter!==Ce&&r.minFilter!==Ae&&r.minFilter!==Te&&r.minFilter!==Oe&&r.minFilter!==Ce||console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(i,e.TEXTURE_WRAP_S,T[r.wrapS]),e.texParameteri(i,e.TEXTURE_WRAP_T,T[r.wrapT]),i!==e.TEXTURE_3D&&i!==e.TEXTURE_2D_ARRAY||e.texParameteri(i,e.TEXTURE_WRAP_R,T[r.wrapR]),e.texParameteri(i,e.TEXTURE_MAG_FILTER,E[r.magFilter]),e.texParameteri(i,e.TEXTURE_MIN_FILTER,E[r.minFilter]),r.compareFunction&&(e.texParameteri(i,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(i,e.TEXTURE_COMPARE_FUNC,C[r.compareFunction])),!0===t.has("EXT_texture_filter_anisotropic")){if(r.magFilter===ye)return;if(r.minFilter!==Oe&&r.minFilter!==Ce)return;if(r.type===Re&&!1===t.has("OES_texture_float_linear"))return;if(r.anisotropy>1||n.get(r).__currentAnisotropy){const o=t.get("EXT_texture_filter_anisotropic");e.texParameterf(i,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r.anisotropy,a.getMaxAnisotropy())),n.get(r).__currentAnisotropy=r.anisotropy}}}function M(t,i){let n=!1;void 0===t.__webglInit&&(t.__webglInit=!0,i.addEventListener("dispose",b));const a=i.source;let r=f.get(a);void 0===r&&(r={},f.set(a,r));const s=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.colorSpace),t.join()}(i);if(s!==t.__cacheKey){void 0===r[s]&&(r[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,n=!0),r[s].usedTimes++;const a=r[t.__cacheKey];void 0!==a&&(r[t.__cacheKey].usedTimes--,0===a.usedTimes&&O(i)),t.__cacheKey=s,t.__webglTexture=r[s].texture}return n}function D(t,o,s){let l=e.TEXTURE_2D;(o.isDataArrayTexture||o.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),o.isData3DTexture&&(l=e.TEXTURE_3D);const u=M(t,o),d=o.source;i.bindTexture(l,t.__webglTexture,e.TEXTURE0+s);const c=n.get(d);if(d.version!==c.__version||!0===u){i.activeTexture(e.TEXTURE0+s);const t=pn.getPrimaries(pn.workingColorSpace),n=o.colorSpace===Kt?null:pn.getPrimaries(o.colorSpace),f=o.colorSpace===Kt||t===n?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,f);let h=m(o.image,!1,a.maxTextureSize);h=N(o,h);const p=r.convert(o.format,o.colorSpace),b=r.convert(o.type);let w,O=v(o.internalFormat,p,b,o.colorSpace,o.isVideoTexture);S(l,o);const x=o.mipmaps,A=!0!==o.isVideoTexture&&O!==st,T=void 0===c.__version||!0===u,E=d.dataReady,C=y(o,h);if(o.isDepthTexture)O=e.DEPTH_COMPONENT16,o.type===Re?O=e.DEPTH_COMPONENT32F:o.type===je?O=e.DEPTH_COMPONENT24:o.type===ke&&(O=e.DEPTH24_STENCIL8),T&&(A?i.texStorage2D(e.TEXTURE_2D,1,O,h.width,h.height):i.texImage2D(e.TEXTURE_2D,0,O,h.width,h.height,0,p,b,null));else if(o.isDataTexture)if(x.length>0){A&&T&&i.texStorage2D(e.TEXTURE_2D,C,O,x[0].width,x[0].height);for(let t=0,n=x.length;t>=1,n>>=1}}else if(x.length>0){if(A&&T){const t=B(x[0]);i.texStorage2D(e.TEXTURE_2D,C,O,t.width,t.height)}for(let t=0,n=x.length;t>d),n=Math.max(1,a.height>>d);u===e.TEXTURE_3D||u===e.TEXTURE_2D_ARRAY?i.texImage3D(u,d,h,t,n,a.depth,0,c,f,null):i.texImage2D(u,d,h,t,n,0,c,f,null)}i.bindFramebuffer(e.FRAMEBUFFER,t),R(a)?s.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,l,u,n.get(o).__webglTexture,0,j(a)):(u===e.TEXTURE_2D||u>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,l,u,n.get(o).__webglTexture,d),i.bindFramebuffer(e.FRAMEBUFFER,null)}function I(t,i,n){if(e.bindRenderbuffer(e.RENDERBUFFER,t),i.depthBuffer&&!i.stencilBuffer){let a=e.DEPTH_COMPONENT24;if(n||R(i)){const t=i.depthTexture;t&&t.isDepthTexture&&(t.type===Re?a=e.DEPTH_COMPONENT32F:t.type===je&&(a=e.DEPTH_COMPONENT24));const n=j(i);R(i)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,n,a,i.width,i.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,n,a,i.width,i.height)}else e.renderbufferStorage(e.RENDERBUFFER,a,i.width,i.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(i.depthBuffer&&i.stencilBuffer){const a=j(i);n&&!1===R(i)?e.renderbufferStorageMultisample(e.RENDERBUFFER,a,e.DEPTH24_STENCIL8,i.width,i.height):R(i)?s.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,a,e.DEPTH24_STENCIL8,i.width,i.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,i.width,i.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,t)}else{const t=i.textures;for(let a=0;a0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==i.__useRenderToTexture}function N(e,t){const i=e.colorSpace,n=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||i!==Zt&&i!==Kt&&(pn.getTransfer(i)===ti?n===He&&a===Me||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",i)),t}function B(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(u.width=e.naturalWidth||e.width,u.height=e.naturalHeight||e.height):"undefined"!=typeof VideoFrame&&e instanceof VideoFrame?(u.width=e.displayWidth,u.height=e.displayHeight):(u.width=e.width,u.height=e.height),u}this.allocateTextureUnit=function(){const e=x;return e>=a.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+a.maxTextures),x+=1,e},this.resetTextureUnits=function(){x=0},this.setTexture2D=A,this.setTexture2DArray=function(t,a){const r=n.get(t);t.version>0&&r.__version!==t.version?D(r,t,a):i.bindTexture(e.TEXTURE_2D_ARRAY,r.__webglTexture,e.TEXTURE0+a)},this.setTexture3D=function(t,a){const r=n.get(t);t.version>0&&r.__version!==t.version?D(r,t,a):i.bindTexture(e.TEXTURE_3D,r.__webglTexture,e.TEXTURE0+a)},this.setTextureCube=function(t,o){const s=n.get(t);t.version>0&&s.__version!==t.version?function(t,o,s){if(6!==o.image.length)return;const l=M(t,o),u=o.source;i.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);const d=n.get(u);if(u.version!==d.__version||!0===l){i.activeTexture(e.TEXTURE0+s);const t=pn.getPrimaries(pn.workingColorSpace),n=o.colorSpace===Kt?null:pn.getPrimaries(o.colorSpace),c=o.colorSpace===Kt||t===n?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,o.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,o.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,o.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,c);const f=o.isCompressedTexture||o.image[0].isCompressedTexture,h=o.image[0]&&o.image[0].isDataTexture,p=[];for(let e=0;e<6;e++)p[e]=f||h?h?o.image[e].image:o.image[e]:m(o.image[e],!0,a.maxCubemapSize),p[e]=N(o,p[e]);const b=p[0],w=r.convert(o.format,o.colorSpace),O=r.convert(o.type),x=v(o.internalFormat,w,O,o.colorSpace),A=!0!==o.isVideoTexture,T=void 0===d.__version||!0===l,E=u.dataReady;let C,M=y(o,b);if(S(e.TEXTURE_CUBE_MAP,o),f){A&&T&&i.texStorage2D(e.TEXTURE_CUBE_MAP,M,x,b.width,b.height);for(let t=0;t<6;t++){C=p[t].mipmaps;for(let n=0;n0&&M++;const t=B(p[0]);i.texStorage2D(e.TEXTURE_CUBE_MAP,M,x,t.width,t.height)}for(let t=0;t<6;t++)if(h){A?E&&i.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,p[t].width,p[t].height,w,O,p[t].data):i.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,x,p[t].width,p[t].height,0,w,O,p[t].data);for(let n=0;n1;if(c||(void 0===l.__webglTexture&&(l.__webglTexture=e.createTexture()),l.__version=a.version,o.memory.textures++),d){s.__webglFramebuffer=[];for(let t=0;t<6;t++)if(a.mipmaps&&a.mipmaps.length>0){s.__webglFramebuffer[t]=[];for(let i=0;i0){s.__webglFramebuffer=[];for(let t=0;t0&&!1===R(t)){s.__webglMultisampledFramebuffer=e.createFramebuffer(),s.__webglColorRenderbuffer=[],i.bindFramebuffer(e.FRAMEBUFFER,s.__webglMultisampledFramebuffer);for(let i=0;i0)for(let n=0;n0)for(let i=0;i0&&!1===R(t)){const a=t.textures,r=t.width,o=t.height;let s=e.COLOR_BUFFER_BIT;const u=[],d=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=n.get(t),f=a.length>1;if(f)for(let t=0;ts+u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&o<=s-u&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(a=t.getPose(e.gripSpace,i),null!==a&&(s.matrix.fromArray(a.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,a.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(a.linearVelocity)):s.hasLinearVelocity=!1,a.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(a.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(n=t.getPose(e.targetRaySpace,i),null===n&&null!==a&&(n=a),null!==n&&(o.matrix.fromArray(n.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,n.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(n.linearVelocity)):o.hasLinearVelocity=!1,n.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(n.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Yl)))}return null!==o&&(o.visible=null!==n),null!==s&&(s.visible=null!==a),null!==l&&(l.visible=null!==r),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const i=new Gl;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class ql{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(null===this.texture){const n=new xn;e.properties.get(n).__webglTexture=t.texture,t.depthNear==i.depthNear&&t.depthFar==i.depthFar||(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=n}}render(e,t){if(null!==this.texture){if(null===this.mesh){const e=t.cameras[0].viewport,i=new Zr({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new Gr(new _o(20,20),i)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class Xl extends Ui{constructor(e,t){super();const i=this;let n=null,a=1,r=null,o="local-floor",s=1,l=null,u=null,d=null,c=null,f=null,h=null;const p=new ql,m=t.getContextAttributes();let _=null,g=null;const v=[],y=[],b=new $i;let w=null;const O=new io;O.layers.enable(1),O.viewport=new An;const x=new io;x.layers.enable(2),x.viewport=new An;const A=[O,x],T=new Hl;T.layers.enable(1),T.layers.enable(2);let E=null,C=null;function S(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const i=v[t];void 0!==i&&(i.update(e.inputSource,e.frame,l||r),i.dispatchEvent({type:e.type,data:e.inputSource}))}function M(){n.removeEventListener("select",S),n.removeEventListener("selectstart",S),n.removeEventListener("selectend",S),n.removeEventListener("squeeze",S),n.removeEventListener("squeezestart",S),n.removeEventListener("squeezeend",S),n.removeEventListener("end",M),n.removeEventListener("inputsourceschange",D);for(let e=0;e=0&&(y[n]=null,v[n].disconnect(i))}for(let t=0;t=y.length){y.push(i),n=e;break}if(null===y[e]){y[e]=i,n=e;break}}if(-1===n)break}const a=v[n];a&&a.connect(i)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return void 0===t&&(t=new Wl,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new Wl,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new Wl,v[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){a=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||r},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==c?c:f},this.getBinding=function(){return d},this.getFrame=function(){return h},this.getSession=function(){return n},this.setSession=async function(u){if(n=u,null!==n){if(_=e.getRenderTarget(),n.addEventListener("select",S),n.addEventListener("selectstart",S),n.addEventListener("selectend",S),n.addEventListener("squeeze",S),n.addEventListener("squeezestart",S),n.addEventListener("squeezeend",S),n.addEventListener("end",M),n.addEventListener("inputsourceschange",D),!0!==m.xrCompatible&&await t.makeXRCompatible(),w=e.getPixelRatio(),e.getSize(b),void 0===n.renderState.layers){const i={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:a};f=new XRWebGLLayer(n,t,i),n.updateRenderState({baseLayer:f}),e.setPixelRatio(1),e.setSize(f.framebufferWidth,f.framebufferHeight,!1),g=new En(f.framebufferWidth,f.framebufferHeight,{format:He,type:Me,colorSpace:e.outputColorSpace,stencilBuffer:m.stencil})}else{let i=null,r=null,o=null;m.depth&&(o=m.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,i=m.stencil?qe:We,r=m.stencil?ke:je);const s={colorFormat:t.RGBA8,depthFormat:o,scaleFactor:a};d=new XRWebGLBinding(n,t),c=d.createProjectionLayer(s),n.updateRenderState({layers:[c]}),e.setPixelRatio(1),e.setSize(c.textureWidth,c.textureHeight,!1),g=new En(c.textureWidth,c.textureHeight,{format:He,type:Me,depthTexture:new $o(c.textureWidth,c.textureHeight,r,void 0,void 0,void 0,void 0,void 0,void 0,i),stencilBuffer:m.stencil,colorSpace:e.outputColorSpace,samples:m.antialias?4:0});e.properties.get(g).__ignoreDepthValues=c.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(s),l=null,r=await n.requestReferenceSpace(o),R.setContext(n),R.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==n)return n.environmentBlendMode};const P=new In,I=new In;function L(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===n)return;null!==p.texture&&(e.near=p.depthNear,e.far=p.depthFar),T.near=x.near=O.near=e.near,T.far=x.far=O.far=e.far,E===T.near&&C===T.far||(n.updateRenderState({depthNear:T.near,depthFar:T.far}),E=T.near,C=T.far,O.near=E,O.far=C,x.near=E,x.far=C,O.updateProjectionMatrix(),x.updateProjectionMatrix(),e.updateProjectionMatrix());const t=e.parent,i=T.cameras;L(T,t);for(let e=0;e0&&(n.alphaTest.value=a.alphaTest);const r=t.get(a),o=r.envMap,s=r.envMapRotation;if(o&&(n.envMap.value=o,Kl.copy(s),Kl.x*=-1,Kl.y*=-1,Kl.z*=-1,o.isCubeTexture&&!1===o.isRenderTargetTexture&&(Kl.y*=-1,Kl.z*=-1),n.envMapRotation.value.setFromMatrix4(Jl.makeRotationFromEuler(Kl)),n.flipEnvMap.value=o.isCubeTexture&&!1===o.isRenderTargetTexture?-1:1,n.reflectivity.value=a.reflectivity,n.ior.value=a.ior,n.refractionRatio.value=a.refractionRatio),a.lightMap){n.lightMap.value=a.lightMap;const t=!0===e._useLegacyLights?Math.PI:1;n.lightMapIntensity.value=a.lightMapIntensity*t,i(a.lightMap,n.lightMapTransform)}a.aoMap&&(n.aoMap.value=a.aoMap,n.aoMapIntensity.value=a.aoMapIntensity,i(a.aoMap,n.aoMapTransform))}return{refreshFogUniforms:function(t,i){i.color.getRGB(t.fogColor.value,Kr(e)),i.isFog?(t.fogNear.value=i.near,t.fogFar.value=i.far):i.isFogExp2&&(t.fogDensity.value=i.density)},refreshMaterialUniforms:function(e,a,r,o,s){a.isMeshBasicMaterial||a.isMeshLambertMaterial?n(e,a):a.isMeshToonMaterial?(n(e,a),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,a)):a.isMeshPhongMaterial?(n(e,a),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,a)):a.isMeshStandardMaterial?(n(e,a),function(e,t){e.metalness.value=t.metalness,t.metalnessMap&&(e.metalnessMap.value=t.metalnessMap,i(t.metalnessMap,e.metalnessMapTransform));e.roughness.value=t.roughness,t.roughnessMap&&(e.roughnessMap.value=t.roughnessMap,i(t.roughnessMap,e.roughnessMapTransform));t.envMap&&(e.envMapIntensity.value=t.envMapIntensity)}(e,a),a.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap,i(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,i(t.sheenRoughnessMap,e.sheenRoughnessMapTransform)));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,i(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,i(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,i(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),t.side===m&&e.clearcoatNormalScale.value.negate()));t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap,i(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,i(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform)));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,i(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,i(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,i(t.anisotropyMap,e.anisotropyMapTransform)));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,i(t.specularColorMap,e.specularColorMapTransform));t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,i(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,a,s)):a.isMeshMatcapMaterial?(n(e,a),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,a)):a.isMeshDepthMaterial?n(e,a):a.isMeshDistanceMaterial?(n(e,a),function(e,i){const n=t.get(i).light;e.referencePosition.value.setFromMatrixPosition(n.matrixWorld),e.nearDistance.value=n.shadow.camera.near,e.farDistance.value=n.shadow.camera.far}(e,a)):a.isMeshNormalMaterial?n(e,a):a.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,i(t.map,e.mapTransform))}(e,a),a.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,a)):a.isPointsMaterial?function(e,t,n,a){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*a,t.map&&(e.map.value=t.map,i(t.map,e.uvTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,i(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,a,r,o):a.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,i(t.map,e.mapTransform));t.alphaMap&&(e.alphaMap.value=t.alphaMap,i(t.alphaMap,e.alphaMapTransform));t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,a):a.isShadowMaterial?(e.color.value.copy(a.color),e.opacity.value=a.opacity):a.isShaderMaterial&&(a.uniformsNeedUpdate=!1)}}}function Ql(e,t,i,n){let a={},r={},o=[];const s=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function l(e,t,i,n){const a=e.value,r=t+"_"+i;if(void 0===n[r])return n[r]="number"==typeof a||"boolean"==typeof a?a:a.clone(),!0;{const e=n[r];if("number"==typeof a||"boolean"==typeof a){if(e!==a)return n[r]=a,!0}else if(!1===e.equals(a))return e.copy(a),!0}return!1}function u(e){const t={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function d(t){const i=t.target;i.removeEventListener("dispose",d);const n=o.indexOf(i.__bindingPointIndex);o.splice(n,1),e.deleteBuffer(a[i.id]),delete a[i.id],delete r[i.id]}return{bind:function(e,t){const i=t.program;n.uniformBlockBinding(e,i)},update:function(i,c){let f=a[i.id];void 0===f&&(!function(e){const t=e.uniforms;let i=0;for(let e=0,n=t.length;e0&&(i+=16-n);e.__size=i,e.__cache={}}(i),f=function(t){const i=function(){for(let e=0;e0),c=!!i.morphAttributes.position,f=!!i.morphAttributes.normal,h=!!i.morphAttributes.color;let p=ee;n.toneMapped&&(null!==E&&!0!==E.isXRRenderTarget||(p=O.toneMapping));const m=i.morphAttributes.position||i.morphAttributes.normal||i.morphAttributes.color,_=void 0!==m?m.length:0,g=te.get(n),v=y.state.lights;if(!0===H&&(!0===G||e!==S)){const t=e===S&&n.id===C;fe.setState(n,e,t)}let b=!1;n.version===g.__version?g.needsLights&&g.lightsStateVersion!==v.state.version||g.outputColorSpace!==s||a.isBatchedMesh&&!1===g.batching?b=!0:a.isBatchedMesh||!0!==g.batching?a.isInstancedMesh&&!1===g.instancing?b=!0:a.isInstancedMesh||!0!==g.instancing?a.isSkinnedMesh&&!1===g.skinning?b=!0:a.isSkinnedMesh||!0!==g.skinning?a.isInstancedMesh&&!0===g.instancingColor&&null===a.instanceColor||a.isInstancedMesh&&!1===g.instancingColor&&null!==a.instanceColor||a.isInstancedMesh&&!0===g.instancingMorph&&null===a.morphTexture||a.isInstancedMesh&&!1===g.instancingMorph&&null!==a.morphTexture||g.envMap!==l||!0===n.fog&&g.fog!==r?b=!0:void 0===g.numClippingPlanes||g.numClippingPlanes===fe.numPlanes&&g.numIntersection===fe.numIntersection?(g.vertexAlphas!==u||g.vertexTangents!==d||g.morphTargets!==c||g.morphNormals!==f||g.morphColors!==h||g.toneMapping!==p||g.morphTargetsCount!==_)&&(b=!0):b=!0:b=!0:b=!0:b=!0:(b=!0,g.__version=n.version);let w=g.currentProgram;!0===b&&(w=qe(n,t,a));let x=!1,A=!1,T=!1;const M=w.getUniforms(),D=g.uniforms;Q.useProgram(w.program)&&(x=!0,A=!0,T=!0);n.id!==C&&(C=n.id,A=!0);if(x||S!==e){M.setValue(we,"projectionMatrix",e.projectionMatrix),M.setValue(we,"viewMatrix",e.matrixWorldInverse);const t=M.map.cameraPosition;void 0!==t&&t.setValue(we,q.setFromMatrixPosition(e.matrixWorld)),Z.logarithmicDepthBuffer&&M.setValue(we,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(n.isMeshPhongMaterial||n.isMeshToonMaterial||n.isMeshLambertMaterial||n.isMeshBasicMaterial||n.isMeshStandardMaterial||n.isShaderMaterial)&&M.setValue(we,"isOrthographic",!0===e.isOrthographicCamera),S!==e&&(S=e,A=!0,T=!0)}if(a.isSkinnedMesh){M.setOptional(we,a,"bindMatrix"),M.setOptional(we,a,"bindMatrixInverse");const e=a.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),M.setValue(we,"boneTexture",e.boneTexture,ie))}a.isBatchedMesh&&(M.setOptional(we,a,"batchingTexture"),M.setValue(we,"batchingTexture",a._matricesTexture,ie));const P=i.morphAttributes;void 0===P.position&&void 0===P.normal&&void 0===P.color||me.update(a,i,w);(A||g.receiveShadow!==a.receiveShadow)&&(g.receiveShadow=a.receiveShadow,M.setValue(we,"receiveShadow",a.receiveShadow));n.isMeshGouraudMaterial&&null!==n.envMap&&(D.envMap.value=l,D.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);n.isMeshStandardMaterial&&null===n.envMap&&null!==t.environment&&(D.envMapIntensity.value=t.environmentIntensity);A&&(M.setValue(we,"toneMappingExposure",O.toneMappingExposure),g.needsLights&&(L=T,(I=D).ambientLightColor.needsUpdate=L,I.lightProbe.needsUpdate=L,I.directionalLights.needsUpdate=L,I.directionalLightShadows.needsUpdate=L,I.pointLights.needsUpdate=L,I.pointLightShadows.needsUpdate=L,I.spotLights.needsUpdate=L,I.spotLightShadows.needsUpdate=L,I.rectAreaLights.needsUpdate=L,I.hemisphereLights.needsUpdate=L),r&&!0===n.fog&&ue.refreshFogUniforms(D,r),ue.refreshMaterialUniforms(D,n,N,R,y.state.transmissionRenderTarget),al.upload(we,Xe(g),D,ie));var I,L;n.isShaderMaterial&&!0===n.uniformsNeedUpdate&&(al.upload(we,Xe(g),D,ie),n.uniformsNeedUpdate=!1);n.isSpriteMaterial&&M.setValue(we,"center",a.center);if(M.setValue(we,"modelViewMatrix",a.modelViewMatrix),M.setValue(we,"normalMatrix",a.normalMatrix),M.setValue(we,"modelMatrix",a.matrixWorld),n.isShaderMaterial||n.isRawShaderMaterial){const e=n.uniformsGroups;for(let t=0,i=e.length;t{function i(){n.forEach((function(e){te.get(e).currentProgram.isReady()&&n.delete(e)})),0!==n.size?setTimeout(i,10):t(e)}null!==J.get("KHR_parallel_shader_compile")?i():setTimeout(i,10)})};let Le=null;function ze(){Ve.stop()}function Ue(){Ve.start()}const Ve=new po;function Ge(e,t,i,n){const a=e.opaque,o=e.transmissive,s=e.transparent;y.setupLightsView(i),!0===H&&fe.setGlobalState(O.clippingPlanes,i),o.length>0&&function(e,t,i,n){if(null!==(!0===i.isScene?i.overrideMaterial:null))return;if(null===y.state.transmissionRenderTarget){y.state.transmissionRenderTarget=new En(1,1,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")||J.has("EXT_color_buffer_float")?Ne:Me,minFilter:Ce,samples:4,stencilBuffer:r});te.get(y.state.transmissionRenderTarget).__isTransmissionRenderTarget=!0}const a=y.state.transmissionRenderTarget;O.getDrawingBufferSize(W),a.setSize(W.x,W.y);const o=O.getRenderTarget();O.setRenderTarget(a),O.getClearColor(I),L=O.getClearAlpha(),L<1&&O.setClearColor(16777215,.5);O.clear();const s=O.toneMapping;O.toneMapping=ee,Ye(e,i,n),ie.updateMultisampleRenderTarget(a),ie.updateRenderTargetMipmap(a);let l=!1;for(let e=0,a=t.length;e0&&Ye(a,t,i),o.length>0&&Ye(o,t,i),s.length>0&&Ye(s,t,i),Q.buffers.depth.setTest(!0),Q.buffers.depth.setMask(!0),Q.buffers.color.setMask(!0),Q.setPolygonOffset(!1)}function Ye(e,t,i){const n=!0===t.isScene?t.overrideMaterial:null;for(let a=0,r=e.length;a0?w[w.length-1]:null,b.pop(),v=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return A},this.getActiveMipmapLevel=function(){return T},this.getRenderTarget=function(){return E},this.setRenderTargetTextures=function(e,t,i){te.get(e.texture).__webglTexture=t,te.get(e.depthTexture).__webglTexture=i;const n=te.get(e);n.__hasExternalTextures=!0,n.__autoAllocateDepthBuffer=void 0===i,n.__autoAllocateDepthBuffer||!0===J.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),n.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(e,t){const i=te.get(e);i.__webglFramebuffer=t,i.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,i=0){E=e,A=t,T=i;let n=!0,a=null,r=!1,o=!1;if(e){const s=te.get(e);void 0!==s.__useDefaultFramebuffer?(Q.bindFramebuffer(we.FRAMEBUFFER,null),n=!1):void 0===s.__webglFramebuffer?ie.setupRenderTarget(e):s.__hasExternalTextures&&ie.rebindTextures(e,te.get(e.texture).__webglTexture,te.get(e.depthTexture).__webglTexture);const l=e.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(o=!0);const u=te.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(a=Array.isArray(u[t])?u[t][i]:u[t],r=!0):a=e.samples>0&&!1===ie.useMultisampledRTT(e)?te.get(e).__webglMultisampledFramebuffer:Array.isArray(u)?u[i]:u,M.copy(e.viewport),D.copy(e.scissor),P=e.scissorTest}else M.copy(k).multiplyScalar(N).floor(),D.copy(z).multiplyScalar(N).floor(),P=U;if(Q.bindFramebuffer(we.FRAMEBUFFER,a)&&n&&Q.drawBuffers(e,a),Q.viewport(M),Q.scissor(D),Q.setScissorTest(P),r){const n=te.get(e.texture);we.framebufferTexture2D(we.FRAMEBUFFER,we.COLOR_ATTACHMENT0,we.TEXTURE_CUBE_MAP_POSITIVE_X+t,n.__webglTexture,i)}else if(o){const n=te.get(e.texture),a=t||0;we.framebufferTextureLayer(we.FRAMEBUFFER,we.COLOR_ATTACHMENT0,n.__webglTexture,i||0,a)}C=-1},this.readRenderTargetPixels=function(e,t,i,n,a,r,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=te.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){Q.bindFramebuffer(we.FRAMEBUFFER,s);try{const o=e.texture,s=o.format,l=o.type;if(s!==He&&ve.convert(s)!==we.getParameter(we.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=l===Ne&&(J.has("EXT_color_buffer_half_float")||J.has("EXT_color_buffer_float"));if(l!==Me&&ve.convert(l)!==we.getParameter(we.IMPLEMENTATION_COLOR_READ_TYPE)&&l!==Re&&!u)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-n&&i>=0&&i<=e.height-a&&we.readPixels(t,i,n,a,ve.convert(s),ve.convert(l),r)}finally{const e=null!==E?te.get(E).__webglFramebuffer:null;Q.bindFramebuffer(we.FRAMEBUFFER,e)}}},this.copyFramebufferToTexture=function(e,t,i=0){const n=Math.pow(2,-i),a=Math.floor(t.image.width*n),r=Math.floor(t.image.height*n);ie.setTexture2D(t,0),we.copyTexSubImage2D(we.TEXTURE_2D,i,0,0,e.x,e.y,a,r),Q.unbindTexture()},this.copyTextureToTexture=function(e,t,i,n=0){const a=t.image.width,r=t.image.height,o=ve.convert(i.format),s=ve.convert(i.type);ie.setTexture2D(i,0),we.pixelStorei(we.UNPACK_FLIP_Y_WEBGL,i.flipY),we.pixelStorei(we.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),we.pixelStorei(we.UNPACK_ALIGNMENT,i.unpackAlignment),t.isDataTexture?we.texSubImage2D(we.TEXTURE_2D,n,e.x,e.y,a,r,o,s,t.image.data):t.isCompressedTexture?we.compressedTexSubImage2D(we.TEXTURE_2D,n,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):we.texSubImage2D(we.TEXTURE_2D,n,e.x,e.y,o,s,t.image),0===n&&i.generateMipmaps&&we.generateMipmap(we.TEXTURE_2D),Q.unbindTexture()},this.copyTextureToTexture3D=function(e,t,i,n,a=0){const r=Math.round(e.max.x-e.min.x),o=Math.round(e.max.y-e.min.y),s=e.max.z-e.min.z+1,l=ve.convert(n.format),u=ve.convert(n.type);let d;if(n.isData3DTexture)ie.setTexture3D(n,0),d=we.TEXTURE_3D;else{if(!n.isDataArrayTexture&&!n.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");ie.setTexture2DArray(n,0),d=we.TEXTURE_2D_ARRAY}we.pixelStorei(we.UNPACK_FLIP_Y_WEBGL,n.flipY),we.pixelStorei(we.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),we.pixelStorei(we.UNPACK_ALIGNMENT,n.unpackAlignment);const c=we.getParameter(we.UNPACK_ROW_LENGTH),f=we.getParameter(we.UNPACK_IMAGE_HEIGHT),h=we.getParameter(we.UNPACK_SKIP_PIXELS),p=we.getParameter(we.UNPACK_SKIP_ROWS),m=we.getParameter(we.UNPACK_SKIP_IMAGES),_=i.isCompressedTexture?i.mipmaps[a]:i.image;we.pixelStorei(we.UNPACK_ROW_LENGTH,_.width),we.pixelStorei(we.UNPACK_IMAGE_HEIGHT,_.height),we.pixelStorei(we.UNPACK_SKIP_PIXELS,e.min.x),we.pixelStorei(we.UNPACK_SKIP_ROWS,e.min.y),we.pixelStorei(we.UNPACK_SKIP_IMAGES,e.min.z),i.isDataTexture||i.isData3DTexture?we.texSubImage3D(d,a,t.x,t.y,t.z,r,o,s,l,u,_.data):n.isCompressedArrayTexture?we.compressedTexSubImage3D(d,a,t.x,t.y,t.z,r,o,s,l,_.data):we.texSubImage3D(d,a,t.x,t.y,t.z,r,o,s,l,u,_),we.pixelStorei(we.UNPACK_ROW_LENGTH,c),we.pixelStorei(we.UNPACK_IMAGE_HEIGHT,f),we.pixelStorei(we.UNPACK_SKIP_PIXELS,h),we.pixelStorei(we.UNPACK_SKIP_ROWS,p),we.pixelStorei(we.UNPACK_SKIP_IMAGES,m),0===a&&n.generateMipmaps&&we.generateMipmap(d),Q.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?ie.setTextureCube(e,0):e.isData3DTexture?ie.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?ie.setTexture2DArray(e,0):ie.setTexture2D(e,0),Q.unbindTexture()},this.resetState=function(){A=0,T=0,E=null,Q.reset(),ye.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ki}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Qt?"display-p3":"srgb",t.unpackColorSpace=pn.workingColorSpace===$t?"display-p3":"srgb"}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class eu{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Za(e),this.density=t}clone(){return new eu(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class tu{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Za(e),this.near=t,this.far=i}clone(){return new tu(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class iu extends Ra{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new va,this.environmentIntensity=1,this.environmentRotation=new va,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class nu{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=Si,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Wi()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}get updateRange(){return un("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let n=0,a=this.stride;ne.far||t.push({distance:s,point:lu.clone(),uv:Wa.getInterpolation(lu,pu,mu,_u,gu,vu,yu,new $i),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function wu(e,t,i,n,a,r){cu.subVectors(e,i).addScalar(.5).multiply(n),void 0!==a?(fu.x=r*cu.x-a*cu.y,fu.y=a*cu.x+r*cu.y):fu.copy(cu),e.copy(t),e.x+=fu.x,e.y+=fu.y,e.applyMatrix4(hu)}const Ou=new In,xu=new In;class Au extends Ra{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,i=t.length;e0){let i,n;for(i=1,n=t.length;i0){Ou.setFromMatrixPosition(this.matrixWorld);const i=e.ray.origin.distanceTo(Ou);this.getObjectForDistance(i).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Ou.setFromMatrixPosition(e.matrixWorld),xu.setFromMatrixPosition(this.matrixWorld);const i=Ou.distanceTo(xu)/e.zoom;let n,a;for(t[0].object.visible=!0,n=1,a=t.length;n=e))break;t[n-1].object.visible=!1,t[n].object.visible=!0}for(this._currentLevel=n-1;n=i.length&&i.push({start:-1,count:-1,z:-1});const a=i[this.index];n.push(a),this.index++,a.start=e.start,a.count=e.count,a.z=t}reset(){this.list.length=0,this.index=0}}const Qu=new la,$u=new la,ed=new la,td=new la,id=new ho,nd=new Rn,ad=new $n,rd=new In,od=new Zu,sd=new Gr,ld=[];function ud(e,t,i=0){const n=t.itemSize;if(e.isInterleavedBufferAttribute||e.array.constructor!==t.array.constructor){const a=e.count;for(let r=0;r65536?new Uint32Array(a):new Uint16Array(a);t.setIndex(new ur(e,1))}const r=n>65536?new Uint32Array(i):new Uint16Array(i);t.setAttribute("batchId",new ur(r,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute("batchId"))throw new Error('BatchedMesh: Geometry cannot use attribute "batchId"');const t=this.geometry;if(Boolean(e.getIndex())!==Boolean(t.getIndex()))throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if("batchId"===i)continue;if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const n=e.getAttribute(i),a=t.getAttribute(i);if(n.itemSize!==a.itemSize||n.normalized!==a.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Rn);const e=this._geometryCount,t=this.boundingBox,i=this._active;t.makeEmpty();for(let n=0;n=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const n={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let a=null;const r=this._reservedRanges,o=this._drawRanges,s=this._bounds;0!==this._geometryCount&&(a=r[r.length-1]),n.vertexCount=-1===t?e.getAttribute("position").count:t,n.vertexStart=null===a?0:a.vertexStart+a.vertexCount;const l=e.getIndex(),u=null!==l;if(u&&(n.indexCount=-1===i?l.count:i,n.indexStart=null===a?0:a.indexStart+a.indexCount),-1!==n.indexStart&&n.indexStart+n.indexCount>this._maxIndexCount||n.vertexStart+n.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._visibility,c=this._active,f=this._matricesTexture,h=this._matricesTexture.image.data;d.push(!0),c.push(!0);const p=this._geometryCount;this._geometryCount++,ed.toArray(h,16*p),f.needsUpdate=!0,r.push(n),o.push({start:u?n.indexStart:n.vertexStart,count:-1}),s.push({boxInitialized:!1,box:new Rn,sphereInitialized:!1,sphere:new $n});const m=this.geometry.getAttribute("batchId");for(let e=0;e=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,n=null!==i.getIndex(),a=i.getIndex(),r=t.getIndex(),o=this._reservedRanges[e];if(n&&r.count>o.indexCount||t.attributes.position.count>o.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const s=o.vertexStart,l=o.vertexCount;for(const e in i.attributes){if("batchId"===e)continue;const n=t.getAttribute(e),a=i.getAttribute(e);ud(n,a,s);const r=n.itemSize;for(let e=n.count,t=l;e=t.length||!1===t[e]||(t[e]=!1,this._visibilityChanged=!0),this}getBoundingBoxAt(e,t){if(!1===this._active[e])return null;const i=this._bounds[e],n=i.box,a=this.geometry;if(!1===i.boxInitialized){n.makeEmpty();const t=a.index,r=a.attributes.position,o=this._drawRanges[e];for(let e=o.start,i=o.start+o.count;e=this._geometryCount||!1===i[e]||(t.toArray(a,16*e),n.needsUpdate=!0),this}getMatrixAt(e,t){const i=this._active,n=this._matricesTexture.image.data;return e>=this._geometryCount||!1===i[e]?null:t.fromArray(n,16*e)}setVisibleAt(e,t){const i=this._visibility,n=this._active;return e>=this._geometryCount||!1===n[e]||i[e]===t||(i[e]=t,this._visibilityChanged=!0),this}getVisibleAt(e){const t=this._visibility,i=this._active;return!(e>=this._geometryCount||!1===i[e])&&t[e]}raycast(e,t){const i=this._visibility,n=this._active,a=this._drawRanges,r=this._geometryCount,o=this.matrixWorld,s=this.geometry;sd.material=this.material,sd.geometry.index=s.index,sd.geometry.attributes=s.attributes,null===sd.geometry.boundingBox&&(sd.geometry.boundingBox=new Rn),null===sd.geometry.boundingSphere&&(sd.geometry.boundingSphere=new $n);for(let s=0;s({...e})),this._reservedRanges=e._reservedRanges.map(e=>({...e})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(e=>({boxInitialized:e.boxInitialized,box:e.box.clone(),sphereInitialized:e.sphereInitialized,sphere:e.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.slice(),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this}onBeforeRender(e,t,i,n,a){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const r=n.getIndex(),o=null===r?1:r.array.BYTES_PER_ELEMENT,s=this._active,l=this._visibility,u=this._multiDrawStarts,d=this._multiDrawCounts,c=this._drawRanges,f=this.perObjectFrustumCulled;f&&(td.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),id.setFromProjectionMatrix(td,e.coordinateSystem));let h=0;if(this.sortObjects){$u.copy(this.matrixWorld).invert(),rd.setFromMatrixPosition(i.matrixWorld).applyMatrix4($u);for(let e=0,t=l.length;es)continue;c.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(c);re.far||t.push({distance:r,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}else{for(let i=Math.max(0,r.start),n=Math.min(p.count,r.start+r.count)-1;is)continue;c.applyMatrix4(this.matrixWorld);const n=e.ray.origin.distanceTo(c);ne.far||t.push({distance:n,point:d.clone().applyMatrix4(this.matrixWorld),index:i,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;e0){const i=e[t[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=i.length;ea.far)return;r.push({distance:l,distanceToRay:Math.sqrt(s),point:i,index:t,face:null,object:o})}}class Md extends xn{constructor(e,t,i,n,a,r,o,s,l){super(e,t,i,n,a,r,o,s,l),this.isVideoTexture=!0,this.minFilter=void 0!==r?r:Ae,this.magFilter=void 0!==a?a:Ae,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class Dd extends xn{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=ye,this.minFilter=ye,this.generateMipmaps=!1,this.needsUpdate=!0}}class Pd extends xn{constructor(e,t,i,n,a,r,o,s,l,u,d,c){super(null,r,o,s,l,u,n,a,d,c),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Id extends Pd{constructor(e,t,i,n,a,r){super(e,t,i,a,r),this.isCompressedArrayTexture=!0,this.image.depth=n,this.wrapR=ge}}class Ld extends Pd{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,ce),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class jd extends xn{constructor(e,t,i,n,a,r,o,s,l){super(e,t,i,n,a,r,o,s,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Rd{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,n=this.getPoint(0),a=0;t.push(0);for(let r=1;r<=e;r++)i=this.getPoint(r/e),a+=i.distanceTo(n),t.push(a),n=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let n=0;const a=i.length;let r;r=t||e*i[a-1];let o,s=0,l=a-1;for(;s<=l;)if(n=Math.floor(s+(l-s)/2),o=i[n]-r,o<0)s=n+1;else{if(!(o>0)){l=n;break}l=n-1}if(n=l,i[n]===r)return n/(a-1);const u=i[n];return(n+(r-u)/(i[n+1]-u))/(a-1)}getTangent(e,t){let i=e-1e-4,n=e+1e-4;i<0&&(i=0),n>1&&(n=1);const a=this.getPoint(i),r=this.getPoint(n),o=t||(a.isVector2?new $i:new In);return o.copy(r).sub(a).normalize(),o}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new In,n=[],a=[],r=[],o=new In,s=new la;for(let t=0;t<=e;t++){const i=t/e;n[t]=this.getTangentAt(i,new In)}a[0]=new In,r[0]=new In;let l=Number.MAX_VALUE;const u=Math.abs(n[0].x),d=Math.abs(n[0].y),c=Math.abs(n[0].z);u<=l&&(l=u,i.set(1,0,0)),d<=l&&(l=d,i.set(0,1,0)),c<=l&&i.set(0,0,1),o.crossVectors(n[0],i).normalize(),a[0].crossVectors(n[0],o),r[0].crossVectors(n[0],a[0]);for(let t=1;t<=e;t++){if(a[t]=a[t-1].clone(),r[t]=r[t-1].clone(),o.crossVectors(n[t-1],n[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(qi(n[t-1].dot(n[t]),-1,1));a[t].applyMatrix4(s.makeRotationAxis(o,e))}r[t].crossVectors(n[t],a[t])}if(!0===t){let t=Math.acos(qi(a[0].dot(a[e]),-1,1));t/=e,n[0].dot(o.crossVectors(a[0],a[e]))>0&&(t=-t);for(let i=1;i<=e;i++)a[i].applyMatrix4(s.makeRotationAxis(n[i],t*i)),r[i].crossVectors(n[i],a[i])}return{tangents:n,normals:a,binormals:r}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Nd extends Rd{constructor(e=0,t=0,i=1,n=1,a=0,r=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=n,this.aStartAngle=a,this.aEndAngle=r,this.aClockwise=o,this.aRotation=s}getPoint(e,t=new $i){const i=t,n=2*Math.PI;let a=this.aEndAngle-this.aStartAngle;const r=Math.abs(a)n;)a-=n;a0?0:(Math.floor(Math.abs(l)/a)+1)*a:0===u&&l===a-1&&(l=a-2,u=1),this.closed||l>0?o=n[(l-1)%a]:(kd.subVectors(n[0],n[1]).add(n[0]),o=kd);const d=n[l%a],c=n[(l+1)%a];if(this.closed||l+2n.length-2?n.length-1:r+1],d=n[r>n.length-3?n.length-1:r+2];return i.set(Gd(o,s.x,l.x,u.x,d.x),Gd(o,s.y,l.y,u.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const e=n[a]-i,r=this.curves[a],o=r.getLength(),s=0===o?0:1-e/o;return r.getPointAt(s,t)}a++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,n=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class nc extends Er{constructor(e=[new $i(0,-.5),new $i(.5,0),new $i(0,.5)],t=12,i=0,n=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:n},t=Math.floor(t),n=qi(n,0,2*Math.PI);const a=[],r=[],o=[],s=[],l=[],u=1/t,d=new In,c=new $i,f=new In,h=new In,p=new In;let m=0,_=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,_=e[t+1].y-e[t].y,f.x=1*_,f.y=-m,f.z=0*_,p.copy(f),f.normalize(),s.push(f.x,f.y,f.z);break;case e.length-1:s.push(p.x,p.y,p.z);break;default:m=e[t+1].x-e[t].x,_=e[t+1].y-e[t].y,f.x=1*_,f.y=-m,f.z=0*_,h.copy(f),f.x+=p.x,f.y+=p.y,f.z+=p.z,f.normalize(),s.push(f.x,f.y,f.z),p.copy(h)}for(let a=0;a<=t;a++){const f=i+a*u*n,h=Math.sin(f),p=Math.cos(f);for(let i=0;i<=e.length-1;i++){d.x=e[i].x*h,d.y=e[i].y,d.z=e[i].x*p,r.push(d.x,d.y,d.z),c.x=a/t,c.y=i/(e.length-1),o.push(c.x,c.y);const n=s[3*i+0]*h,u=s[3*i+1],f=s[3*i+0]*p;l.push(n,u,f)}}for(let i=0;i0&&g(!0),t>0&&g(!1)),this.setIndex(u),this.setAttribute("position",new vr(d,3)),this.setAttribute("normal",new vr(c,3)),this.setAttribute("uv",new vr(f,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new oc(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class sc extends oc{constructor(e=1,t=1,i=32,n=1,a=!1,r=0,o=2*Math.PI){super(0,e,t,i,n,a,r,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:i,heightSegments:n,openEnded:a,thetaStart:r,thetaLength:o}}static fromJSON(e){return new sc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class lc extends Er{constructor(e=[],t=[],i=1,n=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:i,detail:n};const a=[],r=[];function o(e,t,i,n){const a=n+1,r=[];for(let n=0;n<=a;n++){r[n]=[];const o=e.clone().lerp(i,n/a),s=t.clone().lerp(i,n/a),l=a-n;for(let e=0;e<=l;e++)r[n][e]=0===e&&n===a?o:o.clone().lerp(s,e/l)}for(let e=0;e.9&&o<.1&&(t<.2&&(r[e+0]+=1),i<.2&&(r[e+2]+=1),n<.2&&(r[e+4]+=1))}}()}(),this.setAttribute("position",new vr(a,3)),this.setAttribute("normal",new vr(a.slice(),3)),this.setAttribute("uv",new vr(r,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new lc(e.vertices,e.indices,e.radius,e.details)}}class uc extends lc{constructor(e=1,t=0){const i=(1+Math.sqrt(5))/2,n=1/i;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new uc(e.radius,e.detail)}}const dc=new In,cc=new In,fc=new In,hc=new Wa;class pc extends Er{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const i=4,n=Math.pow(10,i),a=Math.cos(Gi*t),r=e.getIndex(),o=e.getAttribute("position"),s=r?r.count:o.count,l=[0,0,0],u=["a","b","c"],d=new Array(3),c={},f=[];for(let e=0;e80*i){s=u=e[0],l=d=e[1];for(let t=i;tu&&(u=c),f>d&&(d=f);h=Math.max(u-s,d-l),h=0!==h?32767/h:0}return yc(r,o,i,s,l,h,0),o};function gc(e,t,i,n,a){let r,o;if(a===function(e,t,i,n){let a=0;for(let r=t,o=i-n;r0)for(r=t;r=t;r-=n)o=Fc(r,e[r],e[r+1],o);return o&&Ic(o,o.next)&&(kc(o),o=o.next),o}function vc(e,t){if(!e)return e;t||(t=e);let i,n=e;do{if(i=!1,n.steiner||!Ic(n,n.next)&&0!==Pc(n.prev,n,n.next))n=n.next;else{if(kc(n),n=t=n.prev,n===n.next)break;i=!0}}while(i||n!==t);return t}function yc(e,t,i,n,a,r,o){if(!e)return;!o&&r&&function(e,t,i,n){let a=e;do{0===a.z&&(a.z=Cc(a.x,a.y,t,i,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){let t,i,n,a,r,o,s,l,u=1;do{for(i=e,e=null,r=null,o=0;i;){for(o++,n=i,s=0,t=0;t0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(a=i,i=i.nextZ,s--):(a=n,n=n.nextZ,l--),r?r.nextZ=a:e=a,a.prevZ=r,r=a;i=n}r.nextZ=null,u*=2}while(o>1)}(a)}(e,n,a,r);let s,l,u=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,r?wc(e,n,a,r):bc(e))t.push(s.i/i|0),t.push(e.i/i|0),t.push(l.i/i|0),kc(e),e=l.next,u=l.next;else if((e=l)===u){o?1===o?yc(e=Oc(vc(e),t,i),t,i,n,a,r,2):2===o&&xc(e,t,i,n,a,r):yc(vc(e),t,i,n,a,r,1);break}}function bc(e){const t=e.prev,i=e,n=e.next;if(Pc(t,i,n)>=0)return!1;const a=t.x,r=i.x,o=n.x,s=t.y,l=i.y,u=n.y,d=ar?a>o?a:o:r>o?r:o,h=s>l?s>u?s:u:l>u?l:u;let p=n.next;for(;p!==t;){if(p.x>=d&&p.x<=f&&p.y>=c&&p.y<=h&&Mc(a,s,r,l,o,u,p.x,p.y)&&Pc(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function wc(e,t,i,n){const a=e.prev,r=e,o=e.next;if(Pc(a,r,o)>=0)return!1;const s=a.x,l=r.x,u=o.x,d=a.y,c=r.y,f=o.y,h=sl?s>u?s:u:l>u?l:u,_=d>c?d>f?d:f:c>f?c:f,g=Cc(h,p,t,i,n),v=Cc(m,_,t,i,n);let y=e.prevZ,b=e.nextZ;for(;y&&y.z>=g&&b&&b.z<=v;){if(y.x>=h&&y.x<=m&&y.y>=p&&y.y<=_&&y!==a&&y!==o&&Mc(s,d,l,c,u,f,y.x,y.y)&&Pc(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,b.x>=h&&b.x<=m&&b.y>=p&&b.y<=_&&b!==a&&b!==o&&Mc(s,d,l,c,u,f,b.x,b.y)&&Pc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;y&&y.z>=g;){if(y.x>=h&&y.x<=m&&y.y>=p&&y.y<=_&&y!==a&&y!==o&&Mc(s,d,l,c,u,f,y.x,y.y)&&Pc(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;b&&b.z<=v;){if(b.x>=h&&b.x<=m&&b.y>=p&&b.y<=_&&b!==a&&b!==o&&Mc(s,d,l,c,u,f,b.x,b.y)&&Pc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function Oc(e,t,i){let n=e;do{const a=n.prev,r=n.next.next;!Ic(a,r)&&Lc(a,n,n.next,r)&&Nc(a,r)&&Nc(r,a)&&(t.push(a.i/i|0),t.push(n.i/i|0),t.push(r.i/i|0),kc(n),kc(n.next),n=e=r),n=n.next}while(n!==e);return vc(n)}function xc(e,t,i,n,a,r){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&Dc(o,e)){let s=Bc(o,e);return o=vc(o,o.next),s=vc(s,s.next),yc(o,t,i,n,a,r,0),void yc(s,t,i,n,a,r,0)}e=e.next}o=o.next}while(o!==e)}function Ac(e,t){return e.x-t.x}function Tc(e,t){const i=function(e,t){let i,n=t,a=-1/0;const r=e.x,o=e.y;do{if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const e=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>a&&(a=e,i=n.x=n.x&&n.x>=l&&r!==n.x&&Mc(oi.x||n.x===i.x&&Ec(i,n)))&&(i=n,c=d)),n=n.next}while(n!==s);return i}(e,t);if(!i)return t;const n=Bc(i,e);return vc(n,n.next),vc(i,i.next)}function Ec(e,t){return Pc(e.prev,e,t.prev)<0&&Pc(t.next,e,e.next)<0}function Cc(e,t,i,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*a|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*a|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Sc(e){let t=e,i=e;do{(t.x=(e-o)*(r-s)&&(e-o)*(n-s)>=(i-o)*(t-s)&&(i-o)*(r-s)>=(a-o)*(n-s)}function Dc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&Lc(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(e,t)&&(Nc(e,t)&&Nc(t,e)&&function(e,t){let i=e,n=!1;const a=(e.x+t.x)/2,r=(e.y+t.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&a<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}(e,t)&&(Pc(e.prev,e,t.prev)||Pc(e,t.prev,t))||Ic(e,t)&&Pc(e.prev,e,e.next)>0&&Pc(t.prev,t,t.next)>0)}function Pc(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function Ic(e,t){return e.x===t.x&&e.y===t.y}function Lc(e,t,i,n){const a=Rc(Pc(e,t,i)),r=Rc(Pc(e,t,n)),o=Rc(Pc(i,n,e)),s=Rc(Pc(i,n,t));return a!==r&&o!==s||(!(0!==a||!jc(e,i,t))||(!(0!==r||!jc(e,n,t))||(!(0!==o||!jc(i,e,n))||!(0!==s||!jc(i,t,n)))))}function jc(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function Rc(e){return e>0?1:e<0?-1:0}function Nc(e,t){return Pc(e.prev,e,e.next)<0?Pc(e,t,e.next)>=0&&Pc(e,e.prev,t)>=0:Pc(e,t,e.prev)<0||Pc(e,e.next,t)<0}function Bc(e,t){const i=new zc(e.i,e.x,e.y),n=new zc(t.i,t.x,t.y),a=e.next,r=t.prev;return e.next=t,t.prev=e,i.next=a,a.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function Fc(e,t,i,n){const a=new zc(e,t,i);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function kc(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function zc(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class Uc{static area(e){const t=e.length;let i=0;for(let n=t-1,a=0;a2&&e[t-1].equals(e[0])&&e.pop()}function Hc(e,t){for(let i=0;iNumber.EPSILON){const c=Math.sqrt(d),f=Math.sqrt(l*l+u*u),h=t.x-s/c,p=t.y+o/c,m=((i.x-u/f-h)*u-(i.y+l/f-p)*l)/(o*u-s*l);n=h+o*m-e.x,a=p+s*m-e.y;const _=n*n+a*a;if(_<=2)return new $i(n,a);r=Math.sqrt(_/2)}else{let e=!1;o>Number.EPSILON?l>Number.EPSILON&&(e=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(u)&&(e=!0),e?(n=-s,a=o,r=Math.sqrt(d)):(n=o,a=s,r=Math.sqrt(d/2))}return new $i(n/r,a/r)}const P=[];for(let e=0,t=E.length,i=t-1,n=e+1;e=0;e--){const t=e/h,i=d*Math.cos(t*Math.PI/2),n=c*Math.sin(t*Math.PI/2)+f;for(let e=0,t=E.length;e=0;){const n=i;let a=i-1;a<0&&(a=e.length-1);for(let e=0,i=s+2*h;e0)&&f.push(t,a,l),(e!==i-1||s0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class uf extends er{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Za(16777215),this.specular=new Za(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Za(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qt,this.normalScale=new $i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new va,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class df extends er{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Za(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Za(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qt,this.normalScale=new $i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class cf extends er{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qt,this.normalScale=new $i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class ff extends er{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Za(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Za(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qt,this.normalScale=new $i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new va,this.combine=Z,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class hf extends er{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Za(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=qt,this.normalScale=new $i(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class pf extends cd{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function mf(e,t,i){return!e||!i&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function _f(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function gf(e){const t=e.length,i=new Array(t);for(let e=0;e!==t;++e)i[e]=e;return i.sort((function(t,i){return e[t]-e[i]})),i}function vf(e,t,i){const n=e.length,a=new e.constructor(n);for(let r=0,o=0;o!==n;++r){const n=i[r]*t;for(let i=0;i!==t;++i)a[o++]=e[n+i]}return a}function yf(e,t,i,n){let a=1,r=e[0];for(;void 0!==r&&void 0===r[n];)r=e[a++];if(void 0===r)return;let o=r[n];if(void 0!==o)if(Array.isArray(o))do{o=r[n],void 0!==o&&(t.push(r.time),i.push.apply(i,o)),r=e[a++]}while(void 0!==r);else if(void 0!==o.toArray)do{o=r[n],void 0!==o&&(t.push(r.time),o.toArray(i,i.length)),r=e[a++]}while(void 0!==r);else do{o=r[n],void 0!==o&&(t.push(r.time),i.push(o)),r=e[a++]}while(void 0!==r)}const bf={convertArray:mf,isTypedArray:_f,getKeyframeOrder:gf,sortedArray:vf,flattenJSON:yf,subclip:function(e,t,i,n,a=30){const r=e.clone();r.name=t;const o=[];for(let e=0;e=n)){l.push(t.times[e]);for(let i=0;ir.tracks[e].times[0]&&(s=r.tracks[e].times[0]);for(let e=0;e=n.times[c]){const e=c*l+s,t=e+l-s;f=n.values.slice(e,t)}else{const e=n.createInterpolant(),t=s,i=l-s;e.evaluate(r),f=e.resultBuffer.slice(t,i)}if("quaternion"===a){(new Pn).fromArray(f).normalize().conjugate().toArray(f)}const h=o.times.length;for(let e=0;e=a)break e;{const o=t[1];e=a)break t}r=i,i=0}}for(;i>>1;et;)--r;if(++r,0!==a||r!==n){a>=r&&(r=Math.max(r,1),a=r-1);const e=this.getValueSize();this.times=i.slice(a,r),this.values=this.values.slice(a*e,r*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,n=this.values,a=i.length;0===a&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let r=null;for(let t=0;t!==a;t++){const n=i[t];if("number"==typeof n&&isNaN(n)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,n),e=!1;break}if(null!==r&&r>n){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,n,r),e=!1;break}r=n}if(void 0!==n&&_f(n))for(let t=0,i=n.length;t!==i;++t){const i=n[t];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,i),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),n=this.getInterpolation()===Nt,a=e.length-1;let r=1;for(let o=1;o0){e[r]=e[a];for(let e=a*i,n=r*i,o=0;o!==i;++o)t[n+o]=t[e+o];++r}return r!==e.length?(this.times=e.slice(0,r),this.values=t.slice(0,r*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=new(0,this.constructor)(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}Tf.prototype.TimeBufferType=Float32Array,Tf.prototype.ValueBufferType=Float32Array,Tf.prototype.DefaultInterpolation=Rt;class Ef extends Tf{}Ef.prototype.ValueTypeName="bool",Ef.prototype.ValueBufferType=Array,Ef.prototype.DefaultInterpolation=jt,Ef.prototype.InterpolantFactoryMethodLinear=void 0,Ef.prototype.InterpolantFactoryMethodSmooth=void 0;class Cf extends Tf{}Cf.prototype.ValueTypeName="color";class Sf extends Tf{}Sf.prototype.ValueTypeName="number";class Mf extends wf{constructor(e,t,i,n){super(e,t,i,n)}interpolate_(e,t,i,n){const a=this.resultBuffer,r=this.sampleValues,o=this.valueSize,s=(i-t)/(n-t);let l=e*o;for(let e=l+o;l!==e;l+=4)Pn.slerpFlat(a,0,r,l-o,r,l,s);return a}}class Df extends Tf{InterpolantFactoryMethodLinear(e){return new Mf(this.times,this.values,this.getValueSize(),e)}}Df.prototype.ValueTypeName="quaternion",Df.prototype.DefaultInterpolation=Rt,Df.prototype.InterpolantFactoryMethodSmooth=void 0;class Pf extends Tf{}Pf.prototype.ValueTypeName="string",Pf.prototype.ValueBufferType=Array,Pf.prototype.DefaultInterpolation=jt,Pf.prototype.InterpolantFactoryMethodLinear=void 0,Pf.prototype.InterpolantFactoryMethodSmooth=void 0;class If extends Tf{}If.prototype.ValueTypeName="vector";class Lf{constructor(e="",t=-1,i=[],n=zt){this.name=e,this.tracks=i,this.duration=t,this.blendMode=n,this.uuid=Wi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,n=1/(e.fps||1);for(let e=0,a=i.length;e!==a;++e)t.push(jf(i[e]).scale(n));const a=new this(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a}static toJSON(e){const t=[],i=e.tracks,n={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,n=i.length;e!==n;++e)t.push(Tf.toJSON(i[e]));return n}static CreateFromMorphTargetSequence(e,t,i,n){const a=t.length,r=[];for(let e=0;e1){const e=r[1];let t=n[e];t||(n[e]=t=[]),t.push(i)}}const r=[];for(const e in n)r.push(this.CreateFromMorphTargetSequence(e,n[e],t,i));return r}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(e,t,i,n,a){if(0!==i.length){const r=[],o=[];yf(i,r,o,n),0!==r.length&&a.push(new e(t,r,o))}},n=[],a=e.name||"default",r=e.fps||30,o=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let e=0;e{t&&t(a),this.manager.itemEnd(e)},0),a;if(void 0!==kf[e])return void kf[e].push({onLoad:t,onProgress:i,onError:n});kf[e]=[],kf[e].push({onLoad:t,onProgress:i,onError:n});const r=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,s=this.responseType;fetch(r).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const i=kf[e],n=t.body.getReader(),a=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),r=a?parseInt(a):0,o=0!==r;let s=0;const l=new ReadableStream({start(e){!function t(){n.read().then(({done:n,value:a})=>{if(n)e.close();else{s+=a.byteLength;const n=new ProgressEvent("progress",{lengthComputable:o,loaded:s,total:r});for(let e=0,t=i.length;e{switch(s){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,o));case"json":return e.json();default:if(void 0===o)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(o),i=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(i);return e.arrayBuffer().then(e=>n.decode(e))}}}).then(t=>{Rf.add(e,t);const i=kf[e];delete kf[e];for(let e=0,n=i.length;e{const i=kf[e];if(void 0===i)throw this.manager.itemError(e),t;delete kf[e];for(let e=0,n=i.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Vf extends Ff{constructor(e){super(e)}load(e,t,i,n){const a=this,r=new Uf(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,(function(i){try{t(a.parse(JSON.parse(i)))}catch(t){n?n(t):console.error(t),a.manager.itemError(e)}}),i,n)}parse(e){const t=[];for(let i=0;i0:n.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const a=e.uniforms[t];switch(n.uniforms[t]={},a.type){case"t":n.uniforms[t].value=i(a.value);break;case"c":n.uniforms[t].value=(new Za).setHex(a.value);break;case"v2":n.uniforms[t].value=(new $i).fromArray(a.value);break;case"v3":n.uniforms[t].value=(new In).fromArray(a.value);break;case"v4":n.uniforms[t].value=(new An).fromArray(a.value);break;case"m3":n.uniforms[t].value=(new en).fromArray(a.value);break;case"m4":n.uniforms[t].value=(new la).fromArray(a.value);break;default:n.uniforms[t].value=a.value}}if(void 0!==e.defines&&(n.defines=e.defines),void 0!==e.vertexShader&&(n.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(n.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(n.glslVersion=e.glslVersion),void 0!==e.extensions)for(const t in e.extensions)n.extensions[t]=e.extensions[t];if(void 0!==e.lights&&(n.lights=e.lights),void 0!==e.clipping&&(n.clipping=e.clipping),void 0!==e.size&&(n.size=e.size),void 0!==e.sizeAttenuation&&(n.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(n.map=i(e.map)),void 0!==e.matcap&&(n.matcap=i(e.matcap)),void 0!==e.alphaMap&&(n.alphaMap=i(e.alphaMap)),void 0!==e.bumpMap&&(n.bumpMap=i(e.bumpMap)),void 0!==e.bumpScale&&(n.bumpScale=e.bumpScale),void 0!==e.normalMap&&(n.normalMap=i(e.normalMap)),void 0!==e.normalMapType&&(n.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),n.normalScale=(new $i).fromArray(t)}return void 0!==e.displacementMap&&(n.displacementMap=i(e.displacementMap)),void 0!==e.displacementScale&&(n.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(n.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(n.roughnessMap=i(e.roughnessMap)),void 0!==e.metalnessMap&&(n.metalnessMap=i(e.metalnessMap)),void 0!==e.emissiveMap&&(n.emissiveMap=i(e.emissiveMap)),void 0!==e.emissiveIntensity&&(n.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(n.specularMap=i(e.specularMap)),void 0!==e.specularIntensityMap&&(n.specularIntensityMap=i(e.specularIntensityMap)),void 0!==e.specularColorMap&&(n.specularColorMap=i(e.specularColorMap)),void 0!==e.envMap&&(n.envMap=i(e.envMap)),void 0!==e.envMapRotation&&n.envMapRotation.fromArray(e.envMapRotation),void 0!==e.envMapIntensity&&(n.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(n.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(n.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(n.lightMap=i(e.lightMap)),void 0!==e.lightMapIntensity&&(n.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(n.aoMap=i(e.aoMap)),void 0!==e.aoMapIntensity&&(n.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(n.gradientMap=i(e.gradientMap)),void 0!==e.clearcoatMap&&(n.clearcoatMap=i(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(n.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(n.clearcoatNormalMap=i(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(n.clearcoatNormalScale=(new $i).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(n.iridescenceMap=i(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(n.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(n.transmissionMap=i(e.transmissionMap)),void 0!==e.thicknessMap&&(n.thicknessMap=i(e.thicknessMap)),void 0!==e.anisotropyMap&&(n.anisotropyMap=i(e.anisotropyMap)),void 0!==e.sheenColorMap&&(n.sheenColorMap=i(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(n.sheenRoughnessMap=i(e.sheenRoughnessMap)),n}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:rf,SpriteMaterial:ou,RawShaderMaterial:of,ShaderMaterial:Zr,PointsMaterial:Od,MeshPhysicalMaterial:lf,MeshStandardMaterial:sf,MeshPhongMaterial:uf,MeshToonMaterial:df,MeshNormalMaterial:cf,MeshLambertMaterial:ff,MeshDepthMaterial:Bl,MeshDistanceMaterial:Fl,MeshBasicMaterial:tr,MeshMatcapMaterial:hf,LineDashedMaterial:pf,LineBasicMaterial:cd,Material:er}[e]}}class ph{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let i=0,n=e.length;i0){const i=new Nf(t);a=new Gf(i),a.setCrossOrigin(this.crossOrigin);for(let t=0,i=e.length;t0){n=new Gf(this.manager),n.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t{const t=new Rn;t.min.fromArray(e.boxMin),t.max.fromArray(e.boxMax);const i=new $n;return i.radius=e.sphereRadius,i.center.fromArray(e.sphereCenter),{boxInitialized:e.boxInitialized,box:t,sphereInitialized:e.sphereInitialized,sphere:i}}),r._maxGeometryCount=e.maxGeometryCount,r._maxVertexCount=e.maxVertexCount,r._maxIndexCount=e.maxIndexCount,r._geometryInitialized=e.geometryInitialized,r._geometryCount=e.geometryCount,r._matricesTexture=d(e.matricesTexture.uuid);break;case"LOD":r=new Au;break;case"Line":r=new gd(l(e.geometry),u(e.material));break;case"LineLoop":r=new wd(l(e.geometry),u(e.material));break;case"LineSegments":r=new bd(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":r=new Cd(l(e.geometry),u(e.material));break;case"Sprite":r=new bu(u(e.material));break;case"Group":r=new Gl;break;case"Bone":r=new Ru;break;default:r=new Ra}if(r.uuid=e.uuid,void 0!==e.name&&(r.name=e.name),void 0!==e.matrix?(r.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(r.matrixAutoUpdate=e.matrixAutoUpdate),r.matrixAutoUpdate&&r.matrix.decompose(r.position,r.quaternion,r.scale)):(void 0!==e.position&&r.position.fromArray(e.position),void 0!==e.rotation&&r.rotation.fromArray(e.rotation),void 0!==e.quaternion&&r.quaternion.fromArray(e.quaternion),void 0!==e.scale&&r.scale.fromArray(e.scale)),void 0!==e.up&&r.up.fromArray(e.up),void 0!==e.castShadow&&(r.castShadow=e.castShadow),void 0!==e.receiveShadow&&(r.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(r.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(r.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(r.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&r.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(r.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.frustumCulled&&(r.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(r.renderOrder=e.renderOrder),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.layers&&(r.layers.mask=e.layers),void 0!==e.children){const o=e.children;for(let e=0;e{t&&t(i),a.manager.itemEnd(e)}).catch(e=>{n&&n(e)}):(setTimeout((function(){t&&t(r),a.manager.itemEnd(e)}),0),r);const o={};o.credentials="anonymous"===this.crossOrigin?"same-origin":"include",o.headers=this.requestHeader;const s=fetch(e,o).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(a.options,{colorSpaceConversion:"none"}))})).then((function(i){return Rf.add(e,i),t&&t(i),a.manager.itemEnd(e),i})).catch((function(t){n&&n(t),Rf.remove(e),a.manager.itemError(e),a.manager.itemEnd(e)}));Rf.add(e,s),a.manager.itemStart(e)}}let Oh;class xh{static getContext(){return void 0===Oh&&(Oh=new(window.AudioContext||window.webkitAudioContext)),Oh}static setContext(e){Oh=e}}class Ah extends Ff{constructor(e){super(e)}load(e,t,i,n){const a=this,r=new Uf(this.manager);function o(t){n?n(t):console.error(t),a.manager.itemError(e)}r.setResponseType("arraybuffer"),r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials),r.load(e,(function(e){try{const i=e.slice(0);xh.getContext().decodeAudioData(i,(function(e){t(e)})).catch(o)}catch(e){o(e)}}),i,n)}}const Th=new la,Eh=new la,Ch=new la;class Sh{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new io,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new io,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Ch.copy(e.projectionMatrix);const i=t.eyeSep/2,n=i*t.near/t.focus,a=t.near*Math.tan(Gi*t.fov*.5)/t.zoom;let r,o;Eh.elements[12]=-i,Th.elements[12]=i,r=-a*t.aspect+n,o=a*t.aspect+n,Ch.elements[0]=2*t.near/(o-r),Ch.elements[8]=(o+r)/(o-r),this.cameraL.projectionMatrix.copy(Ch),r=-a*t.aspect-n,o=a*t.aspect-n,Ch.elements[0]=2*t.near/(o-r),Ch.elements[8]=(o+r)/(o-r),this.cameraR.projectionMatrix.copy(Ch)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Eh),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Th)}}class Mh{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Dh(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=Dh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Dh(){return("undefined"==typeof performance?Date:performance).now()}const Ph=new In,Ih=new Pn,Lh=new In,jh=new In;class Rh extends Ra{constructor(){super(),this.type="AudioListener",this.context=xh.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Mh}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ph,Ih,Lh),jh.set(0,0,-1).applyQuaternion(Ih),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Ph.x,e),t.positionY.linearRampToValueAtTime(Ph.y,e),t.positionZ.linearRampToValueAtTime(Ph.z,e),t.forwardX.linearRampToValueAtTime(jh.x,e),t.forwardY.linearRampToValueAtTime(jh.y,e),t.forwardZ.linearRampToValueAtTime(jh.z,e),t.upX.linearRampToValueAtTime(i.x,e),t.upY.linearRampToValueAtTime(i.y,e),t.upZ.linearRampToValueAtTime(i.z,e)}else t.setPosition(Ph.x,Ph.y,Ph.z),t.setOrientation(jh.x,jh.y,jh.z,i.x,i.y,i.z)}}class Nh extends Ra{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,null!==this.source&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,n,this._addIndex*t,1,t);for(let e=t,a=t+t;e!==a;++e)if(i[e]!==i[e+t]){o.setValue(i,n);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,n=i*this._origIndex;e.getValue(t,n);for(let e=i,a=n;e!==a;++e)t[e]=t[n+e%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let n=0;n!==a;++n)e[t+n]=e[i+n]}_slerp(e,t,i,n){Pn.slerpFlat(e,t,e,t,e,i,n)}_slerpAdditive(e,t,i,n,a){const r=this._workIndex*a;Pn.multiplyQuaternionsFlat(e,r,e,t,e,i),Pn.slerpFlat(e,t,e,t,e,r,n)}_lerp(e,t,i,n,a){const r=1-n;for(let o=0;o!==a;++o){const a=t+o;e[a]=e[a]*r+e[i+o]*n}}_lerpAdditive(e,t,i,n,a){for(let r=0;r!==a;++r){const a=t+r;e[a]=e[a]+e[i+r]*n}}}const Gh=new RegExp("[\\[\\]\\.:\\/]","g"),Yh="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Wh=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]")+/(WCOD+)?/.source.replace("WCOD",Yh)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]")+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]")+"$"),qh=["material","materials","bones","map"];class Xh{constructor(e,t,i){this.path=t,this.parsedPath=i||Xh.parseTrackName(t),this.node=Xh.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Xh.Composite(e,t,i):new Xh(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Gh,"")}static parseTrackName(e){const t=Wh.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){const e=i.nodeName.substring(n+1);-1!==qh.indexOf(e)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=e)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(void 0!==i)return i}if(e.children){const i=function(e){for(let n=0;n=a){const r=a++,u=e[r];t[u.uuid]=l,e[l]=u,t[s]=r,e[r]=o;for(let e=0,t=n;e!==t;++e){const t=i[e],n=t[r],a=t[l];t[l]=n,t[r]=a}}}this.nCachedObjects_=a}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,n=i.length;let a=this.nCachedObjects_,r=e.length;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o].uuid,l=t[s];if(void 0!==l)if(delete t[s],l0&&(t[o.uuid]=l),e[l]=o,e.pop();for(let e=0,t=n;e!==t;++e){const t=i[e];t[l]=t[a],t.pop()}}}this.nCachedObjects_=a}subscribe_(e,t){const i=this._bindingsIndicesByPath;let n=i[e];const a=this._bindings;if(void 0!==n)return a[n];const r=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,u=this.nCachedObjects_,d=new Array(l);n=a.length,i[e]=n,r.push(e),o.push(t),a.push(d);for(let i=u,n=s.length;i!==n;++i){const n=s[i];d[i]=new Xh(n,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(void 0!==i){const n=this._paths,a=this._parsedPaths,r=this._bindings,o=r.length-1,s=r[o];t[e[o]]=i,r[i]=s,r.pop(),a[i]=a[o],a.pop(),n[i]=n[o],n.pop()}}}class Jh{constructor(e,t,i=null,n=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=n;const a=t.tracks,r=a.length,o=new Array(r),s={endingStart:Bt,endingEnd:Bt};for(let e=0;e!==r;++e){const t=a[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=It,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const i=this._clip.duration,n=e._clip.duration,a=n/i,r=i/n;e.warp(1,a,t),this.warp(r,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const n=this._mixer,a=n.time,r=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=n._lendControlInterpolant(),this._timeScaleInterpolant=o);const s=o.parameterPositions,l=o.sampleValues;return s[0]=a,s[1]=a+i,l[0]=e/r,l[1]=t/r,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,n){if(!this.enabled)return void this._updateWeight(e);const a=this._startTime;if(null!==a){const n=(e-a)*i;n<0||0===i?t=0:(this._startTime=null,t=i*n)}t*=this._updateTimeScale(e);const r=this._updateTime(t),o=this._updateWeight(e);if(o>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case Ut:for(let i=0,n=e.length;i!==n;++i)e[i].evaluate(r),t[i].accumulateAdditive(o);break;case zt:default:for(let i=0,a=e.length;i!==a;++i)e[i].evaluate(r),t[i].accumulate(n,o)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(null!==i){const n=i.evaluate(e)[0];t*=n,e>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(null!==i){t*=i.evaluate(e)[0],e>i.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let n=this.time+e,a=this._loopCount;const r=i===Lt;if(0===e)return-1===a?n:r&&1==(1&a)?t-n:n;if(i===Pt){-1===a&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(n>=t)n=t;else{if(!(n<0)){this.time=n;break e}n=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===a&&(e>=0?(a=0,this._setEndings(!0,0===this.repetitions,r)):this._setEndings(0===this.repetitions,!0,r)),n>=t||n<0){const i=Math.floor(n/t);n-=t*i,a+=Math.abs(i);const o=this.repetitions-a;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,n=e>0?t:0,this.time=n,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===o){const t=e<0;this._setEndings(t,!t,r)}else this._setEndings(!1,!1,r);this._loopCount=a,this.time=n,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=n;if(r&&1==(1&a))return t-n}return n}_setEndings(e,t,i){const n=this._interpolantSettings;i?(n.endingStart=Ft,n.endingEnd=Ft):(n.endingStart=e?this.zeroSlopeAtStart?Ft:Bt:kt,n.endingEnd=t?this.zeroSlopeAtEnd?Ft:Bt:kt)}_scheduleFading(e,t,i){const n=this._mixer,a=n.time;let r=this._weightInterpolant;null===r&&(r=n._lendControlInterpolant(),this._weightInterpolant=r);const o=r.parameterPositions,s=r.sampleValues;return o[0]=a,s[0]=t,o[1]=a+e,s[1]=i,this}}const Zh=new Float32Array(1);class Qh extends Ui{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,n=e._clip.tracks,a=n.length,r=e._propertyBindings,o=e._interpolants,s=i.uuid,l=this._bindingsByRootAndName;let u=l[s];void 0===u&&(u={},l[s]=u);for(let e=0;e!==a;++e){const a=n[e],l=a.name;let d=u[l];if(void 0!==d)++d.referenceCount,r[e]=d;else{if(d=r[e],void 0!==d){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,l));continue}const n=t&&t._propertyBindings[e].binding.parsedPath;d=new Hh(Xh.create(i,l,n),a.ValueTypeName,a.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,s,l),r[e]=d}o[e].resultBuffer=d.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,i=e._clip.uuid,n=this._actionsByClip[i];this._bindAction(e,n&&n.knownActions[0]),this._addInactiveAction(e,i,t)}const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,i=t.length;e!==i;++e){const i=t[e];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,n=this.time+=e,a=Math.sign(e),r=this._accuIndex^=1;for(let o=0;o!==i;++o){t[o]._update(n,e,a,r)}const o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(r);return this}setTime(e){this.time=0;for(let e=0;ethis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,dp).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const fp=new In,hp=new In;class pp{constructor(e=new In,t=new In){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){fp.subVectors(e,this.start),hp.subVectors(this.end,this.start);const i=hp.dot(hp);let n=hp.dot(fp)/i;return t&&(n=qi(n,0,1)),n}closestPointToPoint(e,t,i){const n=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(n).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const mp=new In;class _p extends Ra{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new Er,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,i=32;e1)for(let i=0;i.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{zp.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(zp,t)}}setLength(e,t=.2*e,i=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Gp extends bd{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=new Er;i.setAttribute("position",new vr(t,3)),i.setAttribute("color",new vr([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(i,new cd({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,i){const n=new Za,a=this.geometry.attributes.color.array;return n.set(e),n.toArray(a,0),n.toArray(a,3),n.set(t),n.toArray(a,6),n.toArray(a,9),n.set(i),n.toArray(a,12),n.toArray(a,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Yp{constructor(){this.type="ShapePath",this.color=new Za,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ic,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,n){return this.currentPath.quadraticCurveTo(e,t,i,n),this}bezierCurveTo(e,t,i,n,a,r){return this.currentPath.bezierCurveTo(e,t,i,n,a,r),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const i=t.length;let n=!1;for(let a=i-1,r=0;rNumber.EPSILON){if(l<0&&(i=t[r],s=-s,o=t[a],l=-l),e.yo.y)continue;if(e.y===i.y){if(e.x===i.x)return!0}else{const t=l*(e.x-i.x)-s*(e.y-i.y);if(0===t)return!0;if(t<0)continue;n=!n}}else{if(e.y!==i.y)continue;if(o.x<=e.x&&e.x<=i.x||i.x<=e.x&&e.x<=o.x)return!0}}return n}const i=Uc.isClockWise,n=this.subPaths;if(0===n.length)return[];let a,r,o;const s=[];if(1===n.length)return r=n[0],o=new mc,o.curves=r.curves,s.push(o),s;let l=!i(n[0].getPoints());l=e?!l:l;const u=[],d=[];let c,f,h=[],p=0;d[p]=void 0,h[p]=[];for(let t=0,o=n.length;t1){let e=!1,i=0;for(let e=0,t=d.length;e0&&!1===e&&(h=u)}for(let e=0,t=d.length;e0&&0===e.x||0===this._imageBasedLightingFactor.x&&e.x>0,this._shouldRegenerateShaders=this._shouldRegenerateShaders||this._imageBasedLightingFactor.y>0&&0===e.y||0===this._imageBasedLightingFactor.y&&e.y>0,a.default.clone(e,this._imageBasedLightingFactor))}},lightColor:{get:function(){return this._lightColor},set:function(e){var t=this._lightColor;e===t||r.default.equals(e,t)||(this._shouldRegenerateShaders=this._shouldRegenerateShaders||Object(m.default)(t)&&!Object(m.default)(e)||Object(m.default)(e)&&!Object(m.default)(t),this._lightColor=r.default.clone(e,t))}},luminanceAtZenith:{get:function(){return this._luminanceAtZenith},set:function(e){var t=this._luminanceAtZenith;e!==t&&(this._shouldRegenerateShaders=this._shouldRegenerateShaders||Object(m.default)(t)&&!Object(m.default)(e)||Object(m.default)(e)&&!Object(m.default)(t),this._luminanceAtZenith=e)}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients},set:function(e){if(Object(m.default)(e)&&(!Array.isArray(e)||9!==e.length))throw new g.default("sphericalHarmonicCoefficients must be an array of 9 Cartesian3 values.");e!==this._sphericalHarmonicCoefficients&&(this._sphericalHarmonicCoefficients=e,this._shouldRegenerateShaders=!0)}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps},set:function(e){this._shouldUpdateSpecularMapAtlas=this._shouldUpdateSpecularMapAtlas||e!==this._specularEnvironmentMaps,this._specularEnvironmentMaps=e}},credit:{get:function(){return this._credit}}}),je.silhouetteSupported=function(e){return Re(e.context)},je.fromGltf=function(e){if(!Object(m.default)(e)||!Object(m.default)(e.url))throw new g.default("options.url is required");var t=e.url;e=Object(u.default)(e);var i=L.default.createIfNeeded(t),n=Object(p.default)(e.basePath,i.clone()),a=L.default.createIfNeeded(n),r=Object(p.default)(e.cacheKey,Le[Object(b.a)(i.url)]);Object(m.default)(r)||(r=Object(f.default)(),Le[Object(b.a)(i.url)]=r),Object(m.default)(e.basePath)&&!Object(m.default)(e.cacheKey)&&(r+=a.url),e.cacheKey=r,e.basePath=a;var o=new je(e),s=Ie[r];return Object(m.default)(s)?s.ready||(++s.count,s.modelsToLoad.push(o)):((s=new Pe({ready:!1})).count=1,s.modelsToLoad.push(o),De(o,s),Ie[r]=s,Object(m.default)(i.headers.Accept)||(i.headers.Accept="model/gltf-binary,model/gltf+json;q=0.8,application/json;q=0.2,*/*;q=0.01"),i.fetchArrayBuffer().then((function(e){var t,n=new Uint8Array(e);if(t=n,"glTF"===Object(O.a)(t)){var a=Object(ee.a)(n);s.makeReady(a)}else{var r=Object(w.a)(n);s.makeReady(r)}var l=o._resourceCredits,u=i.credits;if(Object(m.default)(u))for(var d=u.length,c=0;c0||t._imageBasedLightingFactor.y>0;if(h&&(f="#define USE_IBL_LIGHTING \n\n"+f),Object(m.default)(t._lightColor)&&(f="#define USE_CUSTOM_LIGHT_COLOR \n\n"+f),("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(f=H.default.replaceMain(f,"non_gamma_corrected_main"),f+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),we.a.isSupported(i)){var p=Object(m.default)(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,_=Object(m.default)(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(p||_||h)&&(f="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+f),Object(m.default)(t._sphericalHarmonicCoefficients)?f="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+f:t._useDefaultSphericalHarmonics&&(f="#define DIFFUSE_IBL \n"+f),Object(m.default)(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?f="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+f:t._useDefaultSpecularMaps&&(f="#define SPECULAR_IBL \n"+f)}Object(m.default)(t._luminanceAtZenith)&&(f="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+f),rt(n,a,f,c,t,i)}function at(e,t,i){var n=e.programId,a=e.techniqueId,r=t._sourcePrograms[n],o=t._rendererResources.sourceShaders,s=t._quantizedVertexShaders,l=t.clippingPlanes,u=Be(t),d=o[r.vertexShader],c=o[r.fragmentShader];(t.extensionsUsed.WEB3D_quantized_attributes||t._dequantizeInShader)&&(d=s[n]);var f=c;Ne(t)&&(f=je._modifyShaderForColor(f)),u&&(f=function(e,t,i){return e=H.default.replaceMain(e,"gltf_clip_main"),e+=je._getClippingFunction(t,i)+"\n",e+="uniform highp sampler2D gltf_clippingPlanes; \nuniform mat4 gltf_clippingPlanesMatrix; \nuniform vec4 gltf_clippingPlanesEdgeStyle; \nvoid main() \n{ \n gltf_clip_main(); \n"+Object(ue.a)("gltf_clippingPlanes","gltf_clippingPlanesMatrix","gltf_clippingPlanesEdgeStyle")+"} \n"}(f,l,i));var h=tt(d,n,t._vertexShaderLoaded),p=tt(f,n,t._fragmentShaderLoaded);Object(m.default)(t._uniformMapLoaded)||(p="uniform vec4 czm_pickColor;\n"+p);var _=t._imageBasedLightingFactor.x>0||t._imageBasedLightingFactor.y>0;if(_&&(p="#define USE_IBL_LIGHTING \n\n"+p),Object(m.default)(t._lightColor)&&(p="#define USE_CUSTOM_LIGHT_COLOR \n\n"+p),("2.0"!==t._sourceVersion||t._sourceKHRTechniquesWebGL)&&(p=H.default.replaceMain(p,"non_gamma_corrected_main"),p+="\nvoid main() { \n non_gamma_corrected_main(); \n gl_FragColor = czm_gammaCorrect(gl_FragColor); \n} \n"),we.a.isSupported(i)){var g=Object(m.default)(t._sphericalHarmonicCoefficients)||t._useDefaultSphericalHarmonics,v=Object(m.default)(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready||t._useDefaultSpecularMaps;(g||v||_)&&(p="uniform mat3 gltf_iblReferenceFrameMatrix; \n"+p),Object(m.default)(t._sphericalHarmonicCoefficients)?p="#define DIFFUSE_IBL \n#define CUSTOM_SPHERICAL_HARMONICS \nuniform vec3 gltf_sphericalHarmonicCoefficients[9]; \n"+p:t._useDefaultSphericalHarmonics&&(p="#define DIFFUSE_IBL \n"+p),Object(m.default)(t._specularEnvironmentMapAtlas)&&t._specularEnvironmentMapAtlas.ready?p="#define SPECULAR_IBL \n#define CUSTOM_SPECULAR_IBL \nuniform sampler2D gltf_specularMap; \nuniform vec2 gltf_specularMapSize; \nuniform float gltf_maxSpecularLOD; \n"+p:t._useDefaultSpecularMaps&&(p="#define SPECULAR_IBL \n"+p)}Object(m.default)(t._luminanceAtZenith)&&(p="#define USE_SUN_LUMINANCE \nuniform float gltf_luminanceAtZenith;\n"+p),rt(n,a,p,h,t,i)}function rt(e,t,i,n,a,r){var o=a._sourceTechniques[t],s=be.a.createAttributeLocations(o,a._precreatedAttributes);a._rendererResources.programs[e]=V.default.fromCache({context:r,vertexShaderSource:n,fragmentShaderSource:i,attributeLocations:s})}it.prototype.set=function(e,t,i){this.programToCreate=e,this.model=t,this.context=i},it.prototype.execute=function(){nt(this.programToCreate,this.model,this.context)};var ot=new it;function st(e,t){return function(i){e.texturesToCreate.enqueue({id:t.id,image:i,bufferView:void 0}),--e.pendingBufferViewToImage}}var lt=function(){this.gltfTexture=void 0,this.model=void 0,this.context=void 0};function ut(e,t,i){var n=t.gltf.textures[e.id],a=t._rendererResources.samplers[n.sampler];Object(m.default)(a)||(a=new U.default({wrapS:W.default.REPEAT,wrapT:W.default.REPEAT}));for(var r=!1,o=t.gltf.materials,s=o.length,l=0;l0&&(Ze.set(r.peek(),e,a),t.jobScheduler.execute(Ze,fe.a.BUFFER));)r.dequeue();for(;o.length>0&&(n=o.peek(),Qe.set(n.id,n.componentType,e,a),t.jobScheduler.execute(Qe,fe.a.BUFFER));)o.dequeue()}else{for(;r.length>0;)Xe(r.dequeue(),e,a);for(;o.length>0;)Je((n=o.dequeue()).id,n.componentType,e,a)}}}(e,t),function(e,t){var i=e._loadResources,n=i.programsToCreate;if(0===i.pendingShaderLoads&&0===i.pendingBufferLoads){var a=t.context;if(e.asynchronous)for(;n.length>0&&(ot.set(n.peek(),e,a),t.jobScheduler.execute(ot,fe.a.PROGRAM));)n.dequeue();else for(;n.length>0;)nt(n.dequeue(),e,a)}}(e,t),function(e){var t=e._loadResources;if(t.createSamplers){t.createSamplers=!1;var i=e._rendererResources.samplers;J.a.sampler(e.gltf,(function(e,t){i[t]=new U.default({wrapS:e.wrapS,wrapT:e.wrapT,minificationFilter:e.minFilter,magnificationFilter:e.magFilter})}))}}(e),function(e){var t=e._loadResources;if(0===t.pendingBufferLoads)for(;t.texturesToCreateFromBufferView.length>0;){var i=t.texturesToCreateFromBufferView.dequeue(),n=e.gltf,a=n.bufferViews[i.bufferView],r=(n.textures[i.id].source,be.a.getFailedLoadFunction(e,"image","id: "+i.id+", bufferView: "+i.bufferView));if("image/ktx2"===i.mimeType){var o=new Uint8Array(t.getBuffer(a));Object(E.a)(o).then(Ge(e,i.id)).otherwise(r),++e._loadResources.pendingTextureLoads}else{var s=st(t,i);Object(T.a)({uint8Array:t.getBuffer(a),format:i.mimeType,flipY:!1,skipColorSpaceConversion:!0}).then(s).otherwise(r),++t.pendingBufferViewToImage}}}(e),function(e,t){var i=t.context,n=e._loadResources.texturesToCreate;if(e.asynchronous)for(;n.length>0&&(dt.set(n.peek(),e,i),t.jobScheduler.execute(dt,fe.a.TEXTURE));)n.dequeue();else for(;n.length>0;)ut(n.dequeue(),e,i)}(e,t);!function(e){var t=e._loadResources;if(0===t.pendingBufferLoads&&t.createSkins){t.createSkins=!1;var i=e.gltf,n=i.accessors,a={};J.a.skin(i,(function(t,i){var r,o=n[t.inverseBindMatrices];M.default.equals(t.bindShapeMatrix,M.default.IDENTITY)||(r=M.default.clone(t.bindShapeMatrix)),a[i]={inverseBindMatrices:he.a.getSkinInverseBindMatrices(e,o),bindShapeMatrix:r}})),function(e,t){for(var i=e.gltf,n=i.skins,a=i.nodes,r=e._runtime.nodes,o=e._loadResources.skinnedNodesIds,s=o.length,l=0;l0;){var p=c.pop();f[p.id]=!0;var _=p.parentRuntimeNode,g=p.gltfNode,v=o[p.id];if(0===v.parents.length)if(Object(m.default)(g.matrix))v.matrix=M.default.fromColumnMajorArray(g.matrix);else{var y=g.rotation;v.translation=r.default.fromArray(g.translation),v.rotation=I.default.unpack(y),v.scale=r.default.fromArray(g.scale)}Object(m.default)(_)?(_.children.push(v),v.parents.push(_)):a.push(v),Object(m.default)(g.mesh)&&Bt(e,g,v,t,i);var b=g.children;if(Object(m.default)(b))for(var w=b.length,O=0;O0&&a<1){var r=e._nodeCommands,o=r.length;if(o>0&&(!Object(m.default)(r[0].translucentCommand)||i))for(var s=0;s0&&(!Object(m.default)(a[0].disableCullingCommand)||i))for(var o=0;o0&&e.silhouetteColor.alpha>0&&Object(m.default)(e._normalAttributeName)}function Zt(e){return e.color.alpha>0&&e.color.alpha<1}function Qt(e){return 0===e.color.alpha}function $t(e,t){return Math.floor(e)!==Math.floor(t)||Math.ceil(e)!==Math.ceil(t)}var ei=0;function ti(e,t){for(var i=++ei%255,n=function(e){for(var t=e._nodeCommands,i=t.length,n=0;n0&&($t(e.color.alpha,e._colorPreviousAlpha)||$t(e.silhouetteColor.alpha,e._silhouetteColorPreviousAlpha)||!Object(m.default)(n[0].silhouetteModelCommand));e._colorPreviousAlpha=e.color.alpha,e._silhouetteColorPreviousAlpha=e.silhouetteColor.alpha,(a||i)&&ti(e,t)}}var ni=new n.default;var ai=new r.default,ri=new s.default;function oi(e,t){var i=e.scale;if(0!==e.minimumPixelSize){var n=t.context,a=Math.max(n.drawingBufferWidth,n.drawingBufferHeight),o=Object(m.default)(e._clampedModelMatrix)?e._clampedModelMatrix:e.modelMatrix;if(ai.x=o[12],ai.y=o[13],ai.z=o[14],Object(m.default)(e._rtcCenter)&&r.default.add(e._rtcCenter,ai,ai),e._mode!==Ae.default.SCENE3D){var s=t.mapProjection,l=s.ellipsoid.cartesianToCartographic(ai,ri);s.project(l,ai),r.default.fromElements(ai.z,ai.x,ai.y,ai)}var u=e.boundingSphere.radius,d=function(e,t,i){return ni.center=e,ni.radius=t,i.camera.getPixelSize(ni,i.context.drawingBufferWidth,i.context.drawingBufferHeight)}(ai,u,t),c=1/d;Math.min(c*(2*u),a)=a&&i<=o}(this,e),W=this.show&&Y&&0!==this.scale&&(!H||U);if(W&&this._state===Se.LOADED||O){var q=this.activeAnimations.update(e)||this._cesiumAnimationsDirty;this._cesiumAnimationsDirty=!1,this._dirty=!1;var Z=this.modelMatrix,$=e.mode!==this._mode;this._mode=e.mode;var ee=!M.default.equals(this._modelMatrix,Z)||this._scale!==this.scale||this._minimumPixelSize!==this.minimumPixelSize||0!==this.minimumPixelSize||this._maximumScale!==this.maximumScale||this._heightReference!==this.heightReference||this._heightChanged||$;if(ee||O){M.default.clone(Z,this._modelMatrix),function(e){Object(m.default)(e._removeUpdateHeightCallback)&&(e._removeUpdateHeightCallback(),e._removeUpdateHeightCallback=void 0);var t=e._scene;if(Object(m.default)(t)&&Object(m.default)(t.globe)&&e.heightReference!==ce.a.NONE){var i=t.globe,n=i.ellipsoid,a=e.modelMatrix;ai.x=a[12],ai.y=a[13],ai.z=a[14];var r=n.cartesianToCartographic(ai);Object(m.default)(e._clampedModelMatrix)||(e._clampedModelMatrix=M.default.clone(a,new M.default));var o=i._surface;e._removeUpdateHeightCallback=o.updateHeight(r,di(e,n,r));var l=i.getHeight(r);if(Object(m.default)(l)){var u=di(e,n,r);s.default.clone(r,ri),ri.height=l,n.cartographicToCartesian(ri,ai),u(ai)}}else{if(e.heightReference!==ce.a.NONE)throw new g.default("Height reference is not supported without a scene and globe.");e._clampedModelMatrix=void 0}}(this),Object(m.default)(this._clampedModelMatrix)&&(Z=this._clampedModelMatrix),this._scale=this.scale,this._minimumPixelSize=this.minimumPixelSize,this._maximumScale=this.maximumScale,this._heightReference=this.heightReference,this._heightChanged=!1;var ie=oi(this,e),ae=this._computedModelMatrix;M.default.multiplyByUniformScale(Z,ie,ae),this._upAxis===ne.a.Y?M.default.multiplyTransformation(ae,ne.a.Y_UP_TO_Z_UP,ae):this._upAxis===ne.a.X&&M.default.multiplyTransformation(ae,ne.a.X_UP_TO_Z_UP,ae),this.forwardAxis===ne.a.Z&&M.default.multiplyTransformation(ae,ne.a.Z_UP_TO_X_UP,ae)}(q||ee||O)&&(function(e,t,i,a){var s=e._maxDirtyNumber,l=e._runtime.rootNodes,u=l.length,d=zt,c=e._computedModelMatrix;if(e._mode!==Ae.default.SCENE3D&&!e._ignoreCommands){var f=M.default.getColumn(c,3,Ut);if(o.a.equals(f,o.a.UNIT_W)){var h=e.boundingSphere.center,p=j.default.wgs84To2DModelMatrix(a,h,Vt);c=M.default.multiply(p,c,Vt),Object(m.default)(e._rtcCenter)&&(M.default.setTranslation(c,o.a.UNIT_W,c),e._rtcCenter=e._rtcCenter2D)}else c=j.default.basisTo2D(a,c,Vt),e._rtcCenter=e._rtcCenter3D}for(var _=0;_0;){var v=(g=d.pop()).transformToRoot,y=g.commands;if(g.dirtyNumber===s||t||i){var b=M.default.multiplyTransformation(c,v,g.computedMatrix),w=y.length;if(w>0)for(var O=0;O0;){for(var o=(r=n.pop()).computedShow,s=r.commands,l=s.length,u=0;uke||Ie.center.y-Ie.radiuske||Ie.center.y-Ie.radius0)&&(e._shaderDisableDepthDistance=!0,_===Number.POSITIVE_INFINITY&&(_=-1)),Object(h.default)(r._labelDimensions))p=r._labelDimensions.x,c=r._labelDimensions.y;else{var y=0,b=0,w=r._imageIndex;if(-1!==w){var O=i[w];if(!Object(h.default)(O))throw new m.default("Invalid billboard image index: "+w);y=O.height,b=O.width}c=Math.round(Object(f.default)(r.height,e._textureAtlas.texture.dimensions.y*y));var x=e._textureAtlas.texture.width;p=Math.round(Object(f.default)(r.width,x*b))}var A=4096*Math.floor(v.default.clamp(p,0,4096))+Math.floor(v.default.clamp(c,0,4096));e._instanced?s(o=r._index,l,u,_,A):(s((o=4*r._index)+0,l,u,_,A),s(o+1,l,u,_,A),s(o+2,l,u,_,A),s(o+3,l,u,_,A))}function Ae(e,t,i,a,r){if(r.heightReference===R.a.CLAMP_TO_GROUND){var o=e._scene,s=t.context,l=t.globeTranslucencyState.translucent,u=Object(h.default)(o.globe)&&o.globe.depthTestAgainstTerrain;e._shaderClampToGround=s.depthTexture&&!l&&u}var d,c=a[n.textureCoordinateBoundsOrLabelTranslate];if(x.a.maximumVertexTextureImageUnits>0){var f=0,p=0;return Object(h.default)(r._labelTranslate)&&(f=r._labelTranslate.x,p=r._labelTranslate.y),void(e._instanced?c(d=r._index,f,p,0,0):(c((d=4*r._index)+0,f,p,0,0),c(d+1,f,p,0,0),c(d+2,f,p,0,0),c(d+3,f,p,0,0)))}var _=0,g=0,v=0,y=0,b=r._imageIndex;if(-1!==b){var w=i[b];if(!Object(h.default)(w))throw new m.default("Invalid billboard image index: "+b);_=w.x,g=w.y,v=w.width,y=w.height}var O=_+v,A=g+y;e._instanced?c(d=r._index,_,g,O,A):(c((d=4*r._index)+0,_,g,O,A),c(d+1,_,g,O,A),c(d+2,_,g,O,A),c(d+3,_,g,O,A))}function Te(e,t,i,a,r){if(e._sdf){var o,s=a[n.sdf],l=r.outlineColor,u=r.outlineWidth,c=65536*d.default.floatToByte(l.red)+256*d.default.floatToByte(l.green)+d.default.floatToByte(l.blue),f=u/F.a.RADIUS,h=65536*d.default.floatToByte(l.alpha)+256*d.default.floatToByte(f);e._instanced?s(o=r._index,c,h):(s((o=4*r._index)+0,c+0,h),s(o+1,c+2,h),s(o+2,c+3,h),s(o+3,c+1,h))}}function Ee(e,t,i,a,r){me(e,0,0,a,r),ge(e,0,i,a,r),ve(e,0,i,a,r),ye(e,t,i,a,r),be(e,0,i,a,r),we(e,0,0,a,r),Oe(e,0,0,a,r),xe(e,t,i,a,r),Ae(e,t,i,a,r),function(e,t,i,a,r){if(Object(h.default)(e._batchTable)){var o,s=a[n.a_batchId],l=r._batchIndex;e._instanced?s(o=r._index,l):(s((o=4*r._index)+0,l),s(o+1,l),s(o+2,l),s(o+3,l))}}(e,0,0,a,r),Te(e,0,0,a,r)}function Ce(e,t,i,n,a,r){var s;n.mode===B.default.SCENE3D?(s=e._baseVolume,e._boundingVolumeDirty=!0):s=e._baseVolume2D;for(var l=[],u=0;u0){this._vaf=function(e,t,i,a,r,o){var s=[{index:n.positionHighAndScale,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[V]},{index:n.positionLowAndRotation,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[V]},{index:n.compressedAttribute0,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[H]},{index:n.compressedAttribute1,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[$]},{index:n.compressedAttribute2,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[K]},{index:n.eyeOffset,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[G]},{index:n.scaleByDistance,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[Q]},{index:n.pixelOffsetScaleByDistance,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[ee]},{index:n.compressedAttribute3,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[te]},{index:n.textureCoordinateBoundsOrLabelTranslate,componentsPerAttribute:4,componentDatatype:c.default.FLOAT,usage:i[ne]}];a&&s.push({index:n.direction,componentsPerAttribute:2,componentDatatype:c.default.FLOAT,vertexBuffer:he(e)}),Object(h.default)(r)&&s.push({index:n.a_batchId,componentsPerAttribute:1,componentDatatype:c.default.FLOAT,bufferUsage:O.default.STATIC_DRAW}),o&&s.push({index:n.sdf,componentsPerAttribute:2,componentDatatype:c.default.FLOAT,usage:i[ae]});var l=a?t:4*t;return new M.a(e,s,l,a)}(r,i,this._buffersUsage,this._instanced,this._batchTable,this._sdf),d=this._vaf.writers;for(var R=0;R0){var z=Se;z.length=0,(m[V]||m[J]||m[q])&&z.push(me),(m[X]||m[H]||m[Y]||m[W]||m[U])&&(z.push(ge),this._instanced&&z.push(be)),(m[X]||m[Z]||m[$])&&(z.push(ve),z.push(ye)),(m[X]||m[K])&&z.push(ye),m[G]&&z.push(be),m[Q]&&z.push(we),m[ee]&&z.push(Oe),(m[te]||m[ie]||m[X]||m[V])&&z.push(xe),(m[X]||m[V])&&z.push(Ae),m[ae]&&z.push(Te);var le=z.length;if(d=this._vaf.writers,p/i>.1){for(var ue=0;ue1.5*i&&(f.length=i),Object(h.default)(this._vaf)&&Object(h.default)(this._vaf.va)){var Ie;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,o.default.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var Le=y.default.IDENTITY;e.mode===B.default.SCENE3D?(Le=this.modelMatrix,Ie=o.default.clone(this._baseVolumeWC,this._boundingVolume)):Ie=o.default.clone(this._baseVolume2D,this._boundingVolume),function(e,t,i){var n=1;e._allSizedInMeters&&0===e._maxPixelOffset||(n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight));var a=n*e._maxScale*e._maxSize*2;e._allHorizontalCenter&&e._allVerticalCenter&&(a*=.5);var r=n*e._maxPixelOffset+e._maxEyeOffset;i.radius+=a+r}(this,e,Ie);var je,Re,Ne,Be,Fe,ke=this._blendOption!==this.blendOption;if(this._blendOption=this.blendOption,ke){this._blendOption===j.a.OPAQUE||this._blendOption===j.a.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=E.default.fromCache({depthTest:{enabled:!0,func:b.a.LESS},depthMask:!0}):this._rsOpaque=void 0;var ze=this._blendOption===j.a.TRANSLUCENT;this._blendOption===j.a.TRANSLUCENT||this._blendOption===j.a.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=E.default.fromCache({depthTest:{enabled:!0,func:ze?b.a.LEQUAL:b.a.LESS},depthMask:ze,blending:L.default.ALPHA_BLEND}):this._rsTranslucent=void 0}this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance;var Ue=x.a.maximumVertexTextureImageUnits>0;if(ke||this._shaderRotation!==this._compiledShaderRotation||this._shaderAlignedAxis!==this._compiledShaderAlignedAxis||this._shaderScaleByDistance!==this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance!==this._compiledShaderTranslucencyByDistance||this._shaderPixelOffsetScaleByDistance!==this._compiledShaderPixelOffsetScaleByDistance||this._shaderDistanceDisplayCondition!==this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance||this._shaderClampToGround!==this._compiledShaderClampToGround||this._sdf!==this._compiledSDF){je=P.a,Re=D.a,Fe=[],Object(h.default)(this._batchTable)&&(Fe.push("VECTOR_TILE"),je=this._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(je),Re=this._batchTable.getFragmentShaderCallback(!1,void 0)(Re)),Ne=new S.default({defines:Fe,sources:[je]}),this._instanced&&Ne.defines.push("INSTANCED"),this._shaderRotation&&Ne.defines.push("ROTATION"),this._shaderAlignedAxis&&Ne.defines.push("ALIGNED_AXIS"),this._shaderScaleByDistance&&Ne.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&Ne.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderPixelOffsetScaleByDistance&&Ne.defines.push("EYE_DISTANCE_PIXEL_OFFSET"),this._shaderDistanceDisplayCondition&&Ne.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&Ne.defines.push("DISABLE_DEPTH_DISTANCE"),this._shaderClampToGround&&(Ue?Ne.defines.push("VERTEX_DEPTH_CHECK"):Ne.defines.push("FRAGMENT_DEPTH_CHECK"));var Ve=1-F.a.CUTOFF;this._sdf&&Ne.defines.push("SDF");var He=Object(h.default)(this._batchTable)?"VECTOR_TILE":"";this._blendOption===j.a.OPAQUE_AND_TRANSLUCENT&&(Be=new S.default({defines:["OPAQUE",He],sources:[Re]}),this._shaderClampToGround&&(Ue?Be.defines.push("VERTEX_DEPTH_CHECK"):Be.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Be.defines.push("SDF"),Be.defines.push("SDF_EDGE "+Ve)),this._sp=C.default.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:Ne,fragmentShaderSource:Be,attributeLocations:n}),Be=new S.default({defines:["TRANSLUCENT",He],sources:[Re]}),this._shaderClampToGround&&(Ue?Be.defines.push("VERTEX_DEPTH_CHECK"):Be.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Be.defines.push("SDF"),Be.defines.push("SDF_EDGE "+Ve)),this._spTranslucent=C.default.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:Ne,fragmentShaderSource:Be,attributeLocations:n})),this._blendOption===j.a.OPAQUE&&(Be=new S.default({defines:[He],sources:[Re]}),this._shaderClampToGround&&(Ue?Be.defines.push("VERTEX_DEPTH_CHECK"):Be.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Be.defines.push("SDF"),Be.defines.push("SDF_EDGE "+Ve)),this._sp=C.default.replaceCache({context:r,shaderProgram:this._sp,vertexShaderSource:Ne,fragmentShaderSource:Be,attributeLocations:n})),this._blendOption===j.a.TRANSLUCENT&&(Be=new S.default({defines:[He],sources:[Re]}),this._shaderClampToGround&&(Ue?Be.defines.push("VERTEX_DEPTH_CHECK"):Be.defines.push("FRAGMENT_DEPTH_CHECK")),this._sdf&&(Be.defines.push("SDF"),Be.defines.push("SDF_EDGE "+Ve)),this._spTranslucent=C.default.replaceCache({context:r,shaderProgram:this._spTranslucent,vertexShaderSource:Ne,fragmentShaderSource:Be,attributeLocations:n})),this._compiledShaderRotation=this._shaderRotation,this._compiledShaderAlignedAxis=this._shaderAlignedAxis,this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderPixelOffsetScaleByDistance=this._shaderPixelOffsetScaleByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance,this._compiledShaderClampToGround=this._shaderClampToGround,this._compiledSDF=this._sdf}var Ge=e.commandList;if(v.render||v.pick){var Ye,We=this._colorCommands,qe=this._blendOption===j.a.OPAQUE,Xe=this._blendOption===j.a.OPAQUE_AND_TRANSLUCENT,Ke=this._vaf.va,Je=Ke.length,Ze=this._uniforms;Object(h.default)(this._batchTable)?(Ze=this._batchTable.getUniformMapCallback()(Ze),Ye=this._batchTable.getPickId()):Ye="v_pickColor",We.length=Je;for(var Qe=Xe?2*Je:Je,$e=0;$e0&&(r=p.a.OUTSIDE);for(var o=0;o0&&(S=!0,T+=x),v0){var P=Math.min(E,x);M=Math.round(x/P);var I=Math.min(M*E,x);for(S=0;S1;--C){if(j=f(-(E=a.default.PI_OVER_TWO-(C-1)*T),s,x,O,d,_,c,b,w,j),R=f(E+Math.PI,s,x,O,d,_,c,b,w,R),t){for(I[L++]=j.x,I[L++]=j.y,I[L++]=j.z,M=2*(C-1)+2,S=1;Si)throw new s.default("Width must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");if(n.a.typeOf.number.greaterThan("height",c,0),c>i)throw new s.default("Height must be less than or equal to the maximum renderbuffer size ("+i+"). Check maximumRenderbufferSize.");this._gl=t,this._format=o,this._width=d,this._height=c,this._renderbuffer=this._gl.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this._renderbuffer),t.renderbufferStorage(t.RENDERBUFFER,o,d,c),t.bindRenderbuffer(t.RENDERBUFFER,null)}Object.defineProperties(d.prototype,{format:{get:function(){return this._format}},width:{get:function(){return this._width}},height:{get:function(){return this._height}}}),d.prototype._getRenderbuffer=function(){return this._renderbuffer},d.prototype.isDestroyed=function(){return!1},d.prototype.destroy=function(){return this._gl.deleteRenderbuffer(this._renderbuffer),Object(o.default)(this)},t.a=d},function(e,t,i){"use strict";var n=i(116),a=i(8),r=i(1),o=i(22),s=i(4),l=i(60),u=i(75),d=i(2),c=i(0),f=i(214),h=i(19),p=i(3),m=i(15),_=i(24),g=i(872),v=i(14),y=i(273),b=i(5),w=i(6),O=i(30),x=i(23),A=i(52),T=i(108),E=i(26),C=i(39),S=i(18),M=i(90),D=i(523),P=i(259),I=i(168),L=i(951),j=i(954),R=i(171),N=i(183),B=i(955),F=i(957),k=i(388),z=i(958),U=i(253),V=i(160),H=i(959),G=i(960),Y=i(235),W=i(366),q=i(336),X=i(153),K=i(13),J=i(86),Z=i(81),Q=i(285),$=i(381),ee=i(291);function te(e){e=Object(d.default)(e,d.default.EMPTY_OBJECT),s.a.defined("options.url",e.url),this._url=void 0,this._basePath=void 0,this._root=void 0,this._resource=void 0,this._asset=void 0,this._properties=void 0,this._geometricError=void 0,this._extensionsUsed=void 0,this._extensions=void 0,this._gltfUpAxis=void 0,this._cache=new B.a,this._processingQueue=[],this._selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this._selectedTilesToStyle=[],this._loadTimestamp=void 0,this._timeSinceLoad=0,this._updatedVisibilityFrame=0,this._updatedModelMatrixFrame=0,this._modelMatrixChanged=!1,this._previousModelMatrix=void 0,this._extras=void 0,this._credits=void 0,this._cullWithChildrenBounds=Object(d.default)(e.cullWithChildrenBounds,!0),this._allTilesAdditive=!0,this._hasMixedContent=!1,this._stencilClearCommand=void 0,this._backfaceCommands=new y.a,this._maximumScreenSpaceError=Object(d.default)(e.maximumScreenSpaceError,16),this._maximumMemoryUsage=Object(d.default)(e.maximumMemoryUsage,512),this._styleEngine=new z.a,this._modelMatrix=Object(c.default)(e.modelMatrix)?w.default.clone(e.modelMatrix):w.default.clone(w.default.IDENTITY),this._statistics=new k.a,this._statisticsLast=new k.a,this._statisticsPerPass=new Array(R.a.NUMBER_OF_PASSES);for(var t=0;tn.a._defaultMinTerrainHeight&&(r._initialClippingPlanesOriginMatrix=A.default.eastNorthUpToFixedFrame(h)),r._clippingPlanesOriginMatrix=w.default.clone(r._initialClippingPlanesOriginMatrix),r._readyPromise.resolve(r)})).otherwise((function(e){r._readyPromise.reject(e)}))}function ie(e,t,i,n){if(Object(V.a)(i,"3DTILES_implicit_tiling")){var a=Object(c.default)(e.metadata)?e.metadata.schema:void 0,r=new H.a(t,i,a),o=new G.a({subdivisionScheme:r.subdivisionScheme,subtreeLevels:r.subtreeLevels,level:0,x:0,y:0,z:0}),s={content:{uri:r.subtreeUriTemplate.getDerivedResource({templateValues:o.getTemplateValues()}).url}},u=Object(l.default)(s,i,!0);delete u.extensions;var d=new D.a(e,t,u,n);return d.implicitTileset=r,d.implicitCoordinates=o,d}return new D.a(e,t,i,n)}Object.defineProperties(te.prototype,{isCesium3DTileset:{get:function(){return!0}},asset:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._asset}},extensions:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extensions}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){U.a.setOwner(e,this,"_clippingPlanes")}},properties:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._properties}},ready:{get:function(){return Object(c.default)(this._root)}},readyPromise:{get:function(){return this._readyPromise.promise}},tilesLoaded:{get:function(){return this._tilesLoaded}},resource:{get:function(){return this._resource}},basePath:{get:function(){return Object(f.a)("Cesium3DTileset.basePath","Cesium3DTileset.basePath has been deprecated. All tiles are relative to the url of the tileset JSON file that contains them. Use the url property instead."),this._basePath}},style:{get:function(){return this._styleEngine.style},set:function(e){this._styleEngine.style=e}},customShader:{get:function(){return this._customShader},set:function(e){this._customShader=e}},maximumScreenSpaceError:{get:function(){return this._maximumScreenSpaceError},set:function(e){s.a.typeOf.number.greaterThanOrEquals("maximumScreenSpaceError",e,0),this._maximumScreenSpaceError=e}},maximumMemoryUsage:{get:function(){return this._maximumMemoryUsage},set:function(e){s.a.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMemoryUsage=e}},root:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root}},boundingSphere:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._root.updateTransform(this._modelMatrix),this._root.boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=w.default.clone(e,this._modelMatrix)}},timeSinceLoad:{get:function(){return this._timeSinceLoad}},totalMemoryUsageInBytes:{get:function(){var e=this._statistics;return e.texturesByteLength+e.geometryByteLength+e.batchTableByteLength}},clippingPlanesOriginMatrix:{get:function(){return Object(c.default)(this._clippingPlanesOriginMatrix)?(this._clippingPlanesOriginMatrixDirty&&(w.default.multiply(this.root.computedTransform,this._initialClippingPlanesOriginMatrix,this._clippingPlanesOriginMatrix),this._clippingPlanesOriginMatrixDirty=!1),this._clippingPlanesOriginMatrix):w.default.IDENTITY}},styleEngine:{get:function(){return this._styleEngine}},statistics:{get:function(){return this._statistics}},classificationType:{get:function(){return this._classificationType}},ellipsoid:{get:function(){return this._ellipsoid}},foveatedConeSize:{get:function(){return this._foveatedConeSize},set:function(e){s.a.typeOf.number.greaterThanOrEquals("foveatedConeSize",e,0),s.a.typeOf.number.lessThanOrEquals("foveatedConeSize",e,1),this._foveatedConeSize=e}},foveatedMinimumScreenSpaceErrorRelaxation:{get:function(){return this._foveatedMinimumScreenSpaceErrorRelaxation},set:function(e){s.a.typeOf.number.greaterThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,0),s.a.typeOf.number.lessThanOrEquals("foveatedMinimumScreenSpaceErrorRelaxation",e,this.maximumScreenSpaceError),this._foveatedMinimumScreenSpaceErrorRelaxation=e}},extras:{get:function(){if(!this.ready)throw new p.default("The tileset is not loaded. Use Cesium3DTileset.readyPromise or wait for Cesium3DTileset.ready to be true.");return this._extras}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){s.a.typeOf.object("imageBasedLightingFactor",e),s.a.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),s.a.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),s.a.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),s.a.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),a.default.clone(e,this._imageBasedLightingFactor)}},vectorClassificationOnly:{get:function(){return this._vectorClassificationOnly}},vectorKeepDecodedPositions:{get:function(){return this._vectorKeepDecodedPositions}}}),te.loadJson=function(e){return O.default.createIfNeeded(e).fetchJson()},te.prototype.makeStyleDirty=function(){this._styleEngine.makeDirty()},te.prototype.loadTileset=function(e,t,i){var n=t.asset;if(!Object(c.default)(n))throw new x.a("Tileset must have an asset property.");if("0.0"!==n.version&&"1.0"!==n.version)throw new x.a("The tileset must be 3D Tiles version 0.0 or 1.0.");Object(c.default)(t.extensionsRequired)&&te.checkSupportedExtensions(t.extensionsRequired);var a=this._statistics,r=n.tilesetVersion;Object(c.default)(r)&&(this._basePath+="?v="+r,(e=e.clone()).setQueryParameters({v:r}));var o=ie(this,e,t.root,i);Object(c.default)(i)&&(i.children.push(o),o._depth=i._depth+1);var s=[];for(s.push(o);s.length>0;){var l=s.pop();++a.numberOfTilesTotal,this._allTilesAdditive=this._allTilesAdditive&&l.refine===N.a.ADD;var u=l._header.children;if(Object(c.default)(u))for(var d=u.length,f=0;f0?i.numberOfAttemptedRequests+=a:(n&&(t.hasTilesetContent||t.hasImplicitContent?function(e,t){var i=t,n=ge;n.push(t);for(;n.length>0;){for(var a=(t=n.pop()).children,r=a.length,o=0;o0?e.tileFailed.raiseEvent({url:n,message:a}):(console.log("A 3D tile failed to load: "+n),console.log("Error: "+a))}}(e,t)))}}function de(e,t){return e._priority-t._priority}te.prototype.postPassesUpdate=function(e){this.ready&&(!function(e,t){for(var i=e._requestedTilesInFlight,n=0,a=i.length,r=0;r=1;o._contentState===I.a.LOADING?s?(o.cancelRequests(),++n):n>0&&(i[r-n]=o):++n}i.length-=n}(this,e),function(e,t){var i=e._statistics,n=e._statisticsLast,a=i.numberOfPendingRequests,r=i.numberOfTilesProcessing,o=n.numberOfPendingRequests,s=n.numberOfTilesProcessing;k.a.clone(i,n);var l=a!==o||r!==s;l&&t.afterRender.push((function(){e.loadProgress.raiseEvent(a,r)}));e._tilesLoaded=0===i.numberOfPendingRequests&&0===i.numberOfTilesProcessing&&0===i.numberOfAttemptedRequests,l&&e._tilesLoaded&&(t.afterRender.push((function(){e.allTilesLoaded.raiseEvent()})),e._initialTilesLoaded||(e._initialTilesLoaded=!0,t.afterRender.push((function(){e.initialTilesLoaded.raiseEvent()}))))}(this,e),this._cache.unloadTiles(this,ve),this._styleEngine.resetDirty())},te.prototype.prePassesUpdate=function(e){if(this.ready){!function(e,t){!function(e){for(var t=e._processingQueue,i=t.length,n=0,a=0;a0&&(t[a-n]=r):++n}t.length-=n}(e);for(var i=e._processingQueue,n=i.length,a=0;ah.minimumRadius){var _=o.default.fromCartesian(m,h,ae);i=r.default.normalize(u.positionWC,ne),n=u.directionWC,a=u.positionCartographic.height,s=0,l=2*_.height}else{var g=w.default.multiplyByPoint(f,u.positionWC,se);if(i=r.default.UNIT_Z,n=w.default.multiplyByPointAsVector(f,u.directionWC,le),n=r.default.normalize(n,n),a=g.z,c instanceof ee.a){var v=d._header.boundingVolume.box[11];s=m.z-v,l=m.z+v}else if(c instanceof $.a){var y=p.radius;s=m.z-y,l=m.z+y}}}var O=s+(l-s)*e.dynamicScreenSpaceErrorHeightFalloff,x=l,A=b.default.clamp((a-O)/(x-O),0,1),T=1-Math.abs(r.default.dot(n,i));T*=1-A;var E=e.dynamicScreenSpaceErrorDensity;E*=T,e._dynamicScreenSpaceErrorComputedDensity=E}(this,e),e.newFrame&&this._cache.reset()}};var ce=new r.default,fe={maximumFractionDigits:3};function he(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,fe):Math.round(t).toLocaleString()}function pe(e){var t=e.boundingVolume.boundingVolume,i=t.halfAxes,n=t.radius,a=r.default.clone(t.center,ce);if(Object(c.default)(i))a.x+=.75*(i[0]+i[3]+i[6]),a.y+=.75*(i[1]+i[4]+i[7]),a.z+=.75*(i[2]+i[5]+i[8]);else if(Object(c.default)(n)){var o=r.default.normalize(t.center,ce);o=r.default.multiplyByScalar(o,.75*n,ce),a=r.default.add(o,t.center,ce)}return a}function me(e,t,i){var n="",a=0;(t.debugShowGeometricError&&(n+="\nGeometric error: "+e.geometricError,a++),t.debugShowRenderingStatistics)&&(n+="\nCommands: "+e.commandsLength,a++,e.content.pointsLength>0&&(n+="\nPoints: "+e.content.pointsLength,a++),e.content.trianglesLength>0&&(n+="\nTriangles: "+e.content.trianglesLength,a++),n+="\nFeatures: "+e.content.featuresLength,a++);if(t.debugShowMemoryUsage&&(n+="\nTexture Memory: "+he(e.content.texturesByteLength),n+="\nGeometry Memory: "+he(e.content.geometryByteLength),a+=2),t.debugShowUrl)if(e.hasMultipleContents){n+="\nUrls:";for(var r=e.content.innerContentUrls,o=0;o0;e._backfaceCommands.length=0,_&&(Object(c.default)(e._stencilClearCommand)||(e._stencilClearCommand=new T.default({stencil:0,pass:E.default.CESIUM_3D_TILE,renderState:C.default.fromCache({stencilMask:Z.a.SKIP_LOD_MASK})})),l.push(e._stencilClearCommand));var g=l.length;for(n=0;n=0;--n)l[g+b+n]=l[g+n];for(n=0;n0&&e._pointCloudEyeDomeLighting.update(t,u,e.pointCloudShading,e.boundingSphere),o&&(e.debugShowGeometricError||e.debugShowRenderingStatistics||e.debugShowMemoryUsage||e.debugShowUrl?(Object(c.default)(e._tileDebugLabels)||(e._tileDebugLabels=new Y.default),function(e,t){var i,n,r=e._selectedTiles,o=r.length,s=e._emptyTiles,l=s.length;if(e._tileDebugLabels.removeAll(),e.debugPickedTileLabelOnly){if(Object(c.default)(e.debugPickedTile)){var u=Object(c.default)(e.debugPickPosition)?e.debugPickPosition:pe(e.debugPickedTile);me(e.debugPickedTile,e,u).pixelOffset=new a.default(15,-15)}}else{for(i=0;i-1},te.prototype.isDestroyed=function(){return!1},te.prototype.destroy=function(){if(this._tileDebugLabels=this._tileDebugLabels&&this._tileDebugLabels.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),Object(c.default)(this._schemaLoader)&&X.a.unload(this._schemaLoader),Object(c.default)(this._root)){var e=ge;for(e.push(this._root);e.length>0;){var t=e.pop();t.destroy();for(var i=t.children,n=i.length,a=0;ah&&(p=f.default.PI-l,l=-f.default.PI,h+=p),r-=f.default.EPSILON5,l-=f.default.EPSILON5,d+=f.default.EPSILON5;var m=1/((h+=f.default.EPSILON5)-l),_=1/(d-r),g={sphericalExtents:new c.a({componentDatatype:s.default.FLOAT,componentsPerAttribute:4,normalize:!1,value:[r,l,_,m]}),longitudeRotation:new c.a({componentDatatype:s.default.FLOAT,componentsPerAttribute:1,normalize:!1,value:[p]})};return C(g,t),L(e,n,g),g},y.hasAttributesForTextureCoordinatePlanes=function(e){return Object(u.default)(e.southWest_HIGH)&&Object(u.default)(e.southWest_LOW)&&Object(u.default)(e.northward)&&Object(u.default)(e.eastward)&&Object(u.default)(e.planes2D_HIGH)&&Object(u.default)(e.planes2D_LOW)&&Object(u.default)(e.uMaxVmax)&&Object(u.default)(e.uvMinAndExtents)},y.hasAttributesForSphericalExtents=function(e){return Object(u.default)(e.sphericalExtents)&&Object(u.default)(e.longitudeRotation)&&Object(u.default)(e.planes2D_HIGH)&&Object(u.default)(e.planes2D_LOW)&&Object(u.default)(e.uMaxVmax)&&Object(u.default)(e.uvMinAndExtents)},y.shouldUseSphericalCoordinates=function(e){return o.a.typeOf.object("rectangle",e),function(e){return Math.max(e.width,e.height)>y.MAX_WIDTH_FOR_PLANAR_EXTENTS}(e)},y.MAX_WIDTH_FOR_PLANAR_EXTENTS=f.default.toRadians(1),t.a=y},function(e,t,i){"use strict";var n=i(8),a=i(16),r=i(2),o=i(0),s=i(19),l=i(3),u=i(59),d=i(125),c=i(38),f=i(5),h=i(33),p=i(21),m=i(164),_=i(120),g=i(157),v=i(188),y=i(102),b=i(135),w=i(57),O=i(36),x=i(284),A=i(56),T=i(287),E=i(58),C=i(67),S=i(34),M=i(45),D=i(118),P=i(62),I=i(83),L=i(104),j=i(747),R=i(748),N=i(18),B=i(508),F=i(749),k=i(114),z=i(509);function U(e,t){this._imageryProvider=e,t=Object(r.default)(t,r.default.EMPTY_OBJECT),this.alpha=Object(r.default)(t.alpha,Object(r.default)(e.defaultAlpha,1)),this.nightAlpha=Object(r.default)(t.nightAlpha,Object(r.default)(e.defaultNightAlpha,1)),this.dayAlpha=Object(r.default)(t.dayAlpha,Object(r.default)(e.defaultDayAlpha,1)),this.brightness=Object(r.default)(t.brightness,Object(r.default)(e.defaultBrightness,U.DEFAULT_BRIGHTNESS)),this.contrast=Object(r.default)(t.contrast,Object(r.default)(e.defaultContrast,U.DEFAULT_CONTRAST)),this.hue=Object(r.default)(t.hue,Object(r.default)(e.defaultHue,U.DEFAULT_HUE)),this.saturation=Object(r.default)(t.saturation,Object(r.default)(e.defaultSaturation,U.DEFAULT_SATURATION)),this.gamma=Object(r.default)(t.gamma,Object(r.default)(e.defaultGamma,U.DEFAULT_GAMMA)),this.splitDirection=Object(r.default)(t.splitDirection,Object(r.default)(e.defaultSplit,U.DEFAULT_SPLIT)),this.minificationFilter=Object(r.default)(t.minificationFilter,Object(r.default)(e.defaultMinificationFilter,U.DEFAULT_MINIFICATION_FILTER)),this.magnificationFilter=Object(r.default)(t.magnificationFilter,Object(r.default)(e.defaultMagnificationFilter,U.DEFAULT_MAGNIFICATION_FILTER)),this.show=Object(r.default)(t.show,!0),this._minimumTerrainLevel=t.minimumTerrainLevel,this._maximumTerrainLevel=t.maximumTerrainLevel,this._rectangle=Object(r.default)(t.rectangle,p.default.MAX_VALUE),this._maximumAnisotropy=t.maximumAnisotropy,this._imageryCache={},this._skeletonPlaceholder=new z.a(B.a.createPlaceholder(this)),this._show=!0,this._layerIndex=-1,this._isBaseLayer=!1,this._requestImageError=void 0,this._reprojectComputeCommands=[],this.cutoutRectangle=t.cutoutRectangle,this.colorToAlpha=t.colorToAlpha,this.colorToAlphaThreshold=Object(r.default)(t.colorToAlphaThreshold,U.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD)}Object.defineProperties(U.prototype,{imageryProvider:{get:function(){return this._imageryProvider}},rectangle:{get:function(){return this._rectangle}}}),U.DEFAULT_BRIGHTNESS=1,U.DEFAULT_CONTRAST=1,U.DEFAULT_HUE=0,U.DEFAULT_SATURATION=1,U.DEFAULT_GAMMA=1,U.DEFAULT_SPLIT=F.a.NONE,U.DEFAULT_MINIFICATION_FILTER=P.default.LINEAR,U.DEFAULT_MAGNIFICATION_FILTER=D.default.LINEAR,U.DEFAULT_APPLY_COLOR_TO_ALPHA_THRESHOLD=.004,U.prototype.isBaseLayer=function(){return this._isBaseLayer},U.prototype.isDestroyed=function(){return!1},U.prototype.destroy=function(){return Object(s.default)(this)};var V=new p.default,H=new p.default,G=new p.default,Y=new p.default;function W(e,t,i){return e+":"+t+":"+i}function q(e,t,i){return JSON.stringify([e,t,i])}U.prototype.getViewableRectangle=function(){var e=this._imageryProvider,t=this._rectangle;return e.readyPromise.then((function(){return p.default.intersection(e.rectangle,t)}))},U.prototype._createTileImagerySkeletons=function(e,t,i){var n=e.data;if(Object(o.default)(this._minimumTerrainLevel)&&e.levelthis._maximumTerrainLevel)return!1;var r=this._imageryProvider;if(Object(o.default)(i)||(i=n.imagery.length),!r.ready)return this._skeletonPlaceholder.loadingImagery.addReference(),n.imagery.splice(i,0,this._skeletonPlaceholder),!0;var s=r.tilingScheme.projection instanceof b.a&&e.rectangle.north-b.a.MaximumLatitude,l=p.default.intersection(r.rectangle,this._rectangle,V),u=p.default.intersection(e.rectangle,l,H);if(!Object(o.default)(u)){if(!this.isBaseLayer())return!1;var c=l,f=e.rectangle;u=H,f.south>=c.north?u.north=u.south=c.north:f.north<=c.south?u.north=u.south=c.south:(u.south=Math.max(f.south,c.south),u.north=Math.min(f.north,c.north)),f.west>=c.east?u.west=u.east=c.east:f.east<=c.west?u.west=u.east=c.west:(u.west=Math.max(f.west,c.west),u.east=Math.min(f.east,c.east))}var h=0;u.south>0?h=u.south:u.north<0&&(h=u.north);var m=function(e,t,i){var n=e._imageryProvider,a=n.tilingScheme,r=a.ellipsoid,o=e._imageryProvider.tilingScheme.projection instanceof d.a?1:Math.cos(i),s=a.rectangle,l=r.maximumRadius*s.width*o/(n.tileWidth*a.getNumberOfXTilesAtLevel(0))/t,u=Math.log(l)/Math.log(2);return 0|Math.round(u)}(this,1*t.getLevelMaximumGeometricError(e.level),h);m=Math.max(0,m);var _=r.maximumLevel;if(m>_&&(m=_),Object(o.default)(r.minimumLevel)){var g=r.minimumLevel;my.y&&--w.y,Math.abs(T.west-e.rectangle.east)y.x&&--w.x;var E,C,S=p.default.clone(e.rectangle,Y),M=v.tileXYToRectangle(y.x,y.y,m),D=p.default.intersection(M,l,G);s?(v.rectangleToNativeRectangle(S,S),v.rectangleToNativeRectangle(M,M),v.rectangleToNativeRectangle(D,D),v.rectangleToNativeRectangle(l,l),E=v.tileXYToNativeRectangle.bind(v),O=S.width/512,x=S.height/512):E=v.tileXYToRectangle.bind(v);var P,I=0,L=1;!this.isBaseLayer()&&Math.abs(D.west-S.west)>=O&&(I=Math.min(1,(D.west-S.west)/S.width)),!this.isBaseLayer()&&Math.abs(D.north-S.north)>=x&&(L=Math.max(0,(D.north-S.south)/S.height));for(var j=L,R=y.x;R<=w.x;R++)if(C=I,M=E(R,y.y,m),D=p.default.simpleIntersection(M,l,G),Object(o.default)(D)){I=Math.min(1,(D.east-S.west)/S.width),R===w.x&&(this.isBaseLayer()||Math.abs(D.east-S.east)1e-5){var l=this;t.addReference();var u=new x.a({persists:!0,owner:this,preExecute:function(e){!function(e,t,i,n){var a=t.cache.imageryLayer_reproject;if(!Object(o.default)(a)){a=t.cache.imageryLayer_reproject={vertexArray:void 0,shaderProgram:void 0,sampler:void 0,destroy:function(){Object(o.default)(this.framebuffer)&&this.framebuffer.destroy(),Object(o.default)(this.vertexArray)&&this.vertexArray.destroy(),Object(o.default)(this.shaderProgram)&&this.shaderProgram.destroy()}};for(var r=new Float32Array(256),s=0,l=0;l<64;++l){var u=l/63;r[s++]=0,r[s++]=u,r[s++]=1,r[s++]=u}var d={position:0,webMercatorT:1},h=v.a.getRegularGridIndices(2,64),p=w.default.createIndexBuffer({context:t,typedArray:h,usage:O.default.STATIC_DRAW,indexDatatype:c.a.UNSIGNED_SHORT});a.vertexArray=new L.default({context:t,attributes:[{index:d.position,vertexBuffer:w.default.createVertexBuffer({context:t,typedArray:r,usage:O.default.STATIC_DRAW}),componentsPerAttribute:2},{index:d.webMercatorT,vertexBuffer:w.default.createVertexBuffer({context:t,sizeInBytes:512,usage:O.default.STREAM_DRAW}),componentsPerAttribute:1}],indexBuffer:p});var m=new S.default({sources:[R.a]});a.shaderProgram=C.default.fromCache({context:t,vertexShaderSource:m,fragmentShaderSource:j.a,attributeLocations:d}),a.sampler=new E.default({wrapS:I.default.CLAMP_TO_EDGE,wrapT:I.default.CLAMP_TO_EDGE,minificationFilter:P.default.LINEAR,magnificationFilter:D.default.LINEAR})}i.sampler=a.sampler;var _=i.width,g=i.height;X.textureDimensions.x=_,X.textureDimensions.y=g,X.texture=i;var y=Math.sin(n.south),b=.5*Math.log((1+y)/(1-y));y=Math.sin(n.north);var x=1/(.5*Math.log((1+y)/(1-y))-b),A=new M.default({context:t,width:_,height:g,pixelFormat:i.pixelFormat,pixelDatatype:i.pixelDatatype,preMultiplyAlpha:i.preMultiplyAlpha});f.default.isPowerOfTwo(_)&&f.default.isPowerOfTwo(g)&&A.generateMipmap(T.a.NICEST);for(var N=n.south,B=n.north,F=K,k=0,z=0;z<64;++z){var U=z/63,V=f.default.lerp(N,B,U);y=Math.sin(V);var H=(.5*Math.log((1+y)/(1-y))-b)*x;F[k++]=H,F[k++]=H}a.vertexArray.getAttribute(1).vertexBuffer.copyFromArrayView(F),e.shaderProgram=a.shaderProgram,e.outputTexture=A,e.uniformMap=X,e.vertexArray=a.vertexArray}(e,s,n,t.rectangle)},postExecute:function(e){t.texture=e,l._finalizeReprojectTexture(s,e),t.state=k.a.READY,t.releaseReference()},canceled:function(){t.state=k.a.TEXTURE_LOADED,t.releaseReference()}});this._reprojectComputeCommands.push(u)}else i&&(t.texture=n),this._finalizeReprojectTexture(s,n),t.state=k.a.READY},U.prototype.queueReprojectionCommands=function(e){for(var t=this._reprojectComputeCommands,i=t.length,n=0;nt.length&&(t.length=e);this._length=e}},values:{get:function(){return this._array}}}),r.prototype.get=function(e){return n.a.typeOf.number.lessThan("index",e,this._array.length),this._array[e]},r.prototype.set=function(e,t){n.a.typeOf.number("index",e),e>=this._length&&(this.length=e+1),this._array[e]=t},r.prototype.peek=function(){return this._array[this._length-1]},r.prototype.push=function(e){var t=this.length++;this._array[t]=e},r.prototype.pop=function(){if(0!==this._length){var e=this._array[this._length-1];return--this.length,e}},r.prototype.reserve=function(e){n.a.typeOf.number.greaterThanOrEquals("length",e,0),e>this._array.length&&(this._array.length=e)},r.prototype.resize=function(e){n.a.typeOf.number.greaterThanOrEquals("length",e,0),this.length=e},r.prototype.trim=function(e){e=Object(a.default)(e,this._length),this._array.length=e},t.a=r},function(e,t,i){"use strict";t.a={NEAREST:0,LINEAR:1}},function(e,t,i){"use strict";var n=i(113),a=i(11),r=i(0),o=i(59),s=i(126),l=i(25),u=i(18);function d(){}function c(e,t){var i="runtime."+Object.keys(e.createdBufferViews).length,n=e.buffers,a=Object.keys(n).length;return n[a]=t,e.createdBufferViews[i]={buffer:a,byteOffset:0,byteLength:t.byteLength},i}function f(e,t,i){var n=t._loadResources,a=c(n,e);return n.vertexBuffersToCreate.enqueue(a),a}function h(e,t,i,n){if(d._taskProcessorReady){var o=i.primitivesToDecode.peek();if(Object(r.default)(o)){var s=e.scheduleTask(o,[o.array.buffer]);if(Object(r.default)(s))return i.activeDecodingTasks++,i.primitivesToDecode.dequeue(),s.then((function(e){i.activeDecodingTasks--;var n=function(e,t,i){var n=e.typedArray,r=t._loadResources,o=c(r,n);return r.indexBuffersToCreate.enqueue({id:o,componentType:a.default.fromTypedArray(n)}),{bufferViewId:o,numberOfIndices:e.numberOfIndices}}(e.indexArray,t),r={},s=e.attributeData;for(var l in s)if(s.hasOwnProperty(l)){var u=s[l],d=f(u.array,t),h=u.data;h.bufferView=d,r[l]=h}t._decodedData[o.mesh+".primitive."+o.primitive]={bufferView:n.bufferViewId,numberOfIndices:n.numberOfIndices,attributes:r}}))}}}d._maxDecodingConcurrency=Math.max(o.a.hardwareConcurrency-1,1),d._decoderTaskProcessor=void 0,d._taskProcessorReady=!1,d._getDecoderTaskProcessor=function(){if(!Object(r.default)(d._decoderTaskProcessor)){var e=new s.a("decodeDraco",d._maxDecodingConcurrency);e.initWebAssemblyModule({modulePath:"ThirdParty/Workers/draco_decoder_nodejs.js",wasmBinaryFile:"ThirdParty/draco_decoder.wasm"}).then((function(){d._taskProcessorReady=!0})),d._decoderTaskProcessor=e}return d._decoderTaskProcessor},d.hasExtension=function(e){return Object(r.default)(e.extensionsRequired.KHR_draco_mesh_compression)||Object(r.default)(e.extensionsUsed.KHR_draco_mesh_compression)},d._decodedModelResourceCache=void 0,d.parse=function(e,t){if(d.hasExtension(e)){var i=e._loadResources,a=e.cacheKey;if(Object(r.default)(a)){Object(r.default)(d._decodedModelResourceCache)||(Object(r.default)(t.cache.modelDecodingCache)||(t.cache.modelDecodingCache={}),d._decodedModelResourceCache=t.cache.modelDecodingCache);var o=d._decodedModelResourceCache[a];if(Object(r.default)(o))return o.count++,void(i.pendingDecodingCache=!0)}var s=e._dequantizeInShader,u=e.gltf;l.a.mesh(u,(function(e,t){l.a.meshPrimitive(e,(function(e,a){if(Object(r.default)(e.extensions)){var o=e.extensions.KHR_draco_mesh_compression;if(Object(r.default)(o)){var l=u.bufferViews[o.bufferView],d=Object(n.a)(u.buffers[l.buffer].extras._pipeline.source,l.byteOffset,l.byteOffset+l.byteLength);i.primitivesToDecode.enqueue({mesh:t,primitive:a,array:d,bufferView:l,compressedAttributes:o.attributes,dequantizeInShader:s})}}}))}))}},d.decodeModel=function(e,t){if(!d.hasExtension(e))return u.a.resolve();var i=e._loadResources,n=e.cacheKey;if(Object(r.default)(n)&&Object(r.default)(d._decodedModelResourceCache)){var a=d._decodedModelResourceCache[n];if(Object(r.default)(a)&&i.pendingDecodingCache)return Object(u.a)(a.ready,(function(){e._decodedData=a.data,i.pendingDecodingCache=!1}));d._decodedModelResourceCache[n]={ready:!1,count:1,data:void 0}}if(0===i.primitivesToDecode.length)return u.a.resolve();for(var o=d._getDecoderTaskProcessor(),s=[],l=h(o,e,i);Object(r.default)(l);)s.push(l),l=h(o,e,i);return u.a.all(s)},d.decodePointCloud=function(e){var t=d._getDecoderTaskProcessor();if(d._taskProcessorReady)return t.scheduleTask(e,[e.buffer.buffer])},d.decodeBufferView=function(e){var t=d._getDecoderTaskProcessor();if(d._taskProcessorReady)return t.scheduleTask(e,[e.array.buffer])},d.cacheDataForModel=function(e){var t=e.cacheKey;if(Object(r.default)(t)&&Object(r.default)(d._decodedModelResourceCache)){var i=d._decodedModelResourceCache[t];Object(r.default)(i)&&(i.ready=!0,i.data=e._decodedData)}},d.destroyCachedDataForModel=function(e){var t=e.cacheKey;if(Object(r.default)(t)&&Object(r.default)(d._decodedModelResourceCache)){var i=d._decodedModelResourceCache[t];Object(r.default)(i)&&0==--i.count&&delete d._decodedModelResourceCache[t]}},t.a=d},function(e,t,i){"use strict";var n={ALL_OPAQUE:0,ALL_TRANSLUCENT:1,OPAQUE_AND_TRANSLUCENT:2,getStyleCommandsNeeded:function(e,t){return 0===t?n.ALL_OPAQUE:t===e?n.ALL_TRANSLUCENT:n.OPAQUE_AND_TRANSLUCENT}};t.a=Object.freeze(n)},function(e,t,i){"use strict";var n=i(0),a=i(3);t.a=function(e){if(!Object(n.default)(e))throw new a.default("queryString is required.");var t={};if(""===e)return t;for(var i=e.replace(/\+/g,"%20").split(/[&;]/),r=0,o=i.length;ru.default.EPSILON12);var I=f*(t*t-i*i)/(i*i),L=I*(256+I*(I*(74-47*I)-128))/1024,j=h*h,R=i*(1+I*(4096+I*(I*(320-175*I)-768))/16384)*(s-L*c*(h+L*(l*(2*j-1)-L*h*(4*c*c-3)*(4*j-3)/6)/4)),N=Math.atan2(b*M,x-T*S),B=Math.atan2(v*M,x*S-T);e._distance=R,e._startHeading=N,e._endHeading=B,e._uSquared=I}(e,o.maximumRadius,o.minimumRadius,t.longitude,t.latitude,i.longitude,i.latitude),e._start=a.default.clone(t,e._start),e._end=a.default.clone(i,e._end),e._start.height=0,e._end.height=0,function(e){var t=e._uSquared,i=e._ellipsoid.maximumRadius,n=e._ellipsoid.minimumRadius,a=(i-n)/i,r=Math.cos(e._startHeading),o=Math.sin(e._startHeading),s=(1-a)*Math.tan(e._start.latitude),l=1/Math.sqrt(1+s*s),u=l*s,d=Math.atan2(s,r),c=l*o,f=c*c,h=1-f,p=Math.sqrt(h),m=t/4,_=m*m,g=_*m,v=_*_,y=1+m-3*_/4+5*g/4-175*v/64,b=1-m+15*_/8-35*g/8,w=1-3*m+35*_/4,O=1-5*m,x=y*d-b*Math.sin(2*d)*m/2-w*Math.sin(4*d)*_/16-O*Math.sin(6*d)*g/48-5*Math.sin(8*d)*v/512,A=e._constants;A.a=i,A.b=n,A.f=a,A.cosineHeading=r,A.sineHeading=o,A.tanU=s,A.cosineU=l,A.sineU=u,A.sigma=d,A.sineAlpha=c,A.sineSquaredAlpha=f,A.cosineSquaredAlpha=h,A.cosineAlpha=p,A.u2Over4=m,A.u4Over16=_,A.u6Over64=g,A.u8Over256=v,A.a0=y,A.a1=b,A.a2=w,A.a3=O,A.distanceRatio=x}(e)}function p(e,t,i){var n=Object(o.default)(i,l.default.WGS84);this._ellipsoid=n,this._start=new a.default,this._end=new a.default,this._constants={},this._startHeading=void 0,this._endHeading=void 0,this._distance=void 0,this._uSquared=void 0,Object(s.default)(e)&&Object(s.default)(t)&&h(this,e,t,n)}Object.defineProperties(p.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},surfaceDistance:{get:function(){return r.a.defined("distance",this._distance),this._distance}},start:{get:function(){return this._start}},end:{get:function(){return this._end}},startHeading:{get:function(){return r.a.defined("distance",this._distance),this._startHeading}},endHeading:{get:function(){return r.a.defined("distance",this._distance),this._endHeading}}}),p.prototype.setEndPoints=function(e,t){r.a.defined("start",e),r.a.defined("end",t),h(this,e,t,this._ellipsoid)},p.prototype.interpolateUsingFraction=function(e,t){return this.interpolateUsingSurfaceDistance(this._distance*e,t)},p.prototype.interpolateUsingSurfaceDistance=function(e,t){r.a.defined("distance",this._distance);var i=this._constants,n=i.distanceRatio+e/i.b,o=Math.cos(2*n),l=Math.cos(4*n),u=Math.cos(6*n),c=Math.sin(2*n),f=Math.sin(4*n),h=Math.sin(6*n),p=Math.sin(8*n),m=n*n,_=n*m,g=i.u8Over256,v=i.u2Over4,y=i.u6Over64,b=i.u4Over16,w=2*_*g*o/3+n*(1-v+7*b/4-15*y/4+579*g/64-(b-15*y/4+187*g/16)*o-(5*y/4-115*g/16)*l-29*g*u/16)+(v/2-b+71*y/32-85*g/16)*c+(5*b/16-5*y/4+383*g/96)*f-m*((y-11*g/2)*c+5*g*f/2)+(29*y/96-29*g/16)*h+539*g*p/1536,O=Math.asin(Math.sin(w)*i.cosineAlpha),x=Math.atan(i.a/i.b*Math.tan(O));w-=i.sigma;var A=Math.cos(2*i.sigma+w),T=Math.sin(w),E=Math.cos(w),C=i.cosineU*E,S=i.sineU*T,M=Math.atan2(T*i.sineHeading,C-S*i.cosineHeading)-d(i.f,i.sineAlpha,i.cosineSquaredAlpha,w,T,E,A);return Object(s.default)(t)?(t.longitude=this._start.longitude+M,t.latitude=x,t.height=0,t):new a.default(this._start.longitude+M,x,0)},t.a=p},function(e,t,i){"use strict";var n=i(2);t.a=function(e,t,i,a,r,o,s,l,u,d,c,f,h,p,m,_){this.center=e,this.vertices=t,this.stride=Object(n.default)(d,6),this.indices=i,this.indexCountWithoutSkirts=a,this.vertexCountWithoutSkirts=r,this.minimumHeight=o,this.maximumHeight=s,this.boundingSphere3D=l,this.occludeePointInScaledSpace=u,this.orientedBoundingBox=c,this.encoding=f,this.westIndicesSouthToNorth=h,this.southIndicesEastToWest=p,this.eastIndicesNorthToSouth=m,this.northIndicesWestToEast=_}},function(e,t,i){"use strict";var n=i(2),a=i(26);function r(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this.vertexArray=e.vertexArray,this.fragmentShaderSource=e.fragmentShaderSource,this.shaderProgram=e.shaderProgram,this.uniformMap=e.uniformMap,this.outputTexture=e.outputTexture,this.preExecute=e.preExecute,this.postExecute=e.postExecute,this.canceled=e.canceled,this.persists=Object(n.default)(e.persists,!1),this.pass=a.default.COMPUTE,this.owner=e.owner}r.prototype.execute=function(e){e.execute(this)},t.a=r},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(22),o=i(4),s=i(53),l=i(2),u=i(0),d=i(15),c=i(43),f=i(124),h=i(6),p=i(123),m=i(80),_=i(85),g=i(21),v=i(445),y=i(61),b=i(64),w=i(13);function O(e){o.a.typeOf.object("options",e),o.a.typeOf.object("options.rectangle",e.rectangle),this.rectangle=g.default.clone(e.rectangle),this.minimumHeight=Object(l.default)(e.minimumHeight,0),this.maximumHeight=Object(l.default)(e.maximumHeight,0),this.southwestCornerCartesian=new a.default,this.northeastCornerCartesian=new a.default,this.westNormal=new a.default,this.southNormal=new a.default,this.eastNormal=new a.default,this.northNormal=new a.default;var t=Object(l.default)(e.ellipsoid,d.default.WGS84);!function(e,t,i){i.cartographicToCartesian(g.default.southwest(t),e.southwestCornerCartesian),i.cartographicToCartesian(g.default.northeast(t),e.northeastCornerCartesian),M.longitude=t.west,M.latitude=.5*(t.south+t.north),M.height=0;var n=i.cartographicToCartesian(M,C),r=a.default.cross(n,a.default.UNIT_Z,x);a.default.normalize(r,e.westNormal),M.longitude=t.east;var o=i.cartographicToCartesian(M,S),s=a.default.cross(a.default.UNIT_Z,o,x);a.default.normalize(s,e.eastNormal);var l,u=a.default.subtract(n,o,x),d=a.default.normalize(u,E),c=t.south;if(c>0){M.longitude=.5*(t.west+t.east),M.latitude=c;var h=i.cartographicToCartesian(M,P.origin);a.default.clone(d,P.direction);var p=m.default.fromPointNormal(e.southwestCornerCartesian,e.westNormal,D);f.default.rayPlane(P,p,e.southwestCornerCartesian),l=i.geodeticSurfaceNormal(h,A)}else l=i.geodeticSurfaceNormalCartographic(g.default.southeast(t),A);var _=a.default.cross(l,u,T);a.default.normalize(_,e.southNormal);var v,y=t.north;if(y<0){M.longitude=.5*(t.west+t.east),M.latitude=y;var b=i.cartographicToCartesian(M,P.origin);a.default.negate(d,P.direction);var w=m.default.fromPointNormal(e.northeastCornerCartesian,e.eastNormal,D);f.default.rayPlane(P,w,e.northeastCornerCartesian),v=i.geodeticSurfaceNormal(b,A)}else v=i.geodeticSurfaceNormalCartographic(g.default.northwest(t),A);var O=a.default.cross(u,v,T);a.default.normalize(O,e.northNormal)}(this,e.rectangle,t),this._orientedBoundingBox=void 0,this._boundingSphere=void 0,Object(l.default)(e.computeBoundingVolumes,!0)&&this.computeBoundingVolumes(t)}Object.defineProperties(O.prototype,{boundingVolume:{get:function(){return this._orientedBoundingBox}},boundingSphere:{get:function(){return this._boundingSphere}}}),O.prototype.computeBoundingVolumes=function(e){this._orientedBoundingBox=p.a.fromRectangle(this.rectangle,this.minimumHeight,this.maximumHeight,e),this._boundingSphere=n.default.fromOrientedBoundingBox(this._orientedBoundingBox)};var x=new a.default,A=new a.default,T=new a.default,E=new a.default,C=new a.default,S=new a.default,M=new r.default,D=new m.default(a.default.UNIT_X,0),P=new _.default;var I=new a.default,L=new a.default,j=new a.default(0,-1,0),R=new a.default(0,0,-1),N=new a.default;O.prototype.distanceToCamera=function(e){o.a.defined("frameState",e);var t=function(e,t){var i,n,r,o=t.camera,s=o.positionWC,l=o.positionCartographic,u=0;if(!g.default.contains(e.rectangle,l)){var d=e.southwestCornerCartesian,c=e.northeastCornerCartesian,f=e.westNormal,h=e.southNormal,p=e.eastNormal,m=e.northNormal;t.mode!==w.default.SCENE3D&&((d=t.mapProjection.project(g.default.southwest(e.rectangle),I)).z=d.y,d.y=d.x,d.x=0,(c=t.mapProjection.project(g.default.northeast(e.rectangle),L)).z=c.y,c.y=c.x,c.x=0,f=j,p=a.default.UNIT_Y,h=R,m=a.default.UNIT_Z);var _=a.default.subtract(s,d,N),v=a.default.dot(_,f),y=a.default.dot(_,h),b=a.default.subtract(s,c,N),O=a.default.dot(b,p),x=a.default.dot(b,m);v>0?u+=v*v:O>0&&(u+=O*O),y>0?u+=y*y:x>0&&(u+=x*x)}if(t.mode===w.default.SCENE3D?(i=l.height,n=e.minimumHeight,r=e.maximumHeight):(i=s.x,n=0,r=0),i>r){var A=i-r;u+=A*A}else if(i=0;){var a,r=t.indexOf("'"),o=t.indexOf('"');if(r>=0&&r=0&&o=this.arrayArray.length&&this.arrayArray.push([]);var e=this.arrayArray[this.arrayIndex++];return e.length=0,e},getCartesian2:function(){return this.cartesian2Index>=this.cartesian2Array.length&&this.cartesian2Array.push(new n.default),this.cartesian2Array[this.cartesian2Index++]},getCartesian3:function(){return this.cartesian3Index>=this.cartesian3Array.length&&this.cartesian3Array.push(new a.default),this.cartesian3Array[this.cartesian3Index++]},getCartesian4:function(){return this.cartesian4Index>=this.cartesian4Array.length&&this.cartesian4Array.push(new r.a),this.cartesian4Array[this.cartesian4Index++]}};p.prototype.evaluate=function(e,t){m.reset();var i=this._runtimeAst.evaluate(e);return t instanceof s.default&&i instanceof r.a?s.default.fromCartesian4(i,t):i instanceof n.default||i instanceof a.default||i instanceof r.a?i.clone(t):i},p.prototype.evaluateColor=function(e,t){m.reset();var i=this._runtimeAst.evaluate(e);return s.default.fromCartesian4(i,t)},p.prototype.getShaderFunction=function(e,t,i,n){var a=this.getShaderExpression(t,i);return a=n+" "+e+"\n{\n return "+a+";\n}\n"},p.prototype.getShaderExpression=function(e,t){return this._runtimeAst.getShaderExpression(e,t)},p.prototype.getVariables=function(){var e=[];return this._runtimeAst.getVariables(e),e=e.filter((function(e,t,i){return i.indexOf(e)===t}))};var _=["!","-","+"],g=["+","-","*","/","%","===","!==",">",">=","<","<=","&&","||","!~","=~"],v=/\${(.*?)}/g,y=/\\/g,b=/@#%/g,w=new s.default,O={abs:T(Math.abs),sqrt:T(Math.sqrt),cos:T(Math.cos),sin:T(Math.sin),tan:T(Math.tan),acos:T(Math.acos),asin:T(Math.asin),atan:T(Math.atan),radians:T(d.default.toRadians),degrees:T(d.default.toDegrees),sign:T(d.default.sign),floor:T(Math.floor),ceil:T(Math.ceil),round:T(Math.round),exp:T(Math.exp),exp2:T((function(e){return Math.pow(2,e)})),log:T(Math.log),log2:T((function(e){return d.default.log2(e)})),fract:T((function(e){return e-Math.floor(e)})),length:function(e,t){if("number"==typeof t)return Math.abs(t);if(t instanceof n.default)return n.default.magnitude(t);if(t instanceof a.default)return a.default.magnitude(t);if(t instanceof r.a)return r.a.magnitude(t);throw new c.a('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")},normalize:function(e,t){if("number"==typeof t)return 1;if(t instanceof n.default)return n.default.normalize(t,m.getCartesian2());if(t instanceof a.default)return a.default.normalize(t,m.getCartesian3());if(t instanceof r.a)return r.a.normalize(t,m.getCartesian4());throw new c.a('Function "'+e+'" requires a vector or number argument. Argument is '+t+".")}},x={atan2:E(Math.atan2,!1),pow:E(Math.pow,!1),min:E(Math.min,!0),max:E(Math.max,!0),distance:function(e,t,i){if("number"==typeof t&&"number"==typeof i)return Math.abs(t-i);if(t instanceof n.default&&i instanceof n.default)return n.default.distance(t,i);if(t instanceof a.default&&i instanceof a.default)return a.default.distance(t,i);if(t instanceof r.a&&i instanceof r.a)return r.a.distance(t,i);throw new c.a('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},dot:function(e,t,i){if("number"==typeof t&&"number"==typeof i)return t*i;if(t instanceof n.default&&i instanceof n.default)return n.default.dot(t,i);if(t instanceof a.default&&i instanceof a.default)return a.default.dot(t,i);if(t instanceof r.a&&i instanceof r.a)return r.a.dot(t,i);throw new c.a('Function "'+e+'" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},cross:function(e,t,i){if(t instanceof a.default&&i instanceof a.default)return a.default.cross(t,i,m.getCartesian3());throw new c.a('Function "'+e+'" requires vec3 arguments. Arguments are '+t+" and "+i+".")}},A={clamp:C(d.default.clamp,!0),mix:C(d.default.lerp,!0)};function T(e){return function(t,i){if("number"==typeof i)return e(i);if(i instanceof n.default)return n.default.fromElements(e(i.x),e(i.y),m.getCartesian2());if(i instanceof a.default)return a.default.fromElements(e(i.x),e(i.y),e(i.z),m.getCartesian3());if(i instanceof r.a)return r.a.fromElements(e(i.x),e(i.y),e(i.z),e(i.w),m.getCartesian4());throw new c.a('Function "'+t+'" requires a vector or number argument. Argument is '+i+".")}}function E(e,t){return function(i,o,s){if(t&&"number"==typeof s){if("number"==typeof o)return e(o,s);if(o instanceof n.default)return n.default.fromElements(e(o.x,s),e(o.y,s),m.getCartesian2());if(o instanceof a.default)return a.default.fromElements(e(o.x,s),e(o.y,s),e(o.z,s),m.getCartesian3());if(o instanceof r.a)return r.a.fromElements(e(o.x,s),e(o.y,s),e(o.z,s),e(o.w,s),m.getCartesian4())}if("number"==typeof o&&"number"==typeof s)return e(o,s);if(o instanceof n.default&&s instanceof n.default)return n.default.fromElements(e(o.x,s.x),e(o.y,s.y),m.getCartesian2());if(o instanceof a.default&&s instanceof a.default)return a.default.fromElements(e(o.x,s.x),e(o.y,s.y),e(o.z,s.z),m.getCartesian3());if(o instanceof r.a&&s instanceof r.a)return r.a.fromElements(e(o.x,s.x),e(o.y,s.y),e(o.z,s.z),e(o.w,s.w),m.getCartesian4());throw new c.a('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+o+" and "+s+".")}}function C(e,t){return function(i,o,s,l){if(t&&"number"==typeof l){if("number"==typeof o&&"number"==typeof s)return e(o,s,l);if(o instanceof n.default&&s instanceof n.default)return n.default.fromElements(e(o.x,s.x,l),e(o.y,s.y,l),m.getCartesian2());if(o instanceof a.default&&s instanceof a.default)return a.default.fromElements(e(o.x,s.x,l),e(o.y,s.y,l),e(o.z,s.z,l),m.getCartesian3());if(o instanceof r.a&&s instanceof r.a)return r.a.fromElements(e(o.x,s.x,l),e(o.y,s.y,l),e(o.z,s.z,l),e(o.w,s.w,l),m.getCartesian4())}if("number"==typeof o&&"number"==typeof s&&"number"==typeof l)return e(o,s,l);if(o instanceof n.default&&s instanceof n.default&&l instanceof n.default)return n.default.fromElements(e(o.x,s.x,l.x),e(o.y,s.y,l.y),m.getCartesian2());if(o instanceof a.default&&s instanceof a.default&&l instanceof a.default)return a.default.fromElements(e(o.x,s.x,l.x),e(o.y,s.y,l.y),e(o.z,s.z,l.z),m.getCartesian3());if(o instanceof r.a&&s instanceof r.a&&l instanceof r.a)return r.a.fromElements(e(o.x,s.x,l.x),e(o.y,s.y,l.y),e(o.z,s.z,l.z),e(o.w,s.w,l.w),m.getCartesian4());throw new c.a('Function "'+i+'" requires vector or number arguments of matching types. Arguments are '+o+", "+s+", and "+l+".")}}function S(e,t,i,n,a){var r,o,s;this._type=e,this._value=t,this._left=i,this._right=n,this._test=a,this.evaluate=void 0,(r=this)._type===h.a.CONDITIONAL?r.evaluate=r._evaluateConditional:r._type===h.a.FUNCTION_CALL?"test"===r._value?r.evaluate=r._evaluateRegExpTest:"exec"===r._value?r.evaluate=r._evaluateRegExpExec:"toString"===r._value&&(r.evaluate=r._evaluateToString):r._type===h.a.UNARY?"!"===r._value?r.evaluate=r._evaluateNot:"-"===r._value?r.evaluate=r._evaluateNegative:"+"===r._value?r.evaluate=r._evaluatePositive:"isNaN"===r._value?r.evaluate=r._evaluateNaN:"isFinite"===r._value?r.evaluate=r._evaluateIsFinite:"isExactClass"===r._value?r.evaluate=r._evaluateIsExactClass:"isClass"===r._value?r.evaluate=r._evaluateIsClass:"getExactClassName"===r._value?r.evaluate=r._evaluateGetExactClassName:"Boolean"===r._value?r.evaluate=r._evaluateBooleanConversion:"Number"===r._value?r.evaluate=r._evaluateNumberConversion:"String"===r._value?r.evaluate=r._evaluateStringConversion:Object(l.default)(O[r._value])&&(r.evaluate=(o=r._value,s=O[o],function(e){var t=this._left.evaluate(e);return s(o,t)})):r._type===h.a.BINARY?"+"===r._value?r.evaluate=r._evaluatePlus:"-"===r._value?r.evaluate=r._evaluateMinus:"*"===r._value?r.evaluate=r._evaluateTimes:"/"===r._value?r.evaluate=r._evaluateDivide:"%"===r._value?r.evaluate=r._evaluateMod:"==="===r._value?r.evaluate=r._evaluateEqualsStrict:"!=="===r._value?r.evaluate=r._evaluateNotEqualsStrict:"<"===r._value?r.evaluate=r._evaluateLessThan:"<="===r._value?r.evaluate=r._evaluateLessThanOrEquals:">"===r._value?r.evaluate=r._evaluateGreaterThan:">="===r._value?r.evaluate=r._evaluateGreaterThanOrEquals:"&&"===r._value?r.evaluate=r._evaluateAnd:"||"===r._value?r.evaluate=r._evaluateOr:"=~"===r._value?r.evaluate=r._evaluateRegExpMatch:"!~"===r._value?r.evaluate=r._evaluateRegExpNotMatch:Object(l.default)(x[r._value])&&(r.evaluate=function(e){var t=x[e];return function(i){var n=this._left.evaluate(i),a=this._right.evaluate(i);return t(e,n,a)}}(r._value)):r._type===h.a.TERNARY?r.evaluate=function(e){var t=A[e];return function(i){var n=this._left.evaluate(i),a=this._right.evaluate(i),r=this._test.evaluate(i);return t(e,n,a,r)}}(r._value):r._type===h.a.MEMBER?"brackets"===r._value?r.evaluate=r._evaluateMemberBrackets:r.evaluate=r._evaluateMemberDot:r._type===h.a.ARRAY?r.evaluate=r._evaluateArray:r._type===h.a.VARIABLE?r.evaluate=r._evaluateVariable:r._type===h.a.VARIABLE_IN_STRING?r.evaluate=r._evaluateVariableString:r._type===h.a.LITERAL_COLOR?r.evaluate=r._evaluateLiteralColor:r._type===h.a.LITERAL_VECTOR?r.evaluate=r._evaluateLiteralVector:r._type===h.a.LITERAL_STRING?r.evaluate=r._evaluateLiteralString:r._type===h.a.REGEX?r.evaluate=r._evaluateRegExp:r._type===h.a.BUILTIN_VARIABLE?"tiles3d_tileset_time"===r._value&&(r.evaluate=j):r.evaluate=r._evaluateLiteral}function M(e){return e.replace(b,"\\")}function D(e,t){var i,n,a,r,o=t.arguments,s=o.length;if("MemberExpression"===t.callee.type){i=t.callee.property.name;var u=t.callee.object;if("test"===i||"exec"===i){if("regExp"!==u.callee.name)throw new c.a(i+" is not a function.");return 0===s?"test"===i?new S(h.a.LITERAL_BOOLEAN,!1):new S(h.a.LITERAL_NULL,null):(a=L(e,u),r=L(e,o[0]),new S(h.a.FUNCTION_CALL,i,a,r))}if("toString"===i)return n=L(e,u),new S(h.a.FUNCTION_CALL,i,n);throw new c.a('Unexpected function call "'+i+'".')}if("color"===(i=t.callee.name)){if(0===s)return new S(h.a.LITERAL_COLOR,i);if(n=L(e,o[0]),Object(l.default)(o[1])){var d=L(e,o[1]);return new S(h.a.LITERAL_COLOR,i,[n,d])}return new S(h.a.LITERAL_COLOR,i,[n])}if("rgb"===i||"hsl"===i){if(s<3)throw new c.a(i+" requires three arguments.");return n=[L(e,o[0]),L(e,o[1]),L(e,o[2])],new S(h.a.LITERAL_COLOR,i,n)}if("rgba"===i||"hsla"===i){if(s<4)throw new c.a(i+" requires four arguments.");return n=[L(e,o[0]),L(e,o[1]),L(e,o[2]),L(e,o[3])],new S(h.a.LITERAL_COLOR,i,n)}if("vec2"===i||"vec3"===i||"vec4"===i){n=new Array(s);for(var f=0;f1)throw new c.a(i+" requires exactly one argument.");return n=L(e,o[0]),new S(h.a.UNARY,i,n)}if("getExactClassName"===i){if(s>0)throw new c.a(i+" does not take any argument.");return new S(h.a.UNARY,i)}if(Object(l.default)(O[i])){if(1!==s)throw new c.a(i+" requires exactly one argument.");return n=L(e,o[0]),new S(h.a.UNARY,i,n)}if(Object(l.default)(x[i])){if(2!==s)throw new c.a(i+" requires exactly two arguments.");return a=L(e,o[0]),r=L(e,o[1]),new S(h.a.BINARY,i,a,r)}if(Object(l.default)(A[i])){if(3!==s)throw new c.a(i+" requires exactly three arguments.");a=L(e,o[0]),r=L(e,o[1]);var p=L(e,o[2]);return new S(h.a.TERNARY,i,a,r,p)}if("Boolean"===i)return 0===s?new S(h.a.LITERAL_BOOLEAN,!1):(n=L(e,o[0]),new S(h.a.UNARY,i,n));if("Number"===i)return 0===s?new S(h.a.LITERAL_NUMBER,0):(n=L(e,o[0]),new S(h.a.UNARY,i,n));if("String"===i)return 0===s?new S(h.a.LITERAL_STRING,""):(n=L(e,o[0]),new S(h.a.UNARY,i,n));if("regExp"===i)return function(e,t){var i=t.arguments;if(0===i.length)return new S(h.a.LITERAL_REGEX,new RegExp);var n,a=L(e,i[0]);if(i.length>1){var r=L(e,i[1]);if(I(a)&&I(r)){try{n=new RegExp(M(String(a._value)),r._value)}catch(e){throw new c.a(e)}return new S(h.a.LITERAL_REGEX,n)}return new S(h.a.REGEX,a,r)}if(I(a)){try{n=new RegExp(M(String(a._value)))}catch(e){throw new c.a(e)}return new S(h.a.LITERAL_REGEX,n)}return new S(h.a.REGEX,a)}(e,t);throw new c.a('Unexpected function call "'+i+'".')}function P(e,t){if("Math"===t.object.name)return function(e){var t=e.property.name;return"PI"===t?new S(h.a.LITERAL_NUMBER,Math.PI):"E"===t?new S(h.a.LITERAL_NUMBER,Math.E):void 0}(t);if("Number"===t.object.name)return function(e){if("POSITIVE_INFINITY"===e.property.name)return new S(h.a.LITERAL_NUMBER,Number.POSITIVE_INFINITY)}(t);var i,n=L(e,t.object);return t.computed?(i=L(e,t.property),new S(h.a.MEMBER,"brackets",n,i)):(i=new S(h.a.LITERAL_STRING,t.property.name),new S(h.a.MEMBER,"dot",n,i))}function I(e){return e._type>=h.a.LITERAL_NULL}function L(e,t){var i,n,a,r;if("Literal"===t.type)i=function(e){var t=typeof e.value;return null===e.value?new S(h.a.LITERAL_NULL,null):"boolean"===t?new S(h.a.LITERAL_BOOLEAN,e.value):"number"===t?new S(h.a.LITERAL_NUMBER,e.value):"string"===t?e.value.indexOf("${")>=0?new S(h.a.VARIABLE_IN_STRING,e.value):new S(h.a.LITERAL_STRING,M(e.value)):void 0}(t);else if("CallExpression"===t.type)i=D(e,t);else if("Identifier"===t.type)i=function(e){if(function(e){return"czm_"===e.substr(0,4)}(e.name)){var t=e.name.substr(4);return"tiles3d_"===t.substr(0,8)?new S(h.a.BUILTIN_VARIABLE,t):new S(h.a.VARIABLE,t)}if("NaN"===e.name)return new S(h.a.LITERAL_NUMBER,NaN);if("Infinity"===e.name)return new S(h.a.LITERAL_NUMBER,1/0);if("undefined"===e.name)return new S(h.a.LITERAL_UNDEFINED,void 0);throw new c.a(e.name+" is not defined.")}(t);else if("UnaryExpression"===t.type){n=t.operator;var o=L(e,t.argument);if(!(_.indexOf(n)>-1))throw new c.a('Unexpected operator "'+n+'".');i=new S(h.a.UNARY,n,o)}else if("BinaryExpression"===t.type){if(n=t.operator,a=L(e,t.left),r=L(e,t.right),!(g.indexOf(n)>-1))throw new c.a('Unexpected operator "'+n+'".');i=new S(h.a.BINARY,n,a,r)}else if("LogicalExpression"===t.type)n=t.operator,a=L(e,t.left),r=L(e,t.right),g.indexOf(n)>-1&&(i=new S(h.a.BINARY,n,a,r));else if("ConditionalExpression"===t.type){var s=L(e,t.test);a=L(e,t.consequent),r=L(e,t.alternate),i=new S(h.a.CONDITIONAL,"?",a,r,s)}else if("MemberExpression"===t.type)i=P(e,t);else{if("ArrayExpression"!==t.type)throw"Compound"===t.type?new c.a("Provide exactly one expression."):new c.a("Cannot parse expression.");for(var l=[],u=0;u1?(s.default.fromCssColorString(i[0].evaluate(e),t),t.alpha=i[1].evaluate(e)):s.default.fromCssColorString(i[0].evaluate(e),t):s.default.fromBytes(255,255,255,255,t);else if("rgb"===this._value)s.default.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),255,t);else if("rgba"===this._value){var n=255*i[3].evaluate(e);s.default.fromBytes(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),n,t)}else"hsl"===this._value?s.default.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),1,t):"hsla"===this._value&&s.default.fromHsl(i[0].evaluate(e),i[1].evaluate(e),i[2].evaluate(e),i[3].evaluate(e),t);return r.a.fromColor(t,m.getCartesian4())},S.prototype._evaluateLiteralVector=function(e){for(var t=m.getArray(),i=this._value,o=this._left,s=o.length,l=0;l1)throw new c.a("Invalid "+i+" constructor. Not enough arguments.");if(d>f&&s>1)throw new c.a("Invalid "+i+" constructor. Too many arguments.");if(1===d){var h=t[0];t.push(h,h,h)}return"vec2"===i?n.default.fromArray(t,0,m.getCartesian2()):"vec3"===i?a.default.fromArray(t,0,m.getCartesian3()):"vec4"===i?r.a.fromArray(t,0,m.getCartesian4()):void 0},S.prototype._evaluateLiteralString=function(){return this._value},S.prototype._evaluateVariableString=function(e){for(var t=this._value,i=v.exec(t);null!==i;){var n=i[0],a=R(e,i[1]);Object(l.default)(a)||(a=""),t=t.replace(n,a),i=v.exec(t)}return t},S.prototype._evaluateVariable=function(e){return R(e,this._value)},S.prototype._evaluateMemberDot=function(e){if(N(this._left))return R(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(Object(l.default)(t)){var i=this._right.evaluate(e);if(t instanceof n.default||t instanceof a.default||t instanceof r.a){if("r"===i)return t.x;if("g"===i)return t.y;if("b"===i)return t.z;if("a"===i)return t.w}return t[i]}},S.prototype._evaluateMemberBrackets=function(e){if(N(this._left))return R(e,this._right.evaluate(e));var t=this._left.evaluate(e);if(Object(l.default)(t)){var i=this._right.evaluate(e);if(t instanceof n.default||t instanceof a.default||t instanceof r.a){if(0===i||"r"===i)return t.x;if(1===i||"g"===i)return t.y;if(2===i||"b"===i)return t.z;if(3===i||"a"===i)return t.w}return t[i]}},S.prototype._evaluateArray=function(e){for(var t=[],i=0;i" requires number arguments. Arguments are '+t+" and "+i+".");return t>i},S.prototype._evaluateGreaterThanOrEquals=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if("number"!=typeof t||"number"!=typeof i)throw new c.a('Operator ">=" requires number arguments. Arguments are '+t+" and "+i+".");return t>=i},S.prototype._evaluateOr=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new c.a('Operator "||" requires boolean arguments. First argument is '+t+".");if(t)return!0;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new c.a('Operator "||" requires boolean arguments. Second argument is '+i+".");return t||i},S.prototype._evaluateAnd=function(e){var t=this._left.evaluate(e);if("boolean"!=typeof t)throw new c.a('Operator "&&" requires boolean arguments. First argument is '+t+".");if(!t)return!1;var i=this._right.evaluate(e);if("boolean"!=typeof i)throw new c.a('Operator "&&" requires boolean arguments. Second argument is '+i+".");return t&&i},S.prototype._evaluatePlus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof n.default&&t instanceof n.default)return n.default.add(t,i,m.getCartesian2());if(i instanceof a.default&&t instanceof a.default)return a.default.add(t,i,m.getCartesian3());if(i instanceof r.a&&t instanceof r.a)return r.a.add(t,i,m.getCartesian4());if("string"==typeof t||"string"==typeof i)return t+i;if("number"==typeof t&&"number"==typeof i)return t+i;throw new c.a('Operator "+" requires vector or number arguments of matching types, or at least one string argument. Arguments are '+t+" and "+i+".")},S.prototype._evaluateMinus=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof n.default&&t instanceof n.default)return n.default.subtract(t,i,m.getCartesian2());if(i instanceof a.default&&t instanceof a.default)return a.default.subtract(t,i,m.getCartesian3());if(i instanceof r.a&&t instanceof r.a)return r.a.subtract(t,i,m.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t-i;throw new c.a('Operator "-" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},S.prototype._evaluateTimes=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof n.default&&t instanceof n.default)return n.default.multiplyComponents(t,i,m.getCartesian2());if(i instanceof n.default&&"number"==typeof t)return n.default.multiplyByScalar(i,t,m.getCartesian2());if(t instanceof n.default&&"number"==typeof i)return n.default.multiplyByScalar(t,i,m.getCartesian2());if(i instanceof a.default&&t instanceof a.default)return a.default.multiplyComponents(t,i,m.getCartesian3());if(i instanceof a.default&&"number"==typeof t)return a.default.multiplyByScalar(i,t,m.getCartesian3());if(t instanceof a.default&&"number"==typeof i)return a.default.multiplyByScalar(t,i,m.getCartesian3());if(i instanceof r.a&&t instanceof r.a)return r.a.multiplyComponents(t,i,m.getCartesian4());if(i instanceof r.a&&"number"==typeof t)return r.a.multiplyByScalar(i,t,m.getCartesian4());if(t instanceof r.a&&"number"==typeof i)return r.a.multiplyByScalar(t,i,m.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t*i;throw new c.a('Operator "*" requires vector or number arguments. If both arguments are vectors they must be matching types. Arguments are '+t+" and "+i+".")},S.prototype._evaluateDivide=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof n.default&&t instanceof n.default)return n.default.divideComponents(t,i,m.getCartesian2());if(t instanceof n.default&&"number"==typeof i)return n.default.divideByScalar(t,i,m.getCartesian2());if(i instanceof a.default&&t instanceof a.default)return a.default.divideComponents(t,i,m.getCartesian3());if(t instanceof a.default&&"number"==typeof i)return a.default.divideByScalar(t,i,m.getCartesian3());if(i instanceof r.a&&t instanceof r.a)return r.a.divideComponents(t,i,m.getCartesian4());if(t instanceof r.a&&"number"==typeof i)return r.a.divideByScalar(t,i,m.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t/i;throw new c.a('Operator "/" requires vector or number arguments of matching types, or a number as the second argument. Arguments are '+t+" and "+i+".")},S.prototype._evaluateMod=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(i instanceof n.default&&t instanceof n.default)return n.default.fromElements(t.x%i.x,t.y%i.y,m.getCartesian2());if(i instanceof a.default&&t instanceof a.default)return a.default.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,m.getCartesian3());if(i instanceof r.a&&t instanceof r.a)return r.a.fromElements(t.x%i.x,t.y%i.y,t.z%i.z,t.w%i.w,m.getCartesian4());if("number"==typeof t&&"number"==typeof i)return t%i;throw new c.a('Operator "%" requires vector or number arguments of matching types. Arguments are '+t+" and "+i+".")},S.prototype._evaluateEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof n.default&&t instanceof n.default||i instanceof a.default&&t instanceof a.default||i instanceof r.a&&t instanceof r.a?t.equals(i):t===i},S.prototype._evaluateNotEqualsStrict=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);return i instanceof n.default&&t instanceof n.default||i instanceof a.default&&t instanceof a.default||i instanceof r.a&&t instanceof r.a?!t.equals(i):t!==i},S.prototype._evaluateConditional=function(e){var t=this._test.evaluate(e);if("boolean"!=typeof t)throw new c.a("Conditional argument of conditional expression must be a boolean. Argument is "+t+".");return t?this._left.evaluate(e):this._right.evaluate(e)},S.prototype._evaluateNaN=function(e){return isNaN(this._left.evaluate(e))},S.prototype._evaluateIsFinite=function(e){return isFinite(this._left.evaluate(e))},S.prototype._evaluateIsExactClass=function(e){return!!Object(l.default)(e)&&e.isExactClass(this._left.evaluate(e))},S.prototype._evaluateIsClass=function(e){return!!Object(l.default)(e)&&e.isClass(this._left.evaluate(e))},S.prototype._evaluateGetExactClassName=function(e){if(Object(l.default)(e))return e.getExactClassName()},S.prototype._evaluateBooleanConversion=function(e){return Boolean(this._left.evaluate(e))},S.prototype._evaluateNumberConversion=function(e){return Number(this._left.evaluate(e))},S.prototype._evaluateStringConversion=function(e){return String(this._left.evaluate(e))},S.prototype._evaluateRegExp=function(e){var t,i=this._value.evaluate(e),n="";Object(l.default)(this._left)&&(n=this._left.evaluate(e));try{t=new RegExp(i,n)}catch(e){throw new c.a(e)}return t},S.prototype._evaluateRegExpTest=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new c.a("RegExp.test requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");return t.test(i)},S.prototype._evaluateRegExpMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return t.test(i);if(i instanceof RegExp&&"string"==typeof t)return i.test(t);throw new c.a('Operator "=~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},S.prototype._evaluateRegExpNotMatch=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(t instanceof RegExp&&"string"==typeof i)return!t.test(i);if(i instanceof RegExp&&"string"==typeof t)return!i.test(t);throw new c.a('Operator "!~" requires one RegExp argument and one string argument. Arguments are '+t+" and "+i+".")},S.prototype._evaluateRegExpExec=function(e){var t=this._left.evaluate(e),i=this._right.evaluate(e);if(!(t instanceof RegExp&&"string"==typeof i))throw new c.a("RegExp.exec requires the first argument to be a RegExp and the second argument to be a string. Arguments are "+t+" and "+i+".");var n=t.exec(i);return Object(l.default)(n)?n[1]:null},S.prototype._evaluateToString=function(e){var t=this._left.evaluate(e);if(t instanceof RegExp||t instanceof n.default||t instanceof a.default||t instanceof r.a)return String(t);throw new c.a('Unexpected function call "'+this._value+'".')},p.NULL_SENTINEL="czm_infinity",S.prototype.getShaderExpression=function(e,t,i){var n,a,r,o,d=this._type,f=this._value;switch(Object(l.default)(this._left)&&(a=Array.isArray(this._left)?U(this._left,e,t,this):this._left.getShaderExpression(e,t,this)),Object(l.default)(this._right)&&(r=this._right.getShaderExpression(e,t,this)),Object(l.default)(this._test)&&(o=this._test.getShaderExpression(e,t,this)),Array.isArray(this._value)&&(f=U(this._value,e,t,this)),d){case h.a.VARIABLE:if(N(this))return;return V(f,e);case h.a.UNARY:if("Boolean"===f)return"bool("+a+")";if("Number"===f)return"float("+a+")";if("round"===f)return"floor("+a+" + 0.5)";if(Object(l.default)(O[f]))return f+"("+a+")";if("isNaN"===f)return"("+a+" != "+a+")";if("isFinite"===f)return"(abs("+a+") < czm_infinity)";if("String"===f||"isExactClass"===f||"isClass"===f||"getExactClassName"===f)throw new c.a('Error generating style shader: "'+f+'" is not supported.');return f+a;case h.a.BINARY:return"%"===f?"mod("+a+", "+r+")":"==="===f?"("+a+" == "+r+")":"!=="===f?"("+a+" != "+r+")":"atan2"===f?"atan("+a+", "+r+")":Object(l.default)(x[f])?f+"("+a+", "+r+")":"("+a+" "+f+" "+r+")";case h.a.TERNARY:if(Object(l.default)(A[f]))return f+"("+a+", "+r+", "+o+")";break;case h.a.CONDITIONAL:return"("+o+" ? "+a+" : "+r+")";case h.a.MEMBER:return N(this._left)?V(r,e):"r"===r||"x"===r||"0.0"===r?a+"[0]":"g"===r||"y"===r||"1.0"===r?a+"[1]":"b"===r||"z"===r||"2.0"===r?a+"[2]":"a"===r||"w"===r||"3.0"===r?a+"[3]":a+"[int("+r+")]";case h.a.FUNCTION_CALL:throw new c.a('Error generating style shader: "'+f+'" is not supported.');case h.a.ARRAY:if(4===f.length)return"vec4("+f[0]+", "+f[1]+", "+f[2]+", "+f[3]+")";if(3===f.length)return"vec3("+f[0]+", "+f[1]+", "+f[2]+")";if(2===f.length)return"vec2("+f[0]+", "+f[1]+")";throw new c.a("Error generating style shader: Invalid array length. Array length should be 2, 3, or 4.");case h.a.REGEX:throw new c.a("Error generating style shader: Regular expressions are not supported.");case h.a.VARIABLE_IN_STRING:throw new c.a("Error generating style shader: Converting a variable to a string is not supported.");case h.a.LITERAL_NULL:return p.NULL_SENTINEL;case h.a.LITERAL_BOOLEAN:return f?"true":"false";case h.a.LITERAL_NUMBER:return k(f);case h.a.LITERAL_STRING:if(Object(l.default)(i)&&i._type===h.a.MEMBER&&("r"===f||"g"===f||"b"===f||"a"===f||"x"===f||"y"===f||"z"===f||"w"===f||N(i._left)))return f;if(n=s.default.fromCssColorString(f,w),Object(l.default)(n))return function(e){return"vec3("+k(e.red)+", "+k(e.green)+", "+k(e.blue)+")"}(n);throw new c.a("Error generating style shader: String literals are not supported.");case h.a.LITERAL_COLOR:var m=a;if("color"===f){if(!Object(l.default)(m))return"vec4(1.0)";if(m.length>1){var _=m[0],g=m[1];return"1.0"!==g&&(t.translucent=!0),"vec4("+_+", "+g+")"}return"vec4("+m[0]+", 1.0)"}if("rgb"===f)return n=F(this),Object(l.default)(n)?z(n):"vec4("+m[0]+" / 255.0, "+m[1]+" / 255.0, "+m[2]+" / 255.0, 1.0)";if("rgba"===f)return"1.0"!==m[3]&&(t.translucent=!0),n=F(this),Object(l.default)(n)?z(n):"vec4("+m[0]+" / 255.0, "+m[1]+" / 255.0, "+m[2]+" / 255.0, "+m[3]+")";if("hsl"===f)return n=B(this),Object(l.default)(n)?z(n):"vec4(czm_HSLToRGB(vec3("+m[0]+", "+m[1]+", "+m[2]+")), 1.0)";if("hsla"===f)return n=B(this),Object(l.default)(n)?(1!==n.alpha&&(t.translucent=!0),z(n)):("1.0"!==m[3]&&(t.translucent=!0),"vec4(czm_HSLToRGB(vec3("+m[0]+", "+m[1]+", "+m[2]+")), "+m[3]+")");break;case h.a.LITERAL_VECTOR:if(!Object(l.default)(a))throw new u.default("left should always be defined for type ExpressionNodeType.LITERAL_VECTOR");for(var v=a.length,y=f+"(",b=0;b=0&&(h=w)}return h!==Number.MAX_VALUE?c.default.getPoint(e,h,a):void 0}},P.prototype.freeResources=function(){Object(s.default)(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0),this.terrainData=void 0,this.terrainState=D.a.UNLOADED,this.mesh=void 0,this.fill=this.fill&&this.fill.destroy();for(var e=this.imagery,t=0,i=e.length;t=D.a.RECEIVED&&void 0===l.waterMaskTexture&&i.hasWaterMask){if(void 0!==l.terrainData.waterMask)!function(e,t){var i,n=t.terrainData.waterMask,a=function(e){var t=e.cache.tile_waterMaskData;if(!Object(s.default)(t)){var i=w.default.create({context:e,pixelFormat:d.default.LUMINANCE,pixelDatatype:y.default.UNSIGNED_BYTE,source:{arrayBufferView:new Uint8Array([255]),width:1,height:1}});i.referenceCount=1;var n=new b.default({wrapS:A.default.CLAMP_TO_EDGE,wrapT:A.default.CLAMP_TO_EDGE,minificationFilter:x.default.LINEAR,magnificationFilter:O.default.LINEAR});t={allWaterTexture:i,sampler:n,destroy:function(){this.allWaterTexture.destroy()}},e.cache.tile_waterMaskData=t}return t}(e),o=n.length;if(1===o){if(0===n[0])return;i=a.allWaterTexture}else{var l=Math.sqrt(o);(i=w.default.create({context:e,pixelFormat:d.default.LUMINANCE,pixelDatatype:y.default.UNSIGNED_BYTE,source:{width:l,height:l,arrayBufferView:n},sampler:a.sampler,flipY:!1})).referenceCount=0}++i.referenceCount,t.waterMaskTexture=i,r.a.fromElements(0,0,1,1,t.waterMaskTranslationAndScale)}(t.context,l);else{var c=l._findAncestorTileWithTerrainData(e);Object(s.default)(c)&&Object(s.default)(c.data.waterMaskTexture)&&(l.waterMaskTexture=c.data.waterMaskTexture,++l.waterMaskTexture.referenceCount,l._computeWaterMaskTranslationAndScale(e,c,l.waterMaskTranslationAndScale))}}}(e,t,i,n,a,o),!l){var c=e.renderable;e.renderable=Object(s.default)(u.vertexArray);var m=u.terrainState===D.a.READY;e.upsampledFromParent=Object(s.default)(u.terrainData)&&u.terrainData.wasCreatedByUpsampling();var g=u.processImagery(e,i,t);if(m&&g){var v=e._loadedCallbacks,T={};for(var C in v)v.hasOwnProperty(C)&&(v[C](e)||(T[C]=v[C]));e._loadedCallbacks=T,e.state=S.a.DONE}c&&(e.renderable=!0)}},P.prototype.processImagery=function(e,t,i,n){var a,r,o=e.data,l=e.upsampledFromParent,u=!1,d=!0,c=o.imagery;for(a=0,r=c.length;a=0;i--){var n=e[i];if(n.remove(t))return 0===n.updaters.length&&(e.splice(i,1),n.destroy()),!0}return!1}function T(e,t,i){for(var n=!1,a=t.length,r=0;r0)for(r=0;r=0;a--){var o=t[a];if(o.invalidated){t.splice(a,1);for(var s=o.updaters.values,l=s.length,u=0;u0){var A;Object(s.default)(h)&&(Object(s.default)(this.oldPrimitive)?O.remove(h):this.oldPrimitive=h),Object(s.default)(this.depthFailAppearanceType)&&(Object(s.default)(this.depthFailMaterialProperty)&&(this.depthFailMaterial=m.default.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial)),A=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.translucent,closed:this.closed})),h=new f.default({show:!1,asynchronous:!0,geometryInstances:x.slice(),appearance:new this.appearanceType({translucent:this.translucent,closed:this.closed}),depthFailAppearance:A,shadows:this.shadows}),O.add(h),i=!1}else{Object(s.default)(h)&&(O.remove(h),h=void 0);var T=this.oldPrimitive;Object(s.default)(T)&&(O.remove(T),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=h,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(Object(s.default)(h)&&h.ready){h.show=!0,Object(s.default)(this.oldPrimitive)&&(O.remove(this.oldPrimitive),this.oldPrimitive=void 0),!Object(s.default)(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof p.a||(this.depthFailMaterial=m.default.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var E=this.updatersWithAttributes.values,C=E.length,S=this.waitingOnCreate;for(t=0;t0){var x;Object(s.default)(n)&&(Object(s.default)(this.oldPrimitive)?h.remove(n):this.oldPrimitive=n),this.material=m.default.getValue(e,this.materialProperty,this.material),Object(s.default)(this.depthFailMaterialProperty)&&(this.depthFailMaterial=m.default.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),x=new this.depthFailAppearanceType({material:this.depthFailMaterial,translucent:this.depthFailMaterial.isTranslucent(),closed:this.closed})),n=new f.default({show:!1,asynchronous:!0,geometryInstances:w.slice(),appearance:new this.appearanceType({material:this.material,translucent:this.material.isTranslucent(),closed:this.closed}),depthFailAppearance:x,shadows:this.shadows}),h.add(n),i=!1}else{Object(s.default)(n)&&(h.remove(n),n=void 0);var A=this.oldPrimitive;Object(s.default)(A)&&(h.remove(A),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(Object(s.default)(n)&&n.ready){n.show=!0,Object(s.default)(this.oldPrimitive)&&(h.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=m.default.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material,!Object(s.default)(this.depthFailAppearanceType)||this.depthFailMaterialProperty instanceof p.a||(this.depthFailMaterial=m.default.getValue(e,this.depthFailMaterialProperty,this.depthFailMaterial),this.primitive.depthFailAppearance.material=this.depthFailMaterial);var T=this.updatersWithAttributes.values,E=T.length;for(t=0;t=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},x.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var a=n.updaters.values,r=a.length,o=0;o2&&(this._actualPositions===this._positions&&(this._actualPositions=u.slice()),this._actualPositions.push(r.default.clone(this._actualPositions[0]))),this._length=this._actualPositions.length,this._id=e.id,Object(l.default)(t)&&(i=c.default.clone(t.modelMatrix)),this._modelMatrix=i,this._segments=f.a.wrapLongitude(this._actualPositions,i),this._actualLength=void 0,this._propertiesChanged=new Uint32Array(w),this._polylineCollection=t,this._dirty=!1,this._pickId=void 0,this._boundingVolume=a.default.fromPoints(this._actualPositions),this._boundingVolumeWC=a.default.transform(this._boundingVolume,this._modelMatrix),this._boundingVolume2D=new a.default}var m=p.POSITION_INDEX=0,_=p.SHOW_INDEX=1,g=p.WIDTH_INDEX=2,v=p.MATERIAL_INDEX=3,y=p.POSITION_SIZE_INDEX=4,b=p.DISTANCE_DISPLAY_CONDITION=5,w=p.NUMBER_OF_PROPERTIES=6;function O(e,t){++e._propertiesChanged[t];var i=e._polylineCollection;Object(l.default)(i)&&(i._updatePolyline(e,t),e._dirty=!0)}Object.defineProperties(p.prototype,{show:{get:function(){return this._show},set:function(e){if(!Object(l.default)(e))throw new u.default("value is required.");e!==this._show&&(this._show=e,O(this,_))}},positions:{get:function(){return this._positions},set:function(e){if(!Object(l.default)(e))throw new u.default("value is required.");var t=Object(n.a)(e,r.default.equalsEpsilon);this._loop&&t.length>2&&(t===e&&(t=e.slice()),t.push(r.default.clone(t[0]))),this._actualPositions.length===t.length&&this._actualPositions.length===this._length||O(this,y),this._positions=e,this._actualPositions=t,this._length=t.length,this._boundingVolume=a.default.fromPoints(this._actualPositions,this._boundingVolume),this._boundingVolumeWC=a.default.transform(this._boundingVolume,this._modelMatrix,this._boundingVolumeWC),O(this,m),this.update()}},material:{get:function(){return this._material},set:function(e){if(!Object(l.default)(e))throw new u.default("material is required.");this._material!==e&&(this._material=e,O(this,v))}},width:{get:function(){return this._width},set:function(e){if(!Object(l.default)(e))throw new u.default("value is required.");e!==this._width&&(this._width=e,O(this,g))}},loop:{get:function(){return this._loop},set:function(e){if(!Object(l.default)(e))throw new u.default("value is required.");if(e!==this._loop){var t=this._actualPositions;e?t.length>2&&!r.default.equals(t[0],t[t.length-1])&&(t.length===this._positions.length&&(this._actualPositions=t=this._positions.slice()),t.push(r.default.clone(t[0]))):t.length>2&&r.default.equals(t[0],t[t.length-1])&&(t.length-1===this._positions.length?this._actualPositions=this._positions:t.pop()),this._loop=e,O(this,y)}}},id:{get:function(){return this._id},set:function(e){this._id=e,Object(l.default)(this._pickId)&&(this._pickId.object.id=e)}},pickId:{get:function(){return this._pickId}},isDestroyed:{get:function(){return!Object(l.default)(this._polylineCollection)}},distanceDisplayCondition:{get:function(){return this._distanceDisplayCondition},set:function(e){if(Object(l.default)(e)&&e.far<=e.near)throw new u.default("far distance must be greater than near distance.");d.default.equals(e,this._distanceDisplayCondition)||(this._distanceDisplayCondition=d.default.clone(e,this._distanceDisplayCondition),O(this,b))}}}),p.prototype.update=function(){var e=c.default.IDENTITY;Object(l.default)(this._polylineCollection)&&(e=this._polylineCollection.modelMatrix);var t=this._segments.positions.length,i=this._segments.lengths,n=this._propertiesChanged[m]>0||this._propertiesChanged[y]>0;if(c.default.equals(e,this._modelMatrix)&&!n||(this._segments=f.a.wrapLongitude(this._actualPositions,e),this._boundingVolumeWC=a.default.transform(this._boundingVolume,e,this._boundingVolumeWC)),this._modelMatrix=c.default.clone(e,this._modelMatrix),this._segments.positions.length!==t)O(this,y);else for(var r=i.length,o=0;o 0.0) \n { \n color = edge"+r+"; \n break; \n } \n",i["edgeTexture"+r]=e[r].name;var s=n+"varying vec2 v_textureCoordinates; \nvoid main() { \n vec4 color = vec4(0.0); \n for (int i = 0; i < "+e.length+"; i++) \n { \n"+a+" } \n gl_FragColor = color; \n} \n",l=new S.a({name:"czm_edge_detection_combine",fragmentShader:s,uniforms:i});return new M.a({name:"czm_edge_detection_composite",stages:[t,l]})}(e),i=new S.a({name:"czm_silhouette_color_edges",fragmentShader:T.a,uniforms:{silhouetteTexture:t.name}});return new M.a({name:"czm_silhouette",stages:[t,i],inputPreviousStageTexture:!1,uniforms:t.uniforms})},P.isSilhouetteSupported=function(e){return e.context.depthTexture},P.createBloomStage=function(){var e=new S.a({name:"czm_bloom_contrast_bias",fragmentShader:p.a,uniforms:{contrast:128,brightness:-.3}}),t=I("czm_bloom_blur"),i=new M.a({name:"czm_bloom_contrast_bias_blur",stages:[e,t]}),n=new S.a({name:"czm_bloom_generate_composite",fragmentShader:f.a,uniforms:{glowOnly:!1,bloomTexture:i.name}}),a={};return Object.defineProperties(a,{glowOnly:{get:function(){return n.uniforms.glowOnly},set:function(e){n.uniforms.glowOnly=e}},contrast:{get:function(){return e.uniforms.contrast},set:function(t){e.uniforms.contrast=t}},brightness:{get:function(){return e.uniforms.brightness},set:function(t){e.uniforms.brightness=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},stepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}}}),new M.a({name:"czm_bloom",stages:[i,n],inputPreviousStageTexture:!1,uniforms:a})},P.createAmbientOcclusionStage=function(){var e=new S.a({name:"czm_ambient_occlusion_generate",fragmentShader:u.a,uniforms:{intensity:3,bias:.1,lengthCap:.26,stepSize:1.95,frustumLength:1e3,randomTexture:void 0}}),t=I("czm_ambient_occlusion_blur");t.uniforms.stepSize=.86;var i=new M.a({name:"czm_ambient_occlusion_generate_blur",stages:[e,t]}),n=new S.a({name:"czm_ambient_occlusion_composite",fragmentShader:d.a,uniforms:{ambientOcclusionOnly:!1,ambientOcclusionTexture:i.name}}),a={};return Object.defineProperties(a,{intensity:{get:function(){return e.uniforms.intensity},set:function(t){e.uniforms.intensity=t}},bias:{get:function(){return e.uniforms.bias},set:function(t){e.uniforms.bias=t}},lengthCap:{get:function(){return e.uniforms.lengthCap},set:function(t){e.uniforms.lengthCap=t}},stepSize:{get:function(){return e.uniforms.stepSize},set:function(t){e.uniforms.stepSize=t}},frustumLength:{get:function(){return e.uniforms.frustumLength},set:function(t){e.uniforms.frustumLength=t}},randomTexture:{get:function(){return e.uniforms.randomTexture},set:function(t){e.uniforms.randomTexture=t}},delta:{get:function(){return t.uniforms.delta},set:function(e){t.uniforms.delta=e}},sigma:{get:function(){return t.uniforms.sigma},set:function(e){t.uniforms.sigma=e}},blurStepSize:{get:function(){return t.uniforms.stepSize},set:function(e){t.uniforms.stepSize=e}},ambientOcclusionOnly:{get:function(){return n.uniforms.ambientOcclusionOnly},set:function(e){n.uniforms.ambientOcclusionOnly=e}}}),new M.a({name:"czm_ambient_occlusion",stages:[i,n],inputPreviousStageTexture:!1,uniforms:a})},P.isAmbientOcclusionSupported=function(e){return e.context.depthTexture};var L="#define FXAA_QUALITY_PRESET 39 \n"+E.a+"\n"+y.a;P.createFXAAStage=function(){return new S.a({name:"czm_FXAA",fragmentShader:L,sampleMode:D.a.LINEAR})},P.createAcesTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return t+=l.a,new S.a({name:"czm_aces",fragmentShader:t,uniforms:{autoExposure:void 0}})},P.createFilmicTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return t+=v.a,new S.a({name:"czm_filmic",fragmentShader:t,uniforms:{autoExposure:void 0}})},P.createReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return t+=A.a,new S.a({name:"czm_reinhard",fragmentShader:t,uniforms:{autoExposure:void 0}})},P.createModifiedReinhardTonemappingStage=function(e){var t=e?"#define AUTO_EXPOSURE\n":"";return t+=O.a,new S.a({name:"czm_modified_reinhard",fragmentShader:t,uniforms:{white:a.default.WHITE,autoExposure:void 0}})},P.createAutoExposureStage=function(){return new C.a},P.createBlackAndWhiteStage=function(){return new S.a({name:"czm_black_and_white",fragmentShader:c.a,uniforms:{gradations:5}})},P.createBrightnessStage=function(){return new S.a({name:"czm_brightness",fragmentShader:h.a,uniforms:{brightness:.5}})},P.createNightVisionStage=function(){return new S.a({name:"czm_night_vision",fragmentShader:x.a})},P.createDepthViewStage=function(){return new S.a({name:"czm_depth_view",fragmentShader:_.a})},P.createLensFlareStage=function(){return new S.a({name:"czm_lens_flare",fragmentShader:w.a,uniforms:{dirtTexture:Object(n.a)("Assets/Textures/LensFlare/DirtMask.jpg"),starTexture:Object(n.a)("Assets/Textures/LensFlare/StarBurst.jpg"),intensity:2,distortion:10,ghostDispersal:.4,haloWidth:.4,dirtAmount:.4,earthRadius:s.default.WGS84.maximumRadius}})},t.a=P},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(5),s={packedLength:1,pack:function(e,t,i){if(!Object(a.default)(e))throw new r.default("value is required");if(!Object(a.default)(t))throw new r.default("array is required");return t[i=Object(n.default)(i,0)]=e,t},unpack:function(e,t,i){if(!Object(a.default)(e))throw new r.default("array is required");return e[t=Object(n.default)(t,0)]},convertPackedArrayForInterpolation:function(e,t,i,s){if(!Object(a.default)(e))throw new r.default("packedArray is required");var l;Object(a.default)(s)||(s=[]),t=Object(n.default)(t,0);for(var u=0,d=(i=Object(n.default)(i,e.length))-t+1;u=e.length-1)return e;for(var i=[e[0]],n=Math.floor((e.length-1)/(t-1)),a=1;aee.eastOverIDL-ee.westOverIDL&&(r.west=ee.westOverIDL,r.east=ee.eastOverIDL,r.east>A.default.PI&&(r.east=r.east-A.default.TWO_PI),r.west>A.default.PI&&(r.west=r.west-A.default.TWO_PI)),r}var ne=new u.default;function ae(e,t,i,n){for(var a=e.surfaceDistance,r=Math.ceil(a*t),o=r>0?a/(r-1):Number.POSITIVE_INFINITY,s=0,l=0;l=0?d:d+A.default.TWO_PI;n.westOverIDL=Math.min(n.westOverIDL,f),n.eastOverIDL=Math.max(n.eastOverIDL,f)}}var re=[];function oe(e,t,i,n,a,r,o,s,l){var u,d={walls:[]};if(r||o){var c,f,h=E.a.createGeometryFromPositions(e,t,i,a,s,l),p=h.attributes.position.values,m=h.indices;if(r&&o){var _=p.concat(p);c=_.length/3,(f=x.a.createTypedArray(c,2*m.length)).set(m);var v=m.length,y=c/2;for(u=0;u0?(o=d.pop(),l=r.get(o)):(l=r.add(),o=r.length-1),u[n]=o,this._clusterDirty=!0,l}}function L(e,t){var i=e._collectionIndicesByEntity[t];Object(s.default)(i.billboardIndex)||Object(s.default)(i.labelIndex)||Object(s.default)(i.pointIndex)||delete e._collectionIndicesByEntity[t]}function j(e){if(Object(s.default)(e))for(var t=e.length,i=0;i=U)for(E(Z.position,B,N,t),H.push(Z),x=0;x=U){var fe=r.default.multiplyByScalar(ue,1/B,ue);for(E(fe,B,N,t),H.push({position:fe,width:le.width,height:le.height,minimumWidth:I.width,minimumHeight:I.height}),x=0;x0&&0===this._labelCollection.get(0)._glyphs.length&&(t=e.commandList,e.commandList=[],this._labelCollection.update(e),e.commandList=t),Object(s.default)(this._billboardCollection)&&this._billboardCollection.length>0&&!Object(s.default)(this._billboardCollection.get(0).width)&&(t=e.commandList,e.commandList=[],this._billboardCollection.update(e),e.commandList=t),this._enabledDirty&&(this._enabledDirty=!1,(i=this).enabled||(Object(s.default)(i._clusterLabelCollection)&&i._clusterLabelCollection.destroy(),Object(s.default)(i._clusterBillboardCollection)&&i._clusterBillboardCollection.destroy(),Object(s.default)(i._clusterPointCollection)&&i._clusterPointCollection.destroy(),i._clusterLabelCollection=void 0,i._clusterBillboardCollection=void 0,i._clusterPointCollection=void 0,j(i._labelCollection),j(i._billboardCollection),j(i._pointCollection)),this._clusterDirty=!0),this._clusterDirty&&(this._clusterDirty=!1,this._cluster()),Object(s.default)(this._clusterLabelCollection)&&this._clusterLabelCollection.update(e),Object(s.default)(this._clusterBillboardCollection)&&this._clusterBillboardCollection.update(e),Object(s.default)(this._clusterPointCollection)&&this._clusterPointCollection.update(e),Object(s.default)(this._labelCollection)&&this._labelCollection.update(e),Object(s.default)(this._billboardCollection)&&this._billboardCollection.update(e),Object(s.default)(this._pointCollection)&&this._pointCollection.update(e))},y.prototype.destroy=function(){this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._pointCollection=this._pointCollection&&this._pointCollection.destroy(),this._clusterLabelCollection=this._clusterLabelCollection&&this._clusterLabelCollection.destroy(),this._clusterBillboardCollection=this._clusterBillboardCollection&&this._clusterBillboardCollection.destroy(),this._clusterPointCollection=this._clusterPointCollection&&this._clusterPointCollection.destroy(),Object(s.default)(this._removeEventListener)&&(this._removeEventListener(),this._removeEventListener=void 0),this._labelCollection=void 0,this._billboardCollection=void 0,this._pointCollection=void 0,this._clusterBillboardCollection=void 0,this._clusterLabelCollection=void 0,this._clusterPointCollection=void 0,this._collectionIndicesByEntity=void 0,this._unusedLabelIndices=[],this._unusedBillboardIndices=[],this._unusedPointIndices=[],this._previousClusters=[],this._previousHeight=void 0,this._enabledDirty=!1,this._pixelRangeDirty=!1,this._minimumClusterSizeDirty=!1},t.a=y},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(206),l=i(109),u=i(152),d=i(20);function c(e){this._definitionChanged=new o.default,this._show=void 0,this._showSubscription=void 0,this._hierarchy=void 0,this._hierarchySubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._perPositionHeight=void 0,this._perPositionHeightSubscription=void 0,this._closeTop=void 0,this._closeTopSubscription=void 0,this._closeBottom=void 0,this._closeBottomSubscription=void 0,this._arcType=void 0,this._arcTypeSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(Object(n.default)(e,n.default.EMPTY_OBJECT))}Object.defineProperties(c.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Object(d.default)("show"),hierarchy:Object(d.default)("hierarchy",void 0,(function(e){return Array.isArray(e)&&(e=new s.default(e)),new l.default(e)})),height:Object(d.default)("height"),heightReference:Object(d.default)("heightReference"),extrudedHeight:Object(d.default)("extrudedHeight"),extrudedHeightReference:Object(d.default)("extrudedHeightReference"),stRotation:Object(d.default)("stRotation"),granularity:Object(d.default)("granularity"),fill:Object(d.default)("fill"),material:Object(u.default)("material"),outline:Object(d.default)("outline"),outlineColor:Object(d.default)("outlineColor"),outlineWidth:Object(d.default)("outlineWidth"),perPositionHeight:Object(d.default)("perPositionHeight"),closeTop:Object(d.default)("closeTop"),closeBottom:Object(d.default)("closeBottom"),arcType:Object(d.default)("arcType"),shadows:Object(d.default)("shadows"),distanceDisplayCondition:Object(d.default)("distanceDisplayCondition"),classificationType:Object(d.default)("classificationType"),zIndex:Object(d.default)("zIndex")}),c.prototype.clone=function(e){return Object(a.default)(e)?(e.show=this.show,e.hierarchy=this.hierarchy,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.perPositionHeight=this.perPositionHeight,e.closeTop=this.closeTop,e.closeBottom=this.closeBottom,e.arcType=this.arcType,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new c(this)},c.prototype.merge=function(e){if(!Object(a.default)(e))throw new r.default("source is required.");this.show=Object(n.default)(this.show,e.show),this.hierarchy=Object(n.default)(this.hierarchy,e.hierarchy),this.height=Object(n.default)(this.height,e.height),this.heightReference=Object(n.default)(this.heightReference,e.heightReference),this.extrudedHeight=Object(n.default)(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=Object(n.default)(this.extrudedHeightReference,e.extrudedHeightReference),this.stRotation=Object(n.default)(this.stRotation,e.stRotation),this.granularity=Object(n.default)(this.granularity,e.granularity),this.fill=Object(n.default)(this.fill,e.fill),this.material=Object(n.default)(this.material,e.material),this.outline=Object(n.default)(this.outline,e.outline),this.outlineColor=Object(n.default)(this.outlineColor,e.outlineColor),this.outlineWidth=Object(n.default)(this.outlineWidth,e.outlineWidth),this.perPositionHeight=Object(n.default)(this.perPositionHeight,e.perPositionHeight),this.closeTop=Object(n.default)(this.closeTop,e.closeTop),this.closeBottom=Object(n.default)(this.closeBottom,e.closeBottom),this.arcType=Object(n.default)(this.arcType,e.arcType),this.shadows=Object(n.default)(this.shadows,e.shadows),this.distanceDisplayCondition=Object(n.default)(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=Object(n.default)(this.classificationType,e.classificationType),this.zIndex=Object(n.default)(this.zIndex,e.zIndex)},t.a=c},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(152),l=i(20);function u(e){this._definitionChanged=new o.default,this._show=void 0,this._showSubscription=void 0,this._coordinates=void 0,this._coordinatesSubscription=void 0,this._height=void 0,this._heightSubscription=void 0,this._heightReference=void 0,this._heightReferenceSubscription=void 0,this._extrudedHeight=void 0,this._extrudedHeightSubscription=void 0,this._extrudedHeightReference=void 0,this._extrudedHeightReferenceSubscription=void 0,this._rotation=void 0,this._rotationSubscription=void 0,this._stRotation=void 0,this._stRotationSubscription=void 0,this._granularity=void 0,this._granularitySubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distancedisplayConditionSubscription=void 0,this._classificationType=void 0,this._classificationTypeSubscription=void 0,this._zIndex=void 0,this._zIndexSubscription=void 0,this.merge(Object(n.default)(e,n.default.EMPTY_OBJECT))}Object.defineProperties(u.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Object(l.default)("show"),coordinates:Object(l.default)("coordinates"),height:Object(l.default)("height"),heightReference:Object(l.default)("heightReference"),extrudedHeight:Object(l.default)("extrudedHeight"),extrudedHeightReference:Object(l.default)("extrudedHeightReference"),rotation:Object(l.default)("rotation"),stRotation:Object(l.default)("stRotation"),granularity:Object(l.default)("granularity"),fill:Object(l.default)("fill"),material:Object(s.default)("material"),outline:Object(l.default)("outline"),outlineColor:Object(l.default)("outlineColor"),outlineWidth:Object(l.default)("outlineWidth"),shadows:Object(l.default)("shadows"),distanceDisplayCondition:Object(l.default)("distanceDisplayCondition"),classificationType:Object(l.default)("classificationType"),zIndex:Object(l.default)("zIndex")}),u.prototype.clone=function(e){return Object(a.default)(e)?(e.show=this.show,e.coordinates=this.coordinates,e.height=this.height,e.heightReference=this.heightReference,e.extrudedHeight=this.extrudedHeight,e.extrudedHeightReference=this.extrudedHeightReference,e.rotation=this.rotation,e.stRotation=this.stRotation,e.granularity=this.granularity,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e.classificationType=this.classificationType,e.zIndex=this.zIndex,e):new u(this)},u.prototype.merge=function(e){if(!Object(a.default)(e))throw new r.default("source is required.");this.show=Object(n.default)(this.show,e.show),this.coordinates=Object(n.default)(this.coordinates,e.coordinates),this.height=Object(n.default)(this.height,e.height),this.heightReference=Object(n.default)(this.heightReference,e.heightReference),this.extrudedHeight=Object(n.default)(this.extrudedHeight,e.extrudedHeight),this.extrudedHeightReference=Object(n.default)(this.extrudedHeightReference,e.extrudedHeightReference),this.rotation=Object(n.default)(this.rotation,e.rotation),this.stRotation=Object(n.default)(this.stRotation,e.stRotation),this.granularity=Object(n.default)(this.granularity,e.granularity),this.fill=Object(n.default)(this.fill,e.fill),this.material=Object(n.default)(this.material,e.material),this.outline=Object(n.default)(this.outline,e.outline),this.outlineColor=Object(n.default)(this.outlineColor,e.outlineColor),this.outlineWidth=Object(n.default)(this.outlineWidth,e.outlineWidth),this.shadows=Object(n.default)(this.shadows,e.shadows),this.distanceDisplayCondition=Object(n.default)(this.distanceDisplayCondition,e.distanceDisplayCondition),this.classificationType=Object(n.default)(this.classificationType,e.classificationType),this.zIndex=Object(n.default)(this.zIndex,e.zIndex)},t.a=u},function(e,t,i){"use strict";var n=i(194),a=i(163),r=i(2),o=i(0),s=i(3),l=i(24),u=i(127),d=i(14);function c(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).currentTime,i=e.startTime,c=e.stopTime;if(t=Object(o.default)(t)?d.default.clone(t):Object(o.default)(i)?d.default.clone(i):Object(o.default)(c)?d.default.addDays(c,-1,new d.default):d.default.now(),i=Object(o.default)(i)?d.default.clone(i):d.default.clone(t),c=Object(o.default)(c)?d.default.clone(c):d.default.addDays(i,1,new d.default),d.default.greaterThan(i,c))throw new s.default("startTime must come before stopTime.");this.startTime=i,this.stopTime=c,this.clockRange=Object(r.default)(e.clockRange,n.default.UNBOUNDED),this.canAnimate=Object(r.default)(e.canAnimate,!0),this.onTick=new l.default,this.onStop=new l.default,this._currentTime=void 0,this._multiplier=void 0,this._clockStep=void 0,this._shouldAnimate=void 0,this._lastSystemTime=Object(u.a)(),this.currentTime=t,this.multiplier=Object(r.default)(e.multiplier,1),this.shouldAnimate=Object(r.default)(e.shouldAnimate,!1),this.clockStep=Object(r.default)(e.clockStep,a.a.SYSTEM_CLOCK_MULTIPLIER)}Object.defineProperties(c.prototype,{currentTime:{get:function(){return this._currentTime},set:function(e){d.default.equals(this._currentTime,e)||(this._clockStep===a.a.SYSTEM_CLOCK&&(this._clockStep=a.a.SYSTEM_CLOCK_MULTIPLIER),this._currentTime=e)}},multiplier:{get:function(){return this._multiplier},set:function(e){this._multiplier!==e&&(this._clockStep===a.a.SYSTEM_CLOCK&&(this._clockStep=a.a.SYSTEM_CLOCK_MULTIPLIER),this._multiplier=e)}},clockStep:{get:function(){return this._clockStep},set:function(e){e===a.a.SYSTEM_CLOCK&&(this._multiplier=1,this._shouldAnimate=!0,this._currentTime=d.default.now()),this._clockStep=e}},shouldAnimate:{get:function(){return this._shouldAnimate},set:function(e){this._shouldAnimate!==e&&(this._clockStep===a.a.SYSTEM_CLOCK&&(this._clockStep=a.a.SYSTEM_CLOCK_MULTIPLIER),this._shouldAnimate=e)}}}),c.prototype.tick=function(){var e=Object(u.a)(),t=d.default.clone(this._currentTime);if(this.canAnimate&&this._shouldAnimate){var i=this._clockStep;if(i===a.a.SYSTEM_CLOCK)t=d.default.now(t);else{var r=this._multiplier;if(i===a.a.TICK_DEPENDENT)t=d.default.addSeconds(t,r,t);else{var o=e-this._lastSystemTime;t=d.default.addSeconds(t,r*(o/1e3),t)}var s=this.clockRange,l=this.startTime,c=this.stopTime;if(s===n.default.CLAMPED)d.default.lessThan(t,l)?t=d.default.clone(l,t):d.default.greaterThan(t,c)&&(t=d.default.clone(c,t),this.onStop.raiseEvent(this));else if(s===n.default.LOOP_STOP)for(d.default.lessThan(t,l)&&(t=d.default.clone(l,t));d.default.greaterThan(t,c);)t=d.default.addSeconds(l,d.default.secondsDifference(t,c),t),this.onStop.raiseEvent(this)}}return this._currentTime=t,this._lastSystemTime=e,this.onTick.raiseEvent(this),t},t.a=c},function(e,t,i){"use strict";var n=i(68),a=i(17),r=i(1),o=i(4),s=i(11),l=i(2),u=i(0),d=i(3),c=i(46),f=i(28),h=i(82),p=i(71),m=i(35),_=new r.default;function g(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).minimum,i=e.maximum;if(o.a.typeOf.object("min",t),o.a.typeOf.object("max",i),Object(u.default)(e.offsetAttribute)&&e.offsetAttribute===p.a.TOP)throw new d.default("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._min=r.default.clone(t),this._max=r.default.clone(i),this._offsetAttribute=e.offsetAttribute,this._workerName="createBoxOutlineGeometry"}g.fromDimensions=function(e){var t=(e=Object(l.default)(e,l.default.EMPTY_OBJECT)).dimensions;o.a.typeOf.object("dimensions",t),o.a.typeOf.number.greaterThanOrEquals("dimensions.x",t.x,0),o.a.typeOf.number.greaterThanOrEquals("dimensions.y",t.y,0),o.a.typeOf.number.greaterThanOrEquals("dimensions.z",t.z,0);var i=r.default.multiplyByScalar(t,.5,new r.default);return new g({minimum:r.default.negate(i,new r.default),maximum:i,offsetAttribute:e.offsetAttribute})},g.fromAxisAlignedBoundingBox=function(e){return o.a.typeOf.object("boundindBox",e),new g({minimum:e.minimum,maximum:e.maximum})},g.packedLength=2*r.default.packedLength+1,g.pack=function(e,t,i){return o.a.typeOf.object("value",e),o.a.defined("array",t),i=Object(l.default)(i,0),r.default.pack(e._min,t,i),r.default.pack(e._max,t,i+r.default.packedLength),t[i+2*r.default.packedLength]=Object(l.default)(e._offsetAttribute,-1),t};var v=new r.default,y=new r.default,b={minimum:v,maximum:y,offsetAttribute:void 0};g.unpack=function(e,t,i){o.a.defined("array",e),t=Object(l.default)(t,0);var n=r.default.unpack(e,t,v),a=r.default.unpack(e,t+r.default.packedLength,y),s=e[t+2*r.default.packedLength];return Object(u.default)(i)?(i._min=r.default.clone(n,i._min),i._max=r.default.clone(a,i._max),i._offsetAttribute=-1===s?void 0:s,i):(b.offsetAttribute=-1===s?void 0:s,new g(b))},g.createGeometry=function(e){var t=e._min,i=e._max;if(!r.default.equals(t,i)){var o=new h.a,l=new Uint16Array(24),d=new Float64Array(24);d[0]=t.x,d[1]=t.y,d[2]=t.z,d[3]=i.x,d[4]=t.y,d[5]=t.z,d[6]=i.x,d[7]=i.y,d[8]=t.z,d[9]=t.x,d[10]=i.y,d[11]=t.z,d[12]=t.x,d[13]=t.y,d[14]=i.z,d[15]=i.x,d[16]=t.y,d[17]=i.z,d[18]=i.x,d[19]=i.y,d[20]=i.z,d[21]=t.x,d[22]=i.y,d[23]=i.z,o.position=new f.default({componentDatatype:s.default.DOUBLE,componentsPerAttribute:3,values:d}),l[0]=4,l[1]=5,l[2]=5,l[3]=6,l[4]=6,l[5]=7,l[6]=7,l[7]=4,l[8]=0,l[9]=1,l[10]=1,l[11]=2,l[12]=2,l[13]=3,l[14]=3,l[15]=0,l[16]=0,l[17]=4,l[18]=1,l[19]=5,l[20]=2,l[21]=6,l[22]=3,l[23]=7;var g=r.default.subtract(i,t,_),v=.5*r.default.magnitude(g);if(Object(u.default)(e._offsetAttribute)){var y=d.length,b=new Uint8Array(y/3),w=e._offsetAttribute===p.a.NONE?0:1;Object(n.a)(b,w),o.applyOffset=new f.default({componentDatatype:s.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:b})}return new c.default({attributes:o,indices:l,primitiveType:m.default.LINES,boundingSphere:new a.default(r.default.ZERO,v),offsetAttribute:e._offsetAttribute})}},t.a=g},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(24);function o(e,t){this._callback=void 0,this._isConstant=void 0,this._definitionChanged=new r.default,this.setCallback(e,t)}Object.defineProperties(o.prototype,{isConstant:{get:function(){return this._isConstant}},definitionChanged:{get:function(){return this._definitionChanged}}}),o.prototype.getValue=function(e,t){return this._callback(e,t)},o.prototype.setCallback=function(e,t){if(!Object(n.default)(e))throw new a.default("callback is required.");if(!Object(n.default)(t))throw new a.default("isConstant is required.");var i=this._callback!==e||this._isConstant!==t;this._callback=e,this._isConstant=t,i&&this._definitionChanged.raiseEvent(this)},o.prototype.equals=function(e){return this===e||e instanceof o&&this._callback===e._callback&&this._isConstant===e._isConstant},t.a=o},function(e,t,i){"use strict";var n=i(144),a=i(0);t.a=function(e,t){let i=e.extensionsUsed;Object(a.default)(i)||(i=[],e.extensionsUsed=i),Object(n.a)(i,t,!0)}},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(139),s=i(879),l=i(94);function u(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).count;n.a.typeOf.number.greaterThan("options.count",t,0);var i={};if(Object(r.default)(e.properties))for(var o in e.properties)e.properties.hasOwnProperty(o)&&(i[o]=new s.a({count:t,property:e.properties[o],classProperty:e.class.properties[o],bufferViews:e.bufferViews}));this._count=t,this._class=e.class,this._properties=i}Object.defineProperties(u.prototype,{count:{get:function(){return this._count}},class:{get:function(){return this._class}}}),u.prototype.hasProperty=function(e){return o.a.hasProperty(e,this._properties,this._class)},u.prototype.hasPropertyBySemantic=function(e){return o.a.hasPropertyBySemantic(e,this._properties,this._class)},u.prototype.getPropertyIds=function(e){return o.a.getPropertyIds(this._properties,this._class,e)},u.prototype.getProperty=function(e,t){n.a.typeOf.string("propertyId",t);var i=this._properties[t];return Object(r.default)(i)?i.get(e):function(e,t){if(Object(r.default)(e)){var i=e.properties[t];if(Object(r.default)(i)&&Object(r.default)(i.default)){var n=i.default;return i.type===l.a.ARRAY&&(n=n.slice()),n=i.normalize(n),i.unpackVectorAndMatrixTypes(n)}}}(this._class,t)},u.prototype.setProperty=function(e,t,i){n.a.typeOf.string("propertyId",t);var a=this._properties[t];return!!Object(r.default)(a)&&(a.set(e,i),!0)},u.prototype.getPropertyBySemantic=function(e,t){if(n.a.typeOf.string("semantic",t),Object(r.default)(this._class)){var i=this._class.propertiesBySemantic[t];if(Object(r.default)(i))return this.getProperty(e,i.id)}},u.prototype.setPropertyBySemantic=function(e,t,i){if(n.a.typeOf.string("semantic",t),Object(r.default)(this._class)){var a=this._class.propertiesBySemantic[t];if(Object(r.default)(a))return this.setProperty(e,a.id,i)}return!1},u.prototype.getPropertyTypedArray=function(e){n.a.typeOf.string("propertyId",e);var t=this._properties[e];if(Object(r.default)(t))return t.getTypedArray()},u.prototype.getPropertyTypedArrayBySemantic=function(e){if(n.a.typeOf.string("semantic",e),Object(r.default)(this._class)){var t=this._class.propertiesBySemantic[e];if(Object(r.default)(t))return this.getPropertyTypedArray(t.id)}},t.a=u},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0);function o(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.typeOf.number("options.count",e.count),this._name=e.name,this._id=e.id,this._count=e.count,this._extras=e.extras,this._extensions=e.extensions,this._metadataTable=e.metadataTable,this._jsonMetadataTable=e.jsonMetadataTable,this._batchTableHierarchy=e.batchTableHierarchy}Object.defineProperties(o.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},count:{get:function(){return this._count}},class:{get:function(){if(Object(r.default)(this._metadataTable))return this._metadataTable.class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),o.prototype.hasProperty=function(e,t){return n.a.typeOf.number("index",e),n.a.typeOf.string("propertyId",t),!(!Object(r.default)(this._metadataTable)||!this._metadataTable.hasProperty(t))||(!(!Object(r.default)(this._jsonMetadataTable)||!this._jsonMetadataTable.hasProperty(t))||!(!Object(r.default)(this._batchTableHierarchy)||!this._batchTableHierarchy.hasProperty(e,t)))},o.prototype.hasPropertyBySemantic=function(e,t){return n.a.typeOf.number("index",e),n.a.typeOf.string("semantic",t),!!Object(r.default)(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(t)},o.prototype.propertyExists=function(e){return n.a.typeOf.string("propertyId",e),!(!Object(r.default)(this._metadataTable)||!this._metadataTable.hasProperty(e))||(!(!Object(r.default)(this._jsonMetadataTable)||!this._jsonMetadataTable.hasProperty(e))||!(!Object(r.default)(this._batchTableHierarchy)||!this._batchTableHierarchy.propertyExists(e)))},o.prototype.propertyExistsBySemantic=function(e){return n.a.typeOf.string("semantic",e),!!Object(r.default)(this._metadataTable)&&this._metadataTable.hasPropertyBySemantic(e)};var s=[];o.prototype.getPropertyIds=function(e,t){return(t=Object(r.default)(t)?t:[]).length=0,Object(r.default)(this._metadataTable)&&t.push.apply(t,this._metadataTable.getPropertyIds(s)),Object(r.default)(this._jsonMetadataTable)&&t.push.apply(t,this._jsonMetadataTable.getPropertyIds(s)),Object(r.default)(this._batchTableHierarchy)&&t.push.apply(t,this._batchTableHierarchy.getPropertyIds(e,s)),t},o.prototype.getProperty=function(e,t){var i;return Object(r.default)(this._metadataTable)&&(i=this._metadataTable.getProperty(e,t),Object(r.default)(i))||Object(r.default)(this._jsonMetadataTable)&&(i=this._jsonMetadataTable.getProperty(e,t),Object(r.default)(i))||Object(r.default)(this._batchTableHierarchy)&&(i=this._batchTableHierarchy.getProperty(e,t),Object(r.default)(i))?i:void 0},o.prototype.setProperty=function(e,t,i){return!(!Object(r.default)(this._metadataTable)||!this._metadataTable.setProperty(e,t,i))||(!(!Object(r.default)(this._jsonMetadataTable)||!this._jsonMetadataTable.setProperty(e,t,i))||Object(r.default)(this._batchTableHierarchy)&&this._batchTableHierarchy.setProperty(e,t,i))},o.prototype.getPropertyBySemantic=function(e,t){if(Object(r.default)(this._metadataTable))return this._metadataTable.getPropertyBySemantic(e,t)},o.prototype.setPropertyBySemantic=function(e,t,i){return!!Object(r.default)(this._metadataTable)&&this._metadataTable.setPropertyBySemantic(e,t,i)},o.prototype.getPropertyTypedArray=function(e){if(n.a.typeOf.string("propertyId",e),Object(r.default)(this._metadataTable))return this._metadataTable.getPropertyTypedArray(e)},o.prototype.getPropertyTypedArrayBySemantic=function(e){if(n.a.typeOf.string("semantic",e),Object(r.default)(this._metadataTable))return this._metadataTable.getPropertyTypedArrayBySemantic(e)},t.a=o},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0);function o(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.typeOf.object("options.schema",e.schema),this._schema=e.schema;var t=e.propertyTables;this._propertyTableCount=Object(r.default)(t)?t.length:0,this._propertyTables=t,this._propertyTextures=e.propertyTextures,this._statistics=e.statistics,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(o.prototype,{schema:{get:function(){return this._schema}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}},propertyTableCount:{get:function(){return this._propertyTableCount}},propertyTables:{get:function(){return this._propertyTables}}}),o.prototype.getPropertyTable=function(e){return n.a.typeOf.number("propertyTableId",e),this._propertyTables[e]},o.prototype.getPropertyTexture=function(e){return n.a.typeOf.number("propertyTextureId",e),this._propertyTextures[e]},t.a=o},function(e,t,i){"use strict";var n=i(115),a=i(18),r=i(4),o=i(75),s=i(2),l=i(0),u=i(317),d=i(30),c=i(23);function f(e,t){var i;r.a.defined("endpoint",e),r.a.defined("endpointResource",t);var a=e.externalType,o=Object(l.default)(a);if(o){if("3DTILES"!==a&&"STK_TERRAIN_SERVER"!==a)throw new c.a("Ion.createResource does not support external imagery assets; use IonImageryProvider instead.");i={url:e.options.url}}else i={url:e.url,retryAttempts:1,retryCallback:h};d.default.call(this,i),this._ionEndpoint=e,this._ionEndpointDomain=o?void 0:new n.a(e.url).authority(),this._ionEndpointResource=t,this._ionRoot=void 0,this._pendingPromise=void 0,this._credits=void 0,this._isExternal=o}function h(e,t){var i=Object(s.default)(e._ionRoot,e),n=i._ionEndpointResource,r="undefined"!=typeof Image;return Object(l.default)(t)&&(401===t.statusCode||r&&t.target instanceof Image)?(Object(l.default)(i._pendingPromise)||(i._pendingPromise=n.fetchJson().then((function(e){return i._ionEndpoint=e,e})).always((function(e){return i._pendingPromise=void 0,e}))),i._pendingPromise.then((function(t){return e._ionEndpoint=t,!0}))):a.a.resolve(!1)}Object(l.default)(Object.create)&&(f.prototype=Object.create(d.default.prototype),f.prototype.constructor=f),f.fromAssetId=function(e,t){var i=f._createEndpointResource(e,t);return i.fetchJson().then((function(e){return new f(e,i)}))},Object.defineProperties(f.prototype,{credits:{get:function(){return Object(l.default)(this._ionRoot)?this._ionRoot.credits:(Object(l.default)(this._credits)||(this._credits=f.getCreditsFromEndpoint(this._ionEndpoint,this._ionEndpointResource)),this._credits)}}}),f.getCreditsFromEndpoint=function(e,t){var i=e.attributions.map(o.a.getIonCredit),n=u.a.getDefaultTokenCredit(t.queryParameters.access_token);return Object(l.default)(n)&&i.push(o.a.clone(n)),i},f.prototype.clone=function(e){var t=Object(s.default)(this._ionRoot,this);return Object(l.default)(e)||(e=new f(t._ionEndpoint,t._ionEndpointResource)),(e=d.default.prototype.clone.call(this,e))._ionRoot=t,e._isExternal=this._isExternal,e},f.prototype.fetchImage=function(e){if(!this._isExternal){var t=e;e={preferBlob:!0},Object(l.default)(t)&&(e.flipY=t.flipY,e.preferImageBitmap=t.preferImageBitmap)}return d.default.prototype.fetchImage.call(this,e)},f.prototype._makeRequest=function(e){return this._isExternal||new n.a(this.url).authority()!==this._ionEndpointDomain||(Object(l.default)(e.headers)||(e.headers={}),e.headers.Authorization="Bearer "+this._ionEndpoint.accessToken),d.default.prototype._makeRequest.call(this,e)},f._createEndpointResource=function(e,t){r.a.defined("assetId",e),t=Object(s.default)(t,s.default.EMPTY_OBJECT);var i=Object(s.default)(t.server,u.a.defaultServer),n=Object(s.default)(t.accessToken,u.a.defaultAccessToken);i=d.default.createIfNeeded(i);var a={url:"v1/assets/"+e+"/endpoint"};return Object(l.default)(n)&&(a.queryParameters={access_token:n}),i.getDerivedResource(a)},t.a=f},function(e,t,i){"use strict";var n=i(3);function a(){n.default.throwInstantiationError()}Object.defineProperties(a.prototype,{credits:{get:n.default.throwInstantiationError},waterMask:{get:n.default.throwInstantiationError}}),a.prototype.interpolateHeight=n.default.throwInstantiationError,a.prototype.isChildAvailable=n.default.throwInstantiationError,a.prototype.createMesh=n.default.throwInstantiationError,a.prototype.upsample=n.default.throwInstantiationError,a.prototype.wasCreatedByUpsampling=n.default.throwInstantiationError,a.maximumAsynchronousTasks=5,t.a=a},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(16),o=i(22),s=i(131),l=i(218),u=i(5),d=i(12),c=i(6),f=i(130),h=i(27),p=i(52),m=i(70),_=[new a.default,new a.default],g=new a.default,v=new a.default,y=new a.default,b=new a.default,w=new a.default,O=new a.default,x=new a.default,A=new a.default,T=new a.default,E=new a.default,C=new a.default,S={},M=new o.default;function D(e,t,i,n){var r,o=e[0],s=e[1],l=a.default.angleBetween(o,s),u=Math.ceil(l/n),d=new Array(u);if(t===i){for(r=0;r=0?-d:d}(h=a.default.normalize(h,h),t,e,o);N=d.default.fromRotationZ(_,N),z.z=s,j=c.default.multiplyTransformation(j,c.default.fromRotationTranslation(N,z,R),j);var g=B;g[0]=u;for(var v=0;v0)for(var y=p?2:1,b=0;b=0};var K=new a.default,J=new a.default;S.computePositions=function(e,t,i,n,r){var o=n._ellipsoid,l=function(e,t){for(var i=new Array(e.length),n=0;n This application is using Cesium\'s default ion access token. Please assign Cesium.Ion.defaultAccessToken with an access token from your ion account before making any Cesium API calls. You can sign up for a free ion account at https://cesium.com.',!0)}return n}},t.a=l},function(e,t,i){"use strict";var n=i(0);function a(){this.name=void 0,this.description=void 0,this.position=void 0,this.data=void 0,this.imageryLayer=void 0}a.prototype.configureNameFromProperties=function(e){var t,i=10;for(var a in e)if(e.hasOwnProperty(a)&&e[a]){var r=a.toLowerCase();i>1&&"name"===r?(i=1,t=a):i>2&&"title"===r?(i=2,t=a):i>3&&/name/i.test(a)?(i=3,t=a):i>4&&/title/i.test(a)&&(i=4,t=a)}Object(n.default)(t)&&(this.name=e[t])},a.prototype.configureDescriptionFromProperties=function(e){this.description=function e(t){var i='';for(var a in t)if(t.hasOwnProperty(a)){var r=t[a];Object(n.default)(r)&&(i+="object"==typeof r?"":"")}return i+="
"+a+""+e(r)+"
"+a+""+r+"
"}(e)},t.a=a},function(e,t,i){"use strict";var n=i(1),a=i(11),r=i(0),o=i(19),s=i(38),l=i(215),u=i(33),d=i(57),c=i(36),f=i(284),h=i(224),p=i(32),m=i(67),_=i(34),g=i(45),v=i(104),y=i(781),b=i(782),w=i(783),O=i(18);function x(e){this._url=e,this._cubeMapBuffers=void 0,this._cubeMaps=void 0,this._texture=void 0,this._mipTextures=void 0,this._va=void 0,this._sp=void 0,this._maximumMipmapLevel=void 0,this._loading=!1,this._ready=!1,this._readyPromise=O.a.defer()}Object.defineProperties(x.prototype,{url:{get:function(){return this._url}},texture:{get:function(){return this._texture}},maximumMipmapLevel:{get:function(){return this._maximumMipmapLevel}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}}}),x.isSupported=function(e){return e.colorBufferHalfFloat&&e.halfFloatingPointTexture||e.floatingPointTexture&&e.colorBufferFloat};for(var A=new n.default(1,0,0),T=new n.default(0,0,1),E=new n.default(-1,0,0),C=new n.default(0,0,-1),S=new n.default(0,1,0),M=[S,E,T,new n.default(0,-1,0),A,S,C,S,S],D=M.length,P=new Float32Array(3*D),I=0,L=0;L2&&(this.surfaceEdge=new O.default({geometryInstances:new c.default({id:this.id+"_surfaceEdge",geometry:p.default.fromPositions({positions:this.edgeVertices,vertexFormat:this._surfaceEdgeMaterial instanceof l.default?b.default.VERTEX_FORMAT:g.default.VERTEX_FORMAT}),attributes:this._surfaceEdgeMaterial instanceof l.default?{color:u.default.fromColor(this._surfaceEdgeMaterial)}:void 0}),appearance:this._surfaceEdgeMaterial instanceof l.default?new b.default({flat:!0,renderState:{depthTest:!1}}):new g.default({material:this._surfaceEdgeMaterial}),asynchronous:!1,show:this.show&&this.showSurfaceEdge}),(null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode)===x.default.SCENE2D&&this.edgeVertices.push(this.edgeVertices[1]),this.surfaceEdgeOutline=new O.default({geometryInstances:new c.default({id:this.id+"_surfaceEdgeOutline",geometry:new m.default({positions:this.edgeVertices,vertexFormat:w.default.VERTEX_FORMAT,width:this.surfaceEdgeOutlineWidth}),attributes:{color:u.default.fromColor(this._surfaceEdgeOutlineMaterial)}}),appearance:new w.default,asynchronous:!1,show:this.show&&this.showSurfaceEdgeOutline}))},t.prototype.updateMatrix=function(e){this.processWorldMatrix(e);var t=this.getViewer();if(this.primitive)if((null==t?void 0:t.sceneMode)===x.default.SCENE3D)this.primitive.modelMatrix=this.worldMatrix;else if((null==t?void 0:t.sceneMode)===x.default.COLUMBUS_VIEW){var i=this.getLODSceneLayer().models;this.primitive.ready&&(i.remove(this.primitive),i.remove(this.outlinePrimitive),this.createPrimitive(e),this.addPrimitive())}this.outlinePrimitive&&(null==t?void 0:t.sceneMode)===x.default.SCENE3D&&(this.outlinePrimitive.modelMatrix=this.worldMatrix)},t.prototype.processWorldMatrix=function(e){switch(this.geometryPointingAxis){case o.POSITIVE_Z:f.default.fromRotationX(Math.PI,M),h.default.fromRotationTranslation(M,s.default.ZERO,S),h.default.multiply(S,this.worldMatrix,this.worldMatrix)}switch(this.rotationFrame){case A.default.GLOBAL:h.default.fromTranslation(h.default.getTranslation(e,C),S),h.default.multiply(S,this.worldMatrix,this.worldMatrix);break;case A.default.LOCAL:h.default.multiply(e,this.worldMatrix,this.worldMatrix);break;case A.default.ENU:h.default.getTranslation(e,C),_.default.eastNorthUpToFixedFrame(C,void 0,S),h.default.multiply(S,this.worldMatrix,this.worldMatrix)}},t.prototype.updateEllipsoidSurfaceEdge=function(){},t.prototype.addSurfaceEdge=function(){var e=this.getLODSceneLayer();e instanceof T.default&&(this.enableSurfaceEdge||e.parent.sceneMode===x.default.SCENE2D)&&(this.surfaceEdge&&e.surfaceEdges.add(this.surfaceEdge),this.surfaceEdgeOutline&&e.surfaceEdges.add(this.surfaceEdgeOutline))},t.prototype.removeSurfaceEdge=function(){var e=this.getLODSceneLayer();e&&(this.surfaceEdge&&(e.surfaceEdges.remove(this.surfaceEdge),this.surfaceEdge=null),this.surfaceEdgeOutline&&(e.surfaceEdges.remove(this.surfaceEdgeOutline),this.surfaceEdgeOutline=null))},t}(E.default);t.default=P},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(29),o=i(690),s=i(691),l=i(142),u=i(69);function d(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT);var t=Object(n.default)(e.translucent,!0),i=Object(n.default)(e.aboveGround,!1);this.material=Object(a.default)(e.material)?e.material:u.default.fromType(u.default.ColorType),this.translucent=Object(n.default)(e.translucent,!0),this._vertexShaderSource=Object(n.default)(e.vertexShaderSource,s.a),this._fragmentShaderSource=Object(n.default)(e.fragmentShaderSource,o.a),this._renderState=l.a.getDefaultRenderState(t,!i,e.renderState),this._closed=!1,this._flat=Object(n.default)(e.flat,!1),this._faceForward=Object(n.default)(e.faceForward,i),this._aboveGround=i}Object.defineProperties(d.prototype,{vertexShaderSource:{get:function(){return this._vertexShaderSource}},fragmentShaderSource:{get:function(){return this._fragmentShaderSource}},renderState:{get:function(){return this._renderState}},closed:{get:function(){return this._closed}},vertexFormat:{get:function(){return d.VERTEX_FORMAT}},flat:{get:function(){return this._flat}},faceForward:{get:function(){return this._faceForward}},aboveGround:{get:function(){return this._aboveGround}}}),d.VERTEX_FORMAT=r.a.POSITION_AND_ST,d.prototype.getFragmentShaderSource=l.a.prototype.getFragmentShaderSource,d.prototype.isTranslucent=l.a.prototype.isTranslucent,d.prototype.getRenderState=l.a.prototype.getRenderState,t.default=d},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.LOCAL=0]="LOCAL",e[e.ENU=1]="ENU",e[e.GLOBAL=2]="GLOBAL"}(n||(n={})),t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(8),a=i(1),r=i(27),o=i(996),s=i(198),l=i(52),u=i(12),d=i(0),c=i(3),f=i(5),h=new a.default,p=function(){function e(){}return e.simplifySamples=function(e,t,i){return void 0===t&&(t=1),void 0===i&&(i=!1),o.default(e,t,i)},e.getCirclePositions=function(e,t,i,a){void 0===t&&(t=36),void 0===i&&(i=0),void 0===a&&(a=2*Math.PI);for(var r=[],o=(a-i)/t,s=i;s<=a;s+=o)r.push(new n.default(Math.cos(s)*e,Math.sin(s)*e));return r},e.calculateQuaternionFromV1ToV2=function(e,t,i){var n=a.default.cross(e,t,h);return i.x=n.x,i.y=n.y,i.z=n.z,i.w=Math.sqrt(a.default.magnitudeSquared(e)*a.default.magnitudeSquared(t))+a.default.dot(e,t),r.default.normalize(i,i),i},e.calculateQuaternion=function(e,t,i,n){if(void 0===i&&(i=!1),void 0===n&&(n=[0,0,0]),!d.default(e))throw new c.default("position is required.");if(i&&!d.default(t))throw new c.default("time is required.");var o=n,h=new s.default(f.default.toRadians(o[0]),f.default.toRadians(o[1]),f.default.toRadians(o[2])),p=new a.default;if(i){var m=l.default.computeIcrfToFixedMatrix(t);d.default(m)&&(p=u.default.multiplyByVector(m,e,p))}else p=a.default.clone(e);new r.default;return l.default.headingPitchRollQuaternion(p,h)},e}();t.default=p},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i1){o&&(a=Math.max(a,e(i,i._nw,n))),s&&(a=Math.max(a,e(i,i._ne,n))),l&&(a=Math.max(a,e(i,i._sw,n))),u&&(a=Math.max(a,e(i,i._se,n)));break}o?i=i._nw:s?i=i._ne:l?i=i._sw:u?i=i._se:r=!0}for(;i!==t;){for(var d=i.rectangles,c=d.length-1;c>=0&&d[c].level>a;--c){var f=d[c];F(f,n)&&(a=f.level)}i=i.parent}return a}(void 0,t,e):-1};var C=[],S=[],M=new m.default,D=new m.default;A.prototype.computeBestAvailableLevelOverRectangle=function(e){var t=C;t.length=0,e.east=0;--i)if(Object(l.default)(n[i])&&0===n[i].length)return i;return 0};var P=new x.default;function I(e,t,i,n,a){this.tilingScheme=e,this.parent=t,this.level=i,this.x=n,this.y=a,this.extent=e.tileXYToRectangle(n,a,i),this.rectangles=[],this._sw=void 0,this._se=void 0,this._nw=void 0,this._ne=void 0}function L(e,t,i,n,a){this.level=e,this.west=t,this.south=i,this.east=n,this.north=a}function j(e,t){var i=Math.max(e.west,t.west),n=Math.max(e.south,t.south),a=Math.min(e.east,t.east);return n=e.west&&t.east<=e.east&&t.south>=e.south&&t.north<=e.north}function F(e,t){return t.longitude>=e.west&&t.longitude<=e.east&&t.latitude>=e.south&&t.latitude<=e.north}function k(e,t,i){if(t){var n,a=!1;for(n=0;nt.east&&i.push(new m.default(t.east,a.south,a.east,a.north)),a.southt.north&&i.push(new m.default(Math.max(t.west,a.west),t.north,Math.min(t.east,a.east),a.north))):i.push(a)}return i}A.prototype.isTileAvailable=function(e,t,i){var n=this._tilingScheme.tileXYToRectangle(t,i,e,T);return m.default.center(n,P),this.computeMaximumLevelAtPosition(P)>=e},A.prototype.computeChildMaskForTile=function(e,t,i){var n=e+1;if(n>=this._maximumLevel)return 0;var a=0;return a|=this.isTileAvailable(n,2*t,2*i+1)?1:0,a|=this.isTileAvailable(n,2*t+1,2*i+1)?2:0,a|=this.isTileAvailable(n,2*t,2*i)?4:0,a|=this.isTileAvailable(n,2*t+1,2*i)?8:0},Object.defineProperties(I.prototype,{nw:{get:function(){return this._nw||(this._nw=new I(this.tilingScheme,this,this.level+1,2*this.x,2*this.y)),this._nw}},ne:{get:function(){return this._ne||(this._ne=new I(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y)),this._ne}},sw:{get:function(){return this._sw||(this._sw=new I(this.tilingScheme,this,this.level+1,2*this.x,2*this.y+1)),this._sw}},se:{get:function(){return this._se||(this._se=new I(this.tilingScheme,this,this.level+1,2*this.x+1,2*this.y+1)),this._se}}});var U=A,V=i(102),H=i(186);function G(e){if(!Object(l.default)(e)||!Object(l.default)(e.url))throw new u.default("options.url is required.");this._resource=void 0,this._credit=void 0,this._tilingScheme=void 0,this._levelZeroMaximumGeometricError=void 0,this._maxLevel=void 0,this._terrainDataStructure=void 0,this._ready=!1,this._width=void 0,this._height=void 0,this._encoding=void 0;var t=e.token;this._hasAvailability=!1,this._tilesAvailable=void 0,this._tilesAvailablityLoaded=void 0,this._availableCache={};var i=this,n=Object(s.default)(e.ellipsoid,d.default.WGS84);this._readyPromise=Object(a.a)(e.url).then((function(e){var n=y.default.createIfNeeded(e);return n.appendForwardSlash(),Object(l.default)(t)&&(n=n.getDerivedResource({queryParameters:{token:t}})),i._resource=n,n.getDerivedResource({queryParameters:{f:"pjson"}}).fetchJson()})).then((function(e){var t=e.copyrightText;Object(l.default)(t)&&(i._credit=new o.a(t));var u=e.spatialReference,d=Object(s.default)(u.latestWkid,u.wkid),c=e.extent,p={ellipsoid:n};if(4326===d)p.rectangle=m.default.fromDegrees(c.xmin,c.ymin,c.xmax,c.ymax),i._tilingScheme=new f.a(p);else{if(3857!==d)return a.a.reject(new b.a("Invalid spatial reference"));p.rectangleSouthwestInMeters=new r.default(c.xmin,c.ymin),p.rectangleNortheastInMeters=new r.default(c.xmax,c.ymax),i._tilingScheme=new H.a(p)}var _=e.tileInfo;return Object(l.default)(_)?(i._width=_.rows+1,i._height=_.cols+1,i._encoding="LERC"===_.format?h.a.LERC:h.a.NONE,i._lodCount=_.lods.length-1,(i._hasAvailability=-1!==e.capabilities.indexOf("Tilemap"))&&(i._tilesAvailable=new U(i._tilingScheme,i._lodCount),i._tilesAvailable.addAvailableTileRange(0,0,0,i._tilingScheme.getNumberOfXTilesAtLevel(0),i._tilingScheme.getNumberOfYTilesAtLevel(0)),i._tilesAvailablityLoaded=new U(i._tilingScheme,i._lodCount)),i._levelZeroMaximumGeometricError=w.a.getEstimatedLevelZeroGeometricErrorForAHeightmap(i._tilingScheme.ellipsoid,i._width,i._tilingScheme.getNumberOfXTilesAtLevel(0)),e.bandCount>1&&console.log("ArcGISTiledElevationTerrainProvider: Terrain data has more than 1 band. Using the first one."),i._terrainDataStructure={elementMultiplier:1,lowestEncodedHeight:e.minValues[0],highestEncodedHeight:e.maxValues[0]},i._ready=!0,!0):a.a.reject(new b.a("tileInfo is required"))})).otherwise((function(e){var t="An error occurred while accessing "+i._resource.url+".";return V.a.handleError(void 0,i,i._errorEvent,t),a.a.reject(e)})),this._errorEvent=new c.default}function Y(e,t,i,n){if(e._hasAvailability){var a=e._tilesAvailablityLoaded,r=e._tilesAvailable;return!(t>e._lodCount)&&(!!r.isTileAvailable(t,i,n)||!a.isTileAvailable(t,i,n)&&void 0)}}function W(e,t,i,n){for(var a=t-1,o=i-1,s=n[e.y*t+e.x],l=[],u={startX:e.x,startY:e.y,endX:0,endY:0},d=new r.default(e.x+1,e.y+1),c=!1,f=!1;!c||!f;){var h=d.x,p=f?d.y+1:d.y;if(!c){for(var m=e.y;m0;){var l=W(s.pop(),i,n,a);if(1===l.value){var u=l.range;u.startX+=e,u.endX+=e,u.startY+=t,u.endY+=t,o.push(u)}var d=l.endingIndices;d.length>0&&(s=s.concat(d))}return o}(a,o,s,s,l.data);e._tilesAvailablityLoaded.addAvailableTileRange(t,a,o,a+s,o+s);for(var d=e._tilesAvailable,c=0;c=0;--a)d[a]=oe.default.subtract(s[a],oe.default.multiplyByScalar(d[a+1],o[a],d[a]),d[a]);return d}},pe=he,me=[],_e=[],ge=[],ve=[];function ye(e){var t=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).points,i=e.times,n=e.inTangents,a=e.outTangents;if(!(Object(l.default)(t)&&Object(l.default)(i)&&Object(l.default)(n)&&Object(l.default)(a)))throw new u.default("times, points, inTangents, and outTangents are required.");if(t.length<2)throw new u.default("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new u.default("times.length must be equal to points.length.");if(n.length!==a.length||n.length!==t.length-1)throw new u.default("inTangents and outTangents must have a length equal to points.length - 1.");this._times=i,this._points=t,this._inTangents=n,this._outTangents=a,this._lastTimeIndex=0}Object.defineProperties(ye.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},inTangents:{get:function(){return this._inTangents}},outTangents:{get:function(){return this._outTangents}}}),ye.createC1=function(e){var t=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).times,i=e.points,n=e.tangents;if(!Object(l.default)(i)||!Object(l.default)(t)||!Object(l.default)(n))throw new u.default("points, times and tangents are required.");if(i.length<2)throw new u.default("points.length must be greater than or equal to 2.");if(t.length!==i.length||t.length!==n.length)throw new u.default("times, points and tangents must have the same length.");var a=n.slice(0,n.length-1);return new ye({times:t,points:i,inTangents:n.slice(1,n.length),outTangents:a})},ye.createNaturalCubic=function(e){var t=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).times,i=e.points;if(!Object(l.default)(i)||!Object(l.default)(t))throw new u.default("points and times are required.");if(i.length<2)throw new u.default("points.length must be greater than or equal to 2.");if(t.length!==i.length)throw new u.default("times.length must be equal to points.length.");if(i.length<3)return new de.a({points:i,times:t});var n=function(e){var t,i=me,n=ge,a=_e,r=ve;i.length=n.length=e.length-1,a.length=r.length=e.length,i[0]=n[0]=1,a[0]=2;var o=r[0];for(Object(l.default)(o)||(o=r[0]=new oe.default),oe.default.subtract(e[1],e[0],o),oe.default.multiplyByScalar(o,3,o),t=1;t2&&(Object(l.default)(n)||(n=Ee,oe.default.multiplyByScalar(t[1],2,n),oe.default.subtract(n,t[2],n),oe.default.subtract(n,t[0],n),oe.default.multiplyByScalar(n,.5,n)),!Object(l.default)(a))){var r=t.length-1;a=Ce,oe.default.multiplyByScalar(t[r-1],2,a),oe.default.subtract(t[r],a,a),oe.default.add(a,t[r-2],a),oe.default.multiplyByScalar(a,.5,a)}this._times=i,this._points=t,this._firstTangent=oe.default.clone(n),this._lastTangent=oe.default.clone(a),this._evaluateFunction=function(e){var t=e.points,i=e.times;if(t.length<3){var n=i[0],a=1/(i[1]-n),r=t[0],o=t[1];return function(e,t){Object(l.default)(t)||(t=new oe.default);var i=(e-n)*a;return oe.default.lerp(r,o,i,t)}}return function(n,a){Object(l.default)(a)||(a=new oe.default);var r,o,s,u,d,c=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),f=(n-i[c])/(i[c+1]-i[c]),h=xe;return h.z=f,h.y=f*f,h.x=h.y*f,h.w=1,0===c?(r=t[0],o=t[1],s=e.firstTangent,u=oe.default.subtract(t[2],r,Ae),oe.default.multiplyByScalar(u,.5,u),d=ce.default.multiplyByVector(Oe.hermiteCoefficientMatrix,h,h)):c===t.length-2?(r=t[c],o=t[c+1],u=e.lastTangent,s=oe.default.subtract(o,t[c-1],Ae),oe.default.multiplyByScalar(s,.5,s),d=ce.default.multiplyByVector(Oe.hermiteCoefficientMatrix,h,h)):(r=t[c-1],o=t[c],s=t[c+1],u=t[c+2],d=ce.default.multiplyByVector(Se.catmullRomCoefficientMatrix,h,h)),a=oe.default.multiplyByScalar(r,d.x,a),oe.default.multiplyByScalar(o,d.y,Te),oe.default.add(a,Te,a),oe.default.multiplyByScalar(s,d.z,Te),oe.default.add(a,Te,a),oe.default.multiplyByScalar(u,d.w,Te),oe.default.add(a,Te,a)}}(this),this._lastTimeIndex=0}Object.defineProperties(Se.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}},firstTangent:{get:function(){return this._firstTangent}},lastTangent:{get:function(){return this._lastTangent}}}),Se.catmullRomCoefficientMatrix=new ce.default(-.5,1,-.5,0,1.5,-2.5,0,1,-1.5,2,.5,0,.5,-.5,0,0),Se.prototype.findTimeInterval=fe.a.prototype.findTimeInterval,Se.prototype.wrapTime=fe.a.prototype.wrapTime,Se.prototype.clampTime=fe.a.prototype.clampTime,Se.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)};var Me=Se,De=i(159),Pe=i(38),Ie=i(123),Le={clipTriangleAtAxisAlignedThreshold:function(e,t,i,n,a,r){if(!Object(l.default)(e))throw new u.default("threshold is required.");if(!Object(l.default)(t))throw new u.default("keepAbove is required.");if(!Object(l.default)(i))throw new u.default("u0 is required.");if(!Object(l.default)(n))throw new u.default("u1 is required.");if(!Object(l.default)(a))throw new u.default("u2 is required.");var o,s,d;Object(l.default)(r)?r.length=0:r=[],t?(o=ie,s=n>e,d=a>e);var c,f,h,p,m,_,g=o+s+d;return 1===g?o?(c=(e-i)/(n-i),f=(e-i)/(a-i),r.push(1),r.push(2),1!==f&&(r.push(-1),r.push(0),r.push(2),r.push(f)),1!==c&&(r.push(-1),r.push(0),r.push(1),r.push(c))):s?(h=(e-n)/(a-n),p=(e-n)/(i-n),r.push(2),r.push(0),1!==p&&(r.push(-1),r.push(1),r.push(0),r.push(p)),1!==h&&(r.push(-1),r.push(1),r.push(2),r.push(h))):d&&(m=(e-a)/(i-a),_=(e-a)/(n-a),r.push(0),r.push(1),1!==_&&(r.push(-1),r.push(2),r.push(1),r.push(_)),1!==m&&(r.push(-1),r.push(2),r.push(0),r.push(m))):2===g?o||i===e?s||n===e?d||a===e||(f=(e-i)/(a-i),h=(e-n)/(a-n),r.push(2),r.push(-1),r.push(0),r.push(2),r.push(f),r.push(-1),r.push(1),r.push(2),r.push(h)):(_=(e-a)/(n-a),c=(e-i)/(n-i),r.push(1),r.push(-1),r.push(2),r.push(1),r.push(_),r.push(-1),r.push(0),r.push(1),r.push(c)):(p=(e-n)/(i-n),m=(e-a)/(i-a),r.push(0),r.push(-1),r.push(1),r.push(0),r.push(p),r.push(-1),r.push(2),r.push(0),r.push(m)):3!==g&&(r.push(0),r.push(1),r.push(2)),r},computeBarycentricCoordinates:function(e,t,i,n,a,r,o,s,d){if(!Object(l.default)(e))throw new u.default("x is required.");if(!Object(l.default)(t))throw new u.default("y is required.");if(!Object(l.default)(i))throw new u.default("x1 is required.");if(!Object(l.default)(n))throw new u.default("y1 is required.");if(!Object(l.default)(a))throw new u.default("x2 is required.");if(!Object(l.default)(r))throw new u.default("y2 is required.");if(!Object(l.default)(o))throw new u.default("x3 is required.");if(!Object(l.default)(s))throw new u.default("y3 is required.");var c=i-o,f=o-a,h=r-s,p=n-s,m=1/(h*c+f*p),_=t-s,g=e-o,v=(h*g+f*_)*m,y=(-p*g+c*_)*m,b=1-v-y;return Object(l.default)(d)?(d.x=v,d.y=y,d.z=b,d):new oe.default(v,y,b)},computeLineSegmentLineSegmentIntersection:function(e,t,i,n,a,o,s,u,d){$.a.typeOf.number("x00",e),$.a.typeOf.number("y00",t),$.a.typeOf.number("x01",i),$.a.typeOf.number("y01",n),$.a.typeOf.number("x10",a),$.a.typeOf.number("y10",o),$.a.typeOf.number("x11",s),$.a.typeOf.number("y11",u);var c=(u-o)*(i-e)-(s-a)*(n-t);if(0!==c){var f=((s-a)*(t-o)-(u-o)*(e-a))/c,h=((i-e)*(t-o)-(n-t)*(e-a))/c;return f>=0&&f<=1&&h>=0&&h<=1?(Object(l.default)(d)||(d=new r.default),d.x=e+f*(i-e),d.y=t+f*(n-t),d):void 0}}},je=Le,Re=i(5),Ne=i(126),Be=i(315),Fe=i(225),ke=i(283);function ze(e){if(!Object(l.default)(e)||!Object(l.default)(e.quantizedVertices))throw new u.default("options.quantizedVertices is required.");if(!Object(l.default)(e.indices))throw new u.default("options.indices is required.");if(!Object(l.default)(e.minimumHeight))throw new u.default("options.minimumHeight is required.");if(!Object(l.default)(e.maximumHeight))throw new u.default("options.maximumHeight is required.");if(!Object(l.default)(e.maximumHeight))throw new u.default("options.maximumHeight is required.");if(!Object(l.default)(e.boundingSphere))throw new u.default("options.boundingSphere is required.");if(!Object(l.default)(e.horizonOcclusionPoint))throw new u.default("options.horizonOcclusionPoint is required.");if(!Object(l.default)(e.westIndices))throw new u.default("options.westIndices is required.");if(!Object(l.default)(e.southIndices))throw new u.default("options.southIndices is required.");if(!Object(l.default)(e.eastIndices))throw new u.default("options.eastIndices is required.");if(!Object(l.default)(e.northIndices))throw new u.default("options.northIndices is required.");if(!Object(l.default)(e.westSkirtHeight))throw new u.default("options.westSkirtHeight is required.");if(!Object(l.default)(e.southSkirtHeight))throw new u.default("options.southSkirtHeight is required.");if(!Object(l.default)(e.eastSkirtHeight))throw new u.default("options.eastSkirtHeight is required.");if(!Object(l.default)(e.northSkirtHeight))throw new u.default("options.northSkirtHeight is required.");this._quantizedVertices=e.quantizedVertices,this._encodedNormals=e.encodedNormals,this._indices=e.indices,this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._boundingSphere=e.boundingSphere,this._orientedBoundingBox=e.orientedBoundingBox,this._horizonOcclusionPoint=e.horizonOcclusionPoint,this._credits=e.credits;var t=this._quantizedVertices.length/3,i=this._uValues=this._quantizedVertices.subarray(0,t),n=this._vValues=this._quantizedVertices.subarray(t,2*t);function a(e,t){return n[e]-n[t]}function r(e,t){return i[e]-i[t]}this._heightValues=this._quantizedVertices.subarray(2*t,3*t),this._westIndices=Ve(e.westIndices,a,t),this._southIndices=Ve(e.southIndices,r,t),this._eastIndices=Ve(e.eastIndices,a,t),this._northIndices=Ve(e.northIndices,r,t),this._westSkirtHeight=e.westSkirtHeight,this._southSkirtHeight=e.southSkirtHeight,this._eastSkirtHeight=e.eastSkirtHeight,this._northSkirtHeight=e.northSkirtHeight,this._childTileMask=Object(s.default)(e.childTileMask,15),this._createdByUpsampling=Object(s.default)(e.createdByUpsampling,!1),this._waterMask=e.waterMask,this._mesh=void 0}Object.defineProperties(ze.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){return this._waterMask}},childTileMask:{get:function(){return this._childTileMask}},canUpsample:{get:function(){return Object(l.default)(this._mesh)}}});var Ue=[];function Ve(e,t,i){Ue.length=e.length;for(var n=!1,a=0,r=e.length;a0&&t(e[a-1],e[a])>0;return n?(Ue.sort(t),Pe.a.createTypedArray(i,Ue)):e}var He=new Ne.a("createVerticesFromQuantizedTerrainMesh"),Ge=new Ne.a("createVerticesFromQuantizedTerrainMesh",Be.a.maximumAsynchronousTasks);ze.prototype.createMesh=function(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),$.a.typeOf.object("options.tilingScheme",e.tilingScheme),$.a.typeOf.number("options.x",e.x),$.a.typeOf.number("options.y",e.y),$.a.typeOf.number("options.level",e.level);var t=e.tilingScheme,i=e.x,n=e.y,r=e.level,o=Object(s.default)(e.exaggeration,1),u=Object(s.default)(e.exaggerationRelativeHeight,0),d=Object(s.default)(e.throttle,!0),c=t.ellipsoid,f=t.tileXYToRectangle(i,n,r),h=(d?Ge:He).scheduleTask({minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,quantizedVertices:this._quantizedVertices,octEncodedNormals:this._encodedNormals,includeWebMercatorT:!0,indices:this._indices,westIndices:this._westIndices,southIndices:this._southIndices,eastIndices:this._eastIndices,northIndices:this._northIndices,westSkirtHeight:this._westSkirtHeight,southSkirtHeight:this._southSkirtHeight,eastSkirtHeight:this._eastSkirtHeight,northSkirtHeight:this._northSkirtHeight,rectangle:f,relativeToCenter:this._boundingSphere.center,ellipsoid:c,exaggeration:o,exaggerationRelativeHeight:u});if(Object(l.default)(h)){var p=this;return Object(a.a)(h,(function(e){var t=p._quantizedVertices.length/3,i=t+p._westIndices.length+p._southIndices.length+p._eastIndices.length+p._northIndices.length,n=Pe.a.createTypedArray(i,e.indices),a=new Float32Array(e.vertices),r=e.center,o=e.minimumHeight,l=e.maximumHeight,u=p._boundingSphere,d=p._orientedBoundingBox,c=Object(s.default)(oe.default.clone(e.occludeePointInScaledSpace),p._horizonOcclusionPoint),f=e.vertexStride,h=Fe.a.clone(e.encoding);return p._mesh=new ke.a(r,a,n,e.indexCountWithoutSkirts,t,o,l,u,c,f,d,h,e.westIndicesSouthToNorth,e.southIndicesEastToWest,e.eastIndicesNorthToSouth,e.northIndicesWestToEast),p._quantizedVertices=void 0,p._encodedNormals=void 0,p._indices=void 0,p._uValues=void 0,p._vValues=void 0,p._heightValues=void 0,p._westIndices=void 0,p._southIndices=void 0,p._eastIndices=void 0,p._northIndices=void 0,p._mesh}))}};var Ye=new Ne.a("upsampleQuantizedTerrainMesh",Be.a.maximumAsynchronousTasks);ze.prototype.upsample=function(e,t,i,n,r,o,s){if(!Object(l.default)(e))throw new u.default("tilingScheme is required.");if(!Object(l.default)(t))throw new u.default("thisX is required.");if(!Object(l.default)(i))throw new u.default("thisY is required.");if(!Object(l.default)(n))throw new u.default("thisLevel is required.");if(!Object(l.default)(r))throw new u.default("descendantX is required.");if(!Object(l.default)(o))throw new u.default("descendantY is required.");if(!Object(l.default)(s))throw new u.default("descendantLevel is required.");if(s-n>1)throw new u.default("Upsampling through more than one level at a time is not currently supported.");var d=this._mesh;if(Object(l.default)(this._mesh)){var c=2*t!==r,f=2*i===o,h=e.ellipsoid,p=e.tileXYToRectangle(r,o,s),m=Ye.scheduleTask({vertices:d.vertices,vertexCountWithoutSkirts:d.vertexCountWithoutSkirts,indices:d.indices,indexCountWithoutSkirts:d.indexCountWithoutSkirts,encoding:d.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:c,isNorthChild:f,childRectangle:p,ellipsoid:h});if(Object(l.default)(m)){var _=Math.min(this._westSkirtHeight,this._eastSkirtHeight);_=Math.min(_,this._southSkirtHeight),_=Math.min(_,this._northSkirtHeight);var g=c?.5*_:this._westSkirtHeight,v=f?.5*_:this._southSkirtHeight,y=c?this._eastSkirtHeight:.5*_,b=f?this._northSkirtHeight:.5*_,w=this._credits;return Object(a.a)(m).then((function(e){var t,i=new Uint16Array(e.vertices),n=Pe.a.createTypedArray(i.length/3,e.indices);return Object(l.default)(e.encodedNormals)&&(t=new Uint8Array(e.encodedNormals)),new ze({quantizedVertices:i,indices:n,encodedNormals:t,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:ne.default.clone(e.boundingSphere),orientedBoundingBox:Ie.a.clone(e.orientedBoundingBox),horizonOcclusionPoint:oe.default.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:g,southSkirtHeight:v,eastSkirtHeight:y,northSkirtHeight:b,childTileMask:0,credits:w,createdByUpsampling:!0})}))}}};var We=new oe.default;function qe(e,t,i,n,a,r,o,s){var l=Math.min(i,a,o),u=Math.max(i,a,o),d=Math.min(n,r,s),c=Math.max(n,r,s);return e>=l&&e<=u&&t>=d&&t<=c}ze.prototype.interpolateHeight=function(e,t,i){var n=Re.default.clamp((t-e.west)/e.width,0,1);n*=32767;var a=Re.default.clamp((i-e.south)/e.height,0,1);return a*=32767,Object(l.default)(this._mesh)?function(e,t,i){for(var n=e._mesh,a=n.vertices,r=n.encoding,o=n.indices,s=0,l=o.length;s=-1e-15&&m.y>=-1e-15&&m.z>=-1e-15){var _=r.decodeHeight(a,u),g=r.decodeHeight(a,d),v=r.decodeHeight(a,c);return m.x*_+m.y*g+m.z*v}}}return}(this,n,a):function(e,t,i){for(var n=e._uValues,a=e._vValues,r=e._heightValues,o=e._indices,s=0,l=o.length;s=-1e-15&&v.y>=-1e-15&&v.z>=-1e-15){var y=v.x*r[u]+v.y*r[d]+v.z*r[c];return Re.default.lerp(e._minimumHeight,e._maximumHeight,y/32767)}}}return}(this,n,a)};var Xe=new r.default,Ke=new r.default,Je=new r.default;ze.prototype.isChildAvailable=function(e,t,i,n){if(!Object(l.default)(e))throw new u.default("thisX is required.");if(!Object(l.default)(t))throw new u.default("thisY is required.");if(!Object(l.default)(i))throw new u.default("childX is required.");if(!Object(l.default)(n))throw new u.default("childY is required.");var a=2;return i!==2*e&&++a,n!==2*t&&(a-=2),0!=(this._childTileMask&1<0&&(m+=" "),m+=e.attribution),p.push(new Qe({resource:n,version:e.version,isHeightmap:c,tileUrlTemplates:O,availability:T,hasVertexNormals:i,hasWaterMask:o,hasMetadata:s,availabilityLevels:E,availabilityTilesLoaded:y,littleEndianExtensionSize:u}));var R=e.parentUrl;if(Object(l.default)(R)){if(!Object(l.default)(T))return console.log("A layer.json can't have a parentUrl if it does't have an available array."),a.a.resolve();(n=n.getDerivedResource({url:R})).appendForwardSlash();var N=(r=n.getDerivedResource({url:"layer.json"})).fetchJson();return Object(a.a)(N,v,b)}return a.a.resolve()}function b(e){var t="An error occurred while accessing "+r.url+".";d=V.a.handleError(d,h,h._errorEvent,t,void 0,void 0,void 0,A)}function O(e){v(e).then((function(){if(!Object(l.default)(d)){var e=_.length;if(e>0)for(var t=h._availability=new U(h._tilingScheme,g),i=0;i0){var s=new o.a(m);Object(l.default)(h._tileCredits)?h._tileCredits.push(s):h._tileCredits=[s]}h._ready=!0,h._readyPromise.resolve(!0)}}))}function x(e){Object(l.default)(e)&&404===e.statusCode?O({tilejson:"2.1.0",format:"heightmap-1.0",version:"1.0.0",scheme:"tms",tiles:["{z}/{x}/{y}.terrain?v={version}"]}):b()}function A(){Object(a.a)(r.fetchJson()).then(O).otherwise(x)}Object(a.a)(e.url).then((function(e){var t=y.default.createIfNeeded(e);t.appendForwardSlash(),r=(n=t).getDerivedResource({url:"layer.json"}),h._tileCredits=t.credits,A()})).otherwise((function(e){i.reject(e)}))}var et=1,tt=2,it=4;function nt(e){return Object(l.default)(e)&&0!==e.length?{Accept:"application/vnd.quantized-mesh;extensions="+e.join("-")+",application/octet-stream;q=0.9,*/*;q=0.01"}:{Accept:"application/vnd.quantized-mesh,application/octet-stream;q=0.9,*/*;q=0.01"}}function at(e,t,i,n,r,o){if(!Object(l.default)(r))return a.a.reject(new b.a("Terrain tile doesn't exist"));var s=r.tileUrlTemplates;if(0!==s.length){var u;if(e._scheme&&"tms"!==e._scheme)u=i;else u=e._tilingScheme.getNumberOfYTilesAtLevel(n)-i-1;var d,c,f=[];e._requestVertexNormals&&r.hasVertexNormals&&f.push(r.littleEndianExtensionSize?"octvertexnormals":"vertexnormals"),e._requestWaterMask&&r.hasWaterMask&&f.push("watermask"),e._requestMetadata&&r.hasMetadata&&f.push("metadata");var h=s[(t+u+n)%s.length],m=r.resource;Object(l.default)(m._ionEndpoint)&&!Object(l.default)(m._ionEndpoint.externalType)?(0!==f.length&&(c={extensions:f.join("-")}),d=nt(void 0)):d=nt(f);var _=m.getDerivedResource({url:h,templateValues:{version:r.version,z:n,x:t,y:u},queryParameters:c,headers:d,request:o}).fetchArrayBuffer();if(Object(l.default)(_))return _.then((function(a){return Object(l.default)(e._heightmapStructure)?function(e,t,i,n,a){var r=new Uint16Array(t,0,e._heightmapWidth*e._heightmapWidth);return new p.a({buffer:r,childTileMask:new Uint8Array(t,r.byteLength,1)[0],waterMask:new Uint8Array(t,r.byteLength+1,t.byteLength-r.byteLength-1),width:e._heightmapWidth,height:e._heightmapWidth,structure:e._heightmapStructure,credits:e._tileCredits})}(e,a):function(e,t,i,n,a,r){var o=r.littleEndianExtensionSize,s=0,u=3*Float64Array.BYTES_PER_ELEMENT,d=4*Float64Array.BYTES_PER_ELEMENT,c=3*Uint16Array.BYTES_PER_ELEMENT,f=Uint16Array.BYTES_PER_ELEMENT,h=3*f,p=new DataView(t),m=new oe.default(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=u;var _=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var g=p.getFloat32(s,!0);s+=Float32Array.BYTES_PER_ELEMENT;var v=new ne.default(new oe.default(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0)),p.getFloat64(s+u,!0));s+=d;var y=new oe.default(p.getFloat64(s,!0),p.getFloat64(s+8,!0),p.getFloat64(s+16,!0));s+=u;var b=p.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var w=new Uint16Array(t,s,3*b);s+=b*c,b>65536&&(h=3*(f=Uint32Array.BYTES_PER_ELEMENT));var O=w.subarray(0,b),x=w.subarray(b,2*b),A=w.subarray(2*b,3*b);Z.a.zigZagDeltaDecode(O,x,A),s%f!=0&&(s+=f-s%f);var T=p.getUint32(s,!0);s+=Uint32Array.BYTES_PER_ELEMENT;var E=Pe.a.createTypedArrayFromArrayBuffer(b,t,s,3*T);s+=T*h;for(var C=0,S=E.length,M=0;M0){var G=Object(De.a)(new Uint8Array(t),s+Uint32Array.BYTES_PER_ELEMENT,H).available;if(Object(l.default)(G))for(var Y=0;Ythis._availability._maximumLevel)return!1;if(this._availability.isTileAvailable(i,e,t))return!0;if(!this._hasMetadata)return!1;for(var n=this._layers,a=n.length,r=0;rthis._availability._maximumLevel||this._availability.isTileAvailable(i,e,t))&&this._hasMetadata)for(var n=this._layers,a=n.length,r=0;r0}function Xt(e,t){if(0!==t){var i=Math.floor(Re.default.log2(t+1))%2==0,n=Math.floor((t-1)/2),a=Wt(e,t,n);for(a!==i&&(Yt(e,t,n),t=n);t>=3;){var r=Math.floor((t-3)/4);if(Wt(e,t,r)!==a)break;Yt(e,t,r),t=r}}}function Kt(e,t){for(var i,n=e._length,a=Math.floor(Re.default.log2(t+1))%2==0;(i=2*t+1)e;)this.removeMinimum();this._array.length=e}this._maximumLength=e}},internalArray:{get:function(){return this._array}},comparator:{get:function(){return this._comparator}}}),Gt.prototype.clone=function(){var e=this._maximumLength,t=this._comparator,i=this._array,n=this._length,a=new Gt({comparator:t,maximumLength:e});a._length=n;for(var r=0;r=2&&(this._array[0]=this._array[e-1],Kt(this,0)),this._array[e-1]=void 0,t}},Gt.prototype.removeMaximum=function(){var e=this._length;if(0!==e){var t;if(this._length--,e<=2)t=this._array[e-1];else{var i=qt(this,1,2)?1:2;t=this._array[i],this._array[i]=this._array[e-1],e>=4&&Kt(this,i)}return this._array[e-1]=void 0,t}},Gt.prototype.getMinimum=function(){if(0!==this._length)return this._array[0]},Gt.prototype.getMaximum=function(){var e=this._length;if(0!==e)return e<=2?this._array[e-1]:this._array[qt(this,1,2)?1:2]};var Jt=Gt,Zt=i(956),Qt=i(550),$t=i(394),ei=i(182),ti=i(261),ii=i(282),ni=i(196),ai=i(257),ri=i(229),oi=i(218),si=i(331),li=i(329),ui=i(100),di=i(181),ci=i(872),fi=i(278),hi=i(59),pi=i(447),mi=i(772),_i=i(179),gi=Object.freeze({SEARCH:0,AUTOCOMPLETE:1});function vi(){}vi.prototype.geocode=u.default.throwInstantiationError;var yi=vi,bi=i(125),wi=i(46),Oi=i(28),xi=i(82);function Ai(){u.default.throwInstantiationError()}Ai.createGeometry=function(e){u.default.throwInstantiationError()};var Ti=Ai,Ei=i(43),Ci=i(233),Si=i(71),Mi=i(95),Di=i(286),Pi=i(474),Ii=i(77);var Li=function(e,t){return 0!=(e&t)},ji=[1,2,4,8];function Ri(e,t,i,n,a,r){this._bits=e,this.cnodeVersion=t,this.imageryVersion=i,this.terrainVersion=n,this.imageryProvider=a,this.terrainProvider=r,this.ancestorHasTerrain=!1,this.terrainState=void 0}Ri.clone=function(e,t){return Object(l.default)(t)?(t._bits=e._bits,t.cnodeVersion=e.cnodeVersion,t.imageryVersion=e.imageryVersion,t.terrainVersion=e.terrainVersion,t.imageryProvider=e.imageryProvider,t.terrainProvider=e.terrainProvider):t=new Ri(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),t.ancestorHasTerrain=e.ancestorHasTerrain,t.terrainState=e.terrainState,t},Ri.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},Ri.prototype.hasSubtree=function(){return Li(this._bits,16)},Ri.prototype.hasImagery=function(){return Li(this._bits,64)},Ri.prototype.hasTerrain=function(){return Li(this._bits,128)},Ri.prototype.hasChildren=function(){return Li(this._bits,15)},Ri.prototype.hasChild=function(e){return Li(this._bits,ji[e])},Ri.prototype.getChildBitmask=function(){return 15&this._bits};var Ni=Ri,Bi=i(425);var Fi=function(e){for(var t=e.length,i=new ArrayBuffer(t),n=new Uint8Array(i),a=0;amF8J´Ýð.ÝuڌDt"úa"\f3"So¯9D\vŒ9Ù9L¹¿«\\ŒP_Ÿ"uxéq‘h;ÁěðMª>}æÎI‰Ææx\fa1-¤O¥~q ˆì\r1èN\v\0nPh}=\b\r•¦n£h—$[kó#ó¶s³\r\v@ÀŸØQ]ú".jßI\0¹ wUÆïj¿{GLƒîÜÜF…©­S+S4ÿ”Yä8è1ƒN¹XFkË-#†’p\x005ˆ"Ï1²&/çÃu-6,rt°#G·ÓÑ&…7râ\0ŒDÏÚ3-Þ`†i#i*|ÍKQ\r•T9w.)ê¦P¢joP™\\>TûïP[\vE‰m(w7ێJfJo™ åpâ¹q~\fmI-zþrÇòY0»]såÉ êxì ðŠB|G`°½&·q¶ÇŸÑ3‚=Ó«îc™È+S D\\qÆÌD2O<ÊÀ)=RÓaX©}e´ÜÏ\rô=ñ\b©BÚ#\tØ¿^PIøMÀËGLO÷{+ØÅ1’;µoÜl\r’ˆўÛ?âéÚ_ԄâFaZÞUϤ\0¾ýÎgñJi—æ HØ]~®q N®ÀV©‘<‚rçvì)IÖ]-ƒãÛ6©;f—‡jÕ¶=P^R¹KÇsWxÉô.Y•“oÐKW>\'\'Ç`Û;íšSD>?’mw¢\në?R¨ÆU^1I7…ôÅ&-©¿‹\'TÚÃj å*x°Öprª‹h½ˆ÷_H±~ÀXL?fù>áeÀp§Ï8i¯ðVldIœ\'­xtO‡ÞV9\0Úw\vË-‰û5Oõ\bQ`Á\nZGM&30xÚÀœFGâ[y`In7gS\n>éìF9²ñ4\rƄSuná\fYÙÞ)…{II¥wy¾IV.6ç\v:»Ob{ÒM1•/½8{¨O!áìFpv•})"xˆ\nÝ\\ÚÞQÏðüYRe|3ßóHÚ»*uÛ`²Ôüíì5¨ÿ(1-È܈F|Š["');function ki(e){$.a.defined("resourceOrUrl",e);var t=e;"string"==typeof t||t instanceof y.default||($.a.typeOf.string("resourceOrUrl.url",e.url),t=e.url);var i=y.default.createIfNeeded(t);i.appendForwardSlash(),this._resource=i,this.imageryPresent=!0,this.protoImagery=void 0,this.terrainPresent=!0,this.negativeAltitudeExponentBias=32,this.negativeAltitudeThreshold=Re.default.EPSILON12,this.providers={},this.key=void 0,this._quadPacketVersion=1,this._tileInfo={},this._subtreePromises={};var n=this;this._readyPromise=function(e){var t=e._resource.getDerivedResource({url:"dbRoot.v5",queryParameters:{output:"proto"}});if(!Object(l.default)(Ui)){var i=Object(Ii.a)("ThirdParty/google-earth-dbroot-parser.js"),n=window.cesiumGoogleEarthDbRootParser;Ui=Object(Bi.a)(i).then((function(){zi=window.cesiumGoogleEarthDbRootParser(Pi.a),Object(l.default)(n)?window.cesiumGoogleEarthDbRootParser=n:delete window.cesiumGoogleEarthDbRootParser}))}return Ui.then((function(){return t.fetchArrayBuffer()})).then((function(t){var i=zi.EncryptedDbRootProto.decode(new Uint8Array(t)),n=i.encryptionData,a=n.byteOffset,r=a+n.byteLength,o=e.key=n.buffer.slice(a,r);r=(a=(n=i.dbrootData).byteOffset)+n.byteLength;var s=n.buffer.slice(a,r);return Vi.scheduleTask({buffer:s,type:"DbRoot",key:o},[s])})).then((function(t){var i=zi.DbRootProto.decode(new Uint8Array(t.buffer));if(e.imageryPresent=Object(s.default)(i.imageryPresent,e.imageryPresent),e.protoImagery=i.protoImagery,e.terrainPresent=Object(s.default)(i.terrainPresent,e.terrainPresent),Object(l.default)(i.endSnippet)&&Object(l.default)(i.endSnippet.model)){var n=i.endSnippet.model;e.negativeAltitudeExponentBias=Object(s.default)(n.negativeAltitudeExponentBias,e.negativeAltitudeExponentBias),e.negativeAltitudeThreshold=Object(s.default)(n.compressedNegativeAltitudeThreshold,e.negativeAltitudeThreshold)}Object(l.default)(i.databaseVersion)&&(e._quadPacketVersion=Object(s.default)(i.databaseVersion.quadtreeVersion,e._quadPacketVersion));for(var a=e.providers,r=Object(s.default)(i.providerInfo,[]),u=r.length,d=0;d=0;--a){var r=1<=0;--a){var r=1<1;){if(i=a.substring(a.length-1),a=a.substring(0,a.length-1),t=this.getTileInformationFromQuadKey(a),Object(l.default)(t)){t.hasSubtree()||t.hasChild(parseInt(i))||(n=!1);break}if(null===t){n=!1;break}}return n};var zi,Ui,Vi=new Ne.a("decodeGoogleEarthEnterprisePacket");function Hi(e,t,i,n){return e._resource.getDerivedResource({url:"flatfile?q2-0"+t+"-q."+i.toString(),request:n})}ki.prototype.getQuadTreePacket=function(e,t,i){t=Object(s.default)(t,1);var n=Hi(this,e=Object(s.default)(e,""),t,i).fetchArrayBuffer();if(Object(l.default)(n)){var a=this._tileInfo,r=this.key;return n.then((function(t){return Vi.scheduleTask({buffer:t,quadKey:e,type:"Metadata",key:r},[t]).then((function(t){var i,n=-1;if(""!==e){n=e.length+1;var r=t[e];(i=a[e])._bits|=r._bits,delete t[e]}var o=Object.keys(t);o.sort((function(e,t){return e.length-t.length}));for(var s=o.length,l=0;l1){var f=a[u.substring(0,u.length-1)];d.setParent(f)}a[u]=d}else a[u]=null}}))}))}},ki.prototype.populateSubtree=function(e,t,i,n){return function e(t,i,n){var r,o=t._tileInfo,s=i,u=o[s];if(Object(l.default)(u)&&(!u.hasSubtree()||u.hasChildren()))return u;for(;void 0===u&&s.length>1;)s=s.substring(0,s.length-1),u=o[s];var d=t._subtreePromises,c=d[s];if(Object(l.default)(c))return c.then((function(){return r=new _.default({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),e(t,i,r)}));if(!Object(l.default)(u)||!u.hasSubtree())return a.a.reject(new b.a("Couldn't load metadata for tile "+i));if(c=t.getQuadTreePacket(s,u.cnodeVersion,n),!Object(l.default)(c))return;return d[s]=c,c.then((function(){return r=new _.default({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction}),e(t,i,r)})).always((function(){delete d[s]}))}(this,ki.tileXYToQuadKey(e,t,i),n)},ki.prototype.getTileInformation=function(e,t,i){var n=ki.tileXYToQuadKey(e,t,i);return this._tileInfo[n]},ki.prototype.getTileInformationFromQuadKey=function(e){return this._tileInfo[e]};var Gi=ki;function Yi(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),$.a.typeOf.object("options.buffer",e.buffer),$.a.typeOf.number("options.negativeAltitudeExponentBias",e.negativeAltitudeExponentBias),$.a.typeOf.number("options.negativeElevationThreshold",e.negativeElevationThreshold),this._buffer=e.buffer,this._credits=e.credits,this._negativeAltitudeExponentBias=e.negativeAltitudeExponentBias,this._negativeElevationThreshold=e.negativeElevationThreshold;var t=Object(s.default)(e.childTileMask,15),i=3&t;i|=4&t?8:0,i|=8&t?4:0,this._childTileMask=i,this._createdByUpsampling=Object(s.default)(e.createdByUpsampling,!1),this._skirtHeight=void 0,this._bufferType=this._buffer.constructor,this._mesh=void 0,this._minimumHeight=void 0,this._maximumHeight=void 0}Object.defineProperties(Yi.prototype,{credits:{get:function(){return this._credits}},waterMask:{get:function(){}}});var Wi=new Ne.a("createVerticesFromGoogleEarthEnterpriseBuffer"),qi=new Ne.a("createVerticesFromGoogleEarthEnterpriseBuffer",Be.a.maximumAsynchronousTasks),Xi=new m.default,Ki=new m.default;Yi.prototype.createMesh=function(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),$.a.typeOf.object("options.tilingScheme",e.tilingScheme),$.a.typeOf.number("options.x",e.x),$.a.typeOf.number("options.y",e.y),$.a.typeOf.number("options.level",e.level);var t=e.tilingScheme,i=e.x,n=e.y,a=e.level,r=Object(s.default)(e.exaggeration,1),o=Object(s.default)(e.exaggerationRelativeHeight,0),u=Object(s.default)(e.throttle,!0),d=t.ellipsoid;t.tileXYToNativeRectangle(i,n,a,Xi),t.tileXYToRectangle(i,n,a,Ki);var c=d.cartographicToCartesian(m.default.center(Ki)),f=40075.16/(1<=-1e-15&&m.y>=-1e-15&&m.z>=-1e-15){var _=r.decodeHeight(a,u),g=r.decodeHeight(a,d),v=r.decodeHeight(a,c);return m.x*_+m.y*g+m.z*v}}return}(this,n,a):function(e,t,i,n){var a=e._buffer,r=0,o=0,s=0;i>.5?(t>.5?(r=2,o=.5):r=3,s=.5):t>.5&&(r=1,o=.5);for(var l=new DataView(a),u=0,d=0;d=-1e-15&&P.y>=-1e-15&&P.z>=-1e-15)return P.x*b[O]+P.y*b[x]+P.z*b[A]}return}(this,n,a,e)};var Ji=new Ne.a("upsampleQuantizedTerrainMesh",Be.a.maximumAsynchronousTasks);Yi.prototype.upsample=function(e,t,i,n,a,r,o){if($.a.typeOf.object("tilingScheme",e),$.a.typeOf.number("thisX",t),$.a.typeOf.number("thisY",i),$.a.typeOf.number("thisLevel",n),$.a.typeOf.number("descendantX",a),$.a.typeOf.number("descendantY",r),$.a.typeOf.number("descendantLevel",o),o-n>1)throw new u.default("Upsampling through more than one level at a time is not currently supported.");var s=this._mesh;if(Object(l.default)(this._mesh)){var d=2*t!==a,c=2*i===r,f=e.ellipsoid,h=e.tileXYToRectangle(a,r,o),p=Ji.scheduleTask({vertices:s.vertices,indices:s.indices,indexCountWithoutSkirts:s.indexCountWithoutSkirts,vertexCountWithoutSkirts:s.vertexCountWithoutSkirts,encoding:s.encoding,minimumHeight:this._minimumHeight,maximumHeight:this._maximumHeight,isEastChild:d,isNorthChild:c,childRectangle:h,ellipsoid:f});if(Object(l.default)(p)){var m=this;return p.then((function(e){var t=new Uint16Array(e.vertices),i=Pe.a.createTypedArray(t.length/3,e.indices),n=m._skirtHeight;return new Ze({quantizedVertices:t,indices:i,minimumHeight:e.minimumHeight,maximumHeight:e.maximumHeight,boundingSphere:ne.default.clone(e.boundingSphere),orientedBoundingBox:Ie.a.clone(e.orientedBoundingBox),horizonOcclusionPoint:oe.default.clone(e.horizonOcclusionPoint),westIndices:e.westIndices,southIndices:e.southIndices,eastIndices:e.eastIndices,northIndices:e.northIndices,westSkirtHeight:n,southSkirtHeight:n,eastSkirtHeight:n,northSkirtHeight:n,childTileMask:0,createdByUpsampling:!0,credits:m._credits})}))}}},Yi.prototype.isChildAvailable=function(e,t,i,n){$.a.typeOf.number("thisX",e),$.a.typeOf.number("thisY",t),$.a.typeOf.number("childX",i),$.a.typeOf.number("childY",n);var a=2;return i!==2*e&&++a,n!==2*t&&(a-=2),0!=(this._childTileMask&1<10){for(var e=this._terrainCache,t=Object.keys(e),i=t.length,n=0;n10&&delete e[a]}ln.default.clone(hn,this._lastTidy)}},Object.defineProperties(mn.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tilingScheme:{get:function(){if(!this._ready)throw new u.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasWaterMask:{get:function(){return!1}},hasVertexNormals:{get:function(){return!1}},availability:{get:function(){}}});var _n=new Ne.a("decodeGoogleEarthEnterprisePacket");function gn(e,t,i){var n=t.getChildBitmask();if(t.terrainState===fn){n=0;for(var a=0;a<4;++a){var r=i.getTileInformationFromQuadKey(e+a.toString());Object(l.default)(r)&&r.hasTerrain()&&(n|=1<0?i:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1c-0"+t+"-t."+i.toString(),request:n})}(this,_,v,w=n).fetchArrayBuffer();if(!Object(l.default)(A))return;y=A.then((function(e){return Object(l.default)(e)?_n.scheduleTask({buffer:e,type:"Terrain",key:s.key},[e]).then((function(e){var t=s.getTileInformationFromQuadKey(_);t.terrainState=cn,o.add(_,e[0]);for(var i=t.terrainProvider,n=e.length-1,a=0;at.height?r=n*(t.height/t.width):t.width0?new Array(a):void 0;for(n=0;n0&&(oe.default.pack(D,i,S),S+=3,r=s[t-1],a[M++]=Ot.default.floatToByte(r.red),a[M++]=Ot.default.floatToByte(r.green),a[M++]=Ot.default.floatToByte(r.blue),a[M++]=Ot.default.floatToByte(r.alpha)),p&&t===m-1)break;oe.default.pack(D,i,S),S+=3,Object(l.default)(s)&&(r=s[t],a[M++]=Ot.default.floatToByte(r.red),a[M++]=Ot.default.floatToByte(r.green),a[M++]=Ot.default.floatToByte(r.blue),a[M++]=Ot.default.floatToByte(r.alpha))}}var P=new xi.a;P.position=new Oi.default({componentDatatype:At.default.DOUBLE,componentsPerAttribute:3,values:i}),Object(l.default)(s)&&(P.color=new Oi.default({componentDatatype:At.default.UNSIGNED_BYTE,componentsPerAttribute:4,values:a,normalize:!0}));var I=2*((n=i.length/3)-1),L=Pe.a.createTypedArray(n,I),j=0;for(t=0;td?d:u<0?0:u;var f=n?Object(s.default)(this.tolerance,1):.001;Math.abs(a-c)>f&&(this._seeking=!0,t.currentTime=a)}}};var Rr,Nr=jr,Br=i(176),Fr=Object.freeze({VK_FORMAT_UNDEFINED:0,VK_FORMAT_R4G4_UNORM_PACK8:1,VK_FORMAT_R4G4B4A4_UNORM_PACK16:2,VK_FORMAT_B4G4R4A4_UNORM_PACK16:3,VK_FORMAT_R5G6B5_UNORM_PACK16:4,VK_FORMAT_B5G6R5_UNORM_PACK16:5,VK_FORMAT_R5G5B5A1_UNORM_PACK16:6,VK_FORMAT_B5G5R5A1_UNORM_PACK16:7,VK_FORMAT_A1R5G5B5_UNORM_PACK16:8,VK_FORMAT_R8_UNORM:9,VK_FORMAT_R8_SNORM:10,VK_FORMAT_R8_USCALED:11,VK_FORMAT_R8_SSCALED:12,VK_FORMAT_R8_UINT:13,VK_FORMAT_R8_SINT:14,VK_FORMAT_R8_SRGB:15,VK_FORMAT_R8G8_UNORM:16,VK_FORMAT_R8G8_SNORM:17,VK_FORMAT_R8G8_USCALED:18,VK_FORMAT_R8G8_SSCALED:19,VK_FORMAT_R8G8_UINT:20,VK_FORMAT_R8G8_SINT:21,VK_FORMAT_R8G8_SRGB:22,VK_FORMAT_R8G8B8_UNORM:23,VK_FORMAT_R8G8B8_SNORM:24,VK_FORMAT_R8G8B8_USCALED:25,VK_FORMAT_R8G8B8_SSCALED:26,VK_FORMAT_R8G8B8_UINT:27,VK_FORMAT_R8G8B8_SINT:28,VK_FORMAT_R8G8B8_SRGB:29,VK_FORMAT_B8G8R8_UNORM:30,VK_FORMAT_B8G8R8_SNORM:31,VK_FORMAT_B8G8R8_USCALED:32,VK_FORMAT_B8G8R8_SSCALED:33,VK_FORMAT_B8G8R8_UINT:34,VK_FORMAT_B8G8R8_SINT:35,VK_FORMAT_B8G8R8_SRGB:36,VK_FORMAT_R8G8B8A8_UNORM:37,VK_FORMAT_R8G8B8A8_SNORM:38,VK_FORMAT_R8G8B8A8_USCALED:39,VK_FORMAT_R8G8B8A8_SSCALED:40,VK_FORMAT_R8G8B8A8_UINT:41,VK_FORMAT_R8G8B8A8_SINT:42,VK_FORMAT_R8G8B8A8_SRGB:43,VK_FORMAT_B8G8R8A8_UNORM:44,VK_FORMAT_B8G8R8A8_SNORM:45,VK_FORMAT_B8G8R8A8_USCALED:46,VK_FORMAT_B8G8R8A8_SSCALED:47,VK_FORMAT_B8G8R8A8_UINT:48,VK_FORMAT_B8G8R8A8_SINT:49,VK_FORMAT_B8G8R8A8_SRGB:50,VK_FORMAT_A8B8G8R8_UNORM_PACK32:51,VK_FORMAT_A8B8G8R8_SNORM_PACK32:52,VK_FORMAT_A8B8G8R8_USCALED_PACK32:53,VK_FORMAT_A8B8G8R8_SSCALED_PACK32:54,VK_FORMAT_A8B8G8R8_UINT_PACK32:55,VK_FORMAT_A8B8G8R8_SINT_PACK32:56,VK_FORMAT_A8B8G8R8_SRGB_PACK32:57,VK_FORMAT_A2R10G10B10_UNORM_PACK32:58,VK_FORMAT_A2R10G10B10_SNORM_PACK32:59,VK_FORMAT_A2R10G10B10_USCALED_PACK32:60,VK_FORMAT_A2R10G10B10_SSCALED_PACK32:61,VK_FORMAT_A2R10G10B10_UINT_PACK32:62,VK_FORMAT_A2R10G10B10_SINT_PACK32:63,VK_FORMAT_A2B10G10R10_UNORM_PACK32:64,VK_FORMAT_A2B10G10R10_SNORM_PACK32:65,VK_FORMAT_A2B10G10R10_USCALED_PACK32:66,VK_FORMAT_A2B10G10R10_SSCALED_PACK32:67,VK_FORMAT_A2B10G10R10_UINT_PACK32:68,VK_FORMAT_A2B10G10R10_SINT_PACK32:69,VK_FORMAT_R16_UNORM:70,VK_FORMAT_R16_SNORM:71,VK_FORMAT_R16_USCALED:72,VK_FORMAT_R16_SSCALED:73,VK_FORMAT_R16_UINT:74,VK_FORMAT_R16_SINT:75,VK_FORMAT_R16_SFLOAT:76,VK_FORMAT_R16G16_UNORM:77,VK_FORMAT_R16G16_SNORM:78,VK_FORMAT_R16G16_USCALED:79,VK_FORMAT_R16G16_SSCALED:80,VK_FORMAT_R16G16_UINT:81,VK_FORMAT_R16G16_SINT:82,VK_FORMAT_R16G16_SFLOAT:83,VK_FORMAT_R16G16B16_UNORM:84,VK_FORMAT_R16G16B16_SNORM:85,VK_FORMAT_R16G16B16_USCALED:86,VK_FORMAT_R16G16B16_SSCALED:87,VK_FORMAT_R16G16B16_UINT:88,VK_FORMAT_R16G16B16_SINT:89,VK_FORMAT_R16G16B16_SFLOAT:90,VK_FORMAT_R16G16B16A16_UNORM:91,VK_FORMAT_R16G16B16A16_SNORM:92,VK_FORMAT_R16G16B16A16_USCALED:93,VK_FORMAT_R16G16B16A16_SSCALED:94,VK_FORMAT_R16G16B16A16_UINT:95,VK_FORMAT_R16G16B16A16_SINT:96,VK_FORMAT_R16G16B16A16_SFLOAT:97,VK_FORMAT_R32_UINT:98,VK_FORMAT_R32_SINT:99,VK_FORMAT_R32_SFLOAT:100,VK_FORMAT_R32G32_UINT:101,VK_FORMAT_R32G32_SINT:102,VK_FORMAT_R32G32_SFLOAT:103,VK_FORMAT_R32G32B32_UINT:104,VK_FORMAT_R32G32B32_SINT:105,VK_FORMAT_R32G32B32_SFLOAT:106,VK_FORMAT_R32G32B32A32_UINT:107,VK_FORMAT_R32G32B32A32_SINT:108,VK_FORMAT_R32G32B32A32_SFLOAT:109,VK_FORMAT_R64_UINT:110,VK_FORMAT_R64_SINT:111,VK_FORMAT_R64_SFLOAT:112,VK_FORMAT_R64G64_UINT:113,VK_FORMAT_R64G64_SINT:114,VK_FORMAT_R64G64_SFLOAT:115,VK_FORMAT_R64G64B64_UINT:116,VK_FORMAT_R64G64B64_SINT:117,VK_FORMAT_R64G64B64_SFLOAT:118,VK_FORMAT_R64G64B64A64_UINT:119,VK_FORMAT_R64G64B64A64_SINT:120,VK_FORMAT_R64G64B64A64_SFLOAT:121,VK_FORMAT_B10G11R11_UFLOAT_PACK32:122,VK_FORMAT_E5B9G9R9_UFLOAT_PACK32:123,VK_FORMAT_D16_UNORM:124,VK_FORMAT_X8_D24_UNORM_PACK32:125,VK_FORMAT_D32_SFLOAT:126,VK_FORMAT_S8_UINT:127,VK_FORMAT_D16_UNORM_S8_UINT:128,VK_FORMAT_D24_UNORM_S8_UINT:129,VK_FORMAT_D32_SFLOAT_S8_UINT:130,VK_FORMAT_BC1_RGB_UNORM_BLOCK:131,VK_FORMAT_BC1_RGB_SRGB_BLOCK:132,VK_FORMAT_BC1_RGBA_UNORM_BLOCK:133,VK_FORMAT_BC1_RGBA_SRGB_BLOCK:134,VK_FORMAT_BC2_UNORM_BLOCK:135,VK_FORMAT_BC2_SRGB_BLOCK:136,VK_FORMAT_BC3_UNORM_BLOCK:137,VK_FORMAT_BC3_SRGB_BLOCK:138,VK_FORMAT_BC4_UNORM_BLOCK:139,VK_FORMAT_BC4_SNORM_BLOCK:140,VK_FORMAT_BC5_UNORM_BLOCK:141,VK_FORMAT_BC5_SNORM_BLOCK:142,VK_FORMAT_BC6H_UFLOAT_BLOCK:143,VK_FORMAT_BC6H_SFLOAT_BLOCK:144,VK_FORMAT_BC7_UNORM_BLOCK:145,VK_FORMAT_BC7_SRGB_BLOCK:146,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:147,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:148,VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK:149,VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK:150,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:151,VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK:152,VK_FORMAT_EAC_R11_UNORM_BLOCK:153,VK_FORMAT_EAC_R11_SNORM_BLOCK:154,VK_FORMAT_EAC_R11G11_UNORM_BLOCK:155,VK_FORMAT_EAC_R11G11_SNORM_BLOCK:156,VK_FORMAT_ASTC_4x4_UNORM_BLOCK:157,VK_FORMAT_ASTC_4x4_SRGB_BLOCK:158,VK_FORMAT_ASTC_5x4_UNORM_BLOCK:159,VK_FORMAT_ASTC_5x4_SRGB_BLOCK:160,VK_FORMAT_ASTC_5x5_UNORM_BLOCK:161,VK_FORMAT_ASTC_5x5_SRGB_BLOCK:162,VK_FORMAT_ASTC_6x5_UNORM_BLOCK:163,VK_FORMAT_ASTC_6x5_SRGB_BLOCK:164,VK_FORMAT_ASTC_6x6_UNORM_BLOCK:165,VK_FORMAT_ASTC_6x6_SRGB_BLOCK:166,VK_FORMAT_ASTC_8x5_UNORM_BLOCK:167,VK_FORMAT_ASTC_8x5_SRGB_BLOCK:168,VK_FORMAT_ASTC_8x6_UNORM_BLOCK:169,VK_FORMAT_ASTC_8x6_SRGB_BLOCK:170,VK_FORMAT_ASTC_8x8_UNORM_BLOCK:171,VK_FORMAT_ASTC_8x8_SRGB_BLOCK:172,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:173,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:174,VK_FORMAT_ASTC_10x6_UNORM_BLOCK:175,VK_FORMAT_ASTC_10x6_SRGB_BLOCK:176,VK_FORMAT_ASTC_10x8_UNORM_BLOCK:177,VK_FORMAT_ASTC_10x8_SRGB_BLOCK:178,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:179,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:180,VK_FORMAT_ASTC_12x10_UNORM_BLOCK:181,VK_FORMAT_ASTC_12x10_SRGB_BLOCK:182,VK_FORMAT_ASTC_12x12_UNORM_BLOCK:183,VK_FORMAT_ASTC_12x12_SRGB_BLOCK:184,VK_FORMAT_G8B8G8R8_422_UNORM:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:1000156006,VK_FORMAT_R10X6_UNORM_PACK16:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16:1000156016,VK_FORMAT_R12X4_UNORM_PACK16:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:1000156033,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:1000054e3,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:1000054001,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:1000054002,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:1000054003,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:1000054004,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:1000054005,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:1000054006,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:1000054007,VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT:1000066e3,VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT:1000066001,VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT:1000066002,VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK_EXT:1000066003,VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK_EXT:1000066004,VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK_EXT:1000066005,VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK_EXT:1000066006,VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK_EXT:1000066007,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:1000066008,VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK_EXT:1000066009,VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK_EXT:1000066010,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:1000066011,VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK_EXT:1000066012,VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK_EXT:1000066013,VK_FORMAT_G8B8G8R8_422_UNORM_KHR:1000156e3,VK_FORMAT_B8G8R8G8_422_UNORM_KHR:1000156001,VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM_KHR:1000156002,VK_FORMAT_G8_B8R8_2PLANE_420_UNORM_KHR:1000156003,VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM_KHR:1000156004,VK_FORMAT_G8_B8R8_2PLANE_422_UNORM_KHR:1000156005,VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM_KHR:1000156006,VK_FORMAT_R10X6_UNORM_PACK16_KHR:1000156007,VK_FORMAT_R10X6G10X6_UNORM_2PACK16_KHR:1000156008,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16_KHR:1000156009,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16_KHR:1000156010,VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16_KHR:1000156011,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16_KHR:1000156012,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16_KHR:1000156013,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16_KHR:1000156014,VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16_KHR:1000156015,VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16_KHR:1000156016,VK_FORMAT_R12X4_UNORM_PACK16_KHR:1000156017,VK_FORMAT_R12X4G12X4_UNORM_2PACK16_KHR:1000156018,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16_KHR:1000156019,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16_KHR:1000156020,VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16_KHR:1000156021,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16_KHR:1000156022,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16_KHR:1000156023,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16_KHR:1000156024,VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16_KHR:1000156025,VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16_KHR:1000156026,VK_FORMAT_G16B16G16R16_422_UNORM_KHR:1000156027,VK_FORMAT_B16G16R16G16_422_UNORM_KHR:1000156028,VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM_KHR:1000156029,VK_FORMAT_G16_B16R16_2PLANE_420_UNORM_KHR:1000156030,VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM_KHR:1000156031,VK_FORMAT_G16_B16R16_2PLANE_422_UNORM_KHR:1000156032,VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM_KHR:1000156033}),kr=i(851),zr=i(456),Ur=i(852),Vr=i(10),Hr=i(135),Gr=i(865),Yr=i(187),Wr=i(551),qr=i(68),Xr=i(149),Kr=i(113),Jr=i(430);"undefined"!=typeof cancelAnimationFrame&&(Rr=cancelAnimationFrame),function(){if(!Object(l.default)(Rr)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t=d&&(r=c=(c+8)%24);s0&&a.y>0&&a.z>0)},Eo=i(277),Co=i(478);function So(e,t,i){var n=t.interpolateHeight(i,e.longitude,e.latitude);return void 0!==n&&(e.height=n,!0)}function Mo(e){var t=e.positions,i=e.tilingScheme.tileXYToRectangle(e.x,e.y,e.level);return function(n){for(var r=!1,o=0;o0)return e(t,n)})).then((function(){return i}))}))},jo=i(421),Ro=i(559),No=i(379);var Bo=function(e,t,i){if("function"!=typeof t)throw new u.default("oldFunction is required to be a function.");if("function"!=typeof i)throw new u.default("oldFunction is required to be a function.");return function(){i.apply(e,arguments),t.apply(e,arguments)}},Fo=i(252),ko=i(832),zo=i(48),Uo=i(834),Vo=i(434),Ho=i(309),Go=i(440),Yo=i(871),Wo=i(538),qo=i(63),Xo=i(170),Ko=i(219),Jo={id:void 0},Zo=new Array(2);function Qo(e){for(var t=e.propertyNames,i=t.length,n=0;n-1;a--)es(0,p,o,i=n[a]);for(t=u-1;t>=0;t--)for((r=s[t]).collectionChanged.addEventListener(is.prototype._onCollectionChanged,e),n=r.values,o=r.id,a=n.length-1;a>-1;a--){$o(e,p,o,i=n[a]);var m=h.getById(i.id);Object(l.default)(m)||(m=f.getById(i.id),Object(l.default)(m)?Qo(m):(Jo.id=i.id,m=new Xo.a(Jo)),h.add(m)),m.merge(i)}e._collectionsCopy=s.slice(0),f.suspendEvents(),f.removeAll();var _=h.values;for(t=0;t<_.length;t++)f.add(_[t]);f.resumeEvents()}}function is(e,t){this._owner=t,this._composite=new Ko.a(this),this._suspendCount=0,this._collections=Object(l.default)(e)?e.slice():[],this._collectionsCopy=[],this._id=Object($r.default)(),this._eventHash={},ts(this),this._shouldRecomposite=!1}function ns(e,t){if(!Object(l.default)(t))throw new u.default("collection is required.");var i=e.indexOf(t);if(-1===i)throw new u.default("collection is not in this composite.");return i}function as(e,t,i){var n=e._collections;if((t=Re.default.clamp(t,0,n.length-1))!==(i=Re.default.clamp(i,0,n.length-1))){var a=n[t];n[t]=n[i],n[i]=a,ts(e)}}Object.defineProperties(is.prototype,{collectionChanged:{get:function(){return this._composite._collectionChanged}},id:{get:function(){return this._id}},values:{get:function(){return this._composite.values}},owner:{get:function(){return this._owner}}}),is.prototype.addCollection=function(e,t){var i=Object(l.default)(t);if(!Object(l.default)(e))throw new u.default("collection is required.");if(i){if(t<0)throw new u.default("index must be greater than or equal to zero.");if(t>this._collections.length)throw new u.default("index must be less than or equal to the number of collections.")}i?this._collections.splice(t,0,e):(t=this._collections.length,this._collections.push(e)),ts(this)},is.prototype.removeCollection=function(e){var t=this._collections.indexOf(e);return-1!==t&&(this._collections.splice(t,1),ts(this),!0)},is.prototype.removeAllCollections=function(){this._collections.length=0,ts(this)},is.prototype.containsCollection=function(e){return-1!==this._collections.indexOf(e)},is.prototype.contains=function(e){return this._composite.contains(e)},is.prototype.indexOfCollection=function(e){return this._collections.indexOf(e)},is.prototype.getCollection=function(e){if(!Object(l.default)(e))throw new u.default("index is required.","index");return this._collections[e]},is.prototype.getCollectionsLength=function(){return this._collections.length},is.prototype.raiseCollection=function(e){var t=ns(this._collections,e);as(this,t,t+1)},is.prototype.lowerCollection=function(e){var t=ns(this._collections,e);as(this,t,t-1)},is.prototype.raiseCollectionToTop=function(e){var t=ns(this._collections,e);t!==this._collections.length-1&&(this._collections.splice(t,1),this._collections.push(e),ts(this))},is.prototype.lowerCollectionToBottom=function(e){var t=ns(this._collections,e);0!==t&&(this._collections.splice(t,1),this._collections.splice(0,0,e),ts(this))},is.prototype.suspendEvents=function(){this._suspendCount++,this._composite.suspendEvents()},is.prototype.resumeEvents=function(){if(0===this._suspendCount)throw new u.default("resumeEvents can not be called before suspendEvents.");this._suspendCount--,this._shouldRecomposite&&0===this._suspendCount&&(ts(this),this._shouldRecomposite=!1),this._composite.resumeEvents()},is.prototype.computeAvailability=function(){return this._composite.computeAvailability()},is.prototype.getById=function(e){return this._composite.getById(e)},is.prototype._onCollectionChanged=function(e,t,i){var n,a,r,o,s=this._collectionsCopy,u=s.length,d=this._composite;d.suspendEvents();var c=i.length,f=this._eventHash,h=e.id;for(n=0;n=0;a--)r=s[a].getById(m),Object(l.default)(r)&&(Object(l.default)(o)||Qo(o=d.getById(m)),o.merge(r));Object(l.default)(o)||d.removeById(m),o=void 0}var _=t.length;for(n=0;n<_;n++){var g=t[n];$o(this,f,h,g);var v=g.id;for(a=u-1;a>=0;a--)r=s[a].getById(v),Object(l.default)(r)&&(Object(l.default)(o)||(o=d.getById(v),Object(l.default)(o)?Qo(o):(Jo.id=v,o=new Xo.a(Jo),d.add(o))),o.merge(r));o=void 0}d.resumeEvents()},is.prototype._onDefinitionChanged=function(e,t,i,n){for(var a=this._collections,r=this._composite,o=a.length,s=e.id,u=r.getById(s),d=u[t],c=!Object(l.default)(d),f=!0,h=o-1;h>=0;h--){var p=a[h].getById(e.id);if(Object(l.default)(p)){var m=p[t];if(Object(l.default)(m)){if(f){if(f=!1,!Object(l.default)(m.merge)||!Object(l.default)(m.clone)){d=m;break}d=m.clone(d)}d.merge(m)}}}c&&-1===u.propertyNames.indexOf(t)&&u.addProperty(t),u[t]=d};var rs=is,os=i(539),ss=i(212),ls=i(232),us=i(238),ds=i(109),cs=i(835),fs=i(435),hs=i(492),ps=i(837),ms=i(436),_s=i(500),gs=i(211),vs=i(411),ys=i(499),bs=i(420),ws=i(454),Os=i(112),xs=i(838),As=i(437),Ts=i(839),Es=i(438),Cs=i(304),Ss=i(13),Ms=new $n.default,Ds=new $n.default,Ps=new $n.default,Is=new ce.default,Ls=new oe.default,js=new oe.default,Rs=new oe.default,Ns=new oe.default,Bs=new oe.default,Fs=new oe.default,ks=new ln.default;function zs(e,t,i){$.a.defined("entity",e),$.a.defined("scene",t),this.entity=e,this.scene=t,this.ellipsoid=Object(s.default)(i,d.default.WGS84),this.boundingSphere=void 0,this._lastEntity=void 0,this._mode=void 0,this._lastCartesian=new oe.default,this._defaultOffset3D=void 0,this._offset3D=new oe.default}Object.defineProperties(zs,{defaultOffset3D:{get:function(){return this._defaultOffset3D},set:function(e){this._defaultOffset3D=oe.default.clone(e,new oe.default)}}}),zs.defaultOffset3D=new oe.default(-14e3,3500,3500);var Us=new wn.a,Vs=new oe.default;zs.prototype.update=function(e,t){$.a.defined("time",e);var i=this.scene,n=this.ellipsoid,a=i.mode;if(a!==Ss.default.MORPHING){var r=this.entity,o=r.position;if(Object(l.default)(o)){var s=r!==this._lastEntity,u=a!==this._mode,d=i.camera,c=s||u,f=!0;if(s){var h=r.viewFrom,p=Object(l.default)(h);if(!p&&Object(l.default)(t)){Us.pitch=-Re.default.PI_OVER_FOUR,Us.range=0;var m=o.getValue(e,Vs);if(Object(l.default)(m)){var _=2-1/Math.max(1,oe.default.magnitude(m)/n.maximumRadius);Us.pitch*=_}d.viewBoundingSphere(t,Us),this.boundingSphere=t,c=!1,f=!1}else p&&Object(l.default)(h.getValue(e,this._offset3D))||oe.default.clone(zs._defaultOffset3D,this._offset3D)}else u||this._mode===Ss.default.SCENE2D||oe.default.clone(d.position,this._offset3D);this._lastEntity=r,this._mode=a,function(e,t,i,n,a,r,o){var s=e.scene.mode,u=a.getValue(r,e._lastCartesian);if(Object(l.default)(u)){var d,c,f,h,p,m,_=!1,g=!1;if(s===Ss.default.SCENE3D){ln.default.addSeconds(r,.001,ks);var v=a.getValue(ks,Ls);if(Object(l.default)(v)||(ln.default.addSeconds(r,-.001,ks),v=a.getValue(ks,Ls),g=!0),Object(l.default)(v)){var y,b=xr.default.computeFixedToIcrfMatrix(r,Ms),w=xr.default.computeFixedToIcrfMatrix(ks,Ds);Object(l.default)(b)&&Object(l.default)(w)?y=$n.default.transpose(b,Ps):(y=xr.default.computeTemeToPseudoFixedMatrix(r,Ps),b=$n.default.transpose(y,Ms),w=xr.default.computeTemeToPseudoFixedMatrix(ks,Ds),$n.default.transpose(w,w));var O=$n.default.multiplyByVector(b,u,Bs),x=$n.default.multiplyByVector(w,v,Fs);oe.default.subtract(O,x,Ns);var A=1e3*oe.default.magnitude(Ns),T=Re.default.GRAVITATIONALPARAMETER,E=-T/(A*A-2*T/oe.default.magnitude(O));E<0||E>1.25*o.maximumRadius?(d=js,oe.default.normalize(u,d),oe.default.negate(d,d),f=oe.default.clone(oe.default.UNIT_Z,Rs),c=oe.default.cross(f,d,Ls),oe.default.magnitude(c)>Re.default.EPSILON7&&(oe.default.normalize(d,d),oe.default.normalize(c,c),f=oe.default.cross(d,c,Rs),oe.default.normalize(f,f),_=!0)):oe.default.equalsEpsilon(u,v,Re.default.EPSILON7)||(f=js,oe.default.normalize(O,f),oe.default.normalize(x,x),c=oe.default.cross(f,x,Rs),g&&(c=oe.default.multiplyByScalar(c,-1,c)),oe.default.equalsEpsilon(c,oe.default.ZERO,Re.default.EPSILON7)||(d=oe.default.cross(c,f,Ls),$n.default.multiplyByVector(y,d,d),$n.default.multiplyByVector(y,c,c),$n.default.multiplyByVector(y,f,f),oe.default.normalize(d,d),oe.default.normalize(c,c),oe.default.normalize(f,f),_=!0))}}Object(l.default)(e.boundingSphere)&&(u=e.boundingSphere.center),n&&(h=oe.default.clone(t.position,Ns),p=oe.default.clone(t.direction,Bs),m=oe.default.clone(t.up,Fs));var C=Is;_?(C[0]=d.x,C[1]=d.y,C[2]=d.z,C[3]=0,C[4]=c.x,C[5]=c.y,C[6]=c.z,C[7]=0,C[8]=f.x,C[9]=f.y,C[10]=f.z,C[11]=0,C[12]=u.x,C[13]=u.y,C[14]=u.z,C[15]=0):xr.default.eastNorthUpToFixedFrame(u,o,C),t._setTransform(C),n&&(oe.default.clone(h,t.position),oe.default.clone(p,t.direction),oe.default.clone(m,t.up),oe.default.cross(p,m,t.right))}if(i){var S=s===Ss.default.SCENE2D||oe.default.equals(e._offset3D,oe.default.ZERO)?void 0:e._offset3D;t.lookAtTransform(t.transform,S)}}(this,d,c,f,o,e,n)}}};var Hs=zs,Gs=i(42),Ys=i(89);function Ws(e){return e}function qs(e){if(null==e)return Ws;var t,i,n=e.scale[0],a=e.scale[1],r=e.translate[0],o=e.translate[1];return function(e,s){s||(t=i=0);var l=2,u=e.length,d=new Array(u);for(d[0]=(t+=e[0])*n+r,d[1]=(i+=e[1])*a+o;lr&&(r=e[0]),e[1]o&&(o=e[1])}function l(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(l);break;case"Point":s(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(s)}}for(t in e.arcs.forEach((function(e){for(var t,s=-1,l=e.length;++sr&&(r=t[0]),t[1]o&&(o=t[1])})),e.objects)l(e.objects[t]);return[n,a,r,o]}function Ks(e,t){var i=t.id,n=t.bbox,a=null==t.properties?{}:t.properties,r=Js(e,t);return null==i&&null==n?{type:"Feature",properties:a,geometry:r}:null==n?{type:"Feature",id:i,properties:a,geometry:r}:{type:"Feature",id:i,bbox:n,properties:a,geometry:r}}function Js(e,t){var i=qs(e.transform),n=e.arcs;function a(e,t){t.length&&t.pop();for(var a=n[e<0?~e:e],r=0,o=a.length;r1)n=$s(e,t,i);else for(a=0,n=new Array(r=e.arcs.length);a1)for(var r,s,l=1,u=o(a[0]);lu&&(s=a[0],a[0]=a[l],a[l]=s,u=r);return a})).filter((function(e){return e.length>0}))}}function tl(e,t){for(var i=0,n=e.length;i>>1;e[a]=2))throw new Error("n must be ≥2");var i,n=(s=e.bbox||Xs(e))[0],a=s[1],r=s[2],o=s[3];t={scale:[r-n?(r-n)/(i-1):1,o-a?(o-a)/(i-1):1],translate:[n,a]}}var s,l,u=il(t),d=e.objects,c={};function f(e){return u(e)}function h(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(h)};break;case"Point":t={type:"Point",coordinates:f(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(f)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(l in d)c[l]=h(d[l]);return{type:"Topology",bbox:s,transform:t,objects:c,arcs:e.arcs.map((function(e){var t,i=0,n=1,a=e.length,r=new Array(a);for(r[0]=u(e[0],0);++i"+n+""+yl(a)+"":""+n+""+a+"")}return i.length>0&&(i=''+i+"
"),i}function bl(e,t){return new Ho.a(function(e,t,i){var n;return function(a,r){return Object(l.default)(n)||(n=e(t,i)),n}}(yl,e,t),!0)}function wl(e,t,i){var n=e.id;if(Object(l.default)(n)&&"Feature"===e.type){for(var a=2,r=n;Object(l.default)(t.getById(r));)r=n+"_"+a,a++;n=r}else n=Object($r.default)();var o=t.getOrCreateEntity(n),s=e.properties;if(Object(l.default)(s)){var u;o.properties=s;var d=s.title;if(Object(l.default)(d))o.name=d,u="title";else{var c=Number.MAX_VALUE;for(var f in s)if(s.hasOwnProperty(f)&&s[f]){var h=f.toLowerCase();if(c>1&&"title"===h){c=1,u=f;break}c>2&&"name"===h?(c=2,u=f):c>3&&/title/i.test(f)?(c=3,u=f):c>4&&/name/i.test(f)&&(c=4,u=f)}Object(l.default)(u)&&(o.name=s[u])}var p=s.description;null!==p&&(o.description=Object(l.default)(p)?new ds.default(p):i(s,u))}return o}function Ol(e,t){for(var i=new Array(e.length),n=0;n2?_.perPositionHeight=new ds.default(!0):a.clampToGround||(_.height=0),wl(t,e._entityCollection,a.describe).polygon=_}}function jl(e,t,i,n,a){Ll(e,t,n,i.coordinates,a)}function Rl(e,t,i,n,a){for(var r=i.coordinates,o=0;o=0;i--)!0===t(e[i])&&e.splice(i,1)}function Kl(e){throw new Error("Unhandled case for value: '"+e+"'")}var Jl=function(){function e(e){void 0===e&&(e={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=e.tagName||"",this.attrs=e.attrs||{},this.innerHTML=e.innerHtml||e.innerHTML||""}return e.prototype.setTagName=function(e){return this.tagName=e,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(e,t){return this.getAttrs()[e]=t,this},e.prototype.getAttr=function(e){return this.getAttrs()[e]},e.prototype.setAttrs=function(e){return Object.assign(this.getAttrs(),e),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(e){return this.setAttr("class",e)},e.prototype.addClass=function(e){for(var t,i=this.getClass(),n=this.whitespaceRegex,a=i?i.split(n):[],r=e.split(n);t=r.shift();)-1===ql(a,t)&&a.push(t);return this.getAttrs().class=a.join(" "),this},e.prototype.removeClass=function(e){for(var t,i=this.getClass(),n=this.whitespaceRegex,a=i?i.split(n):[],r=e.split(n);a.length&&(t=r.shift());){var o=ql(a,t);-1!==o&&a.splice(o,1)}return this.getAttrs().class=a.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(e){return-1!==(" "+this.getClass()+" ").indexOf(" "+e+" ")},e.prototype.setInnerHTML=function(e){return this.innerHTML=e,this},e.prototype.setInnerHtml=function(e){return this.setInnerHTML(e)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var e=this.getTagName(),t=this.buildAttrsStr();return["<",e,t=t?" "+t:"",">",this.getInnerHtml(),""].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var e=this.getAttrs(),t=[];for(var i in e)e.hasOwnProperty(i)&&t.push(i+'="'+e[i]+'"');return t.join(" ")},e}();var Zl=function(){function e(e){void 0===e&&(e={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=e.newWindow||!1,this.truncate=e.truncate||{},this.className=e.className||""}return e.prototype.build=function(e){return new Jl({tagName:"a",attrs:this.createAttrs(e),innerHtml:this.processAnchorText(e.getAnchorText())})},e.prototype.createAttrs=function(e){var t={href:e.getAnchorHref()},i=this.createCssClass(e);return i&&(t.class=i),this.newWindow&&(t.target="_blank",t.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length=s)return l.host.length==t?(l.host.substr(0,t-a)+i).substr(0,s+n):o(d,s).substr(0,s+n);var c="";if(l.path&&(c+="/"+l.path),l.query&&(c+="?"+l.query),c){if((d+c).length>=s)return(d+c).length==t?(d+c).substr(0,t):(d+o(c,s-d.length)).substr(0,s+n);d+=c}if(l.fragment){var f="#"+l.fragment;if((d+f).length>=s)return(d+f).length==t?(d+f).substr(0,t):(d+o(f,s-d.length)).substr(0,s+n);d+=f}if(l.scheme&&l.host){var h=l.scheme+"://";if((d+h).length0&&(p=d.substr(-1*Math.floor(s/2))),(d.substr(0,Math.ceil(s/2))+i+p).substr(0,s+n)}(e,i):"middle"===n?function(e,t,i){if(e.length<=t)return e;var n,a;null==i?(i="…",n=8,a=3):(n=i.length,a=i.length);var r=t-a,o="";return r>0&&(o=e.substr(-1*Math.floor(r/2))),(e.substr(0,Math.ceil(r/2))+i+o).substr(0,r+n)}(e,i):function(e,t,i){return function(e,t,i){var n;return e.length>t&&(null==i?(i="…",n=3):n=i.length,e=e.substring(0,t-n)+i),e}(e,t,i)}(e,i)},e}(),Ql=function(){function e(e){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=e.tagBuilder,this.matchedText=e.matchedText,this.offset=e.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(e){this.offset=e},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),$l=function(e,t){return($l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};function eu(e,t){function i(){this.constructor=e}$l(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}var tu,iu=function(){return(iu=Object.assign||function(e){for(var t,i=1,n=arguments.length;i-1},e.isValidUriScheme=function(e){var t=e.match(this.uriSchemeRegex),i=t&&t[0].toLowerCase();return"javascript:"!==i&&"vbscript:"!==i},e.urlMatchDoesNotHaveProtocolOrDot=function(e,t){return!(!e||t&&this.hasFullProtocolRegex.test(t)||-1!==e.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(e,t){return!(!e||!t)&&(!this.hasFullProtocolRegex.test(t)&&!this.hasWordCharAfterProtocolRegex.test(e))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+mu+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),Pu=(tu=new RegExp("[/?#](?:["+yu+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^✓]*["+yu+"\\-+&@#/%=~_()|'$*\\[\\]{}✓])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,xu(2),")","|","(","(//)?",/(?:www\.)/.source,xu(6),")","|","(","(//)?",xu(10)+"\\.",Tu.source,"(?![-"+vu+"])",")",")","(?::[0-9]+)?","(?:"+tu.source+")?"].join(""),"gi")),Iu=new RegExp("["+yu+"]"),Lu=function(e){function t(t){var i=e.call(this,t)||this;return i.stripPrefix={scheme:!0,www:!0},i.stripTrailingSlash=!0,i.decodePercentEncoding=!0,i.matcherRegex=Pu,i.wordCharRegExp=Iu,i.stripPrefix=t.stripPrefix,i.stripTrailingSlash=t.stripTrailingSlash,i.decodePercentEncoding=t.decodePercentEncoding,i}return eu(t,e),t.prototype.parseMatches=function(e){for(var t,i=this.matcherRegex,n=this.stripPrefix,a=this.stripTrailingSlash,r=this.decodePercentEncoding,o=this.tagBuilder,s=[],l=function(){var i=t[0],l=t[1],d=t[4],c=t[5],f=t[9],h=t.index,p=c||f,m=e.charAt(h-1);if(!Du.isValid(i,l))return"continue";if(h>0&&"@"===m)return"continue";if(h>0&&p&&u.wordCharRegExp.test(m))return"continue";if(/\?$/.test(i)&&(i=i.substr(0,i.length-1)),u.matchHasUnbalancedClosingParen(i))i=i.substr(0,i.length-1);else{var _=u.matchHasInvalidCharAfterTld(i,l);_>-1&&(i=i.substr(0,_))}var g=["http://","https://"].find((function(e){return!!l&&-1!==l.indexOf(e)}));if(g){var v=i.indexOf(g);i=i.substr(v),l=l.substr(v),h+=v}var y=l?"scheme":d?"www":"tld",b=!!l;s.push(new su({tagBuilder:o,matchedText:i,offset:h,urlMatchType:y,url:i,protocolUrlMatch:b,protocolRelativeMatch:!!p,stripPrefix:n,stripTrailingSlash:a,decodePercentEncoding:r}))},u=this;null!==(t=i.exec(e));)l();return s},t.prototype.matchHasUnbalancedClosingParen=function(e){var t,i=e.charAt(e.length-1);if(")"===i)t="(";else if("]"===i)t="[";else{if("}"!==i)return!1;t="{"}for(var n=0,a=0,r=e.length-1;a"===e?(h=new Yu(iu(iu({},h),{name:k()})),F()):uu.test(e)||du.test(e)||":"===e||N()}function v(e){">"===e?N():uu.test(e)?c=3:N()}function y(e){fu.test(e)||("/"===e?c=12:">"===e?F():"<"===e?B():"="===e||hu.test(e)||pu.test(e)?N():c=5)}function b(e){fu.test(e)?c=6:"/"===e?c=12:"="===e?c=7:">"===e?F():"<"===e?B():hu.test(e)&&N()}function w(e){fu.test(e)||("/"===e?c=12:"="===e?c=7:">"===e?F():"<"===e?B():hu.test(e)?N():c=5)}function O(e){fu.test(e)||('"'===e?c=8:"'"===e?c=9:/[>=`]/.test(e)?N():"<"===e?B():c=10)}function x(e){'"'===e&&(c=11)}function A(e){"'"===e&&(c=11)}function T(e){fu.test(e)?c=4:">"===e?F():"<"===e&&B()}function E(e){fu.test(e)?c=4:"/"===e?c=12:">"===e?F():"<"===e?B():(c=4,u--)}function C(e){">"===e?(h=new Yu(iu(iu({},h),{isClosing:!0})),F()):c=4}function S(t){"--"===e.substr(u,2)?(u+=2,h=new Yu(iu(iu({},h),{type:"comment"})),c=14):"DOCTYPE"===e.substr(u,7).toUpperCase()?(u+=7,h=new Yu(iu(iu({},h),{type:"doctype"})),c=20):N()}function M(e){"-"===e?c=15:">"===e?N():c=16}function D(e){"-"===e?c=18:">"===e?N():c=16}function P(e){"-"===e&&(c=17)}function I(e){c="-"===e?18:16}function L(e){">"===e?F():"!"===e?c=19:"-"===e||(c=16)}function j(e){"-"===e?c=17:">"===e?F():c=16}function R(e){">"===e?F():"<"===e&&B()}function N(){c=0,h=l}function B(){c=1,h=new Yu({idx:u})}function F(){var t=e.slice(f,h.idx);t&&r(t,f),"comment"===h.type?o(h.idx):"doctype"===h.type?s(h.idx):(h.isOpening&&n(h.name,h.idx),h.isClosing&&a(h.name,h.idx)),N(),f=u+1}function k(){var t=h.idx+(h.isClosing?2:1);return e.slice(t,u).toLowerCase()}f=0&&n++},onText:function(e,i){if(0===n){var r=function(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,n=[],a=0;i=t.exec(e);)n.push(e.substring(a,i.index)),n.push(i[0]),a=i.index+i[0].length;return n.push(e.substring(a)),n}(e,/( | |<|<|>|>|"|"|')/gi),o=i;r.forEach((function(e,i){if(i%2==0){var n=t.parseText(e,o);a.push.apply(a,n)}o+=e.length}))}},onCloseTag:function(e){i.indexOf(e)>=0&&(n=Math.max(n-1,0))},onComment:function(e){},onDoctype:function(e){}}),a=this.compactMatches(a),a=this.removeUnwantedMatches(a)},e.prototype.compactMatches=function(e){e.sort((function(e,t){return e.getOffset()-t.getOffset()}));for(var t=0;ta?t:t+1;e.splice(o,1);continue}e[t+1].getOffset()/g,">"));for(var t=this.parse(e),i=[],n=0,a=0,r=t.length;at.concat(Array.isArray(i)?e(i):i),[])}(e.map(([e,t])=>new Array(e).fill(t,0,e)))}const Ju=[0,1,2,3].concat(...Ku([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function Zu(){const e=this;function t(e,t){let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1}e.build_tree=function(i){const n=e.dyn_tree,a=e.stat_desc.static_tree,r=e.stat_desc.elems;let o,s,l,u=-1;for(i.heap_len=0,i.heap_max=573,o=0;o=1;o--)i.pqdownheap(n,o);l=r;do{o=i.heap[1],i.heap[1]=i.heap[i.heap_len--],i.pqdownheap(n,1),s=i.heap[1],i.heap[--i.heap_max]=o,i.heap[--i.heap_max]=s,n[2*l]=n[2*o]+n[2*s],i.depth[l]=Math.max(i.depth[o],i.depth[s])+1,n[2*o+1]=n[2*s+1]=l,i.heap[1]=l++,i.pqdownheap(n,1)}while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],function(t){const i=e.dyn_tree,n=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,r=e.stat_desc.extra_base,o=e.stat_desc.max_length;let s,l,u,d,c,f,h=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(i[2*t.heap[t.heap_max]+1]=0,s=t.heap_max+1;s<573;s++)l=t.heap[s],d=i[2*i[2*l+1]+1]+1,d>o&&(d=o,h++),i[2*l+1]=d,l>e.max_code||(t.bl_count[d]++,c=0,l>=r&&(c=a[l-r]),f=i[2*l],t.opt_len+=f*(d+c),n&&(t.static_len+=f*(n[2*l+1]+c)));if(0!==h){do{for(d=o-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[o]--,h-=2}while(h>0);for(d=o;0!==d;d--)for(l=t.bl_count[d];0!==l;)u=t.heap[--s],u>e.max_code||(i[2*u+1]!=d&&(t.opt_len+=(d-i[2*u+1])*i[2*u],i[2*u+1]=d),l--)}}(i),function(e,i,n){const a=[];let r,o,s,l=0;for(r=1;r<=15;r++)a[r]=l=l+n[r-1]<<1;for(o=0;o<=i;o++)s=e[2*o+1],0!==s&&(e[2*o]=t(a[s]++,s))}(n,e.max_code,i.bl_count)}}function Qu(e,t,i,n,a){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=a}Zu._length_code=[0,1,2,3,4,5,6,7].concat(...Ku([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),Zu.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],Zu.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],Zu.d_code=function(e){return e<256?Ju[e]:Ju[256+(e>>>7)]},Zu.extra_lbits=[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],Zu.extra_dbits=[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],Zu.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Zu.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Qu.static_ltree=[12,8,140,8,76,8,204,8,44,8,172,8,108,8,236,8,28,8,156,8,92,8,220,8,60,8,188,8,124,8,252,8,2,8,130,8,66,8,194,8,34,8,162,8,98,8,226,8,18,8,146,8,82,8,210,8,50,8,178,8,114,8,242,8,10,8,138,8,74,8,202,8,42,8,170,8,106,8,234,8,26,8,154,8,90,8,218,8,58,8,186,8,122,8,250,8,6,8,134,8,70,8,198,8,38,8,166,8,102,8,230,8,22,8,150,8,86,8,214,8,54,8,182,8,118,8,246,8,14,8,142,8,78,8,206,8,46,8,174,8,110,8,238,8,30,8,158,8,94,8,222,8,62,8,190,8,126,8,254,8,1,8,129,8,65,8,193,8,33,8,161,8,97,8,225,8,17,8,145,8,81,8,209,8,49,8,177,8,113,8,241,8,9,8,137,8,73,8,201,8,41,8,169,8,105,8,233,8,25,8,153,8,89,8,217,8,57,8,185,8,121,8,249,8,5,8,133,8,69,8,197,8,37,8,165,8,101,8,229,8,21,8,149,8,85,8,213,8,53,8,181,8,117,8,245,8,13,8,141,8,77,8,205,8,45,8,173,8,109,8,237,8,29,8,157,8,93,8,221,8,61,8,189,8,125,8,253,8,19,9,275,9,147,9,403,9,83,9,339,9,211,9,467,9,51,9,307,9,179,9,435,9,115,9,371,9,243,9,499,9,11,9,267,9,139,9,395,9,75,9,331,9,203,9,459,9,43,9,299,9,171,9,427,9,107,9,363,9,235,9,491,9,27,9,283,9,155,9,411,9,91,9,347,9,219,9,475,9,59,9,315,9,187,9,443,9,123,9,379,9,251,9,507,9,7,9,263,9,135,9,391,9,71,9,327,9,199,9,455,9,39,9,295,9,167,9,423,9,103,9,359,9,231,9,487,9,23,9,279,9,151,9,407,9,87,9,343,9,215,9,471,9,55,9,311,9,183,9,439,9,119,9,375,9,247,9,503,9,15,9,271,9,143,9,399,9,79,9,335,9,207,9,463,9,47,9,303,9,175,9,431,9,111,9,367,9,239,9,495,9,31,9,287,9,159,9,415,9,95,9,351,9,223,9,479,9,63,9,319,9,191,9,447,9,127,9,383,9,255,9,511,9,0,7,64,7,32,7,96,7,16,7,80,7,48,7,112,7,8,7,72,7,40,7,104,7,24,7,88,7,56,7,120,7,4,7,68,7,36,7,100,7,20,7,84,7,52,7,116,7,3,8,131,8,67,8,195,8,35,8,163,8,99,8,227,8],Qu.static_dtree=[0,5,16,5,8,5,24,5,4,5,20,5,12,5,28,5,2,5,18,5,10,5,26,5,6,5,22,5,14,5,30,5,1,5,17,5,9,5,25,5,5,5,21,5,13,5,29,5,3,5,19,5,11,5,27,5,7,5,23,5],Qu.static_l_desc=new Qu(Qu.static_ltree,Zu.extra_lbits,257,286,15),Qu.static_d_desc=new Qu(Qu.static_dtree,Zu.extra_dbits,0,30,15),Qu.static_bl_desc=new Qu(null,Zu.extra_blbits,0,19,7);function $u(e,t,i,n,a){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=a}const ed=[new $u(0,0,0,0,0),new $u(4,4,8,4,1),new $u(4,5,16,8,1),new $u(4,6,32,32,1),new $u(4,4,16,16,2),new $u(8,16,32,32,2),new $u(8,16,128,128,2),new $u(8,32,128,256,2),new $u(32,128,258,1024,2),new $u(32,258,258,4096,2)],td=["need dictionary","stream end","","","stream error","data error","","buffer error","",""];function id(e,t,i,n){const a=e[2*t],r=e[2*i];return a>>8&255)}function K(e,t){let i;const n=t;G>16-n?(i=e,H|=i<>>16-G,G+=n-16):(H|=e<=8&&(q(255&H),H>>>=8,G-=8)}function $(t,i){let n,a,r;if(e.pending_buf[z+2*k]=t>>>8&255,e.pending_buf[z+2*k+1]=255&t,e.pending_buf[B+k]=255&i,k++,0===t?P[2*i]++:(U++,t--,P[2*(Zu._length_code[i]+256+1)]++,I[2*Zu.d_code(t)]++),0==(8191&k)&&C>2){for(n=8*k,a=w-g,r=0;r<30;r++)n+=I[2*r]*(5+Zu.extra_dbits[r]);if(n>>>=3,U8?X(H):G>0&&q(255&H),H=0,G=0}function ie(t,i,n){K(0+(n?1:0),3),function(t,i,n){te(),V=8,n&&(X(i),X(~i)),e.pending_buf.set(l.subarray(t,t+i),e.pending),e.pending+=i}(t,i,!0)}function ne(t,i,n){let a,r,o=0;C>0?(j.build_tree(e),R.build_tree(e),o=function(){let t;for(W(P,j.max_code),W(I,R.max_code),N.build_tree(e),t=18;t>=3&&0===L[2*Zu.bl_order[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(),a=e.opt_len+3+7>>>3,r=e.static_len+3+7>>>3,r<=a&&(a=r)):a=r=i+5,i+4<=a&&-1!=t?ie(t,i,n):r==a?(K(2+(n?1:0),3),ee(Qu.static_ltree,Qu.static_dtree)):(K(4+(n?1:0),3),function(e,t,i){let n;for(K(e-257,5),K(t-1,5),K(i-4,4),n=0;n=0?g:-1,w-g,e),g=w,t.flush_pending()}function re(){let e,i,n,a;do{if(a=u-x-w,0===a&&0===w&&0===x)a=r;else if(-1==a)a--;else if(w>=r+r-262){l.set(l.subarray(r,r+r),0),O-=r,w-=r,g-=r,e=h,n=e;do{i=65535&c[--n],c[n]=i>=r?i-r:0}while(0!=--e);e=r,n=e;do{i=65535&d[--n],d[n]=i>=r?i-r:0}while(0!=--e);a+=r}if(0===t.avail_in)return;e=t.read_buf(l,w+x,a),x+=e,x>=3&&(f=255&l[w],f=(f<<_^255&l[w+1])&m)}while(x<262&&0!==t.avail_in)}function oe(e){let t,i,n=T,a=w,o=A;const u=w>r-262?w-(r-262):0;let c=D;const f=s,h=w+258;let p=l[a+o-1],m=l[a+o];A>=M&&(n>>=2),c>x&&(c=x);do{if(t=e,l[t+o]==m&&l[t+o-1]==p&&l[t]==l[a]&&l[++t]==l[a+1]){a+=2,t++;do{}while(l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&l[++a]==l[++t]&&ao){if(O=e,o=i,i>=c)break;p=l[a+o-1],m=l[a+o]}}}while((e=65535&d[e&f])>u&&0!=--n);return o<=x?o:x}function se(t){return t.total_in=t.total_out=0,t.msg=null,e.pending=0,e.pending_out=0,i=113,a=0,j.dyn_tree=P,j.stat_desc=Qu.static_l_desc,R.dyn_tree=I,R.stat_desc=Qu.static_d_desc,N.dyn_tree=L,N.stat_desc=Qu.static_bl_desc,H=0,G=0,V=8,Y(),function(){u=2*r,c[h-1]=0;for(let e=0;e9||8!=u||a<9||a>15||i<0||i>9||g<0||g>2?-2:(t.dstate=e,o=a,r=1<9||i<0||i>2?-2:(ed[C].func!=ed[t].func&&0!==e.total_in&&(n=e.deflate(1)),C!=t&&(C=t,E=ed[C].max_lazy,M=ed[C].good_length,D=ed[C].nice_length,T=ed[C].max_chain),S=i,n)},e.deflateSetDictionary=function(e,t,n){let a,o=n,u=0;if(!t||42!=i)return-2;if(o<3)return 0;for(o>r-262&&(o=r-262,u=n-o),l.set(t.subarray(u,u+o),0),w=o,g=o,f=255&l[0],f=(f<<_^255&l[1])&m,a=0;a<=o-3;a++)f=(f<<_^255&l[a+2])&m,d[a&s]=c[f],c[f]=a;return 0},e.deflate=function(u,p){let T,M,D,P,I;if(p>4||p<0)return-2;if(!u.next_out||!u.next_in&&0!==u.avail_in||666==i&&4!=p)return u.msg=td[4],-2;if(0===u.avail_out)return u.msg=td[7],-5;var L;if(t=u,P=a,a=p,42==i&&(M=8+(o-8<<4)<<8,D=(C-1&255)>>1,D>3&&(D=3),M|=D<<6,0!==w&&(M|=32),M+=31-M%31,i=113,q((L=M)>>8&255),q(255&L)),0!==e.pending){if(t.flush_pending(),0===t.avail_out)return a=-1,0}else if(0===t.avail_in&&p<=P&&4!=p)return t.msg=td[7],-5;if(666==i&&0!==t.avail_in)return u.msg=td[7],-5;if(0!==t.avail_in||0!==x||0!=p&&666!=i){switch(I=-1,ed[C].func){case 0:I=function(e){let i,a=65535;for(a>n-5&&(a=n-5);;){if(x<=1){if(re(),0===x&&0==e)return 0;if(0===x)break}if(w+=x,x=0,i=g+a,(0===w||w>=i)&&(x=w-i,w=i,ae(!1),0===t.avail_out))return 0;if(w-g>=r-262&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1}(p);break;case 1:I=function(e){let i,n=0;for(;;){if(x<262){if(re(),x<262&&0==e)return 0;if(0===x)break}if(x>=3&&(f=(f<<_^255&l[w+2])&m,n=65535&c[f],d[w&s]=c[f],c[f]=w),0!==n&&(w-n&65535)<=r-262&&2!=S&&(v=oe(n)),v>=3)if(i=$(w-O,v-3),x-=v,v<=E&&x>=3){v--;do{w++,f=(f<<_^255&l[w+2])&m,n=65535&c[f],d[w&s]=c[f],c[f]=w}while(0!=--v);w++}else w+=v,v=0,f=255&l[w],f=(f<<_^255&l[w+1])&m;else i=$(0,255&l[w]),x--,w++;if(i&&(ae(!1),0===t.avail_out))return 0}return ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1}(p);break;case 2:I=function(e){let i,n,a=0;for(;;){if(x<262){if(re(),x<262&&0==e)return 0;if(0===x)break}if(x>=3&&(f=(f<<_^255&l[w+2])&m,a=65535&c[f],d[w&s]=c[f],c[f]=w),A=v,y=O,v=2,0!==a&&A4096)&&(v=2)),A>=3&&v<=A){n=w+x-3,i=$(w-1-y,A-3),x-=A-1,A-=2;do{++w<=n&&(f=(f<<_^255&l[w+2])&m,a=65535&c[f],d[w&s]=c[f],c[f]=w)}while(0!=--A);if(b=0,v=2,w++,i&&(ae(!1),0===t.avail_out))return 0}else if(0!==b){if(i=$(0,255&l[w-1]),i&&ae(!1),w++,x--,0===t.avail_out)return 0}else b=1,w++,x--}return 0!==b&&(i=$(0,255&l[w-1]),b=0),ae(4==e),0===t.avail_out?4==e?2:0:4==e?3:1}(p)}if(2!=I&&3!=I||(i=666),0==I||2==I)return 0===t.avail_out&&(a=-1),0;if(1==I){if(1==p)K(2,3),J(256,Qu.static_ltree),Q(),1+V+10-G<9&&(K(2,3),J(256,Qu.static_ltree),Q()),V=7;else if(ie(0,0,!1),3==p)for(T=0;Ti&&(n=i),0===n?0:(this.avail_in-=n,e.set(this.next_in.subarray(this.next_in_index,this.next_in_index+n),t),this.next_in_index+=n,this.total_in+=n,n)},flush_pending:function(){const e=this;let t=e.dstate.pending;t>e.avail_out&&(t=e.avail_out),0!==t&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+t),e.next_out_index),e.next_out_index+=t,e.dstate.pending_out+=t,e.total_out+=t,e.avail_out-=t,e.dstate.pending-=t,0===e.dstate.pending&&(e.dstate.pending_out=0))}};const rd=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],od=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],sd=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],ld=[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],ud=[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,112,112],dd=[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],cd=[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];function fd(){let e,t,i,n,a,r;function o(e,t,o,s,l,u,d,c,f,h,p){let m,_,g,v,y,b,w,O,x,A,T,E,C,S,M;A=0,y=o;do{i[e[t+A]]++,A++,y--}while(0!==y);if(i[0]==o)return d[0]=-1,c[0]=0,0;for(O=c[0],b=1;b<=15&&0===i[b];b++);for(w=b,Oy&&(O=y),c[0]=O,S=1<E+O;){if(v++,E+=O,M=g-E,M=M>O?O:M,(_=1<<(b=w-E))>m+1&&(_-=m+1,C=w,b1440)return-3;a[v]=T=h[0],h[0]+=M,0!==v?(r[v]=y,n[0]=b,n[1]=O,b=y>>>E-O,n[2]=T-a[v-1]-b,f.set(n,3*(a[v-1]+b))):d[0]=T}for(n[1]=w-E,A>=o?n[0]=192:p[A]>>E;b>>=1)y^=b;for(y^=b,x=(1<257?(-3==h?f.msg="oversubscribed distance tree":-5==h?(f.msg="incomplete distance tree",h=-3):-4!=h&&(f.msg="empty distance tree with lengths",h=-3),h):0)}}fd.inflate_trees_fixed=function(e,t,i,n){return e[0]=9,t[0]=5,i[0]=od,n[0]=sd,0};function hd(){let e,t,i,n,a=0,r=0,o=0,s=0,l=0,u=0,d=0,c=0,f=0,h=0;function p(e,t,i,n,a,r,o,s){let l,u,d,c,f,h,p,m,_,g,v,y,b,w,O,x;p=s.next_in_index,m=s.avail_in,f=o.bitb,h=o.bitk,_=o.write,g=_>=u[x+1],h-=u[x+1],0!=(16&c)){for(c&=15,b=u[x+2]+(f&rd[c]),f>>=c,h-=c;h<15;)m--,f|=(255&s.read_byte(p++))<>=u[x+1],h-=u[x+1],0!=(16&c)){for(c&=15;h>=c,h-=c,g-=b,_>=w)O=_-w,_-O>0&&2>_-O?(o.window[_++]=o.window[O++],o.window[_++]=o.window[O++],b-=2):(o.window.set(o.window.subarray(O,O+2),_),_+=2,O+=2,b-=2);else{O=_-w;do{O+=o.end}while(O<0);if(c=o.end-O,b>c){if(b-=c,_-O>0&&c>_-O)do{o.window[_++]=o.window[O++]}while(0!=--c);else o.window.set(o.window.subarray(O,O+c),_),_+=c,O+=c,c=0;O=0}}if(_-O>0&&b>_-O)do{o.window[_++]=o.window[O++]}while(0!=--b);else o.window.set(o.window.subarray(O,O+b),_),_+=b,O+=b,b=0;break}if(0!=(64&c))return s.msg="invalid distance code",b=s.avail_in-m,b=h>>3>3:b,m+=b,p-=b,h-=b<<3,o.bitb=f,o.bitk=h,s.avail_in=m,s.total_in+=p-s.next_in_index,s.next_in_index=p,o.write=_,-3;l+=u[x+2],l+=f&rd[c],x=3*(d+l),c=u[x]}break}if(0!=(64&c))return 0!=(32&c)?(b=s.avail_in-m,b=h>>3>3:b,m+=b,p-=b,h-=b<<3,o.bitb=f,o.bitk=h,s.avail_in=m,s.total_in+=p-s.next_in_index,s.next_in_index=p,o.write=_,1):(s.msg="invalid literal/length code",b=s.avail_in-m,b=h>>3>3:b,m+=b,p-=b,h-=b<<3,o.bitb=f,o.bitk=h,s.avail_in=m,s.total_in+=p-s.next_in_index,s.next_in_index=p,o.write=_,-3);if(l+=u[x+2],l+=f&rd[c],x=3*(d+l),0===(c=u[x])){f>>=u[x+1],h-=u[x+1],o.window[_++]=u[x+2],g--;break}}else f>>=u[x+1],h-=u[x+1],o.window[_++]=u[x+2],g--}while(g>=258&&m>=10);return b=s.avail_in-m,b=h>>3>3:b,m+=b,p-=b,h-=b<<3,o.bitb=f,o.bitk=h,s.avail_in=m,s.total_in+=p-s.next_in_index,s.next_in_index=p,o.write=_,0}this.init=function(a,r,o,s,l,u){e=0,d=a,c=r,i=o,f=s,n=l,h=u,t=null},this.proc=function(m,_,g){let v,y,b,w,O,x,A,T=0,E=0,C=0;for(C=_.next_in_index,w=_.avail_in,T=m.bitb,E=m.bitk,O=m.write,x=O=258&&w>=10&&(m.bitb=T,m.bitk=E,_.avail_in=w,_.total_in+=C-_.next_in_index,_.next_in_index=C,m.write=O,g=p(d,c,i,f,n,h,m,_),C=_.next_in_index,w=_.avail_in,T=m.bitb,E=m.bitk,O=m.write,x=O>>=t[y+1],E-=t[y+1],b=t[y],0===b){s=t[y+2],e=6;break}if(0!=(16&b)){l=15&b,a=t[y+2],e=2;break}if(0==(64&b)){o=b,r=y/3+t[y+2];break}if(0!=(32&b)){e=7;break}return e=9,_.msg="invalid literal/length code",g=-3,m.bitb=T,m.bitk=E,_.avail_in=w,_.total_in+=C-_.next_in_index,_.next_in_index=C,m.write=O,m.inflate_flush(_,g);case 2:for(v=l;E>=v,E-=v,o=c,t=n,r=h,e=3;case 3:for(v=o;E>=t[y+1],E-=t[y+1],b=t[y],0!=(16&b)){l=15&b,u=t[y+2],e=4;break}if(0==(64&b)){o=b,r=y/3+t[y+2];break}return e=9,_.msg="invalid distance code",g=-3,m.bitb=T,m.bitk=E,_.avail_in=w,_.total_in+=C-_.next_in_index,_.next_in_index=C,m.write=O,m.inflate_flush(_,g);case 4:for(v=l;E>=v,E-=v,e=5;case 5:for(A=O-u;A<0;)A+=m.end;for(;0!==a;){if(0===x&&(O==m.end&&0!==m.read&&(O=0,x=O7&&(E-=8,w++,C--),m.write=O,g=m.inflate_flush(_,g),O=m.write,x=Oe.avail_out&&(n=e.avail_out),0!==n&&-5==t&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(i.window.subarray(r,r+n),a),a+=n,r+=n,r==i.end&&(r=0,i.write==i.end&&(i.write=0),n=i.write-r,n>e.avail_out&&(n=e.avail_out),0!==n&&-5==t&&(t=0),e.avail_out-=n,e.total_out+=n,e.next_out.set(i.window.subarray(r,r+n),a),a+=n,r+=n),e.next_out_index=a,i.read=r,t},i.proc=function(e,t){let p,m,_,g,v,y,b,w;for(g=e.next_in_index,v=e.avail_in,m=i.bitb,_=i.bitk,y=i.write,b=y>>1){case 0:m>>>=3,_-=3,p=7&_,m>>>=p,_-=p,a=1;break;case 1:O=[],x=[],A=[[]],T=[[]],fd.inflate_trees_fixed(O,x,A,T),d.init(O[0],x[0],A[0],0,T[0],0),m>>>=3,_-=3,a=6;break;case 2:m>>>=3,_-=3,a=3;break;case 3:return m>>>=3,_-=3,a=9,e.msg="invalid block type",t=-3,i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t)}break;case 1:for(;_<32;){if(0===v)return i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);t=0,v--,m|=(255&e.read_byte(g++))<<_,_+=8}if((~m>>>16&65535)!=(65535&m))return a=9,e.msg="invalid stored block lengths",t=-3,i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);r=65535&m,m=_=0,a=0!==r?2:0!==c?7:0;break;case 2:if(0===v)return i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);if(0===b&&(y==i.end&&0!==i.read&&(y=0,b=yv&&(p=v),p>b&&(p=b),i.window.set(e.read_buf(g,p),y),g+=p,v-=p,y+=p,b-=p,0!=(r-=p))break;a=0!==c?7:0;break;case 3:for(;_<14;){if(0===v)return i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);t=0,v--,m|=(255&e.read_byte(g++))<<_,_+=8}if(o=p=16383&m,(31&p)>29||(p>>5&31)>29)return a=9,e.msg="too many length or distance symbols",t=-3,i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);if(p=258+(31&p)+(p>>5&31),!n||n.length>>=14,_-=14,s=0,a=4;case 4:for(;s<4+(o>>>10);){for(;_<3;){if(0===v)return i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);t=0,v--,m|=(255&e.read_byte(g++))<<_,_+=8}n[pd[s++]]=7&m,m>>>=3,_-=3}for(;s<19;)n[pd[s++]]=0;if(l[0]=7,p=h.inflate_trees_bits(n,l,u,f,e),0!=p)return-3==(t=p)&&(n=null,a=9),i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);s=0,a=5;case 5:for(;p=o,!(s>=258+(31&p)+(p>>5&31));){let r,d;for(p=l[0];_>>=p,_-=p,n[s++]=d;else{for(w=18==d?7:d-14,r=18==d?11:3;_>>=p,_-=p,r+=m&rd[w],m>>>=w,_-=w,w=s,p=o,w+r>258+(31&p)+(p>>5&31)||16==d&&w<1)return n=null,a=9,e.msg="invalid bit length repeat",t=-3,i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);d=16==d?n[w-1]:0;do{n[w++]=d}while(0!=--r);s=w}}if(u[0]=-1,E=[],C=[],S=[],M=[],E[0]=9,C[0]=6,p=o,p=h.inflate_trees_dynamic(257+(31&p),1+(p>>5&31),n,E,C,S,M,f,e),0!=p)return-3==p&&(n=null,a=9),t=p,i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,i.inflate_flush(e,t);d.init(E[0],C[0],f,S[0],f,M[0]),a=6;case 6:if(i.bitb=m,i.bitk=_,e.avail_in=v,e.total_in+=g-e.next_in_index,e.next_in_index=g,i.write=y,1!=(t=d.proc(i,e,t)))return i.inflate_flush(e,t);if(t=0,d.free(e),g=e.next_in_index,v=e.avail_in,m=i.bitb,_=i.bitk,y=i.write,b=y15?(e.inflateEnd(i),-2):(e.wbits=n,i.istate.blocks=new md(i,1<>4)>a.wbits){a.mode=13,e.msg="invalid window size",a.marker=5;break}a.mode=1;case 1:if(0===e.avail_in)return i;if(i=t,e.avail_in--,e.total_in++,n=255&e.read_byte(e.next_in_index++),((a.method<<8)+n)%31!=0){a.mode=13,e.msg="incorrect header check",a.marker=5;break}if(0==(32&n)){a.mode=7;break}a.mode=2;case 2:if(0===e.avail_in)return i;i=t,e.avail_in--,e.total_in++,a.need=(255&e.read_byte(e.next_in_index++))<<24&4278190080,a.mode=3;case 3:if(0===e.avail_in)return i;i=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<16&16711680,a.mode=4;case 4:if(0===e.avail_in)return i;i=t,e.avail_in--,e.total_in++,a.need+=(255&e.read_byte(e.next_in_index++))<<8&65280,a.mode=5;case 5:return 0===e.avail_in?i:(i=t,e.avail_in--,e.total_in++,a.need+=255&e.read_byte(e.next_in_index++),a.mode=6,2);case 6:return a.mode=13,e.msg="need dictionary",a.marker=0,-2;case 7:if(i=a.blocks.proc(e,i),-3==i){a.mode=13,a.marker=0;break}if(0==i&&(i=t),1!=i)return i;i=t,a.blocks.reset(e,a.was),a.mode=12;case 12:return 1;case 13:return-3;default:return-2}},e.inflateSetDictionary=function(e,t,i){let n=0,a=i;if(!e||!e.istate||6!=e.istate.mode)return-2;const r=e.istate;return a>=1<{i.onload=e=>n(new Uint8Array(e.target.result)),i.onerror=()=>a(i.error),i.readAsArrayBuffer(this.blob.slice(e,e+t))})}}}class Dd extends Sd{constructor(e){super(),this.contentType=e,this.arrayBuffers=[]}async writeUint8Array(e){super.writeUint8Array(e),this.arrayBuffers.push(e.buffer)}getData(){return this.blob||(this.blob=new Blob(this.arrayBuffers,{type:this.contentType})),this.blob}}class Pd extends Cd{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=Object.assign({},t),delete this.options.preventHeadRequest,delete this.options.useRangeHeader,delete this.options.forceRangeRequests,delete this.options.useXHR}async init(){super.init(),await Ld(this,Ud,Bd)}async readUint8Array(e,t){return jd(this,e,t,Ud,Bd)}}class Id extends Cd{constructor(e,t){super(),this.url=e,this.preventHeadRequest=t.preventHeadRequest,this.useRangeHeader=t.useRangeHeader,this.forceRangeRequests=t.forceRangeRequests,this.options=t}async init(){super.init(),await Ld(this,Vd,Fd)}async readUint8Array(e,t){return jd(this,e,t,Vd,Fd)}}async function Ld(e,t,i){if(function(e){if("undefined"!=typeof document){const t=document.createElement("a");return t.href=e,"http:"==t.protocol||"https:"==t.protocol}return/^https?:\/\//i.test(e)}(e.url)&&(e.useRangeHeader||e.forceRangeRequests)){const n=await t("GET",e,Rd(e));if(!e.forceRangeRequests&&"bytes"!=n.headers.get("Accept-Ranges"))throw new Error("HTTP Range not supported");{let a;const r=n.headers.get("Content-Range");if(r){const e=r.trim().split(/\s*\/\s*/);if(e.length){const t=e[1];t&&"*"!=t&&(a=Number(t))}}void 0===a?await zd(e,t,i):e.size=a}}else await zd(e,t,i)}async function jd(e,t,i,n,a){if(e.useRangeHeader||e.forceRangeRequests){const a=await n("GET",e,Rd(e,t,i));if(206!=a.status)throw new Error("HTTP Range not supported");return new Uint8Array(await a.arrayBuffer())}return e.data||await a(e,e.options),new Uint8Array(e.data.subarray(t,t+i))}function Rd(e,t=0,i=1){return Object.assign({},Nd(e),{Range:"bytes="+t+"-"+(t+i-1)})}function Nd(e){let t=e.options.headers;if(t)return Symbol.iterator in t?Object.fromEntries(t):t}async function Bd(e){await kd(e,Ud)}async function Fd(e){await kd(e,Vd)}async function kd(e,t){const i=await t("GET",e,Nd(e));e.data=new Uint8Array(await i.arrayBuffer()),e.size||(e.size=e.data.length)}async function zd(e,t,i){if(e.preventHeadRequest)await i(e,e.options);else{const n=(await t("HEAD",e,Nd(e))).headers.get("Content-Length");n?e.size=Number(n):await i(e,e.options)}}async function Ud(e,{options:t,url:i},n){const a=await fetch(i,Object.assign({},t,{method:e,headers:n}));if(a.status<400)return a;throw new Error("HTTP error "+(a.statusText||a.status))}function Vd(e,{url:t},i){return new Promise((n,a)=>{const r=new XMLHttpRequest;if(r.addEventListener("load",()=>{if(r.status<400){const e=[];r.getAllResponseHeaders().trim().split(/[\r\n]+/).forEach(t=>{const i=t.trim().split(/\s*:\s*/);i[0]=i[0].trim().replace(/^[a-z]|-[a-z]/g,e=>e.toUpperCase()),e.push(i)}),n({status:r.status,arrayBuffer:()=>r.response,headers:new Map(e)})}else a(new Error("HTTP error "+(r.statusText||r.status)))},!1),r.addEventListener("error",e=>a(e.detail.error),!1),r.open(e,t),i)for(const e of Object.entries(i))r.setRequestHeader(e[0],e[1]);r.responseType="arraybuffer",r.send()})}class Hd extends Cd{constructor(e,t={}){super(),this.url=e,t.useXHR?this.reader=new Id(e,t):this.reader=new Pd(e,t)}set size(e){}get size(){return this.reader.size}async init(){super.init(),await this.reader.init()}async readUint8Array(e,t){return this.reader.readUint8Array(e,t)}}const Gd=new Date(2107,11,31),Yd=new Date(1980,0,1),Wd="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");const qd=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=t>>>1^3988292384:t>>>=1;qd[e]=t}class Xd{constructor(e){this.crc=e||-1}append(e){let t=0|this.crc;for(let i=0,n=0|e.length;i>>8^qd[255&(t^e[i])];this.crc=t}get(){return~this.crc}}const Kd={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const i=e[e.length-1],n=Kd.getPartial(i);return 32===n?e.concat(t):Kd._shiftRight(t,n,0|i,e.slice(0,e.length-1))},bitLength(e){const t=e.length;if(0===t)return 0;const i=e[t-1];return 32*(t-1)+Kd.getPartial(i)},clamp(e,t){if(32*e.length0&&t&&(e[i-1]=Kd.partial(t,e[i-1]&2147483648>>t-1,1)),e},partial:(e,t,i)=>32===e?t:(i?0|t:t<<32-e)+1099511627776*e,getPartial:e=>Math.round(e/1099511627776)||32,_shiftRight(e,t,i,n){for(void 0===n&&(n=[]);t>=32;t-=32)n.push(i),i=0;if(0===t)return n.concat(e);for(let a=0;a>>t),i=e[a]<<32-t;const a=e.length?e[e.length-1]:0,r=Kd.getPartial(a);return n.push(Kd.partial(t+r&31,t+r>32?i:n.pop(),1)),n}},Jd={bytes:{fromBits(e){const t=Kd.bitLength(e)/8,i=new Uint8Array(t);let n;for(let a=0;a>>24,n<<=8;return i},toBits(e){const t=[];let i,n=0;for(i=0;i9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const r=new Uint32Array(i);let o=0;for(let e=t.blockSize+n-(t.blockSize+n&t.blockSize-1);e<=a;e+=t.blockSize)t._block(r.subarray(16*o,16*(o+1))),o+=1;return i.splice(0,16*o),t},finalize:function(){const e=this;let t=e._buffer;const i=e._h;t=Kd.concat(t,[Kd.partial(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(Math.floor(e._length/4294967296)),t.push(0|e._length);t.length;)e._block(t.splice(0,16));return e.reset(),i},_init:[1732584193,4023233417,2562383102,271733878,3285377520],_key:[1518500249,1859775393,2400959708,3395469782],_f:function(e,t,i,n){return e<=19?t&i|~t&n:e<=39?t^i^n:e<=59?t&i|t&n|i&n:e<=79?t^i^n:void 0},_S:function(e,t){return t<>>32-e},_block:function(e){const t=this,i=t._h,n=Array(80);for(let t=0;t<16;t++)n[t]=e[t];let a=i[0],r=i[1],o=i[2],s=i[3],l=i[4];for(let e=0;e<=79;e++){e>=16&&(n[e]=t._S(1,n[e-3]^n[e-8]^n[e-14]^n[e-16]));const i=t._S(5,a)+t._f(e,r,o,s)+l+n[e]+t._key[Math.floor(e/20)]|0;l=s,s=o,o=t._S(30,r),r=a,a=i}i[0]=i[0]+a|0,i[1]=i[1]+r|0,i[2]=i[2]+o|0,i[3]=i[3]+s|0,i[4]=i[4]+l|0}};const Qd={aes:class{constructor(e){const t=this;t._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],t._tables[0][0][0]||t._precompute();const i=t._tables[0][4],n=t._tables[1],a=e.length;let r,o,s,l=1;if(4!==a&&6!==a&&8!==a)throw new Error("invalid aes key size");for(t._key=[o=e.slice(0),s=[]],r=a;r<4*a+28;r++){let e=o[r-1];(r%a==0||8===a&&r%a==4)&&(e=i[e>>>24]<<24^i[e>>16&255]<<16^i[e>>8&255]<<8^i[255&e],r%a==0&&(e=e<<8^e>>>24^l<<24,l=l<<1^283*(l>>7))),o[r]=o[r-a]^e}for(let e=0;r;e++,r--){const t=o[3&e?r:r-4];s[e]=r<=4||e<4?t:n[0][i[t>>>24]]^n[1][i[t>>16&255]]^n[2][i[t>>8&255]]^n[3][i[255&t]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],t=this._tables[1],i=e[4],n=t[4],a=[],r=[];let o,s,l,u;for(let e=0;e<256;e++)r[(a[e]=e<<1^283*(e>>7))^e]=e;for(let d=o=0;!i[d];d^=s||1,o=r[o]||1){let r=o^o<<1^o<<2^o<<3^o<<4;r=r>>8^255&r^99,i[d]=r,n[r]=d,u=a[l=a[s=a[d]]];let c=16843009*u^65537*l^257*s^16843008*d,f=257*a[r]^16843008*r;for(let i=0;i<4;i++)e[i][d]=f=f<<24^f>>>8,t[i][r]=c=c<<24^c>>>8}for(let i=0;i<5;i++)e[i]=e[i].slice(0),t[i]=t[i].slice(0)}_crypt(e,t){if(4!==e.length)throw new Error("invalid aes block size");const i=this._key[t],n=i.length/4-2,a=[0,0,0,0],r=this._tables[t],o=r[0],s=r[1],l=r[2],u=r[3],d=r[4];let c,f,h,p=e[0]^i[0],m=e[t?3:1]^i[1],_=e[2]^i[2],g=e[t?1:3]^i[3],v=4;for(let e=0;e>>24]^s[m>>16&255]^l[_>>8&255]^u[255&g]^i[v],f=o[m>>>24]^s[_>>16&255]^l[g>>8&255]^u[255&p]^i[v+1],h=o[_>>>24]^s[g>>16&255]^l[p>>8&255]^u[255&m]^i[v+2],g=o[g>>>24]^s[p>>16&255]^l[m>>8&255]^u[255&_]^i[v+3],v+=4,p=c,m=f,_=h;for(let e=0;e<4;e++)a[t?3&-e:e]=d[p>>>24]<<24^d[m>>16&255]<<16^d[_>>8&255]<<8^d[255&g]^i[v++],c=p,p=m,m=_,_=g,g=c;return a}}},$d={ctrGladman:class{constructor(e,t){this._prf=e,this._initIv=t,this._iv=t}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if(255==(e>>24&255)){let t=e>>16&255,i=e>>8&255,n=255&e;255===t?(t=0,255===i?(i=0,255===n?n=0:++n):++i):++t,e=0,e+=t<<16,e+=i<<8,e+=n}else e+=1<<24;return e}incCounter(e){0===(e[0]=this.incWord(e[0]))&&(e[1]=this.incWord(e[1]))}calculate(e,t,i){let n;if(!(n=t.length))return[];const a=Kd.bitLength(t);for(let a=0;an&&(e=t.hash(e));for(let t=0;te.length){const i=e;(e=new Uint8Array(t)).set(i,0)}return e}(i,o-o%16)),s=0;s<=o-16;s+=16){const a=lc.toBits(gc(t,s,s+16));r&&e.hmac.update(a);const o=e.aesCtrGladman.update(a);r||e.hmac.update(o),i.set(lc.fromBits(o),s+n)}return e.pendingInput=gc(t,s),i}async function mc(e,t,i){const n=(new TextEncoder).encode(t),a=await crypto.subtle.importKey("raw",n,ic,!1,ac),r=await crypto.subtle.deriveBits(Object.assign({salt:i},nc),a,8*(2*oc[e.strength]+2)),o=new Uint8Array(r);e.keys={key:lc.toBits(gc(o,0,oc[e.strength])),authentication:lc.toBits(gc(o,oc[e.strength],2*oc[e.strength])),passwordVerification:gc(o,2*oc[e.strength])}}function _c(e,t){let i=e;return e.length+t.length&&(i=new Uint8Array(e.length+t.length),i.set(e,0),i.set(t,e.length)),i}function gc(e,t,i){return e.subarray(t,i)}class vc{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Oc(this,e)}append(e){const t=this;if(t.password){const i=bc(t,e.subarray(0,12));if(t.password=null,i[11]!=t.passwordVerification)throw new Error("Invalid pasword");e=e.subarray(12)}return bc(t,e)}flush(){return{valid:!0,data:new Uint8Array(0)}}}class yc{constructor(e,t){Object.assign(this,{password:e,passwordVerification:t}),Oc(this,e)}append(e){const t=this;let i,n;if(t.password){t.password=null;const a=crypto.getRandomValues(new Uint8Array(12));a[11]=t.passwordVerification,i=new Uint8Array(e.length+a.length),i.set(wc(t,a),0),n=12}else i=new Uint8Array(e.length),n=0;return i.set(wc(t,e),n),i}flush(){return{data:new Uint8Array(0)}}}function bc(e,t){const i=new Uint8Array(t.length);for(let n=0;n>>24]),e.keys[2]=~e.crcKey2.get()}function Ac(e){const t=2|e.keys[2];return Tc(Math.imul(t,1^t)>>>8)}function Tc(e){return 255&e}function Ec(e){return 4294967295&e}class Cc{constructor(e,{signature:t,password:i,signed:n,compressed:a,zipCrypto:r,passwordVerification:o,encryptionStrength:s},{chunkSize:l}){const u=Boolean(i);Object.assign(this,{signature:t,encrypted:u,signed:n,compressed:a,inflate:a&&new e({chunkSize:l}),crc32:n&&new Xd,zipCrypto:r,decrypt:u&&r?new vc(i,o):new fc(i,n,s)})}async append(e){const t=this;return t.encrypted&&e.length&&(e=await t.decrypt.append(e)),t.compressed&&e.length&&(e=await t.inflate.append(e)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),e}async flush(){const e=this;let t,i=new Uint8Array(0);if(e.encrypted){const t=e.decrypt.flush();if(!t.valid)throw new Error("Invalid signature");i=t.data}if((!e.encrypted||e.zipCrypto)&&e.signed){const i=new DataView(new Uint8Array(4).buffer);if(t=e.crc32.get(),i.setUint32(0,t),e.signature!=i.getUint32(0,!1))throw new Error("Invalid signature")}return e.compressed&&(i=await e.inflate.append(i)||new Uint8Array(0),await e.inflate.flush()),{data:i,signature:t}}}class Sc{constructor(e,{encrypted:t,signed:i,compressed:n,level:a,zipCrypto:r,password:o,passwordVerification:s,encryptionStrength:l},{chunkSize:u}){Object.assign(this,{encrypted:t,signed:i,compressed:n,deflate:n&&new e({level:a||5,chunkSize:u}),crc32:i&&new Xd,zipCrypto:r,encrypt:t&&r?new yc(o,s):new hc(o,l)})}async append(e){const t=this;let i=e;return t.compressed&&e.length&&(i=await t.deflate.append(e)),t.encrypted&&i.length&&(i=await t.encrypt.append(i)),(!t.encrypted||t.zipCrypto)&&t.signed&&e.length&&t.crc32.append(e),i}async flush(){const e=this;let t,i=new Uint8Array(0);if(e.compressed&&(i=await e.deflate.flush()||new Uint8Array(0)),e.encrypted){i=await e.encrypt.append(i);const n=e.encrypt.flush();t=n.signature;const a=new Uint8Array(i.length+n.data.length);a.set(i,0),a.set(n.data,i.length),i=a}return e.encrypted&&!e.zipCrypto||!e.signed||(t=e.crc32.get()),{data:i,signature:t}}}let Mc=!0;var Dc=(e,t,i,n,a,r,o)=>(Object.assign(e,{busy:!0,codecConstructor:t,options:Object.assign({},i),scripts:o,terminate(){e.worker&&!e.busy&&(e.worker.terminate(),e.interface=null)},onTaskFinished(){e.busy=!1,a(e)}}),r?function(e,t){let i;const n={type:"module"};if(!e.interface){if(Mc)try{e.worker=a()}catch(t){Mc=!1,e.worker=a(n)}else e.worker=a(n);e.worker.addEventListener("message",(function(t){const n=t.data;if(i){const t=n.error,a=n.type;if(t){const n=new Error(t.message);n.stack=t.stack,i.reject(n),i=null,e.onTaskFinished()}else if("init"==a||"flush"==a||"append"==a){const t=n.data;"flush"==a?(i.resolve({data:new Uint8Array(t),signature:n.signature}),i=null,e.onTaskFinished()):i.resolve(t&&new Uint8Array(t))}}}),!1),e.interface={append:e=>r({type:"append",data:e}),flush:()=>r({type:"flush"})}}return e.interface;function a(t={}){return new Worker(new URL(e.scripts[0],Xu("node_modules/cesium/Source/ThirdParty/zip.js")),t)}async function r(n){if(!i){const i=e.options,n=e.scripts.slice(1);await o({scripts:n,type:"init",options:i,config:{chunkSize:t.chunkSize}})}return o(n)}function o(t){const n=e.worker,a=new Promise((e,t)=>i={resolve:e,reject:t});try{if(t.data)try{t.data=t.data.buffer,n.postMessage(t,[t.data])}catch(e){n.postMessage(t)}else n.postMessage(t)}catch(t){i.reject(t),i=null,e.onTaskFinished()}return a}}(e,n):function(e,t){const i=function(e,t,i){return t.codecType.startsWith("deflate")?new Sc(e,t,i):t.codecType.startsWith("inflate")?new Cc(e,t,i):void 0}(e.codecConstructor,e.options,t);return{async append(t){try{return await i.append(t)}catch(t){throw e.onTaskFinished(),t}},async flush(){try{return await i.flush()}finally{e.onTaskFinished()}}}}(e,n));let Pc=[],Ic=[];function Lc(e,t,i){const n=!(!t.compressed&&!t.signed&&!t.encrypted)&&(t.useWebWorkers||void 0===t.useWebWorkers&&i.useWebWorkers),a=n&&i.workerScripts?i.workerScripts[t.codecType]:[];if(Pc.length!e.busy);return o?(jc(o),Dc(o,e,t,i,r,n,a)):new Promise(i=>Ic.push({resolve:i,codecConstructor:e,options:t,webWorker:n,scripts:a}))}function r(e){if(Ic.length){const[{resolve:t,codecConstructor:n,options:a,webWorker:o,scripts:s}]=Ic.splice(0,1);t(Dc(e,n,a,i,r,o,s))}else e.worker?(jc(e),Number.isFinite(i.terminateWorkerTimeout)&&i.terminateWorkerTimeout>=0&&(e.terminateTimeout=setTimeout(()=>{Pc=Pc.filter(t=>t!=e),e.terminate()},i.terminateWorkerTimeout))):Pc=Pc.filter(t=>t!=e)}}function jc(e){e.terminateTimeout&&(clearTimeout(e.terminateTimeout),e.terminateTimeout=null)}const Rc=["filename","rawFilename","directory","encrypted","compressedSize","uncompressedSize","lastModDate","rawLastModDate","comment","rawComment","signature","extraField","rawExtraField","bitFlag","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","filenameUTF8","commentUTF8","offset","zip64","compressionMethod","extraFieldNTFS","lastAccessDate","creationDate","extraFieldExtendedTimestamp","version","versionMadeBy","msDosCompatible","internalFileAttribute","externalFileAttribute"];class Nc{constructor(e){Rc.forEach(t=>this[t]=e[t])}}const Bc="File format is not recognized",Fc=["uncompressedSize","compressedSize","offset"];class kc{constructor(e,t,i){Object.assign(this,{reader:e,config:t,options:i})}async getData(e,t,i={}){const{reader:n,offset:a,extraFieldAES:r,compressionMethod:o,config:s,bitFlag:l,signature:u,rawLastModDate:d,compressedSize:c}=this,f=this.localDirectory={};n.initialized||await n.init();let h=await Qc(n,a,30);const p=Zc(h);let m=Hc(this,i,"password");if(m=m&&m.length&&m,r&&99!=r.originalCompressionMethod)throw new Error("Compression method not supported");if(0!=o&&8!=o)throw new Error("Compression method not supported");if(67324752!=Kc(p,0))throw new Error("Local file header not found");zc(f,p,4),h=await Qc(n,a,30+f.filenameLength+f.extraFieldLength),f.rawExtraField=h.subarray(30+f.filenameLength),Uc(this,f,p,4),t.lastAccessDate=f.lastAccessDate,t.creationDate=f.creationDate;const _=this.encrypted&&f.encrypted,g=_&&!r;if(_){if(!g&&void 0===r.strength)throw new Error("Encryption method not supported");if(!m)throw new Error("File contains encrypted entry")}const v=await Lc(s.Inflate,{codecType:"inflate",password:m,zipCrypto:g,encryptionStrength:r&&r.strength,signed:Hc(this,i,"checkSignature"),passwordVerification:g&&(l.dataDescriptor?d>>>8&255:u>>>24&255),signature:u,compressed:0!=o,encrypted:_,useWebWorkers:Hc(this,i,"useWebWorkers")},s);e.initialized||await e.init();const y=Hc(this,i,"signal"),b=a+30+f.filenameLength+f.extraFieldLength;return await xd(v,n,e,b,c,s,{onprogress:i.onprogress,signal:y}),e.getData()}}function zc(e,t,i){const n=e.rawBitFlag=Xc(t,i+2),a=1==(1&n),r=Kc(t,i+6);Object.assign(e,{encrypted:a,version:Xc(t,i),bitFlag:{level:(6&n)>>1,dataDescriptor:8==(8&n),languageEncodingFlag:2048==(2048&n)},rawLastModDate:r,lastModDate:Yc(r),filenameLength:Xc(t,i+22),extraFieldLength:Xc(t,i+24)})}function Uc(e,t,i,n){const a=t.rawExtraField,r=t.extraField=new Map,o=Zc(new Uint8Array(a));let s=0;try{for(;s4294967295==t[e]);for(let t=0;t{if(4294967295==t[i]){if(void 0===e[i])throw new Error("Zip64 extra field not found");t[i]=e[i]}})}(u,t),t.extraFieldZip64=u);const d=r.get(28789);d&&(Vc(d,"filename","rawFilename",t,e),t.extraFieldUnicodePath=d);const c=r.get(25461);c&&(Vc(c,"comment","rawComment",t,e),t.extraFieldUnicodeComment=c);const f=r.get(39169);f?(!function(e,t,i){const n=Zc(e.data);e.vendorVersion=qc(n,0),e.vendorId=qc(n,2);const a=qc(n,4);e.strength=a,e.originalCompressionMethod=i,t.compressionMethod=e.compressionMethod=Xc(n,5)}(f,t,l),t.extraFieldAES=f):t.compressionMethod=l;const h=r.get(10);h&&(!function(e,t){const i=Zc(e.data);let n,a=4;try{for(;a{if(e.data.length>=o+4){const s=Kc(i,o);t[n]=e[n]=new Date(1e3*s);const l=r[a];e[l]=s}o+=4})}(p,t),t.extraFieldExtendedTimestamp=p)}function Vc(e,t,i,n,a){const r=Zc(e.data);e.version=qc(r,0),e.signature=Kc(r,1);const o=new Xd;o.append(a[i]);const s=Zc(new Uint8Array(4));s.setUint32(0,o.get(),!0),e[t]=(new TextDecoder).decode(e.data.subarray(5)),e.valid=!a.bitFlag.languageEncodingFlag&&e.signature==Kc(s,0),e.valid&&(n[t]=e[t],n[t+"UTF8"]=!0)}function Hc(e,t,i){return void 0===t[i]?e.options[i]:t[i]}function Gc(e,t){return t&&"cp437"!=t.trim().toLowerCase()?new TextDecoder(t).decode(e):(e=>{let t="";for(let i=0;i>16,i=65535&e;try{return new Date(1980+((65024&t)>>9),((480&t)>>5)-1,31&t,(63488&i)>>11,(2016&i)>>5,2*(31&i),0)}catch(e){}}function Wc(e){return new Date(Number(e/BigInt(1e4)-BigInt(116444736e5)))}function qc(e,t){return e.getUint8(t)}function Xc(e,t){return e.getUint16(t,!0)}function Kc(e,t){return e.getUint32(t,!0)}function Jc(e,t){return Number(e.getBigUint64(t,!0))}function Zc(e){return new DataView(e.buffer)}function Qc(e,t,i){return e.readUint8Array(t,i)}const $c=new Uint8Array([7,0,2,0,65,69,3,0,0]);let ef=0;function tf(e,t,i){if(e.arrayBuffer)return t||i?e.slice(t,i).arrayBuffer():e.arrayBuffer();{const n=new FileReader;return new Promise((a,r)=>{n.onload=e=>a(e.target.result),n.onerror=()=>r(n.error),n.readAsArrayBuffer(t||i?e.slice(t,i):e)})}}function nf(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function af(e,t,i){return void 0===t[i]?e.options[i]:t[i]}function rf(e,t,i){e.setUint8(t,i)}function of(e,t,i){e.setUint16(t,i,!0)}function sf(e,t,i){e.setUint32(t,i,!0)}function lf(e,t,i){e.setBigUint64(t,i,!0)}function uf(e,t,i){e.set(t,i)}function df(e){return new DataView(e.buffer)}Od({Deflate:function(e){const t=new ad,i=(n=e&&e.chunkSize?e.chunkSize:65536)+5*(Math.floor(n/16383)+1);var n;const a=new Uint8Array(i);let r=e?e.level:-1;void 0===r&&(r=-1),t.deflateInit(r),t.next_out=a,this.append=function(e,n){let r,o,s=0,l=0,u=0;const d=[];if(e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,r=t.deflate(0),0!=r)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==i?d.push(new Uint8Array(a)):d.push(a.slice(0,t.next_out_index))),u+=t.next_out_index,n&&t.next_in_index>0&&t.next_in_index!=s&&(n(t.next_in_index),s=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return d.length>1?(o=new Uint8Array(u),d.forEach((function(e){o.set(e,l),l+=e.length}))):o=d[0]||new Uint8Array(0),o}},this.flush=function(){let e,n,r=0,o=0;const s=[];do{if(t.next_out_index=0,t.avail_out=i,e=t.deflate(4),1!=e&&0!=e)throw new Error("deflating: "+t.msg);i-t.avail_out>0&&s.push(a.slice(0,t.next_out_index)),o+=t.next_out_index}while(t.avail_in>0||0===t.avail_out);return t.deflateEnd(),n=new Uint8Array(o),s.forEach((function(e){n.set(e,r),r+=e.length})),n}},Inflate:function(e){const t=new vd,i=e&&e.chunkSize?Math.floor(2*e.chunkSize):131072,n=new Uint8Array(i);let a=!1;t.inflateInit(),t.next_out=n,this.append=function(e,r){const o=[];let s,l,u=0,d=0,c=0;if(0!==e.length){t.next_in_index=0,t.next_in=e,t.avail_in=e.length;do{if(t.next_out_index=0,t.avail_out=i,0!==t.avail_in||a||(t.next_in_index=0,a=!0),s=t.inflate(0),a&&-5===s){if(0!==t.avail_in)throw new Error("inflating: bad input")}else if(0!==s&&1!==s)throw new Error("inflating: "+t.msg);if((a||1===s)&&t.avail_in===e.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===i?o.push(new Uint8Array(n)):o.push(n.slice(0,t.next_out_index))),c+=t.next_out_index,r&&t.next_in_index>0&&t.next_in_index!=u&&(r(t.next_in_index),u=t.next_in_index)}while(t.avail_in>0||0===t.avail_out);return o.length>1?(l=new Uint8Array(c),o.forEach((function(e){l.set(e,d),d+=e.length}))):l=o[0]||new Uint8Array(0),l}},this.flush=function(){t.inflateEnd()}}});var cf=Object.freeze({__proto__:null,configure:Od,getMimeType:function(){return"application/octet-stream"},ERR_ABORT:"Abort error",Reader:Cd,Writer:Sd,TextReader:class extends Cd{constructor(e){super(),this.blobReader=new Md(new Blob([e],{type:"text/plain"}))}async init(){super.init(),this.blobReader.init(),this.size=this.blobReader.size}async readUint8Array(e,t){return this.blobReader.readUint8Array(e,t)}},TextWriter:class extends Sd{constructor(e){super(),this.encoding=e,this.blob=new Blob([],{type:"text/plain"})}async writeUint8Array(e){super.writeUint8Array(e),this.blob=new Blob([this.blob,e.buffer],{type:"text/plain"})}getData(){if(this.blob.text)return this.blob.text();{const e=new FileReader;return new Promise((t,i)=>{e.onload=e=>t(e.target.result),e.onerror=()=>i(e.error),e.readAsText(this.blob,this.encoding)})}}},Data64URIReader:class extends Cd{constructor(e){super(),this.dataURI=e;let t=e.length;for(;"="==e.charAt(t-1);)t--;this.dataStart=e.indexOf(",")+1,this.size=Math.floor(.75*(t-this.dataStart))}async readUint8Array(e,t){const i=new Uint8Array(t),n=4*Math.floor(e/3),a=atob(this.dataURI.substring(n+this.dataStart,4*Math.ceil((e+t)/3)+this.dataStart)),r=e-3*Math.floor(n/4);for(let e=r;e2?this.data+=btoa(i):this.pending=i}getData(){return this.data+btoa(this.pending)}},BlobReader:Md,BlobWriter:Dd,Uint8ArrayReader:class extends Cd{constructor(e){super(),this.array=e,this.size=e.length}async readUint8Array(e,t){return this.array.slice(e,e+t)}},Uint8ArrayWriter:class extends Sd{constructor(){super(),this.array=new Uint8Array(0)}async writeUint8Array(e){super.writeUint8Array(e);const t=this.array;this.array=new Uint8Array(t.length+e.length),this.array.set(t),this.array.set(e,t.length)}getData(){return this.array}},HttpReader:Hd,HttpRangeReader:class extends Hd{constructor(e,t={}){t.useRangeHeader=!0,super(e,t)}},ERR_HTTP_RANGE:"HTTP Range not supported",ZipReader:class{constructor(e,t={}){Object.assign(this,{reader:e,options:t,config:wd()})}async getEntries(e={}){const t=this,i=t.reader;if(i.initialized||await i.init(),i.size<22)throw new Error(Bc);const n=await async function(e,t,i,n,a){const r=new Uint8Array(4);!function(e,t,i){e.setUint32(t,i,!0)}(Zc(r),0,t);const o=n+a;return await s(n)||await s(Math.min(o,i));async function s(t){const a=i-t,o=await Qc(e,a,t);for(let e=o.length-n;e>=0;e--)if(o[e]==r[0]&&o[e+1]==r[1]&&o[e+2]==r[2]&&o[e+3]==r[3])return{offset:a+e,buffer:o.slice(e,e+n).buffer}}}(i,101010256,i.size,22,1048560);if(!n)throw new Error("End of central directory not found");const a=Zc(n);let r=Kc(a,12),o=Kc(a,16),s=Xc(a,8),l=0;if(4294967295==o||4294967295==r||65535==s){const e=Zc(await Qc(i,n.offset-20,20));if(117853008!=Kc(e,0))throw new Error("End of Zip64 central directory not found");o=Jc(e,8);let t=await Qc(i,o,56),a=Zc(t);const u=n.offset-20-56;if(101075792!=Kc(a,0)&&o!=u){const e=o;o=u,l=o-e,t=await Qc(i,o,56),a=Zc(t)}if(101075792!=Kc(a,0))throw new Error("End of Zip64 central directory locator not found");s=Jc(a,32),r=Jc(a,40),o-=r}if(o<0||o>=i.size)throw new Error(Bc);let u=0,d=await Qc(i,o,r),c=Zc(d);const f=n.offset-r;if(33639248!=Kc(c,u)&&o!=f){const e=o;o=f,l=o-e,d=await Qc(i,o,r),c=Zc(d)}if(o<0||o>=i.size)throw new Error(Bc);const h=[];for(let n=0;na.getData(e,v,t),h.push(v),u=g,e.onprogress)try{e.onprogress(n+1,s,new Nc(a))}catch(e){}}return h}async close(){}},ERR_BAD_FORMAT:Bc,ERR_EOCDR_NOT_FOUND:"End of central directory not found",ERR_EOCDR_ZIP64_NOT_FOUND:"End of Zip64 central directory not found",ERR_EOCDR_LOCATOR_ZIP64_NOT_FOUND:"End of Zip64 central directory locator not found",ERR_CENTRAL_DIRECTORY_NOT_FOUND:"Central directory header not found",ERR_LOCAL_FILE_HEADER_NOT_FOUND:"Local file header not found",ERR_EXTRAFIELD_ZIP64_NOT_FOUND:"Zip64 extra field not found",ERR_ENCRYPTED:"File contains encrypted entry",ERR_UNSUPPORTED_ENCRYPTION:"Encryption method not supported",ERR_UNSUPPORTED_COMPRESSION:"Compression method not supported",ERR_INVALID_SIGNATURE:"Invalid signature",ERR_INVALID_PASSWORD:"Invalid pasword",ZipWriter:class{constructor(e,t={}){Object.assign(this,{writer:e,options:t,config:wd(),files:new Map,offset:e.size,pendingCompressedSize:0,pendingEntries:[]})}async add(e="",t,i={}){const n=this;if(!(efn.pendingEntries.push({name:e,reader:t,options:i,resolve:a,reject:r}));ef++;try{return await async function(e,t,i,n){t=t.trim(),n.directory&&!t.endsWith("/")?t+="/":n.directory=t.endsWith("/");if(e.files.has(t))throw new Error("File already exists");const a=(new TextEncoder).encode(t);if(a.length>65535)throw new Error("File entry name exceeds 64KB");const r=n.comment||"",o=(new TextEncoder).encode(r);if(o.length>65535)throw new Error("File entry comment exceeds 64KB");const s=e.options.version||n.version||0;if(s>65535)throw new Error("Version exceeds 65535");const l=e.options.versionMadeBy||n.versionMadeBy||20;if(l>65535)throw new Error("Version exceeds 65535");const u=af(e,n,"lastModDate")||new Date,d=af(e,n,"lastAccessDate"),c=af(e,n,"creationDate"),f=af(e,n,"password"),h=af(e,n,"encryptionStrength")||3,p=af(e,n,"zipCrypto");if(void 0!==f&&void 0!==h&&(h<1||h>3))throw new Error("The strength must equal 1, 2, or 3");let m=new Uint8Array(0);const _=n.extraField;if(_){let e=0,t=0;_.forEach(t=>e+=4+t.length),m=new Uint8Array(e),_.forEach((e,i)=>{if(i>65535)throw new Error("Extra field type exceeds 65535");if(e.length>65535)throw new Error("Extra field data exceeds 64KB");uf(m,new Uint16Array([i]),t),uf(m,new Uint16Array([e.length]),t+2),uf(m,e,t+4),t+=4+e.length})}let g=af(e,n,"extendedTimestamp");void 0===g&&(g=!0);let v=0,y=af(e,n,"keepOrder");void 0===y&&(y=!0);let b=0,w=af(e,n,"msDosCompatible");void 0===w&&(w=!0);const O=af(e,n,"internalFileAttribute")||0,x=af(e,n,"externalFileAttribute")||0;i&&(i.initialized||await i.init(),b=i.size,v=function(e){return e+5*(Math.floor(e/16383)+1)}(b));let A=n.zip64||e.options.zip64||!1;if(e.offset+e.pendingCompressedSize>=4294967295||b>=4294967295||v>=4294967295){if(!1===n.zip64||!1===e.options.zip64||!y)throw new Error("Zip64 is not supported");A=!0}e.pendingCompressedSize+=v,await Promise.resolve();const T=af(e,n,"level"),E=af(e,n,"useWebWorkers"),C=af(e,n,"bufferedWrite");let S=af(e,n,"dataDescriptor"),M=af(e,n,"dataDescriptorSignature");const D=af(e,n,"signal");void 0===S&&(S=!0);S&&void 0===M&&(M=!0);const P=await async function(e,t,i,n){const a=e.files,r=e.writer,o=Array.from(a.values()).pop();let s,l,u,d={};a.set(t,d);try{let c,f,h;if(n.keepOrder&&(c=o&&o.lock),d.lock=h=new Promise(e=>u=e),n.bufferedWrite||e.lockWrite||!n.dataDescriptor?(f=new Dd,f.init(),s=!0):(e.lockWrite=new Promise(e=>l=e),r.initialized||await r.init(),f=r),d=await async function(e,t,i,n){const{rawFilename:a,lastAccessDate:r,creationDate:o,password:s,level:l,zip64:u,zipCrypto:d,dataDescriptor:c,dataDescriptorSignature:f,directory:h,version:p,versionMadeBy:m,rawComment:_,rawExtraField:g,useWebWorkers:v,onprogress:y,signal:b,encryptionStrength:w,extendedTimestamp:O,msDosCompatible:x,internalFileAttribute:A,externalFileAttribute:T}=n,E=Boolean(s&&s.length),C=0!==l&&!h;let S,M,D;if(E&&!d){S=new Uint8Array($c.length+2);const e=df(S);of(e,0,39169),uf(S,$c,2),rf(e,8,w)}else S=new Uint8Array(0);if(O){D=new Uint8Array(9+(r?4:0)+(o?4:0));const e=df(D);of(e,0,21589),of(e,2,D.length-4);rf(e,4,1+(r?2:0)+(o?4:0)),sf(e,5,Math.floor(n.lastModDate.getTime()/1e3)),r&&sf(e,9,Math.floor(r.getTime()/1e3)),o&&sf(e,13,Math.floor(o.getTime()/1e3));try{M=new Uint8Array(36);const e=df(M),t=nf(n.lastModDate);of(e,0,10),of(e,2,32),of(e,8,1),of(e,10,24),lf(e,12,t),lf(e,20,nf(r)||t),lf(e,28,nf(o)||t)}catch(e){M=new Uint8Array(0)}}else M=D=new Uint8Array(0);const P={version:p||20,versionMadeBy:m,zip64:u,directory:Boolean(h),filenameUTF8:!0,rawFilename:a,commentUTF8:!0,rawComment:_,rawExtraFieldZip64:u?new Uint8Array(28):new Uint8Array(0),rawExtraFieldExtendedTimestamp:D,rawExtraFieldNTFS:M,rawExtraFieldAES:S,rawExtraField:g,extendedTimestamp:O,msDosCompatible:x,internalFileAttribute:A,externalFileAttribute:T};let I=P.uncompressedSize=0,L=2048;c&&(L|=8);let j=0;C&&(j=8);u&&(P.version=P.version>45?P.version:45);E&&(L|=1,d||(P.version=P.version>51?P.version:51,j=99,C&&(P.rawExtraFieldAES[9]=8)));P.compressionMethod=j;const R=P.headerArray=new Uint8Array(26),N=df(R);of(N,0,P.version),of(N,2,L),of(N,4,j);const B=new Uint32Array(1),F=df(B);let k;k=n.lastModDateGd?Gd:n.lastModDate;of(F,0,(k.getHours()<<6|k.getMinutes())<<5|k.getSeconds()/2),of(F,2,(k.getFullYear()-1980<<4|k.getMonth()+1)<<5|k.getDate());const z=B[0];sf(N,6,z),of(N,22,a.length);const U=S.length+D.length+M.length+P.rawExtraField.length;of(N,24,U);const V=new Uint8Array(30+a.length+U);let H;sf(df(V),0,67324752),uf(V,R,4),uf(V,a,30),uf(V,S,30+a.length),uf(V,D,30+a.length+S.length),uf(V,M,30+a.length+S.length+D.length),uf(V,P.rawExtraField,30+a.length+S.length+D.length+M.length);let G=0;if(e){I=P.uncompressedSize=e.size;const n=await Lc(i.Deflate,{codecType:"deflate",level:l,password:s,encryptionStrength:w,zipCrypto:E&&d,passwordVerification:E&&d&&z>>8&255,signed:!0,compressed:C,encrypted:E,useWebWorkers:v},i);await t.writeUint8Array(V),P.dataWritten=!0,H=await xd(n,e,t,0,I,i,{onprogress:y,signal:b}),G=H.length}else await t.writeUint8Array(V),P.dataWritten=!0;let Y,W=new Uint8Array(0),q=0;c&&(W=new Uint8Array(u?f?24:20:f?16:12),Y=df(W),f&&(q=4,sf(Y,0,134695760)));if(e){const e=H.signature;if(E&&!d||void 0===e||(sf(N,10,e),P.signature=e,c&&sf(Y,q,e)),u){const e=df(P.rawExtraFieldZip64);of(e,0,1),of(e,2,24),sf(N,14,4294967295),lf(e,12,BigInt(G)),sf(N,18,4294967295),lf(e,4,BigInt(I)),c&&(lf(Y,q+4,BigInt(G)),lf(Y,q+12,BigInt(I)))}else sf(N,14,G),sf(N,18,I),c&&(sf(Y,q+4,G),sf(Y,q+8,I))}c&&await t.writeUint8Array(W);const X=V.length+G+W.length;return Object.assign(P,{compressedSize:G,lastModDate:k,rawLastModDate:z,creationDate:o,lastAccessDate:r,encrypted:E,length:X}),P}(i,f,e.config,n),d.lock=h,a.set(t,d),d.filename=t,s){let t=0;const i=f.getData();let o;await Promise.all([e.lockWrite,c]);do{o=Array.from(a.values()).find(e=>e.writingBufferedData),o&&await o.lock}while(o&&o.lock);if(d.writingBufferedData=!0,!n.dataDescriptor){const e=26,a=await tf(i,0,e),o=new DataView(a);d.encrypted&&!n.zipCrypto||sf(o,14,d.signature),d.zip64?(sf(o,18,4294967295),sf(o,22,4294967295)):(sf(o,18,d.compressedSize),sf(o,22,d.uncompressedSize)),await r.writeUint8Array(new Uint8Array(a)),t=e}await async function(e,t,i=0){await async function n(){if(i=4294967295)throw new Error("Zip64 is not supported");return e.offset+=d.length,d}catch(i){throw(s&&d.writingBufferedData||!s&&d.dataWritten)&&(i.corruptedEntry=e.hasCorruptedEntries=!0,d.uncompressedSize&&(e.offset+=d.uncompressedSize)),a.delete(t),i}finally{u(),l&&l()}}(e,t,i,Object.assign({},n,{rawFilename:a,rawComment:o,version:s,versionMadeBy:l,lastModDate:u,lastAccessDate:d,creationDate:c,rawExtraField:m,zip64:A,password:f,level:T,useWebWorkers:E,encryptionStrength:h,extendedTimestamp:g,zipCrypto:p,bufferedWrite:C,keepOrder:y,dataDescriptor:S,dataDescriptorSignature:M,signal:D,msDosCompatible:w,internalFileAttribute:O,externalFileAttribute:x}));v&&(e.pendingCompressedSize-=v);return Object.assign(P,{name:t,comment:r,extraField:_}),new Nc(P)}(n,e,t,i)}finally{ef--;const e=n.pendingEntries.shift();e&&n.add(e.name,e.reader,e.options).then(e.resolve).catch(e.reject)}}async close(e=new Uint8Array(0),t={}){return await async function(e,t,i){const n=e.writer,a=e.files;let r=0,o=0,s=e.offset,l=a.size;for(const[,e]of a)o+=46+e.rawFilename.length+e.rawComment.length+e.rawExtraFieldZip64.length+e.rawExtraFieldAES.length+e.rawExtraFieldExtendedTimestamp.length+e.rawExtraFieldNTFS.length+e.rawExtraField.length;let u=i.zip64||e.options.zip64||!1;if(s>=4294967295||o>=4294967295||l>=65535){if(!1===i.zip64||!1===e.options.zip64)throw new Error("Zip64 is not supported");u=!0}const d=new Uint8Array(o+(u?98:22)),c=df(d);if(t&&t.length){if(!(t.length<=65535))throw new Error("Zip file comment exceeds 64KB");of(c,r+20,t.length)}for(const[e,t]of Array.from(a.values()).entries()){const{rawFilename:n,rawExtraFieldZip64:o,rawExtraFieldAES:s,rawExtraField:l,rawComment:u,versionMadeBy:f,headerArray:h,directory:p,zip64:m,msDosCompatible:_,internalFileAttribute:g,externalFileAttribute:v}=t;let y,b;if(t.extendedTimestamp){b=t.rawExtraFieldNTFS,y=new Uint8Array(9);const e=df(y);of(e,0,21589),of(e,2,y.length-4),rf(e,4,1),sf(e,5,Math.floor(t.lastModDate.getTime()/1e3))}else b=y=new Uint8Array(0);const w=o.length+s.length+y.length+b.length+l.length;if(sf(c,r,33639248),of(c,r+4,f),uf(d,h,r+6),of(c,r+30,w),of(c,r+32,u.length),sf(c,r+34,g),v?sf(c,r+38,v):p&&_&&rf(c,r+38,16),sf(c,r+42,m?4294967295:t.offset),uf(d,n,r+46),uf(d,o,r+46+n.length),uf(d,s,r+46+n.length+o.length),uf(d,y,r+46+n.length+o.length+s.length),uf(d,b,r+46+n.length+o.length+s.length+y.length),uf(d,l,r+46+n.length+o.length+s.length+y.length+b.length),uf(d,u,r+46+n.length+w),r+=46+n.length+w+u.length,i.onprogress)try{i.onprogress(e+1,a.size,new Nc(t))}catch(e){}}u&&(sf(c,r,101075792),lf(c,r+4,BigInt(44)),of(c,r+12,45),of(c,r+14,45),lf(c,r+24,BigInt(l)),lf(c,r+32,BigInt(l)),lf(c,r+40,BigInt(o)),lf(c,r+48,BigInt(s)),sf(c,r+56,117853008),lf(c,r+64,BigInt(s)+BigInt(o)),sf(c,r+72,1),l=65535,s=4294967295,o=4294967295,r+=76);sf(c,r,101010256),of(c,r+8,l),of(c,r+10,l),sf(c,r+12,o),sf(c,r+16,s),await n.writeUint8Array(d),t&&t.length&&await n.writeUint8Array(t)}(this,e,t),this.writer.getData()}},ERR_DUPLICATED_NAME:"File already exists",ERR_INVALID_COMMENT:"Zip file comment exceeds 64KB",ERR_INVALID_ENTRY_NAME:"File entry name exceeds 64KB",ERR_INVALID_ENTRY_COMMENT:"File entry comment exceeds 64KB",ERR_INVALID_VERSION:"Version exceeds 65535",ERR_INVALID_EXTRAFIELD_TYPE:"Extra field type exceeds 65535",ERR_INVALID_EXTRAFIELD_DATA:"Extra field data exceeds 64KB",ERR_INVALID_ENCRYPTION_STRENGTH:"The strength must equal 1, 2, or 3",ERR_UNSUPPORTED_FORMAT:"Zip64 is not supported"}),ff=i(92);var hf=function(e,t){this.position=e,this.headingPitchRange=t};function pf(e,t){this.id=t,this.name=e,this.playlistIndex=0,this.playlist=[],this.tourStart=new c.default,this.tourEnd=new c.default,this.entryStart=new c.default,this.entryEnd=new c.default,this._activeEntries=[]}function mf(e){for(var t=e.pop();void 0!==t;t=e.pop())t.stop()}function _f(e,t,i){var n=this.playlist[this.playlistIndex];if(n){var a=gf.bind(this,e,t,i);if(this._activeEntries.push(n),this.entryStart.raiseEvent(n),n.blocking)n.play(a,e.scene.camera,t);else{var r=this;n.play((function(){r.entryEnd.raiseEvent(n);var e=r._activeEntries.indexOf(n);e>=0&&r._activeEntries.splice(e,1)})),a(e,t,i)}}else Object(l.default)(i)&&i(!1)}function gf(e,t,i,n){var a=this.playlist[this.playlistIndex];if(this.entryEnd.raiseEvent(a,n),n)i(n);else{var r=this._activeEntries.indexOf(a);r>=0&&this._activeEntries.splice(r,1),this.playlistIndex++,_f.call(this,e,t,i)}}pf.prototype.addPlaylistEntry=function(e){this.playlist.push(e)},pf.prototype.play=function(e,t){this.tourStart.raiseEvent();var i=this;_f.call(this,e,t,(function(e){i.playlistIndex=0,e||mf(i._activeEntries),i.tourEnd.raiseEvent(e)}))},pf.prototype.stop=function(){mf(this._activeEntries)};var vf=pf;function yf(e,t,i){this.type="KmlTourFlyTo",this.blocking=!0,this.activeCamera=null,this.activeCallback=null,this.duration=e,this.view=i,this.flyToMode=t}yf.prototype.play=function(e,t,i){if(this.activeCamera=t,Object(l.default)(e)&&null!==e){var n=this;this.activeCallback=function(t){delete n.activeCallback,delete n.activeCamera,e(!Object(l.default)(t)&&t)}}var a=this.getCameraOptions(i);if(this.view.headingPitchRoll)t.flyTo(a);else if(this.view.headingPitchRange){var r=new ne.default(this.view.position);t.flyToBoundingSphere(r,a)}},yf.prototype.stop=function(){Object(l.default)(this.activeCamera)&&this.activeCamera.cancelFlight(),Object(l.default)(this.activeCallback)&&this.activeCallback(!0)},yf.prototype.getCameraOptions=function(e){var t={duration:this.duration};return Object(l.default)(this.activeCallback)&&(t.complete=this.activeCallback),"smooth"===this.flyToMode&&(t.easingFunction=ei.a.LINEAR_NONE),this.view.headingPitchRoll?(t.destination=this.view.position,t.orientation=this.view.headingPitchRoll):this.view.headingPitchRange&&(t.offset=this.view.headingPitchRange),Object(l.default)(e)&&(t=Object(aa.default)(t,e)),t};var bf=yf;function wf(e){this.type="KmlTourWait",this.blocking=!0,this.duration=e,this.timeout=null}wf.prototype.play=function(e){var t=this;this.activeCallback=e,this.timeout=setTimeout((function(){delete t.activeCallback,e(!1)}),1e3*this.duration)},wf.prototype.stop=function(){clearTimeout(this.timeout),Object(l.default)(this.activeCallback)&&this.activeCallback(!0)};var Of,xf=wf,Af=i(352),Tf=i(354),Ef=i(383),Cf=i(306),Sf=i(368),Mf=i(208),Df=i(338),Pf=i(339),If=i(355),Lf={avi:"video/x-msvideo",bmp:"image/bmp",bz2:"application/x-bzip2",chm:"application/vnd.ms-htmlhelp",css:"text/css",csv:"text/csv",doc:"application/msword",dvi:"application/x-dvi",eps:"application/postscript",flv:"video/x-flv",gif:"image/gif",gz:"application/x-gzip",htm:"text/html",html:"text/html",ico:"image/vnd.microsoft.icon",jnlp:"application/x-java-jnlp-file",jpeg:"image/jpeg",jpg:"image/jpeg",m3u:"audio/x-mpegurl",m4v:"video/mp4",mathml:"application/mathml+xml",mid:"audio/midi",midi:"audio/midi",mov:"video/quicktime",mp3:"audio/mpeg",mp4:"video/mp4",mp4v:"video/mp4",mpeg:"video/mpeg",mpg:"video/mpeg",odp:"application/vnd.oasis.opendocument.presentation",ods:"application/vnd.oasis.opendocument.spreadsheet",odt:"application/vnd.oasis.opendocument.text",ogg:"application/ogg",pdf:"application/pdf",png:"image/png",pps:"application/vnd.ms-powerpoint",ppt:"application/vnd.ms-powerpoint",ps:"application/postscript",qt:"video/quicktime",rdf:"application/rdf+xml",rss:"application/rss+xml",rtf:"application/rtf",svg:"image/svg+xml",swf:"application/x-shockwave-flash",text:"text/plain",tif:"image/tiff",tiff:"image/tiff",txt:"text/plain",wav:"audio/x-wav",wma:"audio/x-ms-wma",wmv:"video/x-ms-wmv",xml:"application/xml",zip:"application/zip",detectFromFilename:function(e){var t=e.toLowerCase();return t=Object(lo.a)(t),Lf[t]}};"undefined"!=typeof DOMParser&&(Of=new DOMParser);var jf=new Wu({stripPrefix:!1,email:!1,replaceFn:function(e){if(!e.protocolUrlMatch)return!1}}),Rf=[null,void 0,"http://www.opengis.net/kml/2.2","http://earth.google.com/kml/2.2","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.0"],Nf=["http://www.google.com/kml/ext/2.2"],Bf={kml:Rf,gx:Nf,atom:["http://www.w3.org/2005/Atom"],kmlgx:Rf.concat(Nf)},Ff={Document:Th,Folder:function(e,t,i,n){var a=Ah(e,t,i),r=Object(Qr.default)(i);r.parentEntity=a.entity,Th(e,t,r,n)},Placemark:function(e,t,i,n){for(var a=Ah(e,t,i),r=a.entity,o=a.styleEntity,s=!1,u=t.childNodes,d=0,c=u.length;d0||"onExpire"===h||"onStop"===d){var m=Zf(t,"NetworkLinkControl",Bf.kml),_=Object(l.default)(m),g=ln.default.now(),v={id:Object($r.default)(),href:f,cookie:{},lastUpdated:g,updating:!1,entity:a,viewBoundScale:c,needsUpdate:!1,cameraUpdateTime:g},b=0;if(_&&(v.cookie=Object(Eo.a)(Object(s.default)(th(m,"cookie",Bf.kml),"")),b=Object(s.default)(eh(m,"minRefreshPeriod",Bf.kml),0)),"onInterval"===h)_&&(p=Math.max(b,p)),v.refreshMode=Ph,v.time=p;else if("onExpire"===h){var w;if(_&&(w=th(m,"expires",Bf.kml)),Object(l.default)(w))try{var O=ln.default.fromIso8601(w),x=ln.default.secondsDifference(O,g);x>0&&x",a);-1!==a&&athis._started+this._timeThreshold))return void this._giveUpTime();n=this._nextNode()}this._pop()&&e&&this._process(!0)};var ah={maximumRed:void 0,red:void 0,maximumGreen:void 0,green:void 0,maximumBlue:void 0,blue:void 0};function rh(e,t){if(Object(l.default)(e)&&!/^\s*$/gm.test(e)){"#"===e[0]&&(e=e.substring(1));var i=parseInt(e.substring(0,2),16)/255,n=parseInt(e.substring(2,4),16)/255,a=parseInt(e.substring(4,6),16)/255,r=parseInt(e.substring(6,8),16)/255;return t?(r>0?(ah.maximumRed=r,ah.red=void 0):(ah.maximumRed=void 0,ah.red=0),a>0?(ah.maximumGreen=a,ah.green=void 0):(ah.maximumGreen=void 0,ah.green=0),n>0?(ah.maximumBlue=n,ah.blue=void 0):(ah.maximumBlue=void 0,ah.blue=0),ah.alpha=i,Ot.default.fromRandom(ah)):new Ot.default(r,a,n,i)}}function oh(e,t,i){var n=th(e,t,i);if(Object(l.default)(n))return rh(n,"random"===th(e,"colorMode",i))}function sh(){var e=new Fo.a;return e.width=32,e.height=32,e.scaleByDistance=new ta.a(2414016,1,16093e3,.1),e.pixelOffsetScaleByDistance=new ta.a(2414016,1,16093e3,.1),e}function lh(){var e=new al.a;return e.outline=!0,e.outlineColor=Ot.default.WHITE,e}function uh(){var e=new Af.a;return e.translucencyByDistance=new ta.a(3e6,1,5e6,0),e.pixelOffset=new r.default(17,0),e.horizontalOrigin=Yl.a.LEFT,e.font="16px sans-serif",e.style=Wl.a.FILL_AND_OUTLINE,e}function dh(e,t,i,n,a){var r=th(e,"href",Bf.kml);if(Object(l.default)(r)&&0!==r.length){if(0===r.indexOf("root://icons/palette-")){var o=r.charAt(21),u=Object(s.default)(eh(e,"x",Bf.gx),0),d=Object(s.default)(eh(e,"y",Bf.gx),0);u=Math.min(u/32,7),r="https://maps.google.com/mapfiles/kml/pal"+o+"/icon"+(8*(d=7-Math.min(d/32,7))+u)+".png"}var c=nh(r,i,n);if(a){var f=th(e,"refreshMode",Bf.kml),h=th(e,"viewRefreshMode",Bf.kml);"onInterval"===f||"onExpire"===f?Object(Oo.a)("kml-refreshMode-"+f,"KML - Unsupported Icon refreshMode: "+f):"onStop"!==h&&"onRegion"!==h||Object(Oo.a)("kml-refreshMode-"+h,"KML - Unsupported Icon viewRefreshMode: "+h);var p=Object(s.default)(th(e,"viewBoundScale",Bf.kml),1),m="onStop"===h?"BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]":"",_=Object(s.default)(th(e,"viewFormat",Bf.kml),m),g=th(e,"httpQuery",Bf.kml);Object(l.default)(_)&&c.setQueryParameters(Object(Eo.a)(jh(_))),Object(l.default)(g)&&c.setQueryParameters(Object(Eo.a)(jh(g)));var v=t._ellipsoid;return kh(c,t._camera,t._canvas,p,t._lastCameraView.bbox,v),c}return c}}function ch(e,t,i,n,a){var o=eh(t,"scale",Bf.kml),u=eh(t,"heading",Bf.kml),d=oh(t,"color",Bf.kml),c=Zf(t,"Icon",Bf.kml),f=dh(c,e,n,a,!1);Object(l.default)(c)&&!Object(l.default)(f)&&(f=!1);var h,p,m=eh(c,"x",Bf.gx),_=eh(c,"y",Bf.gx),g=eh(c,"w",Bf.gx),v=eh(c,"h",Bf.gx),y=Zf(t,"hotSpot",Bf.kml),b=Kf(y,"x"),w=Kf(y,"y"),O=Jf(y,"xunits"),x=Jf(y,"yunits"),A=i.billboard;Object(l.default)(A)||(A=sh(),i.billboard=A),A.image=f,A.scale=o,A.color=d,(Object(l.default)(m)||Object(l.default)(_)||Object(l.default)(g)||Object(l.default)(v))&&(A.imageSubRegion=new ie.a(m,_,g,v)),Object(l.default)(u)&&0!==u&&(A.rotation=Re.default.toRadians(-u),A.alignedAxis=oe.default.UNIT_Z),o=Object(s.default)(o,1),Object(l.default)(b)&&("pixels"===O?h=-b*o:"insetPixels"===O?h=(b-32)*o:"fraction"===O&&(h=32*-b*o),h+=16*o),Object(l.default)(w)&&("pixels"===x?p=w*o:"insetPixels"===x?p=(32-w)*o:"fraction"===x&&(p=32*w*o),p-=16*o),(Object(l.default)(h)||Object(l.default)(p))&&(A.pixelOffset=new r.default(h,p))}function fh(e,t,i,n,a){for(var r=0,o=t.childNodes.length;r:clampToSeaFloor is currently not supported, using :clampToGround."),Gs.a.CLAMP_TO_GROUND):"relativeToSeaFloor"===t?(Object(Oo.a)("kml-gx:altitudeMode-relativeToSeaFloor","KML - :relativeToSeaFloor is currently not supported, using :relativeToGround."),Gs.a.RELATIVE_TO_GROUND):(Object(l.default)(e)?Object(Oo.a)("kml-altitudeMode-unknown","KML - Unknown :"+e+", using :CLAMP_TO_GROUND."):Object(Oo.a)("kml-gx:altitudeMode-unknown","KML - Unknown :"+t+", using :CLAMP_TO_GROUND."),Gs.a.CLAMP_TO_GROUND)}function gh(e,t,i){return"relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t?e:((Object(l.default)(t)&&"clampToGround"!==t||Object(l.default)(i)&&"clampToSeaFloor"!==i)&&Object(Oo.a)("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+Object(s.default)(t,i)),new Df.a(e))}function vh(e,t,i,n){var a=t.label;Object(l.default)(a)||(a=Object(l.default)(i.label)?i.label.clone():uh(),t.label=a),a.text=t.name;var o=t.billboard;Object(l.default)(o)||(o=Object(l.default)(i.billboard)?i.billboard.clone():sh(),t.billboard=o),Object(l.default)(o.image)?o.image.getValue()||(o.image=void 0):o.image=e._pinBuilder.fromColor(Ot.default.YELLOW,64);var s=1;Object(l.default)(o.scale)&&(0!==(s=o.scale.getValue())?a.pixelOffset=new r.default(16*s+1,0):(a.pixelOffset=void 0,a.horizontalOrigin=void 0)),Object(l.default)(n)&&e._clampToGround&&(o.heightReference=n,a.heightReference=n)}function yh(e,t){var i=e.path;Object(l.default)(i)||((i=new Tf.a).leadTime=0,e.path=i);var n=t.polyline;Object(l.default)(n)&&(i.material=n.material,i.width=n.width)}function bh(e,t,i,n,a){var r=Zf(i,"coordinates",Bf.kml),o=th(i,"altitudeMode",Bf.kml),u=th(i,"altitudeMode",Bf.gx),d=ih(i,"extrude",Bf.kml),c=ih(i,"tessellate",Bf.kml),f=Wf(o,u),h=eh(i,"drawOrder",Bf.gx),p=e._ellipsoid,m=Xf(r,p),_=a.polyline;if(f&&d){var g=new If.a;n.wall=g,g.positions=m;var v=a.polygon;Object(l.default)(v)&&(g.fill=v.fill,g.material=v.material),g.outline=!0,Object(l.default)(_)?(g.outlineColor=Object(l.default)(_.material)?_.material.color:Ot.default.WHITE,g.outlineWidth=_.width):Object(l.default)(v)&&(g.outlineColor=Object(l.default)(v.material)?v.material.color:Ot.default.WHITE)}else if(e._clampToGround&&!f&&c){var y=new rl.a;y.clampToGround=!0,n.polyline=y,y.positions=m,Object(l.default)(_)?(y.material=Object(l.default)(_.material)?_.material.color.getValue(Hn.a.MINIMUM_VALUE):Ot.default.WHITE,y.width=Object(s.default)(_.width,1)):(y.material=Ot.default.WHITE,y.width=1),y.zIndex=h}else Object(l.default)(h)&&Object(Oo.a)("kml-gx:drawOrder","KML - gx:drawOrder is not supported in LineStrings when clampToGround is false"),e._clampToGround&&!c&&Object(Oo.a)("kml-line-tesselate","Ignoring clampToGround for KML lines without the tessellate flag."),_=Object(l.default)(_)?_.clone():new rl.a,n.polyline=_,_.positions=function(e,t,i,n){if(Object(l.default)(e)){if("relativeToSeaFloor"===i||"absolute"===t||"relativeToGround"===t)return e;(Object(l.default)(t)&&"clampToGround"!==t||Object(l.default)(i)&&"clampToSeaFloor"!==i)&&Object(Oo.a)("kml-altitudeMode-unknown","KML - Unknown altitudeMode: "+Object(s.default)(t,i));for(var a=e.length,r=0;r0&&Object(Oo.a)("kml-gx:angles","KML - gx:angles are not supported in gx:Tracks");for(var h=Math.min(s.length,u.length),p=[],m=[],_=0;_0&&n.availability.addInterval(new yr.default({start:m[0],stop:m[m.length-1]})),c&&d&&mh(t,n,a),!0},MultiTrack:function(e,t,i,n,a){for(var r,o,s,u=ih(i,"interpolate",Bf.gx),d=$f(i,"Track",Bf.gx),c=!1,f=new Pf.default,h=new br.default,p=new ss.a,m=e._ellipsoid,_=0,g=d.length;_0){for(g='',r=0;r";g+="
"+Object(s.default)(d.displayName,o)+""+Object(s.default)(d.value,"")+"
"}if(Object(l.default)(g)){g=jf.link(g),Oh.innerHTML=g;var O=Oh.querySelectorAll("a");for(r=0;r1&&(Hf(Oh,"a","href",n),Hf(Oh,"link","href",n),Hf(Oh,"area","href",n),Hf(Oh,"img","src",n),Hf(Oh,"iframe","src",n),Hf(Oh,"video","src",n),Hf(Oh,"audio","src",n),Hf(Oh,"source","src",n),Hf(Oh,"track","src",n),Hf(Oh,"input","src",n),Hf(Oh,"embed","src",n),Hf(Oh,"script","src",n),Hf(Oh,"video","poster",n)),Gf(Oh,"a","href",a),Gf(Oh,"link","href",a),Gf(Oh,"area","href",a),Gf(Oh,"img","src",a),Gf(Oh,"iframe","src",a),Gf(Oh,"video","src",a),Gf(Oh,"audio","src",a),Gf(Oh,"source","src",a),Gf(Oh,"track","src",a),Gf(Oh,"input","src",a),Gf(Oh,"embed","src",a),Gf(Oh,"script","src",a),Gf(Oh,"video","poster",a);var x='
",Oh.innerHTML="",t.description=x}}(t,u,c,o,r);var y=e._ellipsoid;return Mh(t,u,y),Sh(t,u,y),Object(l.default)(Zf(t,"Region",Bf.kml))&&Object(Oo.a)("kml-region","KML - Placemark Regions are unsupported"),{entity:u,styleEntity:c}}function Th(e,t,i,n){n.addNodes(t.childNodes,i),n.process()}"undefined"!=typeof document&&(Oh=document.createElement("div"));var Eh={FlyTo:function(e,t,i){var n=eh(t,"duration",Bf.gx),a=th(t,"flyToMode",Bf.gx),r={kml:{}};Mh(t,r,i),Sh(t,r,i);var o=r.kml.lookAt||r.kml.camera,s=new bf(n,a,o);e.addPlaylistEntry(s)},Wait:function(e,t){var i=eh(t,"duration",Bf.gx);e.addPlaylistEntry(new xf(i))},SoundCue:Ch,AnimatedUpdate:Ch,TourControl:Ch};function Ch(e,t){Object(Oo.a)("KML Tour unsupported node "+t.localName)}function Sh(e,t,i){var n=Zf(e,"Camera",Bf.kml);if(Object(l.default)(n)){var a=Object(s.default)(eh(n,"longitude",Bf.kml),0),r=Object(s.default)(eh(n,"latitude",Bf.kml),0),o=Object(s.default)(eh(n,"altitude",Bf.kml),0),u=Object(s.default)(eh(n,"heading",Bf.kml),0),d=Object(s.default)(eh(n,"tilt",Bf.kml),0),c=Object(s.default)(eh(n,"roll",Bf.kml),0),f=oe.default.fromDegrees(a,r,o,i),h=On.default.fromDegrees(u,d-90,c);t.kml.camera=new Gl(f,h)}}function Mh(e,t,i){var n=Zf(e,"LookAt",Bf.kml);if(Object(l.default)(n)){var a=Object(s.default)(eh(n,"longitude",Bf.kml),0),r=Object(s.default)(eh(n,"latitude",Bf.kml),0),o=Object(s.default)(eh(n,"altitude",Bf.kml),0),u=eh(n,"heading",Bf.kml),d=eh(n,"tilt",Bf.kml),c=Object(s.default)(eh(n,"range",Bf.kml),0);d=Re.default.toRadians(Object(s.default)(d,0)),u=Re.default.toRadians(Object(s.default)(u,0));var f=new wn.a(u,d-Re.default.PI_OVER_TWO,c),h=oe.default.fromDegrees(a,r,o,i);t.kml.lookAt=new hf(h,f)}}function Dh(e,t,i,n){e._unsupportedNode.raiseEvent(e,i.parentEntity,t,i.entityCollection,i.styleCollection,i.sourceResource,i.uriResolver),Object(Oo.a)("kml-unsupportedFeature-"+t.nodeName,"KML - Unsupported feature: "+t.nodeName)}var Ph=0,Ih=1,Lh=2;function jh(e){if(!Object(l.default)(e)||0===e.length)return"";var t=e[0];return"&"!==t&&"?"!==t||(e=e.substring(1)),e}var Rh=new m.default,Nh=new x.default,Bh=new r.default,Fh=new oe.default;function kh(e,t,i,n,a,r){function o(e){return e<-Re.default.PI_OVER_TWO?-Re.default.PI_OVER_TWO:e>Re.default.PI_OVER_TWO?Re.default.PI_OVER_TWO:e}function u(e){return e>Re.default.PI?e-Re.default.TWO_PI:e<-Re.default.PI?e+Re.default.TWO_PI:e}var d=Object(wo.a)(e.queryParameters);if(d=d.replace(/%5B/g,"[").replace(/%5D/g,"]"),Object(l.default)(t)&&t._mode!==Ss.default.MORPHING){var c,f;if(a=Object(s.default)(a,Rh),Object(l.default)(i)&&(Bh.x=.5*i.clientWidth,Bh.y=.5*i.clientHeight,c=t.pickEllipsoid(Bh,r,Fh)),Object(l.default)(c)?f=r.cartesianToCartographic(c,Nh):(f=m.default.center(a,Nh),c=r.cartographicToCartesian(f)),Object(l.default)(n)&&!Re.default.equalsEpsilon(n,1,Re.default.EPSILON9)){var h=a.width*n*.5,p=a.height*n*.5;a=new m.default(u(f.longitude-h),o(f.latitude-p),u(f.longitude+h),o(f.latitude+p))}d=(d=(d=(d=d.replace("[bboxWest]",Re.default.toDegrees(a.west).toString())).replace("[bboxSouth]",Re.default.toDegrees(a.south).toString())).replace("[bboxEast]",Re.default.toDegrees(a.east).toString())).replace("[bboxNorth]",Re.default.toDegrees(a.north).toString());var _=Re.default.toDegrees(f.longitude).toString(),g=Re.default.toDegrees(f.latitude).toString();d=(d=(d=(d=(d=(d=(d=(d=d.replace("[lookatLon]",_)).replace("[lookatLat]",g)).replace("[lookatTilt]",Re.default.toDegrees(t.pitch).toString())).replace("[lookatHeading]",Re.default.toDegrees(t.heading).toString())).replace("[lookatRange]",oe.default.distance(t.positionWC,c))).replace("[lookatTerrainLon]",_)).replace("[lookatTerrainLat]",g)).replace("[lookatTerrainAlt]",f.height.toString()),r.cartesianToCartographic(t.positionWC,Nh),d=(d=(d=d.replace("[cameraLon]",Re.default.toDegrees(Nh.longitude).toString())).replace("[cameraLat]",Re.default.toDegrees(Nh.latitude).toString())).replace("[cameraAlt]",Re.default.toDegrees(Nh.height).toString());var v=t.frustum,y=v.aspectRatio,b="",w="";if(Object(l.default)(y)){var O=Re.default.toDegrees(v.fov);y>1?(b=O,w=O/y):(w=O,b=O*y)}d=(d=d.replace("[horizFov]",b.toString())).replace("[vertFov]",w.toString())}else d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=(d=d.replace("[bboxWest]","-180")).replace("[bboxSouth]","-90")).replace("[bboxEast]","180")).replace("[bboxNorth]","90")).replace("[lookatLon]","")).replace("[lookatLat]","")).replace("[lookatRange]","")).replace("[lookatTilt]","")).replace("[lookatHeading]","")).replace("[lookatTerrainLon]","")).replace("[lookatTerrainLat]","")).replace("[lookatTerrainAlt]","")).replace("[cameraLon]","")).replace("[cameraLat]","")).replace("[cameraAlt]","")).replace("[horizFov]","")).replace("[vertFov]","");d=(d=(d=(d=(d=(d=Object(l.default)(i)?(d=d.replace("[horizPixels]",i.clientWidth)).replace("[vertPixels]",i.clientHeight):(d=d.replace("[horizPixels]","")).replace("[vertPixels]","")).replace("[terrainEnabled]","1")).replace("[clientVersion]","1")).replace("[kmlVersion]","2.2")).replace("[clientName]","Cesium")).replace("[language]","English"),e.setQueryParameters(Object(Eo.a)(d))}function zh(e,t,i,n,r,o,s){t.removeAll();var u=i.documentElement,d=th("Document"===u.localName?u:Zf(u,"Document",Bf.kml),"name",Bf.kml);Object(l.default)(d)||(d=Object(uo.a)(n.getUrlComponent())),Object(l.default)(e._name)||(e._name=d);var c=new Hh._DeferredLoading(e),f=new Ko.a(e);return a.a.all(ph(e,i,f,n,!1,r)).then((function(){var a=i.documentElement;if("kml"===a.localName)for(var u=a.childNodes,d=0;d0;){this._screenOverlays.pop().remove()}};var Yh=new J.default;function Wh(){this.author={name:void 0,uri:void 0,email:void 0},this.link={href:void 0,hreflang:void 0,rel:void 0,type:void 0,title:void 0,length:void 0},this.address=void 0,this.phoneNumber=void 0,this.snippet=void 0,this.extendedData=void 0}Hh.prototype.update=function(e){var t=this._networkLinks;if(0===t.length)return!0;var i=ln.default.now(),n=this;Yh.removeAll();var a=!1,r=this._lastCameraView,o=this._camera;!Object(l.default)(o)||o.positionWC.equalsEpsilon(r.position,Re.default.EPSILON7)&&o.directionWC.equalsEpsilon(r.direction,Re.default.EPSILON7)&&o.upWC.equalsEpsilon(r.up,Re.default.EPSILON7)||(r.position=oe.default.clone(o.positionWC),r.direction=oe.default.clone(o.directionWC),r.up=oe.default.clone(o.upWC),r.bbox=o.computeViewRectangle(),a=!0);var u=new J.default,c=!1;return t.values.forEach((function(e){var t=e.entity;if(!Yh.contains(t.id)){if(!e.updating){var o=!1;if(e.refreshMode===Ph?ln.default.secondsDifference(i,e.lastUpdated)>e.time&&(o=!0):e.refreshMode===Ih?ln.default.greaterThan(i,e.time)&&(o=!0):e.refreshMode===Lh&&(a&&(e.needsUpdate=!0,e.cameraUpdateTime=i),e.needsUpdate&&ln.default.secondsDifference(i,e.cameraUpdateTime)>=e.time&&(o=!0)),o){!function e(t){for(var i=t._children,n=i.length,a=0;a0&&m0){var b=s.createElement("Placemark");b.setAttribute("id",c.get(m.id));var w=m.name,O=m.label;if(Object(l.default)(O)){var x=s.createElement("LabelStyle"),A=d.get(O.text);w=Object(l.default)(A)&&A.length>0?A:w;var T=d.getColor(O.fillColor);Object(l.default)(T)&&(x.appendChild(sm(s,"color",T)),x.appendChild(sm(s,"colorMode","normal")));var E=d.get(O.scale);Object(l.default)(E)&&x.appendChild(sm(s,"scale",E)),o.push(x)}b.appendChild(sm(s,"name",w)),b.appendChild(sm(s,"visibility",m.show)),b.appendChild(sm(s,"description",m.description)),Object(l.default)(p)&&b.appendChild(p),i.appendChild(b);var C=o.length;if(C>0){for(var S=s.createElement("Style"),M=0;M1){for(var D=s.createElement("MultiGeometry"),P=0;P0){var L=s.createElement("Folder");L.setAttribute("id",c.get(m.id)),L.appendChild(sm(s,"name",m.name)),L.appendChild(sm(s,"visibility",m.show)),L.appendChild(sm(s,"description",m.description)),i.appendChild(L),e(t,L,I)}}}(n,c,r),n.styleCache.save(c);var f=n.externalFileHandler;return f.promise.then((function(){var e=(new XMLSerializer).serializeToString(n.kmlDoc);return i?function(e,t){var i=Object(Ii.a)("ThirdParty/Workers/z-worker-pako.js");cf.configure({workerScripts:{deflate:[i,"./pako_deflate.min.js"],inflate:[i,"./pako_inflate.min.js"]}});var n=new cf.BlobWriter,r=new cf.ZipWriter(n);return Object(a.a)(r.add("doc.kml",new cf.TextReader(e))).then((function(){var e=Object.keys(t);return function e(t,i,n,r){if(i.length===r)return;var o=i[r];return Object(a.a)(t.add(o,new cf.BlobReader(n[o]))).then((function(){return e(t,i,n,r+1)}))}(r,e,t,0)})).then((function(){return Object(a.a)(r.close()).then((function(e){return{kmz:e}}))}))}(e,f.files):{kml:e,externalFiles:f.files}}))}kp.prototype.texture=function(e){var t,i=this;if("string"==typeof e||e instanceof y.default){if(!(e=y.default.createIfNeeded(e)).isDataUri)return e.url;var n=e.url.match(zp);t="texture_"+ ++this._count,Object(l.default)(n)&&(t+="."+n[1]);var r=e.fetchBlob().then((function(e){i._files[t]=e}));return this._promises.push(r),t}if(e instanceof HTMLCanvasElement){var o=a.a.defer();return this._promises.push(o.promise),t="texture_"+ ++this._count+".png",e.toBlob((function(e){i._files[t]=e,o.resolve()})),t}return""},kp.prototype.model=function(e,t){var i=this._modelCallback;if(!Object(l.default)(i))throw new b.a("Encountered a model entity while exporting to KML, but no model callback was supplied.");var n={},r=i(e,t,n);for(var o in n)if(n.hasOwnProperty(o)){var s=Object(a.a)(n[o]);this._promises.push(s),s.then(Up(this,o))}return r},Object.defineProperties(kp.prototype,{promise:{get:function(){return a.a.all(this._promises)}},files:{get:function(){return this._files}}}),Vp.prototype.get=function(e,t,i){var n;return Object(l.default)(e)&&(n=Object(l.default)(e.getValue)?e.getValue(this._time,i):e),Object(s.default)(n,t)},Vp.prototype.getColor=function(e,t){var i=this.get(e,t);if(Object(l.default)(i))return lm(i)},Vp.prototype.getMaterialType=function(e){if(Object(l.default)(e))return e.getType(this._time)},Hp.prototype.get=function(e){var t=this._ids,i=e.innerHTML;if(Object(l.default)(t[i]))return t[i];var n="style-"+ ++this._count;return e.setAttribute("id",n),n="#"+n,t[i]=n,this._styles[i]=e,n},Hp.prototype.save=function(e){var t=this._styles,i=e.childNodes[0];for(var n in t)t.hasOwnProperty(n)&&e.insertBefore(t[n],i)},Gp.prototype.get=function(e){if(!Object(l.default)(e))return this.get(Object($r.default)());var t=this._ids;return Object(l.default)(t[e])?e.toString()+"-"+ ++t[e]:(t[e]=0,e)},Yp._createState=function(e){var t=e.entities,i=new Hp,n=t.computeAvailability(),a=Object(l.default)(e.time)?e.time:n.start,r=Object(s.default)(e.defaultAvailability,n),o=Object(s.default)(e.sampleDuration,60);r.start===Hn.a.MINIMUM_VALUE?r.stop===Hn.a.MAXIMUM_VALUE?r=new yr.default:ln.default.addSeconds(r.stop,-10*o,r.start):r.stop===Hn.a.MAXIMUM_VALUE&&ln.default.addSeconds(r.start,10*o,r.stop);var u=new kp(e.modelCallback);return{kmlDoc:document.implementation.createDocument("http://www.opengis.net/kml/2.2","kml"),ellipsoid:Object(s.default)(e.ellipsoid,d.default.WGS84),idManager:new Gp,styleCache:i,externalFileHandler:u,time:a,valueGetter:new Vp(a),sampleDuration:o,defaultAvailability:new br.default([r])}};var Wp=new oe.default,qp=new x.default,Xp=new ln.default;function Kp(e,t,i,n){var a=e.kmlDoc,r=e.ellipsoid,o=e.valueGetter,u=Object(s.default)(t.billboard,t.point);if(Object(l.default)(u)||Object(l.default)(t.path)){var d=t.position;if(d.isConstant){o.get(d,void 0,Wp);var c=sm(a,"coordinates",om(Wp,r)),f=a.createElement("Point"),h=a.createElement("altitudeMode");h.appendChild(rm(e,u.heightReference)),f.appendChild(h),f.appendChild(c),i.push(f);var p=u instanceof Fo.a?Qp(e,u):Zp(e,u);n.push(p)}else Jp(e,t,u,i,n)}}function Jp(e,t,i,n,a){var r,o=e.kmlDoc,u=e.ellipsoid,d=e.valueGetter,c=t.position,f=!0;c instanceof ss.a?(r=c.intervals,f=!1):r=Object(s.default)(t.availability,e.defaultAvailability);var h,p,m,_=i instanceof Jh.a,g=[];for(h=0;h1){var P=o.createElementNS(Fp,"MultiTrack");for(h=0;h0&&u.appendChild(sm(r,"extrude",!0));for(var c=s?function(e,t,i){var n,a=e.kmlDoc,r=e.valueGetter,o=r.get(t.height,0);i>0&&(o=i);for(var s=t.coordinates,l=r.get(s),u=[],d=[m.default.northeast,m.default.southeast,m.default.southwest,m.default.northwest],c=0;c<4;++c)d[c](l,qp),u.push(Re.default.toDegrees(qp.longitude)+","+Re.default.toDegrees(qp.latitude)+","+o);n=sm(a,"coordinates",u.join(" "));var f=a.createElement("outerBoundaryIs"),h=a.createElement("LinearRing");return h.appendChild(n),f.appendChild(h),[f]}(e,t,d):function(e,t,i){var n=e.kmlDoc,a=e.valueGetter,r=a.get(t.height,0),o=a.get(t.perPositionHeight,!1);!o&&i>0&&(r=i);var s=[],u=t.hierarchy,d=a.get(u),c=Array.isArray(d)?d:d.positions,f=n.createElement("outerBoundaryIs");f.appendChild(em(e,c,r,o)),s.push(f);var h=d.holes;if(Object(l.default)(h))for(var p=h.length,m=0;m=0;--n)t+=i[n]<16?"0"+i[n].toString(16):i[n].toString(16);return t}var um=Yp,dm=i(359),cm=i(371),fm=i(57),hm=i(36),pm=i(108),mm=i(284),_m=i(763),gm=i(764),vm=i(56),ym=i(224),bm=i(344),wm=i(44),Om=i(91),xm=i(287),Am=i(26),Tm=i(226),Em=i(32),Cm=i(39),Sm=i(268),Mm=i(228),Dm=i(58),Pm=i(936),Im=i(765),Lm=i(55),jm=i(938),Rm=i(67),Nm=i(34),Bm=i(937),Fm=i(45),km=i(766),zm=i(118),Um=i(62),Vm=i(83),Hm=i(767),Gm=i(104),Ym=i(351),Wm=i(561),qm=i(562),Xm=i(560),Km=i(824),Jm=i(563),Zm=i(210),Qm=i(142),$m=i(374),e_=i(150),t_=i(814),i_=i(90),n_=i(462),a_=i(429),r_=i(463),o_=i(248),s_=i(873),l_=i(146),u_=i(251),d_=i(735),c_=i(736),f_=i(220),h_=i(155),p_=i(154),m_=i(74),__=new oe.default(1,1,1);function g_(e){e=Object(s.default)(e,__),$.a.defined("dimensions",e),$.a.typeOf.number.greaterThanOrEquals("dimensions.x",e.x,0),$.a.typeOf.number.greaterThanOrEquals("dimensions.y",e.y,0),$.a.typeOf.number.greaterThanOrEquals("dimensions.z",e.z,0),this._dimensions=oe.default.clone(e)}Object.defineProperties(g_.prototype,{dimensions:{get:function(){return this._dimensions},set:function(e){$.a.defined("value",e),$.a.typeOf.number.greaterThanOrEquals("value.x",e.x,0),$.a.typeOf.number.greaterThanOrEquals("value.y",e.y,0),$.a.typeOf.number.greaterThanOrEquals("value.z",e.z,0),oe.default.clone(e,this._dimensions)}}});var v_=new oe.default;g_.prototype.emit=function(e){var t=this._dimensions,i=oe.default.multiplyByScalar(t,.5,v_),n=Re.default.randomBetween(-i.x,i.x),a=Re.default.randomBetween(-i.y,i.y),r=Re.default.randomBetween(-i.z,i.z);e.position=oe.default.fromElements(n,a,r,e.position),e.velocity=oe.default.normalize(e.position,e.velocity)};var y_=g_,b_=i(768),w_=i(484),O_=i(145),x_=i(817),A_=i(133),T_=i(770),E_=i(523),C_=i(237),S_=i(259);function M_(){this.featurePropertiesDirty=!1}Object.defineProperties(M_.prototype,{featuresLength:{get:function(){u.default.throwInstantiationError()}},pointsLength:{get:function(){u.default.throwInstantiationError()}},trianglesLength:{get:function(){u.default.throwInstantiationError()}},geometryByteLength:{get:function(){u.default.throwInstantiationError()}},texturesByteLength:{get:function(){u.default.throwInstantiationError()}},batchTableByteLength:{get:function(){u.default.throwInstantiationError()}},innerContents:{get:function(){u.default.throwInstantiationError()}},readyPromise:{get:function(){u.default.throwInstantiationError()}},tileset:{get:function(){u.default.throwInstantiationError()}},tile:{get:function(){u.default.throwInstantiationError()}},url:{get:function(){u.default.throwInstantiationError()}},batchTable:{get:function(){u.default.throwInstantiationError()}},groupMetadata:{get:function(){u.default.throwInstantiationError()},set:function(e){u.default.throwInstantiationError()}}}),M_.prototype.hasProperty=function(e,t){u.default.throwInstantiationError()},M_.prototype.getFeature=function(e){u.default.throwInstantiationError()},M_.prototype.applyDebugSettings=function(e,t){u.default.throwInstantiationError()},M_.prototype.applyStyle=function(e){u.default.throwInstantiationError()},M_.prototype.update=function(e,t){u.default.throwInstantiationError()},M_.prototype.isDestroyed=function(){u.default.throwInstantiationError()},M_.prototype.destroy=function(){u.default.throwInstantiationError()};var D_=M_,P_=i(461),I_=i(168),L_=i(231),j_=i(173),R_=i(266),N_=i(288),B_=i(954),F_=i(171),k_=i(293),z_=i(387),U_=i(183),V_=i(290);function H_(e,t){this._conditionsExpression=Object(Qr.default)(e,!0),this._conditions=e.conditions,this._runtimeConditions=void 0,function(e,t){var i=[],n=e._conditions;if(!Object(l.default)(n))return;for(var a=n.length,r=0;r= 0.0) {\n point.z = (slice / 2.0) - 0.5;\n if(length(point) > 0.5) {\n return false;\n }\n }\n\n normal = normalize(point);\n point -= czm_epsilon2 * normal;\n return true;\n}\n\n// Transforms the ray origin and direction into unit sphere space,\n// then transforms the result back into the ellipsoid's space.\nbool intersectEllipsoid(vec3 origin, vec3 dir, vec3 center, vec3 scale, float slice,\n out vec3 point, out vec3 normal) {\n if(scale.x <= 0.01 || scale.y < 0.01 || scale.z < 0.01) {\n return false;\n }\n\n vec3 o = (origin - center) / scale;\n vec3 d = dir / scale;\n vec3 p, n;\n bool intersected = intersectSphere(o, d, slice, p, n);\n if(intersected) {\n point = (p * scale) + center;\n normal = n;\n }\n return intersected;\n}\n\n// Assume that if phase shift is being called for octave i,\n// the frequency is of i - 1. This saves us from doing extra\n// division / multiplication operations.\nvec2 phaseShift2D(vec2 p, vec2 freq) {\n return (czm_pi / 2.0) * sin(freq.yx * p.yx);\n}\n\nvec2 phaseShift3D(vec3 p, vec2 freq) {\n return phaseShift2D(p.xy, freq) + czm_pi * vec2(sin(freq.x * p.z));\n}\n\n// The cloud texture function derived from Gardner's 1985 paper,\n// \"Visual Simulation of Clouds.\"\n// https://www.cs.drexel.edu/~david/Classes/Papers/p297-gardner.pdf\nconst float T0 = 0.6; // contrast of the texture pattern\nconst float k = 0.1; // computed to produce a maximum value of 1\nconst float C0 = 0.8; // coefficient\nconst float FX0 = 0.6; // frequency X\nconst float FY0 = 0.6; // frequency Y\nconst int octaves = 5;\n\nfloat T(vec3 point) {\n vec2 sum = vec2(0.0);\n float Ci = C0;\n vec2 FXY = vec2(FX0, FY0);\n vec2 PXY = vec2(0.0);\n for(int i = 1; i <= octaves; i++) {\n PXY = phaseShift3D(point, FXY);\n Ci *= 0.707;\n FXY *= 2.0;\n vec2 sinTerm = sin(FXY * point.xy + PXY);\n sum += Ci * sinTerm + vec2(T0);\n }\n return k * sum.x * sum.y;\n}\n\nconst float a = 0.5; // fraction of surface reflection due to ambient or scattered light,\nconst float t = 0.4; // fraction of texture shading\nconst float s = 0.25; // fraction of specular reflection\n\nfloat I(float Id, float Is, float It) {\n return (1.0 - a) * ((1.0 - t) * ((1.0 - s) * Id + s * Is) + t * It) + a;\n}\n\nconst vec3 lightDir = normalize(vec3(0.2, -1.0, 0.7));\n\nvec4 drawCloud(vec3 rayOrigin, vec3 rayDir, vec3 cloudCenter, vec3 cloudScale, float cloudSlice,\n float brightness) {\n vec3 cloudPoint, cloudNormal;\n if(!intersectEllipsoid(rayOrigin, rayDir, cloudCenter, cloudScale, cloudSlice,\n cloudPoint, cloudNormal)) {\n return vec4(0.0);\n }\n\n float Id = clamp(dot(cloudNormal, -lightDir), 0.0, 1.0); // diffuse reflection\n float Is = max(pow(dot(-lightDir, -rayDir), 2.0), 0.0); // specular reflection\n float It = T(cloudPoint); // texture function\n float intensity = I(Id, Is, It);\n vec3 color = vec3(intensity * clamp(brightness, 0.1, 1.0));\n\n vec4 noise = sampleNoiseTexture(u_noiseDetail * cloudPoint);\n float W = noise.x;\n float W2 = noise.y;\n float W3 = noise.z;\n\n // The dot product between the cloud's normal and the ray's direction is greatest\n // in the center of the ellipsoid's surface. It decreases towards the edge.\n // Thus, it is used to blur the areas leading to the edges of the ellipsoid,\n // so that no harsh lines appear.\n\n // The first (and biggest) layer of worley noise is then subtracted from this.\n // The final result is scaled up so that the base cloud is not too translucent.\n float ndDot = clamp(dot(cloudNormal, -rayDir), 0.0, 1.0);\n float TR = pow(ndDot, 3.0) - W; // translucency\n TR *= 1.3;\n\n // Subtracting the second and third layers of worley noise is more complicated.\n // If these layers of noise were simply subtracted from the current translucency,\n // the shape derived from the first layer of noise would be completely deleted.\n // The erosion of this noise should thus be constricted to the edges of the cloud.\n // However, because the edges of the ellipsoid were already blurred away, mapping\n // the noise to (1.0 - ndDot) will have no impact on most of the cloud's appearance.\n // The value of (0.5 - ndDot) provides the best compromise.\n float minusDot = 0.5 - ndDot;\n\n // Even with the previous calculation, subtracting the second layer of wnoise\n // erode too much of the cloud. The addition of it, however, will detailed\n // volume to the cloud. As long as the noise is only added and not subtracted,\n // the results are aesthetically pleasing.\n\n // The minusDot product is mapped in a way that it is larger at the edges of\n // the ellipsoid, so a subtraction and min operation are used instead of\n // an addition and max one.\n TR -= min(minusDot * W2, 0.0);\n\n // The third level of worley noise is subtracted from the result, with some\n // modifications. First, a scalar is added to minusDot so that the noise\n // starts affecting the shape farther away from the center of the ellipsoid's\n // surface. Then, it is scaled down so its impact is not too intense.\n TR -= 0.8 * (minusDot + 0.25) * W3;\n\n // The texture function's shading does not correlate with the shape of the cloud\n // produced by the layers of noise, so an extra shading scalar is calculated.\n // The darkest areas of the cloud are assigned to be where the noise erodes\n // the cloud the most. This is then interpolated based on the translucency\n // and the diffuse shading term of that point in the cloud.\n float shading = mix(1.0 - 0.8 * W * W, 1.0, Id * TR);\n\n // To avoid values that are too dark, this scalar is increased by a small amount\n // and clamped so it never goes to zero.\n shading = clamp(shading + 0.2, 0.3, 1.0);\n\n // Finally, the contrast of the cloud's color is increased.\n vec3 finalColor = mix(vec3(0.5), shading * color, 1.15);\n return vec4(finalColor, clamp(TR, 0.0, 1.0)) * v_color;\n}\n\nvoid main() {\n#ifdef DEBUG_BILLBOARDS\n gl_FragColor = vec4(0.0, 0.5, 0.5, 1.0);\n#endif\n // To avoid calculations with high values,\n // we raycast from an arbitrarily smaller space.\n vec2 coordinate = v_maximumSize.xy * v_offset;\n\n vec3 ellipsoidScale = 0.82 * v_maximumSize;\n vec3 ellipsoidCenter = vec3(0.0);\n\n float zOffset = max(ellipsoidScale.z - 10.0, 0.0);\n vec3 eye = vec3(0, 0, -10.0 - zOffset);\n vec3 rayDir = normalize(vec3(coordinate, 1.0) - eye);\n vec3 rayOrigin = eye;\n#ifdef DEBUG_ELLIPSOIDS\n vec3 point, normal;\n if(intersectEllipsoid(rayOrigin, rayDir, ellipsoidCenter, ellipsoidScale, v_slice,\n point, normal)) {\n gl_FragColor = v_brightness * v_color;\n }\n#else\n#ifndef DEBUG_BILLBOARDS\n vec4 cloud = drawCloud(rayOrigin, rayDir,\n ellipsoidCenter, ellipsoidScale, v_slice, v_brightness);\n if(cloud.w < 0.01) {\n discard;\n }\n gl_FragColor = cloud;\n#endif\n#endif\n}\n",pg="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScaleX;\nattribute vec4 positionLowAndScaleY;\nattribute vec4 packedAttribute0;\nattribute vec4 packedAttribute1;\nattribute vec4 color;\n\nvarying vec2 v_offset;\nvarying vec3 v_maximumSize;\nvarying vec4 v_color;\nvarying float v_slice;\nvarying float v_brightness;\n\nvoid main() {\n // Unpack attributes.\n vec3 positionHigh = positionHighAndScaleX.xyz;\n vec3 positionLow = positionLowAndScaleY.xyz;\n vec2 scale = vec2(positionHighAndScaleX.w, positionLowAndScaleY.w);\n\n float show = packedAttribute0.x;\n float brightness = packedAttribute0.y;\n vec2 coordinates = packedAttribute0.wz;\n vec3 maximumSize = packedAttribute1.xyz;\n float slice = packedAttribute1.w;\n\n#ifdef INSTANCED\n vec2 dir = direction;\n#else\n vec2 dir = coordinates;\n#endif\n\n vec2 offset = dir - vec2(0.5, 0.5);\n vec2 scaledOffset = scale * offset;\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n positionEC.xy += scaledOffset;\n \n positionEC.xyz *= show;\n gl_Position = czm_projection * positionEC;\n\n v_offset = offset;\n v_maximumSize = maximumSize;\n v_color = color;\n v_slice = slice;\n v_brightness = brightness;\n}\n",mg="uniform vec3 u_noiseTextureDimensions;\nuniform float u_noiseDetail;\nuniform vec3 u_noiseOffset;\nvarying vec2 v_position;\n\nfloat textureSliceWidth = u_noiseTextureDimensions.x;\nfloat inverseNoiseTextureRows = u_noiseTextureDimensions.z;\n\nfloat wrap(float value, float rangeLength) {\n if(value < 0.0) {\n float absValue = abs(value);\n float modValue = mod(absValue, rangeLength);\n return mod(rangeLength - modValue, rangeLength);\n }\n return mod(value, rangeLength);\n}\n\nvec3 wrapVec(vec3 value, float rangeLength) {\n return vec3(wrap(value.x, rangeLength),\n wrap(value.y, rangeLength),\n wrap(value.z, rangeLength));\n}\n\nvec3 random3(vec3 p) {\n float dot1 = dot(p, vec3(127.1, 311.7, 932.8));\n float dot2 = dot(p, vec3(269.5, 183.3, 421.4));\n return fract(vec3(sin(dot1 - dot2), cos(dot1 * dot2), dot1 * dot2));\n}\n\n// Frequency corresponds to cell size.\n// The higher the frequency, the smaller the cell size.\nvec3 getWorleyCellPoint(vec3 centerCell, vec3 offset, float freq) {\n vec3 cell = centerCell + offset;\n cell = wrapVec(cell, textureSliceWidth / u_noiseDetail);\n cell += floor(u_noiseOffset / u_noiseDetail);\n vec3 p = offset + random3(cell);\n return p;\n}\n\nfloat worleyNoise(vec3 p, float freq) {\n vec3 centerCell = floor(p * freq);\n vec3 pointInCell = fract(p * freq);\n float shortestDistance = 1000.0;\n\n for(float z = -1.0; z <= 1.0; z++) {\n for(float y = -1.0; y <= 1.0; y++) {\n for(float x = -1.0; x <= 1.0; x++) {\n vec3 offset = vec3(x, y, z);\n vec3 point = getWorleyCellPoint(centerCell, offset, freq);\n\n float distance = length(pointInCell - point);\n if(distance < shortestDistance) {\n shortestDistance = distance;\n }\n }\n }\n }\n\n return shortestDistance;\n}\n\nconst float MAX_FBM_ITERATIONS = 10.0;\n\nfloat worleyFBMNoise(vec3 p, float octaves, float scale) {\n float noise = 0.0;\n float freq = 1.0;\n float persistence = 0.625;\n for(float i = 0.0; i < MAX_FBM_ITERATIONS; i++) {\n if(i >= octaves) {\n break;\n }\n\n noise += worleyNoise(p * scale, freq * scale) * persistence;\n persistence *= 0.5;\n freq *= 2.0;\n }\n return noise;\n}\n\nvoid main() {\n float x = mod(v_position.x, textureSliceWidth);\n float y = mod(v_position.y, textureSliceWidth);\n float sliceRow = floor(v_position.y / textureSliceWidth);\n float z = floor(v_position.x / textureSliceWidth) + sliceRow * inverseNoiseTextureRows * textureSliceWidth;\n\n vec3 position = vec3(x, y, z);\n position /= u_noiseDetail;\n float worley0 = clamp(worleyFBMNoise(position, 3.0, 1.0), 0.0, 1.0);\n float worley1 = clamp(worleyFBMNoise(position, 3.0, 2.0), 0.0, 1.0);\n float worley2 = clamp(worleyFBMNoise(position, 3.0, 3.0), 0.0, 1.0);\n gl_FragColor = vec4(worley0, worley1, worley2, 1.0);\n}\n",_g="uniform vec3 u_noiseTextureDimensions;\nattribute vec2 position;\n\nvarying vec2 v_position;\n\nvoid main()\n{\n gl_Position = vec4(position, 0.1, 1.0);\n\n float textureSliceWidth = u_noiseTextureDimensions.x;\n float noiseTextureRows = u_noiseTextureDimensions.y;\n float inverseNoiseTextureRows = u_noiseTextureDimensions.z;\n vec2 transformedPos = (position * 0.5) + vec2(0.5);\n transformedPos *= textureSliceWidth;\n transformedPos.x *= textureSliceWidth * inverseNoiseTextureRows;\n transformedPos.y *= noiseTextureRows;\n v_position = transformedPos;\n}\n";function gg(e,t){if(e=Object(s.default)(e,s.default.EMPTY_OBJECT),this._show=Object(s.default)(e.show,!0),this._position=oe.default.clone(Object(s.default)(e.position,oe.default.ZERO)),!Object(l.default)(e.scale)&&Object(l.default)(e.maximumSize))this._maximumSize=oe.default.clone(e.maximumSize),this._scale=new r.default(this._maximumSize.x,this._maximumSize.y);else{this._scale=r.default.clone(Object(s.default)(e.scale,new r.default(20,12)));var i=new oe.default(this._scale.x,this._scale.y,Math.min(this._scale.x,this._scale.y)/1.5);this._maximumSize=oe.default.clone(Object(s.default)(e.maximumSize,i))}this._slice=Object(s.default)(e.slice,-1),this._color=Ot.default.clone(Object(s.default)(e.color,Ot.default.WHITE)),this._brightness=Object(s.default)(e.brightness,1),this._cloudCollection=t,this._index=-1}var vg=gg.SHOW_INDEX=0,yg=gg.POSITION_INDEX=1,bg=gg.SCALE_INDEX=2,wg=gg.MAXIMUM_SIZE_INDEX=3,Og=gg.SLICE_INDEX=4,xg=gg.BRIGHTNESS_INDEX=5,Ag=gg.COLOR_INDEX=6;function Tg(e,t){var i=e._cloudCollection;Object(l.default)(i)&&(i._updateCloud(e,t),e._dirty=!0)}gg.NUMBER_OF_PROPERTIES=7,Object.defineProperties(gg.prototype,{show:{get:function(){return this._show},set:function(e){$.a.typeOf.bool("value",e),this._show!==e&&(this._show=e,Tg(this,vg))}},position:{get:function(){return this._position},set:function(e){$.a.typeOf.object("value",e);var t=this._position;oe.default.equals(t,e)||(oe.default.clone(e,t),Tg(this,yg))}},scale:{get:function(){return this._scale},set:function(e){$.a.typeOf.object("value",e);var t=this._scale;r.default.equals(t,e)||(r.default.clone(e,t),Tg(this,bg))}},maximumSize:{get:function(){return this._maximumSize},set:function(e){$.a.typeOf.object("value",e);var t=this._maximumSize;oe.default.equals(t,e)||(oe.default.clone(e,t),Tg(this,wg))}},color:{get:function(){return this._color},set:function(e){$.a.typeOf.object("value",e);var t=this._color;Ot.default.equals(t,e)||(Ot.default.clone(e,t),Tg(this,Ag))}},slice:{get:function(){return this._slice},set:function(e){$.a.typeOf.number("value",e),this._slice!==e&&(this._slice=e,Tg(this,Og))}},brightness:{get:function(){return this._brightness},set:function(e){$.a.typeOf.number("value",e),this._brightness!==e&&(this._brightness=e,Tg(this,xg))}}}),gg.prototype._destroy=function(){this._cloudCollection=void 0};var Eg,Cg=gg,Sg=new oe.default,Mg={positionHighAndScaleX:0,positionLowAndScaleY:1,packedAttribute0:2,packedAttribute1:3,color:4},Dg={direction:0,positionHighAndScaleX:1,positionLowAndScaleY:2,packedAttribute0:3,packedAttribute1:4,color:5},Pg=Cg.SHOW_INDEX,Ig=Cg.POSITION_INDEX,Lg=Cg.SCALE_INDEX,jg=Cg.MAXIMUM_SIZE_INDEX,Rg=Cg.SLICE_INDEX,Ng=Cg.BRIGHTNESS_INDEX,Bg=Cg.NUMBER_OF_PROPERTIES,Fg=Cg.COLOR_INDEX;function kg(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this._clouds=[],this._cloudsToUpdate=[],this._cloudsToUpdateIndex=0,this._cloudsRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(Bg),this._noiseTexture=void 0,this._textureSliceWidth=128,this._noiseTextureRows=4,this.noiseDetail=Object(s.default)(e.noiseDetail,16),this.noiseOffset=oe.default.clone(Object(s.default)(e.noiseOffset,oe.default.ZERO)),this._loading=!1,this._ready=!1;var t=this;this._uniforms={u_noiseTexture:function(){return t._noiseTexture},u_noiseTextureDimensions:zg(t),u_noiseDetail:function(){return t.noiseDetail}},this._vaNoise=void 0,this._spNoise=void 0,this._spCreated=!1,this._sp=void 0,this._rs=void 0,this.show=Object(s.default)(e.show,!0),this._colorCommands=[],this.debugBillboards=Object(s.default)(e.debugBillboards,!1),this._compiledDebugBillboards=!1,this.debugEllipsoids=Object(s.default)(e.debugEllipsoids,!1),this._compiledDebugEllipsoids=!1}function zg(e){return function(){return Sg.x=e._textureSliceWidth,Sg.y=e._noiseTextureRows,Sg.z=1/e._noiseTextureRows,Sg}}function Ug(e){for(var t=e.length,i=0;i0){i._vaf=function(e,t,i){var n=[{index:Eg.positionHighAndScaleX,componentsPerAttribute:4,componentDatatype:At.default.FLOAT,usage:hm.default.STATIC_DRAW},{index:Eg.positionLowAndScaleY,componentsPerAttribute:4,componentDatatype:At.default.FLOAT,usage:hm.default.STATIC_DRAW},{index:Eg.packedAttribute0,componentsPerAttribute:4,componentDatatype:At.default.FLOAT,usage:hm.default.STATIC_DRAW},{index:Eg.packedAttribute1,componentsPerAttribute:4,componentDatatype:At.default.FLOAT,usage:hm.default.STATIC_DRAW},{index:Eg.color,componentsPerAttribute:4,componentDatatype:At.default.UNSIGNED_BYTE,normalize:!0,usage:hm.default.STATIC_DRAW}];i&&n.push({index:Eg.direction,componentsPerAttribute:2,componentDatatype:At.default.FLOAT,vertexBuffer:Xg(e)});var a=i?t:4*t;return new Ym.a(e,n,a,i)}(n,r,i._instanced);var o,s=i._vaf.writers;for(o=0;o0&&function(e,t){var i=t.context,n=e,a=n._clouds.length,r=n._cloudsToUpdate,o=n._cloudsToUpdateIndex,s=n._propertiesChanged,l=nv;l.length=0,(s[Ig]||s[Lg])&&l.push(Jg),(s[Pg]||s[Ng])&&l.push(Zg),(s[jg]||s[Rg])&&l.push(Qg),s[Fg]&&l.push($g);var u,d,c,f=l.length,h=n._vaf.writers;if(o/a>.1){for(u=0;u1.5*i&&(n.length=i),!Object(l.default)(this._vaf)||!Object(l.default)(this._vaf.va)||!this._ready&!t||(this._spCreated&&this.debugBillboards===this._compiledDebugBillboards&&this.debugEllipsoids===this._compiledDebugEllipsoids||function(e,t,i,n){var a=t.context,r=e,o=new Nm.default({defines:[],sources:[i]});r._instanced&&o.defines.push("INSTANCED");var s=new Nm.default({defines:[],sources:[n]});r.debugBillboards&&s.defines.push("DEBUG_BILLBOARDS"),r.debugEllipsoids&&s.defines.push("DEBUG_ELLIPSOIDS"),r._sp=Rm.default.replaceCache({context:a,shaderProgram:r._sp,vertexShaderSource:o,fragmentShaderSource:s,attributeLocations:Eg}),r._rs=Cm.default.fromCache({depthTest:{enabled:!0,func:Vr.a.LESS},depthMask:!1,blending:m_.default.ALPHA_BLEND}),r._spCreated=!0,r._compiledDebugBillboards=r.debugBillboards,r._compiledDebugEllipsoids=r.debugEllipsoids}(this,e,pg,hg),function(e,t){var i=e,n=t.passes,a=i._uniforms,r=t.commandList;if(n.render){var o=i._colorCommands,s=i._vaf.va,u=s.length;o.length=u;for(var d=0;d0)return;var i=Object(ho.a)();if(e._needsQuietPeriod)e._needsQuietPeriod=!1,e._frameTimes.length=0,e._quietPeriodEndTime=i+e.quietPeriod/vr.a.SECONDS_PER_MILLISECOND,e._warmupPeriodEndTime=e._quietPeriodEndTime+(e.warmupPeriod+e.samplingWindow)/vr.a.SECONDS_PER_MILLISECOND;else if(i>=e._quietPeriodEndTime){e._frameTimes.push(i);var n=i-e.samplingWindow/vr.a.SECONDS_PER_MILLISECOND;if(e._frameTimes.length>=2&&e._frameTimes[0]<=n){for(;e._frameTimes.length>=2&&e._frameTimes[1]e._warmupPeriodEndTime?e.minimumFrameRateAfterWarmup:e.minimumFrameRateDuringWarmup);a>r?e._frameRateIsLow||(e._frameRateIsLow=!0,e._needsQuietPeriod=!0,e.lowFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond)):e._frameRateIsLow&&(e._frameRateIsLow=!1,e._needsQuietPeriod=!0,e.nominalFrameRate.raiseEvent(e.scene,e._lastFramesPerSecond))}}}(t)})),this._hiddenPropertyName=void 0!==document.hidden?"hidden":void 0!==document.mozHidden?"mozHidden":void 0!==document.msHidden?"msHidden":void 0!==document.webkitHidden?"webkitHidden":void 0;var i=void 0!==document.hidden?"visibilitychange":void 0!==document.mozHidden?"mozvisibilitychange":void 0!==document.msHidden?"msvisibilitychange":void 0!==document.webkitHidden?"webkitvisibilitychange":void 0;function n(){var e;e=t,document[e._hiddenPropertyName]?e.pause():e.unpause()}this._visibilityChangeRemoveListener=void 0,Object(l.default)(i)&&(document.addEventListener(i,n,!1),this._visibilityChangeRemoveListener=function(){document.removeEventListener(i,n,!1)})}Pv.defaultSettings={samplingWindow:5,quietPeriod:2,warmupPeriod:5,minimumFrameRateDuringWarmup:4,minimumFrameRateAfterWarmup:8},Pv.fromScene=function(e){if(!Object(l.default)(e))throw new u.default("scene is required.");return Object(l.default)(e._frameRateMonitor)&&!e._frameRateMonitor.isDestroyed()||(e._frameRateMonitor=new Pv({scene:e})),e._frameRateMonitor},Object.defineProperties(Pv.prototype,{scene:{get:function(){return this._scene}},lowFrameRate:{get:function(){return this._lowFrameRate}},nominalFrameRate:{get:function(){return this._nominalFrameRate}},lastFramesPerSecond:{get:function(){return this._lastFramesPerSecond}}}),Pv.prototype.pause=function(){++this._pauseCount,1===this._pauseCount&&(this._frameTimes.length=0,this._lastFramesPerSecond=void 0)},Pv.prototype.unpause=function(){--this._pauseCount,this._pauseCount<=0&&(this._pauseCount=0,this._needsQuietPeriod=!0)},Pv.prototype.isDestroyed=function(){return!1},Pv.prototype.destroy=function(){return this._preUpdateRemoveListener(),Object(l.default)(this._visibilityChangeRemoveListener)&&this._visibilityChangeRemoveListener(),Object(Lr.default)(this)};var Iv=Pv,Lv=i(778),jv=i(786),Rv=i(876),Nv=i(479),Bv=i(742),Fv=i(787),kv=i(745),zv=i(292),Uv=i(746),Vv=i(750),Hv=i(788),Gv=i(779),Yv=i(525),Wv=i(528),qv=i(529),Xv=i(902),Kv=i(530),Jv=i(531),Zv=i(532),Qv=i(467),$v=i(255),ey=i(533),ty=i(534);function iy(){this._image=new Image}function ny(e){if(e=Object(s.default)(e,s.default.EMPTY_OBJECT),!Object(l.default)(e.url)&&!Object(l.default)(e.metadata))throw new u.default("options.url or options.metadata is required.");var t;if(this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,Object(l.default)(e.metadata))t=e.metadata;else{var i=y.default.createIfNeeded(e.url);t=new Gi(i)}this._metadata=t,this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=new f.a({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new m.default(-Re.default.PI,-Re.default.PI,Re.default.PI,Re.default.PI),ellipsoid:e.ellipsoid});var n=e.credit;"string"==typeof n&&(n=new o.a(n)),this._credit=n,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=23,Object(l.default)(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new iy),this._errorEvent=new c.default,this._ready=!1;var r,d=this;this._readyPromise=t.readyPromise.then((function(e){if(!t.imageryPresent){var i=new b.a("The server "+t.url+" doesn't have imagery");return r=V.a.handleError(r,d,d._errorEvent,i.message,void 0,void 0,void 0,i),a.a.reject(i)}return V.a.handleSuccess(r),d._ready=e,e})).otherwise((function(e){return r=V.a.handleError(r,d,d._errorEvent,e.message,void 0,void 0,void 0,e),a.a.reject(e)}))}iy.prototype.isReady=function(){return!0},iy.prototype.shouldDiscardImage=function(e){return e===this._image},Object.defineProperties(ny.prototype,{url:{get:function(){return this._metadata.url}},proxy:{get:function(){return this._metadata.proxy}},tileWidth:{get:function(){if(!this._ready)throw new u.default("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new u.default("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new u.default("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new u.default("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new u.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new u.default("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new u.default("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}}),ny.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new u.default("getTileCredits must not be called before the imagery provider is ready.");var n=this._metadata,a=n.getTileInformation(e,t,i);if(Object(l.default)(a)){var r=n.providers[a.imageryProvider];if(Object(l.default)(r))return[r]}},ny.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new u.default("requestImage must not be called before the imagery provider is ready.");var a=this._tileDiscardPolicy._image,r=this._metadata,o=Gi.tileXYToQuadKey(e,t,i),s=r.getTileInformation(e,t,i);if(!Object(l.default)(s)){if(r.isValid(o)){var d=new _.default({throttle:n.throttle,throttleByServer:n.throttleByServer,type:n.type,priorityFunction:n.priorityFunction});return void r.populateSubtree(e,t,i,d)}return a}if(!s.hasImagery())return a;var c=function(e,t,i,n,a,r){var o=Gi.tileXYToQuadKey(i,n,a),s=t.imageryVersion;return s=Object(l.default)(s)&&s>0?s:1,e._metadata.resource.getDerivedResource({url:"flatfile?f1-0"+o+"-i."+s.toString(),request:r})}(this,s,e,t,i,n).fetchArrayBuffer();return Object(l.default)(c)?c.then((function(e){io(r.key,e);var t,i=new Uint8Array(e),n=r.protoImagery;if(Object(l.default)(n)&&n||(t=function(e){if(e[6]==="JFIF".charCodeAt(0)&&e[7]==="JFIF".charCodeAt(1)&&e[8]==="JFIF".charCodeAt(2)&&e[9]==="JFIF".charCodeAt(3))return"image/jpeg";if(e[1]==="PNG".charCodeAt(0)&&e[2]==="PNG".charCodeAt(1)&&e[3]==="PNG".charCodeAt(2))return"image/png";return}(i)),!Object(l.default)(t)&&(!Object(l.default)(n)||n)){var o=function(e){var t=Pi.a.Reader.create(e),i=t.len,n={};for(;t.pos>>3){case 1:n.imageType=t.uint32();break;case 2:n.imageData=t.bytes();break;case 3:n.alphaType=t.uint32();break;case 4:n.imageAlpha=t.bytes();break;case 5:var r=n.copyrightIds;if(Object(l.default)(r)||(r=n.copyrightIds=[]),2==(7&a))for(var o=t.uint32()+t.pos;t.posMapbox © OpenStreetMap Improve this map');function Yy(e){var t=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).styleId;if(!Object(l.default)(t))throw new u.default("options.styleId is required.");var i=e.accessToken;if(!Object(l.default)(i))throw new u.default("options.accessToken is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var n=y.default.createIfNeeded(Object(s.default)(e.url,"https://api.mapbox.com/styles/v1/"));this._styleId=t,this._accessToken=i;var a=Object(s.default)(e.tilesize,512);this._tilesize=a;var r=Object(s.default)(e.username,"mapbox");this._username=r;var d,c=Object(l.default)(e.scaleFactor)?"@2x":"",f=n.getUrlComponent();Hy.test(f)||(f+="/"),f+=this._username+"/"+t+"/tiles/"+this._tilesize+"/{z}/{x}/{y}"+c,n.url=f,n.setQueryParameters({access_token:i}),Object(l.default)(e.credit)?"string"==typeof(d=e.credit)&&(d=new o.a(d)):d=Gy,this._resource=n,this._imageryProvider=new Vy.a({url:n,credit:d,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(Yy.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),Yy.prototype.getTileCredits=function(e,t,i){},Yy.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},Yy.prototype.pickFeatures=function(e,t,i,n,a){return this._imageryProvider.pickFeatures(e,t,i,n,a)},Yy._defaultCredit=Gy;var Wy=Yy,qy=i(69),Xy=i(117),Ky=i(365),Jy=i(882),Zy=i(93),Qy=i(139),$y=i(883),eb=i(884),tb=i(408),ib=i(535),nb=i(886),ab=i(311),rb=i(879),ob=i(94),sb=i(250),lb=i(867),ub=i(415),db=i(866),cb=i(209),fb=i(343),hb=i(162),pb=i(890),mb=i(889),_b=i(458),gb=i(868),vb=i(869),yb=i(870),bb=i(522),wb=i(73),Ob=i(756),xb=i(948);function Ab(e){}Ab.prototype.isReady=function(){return!0},Ab.prototype.shouldDiscardImage=function(e){return!1};var Tb=Ab,Eb=i(789),Cb=i(319),Sb=new o.a("MapQuest, Open Street Map and contributors, CC-BY-SA");function Mb(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT);var t=y.default.createIfNeeded(Object(s.default)(e.url,"https://a.tile.openstreetmap.org/"));t.appendForwardSlash(),t.url+="{z}/{x}/{y}."+Object(s.default)(e.fileExtension,"png");var i=new H.a({ellipsoid:e.ellipsoid}),n=Object(s.default)(e.minimumLevel,0),a=e.maximumLevel,r=Object(s.default)(e.rectangle,i.rectangle),l=i.positionToTileXY(m.default.southwest(r),n),d=i.positionToTileXY(m.default.northeast(r),n),c=(Math.abs(d.x-l.x)+1)*(Math.abs(d.y-l.y)+1);if(c>4)throw new u.default("The rectangle and minimumLevel indicate that there are "+c+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");var f=Object(s.default)(e.credit,Sb);"string"==typeof f&&(f=new o.a(f)),Vy.a.call(this,{url:t,credit:f,tilingScheme:i,tileWidth:256,tileHeight:256,minimumLevel:n,maximumLevel:a,rectangle:r})}Object(l.default)(Object.create)&&(Mb.prototype=Object.create(Vy.a.prototype),Mb.prototype.constructor=Mb);var Db=Mb,Pb=i(831),Ib=new r.default(1,1);function Lb(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this.mass=Object(s.default)(e.mass,1),this.position=oe.default.clone(Object(s.default)(e.position,oe.default.ZERO)),this.velocity=oe.default.clone(Object(s.default)(e.velocity,oe.default.ZERO)),this.life=Object(s.default)(e.life,Number.MAX_VALUE),this.image=e.image,this.startColor=Ot.default.clone(Object(s.default)(e.startColor,Ot.default.WHITE)),this.endColor=Ot.default.clone(Object(s.default)(e.endColor,Ot.default.WHITE)),this.startScale=Object(s.default)(e.startScale,1),this.endScale=Object(s.default)(e.endScale,1),this.imageSize=r.default.clone(Object(s.default)(e.imageSize,Ib)),this._age=0,this._normalizedAge=0,this._billboard=void 0}Object.defineProperties(Lb.prototype,{age:{get:function(){return this._age}},normalizedAge:{get:function(){return this._normalizedAge}}});var jb=new oe.default;Lb.prototype.update=function(e,t){return oe.default.multiplyByScalar(this.velocity,e,jb),oe.default.add(this.position,jb,this.position),Object(l.default)(t)&&t(this,e),this._age+=e,this.life===Number.MAX_VALUE?this._normalizedAge=0:this._normalizedAge=this._age/this.life,this._age<=this.life};var Rb=Lb;function Nb(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this.time=Object(s.default)(e.time,0),this.minimum=Object(s.default)(e.minimum,0),this.maximum=Object(s.default)(e.maximum,50),this._complete=!1}Object.defineProperties(Nb.prototype,{complete:{get:function(){return this._complete}}});var Bb=Nb;function Fb(e){throw new u.default("This type should not be instantiated directly. Instead, use BoxEmitter, CircleEmitter, ConeEmitter or SphereEmitter.")}Fb.prototype.emit=function(e){u.default.throwInstantiationError()};var kb=Fb,zb=new r.default(1,1);function Ub(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this.show=Object(s.default)(e.show,!0),this.updateCallback=e.updateCallback,this.loop=Object(s.default)(e.loop,!0),this.image=Object(s.default)(e.image,void 0);var t=e.emitter;Object(l.default)(t)||(t=new rg(.5)),this._emitter=t,this._bursts=e.bursts,this._modelMatrix=ce.default.clone(Object(s.default)(e.modelMatrix,ce.default.IDENTITY)),this._emitterModelMatrix=ce.default.clone(Object(s.default)(e.emitterModelMatrix,ce.default.IDENTITY)),this._matrixDirty=!0,this._combinedMatrix=new ce.default,this._startColor=Ot.default.clone(Object(s.default)(e.color,Object(s.default)(e.startColor,Ot.default.WHITE))),this._endColor=Ot.default.clone(Object(s.default)(e.color,Object(s.default)(e.endColor,Ot.default.WHITE))),this._startScale=Object(s.default)(e.scale,Object(s.default)(e.startScale,1)),this._endScale=Object(s.default)(e.scale,Object(s.default)(e.endScale,1)),this._emissionRate=Object(s.default)(e.emissionRate,5),this._minimumSpeed=Object(s.default)(e.speed,Object(s.default)(e.minimumSpeed,1)),this._maximumSpeed=Object(s.default)(e.speed,Object(s.default)(e.maximumSpeed,1)),this._minimumParticleLife=Object(s.default)(e.particleLife,Object(s.default)(e.minimumParticleLife,5)),this._maximumParticleLife=Object(s.default)(e.particleLife,Object(s.default)(e.maximumParticleLife,5)),this._minimumMass=Object(s.default)(e.mass,Object(s.default)(e.minimumMass,1)),this._maximumMass=Object(s.default)(e.mass,Object(s.default)(e.maximumMass,1)),this._minimumImageSize=r.default.clone(Object(s.default)(e.imageSize,Object(s.default)(e.minimumImageSize,zb))),this._maximumImageSize=r.default.clone(Object(s.default)(e.imageSize,Object(s.default)(e.maximumImageSize,zb))),this._sizeInMeters=Object(s.default)(e.sizeInMeters,!1),this._lifetime=Object(s.default)(e.lifetime,Number.MAX_VALUE),this._billboardCollection=void 0,this._particles=[],this._particlePool=[],this._previousTime=void 0,this._currentTime=0,this._carryOver=0,this._complete=new c.default,this._isComplete=!1,this._updateParticlePool=!0,this._particleEstimate=0}function Vb(e){var t=e._particlePool.pop();return Object(l.default)(t)||(t=new Rb),t}function Hb(e,t){e._particlePool.push(t)}function Gb(e){Object(l.default)(e._billboard)&&(e._billboard.show=!1)}function Yb(e,t){var i=t._billboard;Object(l.default)(i)||(i=t._billboard=e._billboardCollection.add({image:t.image})),i.width=t.imageSize.x,i.height=t.imageSize.y,i.position=t.position,i.sizeInMeters=e.sizeInMeters,i.show=!0;var n=Re.default.lerp(t.startColor.red,t.endColor.red,t.normalizedAge),a=Re.default.lerp(t.startColor.green,t.endColor.green,t.normalizedAge),r=Re.default.lerp(t.startColor.blue,t.endColor.blue,t.normalizedAge),o=Re.default.lerp(t.startColor.alpha,t.endColor.alpha,t.normalizedAge);i.color=new Ot.default(n,a,r,o),i.scale=Re.default.lerp(t.startScale,t.endScale,t.normalizedAge)}function Wb(e,t){t.startColor=Ot.default.clone(e._startColor,t.startColor),t.endColor=Ot.default.clone(e._endColor,t.endColor),t.startScale=e._startScale,t.endScale=e._endScale,t.image=e.image,t.life=Re.default.randomBetween(e._minimumParticleLife,e._maximumParticleLife),t.mass=Re.default.randomBetween(e._minimumMass,e._maximumMass),t.imageSize.x=Re.default.randomBetween(e._minimumImageSize.x,e._maximumImageSize.x),t.imageSize.y=Re.default.randomBetween(e._minimumImageSize.y,e._maximumImageSize.y),t._normalizedAge=0,t._age=0;var i=Re.default.randomBetween(e._minimumSpeed,e._maximumSpeed);oe.default.multiplyByScalar(t.velocity,i,t.velocity),e._particles.push(t)}Object.defineProperties(Ub.prototype,{emitter:{get:function(){return this._emitter},set:function(e){$.a.defined("value",e),this._emitter=e}},bursts:{get:function(){return this._bursts},set:function(e){this._bursts=e,this._updateParticlePool=!0}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){$.a.defined("value",e),this._matrixDirty=this._matrixDirty||!ce.default.equals(this._modelMatrix,e),ce.default.clone(e,this._modelMatrix)}},emitterModelMatrix:{get:function(){return this._emitterModelMatrix},set:function(e){$.a.defined("value",e),this._matrixDirty=this._matrixDirty||!ce.default.equals(this._emitterModelMatrix,e),ce.default.clone(e,this._emitterModelMatrix)}},startColor:{get:function(){return this._startColor},set:function(e){$.a.defined("value",e),Ot.default.clone(e,this._startColor)}},endColor:{get:function(){return this._endColor},set:function(e){$.a.defined("value",e),Ot.default.clone(e,this._endColor)}},startScale:{get:function(){return this._startScale},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._startScale=e}},endScale:{get:function(){return this._endScale},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._endScale=e}},emissionRate:{get:function(){return this._emissionRate},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._emissionRate=e,this._updateParticlePool=!0}},minimumSpeed:{get:function(){return this._minimumSpeed},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumSpeed=e}},maximumSpeed:{get:function(){return this._maximumSpeed},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumSpeed=e}},minimumParticleLife:{get:function(){return this._minimumParticleLife},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumParticleLife=e}},maximumParticleLife:{get:function(){return this._maximumParticleLife},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumParticleLife=e,this._updateParticlePool=!0}},minimumMass:{get:function(){return this._minimumMass},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._minimumMass=e}},maximumMass:{get:function(){return this._maximumMass},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._maximumMass=e}},minimumImageSize:{get:function(){return this._minimumImageSize},set:function(e){$.a.typeOf.object("value",e),$.a.typeOf.number.greaterThanOrEquals("value.x",e.x,0),$.a.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._minimumImageSize=e}},maximumImageSize:{get:function(){return this._maximumImageSize},set:function(e){$.a.typeOf.object("value",e),$.a.typeOf.number.greaterThanOrEquals("value.x",e.x,0),$.a.typeOf.number.greaterThanOrEquals("value.y",e.y,0),this._maximumImageSize=e}},sizeInMeters:{get:function(){return this._sizeInMeters},set:function(e){$.a.typeOf.bool("value",e),this._sizeInMeters=e}},lifetime:{get:function(){return this._lifetime},set:function(e){$.a.typeOf.number.greaterThanOrEquals("value",e,0),this._lifetime=e}},complete:{get:function(){return this._complete}},isComplete:{get:function(){return this._isComplete}}});var qb=new oe.default;Ub.prototype.update=function(e){if(this.show){Object(l.default)(this._billboardCollection)||(this._billboardCollection=new u_.default),this._updateParticlePool&&(!function(e){var t=e._emissionRate,i=e._maximumParticleLife,n=0,a=e._bursts;if(Object(l.default)(a))for(var r=a.length,o=0;o1&&(n++,e._carryOver-=1),Object(l.default)(e.bursts))for(var a=e.bursts.length,r=0;ro.time&&(n+=Re.default.randomBetween(o.minimum,o.maximum),o._complete=!0)}return n}(this,t);if(u>0&&Object(l.default)(r)){this._matrixDirty&&(this._combinedMatrix=ce.default.multiply(this.modelMatrix,this.emitterModelMatrix,this._combinedMatrix),this._matrixDirty=!1);var d=this._combinedMatrix;for(i=0;ithis._lifetime)if(this.loop){if(this._currentTime=Re.default.mod(this._currentTime,this._lifetime),this.bursts){var c=this.bursts.length;for(i=0;i0?e.frameFailed.raiseEvent({uri:t,message:n}):(console.log("A frame failed to load: "+t),console.log("Error: "+n))}}(e,u))}return r}function LO(e,t,i,n){t.touchedFrameNumber=0?a>=r:a<=r}(this,p,h))&&(h=function(e,t){var i=e._intervals,n=e._clock,a=DO(e);if(0!==a){var r=e._getAverageLoadTime(),o=ln.default.addSeconds(n.currentTime,r*a,MO),s=i.indexOf(o);return s===PO(e,t)&&(a>=0?++s:--s),i.get(s)}}(this,p));var v=function(e,t){var i=PO(e,t),n=e._frames[i];if(Object(l.default)(n)&&n.ready)return n}(this,f=function(e,t,i,n,a){var r,o,s=e._intervals,l=e._frames,u=PO(e,i),d=PO(e,t);if(u>=d){for(r=u;r>=d;--r)if(kO(e,o=s.get(r),l[r],n,a))return o}else for(r=u;r<=d;++r)if(kO(e,o=s.get(r),l[r],n,a))return o;return t}(this,f,p,zO,e));Object(l.default)(v)||(BO(this,f,zO,e),v=this._lastRenderedFrame),Object(l.default)(v)&&NO(this,v,zO,e),Object(l.default)(h)&&BO(this,h,zO,e);var y=this;Object(l.default)(v)&&!Object(l.default)(this._lastRenderedFrame)&&e.afterRender.push((function(){y._readyPromise.resolve(y)})),Object(l.default)(v)&&v!==this._lastRenderedFrame&&y.frameChanged.numberOfListeners>0&&e.afterRender.push((function(){y.frameChanged.raiseEvent(y)})),this._previousInterval=f,this._nextInterval=h,this._lastRenderedFrame=v,this._totalMemoryUsageInBytes>1024*this.maximumMemoryUsage*1024&&FO(this,function(e){return function(t){return t.touchedFrameNumber0&&u.update(e,c,s,this.boundingSphere)}}},EO.prototype.isDestroyed=function(){return!1},EO.prototype.destroy=function(){return FO(this),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),Object(Lr.default)(this)};var UO=EO,VO=i(385),HO=i(793),GO=i(451),YO=i(270),WO=i(898),qO=i(894),XO=i(386),KO=i(895),JO=i(896),ZO=i(466),QO=i(364),$O=i(178),ex=i(448),tx="\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n czm_materialInput materialInput;\n \n materialInput.s = v_textureCoordinates.s;\n materialInput.st = v_textureCoordinates;\n materialInput.str = vec3(v_textureCoordinates, 0.0);\n materialInput.normalEC = vec3(0.0, 0.0, -1.0);\n \n czm_material material = czm_getMaterial(materialInput);\n\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n}\n";function ix(e,t){this.show=!0,Object(l.default)(e)||(e=new ie.a),this.rectangle=ie.a.clone(e),Object(l.default)(t)||(t=qy.default.fromType(qy.default.ColorType,{color:new Ot.default(1,1,1,1)})),this.material=t,this._material=void 0,this._overlayCommand=void 0,this._rs=void 0}ix.prototype.update=function(e){if(this.show){if(!Object(l.default)(this.material))throw new u.default("this.material must be defined.");if(!Object(l.default)(this.rectangle))throw new u.default("this.rectangle must be defined.");var t=this._rs;if(Object(l.default)(t)&&ie.a.equals(t.viewport,this.rectangle)||(this._rs=Cm.default.fromCache({blending:m_.default.ALPHA_BLEND,viewport:this.rectangle})),e.passes.render){var i=e.context;if(this._material!==this.material||!Object(l.default)(this._overlayCommand)){this._material=this.material,Object(l.default)(this._overlayCommand)&&this._overlayCommand.shaderProgram.destroy();var n=new Nm.default({sources:[this._material.shaderSource,tx]});this._overlayCommand=i.createViewportQuadCommand(n,{renderState:this._rs,uniformMap:this._material._uniforms,owner:this}),this._overlayCommand.pass=Am.default.OVERLAY}this._material.update(i),this._overlayCommand.renderState=this._rs,this._overlayCommand.uniformMap=this._material._uniforms,e.commandList.push(this._overlayCommand)}}},ix.prototype.isDestroyed=function(){return!1},ix.prototype.destroy=function(){return Object(l.default)(this._overlayCommand)&&(this._overlayCommand.shaderProgram=this._overlayCommand.shaderProgram&&this._overlayCommand.shaderProgram.destroy()),Object(Lr.default)(this)};var nx=ix,ax=i(740),rx=i(741);function ox(e,t){var i,n=t.terrainProvider,r=t.mapProjection,o=r.ellipsoid,s=t.camera.getRectangleCameraCoordinates(e);return i=t.mode===Ss.default.SCENE3D?o.cartesianToCartographic(s):r.unproject(s),Object(l.default)(n)?n.readyPromise.then((function(){var a=n.availability;if(!Object(l.default)(a)||t.mode===Ss.default.SCENE2D)return i;var r=[m.default.center(e),m.default.southeast(e),m.default.southwest(e),m.default.northeast(e),m.default.northwest(e)];return ox._sampleTerrainMostDetailed(n,r).then((function(e){var t=e.reduce((function(e,t){return Math.max(t.height,e)}),-Number.MAX_VALUE),n=i;return n.height+=t,n}))})):a.a.resolve(i)}ox._sampleTerrainMostDetailed=Lo;var sx=ox,lx=i(465),ux=new Ot.default,dx=new Ot.default,cx=new Ot.default,fx=new Ot.default,hx=new se.a,px=new Uint8Array(4);function mx(e,t,i,n){var a=t.height===i.height?0:(e-t.height)/(i.height-t.height);return Ot.default.lerp(t.color,i.color,a,n)}function _x(e,t){return{height:e,color:Ot.default.clone(t)}}function gx(e){return e=(e=(e=e.filter((function(e,t,i){var n=t>0,a=t0,a=t0,a=!!n&&Ot.default.equals(e.color,i[t-1].color),r=!n||e.height===i[t-1].height;return!a||!r}))}function vx(e){var t,i=function(e){var t,i,n=[],a=e.length;for(t=0;t 0.");var c=[];for(i=0;i=v.height}_?c=c.reverse():m||Object(bo.a)(c,(function(e,t){return Re.default.sign(e.height-t.height)}));var y=Object(s.default)(r.extendDownwards,!1),b=Object(s.default)(r.extendUpwards,!1);1!==c.length||y||b||(y=!0,b=!0),y&&c.splice(0,0,_x(yx._minimumHeight,c[0].color)),b&&c.splice(c.length,0,_x(yx._maximumHeight,c[c.length-1].color)),c=gx(c),n.push(c)}return n}(e),n=[],a=[];function r(e,t){n.push(_x(e,t))}function o(e,t,i){var n=Ot.default.multiplyByScalar(i,1-t.alpha,fx);r(e,n=Ot.default.add(n,t,n))}var d=i.length;for(t=0;t0?c[f-1]:void 0,v=f0?a[h-1]:void 0,w=h0)return new gw.default({asynchronous:!1,geometryInstances:t,appearance:new Kb.default({flat:!0,translucent:!1})})},xx=i(372),Ax=i(470),Tx=i(289),Ex=i(457),Cx=i(356),Sx=i(160),Mx=i(945),Dx=i(887),Px=i(903),Ix=i(905),Lx=i(471),jx=i(459),Rx=i(460),Nx=i(515),Bx=i(719),Fx=i(720),kx=i(769),zx=i(794),Ux=i(790),Vx=i(774),Hx=i(775),Gx=i(511),Yx=i(512),Wx=i(813),qx=i(743),Xx=i(744),Kx=i(507),Jx=i(781),Zx=i(782),Qx=i(783),$x=i(413),eA=i(723),tA=i(264),iA=i(433),nA=i(725),aA=i(726),rA=i(727),oA=i(728),sA=i(732),lA=i(747),uA=i(748),dA=i(504),cA=i(730),fA=i(398),hA=i(414),pA=i(516),mA=i(517),_A=i(825),gA=i(826),vA=i(828),yA=i(829),bA=i(830),wA=i(900),OA=i(899),xA=i(897),AA=i(524),TA=i(446),EA=i(132),CA=i(721),SA=i(733),MA=i(689),DA=i(722),PA=i(483),IA=i(724),LA=i(486);function jA(e,t){if(!e)throw new Error("When calling ko.track, you must pass an object as the first parameter.");var i=this,n=RA(e,!0);return(t=t||Object.getOwnPropertyNames(e)).forEach((function(t){if("__knockoutObservables"!==t&&"__knockoutSubscribable"!==t&&!(t in n)){var a=e[t],r=a instanceof Array,o=i.isObservable(a)?a:r?i.observableArray(a):i.observable(a);Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:o,set:i.isWriteableObservable(o)?o:void 0}),n[t]=o,r&&function(e,t){var i=null;e.computed((function(){i&&(i.dispose(),i=null);var n=t();n instanceof Array&&(i=function(e,t,i){return function(e,t){var i=t.__knockoutSubscribable;if(!i){i=new e.subscribable,Object.defineProperty(t,"__knockoutSubscribable",{value:i});var n={};!function(e,t,i){["pop","push","reverse","shift","sort","splice","unshift"].forEach((function(n){var a=e[n];e[n]=function(){var e=a.apply(this,arguments);return!0!==i.pause&&t.notifySubscribers(this),e}}))}(t,i,n),function(e,t,i,n){["remove","removeAll","destroy","destroyAll","replace"].forEach((function(a){Object.defineProperty(t,a,{enumerable:!1,value:function(){var r;n.pause=!0;try{r=e.observableArray.fn[a].apply(e.observableArray(t),arguments)}finally{n.pause=!1}return i.notifySubscribers(t),r}})}))}(e,t,i,n)}return i}(e,i).subscribe(t)}(e,t,n))}))}(i,o)}})),e}function RA(e,t){var i=e.__knockoutObservables;return!i&&t&&(i={},Object.defineProperty(e,"__knockoutObservables",{value:i})),i}function NA(e,t,i){var n={owner:e,deferEvaluation:!0};if("function"==typeof i)n.read=i;else{if("value"in i)throw new Error('For ko.defineProperty, you must not specify a "value" for the property. You must provide a "get" function.');if("function"!=typeof i.get)throw new Error('For ko.defineProperty, the third parameter must be either an evaluator function, or an options object containing a function called "get".');n.read=i.get,n.write=i.set}return e[t]=this.computed(n),jA.call(this,e,[t]),e}function BA(e,t){if(!e)return null;var i=RA(e,!1);return i&&i[t]||null}function FA(e,t){var i=BA(e,t);i&&i.valueHasMutated()}var kA={attachToKo:function(e){e.track=jA,e.getObservable=BA,e.valueHasMutated=FA,e.defineProperty=NA}},zA={register:function(e){e.bindingHandlers.cesiumSvgPath={init:function(t,i){var n=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");n.setAttribute("class","cesium-svgPath-svg");var a=document.createElementNS("http://www.w3.org/2000/svg","path");return n.appendChild(a),e.virtualElements.setDomNodeChildren(t,[n]),e.computed({read:function(){var t=e.unwrap(i());a.setAttribute("d",e.unwrap(t.path));var r=e.unwrap(t.width),o=e.unwrap(t.height);n.setAttribute("width",r),n.setAttribute("height",o),n.setAttribute("viewBox","0 0 "+r+" "+o),t.css&&n.setAttribute("class","cesium-svgPath-svg "+e.unwrap(t.css))},disposeWhenNodeIsRemoved:t}),{controlsDescendantBindings:!0}}},e.virtualElements.allowedBindings.cesiumSvgPath=!0}};kA.attachToKo(LA.a),zA.register(LA.a);var UA=LA.a;const VA=[171,75,84,88,32,50,48,187,13,10,26,10];var HA,GA,YA,WA,qA,XA,KA,JA,ZA;(ZA=HA||(HA={}))[ZA.NONE=0]="NONE",ZA[ZA.BASISLZ=1]="BASISLZ",ZA[ZA.ZSTD=2]="ZSTD",ZA[ZA.ZLIB=3]="ZLIB",function(e){e[e.BASICFORMAT=0]="BASICFORMAT"}(GA||(GA={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.ETC1S=163]="ETC1S",e[e.UASTC=166]="UASTC"}(YA||(YA={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.SRGB=1]="SRGB"}(WA||(WA={})),function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.LINEAR=1]="LINEAR",e[e.SRGB=2]="SRGB",e[e.ITU=3]="ITU",e[e.NTSC=4]="NTSC",e[e.SLOG=5]="SLOG",e[e.SLOG2=6]="SLOG2"}(qA||(qA={})),function(e){e[e.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",e[e.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(XA||(XA={})),function(e){e[e.RGB=0]="RGB",e[e.RRR=3]="RRR",e[e.GGG=4]="GGG",e[e.AAA=15]="AAA"}(KA||(KA={})),function(e){e[e.RGB=0]="RGB",e[e.RGBA=3]="RGBA",e[e.RRR=4]="RRR",e[e.RRRG=5]="RRRG"}(JA||(JA={}));class QA{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=HA.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:GA.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:YA.UNSPECIFIED,colorPrimaries:WA.SRGB,transferFunction:WA.SRGB,flags:XA.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class $A{constructor(e,t,i,n){this._dataView=new DataView(e.buffer,e.byteOffset+t,i),this._littleEndian=n,this._offset=0}_nextUint8(){const e=this._dataView.getUint8(this._offset);return this._offset+=1,e}_nextUint16(){const e=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,e}_nextUint32(){const e=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,e}_nextUint64(){const e=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,e}_skip(e){return this._offset+=e,this}_scan(e,t=0){const i=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==t&&n>3],E<<=7&C),_=0;_>3]),128&E?(l&&(l[C]=1),m=m>(r=M.encoding<2?x[A++]:T)?r:m,s[C++]=r):(l&&(l[C]=0),s[C++]=n),E<<=1;C+=S}else if(M.encoding<2)for(g=0;g(r=x[A++])?r:m,s[C++]=r;C+=S}else for(m=m>T?T:m,g=0;g0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(r=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)o[u++]=r.getUint8(l++);else{var d=r.getUint8(l++);for(s=-s;s--;)o[u++]=d}s=r.getInt16(l,!0),l+=2}while(l0?1:0),p=f+(n.height%f>0?1:0);n.pixels.blocks=new Array(h*p);for(var m=0,_=0;_3)throw"Invalid block encoding ("+b.encoding+")";if(2!==b.encoding){if(0!==w&&2!==w){if(w>>=6,b.offsetType=w,2===w)b.offset=r.getInt8(1),v++;else if(1===w)b.offset=r.getInt16(1,!0),v+=2;else{if(0!==w)throw"Invalid block offset type";b.offset=r.getFloat32(1,!0),v+=4}if(1===b.encoding)if(w=r.getUint8(v),v++,b.bitsPerPixel=63&w,w>>=6,b.numValidPixelsType=w,2===w)b.numValidPixels=r.getUint8(v),v++;else if(1===w)b.numValidPixels=r.getUint16(v,!0),v+=2;else{if(0!==w)throw"Invalid valid pixel count type";b.numValidPixels=r.getUint32(v,!0),v+=4}}var O;if(t+=v,3!==b.encoding)if(0===b.encoding){var x=(n.pixels.numBytes-1)/4;if(x!==Math.floor(x))throw"uncompressed block has invalid length";O=new ArrayBuffer(4*x),new Uint8Array(O).set(new Uint8Array(e,t,4*x));var A=new Float32Array(O);b.rawData=A,t+=4*x}else if(1===b.encoding){var T=Math.ceil(b.numValidPixels*b.bitsPerPixel/8),E=Math.ceil(T/4);O=new ArrayBuffer(4*E),new Uint8Array(O).set(new Uint8Array(e,t,T)),b.stuffedData=new Uint32Array(O),t+=T}}else t++}return n.eofOffset=t,n},o=function(e,t,i,n,a,r,o){var s,l,u,d=(1<=t)l=u>>>f-t&d,f-=t;else{var m=t-f;l=(u&d)<>>(f=32-m)}r[s]=l=i?(u=d>>>m-i&h,m-=i):(u=(d&h)<<(c=i-m)&h,u+=(d=e[p++])>>>(m=32-c)),t[l]=a[u];else for(f=Math.ceil((s-r)/o),l=0;l=i?(u=d>>>m-i&h,m-=i):(u=(d&h)<<(c=i-m)&h,u+=(d=e[p++])>>>(m=32-c)),t[l]=u=t?(f=o>>>c-t&s,c-=t):(f=(o&s)<<(d=t-c)&s,f+=(o=e[l++])>>>(c=32-d)),h[u]=f=i?(u=d>>>m&f,p-=i,m+=i):(u=d>>>m&f,p=32-(c=i-p),u|=((d=e[h++])&(1<=i?(u=d>>>m&f,p-=i,m+=i):(u=d>>>m&f,p=32-(c=i-p),u|=((d=e[h++])&(1<=t?(f=o>>>h&s,c-=t,h+=t):(f=o>>>h&s,c=32-(d=t-c),f|=((o=e[l++])&(1<=i?(r=o>>>d-i&l,d-=i):(r=(o&l)<<(s=i-d)&l,r+=(o=e[u++])>>>(d=32-s)),t[a]=r;return t},f=function(e,t,i,n){var a,r,o,s,l=(1<=i?(r=o>>>c&l,d-=i,c+=i):(r=o>>>c&l,d=32-(s=i-d),r|=((o=e[u++])&(1<=359?359:a;a-=o;do{t+=e[r++]<<8,i+=t+=e[r++]}while(--o);t=(65535&t)+(t>>>16),i=(65535&i)+(i>>>16)}return 1&n&&(i+=t+=e[r]<<8),((i=(65535&i)+(i>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var i=t.ptr,n=new Uint8Array(e,i,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,n),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;i+=6;var r,o=new DataView(e,i,8),s=o.getInt32(0,!0);if(a.fileVersion=s,i+=4,s>=3&&(a.checksum=o.getUint32(4,!0),i+=4),o=new DataView(e,i,12),a.height=o.getUint32(0,!0),a.width=o.getUint32(4,!0),i+=8,s>=4?(a.numDims=o.getUint32(8,!0),i+=4):a.numDims=1,o=new DataView(e,i,40),a.numValidPixel=o.getUint32(0,!0),a.microBlockSize=o.getInt32(4,!0),a.blobSize=o.getInt32(8,!0),a.imageType=o.getInt32(12,!0),a.maxZError=o.getFloat64(16,!0),a.zMin=o.getFloat64(24,!0),a.zMax=o.getFloat64(32,!0),i+=40,t.headerInfo=a,t.ptr=i,s>=3&&(r=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,i-r,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var i=t.headerInfo,n=this.getDataTypeArray(i.imageType),a=i.numDims*this.getDataTypeSize(i.imageType),r=this.readSubArray(e,t.ptr,n,a),o=this.readSubArray(e,t.ptr+a,n,a);t.ptr+=2*a;var s,l=!0;for(s=0;s0){i=new Uint8Array(Math.ceil(o/8));var d=(l=new DataView(e,a,u.numBytes)).getInt16(0,!0),c=2,f=0,h=0;do{if(d>0)for(;d--;)i[f++]=l.getUint8(c++);else for(h=l.getUint8(c++),d=-d;d--;)i[f++]=h;d=l.getInt16(c,!0),c+=2}while(c>3],p<<=7&m):p=i[m>>3],128&p&&(n[m]=1);t.pixels.resultMask=n,u.bitset=i,a+=u.numBytes}return t.ptr=a,t.mask=u,!0},readDataOneSweep:function(e,t,i){var n,a=t.ptr,r=t.headerInfo,o=r.numDims,s=r.width*r.height,l=r.imageType,u=r.numValidPixel*h.getDataTypeSize(l)*o,d=t.pixels.resultMask;if(i===Uint8Array)n=new Uint8Array(e,a,u);else{var c=new ArrayBuffer(u);new Uint8Array(c).set(new Uint8Array(e,a,u)),n=new i(c)}if(n.length===s*o)t.pixels.resultPixels=n;else{t.pixels.resultPixels=new i(s*o);var f=0,p=0,m=0,_=0;if(o>1)for(m=0;m=o)return!1;var s=new Uint32Array(o-r);h.decodeBits(e,t,s);var l,u,d,c,f=[];for(l=r;l0&&(f[u].second=v<>>32-c,32-b>=c?32===(b+=c)&&(b=0,v=y[++w]):(b+=c-32,v=y[++w],f[u].second|=v>>>32-b));var O=0,x=0,A=new p;for(l=0;l=i?i:O,O>=30&&console.log("WARning, large NUM LUT BITS IS "+O);var T,E,C,S,M,D=[];for(l=r;l0)if(T=[c,u],c<=x)for(E=f[u].second<=0;S--)E>>>S&1?(M.right||(M.right=new p),M=M.right):(M.left||(M.left=new p),M=M.left),0!==S||M.val||(M.val=T[1]);return{decodeLut:D,numBitsLUTQick:x,numBitsLUT:O,tree:A,stuffedData:y,srcPtr:w,bitPos:b}},readHuffman:function(e,t,i){var n,a,r,o,s,l,u,d,c,f=t.headerInfo,h=f.numDims,p=t.headerInfo.height,m=t.headerInfo.width,_=m*p,g=this.readHuffmanTree(e,t),v=g.decodeLut,y=g.tree,b=g.stuffedData,w=g.srcPtr,O=g.bitPos,x=g.numBitsLUTQick,A=g.numBitsLUT,T=0===t.headerInfo.imageType?128:0,E=t.pixels.resultMask,C=0;O>0&&(w++,O=0);var S,M=b[w],D=1===t.encodeMode,P=new i(_*h),I=P;for(S=0;S1&&(I=new i(P.buffer,_*S,_),C=0),t.headerInfo.numValidPixel===m*p)for(d=0,l=0;l>>32-x,32-O>>64-O-x),v[s])a=v[s][1],O+=v[s][0];else for(s=o=M<>>32-A,32-O>>64-O-A),n=y,c=0;c>>A-c-1&1?n.right:n.left).left&&!n.right){a=n.val,O=O+c+1;break}O>=32&&(O-=32,M=b[++w]),r=a-T,D?(r+=u>0?C:l>0?I[d-m]:C,r&=255,I[d]=r,C=r):I[d]=r}else for(d=0,l=0;l>>32-x,32-O>>64-O-x),v[s])a=v[s][1],O+=v[s][0];else for(s=o=M<>>32-A,32-O>>64-O-A),n=y,c=0;c>>A-c-1&1?n.right:n.left).left&&!n.right){a=n.val,O=O+c+1;break}O>=32&&(O-=32,M=b[++w]),r=a-T,D?(u>0&&E[d-1]?r+=C:l>0&&E[d-m]?r+=I[d-m]:r+=C,r&=255,I[d]=r,C=r):I[d]=r}t.ptr=t.ptr+4*(w+1)+(O>0?4:0)}t.pixels.resultPixels=P},decodeBits:function(e,t,i,n,a){var r=t.headerInfo,o=r.fileVersion,h=0,p=new DataView(e,t.ptr,5),m=p.getUint8(0);h++;var _=m>>6,g=0===_?4:3-_,v=(32&m)>0,y=31&m,b=0;if(1===g)b=p.getUint8(h),h++;else if(2===g)b=p.getUint16(h,!0),h+=2;else{if(4!==g)throw"Invalid valid pixel count type";b=p.getUint32(h,!0),h+=4}var w,O,x,A,T,E,C,S,M,D=2*r.maxZError,P=r.numDims>1?r.maxValues[a]:r.zMax;if(v){for(t.counter.lut++,S=p.getUint8(h),h++,A=Math.ceil((S-1)*y/8),T=Math.ceil(A/4),O=new ArrayBuffer(4*T),x=new Uint8Array(O),t.ptr+=h,x.set(new Uint8Array(e,t.ptr,A)),C=new Uint32Array(O),t.ptr+=A,M=0;S-1>>>M;)M++;A=Math.ceil(b*M/8),T=Math.ceil(A/4),O=new ArrayBuffer(4*T),(x=new Uint8Array(O)).set(new Uint8Array(e,t.ptr,A)),w=new Uint32Array(O),t.ptr+=A,E=o>=3?d(C,y,S-1,n,D,P):l(C,y,S-1,n,D,P),o>=3?u(w,i,M,b,E):s(w,i,M,b,E)}else t.counter.bitstuffer++,M=y,t.ptr+=h,M>0&&(A=Math.ceil(b*M/8),T=Math.ceil(A/4),O=new ArrayBuffer(4*T),(x=new Uint8Array(O)).set(new Uint8Array(e,t.ptr,A)),w=new Uint32Array(O),t.ptr+=A,o>=3?null==n?f(w,i,M,b):u(w,i,M,b,!1,n,D,P):null==n?c(w,i,M,b):s(w,i,M,b,!1,n,D,P))},readTiles:function(e,t,i){var n=t.headerInfo,a=n.width,r=n.height,o=n.microBlockSize,s=n.imageType,l=h.getDataTypeSize(s),u=Math.ceil(a/o),d=Math.ceil(r/o);t.pixels.numBlocksY=d,t.pixels.numBlocksX=u,t.pixels.ptr=0;var c,f,p,m,_,g,v,y,b=0,w=0,O=0,x=0,A=0,T=0,E=0,C=0,S=0,M=0,D=0,P=0,I=0,L=0,j=0,R=new i(o*o),N=r%o||o,B=a%o||o,F=n.numDims,k=t.pixels.resultMask,z=t.pixels.resultPixels;for(O=0;O1&&(z=new i(t.pixels.resultPixels.buffer,a*r*y*l,a*r)),E=e.byteLength-t.ptr,f={},j=0,j++,S=(C=(c=new DataView(e,t.ptr,Math.min(10,E))).getUint8(0))>>6&255,(C>>2&15)!=(x*o>>3&15))throw"integrity issue";if((_=3&C)>3)throw t.ptr+=j,"Invalid block encoding ("+_+")";if(2!==_)if(0===_){if(t.counter.uncompressed++,t.ptr+=j,P=(P=A*T*l)<(I=e.byteLength-t.ptr)?P:I,p=new ArrayBuffer(P%l==0?P:P+l-P%l),new Uint8Array(p).set(new Uint8Array(e,t.ptr,P)),m=new i(p),L=0,k)for(b=0;b1)for(r=0;r=-128&&t<=127;break;case 1:i=t>=0&&t<=255;break;case 2:i=t>=-32768&&t<=32767;break;case 3:i=t>=0&&t<=65536;break;case 4:i=t>=-2147483648&&t<=2147483647;break;case 5:i=t>=0&&t<=4294967296;break;case 6:i=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:i=t>=5e-324&&t<=17976931348623157e292;break;default:i=!1}return i},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var i=e;switch(e){case 2:case 4:i=e-t;break;case 3:case 5:i=e-2*t;break;case 6:i=0===t?e:1===t?2:1;break;case 7:i=0===t?e:e-2*t+1;break;default:i=e}return i},getOnePixel:function(e,t,i,n){var a=0;switch(i){case 0:a=n.getInt8(t);break;case 1:a=n.getUint8(t);break;case 2:a=n.getInt16(t,!0);break;case 3:a=n.getUint16(t,!0);break;case 4:a=n.getInt32(t,!0);break;case 5:a=n.getUInt32(t,!0);break;case 6:a=n.getFloat32(t,!0);break;case 7:a=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a}},p=function(e,t,i){this.val=e,this.left=t,this.right=i},{decode:function(e,t){var i=(t=t||{}).noDataValue,n=0,a={};a.ptr=t.inputOffset||0,a.pixels={},h.readHeaderInfo(e,a);var r=a.headerInfo,o=r.fileVersion,s=h.getDataTypeArray(r.imageType);h.readMask(e,a),r.numValidPixel===r.width*r.height||a.pixels.resultMask||(a.pixels.resultMask=t.maskData);var l,u=r.width*r.height;if(a.pixels.resultPixels=new s(u*r.numDims),a.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==r.numValidPixel)if(r.zMax===r.zMin)h.constructConstantSurface(a);else if(o>=4&&h.checkMinMaxRanges(e,a))h.constructConstantSurface(a);else{var d=new DataView(e,a.ptr,2),c=d.getUint8(0);if(a.ptr++,c)h.readDataOneSweep(e,a,s);else if(o>1&&r.imageType<=1&&Math.abs(r.maxZError-.5)<1e-5){var f=d.getUint8(1);if(a.ptr++,a.encodeMode=f,f>2||o<4&&f>1)throw"Invalid Huffman flag "+f;f?h.readHuffman(e,a,s):h.readTiles(e,a,s)}else h.readTiles(e,a,s)}a.eofOffset=a.ptr,t.inputOffset?(l=a.headerInfo.blobSize+t.inputOffset-a.ptr,Math.abs(l)>=1&&(a.eofOffset=t.inputOffset+a.headerInfo.blobSize)):(l=a.headerInfo.blobSize-a.ptr,Math.abs(l)>=1&&(a.eofOffset=a.headerInfo.blobSize));var p={width:r.width,height:r.height,pixelData:a.pixels.resultPixels,minValue:r.zMin,maxValue:r.zMax,validPixelCount:r.numValidPixel,dimCount:r.numDims,dimStats:{minValues:r.minValues,maxValues:r.maxValues},maskData:a.pixels.resultMask};if(a.pixels.resultMask&&h.isValidPixelValue(r.imageType,i)){var m=a.pixels.resultMask;for(n=0;n1&&b.fileInfo.mask&&b.fileInfo.mask.numBytes>0&&m.push(b.maskData),h++,_.pixels.push(b.pixelData),_.statistics.push({minValue:b.minValue,maxValue:b.maxValue,noDataValue:b.noDataValue,dimStats:b.dimStats})}if(n>1&&m.length>1){for(f=_.width*_.height,_.bandMasks=m,(u=new Uint8Array(f)).set(m[0]),d=1;d{this.noSleepVideo.duration<=1?this.noSleepVideo.setAttribute("loop",""):this.noSleepVideo.addEventListener("timeupdate",()=>{this.noSleepVideo.currentTime>.5&&(this.noSleepVideo.currentTime=Math.random())})}))}_addSourceToVideo(e,t,i){var n=document.createElement("source");n.src=i,n.type="video/"+t,e.appendChild(n)}enable(){lT?(this.disable(),console.warn("\n NoSleep enabled for older iOS devices. This can interrupt\n active or long-running network requests from completing successfully.\n See https://github.com/richtr/NoSleep.js/issues/15 for more details.\n "),this.noSleepTimer=window.setInterval(()=>{document.hidden||(window.location.href=window.location.href.split("#")[0],window.setTimeout(window.stop,0))},15e3)):this.noSleepVideo.play()}disable(){lT?this.noSleepTimer&&(console.warn("\n NoSleep now disabled for older iOS devices.\n "),window.clearInterval(this.noSleepTimer),this.noSleepTimer=null):this.noSleepVideo.pause()}},dT=Object(iT.b)((function(e,t){var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(var a in i)n(i,a)&&(e[a]=i[a])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,i,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(i,i+n),a);else for(var r=0;r>>16&65535|0,o=0;0!==i;){i-=o=i>2e3?2e3:i;do{r=r+(a=a+t[n++]|0)|0}while(--o);a%=65521,r%=65521}return a|r<<16|0};var fT=function(){for(var e,t=[],i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t}();var hT=function(e,t,i,n){var a=fT,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e},pT=function(e,t){var i,n,a,r,o,s,l,u,d,c,f,h,p,m,_,g,v,y,b,w,O,x,A,T,E;i=e.state,n=e.next_in,T=e.input,a=n+(e.avail_in-5),r=e.next_out,E=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),l=i.dmax,u=i.wsize,d=i.whave,c=i.wnext,f=i.window,h=i.hold,p=i.bits,m=i.lencode,_=i.distcode,g=(1<>>=b=y>>>24,p-=b,0===(b=y>>>16&255))E[r++]=65535&y;else{if(!(16&b)){if(0==(64&b)){y=m[(65535&y)+(h&(1<>>=b,p-=b),p<15&&(h+=T[n++]<>>=b=y>>>24,p-=b,!(16&(b=y>>>16&255))){if(0==(64&b)){y=_[(65535&y)+(h&(1<l){e.msg="invalid distance too far back",i.mode=30;break e}if(h>>>=b,p-=b,O>(b=r-o)){if((b=O-b)>d&&i.sane){e.msg="invalid distance too far back",i.mode=30;break e}if(x=0,A=f,0===c){if(x+=u-b,b2;)E[r++]=A[x++],E[r++]=A[x++],E[r++]=A[x++],w-=3;w&&(E[r++]=A[x++],w>1&&(E[r++]=A[x++]))}else{x=r-O;do{E[r++]=E[x++],E[r++]=E[x++],E[r++]=E[x++],w-=3}while(w>2);w&&(E[r++]=E[x++],w>1&&(E[r++]=E[x++]))}break}}break}}while(n>3,h&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n=1&&0===D[w];w--);if(O>w&&(O=w),0===w)return a[r++]=20971520,a[r++]=20971520,s.bits=1,0;for(b=1;b0&&(0===e||1!==w))return-1;for(P[1]=0,v=1;v<15;v++)P[v+1]=P[v]+D[v];for(y=0;y852||2===e&&E>592)return 1;for(;;){p=v-A,o[y]h?(m=I[L+o[y]],_=S[M+o[y]]):(m=96,_=0),l=1<>A)+(u-=l)]=p<<24|m<<16|_|0}while(0!==u);for(l=1<>=1;if(0!==l?(C&=l-1,C+=l):C=0,y++,0==--D[v]){if(v===w)break;v=t[i+o[y]]}if(v>O&&(C&c)!==d){for(0===A&&(A=O),f+=b,T=1<<(x=v-A);x+A852||2===e&&E>592)return 1;a[d=C&c]=O<<24|x<<16|f-r|0}}return 0!==C&&(a[f+C]=v-A<<24|64<<16|0),s.bits=O,0};function bT(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function wT(){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 dT.Buf16(320),this.work=new dT.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function OT(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new dT.Buf32(852),t.distcode=t.distdyn=new dT.Buf32(592),t.sane=1,t.back=-1,0):-2}function xT(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,OT(e)):-2}function AT(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?-2:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,xT(e))):-2}function TT(e,t){var i,n;return e?(n=new wT,e.state=n,n.window=null,0!==(i=AT(e,t))&&(e.state=null),i):-2}var ET,CT,ST=!0;function MT(e){if(ST){var t;for(ET=new dT.Buf32(512),CT=new dT.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(yT(1,e.lens,0,288,ET,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;yT(2,e.lens,0,32,CT,0,e.work,{bits:5}),ST=!1}e.lencode=ET,e.lenbits=9,e.distcode=CT,e.distbits=5}function DT(e,t,i,n){var a,r=e.state;return null===r.window&&(r.wsize=1<=r.wsize?(dT.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):((a=r.wsize-r.wnext)>n&&(a=n),dT.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(dT.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=hT(i.check,C,2,0),u=0,d=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,O=8+(15&(u>>>=4)),0===i.wbits)i.wbits=O;else if(O>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(C[0]=255&u,C[1]=u>>>8&255,i.check=hT(i.check,C,2,0)),u=0,d=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,u+=n[r++]<>>8&255,C[2]=u>>>16&255,C[3]=u>>>24&255,i.check=hT(i.check,C,4,0)),u=0,d=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,u+=n[r++]<>8),512&i.flags&&(C[0]=255&u,C[1]=u>>>8&255,i.check=hT(i.check,C,2,0)),u=0,d=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,u+=n[r++]<>>8&255,i.check=hT(i.check,C,2,0)),u=0,d=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&((h=i.length)>s&&(h=s),h&&(i.head&&(O=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),dT.arraySet(i.head.extra,n,r,h,O)),512&i.flags&&(i.check=hT(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;h=0;do{O=n[r+h++],i.head&&O&&i.length<65536&&(i.head.name+=String.fromCharCode(O))}while(O&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,u+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,u+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(MT(i),i.mode=20,6===t){u>>>=2,d-=2;break e}break;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}u>>>=2,d-=2;break;case 14:for(u>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,u+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&u,u=0,d=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(h>s&&(h=s),h>l&&(h=l),0===h)break e;dT.arraySet(a,n,r,h,o),s-=h,r+=h,l-=h,o+=h,i.length-=h;break}i.mode=12;break;case 17:for(;d<14;){if(0===s)break e;s--,u+=n[r++]<>>=5,d-=5,i.ndist=1+(31&u),u>>>=5,d-=5,i.ncode=4+(15&u),u>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=30;break}i.have=0,i.mode=18;case 18:for(;i.have>>=3,d-=3}for(;i.have<19;)i.lens[S[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,A={bits:i.lenbits},x=yT(0,i.lens,0,19,i.lencode,0,i.work,A),i.lenbits=A.bits,x){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,v=65535&E,!((_=E>>>24)<=d);){if(0===s)break e;s--,u+=n[r++]<>>=_,d-=_,i.lens[i.have++]=v;else{if(16===v){for(T=_+2;d>>=_,d-=_,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}O=i.lens[i.have-1],h=3+(3&u),u>>>=2,d-=2}else if(17===v){for(T=_+3;d>>=_)),u>>>=3,d-=3}else{for(T=_+7;d>>=_)),u>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=O}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,A={bits:i.lenbits},x=yT(1,i.lens,0,i.nlen,i.lencode,0,i.work,A),i.lenbits=A.bits,x){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,A={bits:i.distbits},x=yT(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,A),i.distbits=A.bits,x){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=r,e.avail_in=s,i.hold=u,i.bits=d,pT(e,f),o=e.next_out,a=e.output,l=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,u=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;g=(E=i.lencode[u&(1<>>16&255,v=65535&E,!((_=E>>>24)<=d);){if(0===s)break e;s--,u+=n[r++]<>y)])>>>16&255,v=65535&E,!(y+(_=E>>>24)<=d);){if(0===s)break e;s--,u+=n[r++]<>>=y,d-=y,i.back+=y}if(u>>>=_,d-=_,i.back+=_,i.length=v,0===g){i.mode=26;break}if(32&g){i.back=-1,i.mode=12;break}if(64&g){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&g,i.mode=22;case 22:if(i.extra){for(T=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;g=(E=i.distcode[u&(1<>>16&255,v=65535&E,!((_=E>>>24)<=d);){if(0===s)break e;s--,u+=n[r++]<>y)])>>>16&255,v=65535&E,!(y+(_=E>>>24)<=d);){if(0===s)break e;s--,u+=n[r++]<>>=y,d-=y,i.back+=y}if(u>>>=_,d-=_,i.back+=_,64&g){e.msg="invalid distance code",i.mode=30;break}i.offset=v,i.extra=15&g,i.mode=24;case 24:if(i.extra){for(T=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===l)break e;if(h=f-l,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,p=i.wsize-h):p=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,p=o-i.offset,h=i.length;h>l&&(h=l),l-=h,i.length-=h;do{a[o++]=m[p++]}while(--h);0===i.length&&(i.mode=21);break;case 26:if(0===l)break e;a[o++]=i.length,l--,i.mode=21;break;case 27:if(i.wrap){for(;d<32;){if(0===s)break e;s--,u|=n[r++]<=252?6:RT>=248?5:RT>=240?4:RT>=224?3:RT>=192?2:1;jT[254]=jT[254]=1;function NT(e,t){if(t<65534&&(e.subarray&<||!e.subarray&&IT))return String.fromCharCode.apply(null,dT.shrinkBuf(e,t));for(var i="",n=0;n>>6,t[r++]=128|63&i):i<65536?(t[r++]=224|i>>>12,t[r++]=128|i>>>6&63,t[r++]=128|63&i):(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63,t[r++]=128|i>>>6&63,t[r++]=128|63&i);return t},FT=function(e){for(var t=new dT.Buf8(e.length),i=0,n=t.length;i4)s[n++]=65533,i+=r-1;else{for(a&=2===r?31:3===r?15:7;r>1&&i1?s[n++]=65533:a<65536?s[n++]=a:(a-=65536,s[n++]=55296|a>>10&1023,s[n++]=56320|1023&a)}return NT(s,n)},zT=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+jT[e[i]]>t?i:t},UT=0,VT=2,HT=4,GT=0,YT=1,WT=2,qT=-5,XT={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"};var KT=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};var JT=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},ZT=Object.prototype.toString;function QT(e){if(!(this instanceof QT))return new QT(e);this.options=dT.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new KT,this.strm.avail_out=0;var i=PT.inflateInit2(this.strm,t.windowBits);if(i!==GT)throw new Error(XT[i]);if(this.header=new JT,PT.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=BT(t.dictionary):"[object ArrayBuffer]"===ZT.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=PT.inflateSetDictionary(this.strm,t.dictionary))!==GT))throw new Error(XT[i])}function $T(e,t){var i=new QT(t);if(i.push(e,!0),i.err)throw i.msg||XT[i.err];return i.result}QT.prototype.push=function(e,t){var i,n,a,r,o,s=this.strm,l=this.options.chunkSize,u=this.options.dictionary,d=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?HT:UT,"string"==typeof e?s.input=FT(e):"[object ArrayBuffer]"===ZT.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new dT.Buf8(l),s.next_out=0,s.avail_out=l),(i=PT.inflate(s,UT))===WT&&u&&(i=PT.inflateSetDictionary(this.strm,u)),i===qT&&!0===d&&(i=GT,d=!1),i!==YT&&i!==GT)return this.onEnd(i),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&i!==YT&&(0!==s.avail_in||n!==HT&&n!==VT)||("string"===this.options.to?(a=zT(s.output,s.next_out),r=s.next_out-a,o=kT(s.output,a),s.next_out=r,s.avail_out=l-r,r&&dT.arraySet(s.output,s.output,a,r,0),this.onData(o)):this.onData(dT.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(d=!0)}while((s.avail_in>0||0===s.avail_out)&&i!==YT);return i===YT&&(n=HT),n===HT?(i=PT.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===GT):n!==VT||(this.onEnd(GT),s.avail_out=0,!0)},QT.prototype.onData=function(e){this.chunks.push(e)},QT.prototype.onEnd=function(e){e===GT&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=dT.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var eE={Inflate:QT,inflate:$T,inflateRaw:function(e,t){return(t=t||{}).raw=!0,$T(e,t)},ungzip:$T},tE=i(848);function iE(e){Object(l.default)(e)||(e=new yt.a),this._clock=e,this._eventHelper=new di.a,this._eventHelper.add(e.onTick,this.synchronize,this),this.systemTime=UA.observable(ln.default.now()),this.systemTime.equalityComparer=ln.default.equals,this.startTime=UA.observable(e.startTime),this.startTime.equalityComparer=ln.default.equals,this.startTime.subscribe((function(t){e.startTime=t,this.synchronize()}),this),this.stopTime=UA.observable(e.stopTime),this.stopTime.equalityComparer=ln.default.equals,this.stopTime.subscribe((function(t){e.stopTime=t,this.synchronize()}),this),this.currentTime=UA.observable(e.currentTime),this.currentTime.equalityComparer=ln.default.equals,this.currentTime.subscribe((function(t){e.currentTime=t,this.synchronize()}),this),this.multiplier=UA.observable(e.multiplier),this.multiplier.subscribe((function(t){e.multiplier=t,this.synchronize()}),this),this.clockStep=UA.observable(e.clockStep),this.clockStep.subscribe((function(t){e.clockStep=t,this.synchronize()}),this),this.clockRange=UA.observable(e.clockRange),this.clockRange.subscribe((function(t){e.clockRange=t,this.synchronize()}),this),this.canAnimate=UA.observable(e.canAnimate),this.canAnimate.subscribe((function(t){e.canAnimate=t,this.synchronize()}),this),this.shouldAnimate=UA.observable(e.shouldAnimate),this.shouldAnimate.subscribe((function(t){e.shouldAnimate=t,this.synchronize()}),this),UA.track(this,["systemTime","startTime","stopTime","currentTime","multiplier","clockStep","clockRange","canAnimate","shouldAnimate"])}Object.defineProperties(iE.prototype,{clock:{get:function(){return this._clock}}}),iE.prototype.synchronize=function(){var e=this._clock;this.systemTime=ln.default.now(),this.startTime=e.startTime,this.stopTime=e.stopTime,this.currentTime=e.currentTime,this.multiplier=e.multiplier,this.clockStep=e.clockStep,this.clockRange=e.clockRange,this.canAnimate=e.canAnimate,this.shouldAnimate=e.shouldAnimate},iE.prototype.isDestroyed=function(){return!1},iE.prototype.destroy=function(){this._eventHelper.removeAll(),Object(Lr.default)(this)};var nE=iE;var aE=function(){this.canExecute=void 0,this.beforeExecute=void 0,this.afterExecute=void 0,u.default.throwInstantiationError()},rE={createCheckbox:function(e,t,i){$.a.typeOf.string("labelText",e),$.a.typeOf.string("checkedBinding",t);var n=document.createElement("div"),a=document.createElement("label"),r=document.createElement("input");r.type="checkbox";var o="checked: "+t;return Object(l.default)(i)&&(o+=", enable: "+i),r.setAttribute("data-bind",o),a.appendChild(r),a.appendChild(document.createTextNode(e)),n.appendChild(a),n},createSection:function(e,t,i,n){$.a.defined("panel",e),$.a.typeOf.string("headerText",t),$.a.typeOf.string("sectionVisibleBinding",i),$.a.typeOf.string("toggleSectionVisibilityBinding",n);var a=document.createElement("div");a.className="cesium-cesiumInspector-section",a.setAttribute("data-bind",'css: { "cesium-cesiumInspector-section-collapsed": !'+i+" }"),e.appendChild(a);var r=document.createElement("h3");r.className="cesium-cesiumInspector-sectionHeader",r.appendChild(document.createTextNode(t)),r.setAttribute("data-bind","click: "+n),a.appendChild(r);var o=document.createElement("div");return o.className="cesium-cesiumInspector-sectionContent",a.appendChild(o),o}},oE=rE;function sE(e,t){if(!Object(l.default)(e))throw new u.default("command is required.");this._command=e,t=Object(s.default)(t,s.default.EMPTY_OBJECT),this.toggled=Object(s.default)(t.toggled,!1),this.tooltip=Object(s.default)(t.tooltip,""),UA.track(this,["toggled","tooltip"])}Object.defineProperties(sE.prototype,{command:{get:function(){return this._command}}});var lE=sE;var uE=function(e,t){if(!Object(l.default)(e))throw new u.default("func is required.");t=Object(s.default)(t,!0);var i=new c.default,n=new c.default;function a(){if(!a.canExecute)throw new u.default("Cannot execute command, canExecute is false.");var t,r={args:arguments,cancel:!1};return i.raiseEvent(r),r.cancel||(t=e.apply(null,arguments),n.raiseEvent(t)),t}return a.canExecute=t,UA.track(a,["canExecute"]),Object.defineProperties(a,{beforeExecute:{value:i},afterExecute:{value:n}}),a};var dE=function(e,t,i,n,a){return i.call(n,e[t]),UA.getObservable(e,t).subscribe(i,n,a)},cE=i(25),fE=i(862),hE=i(361),pE=i(859),mE=i(310),_E=i(334),gE=i(144),vE=i(520),yE=i(521),bE=i(191),wE=i(363),OE=i(857),xE=i(858),AE=i(192),TE=i(335),EE=i(863),CE=i(856),SE=i(855),ME=i(881),DE=i(860),PE=i(861),IE=i(362),LE=i(161),jE=i(917),RE=i(944),NE=i(918),BE=i(921),FE=i(367),kE=Object.freeze({FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"});function zE(){this._defaultTexture=void 0,this._textures={},this._loadedImages=[],this._lastUpdatedFrame=-1}function UE(e,t,i){var n,a=t.id,r=t.textureUniform,o=r.typedArray,s=r.sampler;n=Object(l.default)(o)?new Fm.default({context:i,pixelFormat:r.pixelFormat,pixelDatatype:r.pixelDatatype,source:{arrayBufferView:o,width:r.width,height:r.height},sampler:s,flipY:!1}):new Fm.default({context:i,source:t.image,sampler:s});var u=e._textures[a];Object(l.default)(u)&&u!==i.defaultTexture&&u.destroy(),e._textures[a]=n}function VE(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this.mode=Object(s.default)(e.mode,FE.a.MODIFY_MATERIAL),this.lightingModel=e.lightingModel,this.uniforms=Object(s.default)(e.uniforms,s.default.EMPTY_OBJECT),this.varyings=Object(s.default)(e.varyings,s.default.EMPTY_OBJECT),this.vertexShaderText=e.vertexShaderText,this.fragmentShaderText=e.fragmentShaderText,this.isTranslucent=Object(s.default)(e.isTranslucent,!1),this._textureManager=new zE,this._defaultTexture=void 0,this.uniformMap=function(e){var t=e.uniforms,i={};for(var n in t)if(t.hasOwnProperty(n)){var a=t[n],r=a.type;if(r===kE.SAMPLER_CUBE)throw new u.default("CustomShader does not support samplerCube uniforms");r===kE.SAMPLER_2D?(e._textureManager.loadTexture2D(n,a.value),i[n]=HE(e,n)):i[n]=GE(e,n)}return i}(this),this.usedVariablesVertex={attributeSet:{}},this.usedVariablesFragment={attributeSet:{},materialSet:{}},function(e){var t,i=/[vf]sInput\.attributes\.(\w+)/g,n=e.vertexShaderText;Object(l.default)(n)&&(t=e.usedVariablesVertex.attributeSet,YE(n,i,t));var a=e.fragmentShaderText;if(Object(l.default)(a)){t=e.usedVariablesFragment.attributeSet,YE(a,i,t);var r=e.usedVariablesFragment.materialSet;YE(a,/material\.(\w+)/g,r)}}(this),function(e){var t=e.usedVariablesVertex.attributeSet;qE(t,"position","positionMC","vertex"),qE(t,"normal","normalMC","vertex"),qE(t,"tangent","tangentMC","vertex"),qE(t,"bitangent","bitangentMC","vertex"),qE(t,"positionWC","positionMC","vertex"),qE(t,"positionEC","positionMC","vertex"),qE(t,"normalEC","normalMC","vertex"),qE(t,"tangentEC","tangentMC","vertex"),qE(t,"bitangentEC","bitangentMC","vertex");var i=e.usedVariablesFragment.attributeSet;qE(i,"position","positionEC","fragment"),qE(i,"normal","normalEC","fragment"),qE(i,"tangent","tangentEC","fragment"),qE(i,"bitangent","bitangentEC","fragment"),qE(i,"normalMC","normalEC","fragment"),qE(i,"tangentMC","tangentEC","fragment"),qE(i,"bitangentMC","bitangentEC","fragment")}(this)}function HE(e,t){return function(){return Object(s.default)(e._textureManager.getTexture(t),e._defaultTexture)}}function GE(e,t){return function(){return e.uniforms[t].value}}function YE(e,t,i){for(var n;null!==(n=t.exec(e));){i[n[1]]=!0}}function WE(e){return/^.*MC$/.test(e)?e+" (model coordinates)":/^.*WC$/.test(e)?e+" (Cartesian world coordinates)":/^.*EC$/.test(e)?e+" (eye coordinates)":e}function qE(e,t,i,n){if(e.hasOwnProperty(t)){var a=WE(t)+" is not available in the "+n+" shader. Did you mean "+WE(i)+" instead?";throw new u.default(a)}}zE.prototype.getTexture=function(e){return this._textures[e]},zE.prototype.loadTexture2D=function(e,t){Object(l.default)(t.typedArray)?this._loadedImages.push({id:e,textureUniform:t}):function(e,t,i){i.resource.fetchImage().then((function(n){e._loadedImages.push({id:t,image:n,textureUniform:i})})).otherwise((function(){var i=e._textures[t];Object(l.default)(i)&&i!==e._defaultTexture&&i.destroy(),e._textures[t]=e._defaultTexture}))}(this,e,t)},zE.prototype.update=function(e){if(e.frameNumber!==this._lastUpdatedFrame){this._lastUpdatedFrame=e.frameNumber;var t=e.context;this._defaultTexture=t.defaultTexture;for(var i=this._loadedImages,n=0;n
',this._theme=a,this._themeNormal=a.childNodes[0],this._themeHover=a.childNodes[1],this._themeSelect=a.childNodes[2],this._themeDisabled=a.childNodes[3],this._themeKnob=a.childNodes[4],this._themePointer=a.childNodes[5],this._themeSwoosh=a.childNodes[6],this._themeSwooshHover=a.childNodes[7];var r=document.createElementNS(zS,"svg:svg");this._svgNode=r,r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",US);var o,s,d,c=document.createElementNS(zS,"g");this._topG=c,this._realtimeSVG=new nM((s=ZS[o="animation_pathClock"],QS({tagName:"g",class:"cesium-animation-rectButton",transform:"translate("+3+","+4+")",children:[{class:"cesium-animation-buttonGlow",id:"animation_pathWingButton",tagName:(d=ZS.animation_pathWingButton).tagName,d:d.d},{class:"cesium-animation-buttonMain",id:"animation_pathWingButton",tagName:d.tagName,d:d.d},{class:"cesium-animation-buttonPath",id:o,tagName:s.tagName,transform:s.transform,d:s.d},{tagName:"title",textContent:""}]})),t.playRealtimeViewModel),this._playReverseSVG=new nM(iM(44,99,"animation_pathPlayReverse"),t.playReverseViewModel),this._playForwardSVG=new nM(iM(124,99,"animation_pathPlay"),t.playForwardViewModel),this._pauseSVG=new nM(iM(84,99,"animation_pathPause"),t.pauseViewModel);var f=document.createElementNS(zS,"g");f.appendChild(this._realtimeSVG.svgElement),f.appendChild(this._playReverseSVG.svgElement),f.appendChild(this._playForwardSVG.svgElement),f.appendChild(this._pauseSVG.svgElement);var h=QS({tagName:"circle",class:"cesium-animation-shuttleRingBack",cx:100,cy:100,r:99});this._shuttleRingBackPanel=h;var p=ZS.animation_pathSwooshFX,m=ZS.animation_pathPointer,_=QS({tagName:"g",class:"cesium-animation-shuttleRingSwoosh",children:[{tagName:p.tagName,transform:"translate(100,97) scale(-1,1)",id:"animation_pathSwooshFX",d:p.d},{tagName:p.tagName,transform:"translate(100,97)",id:"animation_pathSwooshFX",d:p.d},{tagName:"line",x1:100,y1:8,x2:100,y2:22}]});this._shuttleRingSwooshG=_,this._shuttleRingPointer=QS({class:"cesium-animation-shuttleRingPointer",id:"animation_pathPointer",tagName:m.tagName,d:m.d});var g=QS({tagName:"g",transform:"translate(100,100)"});this._knobOuter=QS({tagName:"circle",class:"cesium-animation-knobOuter",cx:0,cy:0,r:71});var v=QS({tagName:"circle",class:"cesium-animation-knobInner",cx:0,cy:0,r:61});this._knobDate=$S(0,-24,""),this._knobTime=$S(0,-7,""),this._knobStatus=$S(0,-41,"");var y=QS({tagName:"circle",class:"cesium-animation-blank",cx:0,cy:0,r:61}),b=document.createElementNS(zS,"g");b.setAttribute("class","cesium-animation-shuttleRingG"),e.appendChild(a),c.appendChild(b),c.appendChild(g),c.appendChild(f),b.appendChild(h),b.appendChild(_),b.appendChild(this._shuttleRingPointer),g.appendChild(this._knobOuter),g.appendChild(v),g.appendChild(this._knobDate),g.appendChild(this._knobTime),g.appendChild(this._knobStatus),g.appendChild(y),r.appendChild(c),e.appendChild(r);var w=this;function O(e){!function(e,t){var i=e._viewModel,n=i.shuttleRingDragging;if(!n||yC===e)if("mousedown"===t.type||n&&"mousemove"===t.type||"touchstart"===t.type&&1===t.touches.length||n&&"touchmove"===t.type&&1===t.touches.length){var a,r,o=e._centerX,s=e._centerY,l=e._svgNode.getBoundingClientRect();if("touchstart"===t.type||"touchmove"===t.type?(a=t.touches[0].clientX,r=t.touches[0].clientY):(a=t.clientX,r=t.clientY),!n&&(a>l.right||al.bottom))return;var u=e._shuttleRingPointer.getBoundingClientRect(),d=a-o-l.left,c=r-s-l.top,f=180*Math.atan2(c,d)/Math.PI+90;f>180&&(f-=360);var h=i.shuttleRingAngle;n||au.left&&r>u.top&&rh&&i.faster(),t.preventDefault()}else e===yC&&(yC=void 0),i.shuttleRingDragging=!1}(w,e)}this._mouseCallback=O,h.addEventListener("mousedown",O,!0),h.addEventListener("touchstart",O,!0),_.addEventListener("mousedown",O,!0),_.addEventListener("touchstart",O,!0),i.addEventListener("mousemove",O,!0),i.addEventListener("touchmove",O,!0),i.addEventListener("mouseup",O,!0),i.addEventListener("touchend",O,!0),i.addEventListener("touchcancel",O,!0),this._shuttleRingPointer.addEventListener("mousedown",O,!0),this._shuttleRingPointer.addEventListener("touchstart",O,!0),this._knobOuter.addEventListener("mousedown",O,!0),this._knobOuter.addEventListener("touchstart",O,!0);var x,A=this._knobTime.childNodes[0],T=this._knobDate.childNodes[0],E=this._knobStatus.childNodes[0];this._subscriptions=[dE(t.pauseViewModel,"toggled",(function(e){x!==e&&((x=e)?w._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPausePointer"):w._shuttleRingPointer.setAttribute("class","cesium-animation-shuttleRingPointer"))})),dE(t,"shuttleRingAngle",(function(e){var t,i,n;t=w._shuttleRingPointer,i=w._knobOuter,n=e,t.setAttribute("transform","translate(100,100) rotate("+n+")"),i.setAttribute("transform","rotate("+n+")")})),dE(t,"dateLabel",(function(e){T.textContent!==e&&(T.textContent=e)})),dE(t,"timeLabel",(function(e){A.textContent!==e&&(A.textContent=e)})),dE(t,"multiplierLabel",(function(e){E.textContent!==e&&(E.textContent=e)}))],this.applyThemeChanges(),this.resize()}nM.prototype.destroy=function(){this.svgElement.removeEventListener("click",this._clickFunction,!0);for(var e=this._subscriptions,t=0,i=e.length;ta?e=a:e<-a&&(e=-a),e>0?(n=(Math.log(a)-0)/90,(Math.log(e)-0)/n+15):(n=(Math.log(-t[0])-0)/90,-((Math.log(Math.abs(e))-0)/n+15))}(e.multiplier,t._allShuttleRingTicks,e)},set:function(e){e=Math.max(Math.min(e,105),-105);var i=t._allShuttleRingTicks,n=t._clockViewModel;if(n.clockStep=wt.a.SYSTEM_CLOCK_MULTIPLIER,105!==Math.abs(e)){var a=function(e,t){return Math.abs(e)<=15?e/15:e>0?(i=(Math.log(t[t.length-1])-0)/90,Math.exp(0+i*(e-15))):(i=(Math.log(-t[0])-0)/90,-Math.exp(0+i*(Math.abs(e)-15)));var i}(e,i);if(t.snapToTicks)a=i[lM(a,i)];else if(0!==a){var r=Math.abs(a);if(r>100){var o=r.toFixed(0).length-2,s=Math.pow(10,o);a=Math.round(a/s)*s|0}else r>15?a=Math.round(a):r>1?a=+a.toFixed(1):r>0&&(a=+a.toFixed(2))}n.multiplier=a}else n.multiplier=e>0?i[i.length-1]:i[0]}}),this._canAnimate=void 0,UA.defineProperty(this,"_canAnimate",(function(){var e=t._clockViewModel,i=e.clockRange;if(t.shuttleRingDragging||i===bt.default.UNBOUNDED)return!0;var n=e.multiplier,a=e.currentTime,r=e.startTime,o=!1;if(i===bt.default.LOOP_STOP)o=ln.default.greaterThan(a,r)||a.equals(r)&&n>0;else{var s=e.stopTime;o=ln.default.greaterThan(a,r)&&ln.default.lessThan(a,s)||a.equals(r)&&n>0||a.equals(s)&&n<0}return o||(e.shouldAnimate=!1),o})),this._isSystemTimeAvailable=void 0,UA.defineProperty(this,"_isSystemTimeAvailable",(function(){var e=t._clockViewModel;if(e.clockRange===bt.default.UNBOUNDED)return!0;var i=e.systemTime;return ln.default.greaterThanOrEquals(i,e.startTime)&&ln.default.lessThanOrEquals(i,e.stopTime)})),this._isAnimating=void 0,UA.defineProperty(this,"_isAnimating",(function(){return t._clockViewModel.shouldAnimate&&(t._canAnimate||t.shuttleRingDragging)}));var i=uE((function(){var e=t._clockViewModel;e.shouldAnimate?e.shouldAnimate=!1:t._canAnimate&&(e.shouldAnimate=!0)}));this._pauseViewModel=new lE(i,{toggled:UA.computed((function(){return!t._isAnimating})),tooltip:"Pause"});var n=uE((function(){var e=t._clockViewModel,i=e.multiplier;i>0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playReverseViewModel=new lE(n,{toggled:UA.computed((function(){return t._isAnimating&&e.multiplier<0})),tooltip:"Play Reverse"});var a=uE((function(){var e=t._clockViewModel,i=e.multiplier;i<0&&(e.multiplier=-i),e.shouldAnimate=!0}));this._playForwardViewModel=new lE(a,{toggled:UA.computed((function(){return t._isAnimating&&e.multiplier>0&&e.clockStep!==wt.a.SYSTEM_CLOCK})),tooltip:"Play Forward"});var r=uE((function(){t._clockViewModel.clockStep=wt.a.SYSTEM_CLOCK}),UA.getObservable(this,"_isSystemTimeAvailable"));this._playRealtimeViewModel=new lE(r,{toggled:UA.computed((function(){return e.clockStep===wt.a.SYSTEM_CLOCK})),tooltip:UA.computed((function(){return t._isSystemTimeAvailable?"Today (real-time)":"Current time not in range"}))}),this._slower=uE((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=lM(e.multiplier,i)-1;n>=0&&(e.multiplier=i[n])})),this._faster=uE((function(){var e=t._clockViewModel,i=t._allShuttleRingTicks,n=lM(e.multiplier,i)+1;n=0;--t)0!==(n=r[t])&&o.push(-n);Array.prototype.push.apply(o,r),this._allShuttleRingTicks=o},Object.defineProperties(uM.prototype,{slower:{get:function(){return this._slower}},faster:{get:function(){return this._faster}},clockViewModel:{get:function(){return this._clockViewModel}},pauseViewModel:{get:function(){return this._pauseViewModel}},playReverseViewModel:{get:function(){return this._playReverseViewModel}},playForwardViewModel:{get:function(){return this._playForwardViewModel}},playRealtimeViewModel:{get:function(){return this._playRealtimeViewModel}},dateFormatter:{get:function(){return this._dateFormatter},set:function(e){if("function"!=typeof e)throw new u.default("dateFormatter must be a function");this._dateFormatter=e}},timeFormatter:{get:function(){return this._timeFormatter},set:function(e){if("function"!=typeof e)throw new u.default("timeFormatter must be a function");this._timeFormatter=e}}}),uM._maxShuttleRingAngle=105,uM._realtimeShuttleRingAngle=15;var dM=uM;function cM(e){var t=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).globe,i=Object(s.default)(e.imageryProviderViewModels,[]),n=Object(s.default)(e.terrainProviderViewModels,[]);if(!Object(l.default)(t))throw new u.default("globe is required");this._globe=t,this.imageryProviderViewModels=i.slice(0),this.terrainProviderViewModels=n.slice(0),this.dropDownVisible=!1,UA.track(this,["imageryProviderViewModels","terrainProviderViewModels","dropDownVisible"]);var a=UA.getObservable(this,"imageryProviderViewModels"),r=UA.pureComputed((function(){var e,t=a(),i={};for(e=0;e=0;t--)a.addImageryProvider(d[t],0);this._currentImageryProviders=d.slice(0)}else if(this._currentImageryProviders=[d],r)a.addImageryProvider(d,0);else{var f=a.get(0);Object(l.default)(f)&&a.remove(f),a.addImageryProvider(d,0)}}c(e),this.dropDownVisible=!1}else this.dropDownVisible=!1}}),this.selectedTerrain=void 0;var f=UA.observable();UA.defineProperty(this,"selectedTerrain",{get:function(){return f()},set:function(e){var t;f()!==e?(Object(l.default)(e)&&(t=e.creationCommand()),this._globe.depthTestAgainstTerrain=!(t instanceof si.default),this._globe.terrainProvider=t,f(e),this.dropDownVisible=!1):this.dropDownVisible=!1}});var h=this;this._toggleDropDown=uE((function(){h.dropDownVisible=!h.dropDownVisible})),this.selectedImagery=Object(s.default)(e.selectedImageryProviderViewModel,i[0]),this.selectedTerrain=Object(s.default)(e.selectedTerrainProviderViewModel,n[0])}Object.defineProperties(cM.prototype,{toggleDropDown:{get:function(){return this._toggleDropDown}},globe:{get:function(){return this._globe}}});var fM=cM;function hM(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");e=Object(ff.a)(e);var i=new fM(t),n=document.createElement("button");n.type="button",n.className="cesium-button cesium-toolbar-button",n.setAttribute("data-bind","attr: { title: buttonTooltip },click: toggleDropDown"),e.appendChild(n);var a=document.createElement("img");a.setAttribute("draggable","false"),a.className="cesium-baseLayerPicker-selected",a.setAttribute("data-bind","attr: { src: buttonImageUrl }, visible: !!buttonImageUrl"),n.appendChild(a);var r=document.createElement("div");r.className="cesium-baseLayerPicker-dropDown",r.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-dropDown-visible" : dropDownVisible }'),e.appendChild(r);var o=document.createElement("div");o.className="cesium-baseLayerPicker-sectionTitle",o.setAttribute("data-bind","visible: imageryProviderViewModels.length > 0"),o.innerHTML="Imagery",r.appendChild(o);var s=document.createElement("div");s.className="cesium-baseLayerPicker-section",s.setAttribute("data-bind","foreach: _imageryProviders"),r.appendChild(s);var d=document.createElement("div");d.className="cesium-baseLayerPicker-category",s.appendChild(d);var c=document.createElement("div");c.className="cesium-baseLayerPicker-categoryTitle",c.setAttribute("data-bind","text: name"),d.appendChild(c);var f=document.createElement("div");f.className="cesium-baseLayerPicker-choices",f.setAttribute("data-bind","foreach: providers"),d.appendChild(f);var h=document.createElement("div");h.className="cesium-baseLayerPicker-item",h.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedImagery },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedImagery = $data; }'),f.appendChild(h);var p=document.createElement("img");p.className="cesium-baseLayerPicker-itemIcon",p.setAttribute("data-bind","attr: { src: iconUrl }"),p.setAttribute("draggable","false"),h.appendChild(p);var m=document.createElement("div");m.className="cesium-baseLayerPicker-itemLabel",m.setAttribute("data-bind","text: name"),h.appendChild(m);var _=document.createElement("div");_.className="cesium-baseLayerPicker-sectionTitle",_.setAttribute("data-bind","visible: terrainProviderViewModels.length > 0"),_.innerHTML="Terrain",r.appendChild(_);var g=document.createElement("div");g.className="cesium-baseLayerPicker-section",g.setAttribute("data-bind","foreach: _terrainProviders"),r.appendChild(g);var v=document.createElement("div");v.className="cesium-baseLayerPicker-category",g.appendChild(v);var y=document.createElement("div");y.className="cesium-baseLayerPicker-categoryTitle",y.setAttribute("data-bind","text: name"),v.appendChild(y);var b=document.createElement("div");b.className="cesium-baseLayerPicker-choices",b.setAttribute("data-bind","foreach: providers"),v.appendChild(b);var w=document.createElement("div");w.className="cesium-baseLayerPicker-item",w.setAttribute("data-bind",'css: { "cesium-baseLayerPicker-selectedItem" : $data === $parents[1].selectedTerrain },attr: { title: tooltip },visible: creationCommand.canExecute,click: function($data) { $parents[1].selectedTerrain = $data; }'),b.appendChild(w);var O=document.createElement("img");O.className="cesium-baseLayerPicker-itemIcon",O.setAttribute("data-bind","attr: { src: iconUrl }"),O.setAttribute("draggable","false"),w.appendChild(O);var x=document.createElement("div");x.className="cesium-baseLayerPicker-itemLabel",x.setAttribute("data-bind","text: name"),w.appendChild(x),UA.applyBindings(i,n),UA.applyBindings(i,r),this._viewModel=i,this._container=e,this._element=n,this._dropPanel=r,this._closeDropDown=function(e){n.contains(e.target)||r.contains(e.target)||(i.dropDownVisible=!1)},hi.a.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(hM.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),hM.prototype.isDestroyed=function(){return!1},hM.prototype.destroy=function(){return hi.a.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),UA.cleanNode(this._element),UA.cleanNode(this._dropPanel),this._container.removeChild(this._element),this._container.removeChild(this._dropPanel),Object(Lr.default)(this)};var pM=hM;function mM(e){if(!Object(l.default)(e.name))throw new u.default("options.name is required.");if(!Object(l.default)(e.tooltip))throw new u.default("options.tooltip is required.");if(!Object(l.default)(e.iconUrl))throw new u.default("options.iconUrl is required.");if("function"!=typeof e.creationFunction)throw new u.default("options.creationFunction is required.");var t=e.creationFunction;Object(l.default)(t.canExecute)||(t=uE(t)),this._creationCommand=t,this.name=e.name,this.tooltip=e.tooltip,this.iconUrl=e.iconUrl,this._category=Object(s.default)(e.category,""),UA.track(this,["name","tooltip","iconUrl"])}Object.defineProperties(mM.prototype,{creationCommand:{get:function(){return this._creationCommand}},category:{get:function(){return this._category}}});var _M=mM;var gM=function(){var e=[];return e.push(new _M({name:"Bing Maps Aerial",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/bingAerial.png"),tooltip:"Bing Maps aerial imagery, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Object(xx.a)({style:Iy.a.AERIAL})}})),e.push(new _M({name:"Bing Maps Aerial with Labels",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/bingAerialLabels.png"),tooltip:"Bing Maps aerial imagery with labels, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Object(xx.a)({style:Iy.a.AERIAL_WITH_LABELS})}})),e.push(new _M({name:"Bing Maps Roads",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/bingRoads.png"),tooltip:"Bing Maps standard road maps, provided by Cesium ion",category:"Cesium ion",creationFunction:function(){return Object(xx.a)({style:Iy.a.ROAD})}})),e.push(new _M({name:"ESRI World Imagery",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/esriWorldImagery.png"),tooltip:"World Imagery provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide. The map includes NASA Blue Marble: Next Generation 500m resolution imagery at small scales (above 1:1,000,000), i-cubed 15m eSAT imagery at medium-to-large scales (down to 1:70,000) for the world, and USGS 15m Landsat imagery for Antarctica. The map features 0.3m resolution imagery in the continental United States and 0.6m resolution imagery in parts of Western Europe from DigitalGlobe. In other parts of the world, 1 meter resolution imagery is available from GeoEye IKONOS, i-cubed Nationwide Prime, Getmapping, AeroGRID, IGN Spain, and IGP Portugal. Additionally, imagery at different resolutions has been contributed by the GIS User Community.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new $m.a({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer",enablePickFeatures:!1})}})),e.push(new _M({name:"ESRI World Street Map",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/esriWorldStreetMap.png"),tooltip:"This worldwide street map presents highway-level data for the world. Street-level data includes the United States; much of Canada; Japan; most countries in Europe; Australia and New Zealand; India; parts of South America including Argentina, Brazil, Chile, Colombia, and Venezuela; Ghana; and parts of southern Africa including Botswana, Lesotho, Namibia, South Africa, and Swaziland.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new $m.a({url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer",enablePickFeatures:!1})}})),e.push(new _M({name:"ESRI National Geographic",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/esriNationalGeographic.png"),tooltip:"This web map contains the National Geographic World Map service. This map service is designed to be used as a general reference map for informational and educational purposes as well as a basemap by GIS professionals and other users for creating web maps and web mapping applications.\nhttp://www.esri.com",category:"Other",creationFunction:function(){return new $m.a({url:"https://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/",enablePickFeatures:!1})}})),e.push(new _M({name:"Open­Street­Map",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/openStreetMap.png"),tooltip:"OpenStreetMap (OSM) is a collaborative project to create a free editable map of the world.\nhttp://www.openstreetmap.org",category:"Other",creationFunction:function(){return new Db({url:"https://a.tile.openstreetmap.org/"})}})),e.push(new _M({name:"Stamen Watercolor",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/stamenWatercolor.png"),tooltip:"Reminiscent of hand drawn maps, Stamen watercolor maps apply raster effect area washes and organic edges over a paper texture to add warm pop to any map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new Db({url:"https://stamen-tiles.a.ssl.fastly.net/watercolor/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new _M({name:"Stamen Toner",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/stamenToner.png"),tooltip:"A high contrast black and white map.\nhttp://maps.stamen.com",category:"Other",creationFunction:function(){return new Db({url:"https://stamen-tiles.a.ssl.fastly.net/toner/",credit:"Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under CC BY SA."})}})),e.push(new _M({name:"Sentinel-2",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/sentinel-2.png"),tooltip:"Sentinel-2 cloudless by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2016 and 2017).",category:"Cesium ion",creationFunction:function(){return new Py.a({assetId:3954})}})),e.push(new _M({name:"Blue Marble",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/blueMarble.png"),tooltip:"Blue Marble Next Generation July, 2004 imagery from NASA.",category:"Cesium ion",creationFunction:function(){return new Py.a({assetId:3845})}})),e.push(new _M({name:"Earth at night",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/earthAtNight.png"),tooltip:"The Earth at night, also known as The Black Marble, is a 500 meter resolution global composite imagery layer released by NASA.",category:"Cesium ion",creationFunction:function(){return new Py.a({assetId:3812})}})),e.push(new _M({name:"Natural Earth II",iconUrl:Object(Ii.a)("Widgets/Images/ImageryProviders/naturalEarthII.png"),tooltip:"Natural Earth II, darkened for contrast.\nhttp://www.naturalearthdata.com/",category:"Cesium ion",creationFunction:function(){return new gO.a({url:Object(Ii.a)("Assets/Textures/NaturalEarthII")})}})),e};var vM=function(){var e=[];return e.push(new _M({name:"WGS84 Ellipsoid",iconUrl:Object(Ii.a)("Widgets/Images/TerrainProviders/Ellipsoid.png"),tooltip:"WGS84 standard ellipsoid, also known as EPSG:4326",category:"Cesium ion",creationFunction:function(){return new si.default}})),e.push(new _M({name:"Cesium World Terrain",iconUrl:Object(Ii.a)("Widgets/Images/TerrainProviders/CesiumWorldTerrain.png"),tooltip:"High-resolution global terrain tileset curated from several datasources and hosted by Cesium ion",category:"Cesium ion",creationFunction:function(){return eo({requestWaterMask:!0,requestVertexNormals:!0})}})),e};function yM(e,t){t?e._eventHandler.setInputAction((function(t){var i=e._scene.pick(t.endPosition);Object(l.default)(i)&&i.primitive instanceof Z_.a&&(e.tileset=i.primitive)}),Qa.default.MOUSE_MOVE):(e._eventHandler.removeInputAction(Qa.default.MOUSE_MOVE),e.picking=e.picking)}var bM={maximumFractionDigits:3};function wM(e){var t=e/1048576;return t<1?t.toLocaleString(void 0,bM):Math.round(t).toLocaleString()}function OM(e,t){if(!Object(l.default)(e))return"";var i=t?e._statisticsPerPass[F_.a.PICK]:e._statisticsPerPass[F_.a.RENDER],n='
    ';return n+="
  • Visited: "+i.visited.toLocaleString()+"
  • Selected: "+i.selected.toLocaleString()+"
  • Commands: "+i.numberOfCommands.toLocaleString()+"
  • ",n+="
",t||(n+='
    ',n+="
  • Requests: "+i.numberOfPendingRequests.toLocaleString()+"
  • Attempted: "+i.numberOfAttemptedRequests.toLocaleString()+"
  • Processing: "+i.numberOfTilesProcessing.toLocaleString()+"
  • Content Ready: "+i.numberOfTilesWithContentReady.toLocaleString()+"
  • Total: "+i.numberOfTilesTotal.toLocaleString()+"
  • ",n+="
",n+='
    ',n+="
  • Features Selected: "+i.numberOfFeaturesSelected.toLocaleString()+"
  • Features Loaded: "+i.numberOfFeaturesLoaded.toLocaleString()+"
  • Points Selected: "+i.numberOfPointsSelected.toLocaleString()+"
  • Points Loaded: "+i.numberOfPointsLoaded.toLocaleString()+"
  • Triangles Selected: "+i.numberOfTrianglesSelected.toLocaleString()+"
  • ",n+="
",n+='
    ',n+="
  • Tiles styled: "+i.numberOfTilesStyled.toLocaleString()+"
  • Features styled: "+i.numberOfFeaturesStyled.toLocaleString()+"
  • ",n+="
",n+='
    ',n+="
  • Children Union Culled: "+i.numberOfTilesCulledWithChildrenUnion.toLocaleString()+"
  • ",n+="
",n+='
    ',n+="
  • Geometry Memory (MB): "+wM(i.geometryByteLength)+"
  • Texture Memory (MB): "+wM(i.texturesByteLength)+"
  • Batch Table Memory (MB): "+wM(i.batchTableByteLength)+"
  • ",n+="
"),n}var xM=[{text:"Highlight",value:S_.a.HIGHLIGHT},{text:"Replace",value:S_.a.REPLACE},{text:"Mix",value:S_.a.MIX}],AM=new Ot.default(1,1,0,.4),TM=new Ot.default,EM=new Ot.default;function CM(e,t){$.a.typeOf.object("scene",e),$.a.typeOf.object("performanceContainer",t);var i=this,n=e.canvas;this._eventHandler=new Za.default(n),this._scene=e,this._performanceContainer=t,this._canvas=n,this._performanceDisplay=new Jb.a({container:t}),this._statisticsText="",this._pickStatisticsText="",this._editorError="",this.performance=!1,this.showStatistics=!0,this.showPickStatistics=!0,this.inspectorVisible=!0,this.tilesetVisible=!1,this.displayVisible=!1,this.updateVisible=!1,this.loggingVisible=!1,this.styleVisible=!1,this.tileDebugLabelsVisible=!1,this.optimizationVisible=!1,this.styleString="{}",this._tileset=void 0,this._feature=void 0,this._tile=void 0,UA.track(this,["performance","inspectorVisible","_statisticsText","_pickStatisticsText","_editorError","showPickStatistics","showStatistics","tilesetVisible","displayVisible","updateVisible","loggingVisible","styleVisible","optimizationVisible","tileDebugLabelsVisible","styleString","_feature","_tile"]),this._properties=UA.observable({}),this.properties=[],UA.defineProperty(this,"properties",(function(){var e=[],t=i._properties();for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}));var a=UA.observable();UA.defineProperty(this,"dynamicScreenSpaceError",{get:function(){return a()},set:function(e){a(e),Object(l.default)(i._tileset)&&(i._tileset.dynamicScreenSpaceError=e)}}),this.dynamicScreenSpaceError=!1;var r=UA.observable();UA.defineProperty(this,"colorBlendMode",{get:function(){return r()},set:function(e){r(e),Object(l.default)(i._tileset)&&(i._tileset.colorBlendMode=e,i._scene.requestRender())}}),this.colorBlendMode=S_.a.HIGHLIGHT;var o=UA.observable(),s=UA.observable();UA.defineProperty(this,"picking",{get:function(){return s()},set:function(t){s(t),t?i._eventHandler.setInputAction((function(t){var n=e.pick(t.endPosition);if(n instanceof j_.a?(i.feature=n,i.tile=n.content.tile):Object(l.default)(n)&&Object(l.default)(n.content)?(i.feature=void 0,i.tile=n.content.tile):(i.feature=void 0,i.tile=void 0),Object(l.default)(i._tileset)){var a;if(o&&Object(l.default)(n)&&Object(l.default)(n.content))e.pickPositionSupported&&(a=e.pickPosition(t.endPosition),Object(l.default)(a)&&(i._tileset.debugPickPosition=a)),i._tileset.debugPickedTile=n.content.tile;else i._tileset.debugPickedTile=void 0;i._scene.requestRender()}}),Qa.default.MOUSE_MOVE):(i.feature=void 0,i.tile=void 0,i._eventHandler.removeInputAction(Qa.default.MOUSE_MOVE))}}),this.picking=!0;var u=UA.observable();UA.defineProperty(this,"colorize",{get:function(){return u()},set:function(e){u(e),Object(l.default)(i._tileset)&&(i._tileset.debugColorizeTiles=e,i._scene.requestRender())}}),this.colorize=!1;var d=UA.observable();UA.defineProperty(this,"wireframe",{get:function(){return d()},set:function(e){d(e),Object(l.default)(i._tileset)&&(i._tileset.debugWireframe=e,i._scene.requestRender())}}),this.wireframe=!1;var c=UA.observable();UA.defineProperty(this,"showBoundingVolumes",{get:function(){return c()},set:function(e){c(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowBoundingVolume=e,i._scene.requestRender())}}),this.showBoundingVolumes=!1;var f=UA.observable();UA.defineProperty(this,"showContentBoundingVolumes",{get:function(){return f()},set:function(e){f(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowContentBoundingVolume=e,i._scene.requestRender())}}),this.showContentBoundingVolumes=!1;var h=UA.observable();UA.defineProperty(this,"showRequestVolumes",{get:function(){return h()},set:function(e){h(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowViewerRequestVolume=e,i._scene.requestRender())}}),this.showRequestVolumes=!1;var p=UA.observable();UA.defineProperty(this,"freezeFrame",{get:function(){return p()},set:function(e){p(e),Object(l.default)(i._tileset)&&(i._tileset.debugFreezeFrame=e,i._scene.debugShowFrustumPlanes=e,i._scene.requestRender())}}),this.freezeFrame=!1,UA.defineProperty(this,"showOnlyPickedTileDebugLabel",{get:function(){return o()},set:function(e){o(e),Object(l.default)(i._tileset)&&(i._tileset.debugPickedTileLabelOnly=e,i._scene.requestRender())}}),this.showOnlyPickedTileDebugLabel=!1;var m=UA.observable();UA.defineProperty(this,"showGeometricError",{get:function(){return m()},set:function(e){m(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowGeometricError=e,i._scene.requestRender())}}),this.showGeometricError=!1;var _=UA.observable();UA.defineProperty(this,"showRenderingStatistics",{get:function(){return _()},set:function(e){_(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowRenderingStatistics=e,i._scene.requestRender())}}),this.showRenderingStatistics=!1;var g=UA.observable();UA.defineProperty(this,"showMemoryUsage",{get:function(){return g()},set:function(e){g(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowMemoryUsage=e,i._scene.requestRender())}}),this.showMemoryUsage=!1;var v=UA.observable();UA.defineProperty(this,"showUrl",{get:function(){return v()},set:function(e){v(e),Object(l.default)(i._tileset)&&(i._tileset.debugShowUrl=e,i._scene.requestRender())}}),this.showUrl=!1;var y=UA.observable();UA.defineProperty(this,"maximumScreenSpaceError",{get:function(){return y()},set:function(e){e=Number(e),isNaN(e)||(y(e),Object(l.default)(i._tileset)&&(i._tileset.maximumScreenSpaceError=e))}}),this.maximumScreenSpaceError=16;var b=UA.observable();UA.defineProperty(this,"dynamicScreenSpaceErrorDensity",{get:function(){return b()},set:function(e){e=Number(e),isNaN(e)||(b(e),Object(l.default)(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorDensity=e))}}),this.dynamicScreenSpaceErrorDensity=.00278,this.dynamicScreenSpaceErrorDensitySliderValue=void 0,UA.defineProperty(this,"dynamicScreenSpaceErrorDensitySliderValue",{get:function(){return Math.pow(b(),1/6)},set:function(e){b(Math.pow(e,6))}});var w=UA.observable();UA.defineProperty(this,"dynamicScreenSpaceErrorFactor",{get:function(){return w()},set:function(e){e=Number(e),isNaN(e)||(w(e),Object(l.default)(i._tileset)&&(i._tileset.dynamicScreenSpaceErrorFactor=e))}}),this.dynamicScreenSpaceErrorFactor=4;var O,x=(O=this,function(e){var t=O._scene.pick(e.position);Object(l.default)(t)&&t.primitive instanceof Z_.a&&(O.tileset=t.primitive),O.pickActive=!1}),A=UA.observable();UA.defineProperty(this,"pickActive",{get:function(){return A()},set:function(e){A(e),e?i._eventHandler.setInputAction(x,Qa.default.LEFT_CLICK):i._eventHandler.removeInputAction(Qa.default.LEFT_CLICK)}});var T=UA.observable();UA.defineProperty(this,"pointCloudShading",{get:function(){return T()},set:function(e){T(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.attenuation=e)}}),this.pointCloudShading=!1;var E=UA.observable();UA.defineProperty(this,"geometricErrorScale",{get:function(){return E()},set:function(e){e=Number(e),isNaN(e)||(E(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.geometricErrorScale=e))}}),this.geometricErrorScale=1;var C=UA.observable();UA.defineProperty(this,"maximumAttenuation",{get:function(){return C()},set:function(e){e=Number(e),isNaN(e)||(C(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.maximumAttenuation=0===e?void 0:e))}}),this.maximumAttenuation=0;var S=UA.observable();UA.defineProperty(this,"baseResolution",{get:function(){return S()},set:function(e){e=Number(e),isNaN(e)||(S(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.baseResolution=0===e?void 0:e))}}),this.baseResolution=0;var M=UA.observable();UA.defineProperty(this,"eyeDomeLighting",{get:function(){return M()},set:function(e){M(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLighting=e)}}),this.eyeDomeLighting=!1;var D=UA.observable();UA.defineProperty(this,"eyeDomeLightingStrength",{get:function(){return D()},set:function(e){e=Number(e),isNaN(e)||(D(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingStrength=e))}}),this.eyeDomeLightingStrength=1;var P=UA.observable();UA.defineProperty(this,"eyeDomeLightingRadius",{get:function(){return P()},set:function(e){e=Number(e),isNaN(e)||(P(e),Object(l.default)(i._tileset)&&(i._tileset.pointCloudShading.eyeDomeLightingRadius=e))}}),this.eyeDomeLightingRadius=1,this.pickActive=!1;var I=UA.observable();UA.defineProperty(this,"skipLevelOfDetail",{get:function(){return I()},set:function(e){I(e),Object(l.default)(i._tileset)&&(i._tileset.skipLevelOfDetail=e)}}),this.skipLevelOfDetail=!0;var L=UA.observable();UA.defineProperty(this,"skipScreenSpaceErrorFactor",{get:function(){return L()},set:function(e){e=Number(e),isNaN(e)||(L(e),Object(l.default)(i._tileset)&&(i._tileset.skipScreenSpaceErrorFactor=e))}}),this.skipScreenSpaceErrorFactor=16;var j=UA.observable();UA.defineProperty(this,"baseScreenSpaceError",{get:function(){return j()},set:function(e){e=Number(e),isNaN(e)||(j(e),Object(l.default)(i._tileset)&&(i._tileset.baseScreenSpaceError=e))}}),this.baseScreenSpaceError=1024;var R=UA.observable();UA.defineProperty(this,"skipLevels",{get:function(){return R()},set:function(e){e=Number(e),isNaN(e)||(R(e),Object(l.default)(i._tileset)&&(i._tileset.skipLevels=e))}}),this.skipLevels=1;var N=UA.observable();UA.defineProperty(this,"immediatelyLoadDesiredLevelOfDetail",{get:function(){return N()},set:function(e){N(e),Object(l.default)(i._tileset)&&(i._tileset.immediatelyLoadDesiredLevelOfDetail=e)}}),this.immediatelyLoadDesiredLevelOfDetail=!1;var B=UA.observable();UA.defineProperty(this,"loadSiblings",{get:function(){return B()},set:function(e){B(e),Object(l.default)(i._tileset)&&(i._tileset.loadSiblings=e)}}),this.loadSiblings=!1,this._style=void 0,this._shouldStyle=!1,this._definedProperties=["properties","dynamicScreenSpaceError","colorBlendMode","picking","colorize","wireframe","showBoundingVolumes","showContentBoundingVolumes","showRequestVolumes","freezeFrame","maximumScreenSpaceError","dynamicScreenSpaceErrorDensity","baseScreenSpaceError","skipScreenSpaceErrorFactor","skipLevelOfDetail","skipLevels","immediatelyLoadDesiredLevelOfDetail","loadSiblings","dynamicScreenSpaceErrorDensitySliderValue","dynamicScreenSpaceErrorFactor","pickActive","showOnlyPickedTileDebugLabel","showGeometricError","showRenderingStatistics","showMemoryUsage","showUrl","pointCloudShading","geometricErrorScale","maximumAttenuation","baseResolution","eyeDomeLighting","eyeDomeLightingStrength","eyeDomeLightingRadius"],this._removePostRenderEvent=e.postRender.addEventListener((function(){i._update()})),Object(l.default)(this._tileset)||yM(this,!0)}function SM(e){if(e.featuresLength>0)return!0;var t=e.innerContents;if(Object(l.default)(t)){for(var i=t.length,n=0;nMin: "+t.tileBoundingRegion.minimumHeight+" Max: "+t.tileBoundingRegion.maximumHeight:this.tileText+="
(Tile is not loaded)"}this._tile=e,this.showTileBoundingSphere(),this.doFilterTile()}else this.hasPickedTile=!1,this._tile=void 0}}}),BM.prototype._update=function(){this.frustums&&(this.frustumStatisticText=function(e){var t;if(Object(l.default)(e)){t="Command Statistics";var i=e.commandsInFrustums;for(var n in i)if(i.hasOwnProperty(n)){var a,r=parseInt(n,10);if(7===r)a="1, 2 and 3";else{for(var o=[],s=2;s>=0;s--){var u=Math.pow(2,s);r>=u&&(o.push(s+1),r-=u)}a=o.reverse().join(" and ")}t+="
    "+i[n]+" in frustum "+a}t+="
Total: "+e.totalCommands}return t}(this._scene.debugFrustumStatistics));var e=this._scene.numberOfFrustums;this._numberOfFrustums=e,this.depthFrustum=jM(1,e,this.depthFrustum),this.depthFrustumText=this.depthFrustum+" of "+e,this.performance&&this._performanceDisplay.update(),this.primitiveReferenceFrame&&(this._modelMatrixPrimitive.modelMatrix=this._primitive.modelMatrix),this.shaderCacheText="Cached shaders: "+this._scene.context.shaderCache.numberOfShaders},BM.prototype.isDestroyed=function(){return!1},BM.prototype.destroy=function(){return this._eventHandler.destroy(),this._removePostRenderEvent(),this._frustumsSubscription.dispose(),this._frustumPlanesSubscription.dispose(),this._performanceSubscription.dispose(),this._primitiveBoundingSphereSubscription.dispose(),this._primitiveReferenceFrameSubscription.dispose(),this._filterPrimitiveSubscription.dispose(),this._wireframeSubscription.dispose(),this._depthFrustumSubscription.dispose(),this._suspendUpdatesSubscription.dispose(),this._tileCoordinatesSubscription.dispose(),this._tileBoundingSphereSubscription.dispose(),this._filterTileSubscription.dispose(),this._pickPrimitiveActiveSubscription.dispose(),this._pickTileActiveSubscription.dispose(),Object(Lr.default)(this)};var FM=BM;function kM(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");if(!Object(l.default)(t))throw new u.default("scene is required.");e=Object(ff.a)(e);var i=document.createElement("div"),n=new FM(t,i);this._viewModel=n,this._container=e;var a=document.createElement("div");this._element=a;var r=document.createElement("div");r.textContent="Cesium Inspector",r.className="cesium-cesiumInspector-button",r.setAttribute("data-bind","click: toggleDropDown"),a.appendChild(r),a.className="cesium-cesiumInspector",a.setAttribute("data-bind",'css: { "cesium-cesiumInspector-visible" : dropDownVisible, "cesium-cesiumInspector-hidden" : !dropDownVisible }'),e.appendChild(this._element);var o=document.createElement("div");this._panel=o,o.className="cesium-cesiumInspector-dropDown",a.appendChild(o);var s=oE.createSection,d=oE.createCheckbox,c=s(o,"General","generalVisible","toggleGeneral"),f=d("Show Frustums","frustums"),h=document.createElement("div");h.className="cesium-cesiumInspector-frustumStatistics",h.setAttribute("data-bind","visible: frustums, html: frustumStatisticText"),f.appendChild(h),c.appendChild(f),c.appendChild(d("Show Frustum Planes","frustumPlanes")),c.appendChild(d("Performance Display","performance")),i.className="cesium-cesiumInspector-performanceDisplay",c.appendChild(i);var p=document.createElement("div");p.className="cesium-cesiumInspector-shaderCache",p.setAttribute("data-bind","html: shaderCacheText"),c.appendChild(p);var m=document.createElement("div");c.appendChild(m);var _=document.createElement("span");_.setAttribute("data-bind",'html: "     Frustum:"'),m.appendChild(_);var g=document.createElement("span");g.setAttribute("data-bind","text: depthFrustumText"),m.appendChild(g);var v=document.createElement("input");v.type="button",v.value="-",v.className="cesium-cesiumInspector-pickButton",v.setAttribute("data-bind","click: decrementDepthFrustum"),m.appendChild(v);var y=document.createElement("input");y.type="button",y.value="+",y.className="cesium-cesiumInspector-pickButton",y.setAttribute("data-bind","click: incrementDepthFrustum"),m.appendChild(y);var b=s(o,"Primitives","primitivesVisible","togglePrimitives"),w=document.createElement("div");w.className="cesium-cesiumInspector-pickSection",b.appendChild(w);var O=document.createElement("input");O.type="button",O.value="Pick a primitive",O.className="cesium-cesiumInspector-pickButton",O.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickPrimitiveActive}, click: pickPrimitive');var x=document.createElement("div");x.className="cesium-cesiumInspector-center",x.appendChild(O),w.appendChild(x),w.appendChild(d("Show bounding sphere","primitiveBoundingSphere","hasPickedPrimitive")),w.appendChild(d("Show reference frame","primitiveReferenceFrame","hasPickedPrimitive")),this._primitiveOnly=d("Show only selected","filterPrimitive","hasPickedPrimitive"),w.appendChild(this._primitiveOnly);var A=s(o,"Terrain","terrainVisible","toggleTerrain"),T=document.createElement("div");T.className="cesium-cesiumInspector-pickSection",A.appendChild(T);var E=document.createElement("input");E.type="button",E.value="Pick a tile",E.className="cesium-cesiumInspector-pickButton",E.setAttribute("data-bind",'css: {"cesium-cesiumInspector-pickButtonHighlight" : pickTileActive}, click: pickTile'),(x=document.createElement("div")).appendChild(E),x.className="cesium-cesiumInspector-center",T.appendChild(x);var C=document.createElement("div");T.appendChild(C);var S=document.createElement("input");S.type="button",S.value="Parent",S.className="cesium-cesiumInspector-pickButton",S.setAttribute("data-bind","click: selectParent");var M=document.createElement("input");M.type="button",M.value="NW",M.className="cesium-cesiumInspector-pickButton",M.setAttribute("data-bind","click: selectNW");var D=document.createElement("input");D.type="button",D.value="NE",D.className="cesium-cesiumInspector-pickButton",D.setAttribute("data-bind","click: selectNE");var P=document.createElement("input");P.type="button",P.value="SW",P.className="cesium-cesiumInspector-pickButton",P.setAttribute("data-bind","click: selectSW");var I=document.createElement("input");I.type="button",I.value="SE",I.className="cesium-cesiumInspector-pickButton",I.setAttribute("data-bind","click: selectSE");var L=document.createElement("div");L.className="cesium-cesiumInspector-tileText",C.className="cesium-cesiumInspector-frustumStatistics",C.appendChild(L),C.setAttribute("data-bind","visible: hasPickedTile"),L.setAttribute("data-bind","html: tileText");var j=document.createElement("div");j.className="cesium-cesiumInspector-relativeText",j.textContent="Select relative:",C.appendChild(j);var R=document.createElement("table"),N=document.createElement("tr"),B=document.createElement("tr"),F=document.createElement("td");F.appendChild(S);var k=document.createElement("td");k.appendChild(M);var z=document.createElement("td");z.appendChild(D),N.appendChild(F),N.appendChild(k),N.appendChild(z);var U=document.createElement("td"),V=document.createElement("td");V.appendChild(P);var H=document.createElement("td");H.appendChild(I),B.appendChild(U),B.appendChild(V),B.appendChild(H),R.appendChild(N),R.appendChild(B),C.appendChild(R),T.appendChild(d("Show bounding volume","tileBoundingSphere","hasPickedTile")),T.appendChild(d("Show only selected","filterTile","hasPickedTile")),A.appendChild(d("Wireframe","wireframe")),A.appendChild(d("Suspend LOD update","suspendUpdates")),A.appendChild(d("Show tile coordinates","tileCoordinates")),UA.applyBindings(n,this._element)}Object.defineProperties(kM.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),kM.prototype.isDestroyed=function(){return!1},kM.prototype.destroy=function(){return UA.cleanNode(this._element),this._container.removeChild(this._element),this.viewModel.destroy(),Object(Lr.default)(this)};var zM=kM,UM=i(494);function VM(e,t){Object(l.default)(t)||(t=document.body),t=Object(ff.a)(t);var i=this,n=UA.observable(_i.a.fullscreen),a=UA.observable(_i.a.enabled),r=t.ownerDocument;this.isFullscreen=void 0,UA.defineProperty(this,"isFullscreen",{get:function(){return n()}}),this.isFullscreenEnabled=void 0,UA.defineProperty(this,"isFullscreenEnabled",{get:function(){return a()},set:function(e){a(e&&_i.a.enabled)}}),this.tooltip=void 0,UA.defineProperty(this,"tooltip",(function(){return this.isFullscreenEnabled?n()?"Exit full screen":"Full screen":"Full screen unavailable"})),this._command=uE((function(){_i.a.fullscreen?_i.a.exitFullscreen():_i.a.requestFullscreen(i._fullscreenElement)}),UA.getObservable(this,"isFullscreenEnabled")),this._fullscreenElement=Object(s.default)(Object(ff.a)(e),r.body),this._callback=function(){n(_i.a.fullscreen)},r.addEventListener(_i.a.changeEventName,this._callback)}Object.defineProperties(VM.prototype,{fullscreenElement:{get:function(){return this._fullscreenElement},set:function(e){if(!(e instanceof Element))throw new u.default("value must be a valid Element.");this._fullscreenElement=e}},command:{get:function(){return this._command}}}),VM.prototype.isDestroyed=function(){return!1},VM.prototype.destroy=function(){document.removeEventListener(_i.a.changeEventName,this._callback),Object(Lr.default)(this)};var HM=VM;function GM(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");e=Object(ff.a)(e);var i=new HM(t,e);i._exitFullScreenPath="M 104.34375 17.5625 L 83.5 38.4375 L 83.40625 18.21875 L 76.125 25.5 L 76.09375 51.78125 L 102.3125 51.8125 L 102.3125 51.78125 L 109.625 44.5 L 89.1875 44.40625 L 110.1875 23.40625 L 104.34375 17.5625 z M 23.75 17.59375 L 17.90625 23.4375 L 38.90625 44.4375 L 18.5 44.53125 L 25.78125 51.8125 L 52 51.78125 L 51.96875 25.53125 L 44.6875 18.25 L 44.625 38.46875 L 23.75 17.59375 z M 25.6875 76.03125 L 18.375 83.3125 L 38.78125 83.40625 L 17.8125 104.40625 L 23.625 110.25 L 44.5 89.375 L 44.59375 109.59375 L 51.875 102.3125 L 51.875 76.0625 L 25.6875 76.03125 z M 102.375 76.15625 L 76.15625 76.1875 L 76.1875 102.4375 L 83.46875 109.71875 L 83.5625 89.53125 L 104.40625 110.375 L 110.25 104.53125 L 89.25 83.53125 L 109.6875 83.46875 L 102.375 76.15625 z",i._enterFullScreenPath="M 83.96875 17.5625 L 83.96875 17.59375 L 76.65625 24.875 L 97.09375 24.96875 L 76.09375 45.96875 L 81.9375 51.8125 L 102.78125 30.9375 L 102.875 51.15625 L 110.15625 43.875 L 110.1875 17.59375 L 83.96875 17.5625 z M 44.125 17.59375 L 17.90625 17.625 L 17.9375 43.90625 L 25.21875 51.1875 L 25.3125 30.96875 L 46.15625 51.8125 L 52 45.96875 L 31 25 L 51.4375 24.90625 L 44.125 17.59375 z M 46.0625 76.03125 L 25.1875 96.875 L 25.09375 76.65625 L 17.8125 83.9375 L 17.8125 110.21875 L 44 110.25 L 51.3125 102.9375 L 30.90625 102.84375 L 51.875 81.875 L 46.0625 76.03125 z M 82 76.15625 L 76.15625 82 L 97.15625 103 L 76.71875 103.0625 L 84.03125 110.375 L 110.25 110.34375 L 110.21875 84.0625 L 102.9375 76.8125 L 102.84375 97 L 82 76.15625 z";var n=document.createElement("button");n.type="button",n.className="cesium-button cesium-fullscreenButton",n.setAttribute("data-bind","attr: { title: tooltip },click: command,enable: isFullscreenEnabled,cesiumSvgPath: { path: isFullscreen ? _exitFullScreenPath : _enterFullScreenPath, width: 128, height: 128 }"),e.appendChild(n),UA.applyBindings(i,n),this._container=e,this._viewModel=i,this._element=n}Object.defineProperties(GM.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),GM.prototype.isDestroyed=function(){return!1},GM.prototype.destroy=function(){return this._viewModel.destroy(),UA.cleanNode(this._element),this._container.removeChild(this._element),Object(Lr.default)(this)};var YM=GM;function WM(e){if(!Object(l.default)(e)||!Object(l.default)(e.scene))throw new u.default("options.scene is required.");Object(l.default)(e.geocoderServices)?this._geocoderServices=e.geocoderServices:this._geocoderServices=[new ue,new Un({scene:e.scene})],this._viewContainer=e.container,this._scene=e.scene,this._flightDuration=e.flightDuration,this._searchText="",this._isSearchInProgress=!1,this._geocodePromise=void 0,this._complete=new c.default,this._suggestions=[],this._selectedSuggestion=void 0,this._showSuggestions=!0,this._handleArrowDown=XM,this._handleArrowUp=qM;var t=this;this._suggestionsVisible=UA.pureComputed((function(){var e=UA.getObservable(t,"_suggestions")().length>0,i=UA.getObservable(t,"_showSuggestions")();return e&&i})),this._searchCommand=uE((function(e){if(e=Object(s.default)(e,gi.SEARCH),t._focusTextbox=!1,Object(l.default)(t._selectedSuggestion))return t.activateSuggestion(t._selectedSuggestion),!1;var i;t.hideSuggestions(),t.isSearchInProgress?((i=t)._isSearchInProgress=!1,Object(l.default)(i._geocodePromise)&&(i._geocodePromise.cancel=!0,i._geocodePromise=void 0)):function(e,t,i){var n=e._searchText;if(JM(n))return void e.showSuggestions();e._isSearchInProgress=!0;for(var r=a.a.resolve(),o=0;o0)return e._searchText=i[0].displayName,void e.destinationFound(e,i[0].destination);e._searchText=n+" (not found)"}}))}(t,t._geocoderServices,e)})),this.deselectSuggestion=function(){t._selectedSuggestion=void 0},this.handleKeyDown=function(e,t){var i="ArrowDown"===t.key||"Down"===t.key||40===t.keyCode,n="ArrowUp"===t.key||"Up"===t.key||38===t.keyCode;return(i||n)&&t.preventDefault(),!0},this.handleKeyUp=function(e,i){var n="ArrowDown"===i.key||"Down"===i.key||40===i.keyCode,a="ArrowUp"===i.key||"Up"===i.key||38===i.keyCode,r="Enter"===i.key||13===i.keyCode;return a?qM(t):n?XM(t):r&&t._searchCommand(),!0},this.activateSuggestion=function(e){t.hideSuggestions(),t._searchText=e.displayName;var i=e.destination;ZM(t),t.destinationFound(t,i)},this.hideSuggestions=function(){t._showSuggestions=!1,t._selectedSuggestion=void 0},this.showSuggestions=function(){t._showSuggestions=!0},this.handleMouseover=function(e,i){e!==t._selectedSuggestion&&(t._selectedSuggestion=e)},this.keepExpanded=!1,this.autoComplete=Object(s.default)(e.autocomplete,!0),this.destinationFound=Object(s.default)(e.destinationFound,WM.flyToDestination),this._focusTextbox=!1,UA.track(this,["_searchText","_isSearchInProgress","keepExpanded","_suggestions","_selectedSuggestion","_showSuggestions","_focusTextbox"]);var i=UA.getObservable(this,"_searchText");i.extend({rateLimit:{timeout:500}}),this._suggestionSubscription=i.subscribe((function(){WM._updateSearchSuggestions(t)})),this.isSearchInProgress=void 0,UA.defineProperty(this,"isSearchInProgress",{get:function(){return this._isSearchInProgress}}),this.searchText=void 0,UA.defineProperty(this,"searchText",{get:function(){return this.isSearchInProgress?"Searching...":this._searchText},set:function(e){if("string"!=typeof e)throw new u.default("value must be a valid string.");this._searchText=e}}),this.flightDuration=void 0,UA.defineProperty(this,"flightDuration",{get:function(){return this._flightDuration},set:function(e){if(Object(l.default)(e)&&e<0)throw new u.default("value must be positive.");this._flightDuration=e}})}function qM(e){if(0!==e._suggestions.length){var t,i=e._suggestions.indexOf(e._selectedSuggestion);-1!==i&&0!==i?(t=i-1,e._selectedSuggestion=e._suggestions[t],WM._adjustSuggestionsScroll(e,t)):e._selectedSuggestion=void 0}}function XM(e){if(0!==e._suggestions.length){var t=e._suggestions.length,i=(e._suggestions.indexOf(e._selectedSuggestion)+1)%t;e._selectedSuggestion=e._suggestions[i],WM._adjustSuggestionsScroll(e,i)}}function KM(e,t,i,n){return e.then((function(e){return Object(l.default)(e)&&"fulfilled"===e.state&&e.value.length>0?e:t.geocode(i,n).then((function(e){return{state:"fulfilled",value:e}})).otherwise((function(e){return{state:"rejected",reason:e}}))}))}function JM(e){return/^\s*$/.test(e)}function ZM(e){UA.getObservable(e,"_suggestions").removeAll()}Object.defineProperties(WM.prototype,{complete:{get:function(){return this._complete}},scene:{get:function(){return this._scene}},search:{get:function(){return this._searchCommand}},selectedSuggestion:{get:function(){return this._selectedSuggestion}},suggestions:{get:function(){return this._suggestions}}}),WM.prototype.destroy=function(){this._suggestionSubscription.dispose()},WM.flyToDestination=function(e,t){var i,n=e._scene,r=n.mapProjection.ellipsoid,o=n.camera,s=n.terrainProvider,u=t;t instanceof m.default?Re.default.equalsEpsilon(t.south,t.north,Re.default.EPSILON7)&&Re.default.equalsEpsilon(t.east,t.west,Re.default.EPSILON7)?t=m.default.center(t):i=sx(t,n):t=r.cartesianToCartographic(t),Object(l.default)(i)||(i=function(e,t){var i=Object(l.default)(t)?t.availability:void 0;return Object(l.default)(i)?Lo(t,[e]).then((function(t){return(e=t[0]).height+=1e3,e})):(e.height+=1e3,a.a.resolve(e))}(t,s)),i.then((function(e){u=r.cartographicToCartesian(e)})).always((function(){o.flyTo({destination:u,complete:function(){e._complete.raiseEvent()},duration:e._flightDuration,endTransform:ce.default.IDENTITY})}))},WM._updateSearchSuggestions=function(e){if(e.autoComplete){var t=e._searchText;if(ZM(e),!JM(t)){var i=a.a.resolve([]);e._geocoderServices.forEach((function(e){i=i.then((function(i){return i.length>=5?i:e.geocode(t,gi.AUTOCOMPLETE).then((function(e){return i=i.concat(e)}))}))})),i.then((function(t){for(var i=e._suggestions,n=0;nn.clientHeight?n.scrollTop=r+a.clientHeight:r 0 },hasFocus: _focusTextbox'),this._onTextBoxFocus=function(){setTimeout((function(){a.select()}),0)},a.addEventListener("focus",this._onTextBoxFocus,!1),n.appendChild(a),this._textBox=a;var r=document.createElement("span");r.className="cesium-geocoder-searchButton",r.setAttribute("data-bind","click: search,cesiumSvgPath: { path: isSearchInProgress ? _stopSearchPath : _startSearchPath, width: 32, height: 32 }"),n.appendChild(r),t.appendChild(n);var o=document.createElement("div");o.className="search-results",o.setAttribute("data-bind","visible: _suggestionsVisible");var s=document.createElement("ul");s.setAttribute("data-bind","foreach: _suggestions");var d=document.createElement("li");s.appendChild(d),d.setAttribute("data-bind","text: $data.displayName, click: $parent.activateSuggestion, event: { mouseover: $parent.handleMouseover}, css: { active: $data === $parent._selectedSuggestion }"),o.appendChild(s),t.appendChild(o),UA.applyBindings(i,n),UA.applyBindings(i,o),this._container=t,this._searchSuggestionsContainer=o,this._viewModel=i,this._form=n,this._onInputBegin=function(e){var n=e.target;"function"==typeof e.composedPath&&(n=e.composedPath()[0]),t.contains(n)||(i._focusTextbox=!1,i.hideSuggestions())},this._onInputEnd=function(e){i._focusTextbox=!0,i.showSuggestions()},hi.a.supportsPointerEvents()?(document.addEventListener("pointerdown",this._onInputBegin,!0),t.addEventListener("pointerup",this._onInputEnd,!0),t.addEventListener("pointercancel",this._onInputEnd,!0)):(document.addEventListener("mousedown",this._onInputBegin,!0),t.addEventListener("mouseup",this._onInputEnd,!0),document.addEventListener("touchstart",this._onInputBegin,!0),t.addEventListener("touchend",this._onInputEnd,!0),t.addEventListener("touchcancel",this._onInputEnd,!0))}Object.defineProperties($M.prototype,{container:{get:function(){return this._container}},searchSuggestionsContainer:{get:function(){return this._searchSuggestionsContainer}},viewModel:{get:function(){return this._viewModel}}}),$M.prototype.isDestroyed=function(){return!1},$M.prototype.destroy=function(){var e=this._container;return hi.a.supportsPointerEvents()?(document.removeEventListener("pointerdown",this._onInputBegin,!0),e.removeEventListener("pointerup",this._onInputEnd,!0)):(document.removeEventListener("mousedown",this._onInputBegin,!0),e.removeEventListener("mouseup",this._onInputEnd,!0),document.removeEventListener("touchstart",this._onInputBegin,!0),e.removeEventListener("touchend",this._onInputEnd,!0)),this._viewModel.destroy(),UA.cleanNode(this._form),UA.cleanNode(this._searchSuggestionsContainer),e.removeChild(this._form),e.removeChild(this._searchSuggestionsContainer),this._textBox.removeEventListener("focus",this._onTextBoxFocus,!1),Object(Lr.default)(this)};var eD=$M;function tD(e,t){if(!Object(l.default)(e))throw new u.default("scene is required.");this._scene=e,this._duration=t;var i=this;this._command=uE((function(){i._scene.camera.flyHome(i._duration)})),this.tooltip="View Home",UA.track(this,["tooltip"])}Object.defineProperties(tD.prototype,{scene:{get:function(){return this._scene}},command:{get:function(){return this._command}},duration:{get:function(){return this._duration},set:function(e){if(Object(l.default)(e)&&e<0)throw new u.default("value must be positive.");this._duration=e}}});var iD=tD;function nD(e,t,i){if(!Object(l.default)(e))throw new u.default("container is required.");e=Object(ff.a)(e);var n=new iD(t,i);n._svgPath="M14,4l-10,8.75h20l-4.25-3.7188v-4.6562h-2.812v2.1875l-2.938-2.5625zm-7.0938,9.906v10.094h14.094v-10.094h-14.094zm2.1876,2.313h3.3122v4.25h-3.3122v-4.25zm5.8442,1.281h3.406v6.438h-3.406v-6.438z";var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button cesium-home-button",a.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 28, height: 28 }"),e.appendChild(a),UA.applyBindings(n,a),this._container=e,this._viewModel=n,this._element=a}Object.defineProperties(nD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),nD.prototype.isDestroyed=function(){return!1},nD.prototype.destroy=function(){return UA.cleanNode(this._element),this._container.removeChild(this._element),Object(Lr.default)(this)};var aD=nD;function rD(){this._cameraClicked=new c.default,this._closeClicked=new c.default,this.maxHeight=500,this.enableCamera=!1,this.isCameraTracking=!1,this.showInfo=!1,this.titleText="",this.description="",UA.track(this,["showInfo","titleText","description","maxHeight","enableCamera","isCameraTracking"]),this._loadingIndicatorHtml='
',this.cameraIconPath=void 0,UA.defineProperty(this,"cameraIconPath",{get:function(){return!this.enableCamera||this.isCameraTracking?"M 27.34375 1.65625 L 5.28125 27.9375 L 8.09375 30.3125 L 30.15625 4.03125 L 27.34375 1.65625 z M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4724893 20.232036 9.5676108 20.7379 9.75 21.21875 L 21.65625 7.03125 L 13.84375 7.03125 z M 28.21875 7.71875 L 14.53125 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 9.8371439 29.456025 8.4902779 28.21875 7.71875 z":"M 13.84375 7.03125 C 11.412798 7.03125 9.46875 8.975298 9.46875 11.40625 L 9.46875 11.59375 L 2.53125 7.21875 L 2.53125 24.0625 L 9.46875 19.6875 C 9.4853444 22.104033 11.423165 24.0625 13.84375 24.0625 L 25.875 24.0625 C 28.305952 24.0625 30.28125 22.087202 30.28125 19.65625 L 30.28125 11.40625 C 30.28125 8.975298 28.305952 7.03125 25.875 7.03125 L 13.84375 7.03125 z"}}),UA.defineProperty(this,"_bodyless",{get:function(){return!Object(l.default)(this.description)||0===this.description.length}})}rD.prototype.maxHeightOffset=function(e){return this.maxHeight-e+"px"},Object.defineProperties(rD.prototype,{cameraClicked:{get:function(){return this._cameraClicked}},closeClicked:{get:function(){return this._closeClicked}}});var oD=rD;function sD(e){$.a.defined("container",e),e=Object(ff.a)(e);var t=document.createElement("div");t.className="cesium-infoBox",t.setAttribute("data-bind",'css: { "cesium-infoBox-visible" : showInfo, "cesium-infoBox-bodyless" : _bodyless }'),e.appendChild(t);var i=document.createElement("div");i.className="cesium-infoBox-title",i.setAttribute("data-bind","text: titleText"),t.appendChild(i);var n=document.createElement("button");n.type="button",n.className="cesium-button cesium-infoBox-camera",n.setAttribute("data-bind",'attr: { title: "Focus camera on object" },click: function () { cameraClicked.raiseEvent(this); },enable: enableCamera,cesiumSvgPath: { path: cameraIconPath, width: 32, height: 32 }'),t.appendChild(n);var a=document.createElement("button");a.type="button",a.className="cesium-infoBox-close",a.setAttribute("data-bind","click: function () { closeClicked.raiseEvent(this); }"),a.innerHTML="×",t.appendChild(a);var r=document.createElement("iframe");r.className="cesium-infoBox-iframe",r.setAttribute("sandbox","allow-same-origin allow-popups allow-forms"),r.setAttribute("data-bind","style : { maxHeight : maxHeightOffset(40) }"),r.setAttribute("allowfullscreen",!0),t.appendChild(r);var o=new oD;UA.applyBindings(o,t),this._container=e,this._element=t,this._frame=r,this._viewModel=o,this._descriptionSubscription=void 0;var s=this;r.addEventListener("load",(function(){var e=r.contentDocument,i=e.createElement("link");i.href=Object(Ii.a)("Widgets/InfoBox/InfoBoxDescription.css"),i.rel="stylesheet",i.type="text/css";var n=e.createElement("div");n.className="cesium-infoBox-description",e.head.appendChild(i),e.body.appendChild(n),s._descriptionSubscription=dE(o,"description",(function(e){r.style.height="5px",n.innerHTML=e;var i=null,a=n.firstElementChild;if(null!==a&&1===n.childNodes.length){var o=window.getComputedStyle(a);if(null!==o){var s=o["background-color"],u=Ot.default.fromCssColorString(s);Object(l.default)(u)&&0!==u.alpha&&(i=o["background-color"])}}t.style["background-color"]=i;var d=n.getBoundingClientRect().height;r.style.height=d+"px"}))})),r.setAttribute("src","about:blank")}Object.defineProperties(sD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}},frame:{get:function(){return this._frame}}}),sD.prototype.isDestroyed=function(){return!1},sD.prototype.destroy=function(){var e=this._container;return UA.cleanNode(this._element),e.removeChild(this._element),Object(l.default)(this._descriptionSubscription)&&this._descriptionSubscription.dispose(),Object(Lr.default)(this)};var lD=sD;function uD(){this.showInstructions=!1;var e=this;this._command=uE((function(){e.showInstructions=!e.showInstructions})),this._showClick=uE((function(){e._touch=!1})),this._showTouch=uE((function(){e._touch=!0})),this._touch=!1,this.tooltip="Navigation Instructions",UA.track(this,["tooltip","showInstructions","_touch"])}Object.defineProperties(uD.prototype,{command:{get:function(){return this._command}},showClick:{get:function(){return this._showClick}},showTouch:{get:function(){return this._showTouch}}});var dD=uD;function cD(e){if(!Object(l.default)(e)||!Object(l.default)(e.container))throw new u.default("options.container is required.");var t=Object(ff.a)(e.container),i=new dD,n=Object(s.default)(e.instructionsInitiallyVisible,!1);i.showInstructions=n,i._svgPath="M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z";var a=document.createElement("span");a.className="cesium-navigationHelpButton-wrapper",t.appendChild(a);var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-navigation-help-button",r.setAttribute("data-bind","attr: { title: tooltip },click: command,cesiumSvgPath: { path: _svgPath, width: 32, height: 32 }"),a.appendChild(r);var o=document.createElement("div");o.className="cesium-navigation-help",o.setAttribute("data-bind",'css: { "cesium-navigation-help-visible" : showInstructions}'),a.appendChild(o);var d=document.createElement("button");d.type="button",d.className="cesium-navigation-button cesium-navigation-button-left",d.setAttribute("data-bind",'click: showClick, css: {"cesium-navigation-button-selected": !_touch, "cesium-navigation-button-unselected": _touch}');var c=document.createElement("img");c.src=Object(Ii.a)("Widgets/Images/NavigationHelp/Mouse.svg"),c.className="cesium-navigation-button-icon",c.style.width="25px",c.style.height="25px",d.appendChild(c),d.appendChild(document.createTextNode("Mouse"));var f=document.createElement("button");f.type="button",f.className="cesium-navigation-button cesium-navigation-button-right",f.setAttribute("data-bind",'click: showTouch, css: {"cesium-navigation-button-selected": _touch, "cesium-navigation-button-unselected": !_touch}');var h=document.createElement("img");h.src=Object(Ii.a)("Widgets/Images/NavigationHelp/Touch.svg"),h.className="cesium-navigation-button-icon",h.style.width="25px",h.style.height="25px",f.appendChild(h),f.appendChild(document.createTextNode("Touch")),o.appendChild(d),o.appendChild(f);var p=document.createElement("div");p.className="cesium-click-navigation-help cesium-navigation-help-instructions",p.setAttribute("data-bind",'css: { "cesium-click-navigation-help-visible" : !_touch}'),p.innerHTML='
Pan view
Left click + drag
Zoom view
Right click + drag, or
Mouse wheel scroll
Rotate view
Middle click + drag, or
CTRL + Left/Right click + drag
',o.appendChild(p);var m=document.createElement("div");m.className="cesium-touch-navigation-help cesium-navigation-help-instructions",m.setAttribute("data-bind",'css: { "cesium-touch-navigation-help-visible" : _touch}'),m.innerHTML='
Pan view
One finger drag
Zoom view
Two finger pinch
Tilt view
Two finger drag, same direction
Rotate view
Two finger drag, opposite direction
',o.appendChild(m),UA.applyBindings(i,a),this._container=t,this._viewModel=i,this._wrapper=a,this._closeInstructions=function(e){a.contains(e.target)||(i.showInstructions=!1)},hi.a.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeInstructions,!0):(document.addEventListener("mousedown",this._closeInstructions,!0),document.addEventListener("touchstart",this._closeInstructions,!0))}Object.defineProperties(cD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),cD.prototype.isDestroyed=function(){return!1},cD.prototype.destroy=function(){return hi.a.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeInstructions,!0):(document.removeEventListener("mousedown",this._closeInstructions,!0),document.removeEventListener("touchstart",this._closeInstructions,!0)),UA.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Object(Lr.default)(this)};var fD=cD;function hD(e){if(!Object(l.default)(e)||!Object(l.default)(e.scene))throw new u.default("options.scene is required.");this._scene=e.scene,this.lowFrameRateMessage=Object(s.default)(e.lowFrameRateMessage,"This application appears to be performing poorly on your system. Please try using a different web browser or updating your video drivers."),this.lowFrameRateMessageDismissed=!1,this.showingLowFrameRateMessage=!1,UA.track(this,["lowFrameRateMessage","lowFrameRateMessageDismissed","showingLowFrameRateMessage"]);var t=this;this._dismissMessage=uE((function(){t.showingLowFrameRateMessage=!1,t.lowFrameRateMessageDismissed=!0}));var i=Iv.fromScene(e.scene);this._unsubscribeLowFrameRate=i.lowFrameRate.addEventListener((function(){t.lowFrameRateMessageDismissed||(t.showingLowFrameRateMessage=!0)})),this._unsubscribeNominalFrameRate=i.nominalFrameRate.addEventListener((function(){t.showingLowFrameRateMessage=!1}))}Object.defineProperties(hD.prototype,{scene:{get:function(){return this._scene}},dismissMessage:{get:function(){return this._dismissMessage}}}),hD.prototype.destroy=function(){return this._unsubscribeLowFrameRate(),this._unsubscribeNominalFrameRate(),Object(Lr.default)(this)};var pD=hD;function mD(e){if(!Object(l.default)(e)||!Object(l.default)(e.container))throw new u.default("options.container is required.");if(!Object(l.default)(e.scene))throw new u.default("options.scene is required.");var t=Object(ff.a)(e.container),i=new pD(e),n=document.createElement("div");n.className="cesium-performance-watchdog-message-area",n.setAttribute("data-bind","visible: showingLowFrameRateMessage");var a=document.createElement("button");a.setAttribute("type","button"),a.className="cesium-performance-watchdog-message-dismiss",a.innerHTML="×",a.setAttribute("data-bind","click: dismissMessage"),n.appendChild(a);var r=document.createElement("div");r.className="cesium-performance-watchdog-message",r.setAttribute("data-bind","html: lowFrameRateMessage"),n.appendChild(r),t.appendChild(n),UA.applyBindings(i,n),this._container=t,this._viewModel=i,this._element=n}Object.defineProperties(mD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),mD.prototype.isDestroyed=function(){return!1},mD.prototype.destroy=function(){return this._viewModel.destroy(),UA.cleanNode(this._element),this._container.removeChild(this._element),Object(Lr.default)(this)};var _D=mD;function gD(e){if(!Object(l.default)(e))throw new u.default("scene is required.");this._scene=e,this._orthographic=e.camera.frustum instanceof sa.a,this._flightInProgress=!1,this.dropDownVisible=!1,this.tooltipPerspective="Perspective Projection",this.tooltipOrthographic="Orthographic Projection",this.selectedTooltip=void 0,this.sceneMode=e.mode,UA.track(this,["_orthographic","_flightInProgress","sceneMode","dropDownVisible","tooltipPerspective","tooltipOrthographic"]);var t=this;UA.defineProperty(this,"selectedTooltip",(function(){return t._orthographic?t.tooltipOrthographic:t.tooltipPerspective})),this._toggleDropDown=uE((function(){t.sceneMode===Ss.default.SCENE2D||t._flightInProgress||(t.dropDownVisible=!t.dropDownVisible)})),this._eventHelper=new di.a,this._eventHelper.add(e.morphComplete,(function(e,i,n,a){t.sceneMode=n,t._orthographic=n===Ss.default.SCENE2D||t._scene.camera.frustum instanceof sa.a})),this._eventHelper.add(e.preRender,(function(){t._flightInProgress=Object(l.default)(e.camera._currentFlight)})),this._switchToPerspective=uE((function(){t.sceneMode!==Ss.default.SCENE2D&&(t._scene.camera.switchToPerspectiveFrustum(),t._orthographic=!1,t.dropDownVisible=!1)})),this._switchToOrthographic=uE((function(){t.sceneMode!==Ss.default.SCENE2D&&(t._scene.camera.switchToOrthographicFrustum(),t._orthographic=!0,t.dropDownVisible=!1)})),this._sceneMode=Ss.default}Object.defineProperties(gD.prototype,{scene:{get:function(){return this._scene}},toggleDropDown:{get:function(){return this._toggleDropDown}},switchToPerspective:{get:function(){return this._switchToPerspective}},switchToOrthographic:{get:function(){return this._switchToOrthographic}},isOrthographicProjection:{get:function(){return this._orthographic}}}),gD.prototype.isDestroyed=function(){return!1},gD.prototype.destroy=function(){this._eventHelper.removeAll(),Object(Lr.default)(this)};var vD=gD;function yD(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");if(!Object(l.default)(t))throw new u.default("scene is required.");e=Object(ff.a)(e);var i=new vD(t);i._perspectivePath="M 28.15625,10.4375 9.125,13.21875 13.75,43.25 41.75,55.09375 50.8125,37 54.5,11.9375 z m 0.125,3 19.976451,0.394265 L 43.03125,16.875 22.6875,14.28125 z M 50.971746,15.705477 47.90625,36.03125 42.53125,46 44.84375,19.3125 z M 12.625,16.03125 l 29.15625,3.6875 -2.65625,31 L 16.4375,41.125 z",i._orthographicPath="m 31.560594,6.5254438 -20.75,12.4687502 0.1875,24.5625 22.28125,11.8125 19.5,-12 0.65625,-0.375 0,-0.75 0.0312,-23.21875 z m 0.0625,3.125 16.65625,9.5000002 -16.125,10.28125 -17.34375,-9.71875 z m 18.96875,11.1875002 0.15625,20.65625 -17.46875,10.59375 0.15625,-20.28125 z m -37.0625,1.25 17.21875,9.625 -0.15625,19.21875 -16.9375,-9 z";var n=document.createElement("span");n.className="cesium-projectionPicker-wrapper cesium-toolbar-button",e.appendChild(n);var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-toolbar-button",a.setAttribute("data-bind",'css: { "cesium-projectionPicker-buttonPerspective": !_orthographic, "cesium-projectionPicker-buttonOrthographic": _orthographic, "cesium-button-disabled" : sceneMode === _sceneMode.SCENE2D || _flightInProgress, "cesium-projectionPicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),a.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64, css: "cesium-projectionPicker-iconPerspective" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64, css: "cesium-projectionPicker-iconOrthographic" } --\x3e\x3c!-- /ko --\x3e',n.appendChild(a);var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",r.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && _orthographic), "cesium-projectionPicker-none" : !_orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible },attr: { title: tooltipPerspective },click: switchToPerspective,cesiumSvgPath: { path: _perspectivePath, width: 64, height: 64 }'),n.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-projectionPicker-dropDown-icon",o.setAttribute("data-bind",'css: { "cesium-projectionPicker-visible" : (dropDownVisible && !_orthographic), "cesium-projectionPicker-none" : _orthographic, "cesium-projectionPicker-hidden" : !dropDownVisible},attr: { title: tooltipOrthographic },click: switchToOrthographic,cesiumSvgPath: { path: _orthographicPath, width: 64, height: 64 }'),n.appendChild(o),UA.applyBindings(i,n),this._viewModel=i,this._container=e,this._wrapper=n,this._closeDropDown=function(e){n.contains(e.target)||(i.dropDownVisible=!1)},hi.a.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(yD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),yD.prototype.isDestroyed=function(){return!1},yD.prototype.destroy=function(){return this._viewModel.destroy(),hi.a.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),UA.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Object(Lr.default)(this)};var bD=yD;function wD(e,t){if(!Object(l.default)(e))throw new u.default("scene is required.");this._scene=e;var i=this;this._eventHelper=new di.a,this._eventHelper.add(e.morphStart,(function(e,t,n,a){i.sceneMode=n,i.dropDownVisible=!1})),this._duration=Object(s.default)(t,2),this.sceneMode=e.mode,this.dropDownVisible=!1,this.tooltip2D="2D",this.tooltip3D="3D",this.tooltipColumbusView="Columbus View",UA.track(this,["sceneMode","dropDownVisible","tooltip2D","tooltip3D","tooltipColumbusView"]),this.selectedTooltip=void 0,UA.defineProperty(this,"selectedTooltip",(function(){var e=i.sceneMode;return e===Ss.default.SCENE2D?i.tooltip2D:e===Ss.default.SCENE3D?i.tooltip3D:i.tooltipColumbusView})),this._toggleDropDown=uE((function(){i.dropDownVisible=!i.dropDownVisible})),this._morphTo2D=uE((function(){e.morphTo2D(i._duration)})),this._morphTo3D=uE((function(){e.morphTo3D(i._duration)})),this._morphToColumbusView=uE((function(){e.morphToColumbusView(i._duration)})),this._sceneMode=Ss.default}Object.defineProperties(wD.prototype,{scene:{get:function(){return this._scene}},duration:{get:function(){return this._duration},set:function(e){if(e<0)throw new u.default("duration value must be positive.");this._duration=e}},toggleDropDown:{get:function(){return this._toggleDropDown}},morphTo2D:{get:function(){return this._morphTo2D}},morphTo3D:{get:function(){return this._morphTo3D}},morphToColumbusView:{get:function(){return this._morphToColumbusView}}}),wD.prototype.isDestroyed=function(){return!1},wD.prototype.destroy=function(){this._eventHelper.removeAll(),Object(Lr.default)(this)};var OD=wD;function xD(e,t,i){if(!Object(l.default)(e))throw new u.default("container is required.");if(!Object(l.default)(t))throw new u.default("scene is required.");e=Object(ff.a)(e);var n=new OD(t,i);n._globePath="m 32.401392,4.9330437 c -7.087603,0 -14.096095,2.884602 -19.10793,7.8946843 -5.0118352,5.010083 -7.9296167,11.987468 -7.9296167,19.072999 0,7.085531 2.9177815,14.097848 7.9296167,19.107931 4.837653,4.835961 11.541408,7.631372 18.374354,7.82482 0.05712,0.01231 0.454119,0.139729 0.454119,0.139729 l 0.03493,-0.104797 c 0.08246,7.84e-4 0.162033,0.03493 0.244525,0.03493 0.08304,0 0.161515,-0.03414 0.244526,-0.03493 l 0.03493,0.104797 c 0,0 0.309474,-0.129487 0.349323,-0.139729 6.867765,-0.168094 13.582903,-2.965206 18.444218,-7.82482 2.558195,-2.5573 4.551081,-5.638134 5.903547,-8.977584 1.297191,-3.202966 2.02607,-6.661489 2.02607,-10.130347 0,-6.237309 -2.366261,-12.31219 -6.322734,-17.116794 -0.0034,-0.02316 0.0049,-0.04488 0,-0.06986 -0.01733,-0.08745 -0.104529,-0.278855 -0.104797,-0.279458 -5.31e-4,-0.0012 -0.522988,-0.628147 -0.523984,-0.62878 -3.47e-4,-2.2e-4 -0.133444,-0.03532 -0.244525,-0.06987 C 51.944299,13.447603 51.751076,13.104317 51.474391,12.827728 46.462556,7.8176457 39.488996,4.9330437 32.401392,4.9330437 z m -2.130866,3.5281554 0.104797,9.6762289 c -4.111695,-0.08361 -7.109829,-0.423664 -9.257041,-0.943171 1.198093,-2.269271 2.524531,-4.124404 3.91241,-5.414496 2.167498,-2.0147811 3.950145,-2.8540169 5.239834,-3.3185619 z m 2.794579,0 c 1.280302,0.4754953 3.022186,1.3285948 5.065173,3.2486979 1.424667,1.338973 2.788862,3.303645 3.982275,5.728886 -2.29082,0.403367 -5.381258,0.621049 -8.942651,0.698645 L 33.065105,8.4611991 z m 5.728886,0.2445256 c 4.004072,1.1230822 7.793098,3.1481363 10.724195,6.0782083 0.03468,0.03466 0.07033,0.06991 0.104797,0.104797 -0.45375,0.313891 -0.923054,0.663002 -1.956205,1.082899 -0.647388,0.263114 -1.906242,0.477396 -2.829511,0.733577 -1.382296,-2.988132 -3.027146,-5.368585 -4.785716,-7.0213781 -0.422866,-0.397432 -0.835818,-0.6453247 -1.25756,-0.9781032 z m -15.33525,0.7685092 c -0.106753,0.09503 -0.207753,0.145402 -0.31439,0.244526 -1.684973,1.5662541 -3.298068,3.8232211 -4.680919,6.5672591 -0.343797,-0.14942 -1.035052,-0.273198 -1.292493,-0.419186 -0.956528,-0.542427 -1.362964,-1.022024 -1.537018,-1.292493 -0.0241,-0.03745 -0.01868,-0.0401 -0.03493,-0.06986 2.250095,-2.163342 4.948824,-3.869984 7.859752,-5.0302421 z m -9.641296,7.0912431 c 0.464973,0.571618 0.937729,1.169056 1.956205,1.746612 0.349907,0.198425 1.107143,0.335404 1.537018,0.523983 -1.20166,3.172984 -1.998037,7.051901 -2.165798,11.772162 C 14.256557,30.361384 12.934823,30.161483 12.280427,29.90959 10.644437,29.279855 9.6888882,28.674891 9.1714586,28.267775 8.6540289,27.860658 8.6474751,27.778724 8.6474751,27.778724 l -0.069864,0.03493 C 9.3100294,23.691285 11.163248,19.798527 13.817445,16.565477 z m 37.552149,0.523984 c 2.548924,3.289983 4.265057,7.202594 4.890513,11.318043 -0.650428,0.410896 -1.756876,1.001936 -3.563088,1.606882 -1.171552,0.392383 -3.163859,0.759153 -4.960377,1.117832 -0.04367,-4.752703 -0.784809,-8.591423 -1.88634,-11.807094 0.917574,-0.263678 2.170552,-0.486495 2.864443,-0.76851 1.274693,-0.518066 2.003942,-1.001558 2.654849,-1.467153 z m -31.439008,2.619917 c 2.487341,0.672766 5.775813,1.137775 10.479669,1.222628 l 0.104797,10.689263 0,0.03493 0,0.733577 c -5.435005,-0.09059 -9.512219,-0.519044 -12.610536,-1.117831 0.106127,-4.776683 0.879334,-8.55791 2.02607,-11.562569 z m 23.264866,0.31439 c 1.073459,3.067541 1.833795,6.821314 1.816476,11.702298 -3.054474,0.423245 -7.062018,0.648559 -11.702298,0.698644 l 0,-0.838373 -0.104796,-10.654331 c 4.082416,-0.0864 7.404468,-0.403886 9.990618,-0.908238 z M 8.2632205,30.922625 c 0.7558676,0.510548 1.5529563,1.013339 3.0041715,1.57195 0.937518,0.360875 2.612202,0.647642 3.91241,0.978102 0.112814,3.85566 0.703989,7.107756 1.606883,9.920754 -1.147172,-0.324262 -2.644553,-0.640648 -3.423359,-0.978102 -1.516688,-0.657177 -2.386627,-1.287332 -2.864443,-1.71168 -0.477816,-0.424347 -0.489051,-0.489051 -0.489051,-0.489051 L 9.8002387,40.319395 C 8.791691,37.621767 8.1584238,34.769583 8.1584238,31.900727 c 0,-0.330153 0.090589,-0.648169 0.1047967,-0.978102 z m 48.2763445,0.419186 c 0.0047,0.188973 0.06986,0.36991 0.06986,0.558916 0,2.938869 -0.620228,5.873558 -1.676747,8.628261 -0.07435,0.07583 -0.06552,0.07411 -0.454119,0.349323 -0.606965,0.429857 -1.631665,1.042044 -3.318562,1.676747 -1.208528,0.454713 -3.204964,0.850894 -5.135038,1.25756 0.84593,-2.765726 1.41808,-6.005357 1.606883,-9.815957 2.232369,-0.413371 4.483758,-0.840201 5.938479,-1.327425 1.410632,-0.472457 2.153108,-0.89469 2.96924,-1.327425 z m -38.530252,2.864443 c 3.208141,0.56697 7.372279,0.898588 12.575603,0.978103 l 0.174662,9.885821 c -4.392517,-0.06139 -8.106722,-0.320566 -10.863925,-0.803441 -1.051954,-2.664695 -1.692909,-6.043794 -1.88634,-10.060483 z m 26.793022,0.31439 c -0.246298,3.923551 -0.877762,7.263679 -1.816476,9.885822 -2.561957,0.361954 -5.766249,0.560708 -9.431703,0.62878 l -0.174661,-9.815957 c 4.491734,-0.04969 8.334769,-0.293032 11.42284,-0.698645 z M 12.035901,44.860585 c 0.09977,0.04523 0.105535,0.09465 0.209594,0.139729 1.337656,0.579602 3.441099,1.058072 5.589157,1.537018 1.545042,3.399208 3.548524,5.969402 5.589157,7.789888 -3.034411,-1.215537 -5.871615,-3.007978 -8.174142,-5.309699 -1.245911,-1.245475 -2.271794,-2.662961 -3.213766,-4.156936 z m 40.69605,0 c -0.941972,1.493975 -1.967855,2.911461 -3.213765,4.156936 -2.74253,2.741571 -6.244106,4.696717 -9.955686,5.868615 0.261347,-0.241079 0.507495,-0.394491 0.768509,-0.663713 1.674841,-1.727516 3.320792,-4.181056 4.645987,-7.265904 2.962447,-0.503021 5.408965,-1.122293 7.161107,-1.781544 0.284034,-0.106865 0.337297,-0.207323 0.593848,-0.31439 z m -31.404076,2.305527 c 2.645807,0.376448 5.701178,0.649995 9.466635,0.698645 l 0.139729,7.789888 c -1.38739,-0.480844 -3.316218,-1.29837 -5.659022,-3.388427 -1.388822,-1.238993 -2.743668,-3.0113 -3.947342,-5.100106 z m 20.365491,0.104797 c -1.04872,2.041937 -2.174337,3.779068 -3.353494,4.995309 -1.853177,1.911459 -3.425515,2.82679 -4.611055,3.353494 l -0.139729,-7.789887 c 3.13091,-0.05714 5.728238,-0.278725 8.104278,-0.558916 z",n._flatMapPath="m 2.9825053,17.550598 0,1.368113 0,26.267766 0,1.368113 1.36811,0 54.9981397,0 1.36811,0 0,-1.368113 0,-26.267766 0,-1.368113 -1.36811,0 -54.9981397,0 -1.36811,0 z m 2.73623,2.736226 10.3292497,0 0,10.466063 -10.3292497,0 0,-10.466063 z m 13.0654697,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 11.69737,0 0,10.466063 -11.69737,0 0,-10.466063 z m 14.43359,0 10.32926,0 0,10.466063 -10.32926,0 0,-10.466063 z m -41.9326497,13.202288 10.3292497,0 0,10.329252 -10.3292497,0 0,-10.329252 z m 13.0654697,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 11.69737,0 0,10.329252 -11.69737,0 0,-10.329252 z m 14.43359,0 10.32926,0 0,10.329252 -10.32926,0 0,-10.329252 z",n._columbusViewPath="m 14.723969,17.675598 -0.340489,0.817175 -11.1680536,26.183638 -0.817175,1.872692 2.076986,0 54.7506996,0 2.07698,0 -0.81717,-1.872692 -11.16805,-26.183638 -0.34049,-0.817175 -0.91933,0 -32.414586,0 -0.919322,0 z m 1.838643,2.723916 6.196908,0 -2.928209,10.418977 -7.729111,0 4.460412,-10.418977 z m 9.02297,0 4.903049,0 0,10.418977 -7.831258,0 2.928209,-10.418977 z m 7.626964,0 5.584031,0 2.62176,10.418977 -8.205791,0 0,-10.418977 z m 8.410081,0 5.51593,0 4.46042,10.418977 -7.38863,0 -2.58772,-10.418977 z m -30.678091,13.142892 8.103649,0 -2.89416,10.282782 -9.6018026,0 4.3923136,-10.282782 z m 10.929711,0 8.614384,0 0,10.282782 -11.508544,0 2.89416,-10.282782 z m 11.338299,0 8.852721,0 2.58772,10.282782 -11.440441,0 0,-10.282782 z m 11.678781,0 7.86531,0 4.39231,10.282782 -9.6699,0 -2.58772,-10.282782 z";var a=document.createElement("span");a.className="cesium-sceneModePicker-wrapper cesium-toolbar-button",e.appendChild(a);var r=document.createElement("button");r.type="button",r.className="cesium-button cesium-toolbar-button",r.setAttribute("data-bind",'css: { "cesium-sceneModePicker-button2D": sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-button3D": sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-buttonColumbusView": sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-selected": dropDownVisible },attr: { title: selectedTooltip },click: toggleDropDown'),r.innerHTML='\x3c!-- ko cesiumSvgPath: { path: _globePath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon3D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-icon2D" } --\x3e\x3c!-- /ko --\x3e\x3c!-- ko cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64, css: "cesium-sceneModePicker-slide-svg cesium-sceneModePicker-iconColumbusView" } --\x3e\x3c!-- /ko --\x3e',a.appendChild(r);var o=document.createElement("button");o.type="button",o.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",o.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE3D)) || (!dropDownVisible && (sceneMode === _sceneMode.SCENE3D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE3D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip3D },click: morphTo3D,cesiumSvgPath: { path: _globePath, width: 64, height: 64 }'),a.appendChild(o);var s=document.createElement("button");s.type="button",s.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",s.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.SCENE2D)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.SCENE2D, "cesium-sceneModePicker-hidden" : !dropDownVisible },attr: { title: tooltip2D },click: morphTo2D,cesiumSvgPath: { path: _flatMapPath, width: 64, height: 64 }'),a.appendChild(s);var d=document.createElement("button");d.type="button",d.className="cesium-button cesium-toolbar-button cesium-sceneModePicker-dropDown-icon",d.setAttribute("data-bind",'css: { "cesium-sceneModePicker-visible" : (dropDownVisible && (sceneMode !== _sceneMode.COLUMBUS_VIEW)) || (!dropDownVisible && (sceneMode === _sceneMode.COLUMBUS_VIEW)), "cesium-sceneModePicker-none" : sceneMode === _sceneMode.COLUMBUS_VIEW, "cesium-sceneModePicker-hidden" : !dropDownVisible},attr: { title: tooltipColumbusView },click: morphToColumbusView,cesiumSvgPath: { path: _columbusViewPath, width: 64, height: 64 }'),a.appendChild(d),UA.applyBindings(n,a),this._viewModel=n,this._container=e,this._wrapper=a,this._closeDropDown=function(e){a.contains(e.target)||(n.dropDownVisible=!1)},hi.a.supportsPointerEvents()?document.addEventListener("pointerdown",this._closeDropDown,!0):(document.addEventListener("mousedown",this._closeDropDown,!0),document.addEventListener("touchstart",this._closeDropDown,!0))}Object.defineProperties(xD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),xD.prototype.isDestroyed=function(){return!1},xD.prototype.destroy=function(){return this._viewModel.destroy(),hi.a.supportsPointerEvents()?document.removeEventListener("pointerdown",this._closeDropDown,!0):(document.removeEventListener("mousedown",this._closeDropDown,!0),document.removeEventListener("touchstart",this._closeDropDown,!0)),UA.cleanNode(this._wrapper),this._container.removeChild(this._wrapper),Object(Lr.default)(this)};var AD=xD,TD=new r.default;function ED(e,t,i){if(!Object(l.default)(e))throw new u.default("scene is required.");if(!Object(l.default)(t))throw new u.default("selectionIndicatorElement is required.");if(!Object(l.default)(i))throw new u.default("container is required.");this._scene=e,this._screenPositionX="-1000px",this._screenPositionY="-1000px",this._tweens=e.tweens,this._container=Object(s.default)(i,document.body),this._selectionIndicatorElement=t,this._scale=1,this.position=void 0,this.showSelection=!1,UA.track(this,["position","_screenPositionX","_screenPositionY","_scale","showSelection"]),this.isVisible=void 0,UA.defineProperty(this,"isVisible",{get:function(){return this.showSelection&&Object(l.default)(this.position)}}),UA.defineProperty(this,"_transform",{get:function(){return"scale("+this._scale+")"}}),this.computeScreenSpacePosition=function(t,i){return Bw.default.wgs84ToWindowCoordinates(e,t,i)}}ED.prototype.update=function(){if(this.showSelection&&Object(l.default)(this.position)){var e=this.computeScreenSpacePosition(this.position,TD);if(Object(l.default)(e)){var t=this._container,i=t.parentNode.clientWidth,n=t.parentNode.clientHeight,a=this._selectionIndicatorElement.clientWidth,r=.5*a;e.x=Math.min(Math.max(e.x,-a),i+a)-r,e.y=Math.min(Math.max(e.y,-a),n+a)-r,this._screenPositionX=Math.floor(e.x+.25)+"px",this._screenPositionY=Math.floor(e.y+.25)+"px"}else this._screenPositionX="-1000px",this._screenPositionY="-1000px"}},ED.prototype.animateAppear=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:2,stopValue:1,duration:.8,easingFunction:ei.a.EXPONENTIAL_OUT})},ED.prototype.animateDepart=function(){this._tweens.addProperty({object:this,property:"_scale",startValue:this._scale,stopValue:1.5,duration:.8,easingFunction:ei.a.EXPONENTIAL_OUT})},Object.defineProperties(ED.prototype,{container:{get:function(){return this._container}},selectionIndicatorElement:{get:function(){return this._selectionIndicatorElement}},scene:{get:function(){return this._scene}}});var CD=ED;function SD(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");e=Object(ff.a)(e),this._container=e;var i=document.createElement("div");i.className="cesium-selection-wrapper",i.setAttribute("data-bind",'style: { "top" : _screenPositionY, "left" : _screenPositionX },css: { "cesium-selection-wrapper-visible" : isVisible }'),e.appendChild(i),this._element=i;var n="http://www.w3.org/2000/svg",a=document.createElementNS(n,"svg:svg");a.setAttribute("width",160),a.setAttribute("height",160),a.setAttribute("viewBox","0 0 160 160");var r=document.createElementNS(n,"g");r.setAttribute("transform","translate(80,80)"),a.appendChild(r);var o=document.createElementNS(n,"path");o.setAttribute("data-bind","attr: { transform: _transform }"),o.setAttribute("d","M -34 -34 L -34 -11.25 L -30 -15.25 L -30 -30 L -15.25 -30 L -11.25 -34 L -34 -34 z M 11.25 -34 L 15.25 -30 L 30 -30 L 30 -15.25 L 34 -11.25 L 34 -34 L 11.25 -34 z M -34 11.25 L -34 34 L -11.25 34 L -15.25 30 L -30 30 L -30 15.25 L -34 11.25 z M 34 11.25 L 30 15.25 L 30 30 L 15.25 30 L 11.25 34 L 34 34 L 34 11.25 z"),r.appendChild(o),i.appendChild(a);var s=new CD(t,this._element,this._container);this._viewModel=s,UA.applyBindings(this._viewModel,this._element)}Object.defineProperties(SD.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),SD.prototype.isDestroyed=function(){return!1},SD.prototype.destroy=function(){var e=this._container;return UA.cleanNode(this._element),e.removeChild(this._element),Object(Lr.default)(this)};var MD=SD;function DD(e,t,i){this._color=e,this._height=t,this._base=Object(s.default)(i,0)}DD.prototype.getHeight=function(){return this._height},DD.prototype.getBase=function(){return this._base},DD.prototype.getStartTime=function(){return this._start},DD.prototype.getStopTime=function(){return this._stop},DD.prototype.setRange=function(e,t){this._start=e,this._stop=t},DD.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=ln.default.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*e.getAlpha(i)),a=ln.default.secondsDifference(this._stop,e.epochJulian),r=Math.round(e.timeBarWidth*e.getAlpha(a))-n;n<0&&(r+=n,n=0),n+r>e.timeBarWidth&&(r=e.timeBarWidth-n),r>0&&(t='')}return t};var PD=DD;function ID(e,t,i,n){this.interval=e,this.height=t,this.color=i||new Ot.default(.5,.5,.5,1),this.backgroundColor=n||new Ot.default(0,0,0,0)}ID.prototype.render=function(e,t){var i=this.interval.start,n=this.interval.stop,a=t.startJulian,r=ln.default.addSeconds(t.startJulian,t.duration,new ln.default);if(ln.default.lessThan(i,a)&&ln.default.greaterThan(n,r))e.fillStyle=this.color.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height);else if(ln.default.lessThanOrEquals(i,r)&&ln.default.greaterThanOrEquals(n,a)){var o,s,u;for(o=0;oe._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===BD){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var a=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(ln.default.addSeconds(e._startJulian,a,new ln.default),ln.default.addSeconds(e._endJulian,a,new ln.default))}}else e._mouseMode===FD&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}(this),this._onMouseWheel=function(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=jD=Math.max(Math.min(Math.abs(i),jD),1),e.zoomFrom(Math.pow(1.05,-i))}}(this),this._onTouchStart=function(e){return function(t){var i,n,a=t.touches.length,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=kD,1===a?(i=ln.default.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=UD,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===a?"-16px 0":"0 0")):(e._touchMode=HD,e._touchState.centerX=t.touches[0].clientX-r)):2===a?(e._touchMode=VD,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=GD}}(this),this._onTouchMove=function(e){return function(t){var i,n,a,r,o,s,u=1,d=e._topDiv.getBoundingClientRect().left;e._touchMode===HD&&(e._touchMode=VD),e._mouseMode=kD,e._touchMode===UD?(t.preventDefault(),1===t.changedTouches.length&&(n=t.changedTouches[0].clientX-d)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth)):e._touchMode===VD&&(2===(a=t.touches.length)?(r=.5*(t.touches[0].clientX+t.touches[1].clientX)-d,o=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===a&&(r=t.touches[0].clientX-d,o=0),Object(l.default)(r)&&(o>0&&e._touchState.spanX>0?(u=e._touchState.spanX/o,s=ln.default.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-r*e._timeBarSecondsSpan*u)/e._topDiv.clientWidth,new ln.default)):(i=e._touchState.centerX-r,s=ln.default.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new ln.default)),e.zoomTo(s,ln.default.addSeconds(s,e._timeBarSecondsSpan*u,new ln.default)),e._touchState.centerX=r,e._touchState.spanX=o))}}(this),this._onTouchEnd=function(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===HD?(e._touchMode=UD,e._onTouchMove(t)):e._touchMode===UD&&e._onTouchMove(t),e._mouseMode=kD,1!==i?e._touchMode=i>0?GD:zD:e._touchMode===VD&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}(this);var r=this._timeBarEle;i.addEventListener("mouseup",this._onMouseUp,!1),i.addEventListener("mousemove",this._onMouseMove,!1),r.addEventListener("mousedown",this._onMouseDown,!1),r.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),r.addEventListener("mousewheel",this._onMouseWheel,!1),r.addEventListener("touchstart",this._onTouchStart,!1),r.addEventListener("touchmove",this._onTouchMove,!1),r.addEventListener("touchend",this._onTouchEnd,!1),r.addEventListener("touchcancel",this._onTouchEnd,!1),this._topDiv.oncontextmenu=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}function XD(e){return e<10?"0"+e.toString():e.toString()}qD.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},qD.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},qD.prototype.isDestroyed=function(){return!1},qD.prototype.destroy=function(){this._clock.onTick.removeEventListener(this.updateFromClock,this);var e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);var t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),Object(Lr.default)(this)},qD.prototype.addHighlightRange=function(e,t,i){var n=new PD(e,t,i);return this._highlightRanges.push(n),this.resize(),n},qD.prototype.addTrack=function(e,t,i,n){var a=new LD(e,t,i,n);return this._trackList.push(a),this._lastHeight=void 0,this.resize(),a},qD.prototype.zoomTo=function(e,t){if(!Object(l.default)(e))throw new u.default("startTime is required.");if(!Object(l.default)(t))throw new u.default("stopTime is required");if(ln.default.lessThanOrEquals(t,e))throw new u.default("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=ln.default.secondsDifference(t,e),this._clock&&this._clock.clockRange!==bt.default.UNBOUNDED){var i=this._clock.startTime,n=this._clock.stopTime,a=ln.default.secondsDifference(n,i),r=ln.default.secondsDifference(i,this._startJulian),o=ln.default.secondsDifference(n,this._endJulian);this._timeBarSecondsSpan>=a?(this._timeBarSecondsSpan=a,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):r>0?(this._endJulian=ln.default.addSeconds(this._endJulian,r,new ln.default),this._startJulian=i,this._timeBarSecondsSpan=ln.default.secondsDifference(this._endJulian,this._startJulian)):o<0&&(this._startJulian=ln.default.addSeconds(this._startJulian,o,new ln.default),this._endJulian=n,this._timeBarSecondsSpan=ln.default.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var s=document.createEvent("Event");s.initEvent("setzoom",!0,!0),s.startJulian=this._startJulian,s.endJulian=this._endJulian,s.epochJulian=this._epochJulian,s.totalSpan=this._timeBarSecondsSpan,s.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(s)},qD.prototype.zoomFrom=function(e){var t=ln.default.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t;this.zoomTo(ln.default.addSeconds(this._startJulian,t-t*e,new ln.default),ln.default.addSeconds(this._endJulian,i*e-i,new ln.default))},qD.prototype.makeLabel=function(e){var t=ln.default.toGregorianDate(e),i=t.millisecond,n=" UTC";if(i>0&&this._timeBarSecondsSpan<3600){for(n=Math.floor(i).toString();n.length<3;)n="0"+n;n="."+n}return WD[t.month-1]+" "+t.day+" "+t.year+" "+XD(t.hour)+":"+XD(t.minute)+":"+XD(t.second)+n},qD.prototype.smallestTicInPixels=7,qD.prototype._makeTics=function(){var e,t=this._timeBarEle,i=ln.default.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),a=n-8,r=this;this._needleEle.style.left=n.toString()+"px";var o="",s=0,l=this._timeBarSecondsSpan;l<.01?(l=.01,this._timeBarSecondsSpan=.01,this._endJulian=ln.default.addSeconds(this._startJulian,.01,new ln.default)):l>31536e6&&(l=31536e6,this._timeBarSecondsSpan=31536e6,this._endJulian=ln.default.addSeconds(this._startJulian,31536e6,new ln.default));var u=this._timeBarEle.clientWidth;u<10&&(u=10);var d,c=this._startJulian,f=Math.min(l/u*1e-5,.4),h=ln.default.toGregorianDate(c);d=l>31536e4?ln.default.fromDate(new Date(Date.UTC(100*Math.floor(h.year/100),0))):l>31536e3?ln.default.fromDate(new Date(Date.UTC(10*Math.floor(h.year/10),0))):l>86400?ln.default.fromDate(new Date(Date.UTC(h.year,0))):ln.default.fromDate(new Date(Date.UTC(h.year,h.month,h.day)));var p=ln.default.secondsDifference(this._startJulian,ln.default.addSeconds(d,f,new ln.default)),m=p+l;function _(e){return Math.floor(p/e)*e}function g(e,t){return Math.ceil(e/t+.5)*t}function v(e){return(e-p)/l}function y(e,t){return e-t*Math.round(e/t)}this._epochJulian=d,this._rulerEle.innerHTML=this.makeLabel(ln.default.addSeconds(this._endJulian,-.01,new ln.default));var b=this._rulerEle.offsetWidth+20;b<30&&(b=180);var w=s;s-=1e-10;var O={startTime:p,startJulian:c,epochJulian:d,duration:l,timeBarWidth:u,getAlpha:v};this._highlightRanges.forEach((function(e){o+=e.render(O)}));var x=0,A=0,T=0,E=b/u;E>1&&(E=1),E*=this._timeBarSecondsSpan;var C,S=-1,M=-1,D=YD.length;for(C=0;CE&&P>s)break;M<0&&u*(P/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(M=S)}if(S>0){for(;S>0;)if(--S,Math.abs(y(x,YD[S]))<1e-5){YD[S]>=s&&(A=YD[S]);break}if(M>=0)for(;M=s){T=YD[M];break}++M}}(s=w)>1e-10&&T<1e-5&&Math.abs(s-x)>1e-10&&(T=s,s<=x+1e-10&&(A=0));var I,L=-999999;if(u*(T/this._timeBarSecondsSpan)>=3)for(e=_(T);e<=m;e=g(e,T))o+='';if(u*(A/this._timeBarSecondsSpan)>=3)for(e=_(A);e<=m;e=g(e,A))o+='';if(u*(x/this._timeBarSecondsSpan)>=2){this._mainTicSpan=x,m+=x,e=_(x);for(var j=ln.default.computeTaiMinusUtc(d);e<=m;){var R=ln.default.addSeconds(c,e-p,new ln.default);if(x>2.1){var N=ln.default.computeTaiMinusUtc(R);Math.abs(N-j)>.1&&(e+=N-j,R=ln.default.addSeconds(c,e-p,new ln.default))}var B=Math.round(u*v(e)),F=this.makeLabel(R);this._rulerEle.innerHTML=F,(I=this._rulerEle.offsetWidth)<10&&(I=b);var k=B-(I/2-1);k>L?(L=k+I+5,o+=''+F+""):o+='',e=g(e,x)}}else this._mainTicSpan=-1;o+='',t.innerHTML=o,this._scrubElement=t.lastChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),O.y=0,this._trackList.forEach((function(e){e.render(r._context,O),O.y+=e.height}))},qD.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(Object(l.default)(this._scrubElement)){var t=ln.default.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}Object(l.default)(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(ln.default.addSeconds(this._startJulian,this._timelineDrag,new ln.default),ln.default.addSeconds(this._endJulian,this._timelineDrag,new ln.default)))},qD.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=ln.default.addSeconds(this._startJulian,t,new ln.default),this._scrubElement){var i=e-8;this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var n=document.createEvent("Event");n.initEvent("settime",!0,!0),n.clientX=e,n.timeSeconds=t,n.timeJulian=this._scrubJulian,n.clock=this._clock,this._topDiv.dispatchEvent(n)},qD.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight;if(e!==this._lastWidth||t!==this._lastHeight){this._trackContainer.style.height=t+"px";var i=1;this._trackList.forEach((function(e){i+=e.height})),this._trackListEle.style.height=i.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=i,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t}};var KD=qD;function JD(){var e=window.screen;Object(l.default)(e)&&(Object(l.default)(e.unlockOrientation)?e.unlockOrientation():Object(l.default)(e.mozUnlockOrientation)?e.mozUnlockOrientation():Object(l.default)(e.msUnlockOrientation)?e.msUnlockOrientation():Object(l.default)(e.orientation&&e.orientation.unlock)&&e.orientation.unlock())}function ZD(e,t,i,n){var a,r,o;n()||(i()?(t.useWebVR=!1,e._locked&&(JD(),e._locked=!1),e._noSleep.disable(),_i.a.exitFullscreen(),i(!1)):(_i.a.fullscreen||_i.a.requestFullscreen(e._vrElement),e._noSleep.enable(),e._locked||(e._locked=(a="landscape",r=!1,o=window.screen,Object(l.default)(o)&&(Object(l.default)(o.lockOrientation)?r=o.lockOrientation(a):Object(l.default)(o.mozLockOrientation)?r=o.mozLockOrientation(a):Object(l.default)(o.msLockOrientation)?r=o.msLockOrientation(a):Object(l.default)(o.orientation&&o.orientation.lock)&&(r=o.orientation.lock(a))),r)),t.useWebVR=!0,i(!0)))}function QD(e,t){if(!Object(l.default)(e))throw new u.default("scene is required.");var i=this,n=UA.observable(_i.a.enabled),a=UA.observable(!1);this.isVRMode=void 0,UA.defineProperty(this,"isVRMode",{get:function(){return a()}}),this.isVREnabled=void 0,UA.defineProperty(this,"isVREnabled",{get:function(){return n()},set:function(e){n(e&&_i.a.enabled)}}),this.tooltip=void 0,UA.defineProperty(this,"tooltip",(function(){return n()?a()?"Exit VR mode":"Enter VR mode":"VR mode is unavailable"}));var r=UA.observable(!1);this._isOrthographic=void 0,UA.defineProperty(this,"_isOrthographic",{get:function(){return r()}}),this._eventHelper=new di.a,this._eventHelper.add(e.preRender,(function(){r(e.camera.frustum instanceof sa.a)})),this._locked=!1,this._noSleep=new uT,this._command=uE((function(){ZD(i,e,a,r)}),UA.getObservable(this,"isVREnabled")),this._vrElement=Object(s.default)(Object(ff.a)(t),document.body),this._callback=function(){!_i.a.fullscreen&&a()&&(e.useWebVR=!1,i._locked&&(JD(),i._locked=!1),i._noSleep.disable(),a(!1))},document.addEventListener(_i.a.changeEventName,this._callback)}Object.defineProperties(QD.prototype,{vrElement:{get:function(){return this._vrElement},set:function(e){if(!(e instanceof Element))throw new u.default("value must be a valid Element.");this._vrElement=e}},command:{get:function(){return this._command}}}),QD.prototype.isDestroyed=function(){return!1},QD.prototype.destroy=function(){this._eventHelper.removeAll(),document.removeEventListener(_i.a.changeEventName,this._callback),Object(Lr.default)(this)};var $D=QD;function eP(e,t,i){if(!Object(l.default)(e))throw new u.default("container is required.");if(!Object(l.default)(t))throw new u.default("scene is required.");e=Object(ff.a)(e);var n=new $D(t,i);n._exitVRPath="M 25.770585,2.4552065 C 15.72282,13.962707 10.699956,19.704407 8.1768352,22.580207 c -1.261561,1.4379 -1.902282,2.1427 -2.21875,2.5 -0.141624,0.1599 -0.208984,0.2355 -0.25,0.2813 l 0.6875,0.75 c 10e-5,-10e-5 0.679191,0.727 0.6875,0.7187 0.01662,-0.016 0.02451,-0.024 0.03125,-0.031 0.01348,-0.014 0.04013,-0.038 0.0625,-0.062 0.04474,-0.05 0.120921,-0.1315 0.28125,-0.3126 0.320657,-0.3619 0.956139,-1.0921 2.2187499,-2.5312 2.5252219,-2.8781 7.5454589,-8.6169 17.5937499,-20.1250005 l -1.5,-1.3125 z m -20.5624998,3.9063 c -1.304375,0 -2.34375,1.0391 -2.34375,2.3437 l 0,10.8125005 c 0,1.3043 1.039375,2.375 2.34375,2.375 l 2.25,0 c 1.9518039,-2.2246 7.4710958,-8.5584 13.5624998,-15.5312005 l -15.8124998,0 z m 21.1249998,0 c -1.855467,2.1245 -2.114296,2.4005 -3.59375,4.0936995 1.767282,0.1815 3.15625,1.685301 3.15625,3.500001 0,1.9349 -1.56511,3.5 -3.5,3.5 -1.658043,0 -3.043426,-1.1411 -3.40625,-2.6875 -1.089617,1.2461 -2.647139,2.9988 -3.46875,3.9375 0.191501,-0.062 0.388502,-0.094 0.59375,-0.094 1.373338,0 2.50006,1.4614 2.5625,3.2812 l 8.3125,0 c 1.304375,0 2.34375,-1.0707 2.34375,-2.375 l 0,-10.8125005 c 0,-1.3046 -1.039375,-2.3437 -2.34375,-2.3437 l -0.65625,0 z M 9.5518351,10.423906 c 1.9348899,0 3.4999999,1.596401 3.4999999,3.531301 0,1.9349 -1.56511,3.5 -3.4999999,3.5 -1.9348899,0 -3.4999999,-1.5651 -3.4999999,-3.5 0,-1.9349 1.56511,-3.531301 3.4999999,-3.531301 z m 4.2187499,10.312601 c -0.206517,0.2356 -0.844218,0.9428 -1.03125,1.1562 l 0.8125,0 c 0.01392,-0.4081 0.107026,-0.7968 0.21875,-1.1562 z",n._enterVRPath="M 5.3125 6.375 C 4.008126 6.375 2.96875 7.4141499 2.96875 8.71875 L 2.96875 19.5 C 2.96875 20.8043 4.008126 21.875 5.3125 21.875 L 13.65625 21.875 C 13.71832 20.0547 14.845166 18.59375 16.21875 18.59375 C 17.592088 18.59375 18.71881 20.0552 18.78125 21.875 L 27.09375 21.875 C 28.398125 21.875 29.4375 20.8043 29.4375 19.5 L 29.4375 8.71875 C 29.4375 7.4141499 28.398125 6.375 27.09375 6.375 L 5.3125 6.375 z M 9.625 10.4375 C 11.55989 10.4375 13.125 12.03385 13.125 13.96875 C 13.125 15.90365 11.55989 17.46875 9.625 17.46875 C 7.69011 17.46875 6.125 15.90365 6.125 13.96875 C 6.125 12.03385 7.69011 10.4375 9.625 10.4375 z M 22.46875 10.4375 C 24.40364 10.4375 25.96875 12.03385 25.96875 13.96875 C 25.96875 15.90365 24.40364 17.46875 22.46875 17.46875 C 20.53386 17.46875 18.96875 15.90365 18.96875 13.96875 C 18.96875 12.03385 20.53386 10.4375 22.46875 10.4375 z";var a=document.createElement("button");a.type="button",a.className="cesium-button cesium-vrButton",a.setAttribute("data-bind",'css: { "cesium-button-disabled" : _isOrthographic }, attr: { title: tooltip },click: command,enable: isVREnabled,cesiumSvgPath: { path: isVRMode ? _exitVRPath : _enterVRPath, width: 32, height: 32 }'),e.appendChild(a),UA.applyBindings(n,a),this._container=e,this._viewModel=n,this._element=a}Object.defineProperties(eP.prototype,{container:{get:function(){return this._container}},viewModel:{get:function(){return this._viewModel}}}),eP.prototype.isDestroyed=function(){return!1},eP.prototype.destroy=function(){return this._viewModel.destroy(),UA.cleanNode(this._element),this._container.removeChild(this._element),Object(Lr.default)(this)};var tP=eP,iP=new ne.default;function nP(e){var t=e.clock;t.currentTime=e.timeJulian,t.shouldAnimate=!1}function aP(e){var t,i=[],n=e.getPropertyNames();for(t=0;t"+e+""+t+"")})),r.length>0&&(r=''+r+"
"),r),feature:o})}if(Object(l.default)(e.scene.globe))return function(e,t){var i=e.scene,n=i.camera.getPickRay(t),r=i.imageryLayers.pickImageryLayerFeatures(n,i);if(!Object(l.default)(r))return;var o=new Xo.a({id:"Loading...",description:"Loading feature information..."});return Object(a.a)(r,(function(t){if(e.selectedEntity===o)if(Object(l.default)(t)&&0!==t.length){var i=t[0],n=new Xo.a({id:i.name,description:i.description});if(Object(l.default)(i.position)){var a=e.scene.globe.ellipsoid.cartographicToCartesian(i.position,lP);n.position=new us.a(a)}e.selectedEntity=n}else e.selectedEntity=uP()}),(function(){e.selectedEntity===o&&(e.selectedEntity=uP())})),o}(e,t.position)}var oP=new ln.default;function sP(e,t,i){if(Object(l.default)(i)){var n=i.clock;if(Object(l.default)(n)&&(n.getValue(t),Object(l.default)(e))){var a=n.startTime,r=n.stopTime;ln.default.equals(a,r)&&(r=ln.default.addSeconds(a,Re.default.EPSILON2,oP)),e.updateFromClock(),e.zoomTo(a,r)}}}var lP=new oe.default;function uP(){return new Xo.a({id:"None",description:"No features found."})}function dP(e,t){if(!Object(l.default)(e))throw new u.default("container is required.");e=Object(ff.a)(e),t=Object(s.default)(t,s.default.EMPTY_OBJECT);var i=!(Object(l.default)(t.globe)&&!1===t.globe||Object(l.default)(t.baseLayerPicker)&&!1===t.baseLayerPicker);if(!i&&Object(l.default)(t.selectedImageryProviderViewModel))throw new u.default("options.selectedImageryProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.imageryProvider instead or set options.baseLayerPicker to true.");if(!i&&Object(l.default)(t.selectedTerrainProviderViewModel))throw new u.default("options.selectedTerrainProviderViewModel is not available when not using the BaseLayerPicker widget. Either specify options.terrainProvider instead or set options.baseLayerPicker to true.");var n=this,a=document.createElement("div");a.className="cesium-viewer",e.appendChild(a);var r=document.createElement("div");r.className="cesium-viewer-cesiumWidgetContainer",a.appendChild(r);var o=document.createElement("div");o.className="cesium-viewer-bottom",a.appendChild(o);var d,f,h=Object(s.default)(t.scene3DOnly,!1),p=!1;Object(l.default)(t.clockViewModel)?d=(f=t.clockViewModel).clock:(d=new yt.a,f=new nE(d),p=!0),Object(l.default)(t.shouldAnimate)&&(d.shouldAnimate=t.shouldAnimate);var m=new UM.default(r,{imageryProvider:!i&&!Object(l.default)(t.imageryProvider)&&void 0,clock:d,skyBox:t.skyBox,skyAtmosphere:t.skyAtmosphere,sceneMode:t.sceneMode,mapProjection:t.mapProjection,globe:t.globe,orderIndependentTranslucency:t.orderIndependentTranslucency,contextOptions:t.contextOptions,useDefaultRenderLoop:t.useDefaultRenderLoop,targetFrameRate:t.targetFrameRate,showRenderLoopErrors:t.showRenderLoopErrors,useBrowserRecommendedResolution:t.useBrowserRecommendedResolution,creditContainer:Object(l.default)(t.creditContainer)?t.creditContainer:o,creditViewport:t.creditViewport,scene3DOnly:h,shadows:t.shadows,terrainShadows:t.terrainShadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange}),_=t.dataSources,g=!1;Object(l.default)(_)||(_=new ys.default,g=!0);var v,y,b=m.scene,w=new bs.default({scene:b,dataSourceCollection:_}),O=new di.a;if(O.add(d.onTick,dP.prototype._onTick,this),O.add(b.morphStart,dP.prototype._clearTrackedObject,this),!Object(l.default)(t.selectionIndicator)||!1!==t.selectionIndicator){var x=document.createElement("div");x.className="cesium-viewer-selectionIndicatorContainer",a.appendChild(x),v=new MD(x,b)}if(!Object(l.default)(t.infoBox)||!1!==t.infoBox){var A=document.createElement("div");A.className="cesium-viewer-infoBoxContainer",a.appendChild(A);var T=(y=new lD(A)).viewModel;O.add(T.cameraClicked,dP.prototype._onInfoBoxCameraClicked,this),O.add(T.closeClicked,dP.prototype._onInfoBoxClockClicked,this)}var E,C,S,M,D,P,I,L,j,R,N,B,F,k,z,U=document.createElement("div");if(U.className="cesium-viewer-toolbar",a.appendChild(U),!Object(l.default)(t.geocoder)||!1!==t.geocoder){var V,H=document.createElement("div");H.className="cesium-viewer-geocoderContainer",U.appendChild(H),Object(l.default)(t.geocoder)&&"boolean"!=typeof t.geocoder&&(V=Array.isArray(t.geocoder)?t.geocoder:[t.geocoder]),E=new eD({container:H,geocoderServices:V,scene:b}),O.add(E.viewModel.search.beforeExecute,dP.prototype._clearObjects,this)}if(Object(l.default)(t.homeButton)&&!1===t.homeButton||(C=new aD(U,b),Object(l.default)(E)&&O.add(C.viewModel.command.afterExecute,(function(){var e=E.viewModel;e.searchText="",e.isSearchInProgress&&e.search()})),O.add(C.viewModel.command.beforeExecute,dP.prototype._clearTrackedObject,this)),!0===t.sceneModePicker&&h)throw new u.default("options.sceneModePicker is not available when options.scene3DOnly is set to true.");if(h||Object(l.default)(t.sceneModePicker)&&!1===t.sceneModePicker||(S=new AD(U,b)),t.projectionPicker&&(M=new bD(U,b)),i){var G=Object(s.default)(t.imageryProviderViewModels,gM()),Y=Object(s.default)(t.terrainProviderViewModels,vM());D=new pM(U,{globe:b.globe,imageryProviderViewModels:G,selectedImageryProviderViewModel:t.selectedImageryProviderViewModel,terrainProviderViewModels:Y,selectedTerrainProviderViewModel:t.selectedTerrainProviderViewModel}),P=U.getElementsByClassName("cesium-baseLayerPicker-dropDown")[0]}if(Object(l.default)(t.imageryProvider)&&!1!==t.imageryProvider&&(i&&(D.viewModel.selectedImagery=void 0),b.imageryLayers.removeAll(),b.imageryLayers.addImageryProvider(t.imageryProvider)),Object(l.default)(t.terrainProvider)&&(i&&(D.viewModel.selectedTerrain=void 0),b.terrainProvider=t.terrainProvider),!Object(l.default)(t.navigationHelpButton)||!1!==t.navigationHelpButton){var W=!0;try{if(Object(l.default)(window.localStorage)){var q=window.localStorage.getItem("cesium-hasSeenNavHelp");Object(l.default)(q)&&Boolean(q)?W=!1:window.localStorage.setItem("cesium-hasSeenNavHelp","true")}}catch(e){}I=new fD({container:U,instructionsInitiallyVisible:Object(s.default)(t.navigationInstructionsInitiallyVisible,W)})}if(!Object(l.default)(t.animation)||!1!==t.animation){var X=document.createElement("div");X.className="cesium-viewer-animationContainer",a.appendChild(X),L=new rM(X,new dM(f))}if(!Object(l.default)(t.timeline)||!1!==t.timeline){var K=document.createElement("div");K.className="cesium-viewer-timelineContainer",a.appendChild(K),(j=new KD(K,d)).addEventListener("settime",nP,!1),j.zoomTo(d.startTime,d.stopTime)}if(Object(l.default)(t.fullscreenButton)&&!1===t.fullscreenButton||((B=document.createElement("div")).className="cesium-viewer-fullscreenContainer",a.appendChild(B),R=new YM(B,t.fullscreenElement),N=dE(R.viewModel,"isFullscreenEnabled",(function(e){B.style.display=e?"block":"none",Object(l.default)(j)&&(j.container.style.right=B.clientWidth+"px",j.resize())}))),t.vrButton){var J=document.createElement("div");J.className="cesium-viewer-vrContainer",a.appendChild(J),F=new tP(J,b,t.fullScreenElement),k=dE(F.viewModel,"isVREnabled",(function(e){J.style.display=e?"block":"none",Object(l.default)(R)&&(J.style.right=B.clientWidth+"px"),Object(l.default)(j)&&(j.container.style.right=J.clientWidth+"px",j.resize())})),z=dE(F.viewModel,"isVRMode",(function(e){!function(e,t){var i=e._geocoder,n=e._homeButton,a=e._sceneModePicker,r=e._projectionPicker,o=e._baseLayerPicker,s=e._animation,u=e._timeline,d=e._fullscreenButton,c=e._infoBox,f=e._selectionIndicator,h=t?"hidden":"visible";if(Object(l.default)(i)&&(i.container.style.visibility=h),Object(l.default)(n)&&(n.container.style.visibility=h),Object(l.default)(a)&&(a.container.style.visibility=h),Object(l.default)(r)&&(r.container.style.visibility=h),Object(l.default)(o)&&(o.container.style.visibility=h),Object(l.default)(s)&&(s.container.style.visibility=h),Object(l.default)(u)&&(u.container.style.visibility=h),Object(l.default)(d)&&d.viewModel.isFullscreenEnabled&&(d.container.style.visibility=h),Object(l.default)(c)&&(c.container.style.visibility=h),Object(l.default)(f)&&(f.container.style.visibility=h),e._container){var p=t||!Object(l.default)(d)?0:d.container.clientWidth;e._vrButton.container.style.right=p+"px",e.forceResize()}}(n,e)}))}this._baseLayerPickerDropDown=P,this._fullscreenSubscription=N,this._vrSubscription=k,this._vrModeSubscription=z,this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=Object(s.default)(t.automaticallyTrackDataSourceClocks,!0),this._container=e,this._bottomContainer=o,this._element=a,this._cesiumWidget=m,this._selectionIndicator=v,this._infoBox=y,this._dataSourceCollection=_,this._destroyDataSourceCollection=g,this._dataSourceDisplay=w,this._clockViewModel=f,this._destroyClockViewModel=p,this._toolbar=U,this._homeButton=C,this._sceneModePicker=S,this._projectionPicker=M,this._baseLayerPicker=D,this._navigationHelpButton=I,this._animation=L,this._timeline=j,this._fullscreenButton=R,this._vrButton=F,this._geocoder=E,this._eventHelper=O,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=Object(l.default)(y)||Object(l.default)(v),this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._clockTrackedDataSource=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new c.default,this._trackedEntityChanged=new c.default,UA.track(this,["_trackedEntity","_selectedEntity","_clockTrackedDataSource"]),O.add(_.dataSourceAdded,dP.prototype._onDataSourceAdded,this),O.add(_.dataSourceRemoved,dP.prototype._onDataSourceRemoved,this),O.add(b.postUpdate,dP.prototype.resize,this),O.add(b.postRender,dP.prototype._postRender,this);for(var Z=_.length,Q=0;Q900?(c=169,p<=900&&(u.style.width="169px",u.style.height="112px",this._animation.resize())):i>=600?(c=136,(p<600||p>900)&&(u.style.width="136px",u.style.height="90px",this._animation.resize())):(c=106,(p>600||0===p)&&(u.style.width="106px",u.style.height="70px",this._animation.resize())),f=c+5}if(r&&"hidden"!==window.getComputedStyle(this._timeline.container).visibility){var m=this._fullscreenButton,_=this._vrButton,g=d.container,v=g.style;h=g.clientHeight+3,v.left=c+"px";var y=0;Object(l.default)(m)&&(y+=m.container.clientWidth),Object(l.default)(_)&&(y+=_.container.clientWidth),v.right=y+"px",d.resize()}this._bottomContainer.style.left=f+"px",this._bottomContainer.style.bottom=h+"px",this._lastWidth=i,this._lastHeight=n}},dP.prototype.forceResize=function(){this._lastWidth=0,this.resize()},dP.prototype.render=function(){this._cesiumWidget.render()},dP.prototype.isDestroyed=function(){return!1},dP.prototype.destroy=function(){var e;this.screenSpaceEventHandler.removeInputAction(Qa.default.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(Qa.default.LEFT_DOUBLE_CLICK);var t=this.dataSources,i=t.length;for(e=0;e0?this.clockTrackedDataSource=e.get(a-1):this.clockTrackedDataSource=void 0}},dP.prototype.zoomTo=function(e,t){return cP(this,e,{offset:t},!1)},dP.prototype.flyTo=function(e,t){return cP(this,e,t,!0)},dP.prototype._postRender=function(){!function(e){var t=e._zoomTarget;if(!Object(l.default)(t)||e.scene.mode===Ss.default.MORPHING)return;var i,n,a=e.scene,r=a.camera,o=e._zoomPromise,u=Object(s.default)(e._zoomOptions,{});if(t instanceof Z_.a)return t.readyPromise.then((function(){var n=t.boundingSphere;Object(l.default)(u.offset)||(u.offset=new wn.a(0,-.5,n.radius)),i={offset:u.offset,duration:u.duration,maximumHeight:u.maximumHeight,complete:function(){o.resolve(!0)},cancel:function(){o.resolve(!1)}},e._zoomIsFlight?r.flyToBoundingSphere(t.boundingSphere,i):(r.viewBoundingSphere(n,u.offset),r.lookAtTransform(ce.default.IDENTITY),o.resolve(!0)),fP(e)}));if(t instanceof UO)return t.readyPromise.then((function(){var n=t.boundingSphere;Object(l.default)(u.offset)||(u.offset=new wn.a(0,-.5,n.radius)),i={offset:u.offset,duration:u.duration,maximumHeight:u.maximumHeight,complete:function(){o.resolve(!0)},cancel:function(){o.resolve(!1)}},e._zoomIsFlight?r.flyToBoundingSphere(n,i):(r.viewBoundingSphere(n,u.offset),r.lookAtTransform(ce.default.IDENTITY),o.resolve(!0)),fP(e)}));if(t instanceof x.default)return i={destination:a.mapProjection.ellipsoid.cartographicToCartesian(t),duration:u.duration,maximumHeight:u.maximumHeight,complete:function(){o.resolve(!0)},cancel:function(){o.resolve(!1)}},e._zoomIsFlight?r.flyTo(i):(r.setView(i),o.resolve(!0)),void fP(e);for(var d=t,c=[],f=0,h=d.length;f-t?((n=f).x=this._cameraPosition.x/(a.radii.x+t),n.y=this._cameraPosition.y/(a.radii.y+t),n.z=this._cameraPosition.z/(a.radii.z+t),i=n.x*n.x+n.y*n.y+n.z*n.z-1):(n=this._cameraPositionInScaledSpace,i=this._distanceToLimbInScaledSpaceSquared),b(e,n,i)},d.prototype.computeHorizonCullingPoint=function(e,t,i){return g(this._ellipsoid,e,t,i)};var h=l.default.clone(l.default.UNIT_SPHERE);d.prototype.computeHorizonCullingPointPossiblyUnderEllipsoid=function(e,t,i,n){return g(_(this._ellipsoid,i,h),e,t,n)},d.prototype.computeHorizonCullingPointFromVertices=function(e,t,i,n,a){return y(this._ellipsoid,e,t,i,n,a)},d.prototype.computeHorizonCullingPointFromVerticesPossiblyUnderEllipsoid=function(e,t,i,n,a,r){return y(_(this._ellipsoid,a,h),e,t,i,n,r)};var p=[];d.prototype.computeHorizonCullingPointFromRectangle=function(e,t,i){r.a.typeOf.object("rectangle",e);var o=u.default.subsample(e,t,0,p),s=n.default.fromPoints(o);if(!(a.default.magnitude(s.center)<.1*t.minimumRadius))return this.computeHorizonCullingPoint(s.center,o,i)};var m=new a.default;function _(e,t,i){if(Object(s.default)(t)&&t<0&&e.minimumRadius>-t){var n=a.default.fromElements(e.radii.x+t,e.radii.y+t,e.radii.z+t,m);e=l.default.fromCartesian3(n,i)}return e}function g(e,t,i,n){r.a.typeOf.object("directionToPoint",t),r.a.defined("positions",i),Object(s.default)(n)||(n=new a.default);for(var o=E(e,t),l=0,u=0,d=i.length;u0:s>r&&s*s/a.default.magnitudeSquared(o)>r)}var w=new a.default,O=new a.default;function x(e,t,i){var n=e.transformPositionToScaledSpace(t,w),r=a.default.magnitudeSquared(n),o=Math.sqrt(r),s=a.default.divideByScalar(n,o,O);r=Math.max(1,r);var l=1/(o=Math.max(1,o));return 1/(a.default.dot(s,i)*l-a.default.magnitude(a.default.cross(s,i,s))*(Math.sqrt(r-1)*l))}function A(e,t,i){if(!(t<=0||t===1/0||t!=t))return a.default.multiplyByScalar(e,t,i)}var T=new a.default;function E(e,t){return a.default.equals(t,a.default.ZERO)?t:(e.transformPositionToScaledSpace(t,T),a.default.normalize(T,T))}t.default=d},function(e,t,i){"use strict";i.r(t);var n=i(17),a=i(8),r=i(1),o=i(16),s=i(22),l=i(7),u=i(60),d=i(11),c=i(2),f=i(0),h=i(19),p=i(3),m=i(100),_=i(59),g=i(38),v=i(78),y=i(5),b=i(6),w=i(80),O=i(23),x=i(57),A=i(36),T=i(56),E=i(44),C=i(26),S=i(39),M=i(67),D=i(34),P=i(45),I=i(104),L=i(264),j=i(433),R=i(732),N=i(429),B=i(74),F=i(69),k=i(297),z=i(13),U=k.a.SHOW_INDEX,V=k.a.WIDTH_INDEX,H=k.a.POSITION_INDEX,G=k.a.MATERIAL_INDEX,Y=k.a.POSITION_SIZE_INDEX,W=k.a.DISTANCE_DISPLAY_CONDITION,q=k.a.NUMBER_OF_PROPERTIES,X={texCoordExpandAndBatchIndex:0,position3DHigh:1,position3DLow:2,position2DHigh:3,position2DLow:4,prevPosition3DHigh:5,prevPosition3DLow:6,prevPosition2DHigh:7,prevPosition2DLow:8,nextPosition3DHigh:9,nextPosition3DLow:10,nextPosition2DHigh:11,nextPosition2DLow:12};function K(e){e=Object(c.default)(e,c.default.EMPTY_OBJECT),this.show=Object(c.default)(e.show,!0),this.modelMatrix=b.default.clone(Object(c.default)(e.modelMatrix,b.default.IDENTITY)),this._modelMatrix=b.default.clone(b.default.IDENTITY),this.debugShowBoundingVolume=Object(c.default)(e.debugShowBoundingVolume,!1),this._opaqueRS=void 0,this._translucentRS=void 0,this._colorCommands=[],this._polylinesUpdated=!1,this._polylinesRemoved=!1,this._createVertexArray=!1,this._propertiesChanged=new Uint32Array(q),this._polylines=[],this._polylineBuckets={},this._positionBufferUsage={bufferUsage:A.default.STATIC_DRAW,frameCount:0},this._mode=void 0,this._polylinesToUpdate=[],this._vertexArrays=[],this._positionBuffer=void 0,this._texCoordExpandAndBatchIndexBuffer=void 0,this._batchTable=void 0,this._createBatchTable=!1,this._useHighlightColor=!1,this._highlightColor=l.default.clone(l.default.WHITE);var t=this;this._uniformMap={u_highlightColor:function(){return t._highlightColor}}}Object.defineProperties(K.prototype,{length:{get:function(){return oe(this),this._polylines.length}}}),K.prototype.add=function(e){var t=new k.a(e,this);return t._index=this._polylines.length,this._polylines.push(t),this._createVertexArray=!0,this._createBatchTable=!0,t},K.prototype.remove=function(e){if(this.contains(e)){if(this._polylinesRemoved=!0,this._createVertexArray=!0,this._createBatchTable=!0,Object(f.default)(e._bucket)){var t=e._bucket;t.shaderProgram=t.shaderProgram&&t.shaderProgram.destroy()}return e._destroy(),!0}return!1},K.prototype.removeAll=function(){se(this),ue(this),this._polylineBuckets={},this._polylinesRemoved=!1,this._polylines.length=0,this._polylinesToUpdate.length=0,this._createVertexArray=!0},K.prototype.contains=function(e){return Object(f.default)(e)&&e._polylineCollection===this},K.prototype.get=function(e){if(!Object(f.default)(e))throw new p.default("index is required.");return oe(this),this._polylines[e]};var J=new m.a,Z=new o.a,Q=new a.default;K.prototype.update=function(e){if(oe(this),0!==this._polylines.length&&this.show){!function(e,t){var i=t.mode;e._mode===i&&b.default.equals(e._modelMatrix,e.modelMatrix)||(e._mode=i,e._modelMatrix=b.default.clone(e.modelMatrix),e._createVertexArray=!0)}(this,e);var t,i=e.context,r=e.mapProjection,s=this._propertiesChanged;if(this._createBatchTable){if(0===T.a.maximumVertexTextureImageUnits)throw new O.a("Vertex texture fetch support is required to render polylines. The maximum number of vertex texture image units must be greater than zero.");!function(e,t){Object(f.default)(e._batchTable)&&e._batchTable.destroy();var i=[{functionName:"batchTable_getWidthAndShow",componentDatatype:d.default.UNSIGNED_BYTE,componentsPerAttribute:2},{functionName:"batchTable_getPickColor",componentDatatype:d.default.UNSIGNED_BYTE,componentsPerAttribute:4,normalize:!0},{functionName:"batchTable_getCenterHigh",componentDatatype:d.default.FLOAT,componentsPerAttribute:3},{functionName:"batchTable_getCenterLowAndRadius",componentDatatype:d.default.FLOAT,componentsPerAttribute:4},{functionName:"batchTable_getDistanceDisplayCondition",componentDatatype:d.default.FLOAT,componentsPerAttribute:2}];e._batchTable=new N.a(t,i,e._polylines.length)}(this,i),this._createBatchTable=!1}if(this._createVertexArray||function(e){var t=!1,i=e._propertiesChanged,n=e._positionBufferUsage;i[H]?n.bufferUsage!==A.default.STREAM_DRAW?(t=!0,n.bufferUsage=A.default.STREAM_DRAW,n.frameCount=100):n.frameCount=100:n.bufferUsage!==A.default.STATIC_DRAW&&(0===n.frameCount?(t=!0,n.bufferUsage=A.default.STATIC_DRAW):n.frameCount--);return t}(this))ie(this,i,r);else if(this._polylinesUpdated){var l=this._polylinesToUpdate;if(this._mode!==z.default.SCENE3D)for(var c=l.length,h=0;h2){if(s[H]||s[Y]){var x=e.mode===z.default.SCENE2D?t._boundingVolume2D:t._boundingVolumeWC,M=m.a.fromCartesian(x.center,J),D=o.a.fromElements(M.low.x,M.low.y,M.low.z,x.radius,Z);this._batchTable.setBatchedAttribute(t._index,2,M.high),this._batchTable.setBatchedAttribute(t._index,3,D)}if(s[W]){var P=Q;P.x=0,P.y=Number.MAX_VALUE;var I=t.distanceDisplayCondition;Object(f.default)(I)&&(P.x=I.near,P.y=I.far),this._batchTable.setBatchedAttribute(t._index,4,P)}}t._clean()}l.length=0,this._polylinesUpdated=!1}s=this._propertiesChanged;for(var L=0;L0){var N=O.isTranslucent();l>=s?(x=new E.default({owner:e}),i.push(x)):x=i[l],++l,A=Object(u.default)(p(O._uniforms),e._uniformMap),x.boundingVolume=n.default.clone($,x.boundingVolume),x.modelMatrix=a,x.shaderProgram=M,x.vertexArray=g.va,x.renderState=N?e._translucentRS:e._opaqueRS,x.pass=N?C.default.TRANSLUCENT:C.default.OPAQUE,x.debugShowBoundingVolume=h,x.pickId="v_pickColor",x.uniformMap=A,x.count=I,x.offset=S,S+=I,I=0,d=!0,o.push(x)}(O=j._material).update(r),w=R}for(var B,F=j._locatorBuckets,k=F.length,U=0;U0&&(l>=s?(x=new E.default({owner:e}),i.push(x)):x=i[l],++l,A=Object(u.default)(p(O._uniforms),e._uniformMap),x.boundingVolume=n.default.clone($,x.boundingVolume),x.modelMatrix=a,x.shaderProgram=M,x.vertexArray=g.va,x.renderState=O.isTranslucent()?e._translucentRS:e._opaqueRS,x.pass=O.isTranslucent()?C.default.TRANSLUCENT:C.default.OPAQUE,x.debugShowBoundingVolume=h,x.pickId="v_pickColor",x.uniformMap=A,x.count=I,x.offset=S,d=!0,o.push(x)),w=void 0}i.length=l}(this,e,this._colorCommands,j)}};var $=new n.default,ee=new n.default;K.prototype.isDestroyed=function(){return!1},K.prototype.destroy=function(){return le(this),se(this),ue(this),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(h.default)(this)};var te=[0,0,0];function ie(e,t,i){e._createVertexArray=!1,se(e),le(e),function(e){for(var t=e._mode,i=e._modelMatrix,n=e._polylineBuckets={},a=e._polylines,r=a.length,o=0;o1){s.update();var l=s.material,u=n[l.type];Object(f.default)(u)||(u=n[l.type]=new ce(l,t,i)),u.addPolyline(s)}}}(e);var n,a,r=[[]],o=r[0],s=e._batchTable,l=e._useHighlightColor,u=[0],c=0,h=[[]],p=0,m=e._polylineBuckets;for(n in m)m.hasOwnProperty(n)&&((a=m[n]).updateShader(t,s,l),p+=a.lengthOfPositions);if(p>0){var _,v=e._mode,b=new Float32Array(6*p*3),w=new Float32Array(4*p),O=0,T=0,E=0;for(n in m)if(m.hasOwnProperty(n)){(a=m[n]).write(b,w,O,T,E,s,t,i),v===z.default.MORPHING&&(Object(f.default)(_)||(_=new Float32Array(6*p*3)),a.writeForMorph(_,O));var C=a.lengthOfPositions;O+=6*C*3,T+=4*C,E+=4*C,c=a.updateIndices(r,u,h,c)}var S,M=e._positionBufferUsage.bufferUsage,D=A.default.STATIC_DRAW;e._positionBuffer=x.default.createVertexBuffer({context:t,typedArray:b,usage:M}),Object(f.default)(_)&&(S=x.default.createVertexBuffer({context:t,typedArray:_,usage:M})),e._texCoordExpandAndBatchIndexBuffer=x.default.createVertexBuffer({context:t,typedArray:w,usage:D});for(var P=3*Float32Array.BYTES_PER_ELEMENT,L=4*Float32Array.BYTES_PER_ELEMENT,j=0,R=r.length,N=0;N0){var B=new Uint16Array(o),F=x.default.createIndexBuffer({context:t,typedArray:B,usage:A.default.STATIC_DRAW,indexDatatype:g.a.UNSIGNED_SHORT});j+=u[N];var k,U,V,H,G=6*(N*(P*y.default.SIXTY_FOUR_KILOBYTES)-j*P),Y=P+G,W=P+Y,q=P+W,K=P+q,J=P+K,Z=N*(L*y.default.SIXTY_FOUR_KILOBYTES)-j*L,Q=[{index:X.position3DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:G,strideInBytes:6*P},{index:X.position3DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:Y,strideInBytes:6*P},{index:X.position2DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:G,strideInBytes:6*P},{index:X.position2DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:Y,strideInBytes:6*P},{index:X.prevPosition3DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:W,strideInBytes:6*P},{index:X.prevPosition3DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:q,strideInBytes:6*P},{index:X.prevPosition2DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:W,strideInBytes:6*P},{index:X.prevPosition2DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:q,strideInBytes:6*P},{index:X.nextPosition3DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:K,strideInBytes:6*P},{index:X.nextPosition3DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:J,strideInBytes:6*P},{index:X.nextPosition2DHigh,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:K,strideInBytes:6*P},{index:X.nextPosition2DLow,componentsPerAttribute:3,componentDatatype:d.default.FLOAT,offsetInBytes:J,strideInBytes:6*P},{index:X.texCoordExpandAndBatchIndex,componentsPerAttribute:4,componentDatatype:d.default.FLOAT,vertexBuffer:e._texCoordExpandAndBatchIndexBuffer,offsetInBytes:Z}];v===z.default.SCENE3D?(k=e._positionBuffer,U="vertexBuffer",V=te,H="value"):v===z.default.SCENE2D||v===z.default.COLUMBUS_VIEW?(k=te,U="value",V=e._positionBuffer,H="vertexBuffer"):(k=S,U="vertexBuffer",V=e._positionBuffer,H="vertexBuffer"),Q[0][U]=k,Q[1][U]=k,Q[2][H]=V,Q[3][H]=V,Q[4][U]=k,Q[5][U]=k,Q[6][H]=V,Q[7][H]=V,Q[8][U]=k,Q[9][U]=k,Q[10][H]=V,Q[11][H]=V;var $=new I.default({context:t,attributes:Q,indexBuffer:F});e._vertexArrays.push({va:$,buckets:h[N]})}}}function ne(e,t){return t instanceof P.default?t.id:t}var ae=[];function re(e){var t=F.default._uniformList[e.type],i=t.length;ae.length=2*i;for(var n=0,a=0;a0,x=b._index,A=this.getSegments(b,d),T=A.positions,E=A.lengths,C=T.length,S=b.getPickId(u).color,M=0,D=0,P=0;P0||he.x>0&&pe.x<0)&&r.default.clone(he,pe),(he.x<0&&me.x>0||he.x>0&&me.x<0)&&r.default.clone(he,me));for(var R=j?2:4,N=L?2:0;N2&&(s.setBatchedAttribute(x,2,H),s.setBatchedAttribute(x,3,G),s.setBatchedAttribute(x,4,Y))}};var ye=new r.default,be=new r.default,we=new r.default,Oe=new r.default;ce.prototype.writeForMorph=function(e,t){for(var i=this.modelMatrix,n=this.polylines,a=n.length,o=0;o0&&(l=s[s.length-1]+1);for(var u=this.polylines,d=u.length,c=0;c0))continue;f[0]=p}else f=h._segments.lengths;var m=f.length;if(m>0){for(var _=0,g=0;gy.default.SIXTY_FOUR_KILOBYTES&&(h._locatorBuckets.push({locator:r,count:_}),_=0,t.push(4),s=[],e.push(s),l=0,r.count=o,o=0,n=0,r=new de(0,0,this),i[++a]=[r]),s.push(l,l+2,l+1),s.push(l+1,l+2,l+3),_+=6,o+=6,n+=6,l+=4;h._locatorBuckets.push({locator:r,count:_}),l+4>y.default.SIXTY_FOUR_KILOBYTES&&(t.push(0),s=[],e.push(s),l=0,r.count=o,n=0,o=0,r=new de(0,0,this),i[++a]=[r])}h._clean()}return r.count=o,n},ce.prototype.getPolylineStartIndex=function(e){for(var t=this.polylines,i=0,n=t.length,a=0;a0){e._boundingVolume2D=n.default.fromPoints(s,e._boundingVolume2D);var f=e._boundingVolume2D.center;e._boundingVolume2D.center=new r.default(f.z,f.x,f.y)}return Te.positions=s,Te.lengths=e._segments.lengths,Te},ce.prototype.writeUpdate=function(e,t,i,n){var a=this.mode,o=n.ellipsoid.maximumRadius*y.default.PI,s=t._actualLength;if(s){e+=this.getPolylineStartIndex(t);var l=Ae,u=6*s*3;!Object(f.default)(l)||l.lengthu&&(l=new Float32Array(l.buffer,0,u));var d,c=this.getSegments(t,n),h=c.positions,p=c.lengths,_=0,g=0,v=0;s=h.length;for(var b=0;b0||he.x>0&&pe.x<0)&&r.default.clone(he,pe),(he.x<0&&me.x>0||he.x>0&&me.x<0)&&r.default.clone(he,me));for(var A=x?2:4,T=O?2:0;T1||E>1))for(var j=0;j<_.length;j+=2)_[j]=(_[j]-O)/(T-O),_[j+1]=(_[j+1]-A)/(E-A);var N=function(e,t,i,n){var a=e.length,r=t.normal?new Float32Array(a):void 0,s=t.tangent?new Float32Array(a):void 0,l=t.bitangent?new Float32Array(a):void 0,u=0,d=L,c=I,f=P;if(t.normal||t.tangent||t.bitangent)for(var h=0;h0;i-=p)fe=V(fe,ve,ge=3*i,x,S),ve+=6,s.st&&(me=H(me,ye,2*i,j),ye+=4),a&&(be+=3,he[be++]=R[ge],he[be++]=R[ge+1],he[be++]=R[ge+2]),_e&&(pe[we++]=1,we+=1);if(ae){var Ae=Oe;for(ge=3*Ae,i=0;i<2;i++)fe=V(fe,ve,ge,x,S),ve+=6,s.st&&(me=H(me,ye,2*Ae,j),ye+=4),a&&(be+=3,he[be++]=R[ge],he[be++]=R[ge+1],he[be++]=R[ge+2]),_e&&(pe[we++]=1,we+=1)}else for(i=p-1;i>=0;i--)fe=V(fe,ve,ge=3*i,x,S),ve+=6,s.st&&(me=H(me,ye,2*i,j),ye+=4),a&&(be+=3,he[be++]=R[ge],he[be++]=R[ge+1],he[be++]=R[ge+2]),_e&&(pe[we++]=1,we+=1);var Te=function(e,t,i){var n=e.length,a=t.normal?new Float32Array(n):void 0,r=t.tangent?new Float32Array(n):void 0,s=t.bitangent?new Float32Array(n):void 0,l=0,u=0,d=0,c=!0,f=L,h=I,p=P;if(t.normal||t.tangent||t.bitangent)for(var m=0;m0){const e=Object(r.default)(p.binary_glTF,p.KHR_binary_glTF);Object(o.default)(e)&&(e.extras._pipeline.source=h,delete e.uri)}return Object(a.a)(f,"KHR_binary_glTF"),f}(e,t):function(e,t){const i=t[2];let a,r,s=12;for(;s0){e[0].extras._pipeline.source=r}}return a}(e,t)}},function(e,t,i){"use strict";var n=i(2),a=i(366);function r(e){var t=Object(n.default)(e,{});this.attenuation=Object(n.default)(t.attenuation,!1),this.geometricErrorScale=Object(n.default)(t.geometricErrorScale,1),this.maximumAttenuation=t.maximumAttenuation,this.baseResolution=t.baseResolution,this.eyeDomeLighting=Object(n.default)(t.eyeDomeLighting,!0),this.eyeDomeLightingStrength=Object(n.default)(t.eyeDomeLightingStrength,1),this.eyeDomeLightingRadius=Object(n.default)(t.eyeDomeLightingRadius,1),this.backFaceCulling=Object(n.default)(t.backFaceCulling,!1),this.normalShading=Object(n.default)(t.normalShading,!0)}r.isSupported=function(e){return a.a.isSupported(e.context)},t.a=r},function(e,t,i){"use strict";t.a=Object.freeze({UNLIT:0,PBR:1})},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(15),o=i(24),s=i(98),l=i(9);function u(e){this._definitionChanged=new o.default,this._value=void 0,this._removeSubscription=void 0,this.setValue(e)}Object.defineProperties(u.prototype,{isConstant:{get:function(){return l.default.isConstant(this._value)}},definitionChanged:{get:function(){return this._definitionChanged}},referenceFrame:{get:function(){return Object(n.default)(this._value)?this._value.referenceFrame:s.default.FIXED}}}),u.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,s.default.FIXED,t)},u.prototype.setValue=function(e){this._value!==e&&(this._value=e,Object(n.default)(this._removeSubscription)&&(this._removeSubscription(),this._removeSubscription=void 0),Object(n.default)(e)&&(this._removeSubscription=e.definitionChanged.addEventListener(this._raiseDefinitionChanged,this)),this._definitionChanged.raiseEvent(this))},u.prototype.getValueInReferenceFrame=function(e,t,i){if(!Object(n.default)(e))throw new a.default("time is required.");if(!Object(n.default)(t))throw new a.default("referenceFrame is required.");if(Object(n.default)(this._value))return i=this._value.getValueInReferenceFrame(e,t,i),Object(n.default)(i)?r.default.WGS84.scaleToGeodeticSurface(i,i):void 0},u.prototype.equals=function(e){return this===e||e instanceof u&&this._value===e._value},u.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},t.a=u},function(e,t,i){"use strict";i.r(t);var n=i(0),a=i(3),r=i(24),o=i(189),s=i(9);function l(){this._definitionChanged=new r.default,this._intervals=new o.default,this._intervals.changedEvent.addEventListener(l.prototype._intervalsChanged,this)}Object.defineProperties(l.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}}}),l.prototype.getValue=function(e,t){if(!Object(n.default)(e))throw new a.default("time is required");var i=this._intervals.findDataForIntervalContainingDate(e);return Object(n.default)(i)&&"function"==typeof i.clone?i.clone(t):i},l.prototype.equals=function(e){return this===e||e instanceof l&&this._intervals.equals(e._intervals,s.default.equals)},l.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},t.default=l},function(e,t,i){"use strict";t.a=function(e,t,i,n,a,r,o,s){this.year=e,this.month=t,this.day=i,this.hour=n,this.minute=a,this.second=r,this.millisecond=o,this.isLeapSecond=s}},function(e,t,i){"use strict";t.a=Object.freeze({NONE:0,LERC:1})},function(e,t,i){"use strict";var n=i(1),a=i(7),r=i(53),o=i(2),s=i(0),l=i(19),u=i(3),d=i(447),c=i(772),f=i(43),h=i(12),p=i(79),m=i(166),_=i(119),g=i(241),v=i(27),y=i(61),b=i(64);function w(e){if(e=Object(o.default)(e,o.default.EMPTY_OBJECT),!Object(s.default)(e.camera))throw new u.default("options.camera is required.");this._camera=e.camera,this._frustumSplits=e.frustumSplits,this._color=Object(o.default)(e.color,a.default.CYAN),this._updateOnChange=Object(o.default)(e.updateOnChange,!0),this.show=Object(o.default)(e.show,!0),this.id=e.id,this._id=void 0,this._outlinePrimitives=[],this._planesPrimitives=[]}var O=new n.default,x=new h.default,A=new v.default,T=new _.default,E=new g.a,C=new p.a,S=new m.a,M=new a.default,D=[1,1e5];w.prototype.update=function(e){if(this.show){var t,i,o=this._planesPrimitives,l=this._outlinePrimitives;if(this._updateOnChange){for(i=o.length,t=0;tthis._size)throw new o.default("xOffset + options.source.width must be less than or equal to width.");if(i+e.source.height>this._size)throw new o.default("yOffset + options.source.height must be less than or equal to height.");var u=e.source,d=this._context._gl,c=this._textureTarget,f=this._targetFace;d.activeTexture(d.TEXTURE0),d.bindTexture(c,this._texture);var h=u.width,p=u.height,m=u.arrayBufferView,_=this._size,g=this._pixelFormat,v=this._internalFormat,y=this._pixelDatatype,b=this._preMultiplyAlpha,w=this._flipY,O=Object(a.default)(e.skipColorSpaceConversion,!1),x=4;Object(r.default)(m)&&(x=s.default.alignmentInBytes(g,y,h)),d.pixelStorei(d.UNPACK_ALIGNMENT,x),O?d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,d.NONE):d.pixelStorei(d.UNPACK_COLORSPACE_CONVERSION_WEBGL,d.BROWSER_DEFAULT_WEBGL);var A=!1;if(!this._initialized){if(0===t&&0===i&&h===_&&p===_)Object(r.default)(m)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),w&&(m=s.default.flipY(m,g,y,_,_)),d.texImage2D(f,0,v,_,_,0,g,l.default.toWebGLConstant(y,this._context),m)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,w),d.texImage2D(f,0,v,g,l.default.toWebGLConstant(y,this._context),u)),A=!0;else{d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1);var T=s.default.createTypedArray(g,y,_,_);d.texImage2D(f,0,v,_,_,0,g,l.default.toWebGLConstant(y,this._context),T)}this._initialized=!0}A||(Object(r.default)(m)?(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,!1),w&&(m=s.default.flipY(m,g,y,h,p)),d.texSubImage2D(f,0,t,i,h,p,g,l.default.toWebGLConstant(y,this._context),m)):(d.pixelStorei(d.UNPACK_PREMULTIPLY_ALPHA_WEBGL,b),d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,w),d.texSubImage2D(f,0,t,i,g,l.default.toWebGLConstant(y,this._context),u))),d.bindTexture(c,null)},u.prototype.copyFromFramebuffer=function(e,t,i,r,s,u){if(e=Object(a.default)(e,0),t=Object(a.default)(t,0),i=Object(a.default)(i,0),r=Object(a.default)(r,0),s=Object(a.default)(s,this._size),u=Object(a.default)(u,this._size),n.a.typeOf.number.greaterThanOrEquals("xOffset",e,0),n.a.typeOf.number.greaterThanOrEquals("yOffset",t,0),n.a.typeOf.number.greaterThanOrEquals("framebufferXOffset",i,0),n.a.typeOf.number.greaterThanOrEquals("framebufferYOffset",r,0),e+s>this._size)throw new o.default("xOffset + source.width must be less than or equal to width.");if(t+u>this._size)throw new o.default("yOffset + source.height must be less than or equal to height.");if(this._pixelDatatype===l.default.FLOAT)throw new o.default("Cannot call copyFromFramebuffer when the texture pixel data type is FLOAT.");if(this._pixelDatatype===l.default.HALF_FLOAT)throw new o.default("Cannot call copyFromFramebuffer when the texture pixel data type is HALF_FLOAT.");var d=this._context._gl,c=this._textureTarget;d.activeTexture(d.TEXTURE0),d.bindTexture(c,this._texture),d.copyTexSubImage2D(this._targetFace,0,e,t,i,r,s,u),d.bindTexture(c,null),this._initialized=!0},t.a=u},function(e,t,i){"use strict";var n=i(0),a=i(78),r=i(273),o=i(288),s=i(183);function l(){}function u(e){return e._visible&&e._inRequestVolume}var d={stack:new r.a,stackMaximumLength:0},c={stack:new r.a,stackMaximumLength:0},f={stack:new r.a,stackMaximumLength:0},h={stack:new r.a,stackMaximumLength:0,ancestorStack:new r.a,ancestorStackMaximumLength:0};function p(e){return e._skipLevelOfDetail}function m(e,t){e._emptyTiles.push(t)}function _(e,t,i){if(t.contentVisibility(i)!==a.a.OUTSIDE){var n=t.content;n.featurePropertiesDirty?(n.featurePropertiesDirty=!1,t.lastStyleTime=0,e._selectedTilesToStyle.push(t)):t._selectedFrame0;){f.stackMaximumLength=Math.max(f.stackMaximumLength,n.length);for(var a=n.pop().children,r=a.length,o=0;o0;if((t.hasTilesetContent||t.hasImplicitContent)&&a){var r=t.children[0];return O(e,r,i),void(t._visible=r._visible)}if(!function(e,t,i){var a=t.parent;return!(!Object(n.default)(a)||a.hasTilesetContent||a.hasImplicitContent||a.refine!==s.a.ADD)&&t.getScreenSpaceError(i,!0)<=e._maximumScreenSpaceError}(e,t,i)){var l=t.refine===s.a.REPLACE,d=t._optimChildrenWithinParent===o.a.USE_OPTIMIZATION;return l&&d&&a&&!function(e,t,i){for(var n=!1,a=t.children,r=a.length,o=0;oi._depth+e.skipLevels)}function S(e,t){return 0===t._distanceToCamera&&0===e._distanceToCamera?t._centerZDepth-e._centerZDepth:t._distanceToCamera-e._distanceToCamera}function M(e,t,i,n){var a,r=t.refine===s.a.REPLACE,o=t.children,l=o.length;for(a=0;ai:t._screenSpaceError>i))}function P(e,t){return 0!==t.children.length&&(t.hasTilesetContent||t.hasImplicitContent?!t.contentExpired:t._screenSpaceError>e._maximumScreenSpaceError)}function I(e,t,i,a,r){var o=d.stack;for(o.push(t);o.length>0;){d.stackMaximumLength=Math.max(d.stackMaximumLength,o.length);var l=o.pop();A(l,r);var u=D(e,l,i),c=l.refine===s.a.ADD,f=l.refine===s.a.REPLACE,h=l.parent,p=!Object(n.default)(h)||h._refines,_=!1;P(e,l)&&(_=M(e,l,o,r)&&p);var w=!_&&p;T(l)?(m(e,l),b(e,l,r),w&&g(e,l,r)):c?(g(e,l,r),b(e,l,r)):f&&(u?(b(e,l,r),w&&g(e,l,r)):w?(g(e,l,r),b(e,l,r)):C(e,l)&&b(e,l,r)),v(e,l,r),y(e,l,r),l._refines=_}}function L(e,t,i){var n=!0,a=c.stack;for(a.push(t);a.length>0;){c.stackMaximumLength=Math.max(c.stackMaximumLength,a.length);var r=a.pop(),o=r.children,s=o.length,l=T(r),d=l&&P(e,r),f=l&&0===r.children.length;if(d||r.contentAvailable||f||(n=!1),x(e,r,i),u(r)||(b(e,r,i),y(e,r,i)),d)for(var h=0;h0||o.length>0;){if(h.stackMaximumLength=Math.max(h.stackMaximumLength,r.length),h.ancestorStackMaximumLength=Math.max(h.ancestorStackMaximumLength,o.length),o.length>0){var l=o.peek();if(l._stackLength===r.length){o.pop(),l!==a&&(l._finalResolution=!1),_(e,l,i);continue}}var d=r.pop();if(Object(n.default)(d)){var c=d.refine===s.a.ADD,f=d._shouldSelect,p=d.children,m=p.length,g=P(e,d);if(f)if(c)_(e,d,i);else{if(d._selectionDepth=o.length,d._selectionDepth>0&&(e._hasMixedContent=!0),a=d,!g){_(e,d,i);continue}o.push(d),d._stackLength=r.length}if(g)for(var v=0;v= shadowMap_lightPositionEC.w) \n { \n discard; \n } \n distance /= shadowMap_lightPositionEC.w; // radius \n gl_FragColor = czm_packDepth(distance); \n":i?" gl_FragColor = vec4(1.0); \n":" gl_FragColor = czm_packDepth(gl_FragCoord.z); \n",f+="} \n",s.push(f),new a.default({defines:o,sources:s})},r.getShadowReceiveShaderKeyword=function(e,t,i,n){return"receiveShadow "+e._usesDepthTexture+e._polygonOffsetSupported+e._isPointLight+e._isSpotLight+(e._numberOfCascades>1)+e.debugCascadeColors+e.softShadows+t+i+n},r.createShadowReceiveVertexShader=function(e,t,i){var n=e.defines.slice(0),r=e.sources.slice(0);return n.push("SHADOW_MAP"),t&&(i?n.push("GENERATE_POSITION_AND_NORMAL"):n.push("GENERATE_POSITION")),new a.default({defines:n,sources:r})},r.createShadowReceiveFragmentShader=function(e,t,i,r,o){for(var s=a.default.findNormalVarying(e),l=!r&&Object(n.default)(s)||r&&o,u=a.default.findPositionVarying(e),d=Object(n.default)(u),c=t._usesDepthTexture,f=t._polygonOffsetSupported,h=t._isPointLight,p=t._isSpotLight,m=t._numberOfCascades>1,_=t.debugCascadeColors,g=t.softShadows,v=h?t._pointBias:r?t._terrainBias:t._primitiveBias,y=e.defines.slice(0),b=e.sources.slice(0),w=b.length,O=0;O0&&y.push("USE_NORMAL_SHADING_SMOOTH"));var x="";return x+=h?"uniform samplerCube shadowMap_textureCube; \n":"uniform sampler2D shadowMap_texture; \n",x+="uniform mat4 shadowMap_matrix; \nuniform vec3 shadowMap_lightDirectionEC; \nuniform vec4 shadowMap_lightPositionEC; \nuniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness; \nuniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; \n#ifdef LOG_DEPTH \nvarying vec3 v_logPositionEC; \n#endif \nvec4 getPositionEC() \n{ \n"+(d?" return vec4("+u+", 1.0); \n":"#ifndef LOG_DEPTH \n return czm_windowToEyeCoordinates(gl_FragCoord); \n#else \n return vec4(v_logPositionEC, 1.0); \n#endif \n")+"} \nvec3 getNormalEC() \n{ \n"+(l?" return normalize("+s+"); \n":" return vec3(1.0); \n")+"} \nvoid applyNormalOffset(inout vec4 positionEC, vec3 normalEC, float nDotL) \n{ \n"+(v.normalOffset&&l?" float normalOffset = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.x; \n float normalOffsetScale = 1.0 - nDotL; \n vec3 offset = normalOffset * normalOffsetScale * normalEC; \n positionEC.xyz += offset; \n":"")+"} \n",x+="void main() \n{ \n czm_shadow_receive_main(); \n vec4 positionEC = getPositionEC(); \n vec3 normalEC = getNormalEC(); \n float depth = -positionEC.z; \n",x+=" czm_shadowParameters shadowParameters; \n shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy; \n shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z; \n shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w; \n shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w; \n",r?x+=" shadowParameters.depthBias *= max(depth * 0.01, 1.0); \n":f||(x+=" shadowParameters.depthBias *= mix(1.0, 100.0, depth * 0.0015); \n"),x+=h?" vec3 directionEC = positionEC.xyz - shadowMap_lightPositionEC.xyz; \n float distance = length(directionEC); \n directionEC = normalize(directionEC); \n float radius = shadowMap_lightPositionEC.w; \n // Stop early if the fragment is beyond the point light radius \n if (distance > radius) \n { \n return; \n } \n vec3 directionWC = czm_inverseViewRotation * directionEC; \n shadowParameters.depth = distance / radius; \n shadowParameters.nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n shadowParameters.texCoords = directionWC; \n float visibility = czm_shadowVisibility(shadowMap_textureCube, shadowParameters); \n":p?" vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz); \n float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Spot light uses a perspective projection, so perform the perspective divide \n shadowPosition /= shadowPosition.w; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n":m?" float maxDepth = shadowMap_cascadeSplits[1].w; \n // Stop early if the eye depth exceeds the last cascade \n if (depth > maxDepth) \n { \n return; \n } \n // Get the cascade based on the eye-space depth \n vec4 weights = czm_cascadeWeights(depth); \n // Apply normal offset \n float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n // Transform position into the cascade \n vec4 shadowPosition = czm_cascadeMatrix(weights) * positionEC; \n // Get visibility \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n // Fade out shadows that are far away \n float shadowMapMaximumDistance = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.z; \n float fade = max((depth - shadowMapMaximumDistance * 0.8) / (shadowMapMaximumDistance * 0.2), 0.0); \n visibility = mix(visibility, 1.0, fade); \n"+(_?" // Draw cascade colors for debugging \n gl_FragColor *= czm_cascadeColor(weights); \n":""):" float nDotL = clamp(dot(normalEC, shadowMap_lightDirectionEC), 0.0, 1.0); \n applyNormalOffset(positionEC, normalEC, nDotL); \n vec4 shadowPosition = shadowMap_matrix * positionEC; \n // Stop early if the fragment is not in the shadow bounds \n if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) \n { \n return; \n } \n shadowParameters.texCoords = shadowPosition.xy; \n shadowParameters.depth = shadowPosition.z; \n shadowParameters.nDotL = nDotL; \n float visibility = czm_shadowVisibility(shadowMap_texture, shadowParameters); \n",x+=" gl_FragColor.rgb *= visibility; \n} \n",b.push(x),new a.default({defines:y,sources:b})},t.a=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UNIT_SCALE=void 0;var n=i(1);t.UNIT_SCALE=new n.default(1,1,1)},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.SOLID=0]="SOLID",e[e.PAST_FUTURE=1]="PAST_FUTURE",e[e.PAST_FUTURE_TRACKED=2]="PAST_FUTURE_TRACKED"}(n||(n={})),t.default=n},function(e,t,i){"use strict";i.r(t);var n=i(116),a=i(54),r=i(149),o=i(17),s=i(1),l=i(22),u=i(4),d=i(11),c=i(2),f=i(0),h=i(3),p=i(15),m=i(282),_=i(229),g=i(100),v=i(125),y=i(46),b=i(28),w=i(124),O=i(5),x=i(12),A=i(80),T=i(27),E=i(21),C=i(135),S=[v.a,C.a],M=S.length,D=Math.cos(O.default.toRadians(30)),P=Math.cos(O.default.toRadians(150));function I(e){var t=(e=Object(c.default)(e,c.default.EMPTY_OBJECT)).positions;if(!Object(f.default)(t)||t.length<2)throw new h.default("At least two positions are required.");if(Object(f.default)(e.arcType)&&e.arcType!==a.default.GEODESIC&&e.arcType!==a.default.RHUMB)throw new h.default("Valid options for arcType are ArcType.GEODESIC and ArcType.RHUMB.");this.width=Object(c.default)(e.width,1),this._positions=t,this.granularity=Object(c.default)(e.granularity,9999),this.loop=Object(c.default)(e.loop,!1),this.arcType=Object(c.default)(e.arcType,a.default.GEODESIC),this._ellipsoid=p.default.WGS84,this._projectionIndex=0,this._workerName="createGroundPolylineGeometry",this._scene3DOnly=!1}Object.defineProperties(I.prototype,{packedLength:{get:function(){return 1+3*this._positions.length+1+1+1+p.default.packedLength+1+1}}}),I.setProjectionAndEllipsoid=function(e,t){for(var i=0,n=0;n65535?new Uint32Array(T):new Uint16Array(T),S=new Float64Array(3*x),M=new Float32Array(A),P=new Float32Array(A),I=new Float32Array(A),L=new Float32Array(A),j=new Float32Array(A);u&&(h=new Float32Array(A),p=new Float32Array(A),m=new Float32Array(A),_=new Float32Array(2*x));var R=l.length/2,N=0,B=we;B.height=0;var F=Oe;F.height=0;var k=xe,z=Ae;if(u)for(f=0,c=1;cD?(re=pe(t,B,ue,ne,Be),oe=pe(t,F,Q,ae,Fe)):1===ce?(oe=pe(t,F,Q,ae,Fe),re.x=0,re.y=O.default.sign(B.longitude-Math.abs(F.longitude)),re.z=0):(re=pe(t,B,ue,ne,Be),oe.x=0,oe.y=O.default.sign(B.longitude-F.longitude),oe.z=0)}var he=s.default.distance(le,Z),me=g.a.fromCartesian(se,Ye),_e=s.default.subtract(J,se,ke),ve=s.default.normalize(_e,Ve),et=s.default.subtract(le,se,ze);et=s.default.normalize(et,et);var tt=s.default.cross(ve,et,Ve);tt=s.default.normalize(tt,tt);var it=s.default.cross(et,ue,He);it=s.default.normalize(it,it);var nt=s.default.subtract(Z,J,Ue);nt=s.default.normalize(nt,nt);var at=s.default.cross(Q,nt,Ge);at=s.default.normalize(at,at);var rt,ot,st,lt=he/H,ut=ee/H,dt=0,ct=0,ft=0;if(u){dt=s.default.distance(ne,ae),rt=g.a.fromCartesian(ne,We),ot=s.default.subtract(ae,ne,qe);var ht=(st=s.default.normalize(ot,Xe)).x;st.x=st.y,st.y=-ht,ct=dt/N,ft=te/N}for(V=0;V<8;V++){var pt=X+4*V,mt=W+2*V,_t=pt+3,gt=V<4?1:-1,vt=2===V||3===V||6===V||7===V?1:-1;s.default.pack(me.high,M,pt),M[_t]=_e.x,s.default.pack(me.low,P,pt),P[_t]=_e.y,s.default.pack(it,I,pt),I[_t]=_e.z,s.default.pack(at,L,pt),L[_t]=lt*gt,s.default.pack(tt,j,pt);var yt=ut*vt;0===yt&&vt<0&&(yt=9),j[_t]=yt,u&&(h[pt]=rt.high.x,h[pt+1]=rt.high.y,h[pt+2]=rt.low.x,h[pt+3]=rt.low.y,m[pt]=-re.y,m[pt+1]=re.x,m[pt+2]=oe.y,m[pt+3]=-oe.x,p[pt]=ot.x,p[pt+1]=ot.y,p[pt+2]=st.x,p[pt+3]=st.y,_[mt]=ct*gt,0===(yt=ft*vt)&&vt<0&&(yt=9),_[mt+1]=yt)}var bt=Le,wt=je,Ot=Pe,xt=Ie,At=E.default.fromCartographicArray(Me,De),Tt=n.a.getMinimumMaximumHeights(At,v),Et=Tt.minimumTerrainHeight,Ct=Tt.maximumTerrainHeight;ie+=Et,ie+=Ct,ge(se,le,Et,Ct,bt,Ot),ge(J,Z,Et,Ct,wt,xt);var St=s.default.multiplyByScalar(tt,O.default.EPSILON5,Ke);s.default.add(bt,St,bt),s.default.add(wt,St,wt),s.default.add(Ot,St,Ot),s.default.add(xt,St,xt),ye(bt,wt),ye(Ot,xt),s.default.pack(bt,S,q),s.default.pack(wt,S,q+3),s.default.pack(xt,S,q+6),s.default.pack(Ot,S,q+9),St=s.default.multiplyByScalar(tt,-2*O.default.EPSILON5,Ke),s.default.add(bt,St,bt),s.default.add(wt,St,wt),s.default.add(Ot,St,Ot),s.default.add(xt,St,xt),ye(bt,wt),ye(Ot,xt),s.default.pack(bt,S,q+12),s.default.pack(wt,S,q+15),s.default.pack(xt,S,q+18),s.default.pack(Ot,S,q+21),Y+=2,f+=3,W+=16,q+=24,X+=32,ee+=he,te+=dt}f=0;var Mt=0;for(c=0;cD||rO.default.PI_OVER_TWO&&(u=!0,o=s.default.subtract(r,i,he),c=d.cartesianToCartographic(o,ce)),c.height=0;var f=e.project(c,a);return(a=s.default.subtract(f,n,a)).z=0,a=s.default.normalize(a,a),u&&s.default.negate(a,a),a}var me=new s.default,_e=new s.default;function ge(e,t,i,n,a,r){var o=s.default.subtract(t,e,me);s.default.normalize(o,o);var l=i-0,u=s.default.multiplyByScalar(o,l,_e);s.default.add(e,u,a);var d=n-1e3;u=s.default.multiplyByScalar(o,d,_e),s.default.add(t,u,r)}var ve=new s.default;function ye(e,t){var i=A.default.getPointDistance(Z,e),n=A.default.getPointDistance(Z,t),a=ve;O.default.equalsEpsilon(i,0,O.default.EPSILON2)?(a=G(t,e,a),s.default.multiplyByScalar(a,O.default.EPSILON2,a),s.default.add(e,a,e)):O.default.equalsEpsilon(n,0,O.default.EPSILON2)&&(a=G(e,t,a),s.default.multiplyByScalar(a,O.default.EPSILON2,a),s.default.add(t,a,t))}function be(e,t){var i=Math.abs(e.longitude),n=Math.abs(t.longitude);if(O.default.equalsEpsilon(i,O.default.PI,O.default.EPSILON11)){var a=O.default.sign(t.longitude);return e.longitude=a*(i-O.default.EPSILON11),1}if(O.default.equalsEpsilon(n,O.default.PI,O.default.EPSILON11)){var r=O.default.sign(e.longitude);return t.longitude=r*(n-O.default.EPSILON11),2}return 0}var we=new l.default,Oe=new l.default,xe=new s.default,Ae=new s.default,Te=new s.default,Ee=new s.default,Ce=new s.default,Se=new s.default,Me=[we,Oe],De=new E.default,Pe=new s.default,Ie=new s.default,Le=new s.default,je=new s.default,Re=new s.default,Ne=new s.default,Be=new s.default,Fe=new s.default,ke=new s.default,ze=new s.default,Ue=new s.default,Ve=new s.default,He=new s.default,Ge=new s.default,Ye=new g.a,We=new g.a,qe=new s.default,Xe=new s.default,Ke=new s.default,Je=[new o.default,new o.default],Ze=[0,2,1,0,3,2,0,7,3,0,4,7,0,5,4,0,1,5,5,7,4,5,6,7,5,2,6,5,1,2,3,6,2,3,7,6],Qe=Ze.length;function $e(e){return new b.default({componentDatatype:d.default.FLOAT,componentsPerAttribute:4,normalize:!1,values:e})}I._projectNormal=pe,t.default=I},function(e,t,i){"use strict";var n=i(4),a=/^data:/i;t.a=function(e){return n.a.typeOf.string("uri",e),a.test(e)}},function(e,t,i){"use strict";var n=i(4),a=i(11),r=i(2),o=i(0),s=i(19),l=i(3),u=i(5),d=i(57),c=i(36),f=i(104);function h(e,t,i,s){if(n.a.defined("context",e),!t||0===t.length)throw new l.default("At least one attribute is required.");var u=h._verifyAttributes(t);i=Object(r.default)(i,0);for(var d,c,f=[],p={},m=u.length,_=0;_0?a.default.getSizeInBytes(e[0].componentDatatype):0,s=o>0?t%o:0;return t+=0===s?0:o-s},h._createArrayViews=function(e,t){for(var i=[],n=0,r=e.length,o=0;o0){var i=new ArrayBuffer(t*e.vertexSizeInBytes);if(Object(o.default)(e.arrayBuffer))for(var n=new Uint8Array(i),r=new Uint8Array(e.arrayBuffer),s=r.length,l=0;l0){t.needsCommit=!1;var i=t.vertexBuffer,n=e._size*t.vertexSizeInBytes,a=Object(o.default)(i);if(!a||i.sizeInBytes0){var n=e.vertexSizeInBytes*t,a=e.vertexSizeInBytes*i;e.vertexBuffer.copyFromArrayView(new Uint8Array(e.arrayBuffer,n,a),n)}}function g(e){var t=e.va;if(Object(o.default)(t)){for(var i=t.length,n=0;n=this._size)throw new l.default("offsetInVertices must be greater than or equal to zero and less than the vertex array size.");if(e+t>this._size)throw new l.default("offsetInVertices + lengthInVertices cannot exceed the vertex array size.");for(var i=this._allBuffers,n=0,a=i.length;n1e3){var r="N/A";i&&(r=1e3*this._fpsFrameCount/a|0),this._fpsText.nodeValue=r+" FPS",this._lastFpsSampleTime=t,this._fpsFrameCount=0}this._msFrameCount++;var o=t-this._lastMsSampleTime;if(o>200){var l="N/A";i&&(l=(o/this._msFrameCount).toFixed(2)),this._msText.nodeValue=l+" MS",this._lastMsSampleTime=t,this._msFrameCount=0}},u.prototype.destroy=function(){return Object(r.default)(this)},t.a=u},function(e,t,i){"use strict";var n=i(0),a=i(309),r=i(110),o=i(452);t.a=function(e,t,i,s){if(r.a.prototype._onEntityPropertyChanged.call(this,e,t,i,s),-1!==this._observedPropertyNames.indexOf(t)){var l=this._entity[this._geometryPropertyName];if(Object(n.default)(l)){Object(n.default)(this._terrainOffsetProperty)&&(this._terrainOffsetProperty.destroy(),this._terrainOffsetProperty=void 0);var u=l.heightReference;if(Object(n.default)(u)){var d=new a.a(this._computeCenter.bind(this),!this._dynamic);this._terrainOffsetProperty=new o.a(this._scene,d,u)}}}}},function(e,t,i){"use strict";var n=i(18),a=i(4),r=i(2),o=i(0),s=i(30);t.a=function(e){var t=e.uint8Array,i=e.format,l=e.request,u=Object(r.default)(e.flipY,!1),d=Object(r.default)(e.skipColorSpaceConversion,!1);a.a.typeOf.object("uint8Array",t),a.a.typeOf.string("format",i);var c,f=new Blob([t],{type:i});return s.default.supportsImageBitmapOptions().then((function(e){return e?Object(n.a)(s.default.createImageBitmapFromBlob(f,{flipY:u,premultiplyAlpha:!1,skipColorSpaceConversion:d})):(c=window.URL.createObjectURL(f),new s.default({url:c,request:l}).fetchImage({flipY:u,skipColorSpaceConversion:d}))})).then((function(e){return Object(o.default)(c)&&window.URL.revokeObjectURL(c),e})).otherwise((function(e){return Object(o.default)(c)&&window.URL.revokeObjectURL(c),n.a.reject(e)}))}},function(e,t,i){"use strict";var n=i(144),a=i(25),r=i(191),o=i(2),s=i(0),l=i(10);function u(e){Object(s.default)(e)&&(e.texCoord=Object(o.default)(e.texCoord,0))}t.a=function(e){a.a.accessor(e,(function(e){Object(s.default)(e.bufferView)&&(e.byteOffset=Object(o.default)(e.byteOffset,0))})),a.a.bufferView(e,(function(e){Object(s.default)(e.buffer)&&(e.byteOffset=Object(o.default)(e.byteOffset,0))})),a.a.mesh(e,(function(t){a.a.meshPrimitive(t,(function(t){if(t.mode=Object(o.default)(t.mode,l.a.TRIANGLES),!Object(s.default)(t.material)){Object(s.default)(e.materials)||(e.materials=[]);const i={name:"default"};t.material=Object(n.a)(e.materials,i)}}))})),a.a.accessorContainingVertexAttributeData(e,(function(t){const i=e.accessors[t],n=i.bufferView;if(i.normalized=Object(o.default)(i.normalized,!1),Object(s.default)(n)){const t=e.bufferViews[n];t.byteStride=Object(r.a)(e,i),t.target=l.a.ARRAY_BUFFER}})),a.a.accessorContainingIndexData(e,(function(t){const i=e.accessors[t].bufferView;if(Object(s.default)(i)){e.bufferViews[i].target=l.a.ELEMENT_ARRAY_BUFFER}})),a.a.material(e,(function(e){const t=Object(o.default)(e.extensions,o.default.EMPTY_OBJECT),i=t.KHR_materials_common;if(Object(s.default)(i)){const e=i.technique,t=Object(s.default)(i.values)?i.values:{};return i.values=t,t.ambient=Object(s.default)(t.ambient)?t.ambient:[0,0,0,1],t.emission=Object(s.default)(t.emission)?t.emission:[0,0,0,1],t.transparency=Object(o.default)(t.transparency,1),t.transparent=Object(o.default)(t.transparent,!1),t.doubleSided=Object(o.default)(t.doubleSided,!1),void("CONSTANT"!==e&&(t.diffuse=Object(s.default)(t.diffuse)?t.diffuse:[0,0,0,1],"LAMBERT"!==e&&(t.specular=Object(s.default)(t.specular)?t.specular:[0,0,0,1],t.shininess=Object(o.default)(t.shininess,0))))}e.emissiveFactor=Object(o.default)(e.emissiveFactor,[0,0,0]),e.alphaMode=Object(o.default)(e.alphaMode,"OPAQUE"),e.doubleSided=Object(o.default)(e.doubleSided,!1),"MASK"===e.alphaMode&&(e.alphaCutoff=Object(o.default)(e.alphaCutoff,.5));const n=t.KHR_techniques_webgl;Object(s.default)(n)&&a.a.materialValue(e,(function(e){Object(s.default)(e.index)&&u(e)})),u(e.emissiveTexture),u(e.normalTexture),u(e.occlusionTexture);const r=e.pbrMetallicRoughness;Object(s.default)(r)&&(r.baseColorFactor=Object(o.default)(r.baseColorFactor,[1,1,1,1]),r.metallicFactor=Object(o.default)(r.metallicFactor,1),r.roughnessFactor=Object(o.default)(r.roughnessFactor,1),u(r.baseColorTexture),u(r.metallicRoughnessTexture));const l=t.KHR_materials_pbrSpecularGlossiness;Object(s.default)(l)&&(l.diffuseFactor=Object(o.default)(l.diffuseFactor,[1,1,1,1]),l.specularFactor=Object(o.default)(l.specularFactor,[1,1,1]),l.glossinessFactor=Object(o.default)(l.glossinessFactor,1),u(l.specularGlossinessTexture))})),a.a.animation(e,(function(e){a.a.animationSampler(e,(function(e){e.interpolation=Object(o.default)(e.interpolation,"LINEAR")}))}));const t=function(e){const t={};return a.a.animation(e,(function(e){a.a.animationChannel(e,(function(e){const i=e.target,n=i.node,a=i.path;"translation"!==a&&"rotation"!==a&&"scale"!==a||(t[n]=!0)}))})),t}(e);return a.a.node(e,(function(e,i){Object(s.default)(t[i])||Object(s.default)(e.translation)||Object(s.default)(e.rotation)||Object(s.default)(e.scale)?(e.translation=Object(o.default)(e.translation,[0,0,0]),e.rotation=Object(o.default)(e.rotation,[0,0,0,1]),e.scale=Object(o.default)(e.scale,[1,1,1])):e.matrix=Object(o.default)(e.matrix,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])})),a.a.sampler(e,(function(e){e.wrapS=Object(o.default)(e.wrapS,l.a.REPEAT),e.wrapT=Object(o.default)(e.wrapT,l.a.REPEAT)})),Object(s.default)(e.scenes)&&!Object(s.default)(e.scene)&&(e.scene=0),e}},function(e,t,i){"use strict";var n=i(310),a=i(144),r=i(520),o=i(25),s=i(191),l=i(192),u=i(857),d=i(858),c=i(860),f=i(861),h=i(1),p=i(16),m=i(50),_=i(11),g=i(2),v=i(0),y=i(6),b=i(27),w=i(10);const O={.8:function(e){Object(v.default)(e.asset)||(e.asset={});const t=e.asset;if(t.version="1.0","string"==typeof t.profile){const e=t.profile.split(" ");t.profile={api:e[0],version:e[1]}}else t.profile={};Object(v.default)(e.version)&&delete e.version;x(e),A(e),T(e),E(e),C(e),Object(v.default)(e.allExtensions)&&(e.extensionsUsed=e.allExtensions,delete e.allExtensions);if(Object(v.default)(e.lights)){const t=Object(g.default)(e.extensions,{});e.extensions=t;const i=Object(g.default)(t.KHR_materials_common,{});t.KHR_materials_common=i,i.lights=e.lights,delete e.lights,Object(n.a)(e,"KHR_materials_common")}},"1.0":function(e){e.asset=Object(g.default)(e.asset,{}),e.asset.version="2.0",x(e),function(e){const t=e.animations;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const i=t[e],n=i.parameters;if(Object(v.default)(n)){const e=i.samplers;for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];i.input=n[i.input],i.output=n[i.output]}delete i.parameters}}}(e),function(e){o.a.node(e,(function(t,i){L(t)&&function e(t,i){o.a.scene(t,(function(e){const t=e.nodes;if(Object(v.default)(t)){for(let e=t.length;e>=0;--e)if(t[e]===i)return void t.splice(e,1)}})),o.a.node(t,(function(n,a){if(Object(v.default)(n.children)){const r=n.children.indexOf(i);r>-1&&(n.children.splice(r,1),L(n)&&e(t,a))}})),delete t.nodes[i]}(e,i)}))}(e),function(e){let t;const i={accessors:{},animations:{},buffers:{},bufferViews:{},cameras:{},images:{},materials:{},meshes:{},nodes:{},programs:{},samplers:{},scenes:{},shaders:{},skins:{},textures:{},techniques:{}};let n;const r={},s=e.nodes;for(const e in s)Object.prototype.hasOwnProperty.call(s,e)&&(n=s[e].jointName,Object(v.default)(n)&&(r[n]=e));for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Object(v.default)(i[t])){const n={},a=e[t];e[t]=S(a,n),i[t]=n}for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(r[n]=i.nodes[r[n]]);Object(v.default)(e.scene)&&(e.scene=i.scenes[e.scene]);o.a.bufferView(e,(function(e){Object(v.default)(e.buffer)&&(e.buffer=i.buffers[e.buffer])})),o.a.accessor(e,(function(e){Object(v.default)(e.bufferView)&&(e.bufferView=i.bufferViews[e.bufferView])})),o.a.shader(e,(function(e){const t=e.extensions;if(Object(v.default)(t)){const n=t.KHR_binary_glTF;Object(v.default)(n)&&(e.bufferView=i.bufferViews[n.bufferView],delete t.KHR_binary_glTF),0===Object.keys(t).length&&delete e.extensions}})),o.a.program(e,(function(e){Object(v.default)(e.vertexShader)&&(e.vertexShader=i.shaders[e.vertexShader]),Object(v.default)(e.fragmentShader)&&(e.fragmentShader=i.shaders[e.fragmentShader])})),o.a.technique(e,(function(e){Object(v.default)(e.program)&&(e.program=i.programs[e.program]),o.a.techniqueParameter(e,(function(e){Object(v.default)(e.node)&&(e.node=i.nodes[e.node]);const t=e.value;"string"==typeof t&&(e.value={index:i.textures[t]})}))})),o.a.mesh(e,(function(e){o.a.meshPrimitive(e,(function(e){Object(v.default)(e.indices)&&(e.indices=i.accessors[e.indices]),o.a.meshPrimitiveAttribute(e,(function(t,n){e.attributes[n]=i.accessors[t]})),Object(v.default)(e.material)&&(e.material=i.materials[e.material])}))})),o.a.node(e,(function(n){let r=n.children;if(Object(v.default)(r)){const e=r.length;for(t=0;t0)for(n.mesh=i.meshes[o[0]],t=1;t0&&Object(v.default)(n.skin)){e.skins[n.skin].skeleton=i.nodes[t[0]]}delete n.skeletons}Object(v.default)(n.jointName)&&delete n.jointName})),o.a.skin(e,(function(e){Object(v.default)(e.inverseBindMatrices)&&(e.inverseBindMatrices=i.accessors[e.inverseBindMatrices]);const n=e.jointNames;if(Object(v.default)(n)){const i=[],a=n.length;for(t=0;t=0&&(a=i.substring(0,e),r=i.substring(e));const o=P[a];Object(v.default)(o)?(n=o+r,t[i]=n):Object(v.default)(D[a])||(n="_"+i,t[i]=n)}}));for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)){const n=t[i],a=e.attributes[i];Object(v.default)(a)&&(delete e.attributes[i],e.attributes[n]=a)}}))})),o.a.technique(e,(function(e){o.a.techniqueParameter(e,(function(e){const i=t[e.semantic];Object(v.default)(i)&&(e.semantic=i)}))}))}(e),Object(f.a)(e),function(e){o.a.camera(e,(function(e){const t=e.perspective;if(Object(v.default)(t)){const e=t.aspectRatio;Object(v.default)(e)&&0===e&&delete t.aspectRatio;const i=t.yfov;Object(v.default)(i)&&0===i&&(t.yfov=1)}}))}(e),Object(u.a)(e),Object(d.a)(e),function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const i=e[t];Array.isArray(i)&&0===i.length&&delete e[t]}o.a.node(e,(function(e){Object(v.default)(e.children)&&0===e.children.length&&delete e.children}))}(e)},"2.0":void 0};function x(e){const t=e.materials;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const i=t[e],n=i.instanceTechnique;Object(v.default)(n)&&(i.technique=n.technique,i.values=n.values,delete i.instanceTechnique)}}function A(e){const t=e.meshes;for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const i=t[e].primitives;if(Object(v.default)(i)){const e=i.length;for(let t=0;t0;){var c=t.pop();if(a.default.equals(c.color,o.color))d=k(l,u,d,i,n,c.batchIds,r),o.batchIds=o.batchIds.concat(c.batchIds),o.count=d-o.offset;else{var f=d;d=k(l,u,d,i,n,c.batchIds,r),c.offset=f,c.count=d-f,s.push(c),o=c}}var h=e._va;e._va=e._vaSwap,e._vaSwap=h,e._batchedIndices=s}(e,i):function(e,t){var i=e._indices,n=e._indexOffsets,r=e._indexCounts,o=e._batchIdLookUp,s=new i.constructor(i.length),l=t.pop(),u=[l],d=F(i,s,0,n,r,l.batchIds,o);for(l.offset=0,l.count=d;t.length>0;){var c=t.pop();if(a.default.equals(c.color,l.color))d=F(i,s,d,n,r,c.batchIds,o),l.batchIds=l.batchIds.concat(c.batchIds),l.count=d-l.offset;else{var f=d;d=F(i,s,d,n,r,c.batchIds,o),c.offset=f,c.count=d-f,u.push(c),l=c}}e._va.indexBuffer.copyFromArrayView(s),e._indices=s,e._batchedIndices=u}(e,i),e._framesSinceLastRebatch=0,e._batchDirty=!1,e._pickCommandsDirty=!0,e._wireframeDirty=!0,!0):(e._batchDirty=!1,!1)}P.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,a=0;a=h&&u0&&(c._credit=new o.a(t.copyrightText)),c._ready=!0,c._readyPromise.resolve(!0),g.a.handleSuccess(r)}function O(e){var t="An error occurred while accessing "+c._resource.url+".";r=g.a.handleError(r,c,c._errorEvent,t,void 0,void 0,void 0,x),c._readyPromise.reject(new _.a(t))}function x(){var e=c._resource.getDerivedResource({queryParameters:{f:"json"}}).fetchJsonp();Object(b.a)(e,h,O)}this._useTiles?x():(this._ready=!0,this._readyPromise.resolve(!0))}function T(e,t,i,n,a){var r;if(e._useTiles)r=e._resource.getDerivedResource({url:"tile/"+n+"/"+i+"/"+t,request:a});else{var o=e._tilingScheme.tileXYToNativeRectangle(t,i,n),s={bbox:o.west+","+o.south+","+o.east+","+o.north,size:e._tileWidth+","+e._tileHeight,format:"png32",transparent:!0,f:"image"};e._tilingScheme.projection instanceof c.a?(s.bboxSR=4326,s.imageSR=4326):(s.bboxSR=3857,s.imageSR=3857),e.layers&&(s.layers="show:"+e.layers),r=e._resource.getDerivedResource({url:"export",request:a,queryParameters:s})}return r}Object.defineProperties(A.prototype,{url:{get:function(){return this._resource._url}},token:{get:function(){return this._resource.queryParameters.token}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new u.default("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new u.default("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new u.default("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new u.default("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new u.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new u.default("rectangle must not be called before the imagery provider is ready.");return this._rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new u.default("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},usingPrecachedTiles:{get:function(){return this._useTiles}},hasAlphaChannel:{get:function(){return!0}},layers:{get:function(){return this._layers}}}),A.prototype.getTileCredits=function(e,t,i){},A.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new u.default("requestImage must not be called before the imagery provider is ready.");return x.a.loadImage(this,T(this,e,t,i,n))},A.prototype.pickFeatures=function(e,t,i,n,o){if(!this._ready)throw new u.default("pickFeatures must not be called before the imagery provider is ready.");if(this.enablePickFeatures){var s,d,f,p=this._tilingScheme.tileXYToNativeRectangle(e,t,i);if(this._tilingScheme.projection instanceof c.a)s=h.default.toDegrees(n),d=h.default.toDegrees(o),f="4326";else{var m=this._tilingScheme.projection.project(new r.default(n,o,0));s=m.x,d=m.y,f="3857"}var _="visible";Object(l.default)(this._layers)&&(_+=":"+this._layers);var g={f:"json",tolerance:2,geometryType:"esriGeometryPoint",geometry:s+","+d,mapExtent:p.west+","+p.south+","+p.east+","+p.north,imageDisplay:this._tileWidth+","+this._tileHeight+",96",sr:f,layers:_};return this._resource.getDerivedResource({url:"identify",queryParameters:g}).fetchJson().then((function(e){var t=[],i=e.results;if(!Object(l.default)(i))return t;for(var n=0;n=t?t:P.a.maximumCubeMapSize,r.x=t,r.y=t;var o=new n.a(0,0,t,t);i[0].passState.viewport=o,i[1].passState.viewport=o,i[2].passState.viewport=o,i[3].passState.viewport=o,i[4].passState.viewport=o,i[5].passState.viewport=o}else 1===a?(t=P.a.maximumTextureSize>=t?t:P.a.maximumTextureSize,r.x=t,r.y=t,i[0].passState.viewport=new n.a(0,0,t,t)):4===a&&(t=P.a.maximumTextureSize>=2*t?t:P.a.maximumTextureSize/2,r.x=2*t,r.y=2*t,i[0].passState.viewport=new n.a(0,0,t,t),i[1].passState.viewport=new n.a(t,0,t,t),i[2].passState.viewport=new n.a(0,t,t,t),i[3].passState.viewport=new n.a(t,t,t,t));e._clearPassState.viewport=new n.a(0,0,r.x,r.y);for(var s=0;s=e.maximumDistance)return e._outOfView=!0,void(e._needsUpdate=!1);var o=t.mapProjection.ellipsoid.geodeticSurfaceNormal(i.positionWC,Ee),l=s.default.negate(n.directionWC,Ce),u=s.default.dot(o,l);if(e.fadingEnabled){var d=O.default.clamp(u/.1,0,1);e._darkness=O.default.lerp(1,e.darkness,d)}else e._darkness=e.darkness;if(u<0)return e._outOfView=!0,void(e._needsUpdate=!1);e._needsUpdate=!0,e._outOfView=!1}else if(e._isPointLight)r.center=n.positionWC,r.radius=e._pointLightRadius,e._outOfView=t.cullingVolume.computeVisibility(r)===w.a.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),a.default.clone(r,e._boundingSphere);else{var c=n.frustum.far/2,f=s.default.add(n.positionWC,s.default.multiplyByScalar(n.directionWC,c,Me),Me);r.center=f,r.radius=c,e._outOfView=t.cullingVolume.computeVisibility(r)===w.a.OUTSIDE,e._needsUpdate=!e._outOfView&&!e._boundingSphere.equals(r),a.default.clone(r,e._boundingSphere)}}(e,t),!e._outOfViewPrevious&&e._outOfView&&(e._needsUpdate=!0),e._outOfViewPrevious=e._outOfView}K.prototype.update=function(e){if(De(this,e),this._needsUpdate)if(te(this,e.context),this._isPointLight&&function(e,t){var i=new T.default;i.fov=O.default.PI_OVER_TWO,i.near=1,i.far=e._pointLightRadius,i.aspectRatio=1;for(var n=0;n<6;++n){var a=e._passes[n].camera;a.positionWC=e._shadowMapCamera.positionWC,a.positionCartographic=t.mapProjection.ellipsoid.cartesianToCartographic(a.positionWC,a.positionCartographic),a.directionWC=xe[n],a.upWC=Ae[n],a.rightWC=Te[n],x.default.computeView(a.positionWC,a.directionWC,a.upWC,a.rightWC,a.viewMatrix),x.default.inverse(a.viewMatrix,a.inverseViewMatrix),a.frustum=i}}(this,e),this._cascadesEnabled&&(function(e,t){var i=e._shadowMapCamera,n=e._sceneCamera,a=x.default.multiply(n.frustum.projectionMatrix,n.viewMatrix,oe),r=x.default.inverse(a,oe),o=i.directionWC,u=n.directionWC;s.default.equalsEpsilon(o,u,O.default.EPSILON10)&&(u=n.upWC);var d=s.default.cross(o,u,be);u=s.default.cross(d,o,we),s.default.normalize(u,u),s.default.normalize(d,d);for(var c=s.default.fromElements(0,0,0,Oe),f=x.default.computeView(c,o,u,d,ye),h=x.default.multiply(f,r,oe),p=s.default.fromElements(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,ge),m=s.default.fromElements(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE,ve),_=0;_<8;++_){var g=l.a.clone(re[_],se[_]);x.default.multiplyByVector(h,g,g),s.default.divideByScalar(g,g.w,g),s.default.minimumByComponent(g,p,p),s.default.maximumByComponent(g,m,m)}m.z+=1e3,p.z-=10;var v=Oe;v.x=-.5*(p.x+m.x),v.y=-.5*(p.y+m.y),v.z=-m.z;var y=x.default.fromTranslation(v,oe);f=x.default.multiply(y,f,f);var b=.5*(m.x-p.x),w=.5*(m.y-p.y),A=m.z-p.z,T=i.frustum;T.left=-b,T.right=b,T.bottom=-w,T.top=w,T.near=.01,T.far=A,x.default.clone(f,i.viewMatrix),x.default.inverse(f,i.inverseViewMatrix),x.default.getTranslation(i.inverseViewMatrix,i.positionWC),t.mapProjection.ellipsoid.cartesianToCartographic(i.positionWC,i.positionCartographic),s.default.clone(o,i.directionWC),s.default.clone(u,i.upWC),s.default.clone(d,i.rightWC)}(this,e),this._numberOfCascades>1&&function(e,t){var i,n=e._shadowMapCamera,a=e._sceneCamera,r=a.frustum.near,o=a.frustum.far,u=e._numberOfCascades,d=o-r,c=o/r,f=.9,h=!1;t.shadowState.closestObjectSize<200&&(h=!0,f=.9);var p=_e,m=pe;for(m[0]=r,m[u]=o,i=0;i0,o=t.shaderProgram,s=o.vertexShaderSource,l=o.fragmentShaderSource,u=t.pass===R.default.GLOBE,d=!1;if(u&&(d=t.owner.data.renderedMesh.encoding.hasVertexNormals),t.receiveShadows&&r){var c,f;Object(_.default)(a.receiveCommand)&&(c=a.receiveCommand.shaderProgram,f=a.receiveCommand.uniformMap),a.receiveCommand=L.default.shallowClone(t,a.receiveCommand),a.castShadows=!1,a.receiveShadows=!0;var h=a.receiveShaderCastShadows!==t.castShadows,p=a.receiveShaderProgramId!==t.shaderProgram.id;if(!Object(_.default)(c)||p||i||h){var m=X.a.getShadowReceiveShaderKeyword(e[0],t.castShadows,u,d);if(c=n.shaderCache.getDerivedShaderProgram(o,m),!Object(_.default)(c)){var g=X.a.createShadowReceiveVertexShader(s,u,d),v=X.a.createShadowReceiveFragmentShader(l,e[0],t.castShadows,u,d);c=n.shaderCache.createDerivedShaderProgram(o,m,{vertexShaderSource:g,fragmentShaderSource:v,attributeLocations:o._attributeLocations})}f=Ie(e[0],t.uniformMap,u)}a.receiveCommand.shaderProgram=c,a.receiveCommand.uniformMap=f,a.receiveShaderProgramId=t.shaderProgram.id,a.receiveShaderCastShadows=t.castShadows}return a},K.createCastDerivedCommand=function(e,t,i,n,a){if(Object(_.default)(a)||(a={}),t.castShadows){var r=a.castCommands;Object(_.default)(r)||(r=a.castCommands=[]);var o=a.castShaderProgramId,s=e.length;r.length=s;for(var l=0;l>BigInt(61)),i=1&t,n=0,a=0,r=7;r>=0;r--){var o=(1<<2*(7===r?2:4))-1;i+=Number(e>>BigInt(2*r*4+1)&BigInt(o))<<2;var s=4*r;n+=(i=h[i])>>6<>2&15)<=.5?1/3*(4*e*e-1):1/3*(1-4*(1-e)*(1-e))}function b(e){return 1/(1<<31>>>0)*e}function w(e){return 1/(1<<30)*e}function O(e,t,i,n,a,r){if(4===e){var o=(t<<4)+i;f[(o<<2)+n]=(a<<2)+r,h[(a<<2)+n]=(o<<2)+r}else{e++,i<<=1,a<<=2;var s=p[r];O(e,(t<<=1)+(s[0]>>1),i+(1&s[0]),n,a,r^m[0]),O(e,t+(s[1]>>1),i+(1&s[1]),n,a+1,r^m[1]),O(e,t+(s[2]>>1),i+(1&s[2]),n,a+2,r^m[2]),O(e,t+(s[3]>>1),i+(1&s[3]),n,a+3,r^m[3])}}function x(e){return e&~e+BigInt(1)}_.fromToken=function(e){if(r.a.typeOf.string("token",e),!_.isValidToken(e))throw new l.default("token is invalid.");return new _(_.getIdFromToken(e))},_.isValidId=function(e){return r.a.typeOf.bigint("cellId",e),!(e<=0)&&(!(e>>BigInt(61)>5)&&!!(e&~e+BigInt(1)&BigInt("0x1555555555555555")))},_.isValidToken=function(e){return r.a.typeOf.string("token",e),!!/^[0-9a-fA-F]{1,16}$/.test(e)&&_.isValidId(_.getIdFromToken(e))},_.getIdFromToken=function(e){return r.a.typeOf.string("token",e),BigInt("0x"+e+"0".repeat(16-e.length))},_.getTokenFromId=function(e){r.a.typeOf.bigint("cellId",e);var t,i=Math.floor(A[(-(t=e)&t)%BigInt(67)]/4),n=e.toString(16).replace(/0*$/,"");return Array(17-i-n.length).join("0")+n},_.getLevel=function(e){if(r.a.typeOf.bigint("cellId",e),!_.isValidId(e))throw new l.default;for(var t=0;e!==BigInt(0)&&!(e&BigInt(1));)t++,e>>=BigInt(1);return 30-(t>>1)},_.prototype.getChild=function(e){if(r.a.typeOf.number("index",e),e<0||e>3)throw new l.default("child index must be in the range [0-3].");if(30===this._level)throw new l.default("cannot get child of leaf cell.");var t=x(this._cellId)>>BigInt(2);return new _(this._cellId+BigInt(2*e+1-4)*t)},_.prototype.getParent=function(){if(0===this._level)throw new l.default("cannot get parent of root cell.");var e=x(this._cellId)<>BigInt(2))&BigInt(1),l=o?1:s?2:0;return[n,(a<<1)+l,(r<<1)+l]}(t,i),s=r[0],l=r[1],d=r[2],c=b(l),f=b(d),h=y(c),p=y(f),v(s,h,p));m=n.default.normalize(m,m);var _=new a.default.fromCartesian(m,u.default.UNIT_SPHERE);return a.default.toCartesian(_,e,new n.default)},_.prototype.getVertex=function(e,t){if(r.a.typeOf.number("index",e),e<0||e>3)throw new l.default("vertex index must be in the range [0-3].");t=Object(o.default)(t,u.default.WGS84);var i=function(e,t,i){var n=g(e),a=function(e,t){for(var i=[[],[]],n=function(e){return 1<<30-e>>>0}(t),a=0;a<2;++a){var r=e[a]&-n,o=r+n;i[a][0]=y(w(r)),i[a][1]=y(w(o))}return i}([n[1],n[2]],t),r=i>>1&1;return v(n[0],a[0][r^1&i],a[1][r])}(this._cellId,this._level,e);i=n.default.normalize(i,i);var s=new a.default.fromCartesian(i,u.default.UNIT_SPHERE);return a.default.toCartesian(s,t,new n.default)},_.fromFacePositionLevel=function(e,t,i){if(r.a.typeOf.bigint("position",t),e<0||e>5)throw new l.default("Invalid S2 Face (must be within 0-5)");if(i<0||i>30)throw new l.default("Invalid level (must be within 0-30)");if(t<0||t>=Math.pow(4,i))throw new l.default("Invalid Hilbert position for level");var n=(e<4?"0":"")+(e<2?"0":"")+e.toString(2),a=t.toString(2),o=Array(2*i-a.length+1).join("0"),s=Array(61-2*i).join("0");return new _(BigInt("0b"+n+o+a+"1"+s))};var A=[64,0,1,39,2,15,40,23,3,12,16,59,41,19,24,54,4,64,13,10,17,62,60,28,42,30,20,51,25,44,55,47,5,32,65,38,14,22,11,58,18,53,63,9,61,27,29,50,43,46,31,37,21,57,52,8,26,49,45,36,56,7,48,35,6,34,33,0];t.a=_},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(4),o=i(53),s=i(43),l=i(5),u=i(6),d=i(357),c=i(61),f=i(64);function h(e,t){0===t&&(t=l.default.EPSILON7),this._boundingSphere=new n.default(e,t)}Object.defineProperties(h.prototype,{center:{get:function(){return this._boundingSphere.center}},radius:{get:function(){return this._boundingSphere.radius}},boundingVolume:{get:function(){return this._boundingSphere}},boundingSphere:{get:function(){return this._boundingSphere}}}),h.prototype.distanceToCamera=function(e){r.a.defined("frameState",e);var t=this._boundingSphere;return Math.max(0,a.default.distance(t.center,e.camera.positionWC)-t.radius)},h.prototype.intersectPlane=function(e){return r.a.defined("plane",e),n.default.intersectPlane(this._boundingSphere,e)},h.prototype.update=function(e,t){a.default.clone(e,this._boundingSphere.center),this._boundingSphere.radius=t},h.prototype.createDebugVolume=function(e){r.a.defined("color",e);var t=new d.a({radius:this.radius}),i=u.default.fromTranslation(this.center,new u.default.clone(u.default.IDENTITY)),n=new s.default({geometry:t,id:"outline",modelMatrix:i,attributes:{color:o.default.fromColor(e)}});return new f.default({geometryInstances:n,appearance:new c.default({translucent:!1,flat:!0}),asynchronous:!1})},t.a=h},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(98),l=i(189),u=i(303),d=i(9);function c(e){this._definitionChanged=new o.default,this._intervals=new l.default,this._intervals.changedEvent.addEventListener(c.prototype._intervalsChanged,this),this._referenceFrame=Object(n.default)(e,s.default.FIXED)}Object.defineProperties(c.prototype,{isConstant:{get:function(){return this._intervals.isEmpty}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._intervals}},referenceFrame:{get:function(){return this._referenceFrame}}}),c.prototype.getValue=function(e,t){return this.getValueInReferenceFrame(e,s.default.FIXED,t)},c.prototype.getValueInReferenceFrame=function(e,t,i){if(!Object(a.default)(e))throw new r.default("time is required.");if(!Object(a.default)(t))throw new r.default("referenceFrame is required.");var n=this._intervals.findDataForIntervalContainingDate(e);if(Object(a.default)(n))return u.default.convertToReferenceFrame(e,n,this._referenceFrame,t,i)},c.prototype.equals=function(e){return this===e||e instanceof c&&this._intervals.equals(e._intervals,d.default.equals)&&this._referenceFrame===e._referenceFrame},c.prototype._intervalsChanged=function(){this._definitionChanged.raiseEvent(this)},t.a=c},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(181),l=i(98),u=i(9);function d(e,t){this._value=void 0,this._definitionChanged=new o.default,this._eventHelper=new s.a,this._referenceFrame=Object(n.default)(t,l.default.FIXED),this.setValue(e)}Object.defineProperties(d.prototype,{isConstant:{get:function(){var e=this._value;if(!Object(a.default)(e))return!0;for(var t=e.length,i=0;i0}},labelOutlineColor:{get:function(){return this._label.outlineColor},set:function(e){this._label.outlineColor=e}},labelOutlineWidth:{get:function(){return this._label.outlineWidth},set:function(e){this._label.outlineWidth=e}},font:{get:function(){return this._label.font},set:function(e){this._label.font=e}},labelStyle:{get:function(){return this._label.style},set:function(e){this._label.style=e}},labelText:{get:function(){return this._label.text},set:function(e){Object(o.default)(e)||(e=""),this._label.text=e}},backgroundColor:{get:function(){return this._label.backgroundColor},set:function(e){this._label.backgroundColor=e}},backgroundPadding:{get:function(){return this._label.backgroundPadding},set:function(e){this._label.backgroundPadding=e}},backgroundEnabled:{get:function(){return this._label.showBackground},set:function(e){this._label.showBackground=e}},scaleByDistance:{get:function(){return this._label.scaleByDistance},set:function(e){this._label.scaleByDistance=e,this._billboard.scaleByDistance=e}},translucencyByDistance:{get:function(){return this._label.translucencyByDistance},set:function(e){this._label.translucencyByDistance=e,this._billboard.translucencyByDistance=e}},distanceDisplayCondition:{get:function(){return this._label.distanceDisplayCondition},set:function(e){this._label.distanceDisplayCondition=e,this._polyline.distanceDisplayCondition=e,this._billboard.distanceDisplayCondition=e}},heightOffset:{get:function(){return this._heightOffset},set:function(e){var t=Object(r.default)(this._heightOffset,0),i=this._content.tileset.ellipsoid,n=i.cartesianToCartographic(this._billboard.position,d);n.height=n.height-t+e;var a=i.cartographicToCartesian(n);this._billboard.position=a,this._label.position=this._billboard.position,this._polyline.positions=[this._polyline.positions[0],a],this._heightOffset=e}},anchorLineEnabled:{get:function(){return this._polyline.show},set:function(e){this._polyline.show=e}},anchorLineColor:{get:function(){return this._polyline.material.uniforms.color},set:function(e){this._polyline.material.uniforms.color=a.default.clone(e,this._polyline.material.uniforms.color)}},image:{get:function(){return this._billboardImage},set:function(e){var t=this._billboardImage!==e;this._billboardImage=e,t&&c(this)}},disableDepthTestDistance:{get:function(){return this._label.disableDepthTestDistance},set:function(e){this._label.disableDepthTestDistance=e,this._billboard.disableDepthTestDistance=e}},horizontalOrigin:{get:function(){return this._billboard.horizontalOrigin},set:function(e){this._billboard.horizontalOrigin=e}},verticalOrigin:{get:function(){return this._billboard.verticalOrigin},set:function(e){this._billboard.verticalOrigin=e}},labelHorizontalOrigin:{get:function(){return this._label.horizontalOrigin},set:function(e){this._label.horizontalOrigin=e}},labelVerticalOrigin:{get:function(){return this._label.verticalOrigin},set:function(e){this._label.verticalOrigin=e}},content:{get:function(){return this._content}},tileset:{get:function(){return this._content.tileset}},primitive:{get:function(){return this._content.tileset}},pickIds:{get:function(){var e=this._pickIds;return e[0]=this._billboard.pickId,e[1]=this._label.pickId,e[2]=this._polyline.pickId,e}}}),u.defaultColor=a.default.WHITE,u.defaultPointOutlineColor=a.default.BLACK,u.defaultPointOutlineWidth=0,u.defaultPointSize=8,u.prototype.hasProperty=function(e){return this._content.batchTable.hasProperty(this._batchId,e)},u.prototype.getPropertyNames=function(e){return this._content.batchTable.getPropertyNames(this._batchId,e)},u.prototype.getProperty=function(e){return this._content.batchTable.getProperty(this._batchId,e)},u.prototype.getPropertyInherited=function(e){return s.a.getPropertyInherited(this._content,this._batchId,e)},u.prototype.setProperty=function(e,t){this._content.batchTable.setProperty(this._batchId,e,t),this._content.featurePropertiesDirty=!0},u.prototype.isExactClass=function(e){return this._content.batchTable.isExactClass(this._batchId,e)},u.prototype.isClass=function(e){return this._content.batchTable.isClass(this._batchId,e)},u.prototype.getExactClassName=function(){return this._content.batchTable.getExactClassName(this._batchId)},t.a=u},function(e,t,i){"use strict";var n=i(0);function a(){this.selected=0,this.visited=0,this.numberOfCommands=0,this.numberOfAttemptedRequests=0,this.numberOfPendingRequests=0,this.numberOfTilesProcessing=0,this.numberOfTilesWithContentReady=0,this.numberOfTilesTotal=0,this.numberOfLoadedTilesTotal=0,this.numberOfFeaturesSelected=0,this.numberOfFeaturesLoaded=0,this.numberOfPointsSelected=0,this.numberOfPointsLoaded=0,this.numberOfTrianglesSelected=0,this.numberOfTilesStyled=0,this.numberOfFeaturesStyled=0,this.numberOfTilesCulledWithChildrenUnion=0,this.geometryByteLength=0,this.texturesByteLength=0,this.batchTableByteLength=0}function r(e,t,i,a){var o=t.innerContents,s=t.pointsLength,l=t.trianglesLength,u=t.featuresLength,d=t.geometryByteLength,c=t.texturesByteLength,f=t.batchTableByteLength;if(a?(e.numberOfFeaturesLoaded+=i?-u:u,e.numberOfPointsLoaded+=i?-s:s,e.geometryByteLength+=i?-d:d,e.texturesByteLength+=i?-c:c,e.batchTableByteLength+=i?-f:f):(e.numberOfFeaturesSelected+=i?-u:u,e.numberOfPointsSelected+=i?-s:s,e.numberOfTrianglesSelected+=i?-l:l),Object(n.default)(o))for(var h=o.length,p=0;p0&&e[0]instanceof l.default)},t.prototype.getAppearance=function(e,t){return void 0===t&&(t=!1),e instanceof _.default?new v.default({material:e,translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}}):new g.default({translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}})},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);var i=this.getLODSceneLayer();i&&(this._polylines=i.polylines),this.polyline&&this._polylines,this.show=t.show,this.afterSwitchMode(this.getViewer().sceneMode)},t.prototype.updateForward=function(t,i){var n;e.prototype.updateForward.call(this,t,i),this.referenceFrame===p.default.INERTIAL&&(null===(n=this.getViewer())||void 0===n?void 0:n.sceneMode)===b.default.SCENE3D&&m.default.computeIcrfToFixedMatrix(t,x)&&f.default.multiplyByMatrix3(f.default.IDENTITY,x,this.polyline.modelMatrix)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polylines&&this._polylines.remove(this.polyline)},t.prototype.afterSwitchMode=function(e){var t=this;if(this._polylines)if(e===b.default.SCENE2D||e===b.default.COLUMBUS_VIEW){this._polylines.remove(this.polyline);var i=this._positions.map((function(e,i){return t.referenceFrame===p.default.INERTIAL?(t._times&&t._times[i]&&m.default.computeIcrfToFixedMatrix(t._times[i],x)&&c.default.multiplyByVector(x,e,A),s.default.fromCartesian(A,void 0,T)):s.default.fromCartesian(e,void 0,T),s.default.toCartesian(T,void 0)}));this.createPrimitive(i,this._material,this._width,this._arcType),this._polylines.add(this.polyline)}else this._polylines.remove(this.polyline),this.createPrimitive(this._positions,this._material,this._width,this._arcType),this._polylines.add(this.polyline)},t}(w.default);t.default=E},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i startWindow.x ){\n // isRight = true;\n // }\n // vec2 lineDir = normalize(endWindow.xy - startWindow.xy);\n // angle = atan(lineDir.x, lineDir.y) - czm_piOverTwo; // precomputed atan(1,0)\n // }\n \n vec2 pos = rotate(angle) * gl_FragCoord.xy;\n \n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n float dashPositionEx = fract(gl_FragCoord.x / (dashLength * czm_pixelRatio));\n float is = dashPosition - dashPositionEx;\n float maskIndex = floor(dashPosition * maskLength);\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n float frameNumber = time*60.0*0.0001;\n float timeWeight = mod(czm_frameNumber * speed * 0.0001,frameNumber)/frameNumber;\n bool isReverse = reverse;\n // if (czm_morphTime == 1.0 ){\n // if( angle <= -czm_piOverTwo && isRight ){\n // isReverse = !isReverse;\n // }else if( angle >= -czm_piOverTwo && isRight == false ){\n // isReverse = !isReverse;\n // }else{\n // }\n // }\n float imageAlpha = 0.0;\n if(isReverse ){\n imageAlpha = texture2D(image, vec2(1.0 - fract(dashPosition + timeWeight), st.t)).a;\n }else{\n imageAlpha = texture2D(image, vec2( fract(dashPosition + timeWeight), st.t)).a;\n }\n vec4 fragColor = color;\n fragColor.a = imageAlpha*color.a;\n if( highlight ){\n float highlightFrameNumber = highlightTime*60.0;\n float highlightWeight = mod(czm_frameNumber,highlightFrameNumber)/highlightFrameNumber;\n fragColor.rgb = highlightColor.rgb;\n fragColor.a = fragColor.a*highlightWeight;\n }\n \n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n }"},translucent:!0})||this)._color=n.color,i._highlightColor=n.highlightColor,i._startPosition=n.startPosition,i._endPosition=n.endPosition,i._dashLength=n.dashLength,i._dashPattern=n.dashPattern,i._time=n.time,i._time=n.speed,i._highlight=n.highlight,i._reverse=n.reverse,i._image=n.image,i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){this._time=e,this.uniforms.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightColor",{get:function(){return this._highlightColor},set:function(e){this._highlightColor=e,this.uniforms.highlightColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dashLength",{get:function(){return this._dashLength},set:function(e){this._dashLength=e,this.uniforms.dashLength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dashPattern",{get:function(){return this._dashPattern},set:function(e){this._dashPattern=e,this.uniforms.dashPattern=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlight",{get:function(){return this._highlight},set:function(e){this._highlight=e,this.uniforms.highlight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reverse",{get:function(){return this._reverse},set:function(e){this._reverse=e,this.uniforms.reverse=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"startPosition",{get:function(){return this._startPosition},set:function(e){this._startPosition=e,this.uniforms.startPosition=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endPosition",{get:function(){return this._endPosition},set:function(e){this._endPosition=e,this.uniforms.endPosition=e},enumerable:!1,configurable:!0}),t}(l.default);t.default=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),a=i(198),r=i(6),o=i(27),s=i(321),l=i(323),u=i(347),d=i(324),c=i(491),f=new o.default,h=new o.default,p=new n.default(0,0,0),m=(new n.default(0,0,-1),new n.default(0,0,1)),_=function(){function e(e){this.entity=e,this._headingPitchRoll=new a.default,this.cartesian1=new n.default,this.cartesian2=new n.default,a.default.fromQuaternion(this.entity.rotation,this._headingPitchRoll),this._ypr=new c.default}return Object.defineProperty(e.prototype,"quaternion",{get:function(){return this.entity.rotation},set:function(e){this.entity.rotation=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headingPitchRoll",{get:function(){return this._headingPitchRoll},set:function(t){this._headingPitchRoll=t,e.headingPitchRollToQuaternion(t,f),this.entity.rotation=f.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ypr",{get:function(){return this._ypr},set:function(t){this._ypr=t,e.YPRToQuaternion(t,f),this.entity.rotation=f.clone()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"trackedEntity",{get:function(){return this._trackedEntity},set:function(e){e?this.entity instanceof s.default&&(this._originalRotationFrame=this.entity.rotationFrame,this.entity.rotationFrame=l.default.LOCAL):this.entity instanceof s.default&&(this.entity.rotationFrame=this._originalRotationFrame),this._trackedEntity=e},enumerable:!1,configurable:!0}),e.headingPitchRollToQuaternion=function(e,t){return void 0===t&&(t=new o.default),o.default.fromHeadingPitchRoll(e,t)},e.YPRToQuaternion=function(e,t){void 0===t&&(t=new o.default);var i=e.yaw,a=e.pitch,r=e.roll;return o.default.fromAxisAngle(n.default.UNIT_Z,i,h),o.default.fromAxisAngle(n.default.UNIT_Y,a,t),o.default.multiply(t,h,t),o.default.fromAxisAngle(n.default.UNIT_X,r,h),o.default.multiply(h,t,t)},e.prototype.calculateMatrixByTrackedEntity=function(e,t){if(this.trackedEntity){var i=m;r.default.getTranslation(e,p);var a=n.default.subtract(this.trackedEntity.position,p,this.cartesian1);d.default.calculateQuaternionFromV1ToV2(i,a,f),r.default.fromTranslationQuaternionRotationScale(p,f,u.UNIT_SCALE,t)}},e}();t.default=_},function(e,t,i){"use strict";i.r(t);var n=i(4),a=i(2),r=i(0);function o(e,t,i){this.clock=Object(a.default)(e,0),this.cone=Object(a.default)(t,0),this.magnitude=Object(a.default)(i,1)}o.fromCartesian3=function(e,t){n.a.typeOf.object("cartesian3",e);var i=e.x,a=e.y,s=e.z,l=i*i+a*a;return Object(r.default)(t)||(t=new o),t.clock=Math.atan2(a,i),t.cone=Math.atan2(Math.sqrt(l),s),t.magnitude=Math.sqrt(l+s*s),t},o.clone=function(e,t){if(Object(r.default)(e))return Object(r.default)(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=e.magnitude,t):new o(e.clock,e.cone,e.magnitude)},o.normalize=function(e,t){return n.a.typeOf.object("spherical",e),Object(r.default)(t)?(t.clock=e.clock,t.cone=e.cone,t.magnitude=1,t):new o(e.clock,e.cone,1)},o.equals=function(e,t){return e===t||Object(r.default)(e)&&Object(r.default)(t)&&e.clock===t.clock&&e.cone===t.cone&&e.magnitude===t.magnitude},o.equalsEpsilon=function(e,t,i){return i=Object(a.default)(i,0),e===t||Object(r.default)(e)&&Object(r.default)(t)&&Math.abs(e.clock-t.clock)<=i&&Math.abs(e.cone-t.cone)<=i&&Math.abs(e.magnitude-t.magnitude)<=i},o.prototype.equals=function(e){return o.equals(this,e)},o.prototype.clone=function(e){return o.clone(this,e)},o.prototype.equalsEpsilon=function(e,t){return o.equalsEpsilon(this,e,t)},o.prototype.toString=function(){return"("+this.clock+", "+this.cone+", "+this.magnitude+")"},t.default=o},function(e,t,i){"use strict";t.a=function(e,t,i,n,a){this.xPoleWander=e,this.yPoleWander=t,this.xPoleOffset=i,this.yPoleOffset=n,this.ut1MinusUtc=a}},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(2),o=i(0),s=i(78);function l(e,t,i){this.minimum=n.default.clone(Object(r.default)(e,n.default.ZERO)),this.maximum=n.default.clone(Object(r.default)(t,n.default.ZERO)),i=Object(o.default)(i)?n.default.clone(i):n.default.midpoint(this.minimum,this.maximum,new n.default),this.center=i}l.fromPoints=function(e,t){if(Object(o.default)(t)||(t=new l),!Object(o.default)(e)||0===e.length)return t.minimum=n.default.clone(n.default.ZERO,t.minimum),t.maximum=n.default.clone(n.default.ZERO,t.maximum),t.center=n.default.clone(n.default.ZERO,t.center),t;for(var i=e[0].x,a=e[0].y,r=e[0].z,s=e[0].x,u=e[0].y,d=e[0].z,c=e.length,f=1;f0?s.a.INSIDE:l+o<0?s.a.OUTSIDE:s.a.INTERSECTING},l.prototype.clone=function(e){return l.clone(this,e)},l.prototype.intersectPlane=function(e){return l.intersectPlane(this,e)},l.prototype.equals=function(e){return l.equals(this,e)},t.a=l},function(e,t,i){"use strict";var n=i(41),a=i(8),r=i(99),o=i(2),s=i(0),l=i(19),u=i(3),d=i(33),c=i(30),f=i(23),h=i(91),p=i(45),m=i(18);function _(e,t,i,n,r){this.bottomLeft=Object(o.default)(e,a.default.ZERO),this.topRight=Object(o.default)(t,a.default.ZERO),this.childNode1=i,this.childNode2=n,this.imageIndex=r}var g=new a.default(16,16);function v(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT);var t=Object(o.default)(e.borderWidthInPixels,1),i=Object(o.default)(e.initialSize,g);if(!Object(s.default)(e.context))throw new u.default("context is required.");if(t<0)throw new u.default("borderWidthInPixels must be greater than or equal to zero.");if(i.x<1||i.y<1)throw new u.default("initialSize must be greater than zero.");this._context=e.context,this._pixelFormat=Object(o.default)(e.pixelFormat,d.default.RGBA),this._borderWidthInPixels=t,this._textureCoordinates=[],this._guid=Object(r.default)(),this._idHash={},this._initialSize=i,this._root=void 0}function y(e,t,i){var o=function e(t,i,n){if(Object(s.default)(i)){if(!Object(s.default)(i.childNode1)&&!Object(s.default)(i.childNode2)){if(Object(s.default)(i.imageIndex))return;var r=i.topRight.x-i.bottomLeft.x,o=i.topRight.y-i.bottomLeft.y,l=r-n.width,u=o-n.height;if(l<0||u<0)return;if(0===l&&0===u)return i;if(l>u){i.childNode1=new _(new a.default(i.bottomLeft.x,i.bottomLeft.y),new a.default(i.bottomLeft.x+n.width,i.topRight.y));var d=i.bottomLeft.x+n.width+t._borderWidthInPixels;d0){for(var o=e._texture.width,l=e._texture.height,u=2*(o+t.width+r),d=2*(l+t.height+r),c=o/u,f=l/d,m=new _(new a.default(o+r,r),new a.default(u,l)),g=new _(new a.default,new a.default(u,l),e._root,m),v=new _(new a.default(r,l+r),new a.default(u,d)),y=new _(new a.default,new a.default(u,d),g,v),b=0;b]/,a=[],r="",o=O.LTR,s="",l=e.length,u=0;u";case">":return"<"}}Object.defineProperties(C.prototype,{show:{get:function(){return this._show},set:function(e){if(!Object(l.default)(e))throw new u.default("value is required.");if(this._show!==e){this._show=e;for(var t=this._glyphs,i=0,n=t.length;iu+1?o[u+1].Type===O.RTL?(l=c+l,s=0):(l=M(l,s,d.Word),s+=d.Word.length):l=M(l,0,c)):d.Type===O.RTL?l=M(l,s,c):d.Type===O.LTR?(l+=d.Word,s=l.length):d.Type!==O.WEAK&&d.Type!==O.BRACKETS||(u>0&&o[u-1].Type===O.RTL?o.length>u+1?o[u+1].Type===O.RTL?l=M(l,s,c):(l+=d.Word,s=l.length):l+=d.Word:(l+=d.Word,s=l.length))}i+=l,nt.rectangle.east&&(e.east=t.rectangle.east),e.southt.rectangle.north&&(e.north=t.rectangle.north),e}function y(e,t,i){var n=e.positionToTileXY(d.default.southwest(t),i),a=e.positionToTileXY(d.default.northeast(t),i);return(Math.abs(a.x-n.x)+1)*(Math.abs(a.y-n.y)+1)>4?0:i}Object(o.default)(Object.create)&&(g.prototype=Object.create(_.a.prototype),g.prototype.constructor=g),g.prototype._requestMetadata=function(){this._xmlResource.fetchXML().then(this._metadataSuccess).otherwise(this._metadataFailure)},g.prototype._metadataSuccess=function(e){for(var t,i,s,c,m=/tileformat/i,_=/tileset/i,g=/tilesets/i,b=/boundingbox/i,w=[],O=this._xmlResource,x=this._metadataError,A=this._deferred,T=this._requestMetadata,E=e.childNodes[0].childNodes,C=0;Cs.default.PI)throw new r.default("The inclination is out of range. Inclination must be greater than or equal to zero and less than or equal to Pi radians.");var f=e*(1-t),h=o-u,p=u,m=function(e,t){if(t<0||t>=1)throw new r.default("eccentricity out of range.");return function(e,t){if(t<0||t>=1)throw new r.default("eccentricity out of range.");var i=Math.floor(e/s.default.TWO_PI);e-=i*s.default.TWO_PI;var n=Math.cos(e)-t,a=Math.sin(e)*Math.sqrt(1-t*t),o=Math.atan2(a,n);o=s.default.zeroToTwoPi(o),e<0&&(o-=s.default.TWO_PI);return o+=i*s.default.TWO_PI}(function(e,t){if(t<0||t>=1)throw new r.default("eccentricity out of range.");var i,n=Math.floor(e/s.default.TWO_PI),a=(e-=n*s.default.TWO_PI)+t*Math.sin(e)/(1-Math.sin(e+t)+Math.sin(e)),o=Number.MAX_VALUE;for(i=0;i<50&&Math.abs(o-a)>v;++i){var l=(o=a)-t*Math.sin(o)-e,u=1-t*Math.cos(o);a=o-l/u}if(i>=50)throw new r.default("Kepler equation did not converge");return o=a+n*s.default.TWO_PI}(e,t),t)}(d-o,t);if("Hyperbolic"===function(e,t){if(e<0)throw new r.default("eccentricity cannot be negative.");if(e<=t)return"Circular";if(e<1-t)return"Elliptical";if(e<=1+t)return"Parabolic";return"Hyperbolic"}(t,0)&&Math.abs(s.default.negativePiToPi(m))>=Math.acos(-1/t))throw new r.default("The true anomaly of the hyperbolic orbit lies outside of the bounds of the hyperbola.");!function(e,t,i,n){if(t<0||t>s.default.PI)throw new r.default("inclination out of range");var o=Math.cos(e),u=Math.sin(e),d=Math.cos(t),c=Math.sin(t),f=Math.cos(i),h=Math.sin(i);Object(a.default)(n)?(n[0]=f*o-h*u*d,n[1]=h*o+f*u*d,n[2]=u*c,n[3]=-f*u-h*o*d,n[4]=-h*u+f*o*d,n[5]=o*c,n[6]=h*c,n[7]=-f*c,n[8]=d):n=new l.default(f*o-h*u*d,-f*u-h*o*d,h*c,h*o+f*u*d,-h*u+f*o*d,-f*c,u*c,o*c,d)}(h,i,p,_);var g=f*(1+t),y=Math.cos(m),b=Math.sin(m),w=1+t*y;if(w<=s.default.Epsilon10)throw new r.default("elements cannot be converted to cartesian");var O=g/w;return Object(a.default)(c)?(c.x=O*y,c.y=O*b,c.z=0):c=new n.default(O*y,O*b,0),l.default.multiplyByVector(_,c,c)}var v=s.default.EPSILON8;var y=100.46645683*p,b=1295977422.83429*m,w=new o.default(0,0,d.a.TAI);function O(e,t){f(e,w);var i=(w.dayNumber-h.dayNumber+(w.secondsOfDay-h.secondsOfDay)/u.a.SECONDS_PER_DAY)/u.a.DAYS_PER_JULIAN_CENTURY,n=i*i,a=n*i,r=a*i,o=383397.7725+.004*i,s=.055545526-16e-9*i,l=5.15668983*p,d=-8e-5*i+.02966*n-42e-6*a-13e-8*r,c=83.35324312*p,_=14643420.2669*i-38.2702*n-.045047*a+21301e-8*r,v=125.04455501*p,y=-6967919.3631*i+6.3602*n+.007625*a-3586e-8*r,b=218.31664563*p,O=1732559343.4847*i-6.391*n+.006588*a-3169e-8*r,x=297.85019547*p+m*(1602961601.209*i-6.3706*n+.006593*a-3169e-8*r),A=134.96340251*p+m*(1717915923.2178*i+31.8792*n+.051635*a-2447e-7*r),T=357.52910918*p+m*(129596581.0481*i-.5532*n+136e-6*a-1149e-8*r),E=310.17137918*p-m*(6967051.436*i+6.2068*n+.007618*a-3219e-8*r),C=2*x,S=4*x,M=6*x,D=2*A,P=3*A,I=4*A,L=2*(93.27209062*p+m*(1739527262.8478*i-12.7512*n-.001037*a+417e-8*r));o+=3400.4*Math.cos(C)-635.6*Math.cos(C-A)-235.6*Math.cos(A)+218.1*Math.cos(C-T)+181*Math.cos(C+A),s+=.014216*Math.cos(C-A)+.008551*Math.cos(C-D)-.001383*Math.cos(A)+.001356*Math.cos(C+A)-.001147*Math.cos(S-P)-914e-6*Math.cos(S-D)+869e-6*Math.cos(C-T-A)-627e-6*Math.cos(C)-394e-6*Math.cos(S-I)+282e-6*Math.cos(C-T-D)-279e-6*Math.cos(x-A)-236e-6*Math.cos(D)+231e-6*Math.cos(S)+229e-6*Math.cos(M-I)-201e-6*Math.cos(D-L),d+=486.26*Math.cos(C-L)-40.13*Math.cos(C)+37.51*Math.cos(L)+25.73*Math.cos(D-L)+19.97*Math.cos(C-T-L),_+=-55609*Math.sin(C-A)-34711*Math.sin(C-D)-9792*Math.sin(A)+9385*Math.sin(S-P)+7505*Math.sin(S-D)+5318*Math.sin(C+A)+3484*Math.sin(S-I)-3417*Math.sin(C-T-A)-2530*Math.sin(M-I)-2376*Math.sin(C)-2075*Math.sin(C-P)-1883*Math.sin(D)-1736*Math.sin(M-5*A)+1626*Math.sin(T)-1370*Math.sin(M-P),y+=-5392*Math.sin(C-L)-540*Math.sin(T)-441*Math.sin(C)+423*Math.sin(L)-288*Math.sin(D-L),O+=-3332.9*Math.sin(C)+1197.4*Math.sin(C-A)-662.5*Math.sin(T)+396.3*Math.sin(A)-218*Math.sin(C-T);var j=2*E,R=3*E;d+=46.997*Math.cos(E)*i-.614*Math.cos(C-L+E)*i+.614*Math.cos(C-L-E)*i-.0297*Math.cos(j)*n-.0335*Math.cos(E)*n+.0012*Math.cos(C-L+j)*n-16e-5*Math.cos(E)*a+4e-5*Math.cos(R)*a+4e-5*Math.cos(j)*a;var N=2.116*Math.sin(E)*i-.111*Math.sin(C-L-E)*i-.0015*Math.sin(E)*n;return _+=N,O+=N,y+=-520.77*Math.sin(E)*i+13.66*Math.sin(C-L+E)*i+1.12*Math.sin(C-E)*i-1.06*Math.sin(L-E)*i+.66*Math.sin(j)*n+.371*Math.sin(E)*n-.035*Math.sin(C-L+j)*n-.015*Math.sin(C-L+E)*n+.0014*Math.sin(E)*a-.0011*Math.sin(R)*a-9e-4*Math.sin(j)*a,g(o*=1e3,s,l+d*m,c+_*m,v+y*m,b+O*m,t)}var x=new l.default(1.0000000000000002,5619723173785822e-31,4690511510146299e-34,-5154129427414611e-31,.9174820620691819,-.39777715593191376,-223970096136568e-30,.39777715593191376,.9174820620691819),A=new n.default;c.computeSunPositionInEarthInertialFrame=function(e,t){return Object(a.default)(e)||(e=o.default.now()),Object(a.default)(t)||(t=new n.default),A=function(e,t){f(e,w);var i=(w.dayNumber-h.dayNumber+(w.secondsOfDay-h.secondsOfDay)/u.a.SECONDS_PER_DAY)/(10*u.a.DAYS_PER_JULIAN_CENTURY),n=.3595362*i,a=149598022260.7121+957426.3679999999*Math.cos(16002*n)+-2243968.05*Math.sin(16002*n)+-2273887.624*Math.cos(21863*n)+-688150.202*Math.sin(21863*n)+927506.794*Math.cos(32004*n)+1017265.516*Math.sin(32004*n)+14959787e4*-8e-7*Math.cos(10931*n)+807828.498*Math.sin(10931*n)+478713.18399999995*Math.cos(14529*n)+209437.01799999998*Math.sin(14529*n)+-613351.267*Math.cos(16368*n)+359034.888*Math.sin(16368*n)+284235.953*Math.cos(15318*n)+-418874.03599999996*Math.sin(15318*n)+-164557.657*Math.cos(32794*n)+329115.314*Math.sin(32794*n),r=y+b*i+1e-7*-325*Math.cos(10*n)+1e-7*-105*Math.sin(10*n)+1e-7*-322*Math.cos(16002*n)+1e-7*-137*Math.sin(16002*n)+1e-7*-79*Math.cos(21863*n)+258*1e-7*Math.sin(21863*n)+232*1e-7*Math.cos(10931*n)+35*1e-7*Math.sin(10931*n)+1e-7*-52*Math.cos(1473*n)+1e-7*-116*Math.sin(1473*n)+97*1e-7*Math.cos(32004*n)+1e-7*-88*Math.sin(32004*n)+55*1e-7*Math.cos(4387*n)+1e-7*-112*Math.sin(4387*n)+1e-7*-41*Math.cos(73*n)+1e-7*-80*Math.sin(73*n);return g(a,.0167086342-.0004203654*i,469.97289*m*i,102.93734808*p+11612.3529*m*i,174.87317577*p-8679.27034*m*i,r,t)}(e,A),t=n.default.negate(A,t),function(e,t){t=O(e,t),n.default.multiplyByScalar(t,-.01215058143522694,t)}(e,A),n.default.subtract(t,A,t),l.default.multiplyByVector(x,t,t),t},c.computeMoonPositionInEarthInertialFrame=function(e,t){return Object(a.default)(e)||(e=o.default.now()),t=O(e,t),l.default.multiplyByVector(x,t,t),t},t.a=c},function(e,t,i){"use strict";var n=i(0),a=i(3),r=[],o=[];function s(e,t,i,n,a){if(!(n>=a)){var l=Math.floor(.5*(n+a));s(e,t,i,n,l),s(e,t,i,l+1,a),function(e,t,i,n,a,s){var l,u,d=a-n+1,c=s-a,f=r,h=o;for(l=0;l=c||t(m,_,i)<=0)?(e[p]=m,++l):u0&&f.alpha<1&&(e.alphaOptions.pass=s.default.TRANSLUCENT,e.alphaOptions.alphaMode=n.a.BLEND),d.addUniform("vec4",u.COLOR_UNIFORM_NAME,l.a.FRAGMENT),c[u.COLOR_UNIFORM_NAME]=function(){return t.color},d.addUniform("float",u.COLOR_BLEND_UNIFORM_NAME,l.a.FRAGMENT),c[u.COLOR_BLEND_UNIFORM_NAME]=function(){return a.default.getColorBlend(t.colorBlendMode,t.colorBlendAmount)},e.uniformMap=Object(r.default)(c,e.uniformMap)}};t.a=u},function(e,t,i){"use strict";var n=i(11),a=i(2),r=i(0),o=i(55),s=i(57),l=i(36),u=i(141),d=i(178),c=i(537),f=i(919),h=i(920),p={};p.name="FeatureIdPipelineStage",p.STRUCT_ID_FEATURE="FeatureStruct",p.STRUCT_NAME_FEATURE="Feature",p.FUNCTION_ID_FEATURE_VARYINGS_VS="updateFeatureStructVS",p.FUNCTION_ID_FEATURE_VARYINGS_FS="updateFeatureStructFS",p.FUNCTION_SIGNATURE_UPDATE_FEATURE="void updateFeatureStruct(inout Feature feature)",p.process=function(e,t,i){var m=e.shaderBuilder;e.hasFeatureIds=!0,m.addDefine("HAS_FEATURES",void 0,o.a.BOTH),function(e){e.addStructField(p.STRUCT_ID_FEATURE,"int","id"),e.addStructField(p.STRUCT_ID_FEATURE,"vec2","st"),e.addStructField(p.STRUCT_ID_FEATURE,"vec4","color")}(m);var _=t.featureIdTextures;_.length>0?function(e,t,i){var n=e.shaderBuilder,r=e.uniformMap,s=e.model.featureIdTextureIndex,l=i[s].textureReader,u="u_featureIdTexture_"+s;n.addDefine("FEATURE_ID_TEXTURE",u,o.a.FRAGMENT),n.addUniform("sampler2D",u,o.a.FRAGMENT),r[u]=function(){return Object(a.default)(l.texture,t.context.defaultTexture)},n.addDefine("FEATURE_ID_TEXCOORD","v_texCoord_"+l.texCoord,o.a.FRAGMENT),n.addDefine("FEATURE_ID_CHANNEL",l.channels,o.a.FRAGMENT)}(e,i,_):function(e,t,i){var a,f=e.shaderBuilder,m=e.model,_=e.runtimeNode.node.instances,g=function(e,t,i){var n,a,o,s=0;if(Object(r.default)(i))a=i.featureIdAttributes[e],n=i.attributes[0].count,o="a_instanceFeatureId_",s=1;else{a=t.featureIdAttributes[e];var l=u.a.getAttributeBySemantic(t,d.a.POSITION);n=l.count,o="a_featureId_"}return{count:n,attribute:a,prefix:o,instanceDivisor:s}}(m.featureIdAttributeIndex,i,_),v=g.attribute,y=g.prefix;Object(r.default)(v.setIndex)?a=v.setIndex:(a=e.featureIdVertexAttributeSetIndex++,function(e,t,i,a){var o,u,d=a.model,c=a.shaderBuilder,f=e.attribute,h=e.prefix;if(Object(r.default)(f.repeat)){var p=function(e,t){for(var i=e.offset,n=e.repeat,a=new Float32Array(t),r=0;r= 0.0)\n {\n t1 = 0.0;\n }\n\n return czm_raySegment(t1, t2);\n}\n\nvec3 getAdjustedPosition(vec3 positionWC, float innerRadius)\n{\n // Adjust the camera position so that atmosphere color looks the same wherever the eye height is the same\n float cameraHeight = czm_eyeHeight + innerRadius;\n return normalize(positionWC) * cameraHeight;\n}\n\nvec3 getTranslucentPosition(vec3 positionWC, vec3 outerPositionWC, float innerRadius, out bool intersectsEllipsoid)\n{\n vec3 directionWC = normalize(outerPositionWC - positionWC);\n vec3 directionEC = czm_viewRotation * directionWC;\n czm_ray viewRay = czm_ray(vec3(0.0), directionEC);\n czm_raySegment raySegment = rayEllipsoidIntersection(viewRay, czm_ellipsoidInverseRadii);\n intersectsEllipsoid = raySegment.start >= 0.0;\n\n if (intersectsEllipsoid)\n {\n return positionWC + raySegment.stop * directionWC;\n }\n\n return getAdjustedPosition(positionWC, innerRadius);\n}\n\nvoid calculateMieColorAndRayleighColor(vec3 outerPositionWC, out vec3 mieColor, out vec3 rayleighColor)\n{\n // Unpack attributes\n float outerRadius = u_radiiAndDynamicAtmosphereColor.x;\n float innerRadius = u_radiiAndDynamicAtmosphereColor.y;\n\n#ifdef GLOBE_TRANSLUCENT\n bool intersectsEllipsoid = false;\n vec3 startPositionWC = getTranslucentPosition(czm_viewerPositionWC, outerPositionWC, innerRadius, intersectsEllipsoid);\n#else\n vec3 startPositionWC = getAdjustedPosition(czm_viewerPositionWC, innerRadius);\n#endif\n\n vec3 lightDirection = getLightDirection(startPositionWC);\n\n // Get the ray from the start position to the outer position and its length (which is the far point of the ray passing through the atmosphere)\n vec3 ray = outerPositionWC - startPositionWC;\n float far = length(ray);\n ray /= far;\n\n float atmosphereScale = 1.0 / (outerRadius - innerRadius);\n\n vec3 start;\n float startOffset;\n\n#ifdef SKY_FROM_SPACE\n#ifdef GLOBE_TRANSLUCENT\n if (intersectsEllipsoid)\n {\n calculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n }\n else\n {\n calculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n }\n#else\n calculateRayScatteringFromSpace(startPositionWC, ray, innerRadius, outerRadius, far, start, startOffset);\n#endif\n#else\n calculateRayScatteringFromGround(startPositionWC, ray, atmosphereScale, innerRadius, start, startOffset);\n#endif\n\n // Initialize the scattering loop variables\n float sampleLength = far / fSamples;\n float scaledLength = sampleLength * atmosphereScale;\n vec3 sampleRay = ray * sampleLength;\n vec3 samplePoint = start + sampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 frontColor = vec3(0.0, 0.0, 0.0);\n\n for (int i = 0; i czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = czm_HSBToRGB(hsb);\n#endif\n\n float outerRadius = u_radiiAndDynamicAtmosphereColor.x;\n float innerRadius = u_radiiAndDynamicAtmosphereColor.y;\n float lightEnum = u_radiiAndDynamicAtmosphereColor.z;\n\n float cameraHeight = czm_eyeHeight + innerRadius;\n\n // Alter alpha based on how close the viewer is to the ground (1.0 = on ground, 0.0 = at edge of atmosphere)\n float atmosphereAlpha = clamp((outerRadius - cameraHeight) / (outerRadius - innerRadius), 0.0, 1.0);\n\n // Alter alpha based on time of day (0.0 = night , 1.0 = day)\n float nightAlpha = (lightEnum != 0.0) ? clamp(dot(normalize(positionWC), lightDirection), 0.0, 1.0) : 1.0;\n atmosphereAlpha *= pow(nightAlpha, 0.5);\n\n vec4 finalColor = vec4(rgb, mix(clamp(rgbExposure.b, 0.0, 1.0), 1.0, atmosphereAlpha) * smoothstep(0.0, 1.0, czm_morphTime));\n\n if (mieColor.b > 1.0)\n {\n // Fade atmosphere below the ellipsoid. As the camera zooms further away from the ellipsoid draw\n // a larger atmosphere ring to cover empty space of lower LOD globe tiles.\n float strength = mieColor.b;\n float minDistance = outerRadius;\n float maxDistance = outerRadius * 3.0;\n float maxStrengthLerp = 1.0 - clamp((maxDistance - cameraHeight) / (maxDistance - minDistance), 0.0, 1.0);\n float maxStrength = mix(100.0, 10000.0, maxStrengthLerp);\n strength = min(strength, maxStrength);\n float alpha = 1.0 - (strength / maxStrength);\n finalColor.a = alpha;\n }\n\n return finalColor;\n}\n"},function(e,t,i){"use strict";var n=i(1),a=i(11),r=i(2),o=i(0),s=i(407),l=i(6),u=i(27),d=i(864),c=i(175),f=i(10),h=i(865),p=i(191),m=i(192),_=i(150);function g(){}var v=/^data\:/i;function y(e,t){var i=e.gltf,n=i.buffers,a=i.bufferViews[t.bufferView],r=n[a.buffer],o=a.byteOffset+t.byteOffset,s=t.count*Object(m.a)(t.type),l=v.test(r.uri)?"":r.uri;return e.cacheKey+"//"+l+"/"+o+"/"+s}var b={};g.getAnimationParameterValues=function(e,t){var i=y(e,t),s=b[i];if(!Object(o.default)(s)){var l=e.gltf,d=l.buffers,c=l.bufferViews[t.bufferView],f=d[c.buffer].extras._pipeline.source,h=t.componentType,_=t.type,g=Object(m.a)(_),v=t.count,w=Object(p.a)(l,t);s=new Array(v);for(var O=Object(r.default)(t.byteOffset,0),x=c.byteOffset+O,A=0;A=n[i+1]?n[i+1]:n[i];return this._spline.evaluate(a,t)},Object.defineProperties(x.prototype,{times:{get:function(){return this._spline.times}}}),x.prototype.wrapTime=function(e){return this._spline.wrapTime(e)},x.prototype.clampTime=function(e){return this._spline.clampTime(e)},g.getAnimationSpline=function(e,t,i,n,a,r,l,u){var c=function(e,t,i){return e.cacheKey+"//"+t+"/"+i}(e,t,n),f=w[c];if(!Object(o.default)(f)){var p=r,m=u;1===p.length&&1===m.length?f=new O(m[0]):"LINEAR"!==a.interpolation&&"STEP"!==a.interpolation||("translation"===l||"scale"===l?f=new s.a({times:p,points:m}):"rotation"===l?f=new d.a({times:p,points:m}):"weights"===l&&(f=new h.a({times:p,weights:m})),Object(o.default)(f)&&"STEP"===a.interpolation&&(f=new x(f))),Object(o.default)(e.cacheKey)&&(w[c]=f)}return f};var A={};g.getSkinInverseBindMatrices=function(e,t){var i=y(e,t),n=A[i];if(!Object(o.default)(n)){var r=e.gltf,s=r.buffers,u=r.bufferViews[t.bufferView],d=s[u.buffer].extras._pipeline.source,c=t.componentType,h=t.type,g=t.count,v=Object(p.a)(r,t),b=u.byteOffset+t.byteOffset,w=Object(m.a)(h);if(n=new Array(g),c===f.a.FLOAT&&h===_.a.MAT4)for(var O=0;O>1))^e>>2))^e>>4))^e>>8)}function d(e){return e=1023&((e=4278190335&((e=50393103&((e=51130563&((e&=153391689)^e>>2))^e>>4))^e>>8))^e>>16)}o.encode2D=function(e,t){if(n.a.typeOf.number("x",e),n.a.typeOf.number("y",t),e<0||e>65535||t<0||t>65535)throw new r.default("inputs must be 16-bit unsigned integers");return(s(e)|s(t)<<1)>>>0},o.decode2D=function(e,t){if(n.a.typeOf.number("mortonIndex",e),e<0||e>4294967295)throw new r.default("input must be a 32-bit unsigned integer");return Object(a.default)(t)||(t=new Array(2)),t[0]=u(e),t[1]=u(e>>1),t},o.encode3D=function(e,t,i){if(n.a.typeOf.number("x",e),n.a.typeOf.number("y",t),n.a.typeOf.number("z",i),e<0||e>1023||t<0||t>1023||i<0||i>1023)throw new r.default("inputs must be 10-bit unsigned integers");return l(e)|l(t)<<1|l(i)<<2},o.decode3D=function(e,t){if(n.a.typeOf.number("mortonIndex",e),e<0||e>1073741823)throw new r.default("input must be a 30-bit unsigned integer");return Object(a.default)(t)||(t=new Array(3)),t[0]=d(e),t[1]=d(e>>1),t[2]=d(e>>2),t},t.a=o},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(151),o=i(390),s=i(98),l=i(7),u=i(326),d=i(54),c=function(e){function t(t){void 0===t&&(t={});var i=e.call(this,t)||this;return i._positions=[],i._show=u.defaultValue(t.show,!0),i.width=u.defaultValue(t.width,1),i.material=u.defaultValue(t.material,l.default.CYAN),i.segmentLength=u.defaultValue(t.segmentLength,100),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this._polyline&&(this._polyline.show=e)},enumerable:!1,configurable:!0}),t.prototype.addPosition=function(e){this._positions.length===this.segmentLength?(this.add(this._polyline),this._polyline=null,this._positions=[this._positions.pop(),e]):this._positions.push(e),this._positions.length>1&&(this._polyline&&this.remove(this._polyline),this._polyline=new o.default({reference:s.default.FIXED,positions:[].concat(this._positions),width:this.width,material:this.material,arcType:d.default.GEODESIC,asynchronous:!1}),this._polyline.show=this._show,this.add(this._polyline))},t}(r.default);t.default=c},function(e,t,i){"use strict";i.r(t);var n=i(1),a=i(2),r=i(0),o=i(15),s=i(24),l=i(12),u=i(27),d=i(52),c=i(9),f=i(443);function h(e,t){this._velocityVectorProperty=new f.a(e,!0),this._subscription=void 0,this._ellipsoid=void 0,this._definitionChanged=new s.default,this.ellipsoid=Object(a.default)(t,o.default.WGS84);var i=this;this._velocityVectorProperty.definitionChanged.addEventListener((function(){i._definitionChanged.raiseEvent(i)}))}Object.defineProperties(h.prototype,{isConstant:{get:function(){return c.default.isConstant(this._velocityVectorProperty)}},definitionChanged:{get:function(){return this._definitionChanged}},position:{get:function(){return this._velocityVectorProperty.position},set:function(e){this._velocityVectorProperty.position=e}},ellipsoid:{get:function(){return this._ellipsoid},set:function(e){this._ellipsoid!==e&&(this._ellipsoid=e,this._definitionChanged.raiseEvent(this))}}});var p=new n.default,m=new n.default,_=new l.default;h.prototype.getValue=function(e,t){var i=this._velocityVectorProperty._getValue(e,m,p);if(Object(r.default)(i))return d.default.rotationMatrixFromPositionVelocity(p,i,this._ellipsoid,_),u.default.fromRotationMatrix(_,t)},h.prototype.equals=function(e){return this===e||e instanceof h&&c.default.equals(this._velocityVectorProperty,e._velocityVectorProperty)&&(this._ellipsoid===e._ellipsoid||this._ellipsoid.equals(e._ellipsoid))},t.default=h},function(e,t,i){"use strict";i.r(t);var n=i(116),a=i(17),r=i(4),o=i(2),s=i(0),l=i(19),u=i(181),d=i(263),c=i(195),f=i(831),h=i(190),p=i(832),m=i(48),_=i(492),g=i(833),v=i(853),y=i(854),b=i(871),w=i(961),O=i(962),x=i(963);function A(e){r.a.typeOf.object("options",e),r.a.typeOf.object("options.scene",e.scene),r.a.typeOf.object("options.dataSourceCollection",e.dataSourceCollection),c.default.initializeTerrainHeights(),d.default.initializeTerrainHeights();var t=e.scene,i=e.dataSourceCollection;this._eventHelper=new u.a,this._eventHelper.add(i.dataSourceAdded,this._onDataSourceAdded,this),this._eventHelper.add(i.dataSourceRemoved,this._onDataSourceRemoved,this),this._eventHelper.add(i.dataSourceMoved,this._onDataSourceMoved,this),this._eventHelper.add(t.postRender,this._postRender,this),this._dataSourceCollection=i,this._scene=t,this._visualizersCallback=Object(o.default)(e.visualizersCallback,A.defaultVisualizersCallback);var n=!1,a=new h.default,s=new h.default;i.length>0&&(t.primitives.add(a),t.groundPrimitives.add(s),n=!0),this._primitives=a,this._groundPrimitives=s;for(var l=0,f=i.length;lo.default.EPSILON12);return Object(a.default)(d)?(d.x=c*S,d.y=f*M,d.z=h*D,d):new n.default(c*S,f*M,h*D)}},function(e,t,i){"use strict";var n=i(115),a=i(0),r=i(3);t.a=function(e){if(!Object(a.default)(e))throw new r.default("uri is required.");var t=new n.a(e);t.normalize();var i=t.path(),o=i.lastIndexOf("/");return-1!==o&&(i=i.substr(o+1)),o=i.lastIndexOf("."),i=-1===o?"":i.substr(o+1)}},function(e,t,i){"use strict";var n=i(4),a=/^blob:/i;t.a=function(e){return n.a.typeOf.string("uri",e),a.test(e)}},function(e,t,i){"use strict";var n,a=i(0);t.a=function(e){Object(a.default)(n)||(n=document.createElement("a")),n.href=window.location.href;var t=n.host,i=n.protocol;return n.href=e,n.href=n.href,i!==n.protocol||t!==n.host}},function(e,t,i){"use strict";var n=i(18);t.a=function(e){var t=n.a.defer(),i=document.createElement("script");i.async=!0,i.src=e;var a=document.getElementsByTagName("head")[0];return i.onload=function(){i.onload=void 0,a.removeChild(i),t.resolve()},i.onerror=function(e){t.reject(e)},a.appendChild(i),t.promise}},function(e,t,i){"use strict";var n=i(0),a=i(3);t.a=function(e){if(!Object(n.default)(e))throw new a.default("obj is required.");var t="";for(var i in e)if(e.hasOwnProperty(i)){var r=e[i],o=encodeURIComponent(i)+"=";if(Array.isArray(r))for(var s=0,l=r.length;s=this._numberOfInstances)throw new d.default("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new d.default("attributeIndex is out of range");var n,a=this._attributes,o=this._offsets[t],s=4*this._stride*e+4*o;n=this._packFloats&&a[t].componentDatatype!==h.default.UNSIGNED_BYTE?function(e,t,i){var n=r.a.unpack(e,t,v),a=r.a.unpackFloat(n);n=r.a.unpack(e,t+4,v);var o=r.a.unpackFloat(n);n=r.a.unpack(e,t+8,v);var s=r.a.unpackFloat(n);n=r.a.unpack(e,t+12,v);var l=r.a.unpackFloat(n);return r.a.fromElements(a,o,s,l,i)}(this._batchValues,s,y):r.a.unpack(this._batchValues,s,y);var u=g(a,t);return Object(l.default)(u.fromCartesian4)?u.fromCartesian4(n,i):Object(l.default)(u.clone)?u.clone(n,i):n.x};var b=[void 0,void 0,new n.default,new a.default,new r.a],w=new r.a;function O(e,t){var i=e._attributes[t],n=i.componentsPerAttribute,a=i.functionName,r=function(e){return 1===e?"float":"vec"+e}(n),o=function(e){return 1===e?".x":2===e?".xy":3===e?".xyz":""}(n),l=r+" "+a+"(float batchId) \n{ \n vec2 st = computeSt(batchId); \n st.x += batchTextureStep.x * float("+e._offsets[t]+"); \n";return e._packFloats&&i.componentDatatype!==h.default.UNSIGNED_BYTE?l+="vec4 textureValue; \ntextureValue.x = czm_unpackFloat(texture2D(batchTexture, st)); \ntextureValue.y = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x, 0.0))); \ntextureValue.z = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 2.0, 0.0))); \ntextureValue.w = czm_unpackFloat(texture2D(batchTexture, st + vec2(batchTextureStep.x * 3.0, 0.0))); \n":l+=" vec4 textureValue = texture2D(batchTexture, st); \n",l+=" "+r+" value = textureValue"+o+"; \n",e._pixelDatatype!==h.default.UNSIGNED_BYTE||i.componentDatatype!==s.default.UNSIGNED_BYTE||i.normalize?e._pixelDatatype===h.default.FLOAT&&i.componentDatatype===s.default.UNSIGNED_BYTE&&i.normalize&&(l+="value /= 255.0; \n"):l+="value *= 255.0; \n",l+=" return value; \n} \n"}_.prototype.setBatchedAttribute=function(e,t,i){if(e<0||e>=this._numberOfInstances)throw new d.default("instanceIndex is out of range.");if(t<0||t>=this._attributes.length)throw new d.default("attributeIndex is out of range");if(!Object(l.default)(i))throw new d.default("value is required.");var n=this._attributes,a=b[n[t].componentsPerAttribute],o=this.getBatchedAttribute(e,t,a),s=g(this._attributes,t);if(!(Object(l.default)(s.equals)?s.equals(o,i):o===i)){var u=w;u.x=Object(l.default)(i.x)?i.x:i,u.y=Object(l.default)(i.y)?i.y:0,u.z=Object(l.default)(i.z)?i.z:0,u.w=Object(l.default)(i.w)?i.w:0;var c=this._offsets[t],f=4*this._stride*e+4*c;this._packFloats&&n[t].componentDatatype!==h.default.UNSIGNED_BYTE?function(e,t,i){var n=r.a.packFloat(e.x,v);r.a.pack(n,t,i),n=r.a.packFloat(e.y,n),r.a.pack(n,t,i+4),n=r.a.packFloat(e.z,n),r.a.pack(n,t,i+8),n=r.a.packFloat(e.w,n),r.a.pack(n,t,i+12)}(u,this._batchValues,f):r.a.pack(u,this._batchValues,f),this._batchValuesDirty=!0}},_.prototype.update=function(e){var t,i,n;Object(l.default)(this._texture)&&!this._batchValuesDirty||0===this._attributes.length||(this._batchValuesDirty=!1,Object(l.default)(this._texture)||(t=this,i=e.context,n=t._textureDimensions,t._texture=new m.default({context:i,pixelFormat:c.default.RGBA,pixelDatatype:t._pixelDatatype,width:n.x,height:n.y,sampler:p.default.NEAREST,flipY:!1})),function(e){var t=e._textureDimensions;e._texture.copyFrom({source:{width:t.x,height:t.y,arrayBufferView:e._batchValues}})}(this))},_.prototype.getUniformMapCallback=function(){var e=this;return function(t){if(0===e._attributes.length)return t;var i={batchTexture:function(){return e._texture},batchTextureDimensions:function(){return e._textureDimensions},batchTextureStep:function(){return e._textureStep}};return Object(o.default)(t,i)}},_.prototype.getVertexShaderCallback=function(){var e=this._attributes;if(0===e.length)return function(e){return e};var t,i,n="uniform highp sampler2D batchTexture; \n";n+=(i=(t=this)._stride,(1===t._textureDimensions.y?"uniform vec4 batchTextureStep; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float numberOfAttributes = float("+i+"); \n return vec2(centerX + (batchId * numberOfAttributes * stepX), 0.5); \n} \n":"uniform vec4 batchTextureStep; \nuniform vec2 batchTextureDimensions; \nvec2 computeSt(float batchId) \n{ \n float stepX = batchTextureStep.x; \n float centerX = batchTextureStep.y; \n float stepY = batchTextureStep.z; \n float centerY = batchTextureStep.w; \n float numberOfAttributes = float("+i+"); \n float xId = mod(batchId * numberOfAttributes, batchTextureDimensions.x); \n float yId = floor(batchId * numberOfAttributes / batchTextureDimensions.x); \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY)); \n} \n")+"\n");for(var a=e.length,r=0;r=0;--f)if(255!==_[f]){m=f/v|0;break}var y=-1;for(f=0;f0&&(e._shaderDisableDepthDistance=!0,d===Number.POSITIVE_INFINITY&&(d=-1)),r(a,o,l,d)}function J(e,t,i,n){Y(e,0,i,n),W(0,t,i,n),q(e,0,i,n),X(e,0,i,n),K(e,0,i,n)}function Z(e,t,i,a,r,o){var l;a.mode===S.default.SCENE3D?(l=e._baseVolume,e._boundingVolumeDirty=!0):l=e._baseVolume2D;for(var u=[],d=0;d0){this._vaf=function(e,t,i){return new O.a(e,[{index:z.positionHighAndSize,componentsPerAttribute:4,componentDatatype:r.default.FLOAT,usage:i[D]},{index:z.positionLowAndShow,componentsPerAttribute:4,componentDatatype:r.default.FLOAT,usage:i[D]},{index:z.compressedAttribute0,componentsPerAttribute:4,componentDatatype:r.default.FLOAT,usage:i[P]},{index:z.compressedAttribute1,componentsPerAttribute:4,componentDatatype:r.default.FLOAT,usage:i[N]},{index:z.scaleByDistance,componentsPerAttribute:4,componentDatatype:r.default.FLOAT,usage:i[R]},{index:z.distanceDisplayConditionAndDisableDepth,componentsPerAttribute:3,componentDatatype:r.default.FLOAT,usage:i[B]}],t)}(d,i,this._buffersUsage),t=this._vaf.writers;for(var U=0;U0){var G=Q;G.length=0,(l[D]||l[L]||l[j])&&G.push(Y),(l[P]||l[I])&&G.push(W),(l[M]||l[N])&&G.push(q),l[R]&&G.push(X),(l[B]||l[F])&&G.push(K);var $=G.length;if(t=this._vaf.writers,o/i>.1){for(var ee=0;ee1.5*i&&(a.length=i),Object(s.default)(this._vaf)&&Object(s.default)(this._vaf.va)){var oe;this._boundingVolumeDirty&&(this._boundingVolumeDirty=!1,n.default.transform(this._baseVolume,this.modelMatrix,this._baseVolumeWC));var se=f.default.IDENTITY;e.mode===S.default.SCENE3D?(se=this.modelMatrix,oe=n.default.clone(this._baseVolumeWC,this._boundingVolume)):oe=n.default.clone(this._baseVolume2D,this._boundingVolume),function(e,t,i){var n=t.camera.getPixelSize(i,t.context.drawingBufferWidth,t.context.drawingBufferHeight)*e._maxPixelSize;i.radius+=n}(this,e,oe);var le,ue,de,ce,fe,he,pe=this._blendOption!==this.blendOption;this._blendOption=this.blendOption,pe&&(this._blendOption===E.a.OPAQUE||this._blendOption===E.a.OPAQUE_AND_TRANSLUCENT?this._rsOpaque=y.default.fromCache({depthTest:{enabled:!0,func:p.a.LEQUAL},depthMask:!0}):this._rsOpaque=void 0,this._blendOption===E.a.TRANSLUCENT||this._blendOption===E.a.OPAQUE_AND_TRANSLUCENT?this._rsTranslucent=y.default.fromCache({depthTest:{enabled:!0,func:p.a.LEQUAL},depthMask:!1,blending:T.default.ALPHA_BLEND}):this._rsTranslucent=void 0),this._shaderDisableDepthDistance=this._shaderDisableDepthDistance||0!==e.minimumDisableDepthTestDistance,(pe||this._shaderScaleByDistance&&!this._compiledShaderScaleByDistance||this._shaderTranslucencyByDistance&&!this._compiledShaderTranslucencyByDistance||this._shaderDistanceDisplayCondition&&!this._compiledShaderDistanceDisplayCondition||this._shaderDisableDepthDistance!==this._compiledShaderDisableDepthDistance)&&(le=new w.default({sources:[A.a]}),this._shaderScaleByDistance&&le.defines.push("EYE_DISTANCE_SCALING"),this._shaderTranslucencyByDistance&&le.defines.push("EYE_DISTANCE_TRANSLUCENCY"),this._shaderDistanceDisplayCondition&&le.defines.push("DISTANCE_DISPLAY_CONDITION"),this._shaderDisableDepthDistance&&le.defines.push("DISABLE_DEPTH_DISTANCE"),this._blendOption===E.a.OPAQUE_AND_TRANSLUCENT&&(ue=new w.default({defines:["OPAQUE"],sources:[x.a]}),this._sp=b.default.replaceCache({context:d,shaderProgram:this._sp,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:z}),ue=new w.default({defines:["TRANSLUCENT"],sources:[x.a]}),this._spTranslucent=b.default.replaceCache({context:d,shaderProgram:this._spTranslucent,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:z})),this._blendOption===E.a.OPAQUE&&(ue=new w.default({sources:[x.a]}),this._sp=b.default.replaceCache({context:d,shaderProgram:this._sp,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:z})),this._blendOption===E.a.TRANSLUCENT&&(ue=new w.default({sources:[x.a]}),this._spTranslucent=b.default.replaceCache({context:d,shaderProgram:this._spTranslucent,vertexShaderSource:le,fragmentShaderSource:ue,attributeLocations:z})),this._compiledShaderScaleByDistance=this._shaderScaleByDistance,this._compiledShaderTranslucencyByDistance=this._shaderTranslucencyByDistance,this._compiledShaderDistanceDisplayCondition=this._shaderDistanceDisplayCondition,this._compiledShaderDisableDepthDistance=this._shaderDisableDepthDistance);var me=e.commandList;if(c.render||m){var _e=this._colorCommands,ge=this._blendOption===E.a.OPAQUE,ve=this._blendOption===E.a.OPAQUE_AND_TRANSLUCENT;ce=(de=this._vaf.va).length,_e.length=ce;var ye=ve?2*ce:ce;for(he=0;he0?(l=s.default.secondsDifference(d.stop,n),++u):(l=s.default.secondsDifference(d.start,n),--u),l/=o,u>=0&&l<=5?t.get(u):void 0}}}}function h(e,t,i){var n=e._times.indexOf(i.start),a=e._tileCache,o=a[n];Object(r.default)(o)||(o=a[n]={});var s=t.key;if(Object(r.default)(o[s]))return!0;var d=function(e){var t=e.split("-");if(3===t.length)return{x:Number(t[0]),y:Number(t[1]),level:Number(t[2])}}(s),c=new l.default({throttle:!1,throttleByServer:!0,type:u.a.IMAGERY,priorityFunction:t.priorityFunction}),f=e._requestImageFunction(d.x,d.y,d.level,c,i);return!!Object(r.default)(f)&&(o[s]={promise:f,request:c},!0)}Object.defineProperties(d.prototype,{clock:{get:function(){return this._clock},set:function(e){if(!Object(r.default)(e))throw new o.default("value is required.");this._clock!==e&&(this._clock=e,this._clockOnTick(e),this._reloadFunction())}},times:{get:function(){return this._times},set:function(e){if(!Object(r.default)(e))throw new o.default("value is required.");this._times!==e&&(this._times=e,this._clockOnTick(this._clock),this._reloadFunction())}},currentInterval:{get:function(){return this._times.get(this._currentIntervalIndex)}}}),d.prototype.getFromCache=function(e,t,i,n){var a,o=c(e,t,i),s=this._tileCache[this._currentIntervalIndex];if(Object(r.default)(s)&&Object(r.default)(s[o])){var l=s[o];a=l.promise.otherwise((function(e){throw n.state=l.request.state,e})),delete s[o]}return a},d.prototype.checkApproachingInterval=function(e,t,i,n){var a=c(e,t,i),o=this._tilesRequestedForInterval,s=f(this),l={key:a,priorityFunction:n.priorityFunction};Object(r.default)(s)&&h(this,l,s)||o.push(l),o.length>=512&&o.splice(0,256)},d.prototype._clockOnTick=function(e){var t=e.currentTime,i=this._times.indexOf(t),n=this._currentIntervalIndex;if(i!==n){var a=this._tileCache[n];for(var o in a)a.hasOwnProperty(o)&&a[o].request.cancel();return delete this._tileCache[n],this._tilesRequestedForInterval=[],this._currentIntervalIndex=i,void this._reloadFunction()}var s=f(this);if(Object(r.default)(s))for(var l=this._tilesRequestedForInterval,u=!0;u&&0!==l.length;){var d=l.pop();(u=h(this,d,s))||l.push(d)}},t.a=d},function(e,t,i){"use strict";var n=i(68),a=i(17),r=i(1),o=i(22),s=i(11),l=i(2),u=i(0),d=i(3),c=i(15),f=i(46),h=i(28),p=i(82),m=i(71),_=i(38),g=i(5),v=i(111),y=i(35),b=i(21),w=i(197),O=new a.default,x=new a.default,A=new r.default,T=new b.default;function E(e,t){var i=e._ellipsoid,n=t.height,a=t.width,r=t.northCap,o=t.southCap,l=n,u=2,d=0,c=4;r&&(u-=1,l-=1,d+=1,c-=2),o&&(u-=1,l-=1,d+=1,c-=2),d+=u*a+2*l-c;var m,g=new Float64Array(3*d),v=0,b=0,O=A;if(r)w.a.computePosition(t,i,!1,b,0,O),g[v++]=O.x,g[v++]=O.y,g[v++]=O.z;else for(m=0;m=0;m--)w.a.computePosition(t,i,!1,b,m,O),g[v++]=O.x,g[v++]=O.y,g[v++]=O.z;for(m=0,b=n-2;b>0;b--)w.a.computePosition(t,i,!1,b,m,O),g[v++]=O.x,g[v++]=O.y,g[v++]=O.z;for(var x=g.length/3*2,T=_.a.createTypedArray(g.length/3,x),E=0,C=0;Cu.far)){if(ae.cameraEventWaitTime&&(t.moveEnd.raiseEvent(),this._cameraStartFired=!1),!1):(this._cameraStartFired||(t.moveStart.raiseEvent(),this._cameraStartFired=!0),this._cameraMovedTime=Object(s.a)(),p.a.clone(t,i),!0)};var P=new r.a,I=new l.default;E.prototype.createPotentiallyVisibleSet=function(e){var t=e.frameState,i=t.camera,n=i.directionWC,a=i.positionWC,r=e._computeCommandList,s=e._overlayCommandList,l=t.commandList;e.debugShowFrustums&&(this.debugFrustumStatistics={totalCommands:0,commandsInFrustums:{}});for(var d=this.frustumCommandsList,h=d.length,p=f.default.NUMBER_OF_PASSES,_=0;_100)){var q=G-H;V!==f.default.GLOBE&&H<100&&(M=Math.min(M,q)),C=Math.min(C,H),S=Math.max(S,G)}}else U instanceof c.default?(H=i.frustum.near,G=i.frustum.far):(H=i.frustum.near,G=i.frustum.far,w=Math.min(w,H),A=Math.max(A,G));var X=v[b];Object(o.default)(X)||(X=v[b]=new T),X.command=U,X.near=H,X.far=G,b++}}for(E&&(C=Math.min(Math.max(C,i.frustum.near),i.frustum.far),S=Math.max(Math.min(S,i.frustum.far),C)),E&&(t.shadowState.nearPlane=C,t.shadowState.farPlane=S,t.shadowState.closestObjectSize=M),function(e,t,i,n){var a,r=t.frameState,s=r.camera,l=r.useLogDepth?t.logarithmicDepthFarToNearRatio:t.farToNearRatio,d=t.mode===O.default.SCENE2D,c=t.nearToFarDistance2D;n*=1+u.default.EPSILON2,i=Math.min(Math.max(i,s.frustum.near),s.frustum.far),n=Math.max(Math.min(n,s.frustum.far),i),d?(n=Math.min(n,s.position.z+t.nearToFarDistance2D),i=Math.min(i,n),a=Math.ceil(Math.max(1,n-i)/t.nearToFarDistance2D)):a=Math.ceil(Math.log(n/i)/Math.log(l));var f=e.frustumCommandsList;f.length=a;for(var h=0;h0||n||r||d||c;if((i||!f&&this._framebuffers.length>0)&&(_(this),this._framebuffers.length=0,this._stageNameToFramebuffer={},this._width=void 0,this._height=void 0),i||f){0===this._framebuffers.length&&m(this,e);var h=e.drawingBufferWidth,p=e.drawingBufferHeight,g=this._width!==h||this._height!==p;(i||g)&&(this._width=h,this._height=p,this._updateDependencies=!1,_(this),function(e,t){for(var i=e._width,n=e._height,a=e._framebuffers,r=a.length,d=0;d 0.0 && clipDistance < clippingPlanesEdgeWidth) \n { \n gl_FragColor = clippingPlanesEdgeColor;\n } \n"}},function(e,t,i){"use strict";var n=i(246);function a(){this.initialized=!1,this.resourcesParsed=!1,this.vertexBuffersToCreate=new n.a,this.indexBuffersToCreate=new n.a,this.buffers={},this.pendingBufferLoads=0,this.programsToCreate=new n.a,this.shaders={},this.pendingShaderLoads=0,this.texturesToCreate=new n.a,this.pendingTextureLoads=0,this.texturesToCreateFromBufferView=new n.a,this.pendingBufferViewToImage=0,this.createSamplers=!0,this.createSkins=!0,this.createRuntimeAnimations=!0,this.createVertexArrays=!0,this.createRenderStates=!0,this.createUniformMaps=!0,this.createRuntimeNodes=!0,this.createdBufferViews={},this.primitivesToDecode=new n.a,this.activeDecodingTasks=0,this.pendingDecodingCache=!1,this.skinnedNodesIds=[]}a.prototype.getBuffer=function(e){return function(e,t,i){return e.subarray(t,t+i)}(this.buffers[e.buffer],e.byteOffset,e.byteLength)},a.prototype.finishedPendingBufferLoads=function(){return 0===this.pendingBufferLoads},a.prototype.finishedBuffersCreation=function(){return 0===this.pendingBufferLoads&&0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length},a.prototype.finishedProgramCreation=function(){return 0===this.pendingShaderLoads&&0===this.programsToCreate.length},a.prototype.finishedTextureCreation=function(){var e=0===this.pendingTextureLoads,t=0===this.texturesToCreate.length&&0===this.texturesToCreateFromBufferView.length;return e&&t},a.prototype.finishedEverythingButTextureCreation=function(){var e=0===this.pendingBufferLoads&&0===this.pendingShaderLoads,t=0===this.vertexBuffersToCreate.length&&0===this.indexBuffersToCreate.length&&0===this.programsToCreate.length&&0===this.pendingBufferViewToImage;return this.finishedDecoding()&&e&&t},a.prototype.finishedDecoding=function(){return 0===this.primitivesToDecode.length&&0===this.activeDecodingTasks&&!this.pendingDecodingCache},a.prototype.finished=function(){return this.finishedDecoding()&&this.finishedTextureCreation()&&this.finishedEverythingButTextureCreation()},t.a=a},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(10),o=i(379),s=i(144),l=i(25),u=i(161),d=i(73);function c(e,t){var i;switch(i=Object(a.default)(t.value)?t.value:Object(a.default)(t.index)?[t.index]:t,e){case"ambient":case"diffuse":case"emission":case"specular":return 1===i.length?r.a.SAMPLER_2D:r.a.FLOAT_VEC4;case"shininess":case"transparency":return r.a.FLOAT;case"transparent":case"doubleSided":return r.a.BOOL}}t.a=function(e,t){if(t=Object(n.default)(t,n.default.EMPTY_OBJECT),Object(a.default)(e)&&Object(u.a)(e,"KHR_materials_common")){Object(u.a)(e,"KHR_techniques_webgl")||(Object(a.default)(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl"));var i=e.extensions.KHR_techniques_webgl;!function(e){var t=e.extensions.KHR_materials_common;if(!Object(a.default)(t)||!Object(a.default)(t.lights))return;for(var i=t.lights,r=i.length,o=0;o0&&(i+=f.type+";"),i+=t.hasVertexColors}return i}(_,g),y=p[v];Object(a.default)(y)||(y=function(e,t,i,l,d,f){Object(a.default)(l)||(l={});f=Object(n.default)(f,!1);var h,p=t.techniques,m=t.shaders,_=t.programs,g=l.technique.toUpperCase();Object(a.default)(e.extensions)&&Object(a.default)(e.extensions.KHR_materials_common)&&(h=e.extensions.KHR_materials_common.lights);var v,y=l.values,b=Object(n.default)(l.jointCount,0),w=!1,O=!1;Object(a.default)(i)&&(v=i.skinning,w=v.skinned,O=i.hasVertexColors);var x,A="precision highp float;\n",T="precision highp float;\n",E="CONSTANT"!==g,C={u_modelViewMatrix:{semantic:Object(u.a)(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:r.a.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:r.a.FLOAT_MAT4}};E&&(C.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:r.a.FLOAT_MAT3});w&&(C.u_jointMatrix={count:b,semantic:"JOINTMATRIX",type:r.a.FLOAT_MAT4});var S=!1;for(var M in y)if(y.hasOwnProperty(M)&&"transparent"!==M&&"doubleSided"!==M){var D=c(M,y[M]);x="u_"+M.toLowerCase(),S||D!==r.a.SAMPLER_2D||(S=!0),C[x]={type:D}}Object(a.default)(C.u_diffuse)&&(C.u_diffuse.semantic="_3DTILESDIFFUSE");if(Object(a.default)(d))for(var P in d)d.hasOwnProperty(P)&&(C[x="u_"+P]=d[P]);for(x in C)if(C.hasOwnProperty(x)){var I=C[x],L=Object(a.default)(I.count)?"["+I.count+"]":"";I.type!==r.a.FLOAT_MAT3&&I.type!==r.a.FLOAT_MAT4||I.useInFragment?(T+="uniform "+Object(o.a)(I.type)+" "+x+L+";\n",delete I.useInFragment):A+="uniform "+Object(o.a)(I.type)+" "+x+L+";\n"}var j="";w&&(j+=" mat4 skinMatrix =\n a_weight.x * u_jointMatrix[int(a_joint.x)] +\n a_weight.y * u_jointMatrix[int(a_joint.y)] +\n a_weight.z * u_jointMatrix[int(a_joint.z)] +\n a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var R,N={a_position:{semantic:"POSITION"}};A+="attribute vec3 a_position;\n",A+="varying vec3 v_positionEC;\n",j+=w?" vec4 pos = u_modelViewMatrix * skinMatrix * vec4(a_position,1.0);\n":" vec4 pos = u_modelViewMatrix * vec4(a_position,1.0);\n";j+=" v_positionEC = pos.xyz;\n",j+=" gl_Position = u_projectionMatrix * pos;\n",T+="varying vec3 v_positionEC;\n",E&&(N.a_normal={semantic:"NORMAL"},A+="attribute vec3 a_normal;\n",A+="varying vec3 v_normal;\n",j+=w?" v_normal = u_normalMatrix * mat3(skinMatrix) * a_normal;\n":" v_normal = u_normalMatrix * a_normal;\n",T+="varying vec3 v_normal;\n");S&&(N.a_texcoord_0={semantic:"TEXCOORD_0"},A+="attribute vec2 a_texcoord_0;\n",A+="varying vec2 "+(R="v_texcoord_0")+";\n",j+=" "+R+" = a_texcoord_0;\n",T+="varying vec2 "+R+";\n");w&&(N.a_joint={semantic:"JOINTS_0"},N.a_weight={semantic:"WEIGHTS_0"},A+="attribute vec4 a_joint;\n",A+="attribute vec4 a_weight;\n");O&&(N.a_vertexColor={semantic:"COLOR_0"},A+="attribute vec4 a_vertexColor;\n",A+="varying vec4 v_vertexColor;\n",j+=" v_vertexColor = a_vertexColor;\n",T+="varying vec4 v_vertexColor;\n");f&&(N.a_batchId={semantic:"_BATCHID"},A+="attribute float a_batchId;\n");var B=E&&("BLINN"===g||"PHONG"===g)&&Object(a.default)(C.u_specular)&&Object(a.default)(C.u_shininess)&&C.u_shininess>0,F=!1,k=!1,z="";for(var U in h)if(h.hasOwnProperty(U)){var V=h[U],H=V.type.toLowerCase(),G=V.baseName;z+=" {\n";var Y,W,q="u_"+G+"Color";"ambient"===H?(k=!0,z+=" ambientLight += "+q+";\n"):E&&(F=!0,Y="v_"+G+"Direction",W="v_"+G+"Position","point"!==H&&(A+="varying vec3 "+Y+";\n",T+="varying vec3 "+Y+";\n",j+=" "+Y+" = mat3(u_"+G+"Transform) * vec3(0.,0.,1.);\n","directional"===H&&(z+=" vec3 l = normalize("+Y+");\n")),"directional"!==H?(A+="varying vec3 "+W+";\n",T+="varying vec3 "+W+";\n",j+=" "+W+" = u_"+G+"Transform[3].xyz;\n",z+=" vec3 VP = "+W+" - v_positionEC;\n",z+=" vec3 l = normalize(VP);\n",z+=" float range = length(VP);\n",z+=" float attenuation = 1.0 / (u_"+G+"Attenuation.x + ",z+="(u_"+G+"Attenuation.y * range) + ",z+="(u_"+G+"Attenuation.z * range * range));\n"):z+=" float attenuation = 1.0;\n","spot"===H&&(z+=" float spotDot = dot(l, normalize("+Y+"));\n",z+=" if (spotDot < cos(u_"+G+"FallOff.x * 0.5))\n",z+=" {\n",z+=" attenuation = 0.0;\n",z+=" }\n",z+=" else\n",z+=" {\n",z+=" attenuation *= max(0.0, pow(spotDot, u_"+G+"FallOff.y));\n",z+=" }\n"),z+=" diffuseLight += "+q+"* max(dot(normal,l), 0.) * attenuation;\n",B&&("BLINN"===g?(z+=" vec3 h = normalize(l + viewDir);\n",z+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess)) * attenuation;\n"):(z+=" vec3 reflectDir = reflect(-l, normal);\n",z+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess)) * attenuation;\n"),z+=" specularLight += "+q+" * specularIntensity;\n")),z+=" }\n"}k||(z+=" ambientLight += vec3(0.2, 0.2, 0.2);\n");if(!F&&"CONSTANT"!==g){T+="#ifdef USE_CUSTOM_LIGHT_COLOR \n",T+="uniform vec3 gltf_lightColor; \n",T+="#endif \n",z+="#ifndef USE_CUSTOM_LIGHT_COLOR \n",z+=" vec3 lightColor = czm_lightColor;\n",z+="#else \n",z+=" vec3 lightColor = gltf_lightColor;\n",z+="#endif \n",z+=" vec3 l = normalize(czm_lightDirectionEC);\n";z+=" diffuseLight += lightColor * max(dot(normal,l), 0.2);\n",B&&("BLINN"===g?(z+=" vec3 h = normalize(l + viewDir);\n",z+=" float specularIntensity = max(0., pow(max(dot(normal, h), 0.), u_shininess));\n"):(z+=" vec3 reflectDir = reflect(-l, normal);\n",z+=" float specularIntensity = max(0., pow(max(dot(reflectDir, viewDir), 0.), u_shininess));\n"),z+=" specularLight += lightColor * specularIntensity;\n")}A+="void main(void) {\n",A+=j,A+="}\n",T+="void main(void) {\n";var X,K=" vec3 color = vec3(0.0, 0.0, 0.0);\n";E&&(T+=" vec3 normal = normalize(v_normal);\n",l.doubleSided&&(T+=" if (czm_backFacing())\n",T+=" {\n",T+=" normal = -normal;\n",T+=" }\n"));"CONSTANT"!==g?(Object(a.default)(C.u_diffuse)&&(C.u_diffuse.type===r.a.SAMPLER_2D?T+=" vec4 diffuse = texture2D(u_diffuse, "+R+");\n":T+=" vec4 diffuse = u_diffuse;\n",T+=" vec3 diffuseLight = vec3(0.0, 0.0, 0.0);\n",K+=" color += diffuse.rgb * diffuseLight;\n"),B&&(C.u_specular.type===r.a.SAMPLER_2D?T+=" vec3 specular = texture2D(u_specular, "+R+").rgb;\n":T+=" vec3 specular = u_specular.rgb;\n",T+=" vec3 specularLight = vec3(0.0, 0.0, 0.0);\n",K+=" color += specular * specularLight;\n"),X=Object(a.default)(C.u_transparency)?" gl_FragColor = vec4(color * diffuse.a * u_transparency, diffuse.a * u_transparency);\n":" gl_FragColor = vec4(color * diffuse.a, diffuse.a);\n"):X=Object(a.default)(C.u_transparency)?" gl_FragColor = vec4(color * u_transparency, u_transparency);\n":" gl_FragColor = vec4(color, 1.0);\n";O&&(K+=" color *= v_vertexColor.rgb;\n");Object(a.default)(C.u_emission)&&(C.u_emission.type===r.a.SAMPLER_2D?T+=" vec3 emission = texture2D(u_emission, "+R+").rgb;\n":T+=" vec3 emission = u_emission.rgb;\n",K+=" color += emission;\n");(Object(a.default)(C.u_ambient)||"CONSTANT"!==g)&&(Object(a.default)(C.u_ambient)?C.u_ambient.type===r.a.SAMPLER_2D?T+=" vec3 ambient = texture2D(u_ambient, "+R+").rgb;\n":T+=" vec3 ambient = u_ambient.rgb;\n":T+=" vec3 ambient = diffuse.rgb;\n",K+=" color += ambient * ambientLight;\n");T+=" vec3 viewDir = -normalize(v_positionEC);\n",T+=" vec3 ambientLight = vec3(0.0, 0.0, 0.0);\n",T+=z,T+=K,T+=X,T+="}\n";var J=Object(s.a)(m,{type:r.a.VERTEX_SHADER,extras:{_pipeline:{source:A,extension:".glsl"}}}),Z=Object(s.a)(m,{type:r.a.FRAGMENT_SHADER,extras:{_pipeline:{source:T,extension:".glsl"}}}),Q=Object(s.a)(_,{fragmentShader:Z,vertexShader:J});return Object(s.a)(p,{attributes:N,program:Q,uniforms:C})}(e,i,g,_,f,t.addBatchIdToGeneratedShaders),p[v]=y,m=!0);var b={},w=_.values;for(var O in w)w.hasOwnProperty(O)&&"transparent"!==O&&"doubleSided"!==O&&(b["u_"+O.toLowerCase()]=w[O]);l.extensions.KHR_techniques_webgl={technique:y,values:b},l.alphaMode="OPAQUE",_.transparent&&(l.alphaMode="BLEND"),_.doubleSided&&(l.doubleSided=!0)}})),m?(d.a.ensureSemanticExistence(e),e):e}}},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(10),o=i(379),s=i(144),l=i(25),u=i(161),d=i(73);function c(e,t,i,n,r){var o,s=i[t];return Object(a.default)(s)&&Object(a.default)(s.texCoord)&&1===s.texCoord&&(n=n.replace("0","1")),Object(a.default)(i[t+"Offset"])?(o=t+"Coord",r.fragmentShaderMain+=" vec2 "+o+" = computeTexCoord("+n+", "+t+"Offset, "+t+"Rotation, "+t+"Scale);\n"):o=n,o}var f=[0,0],h=[0],p=[1,1];function m(e,t,i){if(-1!==e.indexOf("Texture")&&Object(a.default)(t.extensions)&&Object(a.default)(t.extensions.KHR_texture_transform)){var r="u_"+e,o=t.extensions.KHR_texture_transform;i[r+"Offset"]=Object(n.default)(o.offset,f),i[r+"Rotation"]=Object(n.default)(o.rotation,h),i[r+"Scale"]=Object(n.default)(o.scale,p),Object(a.default)(t.texCoord)&&Object(a.default)(o.texCoord)&&(i[r].texCoord=o.texCoord)}}function _(e){if(-1!==e.indexOf("Offset"))return r.a.FLOAT_VEC2;if(-1!==e.indexOf("Rotation"))return r.a.FLOAT;if(-1!==e.indexOf("Scale"))return r.a.FLOAT_VEC2;if(-1!==e.indexOf("Texture"))return r.a.SAMPLER_2D;switch(e){case"u_baseColorFactor":return r.a.FLOAT_VEC4;case"u_metallicFactor":case"u_roughnessFactor":return r.a.FLOAT;case"u_emissiveFactor":return r.a.FLOAT_VEC3;case"u_diffuseFactor":return r.a.FLOAT_VEC4;case"u_specularFactor":return r.a.FLOAT_VEC3;case"u_glossinessFactor":return r.a.FLOAT}}t.a=function(e,t){if(t=Object(n.default)(t,n.default.EMPTY_OBJECT),Object(u.a)(e,"KHR_techniques_webgl"))return e;if(!Object(a.default)(e.materials)||0===e.materials.length)return e;Object(a.default)(e.extensions)||(e.extensions={}),Object(a.default)(e.extensionsUsed)||(e.extensionsUsed=[]),Object(a.default)(e.extensionsRequired)||(e.extensionsRequired=[]),e.extensions.KHR_techniques_webgl={programs:[],shaders:[],techniques:[]},e.extensionsUsed.push("KHR_techniques_webgl"),e.extensionsRequired.push("KHR_techniques_webgl");var i=d.a.splitIncompatibleMaterials(e);return l.a.material(e,(function(d,f){var h={},p=function(e,t,i,d,f,h){var p,g,v,y=Object(n.default)(h.addBatchIdToGeneratedShaders,!1),b=e.extensions.KHR_techniques_webgl,w=b.techniques,O=b.shaders,x=b.programs,A=function(e){return Object(a.default)(e.extensions)&&Object(a.default)(e.extensions.KHR_materials_pbrSpecularGlossiness)}(t),T=t.pbrMetallicRoughness;if(Object(a.default)(T)&&!A)for(g in T)T.hasOwnProperty(g)&&(v=T[g],d[p="u_"+g]=v,m(g,v,d));if(A){var E=t.extensions.KHR_materials_pbrSpecularGlossiness;for(g in E)E.hasOwnProperty(g)&&(v=E[g],d[p="u_"+g]=v,m(g,v,d))}for(var C in t)t.hasOwnProperty(C)&&(C.indexOf("Texture")>=0||C.indexOf("Factor")>=0)&&(v=t[C],d[p="u_"+C]=v,m(C,v,d));var S,M="precision highp float;\n",D="precision highp float;\n";Object(a.default)(e.skins)&&(S=e.skins[0]);var P,I,L=Object(a.default)(S)?S.joints:[],j=L.length,R=f[i],N=!1,B=!1,F=!1,k=!1,z=!1,U=!1,V=!1,H=!1,G=!1;Object(a.default)(R)&&(P=R.skinning,N=P.skinned&&L.length>0,B=R.hasVertexColors,F=R.hasMorphTargets,k=R.hasNormals,z=R.hasTangents,U=R.hasTexCoords,V=R.hasTexCoord1,H=R.hasOutline);F&&l.a.mesh(e,(function(e){l.a.meshPrimitive(e,(function(e){if(e.material===i){var t=e.targets;Object(a.default)(t)&&(I=t)}}))}));var Y={u_modelViewMatrix:{semantic:Object(u.a)(e,"CESIUM_RTC")?"CESIUM_RTC_MODELVIEW":"MODELVIEW",type:r.a.FLOAT_MAT4},u_projectionMatrix:{semantic:"PROJECTION",type:r.a.FLOAT_MAT4}};Object(a.default)(t.extensions)&&Object(a.default)(t.extensions.KHR_materials_unlit)&&(G=!0);k&&(Y.u_normalMatrix={semantic:"MODELVIEWINVERSETRANSPOSE",type:r.a.FLOAT_MAT3});N&&(Y.u_jointMatrix={count:j,semantic:"JOINTMATRIX",type:r.a.FLOAT_MAT4});F&&(Y.u_morphWeights={count:I.length,semantic:"MORPHWEIGHTS",type:r.a.FLOAT});var W=t.alphaMode;Object(a.default)(W)&&"MASK"===W&&(Y.u_alphaCutoff={semantic:"ALPHACUTOFF",type:r.a.FLOAT});for(p in d)d.hasOwnProperty(p)&&(Y[p]={type:_(p)});var q=Object(n.default)(Y.u_baseColorTexture,Y.u_baseColorFactor);Object(a.default)(q)&&(q.semantic="_3DTILESDIFFUSE");for(p in Y)if(Y.hasOwnProperty(p)){var X=Y[p],K=Object(a.default)(X.count)?"["+X.count+"]":"";X.type!==r.a.FLOAT_MAT3&&X.type!==r.a.FLOAT_MAT4&&"u_morphWeights"!==p||X.useInFragment?(D+="uniform "+Object(o.a)(X.type)+" "+p+K+";\n",delete X.useInFragment):M+="uniform "+Object(o.a)(X.type)+" "+p+K+";\n"}H&&(D+="uniform sampler2D u_outlineTexture;\n");var J="";N&&(J+=" mat4 skinMatrix =\n a_weight.x * u_jointMatrix[int(a_joint.x)] +\n a_weight.y * u_jointMatrix[int(a_joint.y)] +\n a_weight.z * u_jointMatrix[int(a_joint.z)] +\n a_weight.w * u_jointMatrix[int(a_joint.w)];\n");var Z={a_position:{semantic:"POSITION"}};H&&(Z.a_outlineCoordinates={semantic:"_OUTLINE_COORDINATES"});M+="attribute vec3 a_position;\n",k&&(M+="varying vec3 v_positionEC;\n");H&&(M+="attribute vec3 a_outlineCoordinates;\n",M+="varying vec3 v_outlineCoordinates;\n");J+=" vec3 weightedPosition = a_position;\n",k&&(J+=" vec3 weightedNormal = a_normal;\n");z&&(J+=" vec4 weightedTangent = a_tangent;\n");if(F)for(var Q=0;Q=570425344?(t-=2*u,_=h,m=p,v=0,h=0,p=0,l._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchLength] [batchTableByteLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")):v>=570425344&&(t-=u,_=m,m=h,v=p,h=0,p=0,l._deprecationWarning("b3dm-legacy-header","This b3dm header is using the legacy format [batchTableJsonByteLength] [batchTableBinaryByteLength] [batchLength]. The new format is [featureTableJsonByteLength] [featureTableBinaryByteLength] [batchTableJsonByteLength] [batchTableBinaryByteLength] from https://github.com/CesiumGS/3d-tiles/tree/main/specification/TileFormats/Batched3DModel.")),0===h?g={BATCH_LENGTH:Object(a.default)(_,0)}:(g=Object(o.a)(r,t,h),t+=h);var y,b,w=new Uint8Array(e,t,p);t+=p,m>0&&(y=Object(o.a)(r,t,m),t+=m,v>0&&(b=new Uint8Array(e,t,v),b=new Uint8Array(b),t+=v));var O,x=i+f-t;if(0===x)throw new s.a("glTF byte length must be greater than 0.");return t%4==0?O=new Uint8Array(e,t,x):(l._deprecationWarning("b3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),O=new Uint8Array(r.subarray(t,t+x))),{batchLength:_,featureTableJson:g,featureTableBinary:w,batchTableJson:y,batchTableBinary:b,gltf:O}},t.a=l},function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var n=i(68),a=i(150),r=i(4),o=i(50),s=i(60),l=i(11),u=i(0),d=i(2),c=i(3),f=i(289),h=i(23);function p(e){this._classes=void 0,this._classIds=void 0,this._classIndexes=void 0,this._parentCounts=void 0,this._parentIndexes=void 0,this._parentIds=void 0,r.a.typeOf.object("options.extension",e.extension),function(e,t,i){var r,o,c,h,p=t.instancesLength,_=t.classes,g=t.classIds,v=t.parentCounts,y=t.parentIds,b=p;Object(u.default)(g.byteOffset)&&(g.componentType=Object(d.default)(g.componentType,l.default.UNSIGNED_SHORT),g.type=a.a.SCALAR,c=Object(f.a)(g),g=c.createArrayBufferView(i.buffer,i.byteOffset+g.byteOffset,p));if(Object(u.default)(v))for(Object(u.default)(v.byteOffset)&&(v.componentType=Object(d.default)(v.componentType,l.default.UNSIGNED_SHORT),v.type=a.a.SCALAR,c=Object(f.a)(v),v=c.createArrayBufferView(i.buffer,i.byteOffset+v.byteOffset,p)),h=new Uint16Array(p),b=0,r=0;r=o)throw new c.default("Parent index "+t+" exceeds the total number of instances: "+o);if(i.indexOf(t)>-1)throw new c.default("Circular dependency detected in the batch table hierarchy.");i.push(t);for(var s=Object(u.default)(n)?n[t]:1,l=Object(u.default)(n)?r[t]:t,d=0;d0;)if(l[t=c.pop()]!==d){l[t]=d;var f=i(e,t);if(Object(u.default)(f))return f;for(var h=a[t],p=o[t],m=0;m0&&(b=Object(m.a)(o,a,g),a+=g,v>0&&(O=new Uint8Array(i,a,v),a+=v));var A=new L.a(y,x),T=A.getGlobalProperty("POINTS_LENGTH");if(A.featuresLength=T,!Object(h.default)(T))throw new w.a("Feature table global property: POINTS_LENGTH must be defined");var E,C,S,M,D=A.getGlobalProperty("RTC_CENTER",c.default.FLOAT,3);Object(h.default)(D)&&(e._rtcCenter=r.default.unpack(D));var P,j,R,N,B,F=!1,k=!1,U=!1,V=!1,H=!1,G=!1,W=!1,q=!1,X=Object(h.default)(y.extensions)?y.extensions["3DTILES_draco_point_compression"]:void 0,K=Object(h.default)(b)&&Object(h.default)(b.extensions)?b.extensions["3DTILES_draco_point_compression"]:void 0;Object(h.default)(K)&&(R=K.properties);if(Object(h.default)(X)){j=X.properties;var J=X.byteOffset,Z=X.byteLength;if(!Object(h.default)(j)||!Object(h.default)(J)||!Object(h.default)(Z))throw new w.a("Draco properties, byteOffset, and byteLength must be defined");P=Object(n.a)(x,J,J+Z),F=Object(h.default)(j.POSITION),k=Object(h.default)(j.RGB)||Object(h.default)(j.RGBA),U=Object(h.default)(j.NORMAL),V=Object(h.default)(j.BATCH_ID),G=Object(h.default)(j.RGBA),e._decodingState=z}Object(h.default)(P)&&(N={buffer:P,featureTableProperties:j,batchTableProperties:R,properties:Object(d.default)(j,R),dequantizeInShader:e._dequantizeInShader});if(!F)if(Object(h.default)(y.POSITION))E=A.getPropertyArray("POSITION",c.default.FLOAT,3),F=!0;else if(Object(h.default)(y.POSITION_QUANTIZED)){E=A.getPropertyArray("POSITION_QUANTIZED",c.default.UNSIGNED_SHORT,3),H=!0,F=!0;var Q=A.getGlobalProperty("QUANTIZED_VOLUME_SCALE",c.default.FLOAT,3);if(!Object(h.default)(Q))throw new w.a("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");e._quantizedVolumeScale=r.default.unpack(Q),e._quantizedRange=65535;var $=A.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",c.default.FLOAT,3);if(!Object(h.default)($))throw new w.a("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");e._quantizedVolumeOffset=r.default.unpack($)}k||(Object(h.default)(y.RGBA)?(C=A.getPropertyArray("RGBA",c.default.UNSIGNED_BYTE,4),G=!0,k=!0):Object(h.default)(y.RGB)?(C=A.getPropertyArray("RGB",c.default.UNSIGNED_BYTE,3),k=!0):Object(h.default)(y.RGB565)&&(C=A.getPropertyArray("RGB565",c.default.UNSIGNED_SHORT,1),W=!0,k=!0));U||(Object(h.default)(y.NORMAL)?(S=A.getPropertyArray("NORMAL",c.default.FLOAT,3),U=!0):Object(h.default)(y.NORMAL_OCT16P)&&(S=A.getPropertyArray("NORMAL_OCT16P",c.default.UNSIGNED_BYTE,2),q=!0,U=!0));V||Object(h.default)(y.BATCH_ID)&&(M=A.getPropertyArray("BATCH_ID",c.default.UNSIGNED_SHORT,1),V=!0);if(!F)throw new w.a("Either POSITION or POSITION_QUANTIZED must be defined.");if(Object(h.default)(y.CONSTANT_RGBA)){var ee=A.getGlobalProperty("CONSTANT_RGBA",c.default.UNSIGNED_BYTE,4);e._constantColor=u.default.fromBytes(ee[0],ee[1],ee[2],ee[3],e._constantColor)}if(V){var te=A.getGlobalProperty("BATCH_LENGTH");if(!Object(h.default)(te))throw new w.a("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");Object(h.default)(O)&&(O=new Uint8Array(O)),Object(h.default)(e._batchTableLoaded)&&e._batchTableLoaded(te,b,O)}!V&&Object(h.default)(O)&&(B=I.a.getBinaryProperties(T,b,O));e._parsedContent={positions:E,colors:C,normals:S,batchIds:M,styleableProperties:B,draco:N},e._pointsLength=T,e._isQuantized=H,e._isOctEncoded16P=q,e._isRGB565=W,e._isTranslucent=G,e._hasColors=k,e._hasNormals=U,e._hasBatchIds=V}(this,e)}Object.defineProperties(G.prototype,{pointsLength:{get:function(){return this._pointsLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},color:{get:function(){return u.default.clone(this._highlightColor)},set:function(e){this._highlightColor=u.default.clone(e,this._highlightColor)}},boundingSphere:{get:function(){if(Object(h.default)(this._drawCommand))return this._drawCommand.boundingVolume},set:function(e){this._boundingSphere=a.default.clone(e,this._boundingSphere)}}});var Y=Uint32Array.BYTES_PER_ELEMENT;var W,q=new r.default,X=new r.default,K=new r.default;function J(e){if(!Object(h.default)(W)){_.default.setRandomNumberSeed(0),W=new Array(e);for(var t=0;t=0,Z=K.indexOf("NORMAL")>=0;if(Z&&!C)throw new w.a("Style references the NORMAL semantic but the point cloud does not have normals");for(a in U)if(U.hasOwnProperty(a)){o=U[a];var ne=X.indexOf(o.location)>=0;oe(I,o.location).enabled=ne}var le=E&&(!G||J);E&&(oe(I,1).enabled=le);var ue=C&&(P||D||Z);C&&(oe(I,2).enabled=ue);var de={a_position:0};le&&(de.a_color=1),ue&&(de.a_normal=2),M&&(de.a_batchId=3);var ce="",fe=X.length;for(n=0;n=0,h=o[c];r.attributes.push(ne(e,t,h,c,f))}}var p=Object(l.default)(a.extensions,l.default.EMPTY_OBJECT),m=i.EXT_mesh_features,_=p.EXT_feature_metadata;return Object(u.default)(m)?function(e,t){for(var i=t.featureIds,n=Object(u.default)(t.propertyTables)?t.propertyTables:[],a=i.length,r=0;r1&&"="===e.charAt(t);)++i;return Math.ceil(3*e.length)/4-i};for(var a=new Array(64),r=new Array(123),o=0;o<64;)r[a[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;n.encode=function(e,t,i){for(var n,r=[],o=0,s=0;t>2],n=(3&l)<<4,s=1;break;case 1:r[o++]=a[n|l>>4],n=(15&l)<<2,s=2;break;case 2:r[o++]=a[n|l>>6],r[o++]=a[63&l],s=0}}return s&&(r[o++]=a[n],r[o]=61,1===s&&(r[o+1]=61)),String.fromCharCode.apply(String,r)};n.decode=function(e,t,i){for(var n,a=i,o=0,s=0;s1)break;if((l=r[l])===undefined$1)throw Error("invalid encoding");switch(o){case 0:n=l,o=1;break;case 1:t[i++]=n<<2|(48&l)>>4,n=l,o=2;break;case 2:t[i++]=(15&n)<<4|(60&l)>>2,n=l,o=3;break;case 3:t[i++]=(3&n)<<6|l,o=0}}if(1===o)throw Error("invalid encoding");return i-a},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},{}],3:[function(e,t,i){function n(){this._listeners={}}t.exports=n,n.prototype.on=function(e,t,i){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:i||this}),this},n.prototype.off=function(e,t){if(e===undefined$1)this._listeners={};else if(t===undefined$1)this._listeners[e]=[];else for(var i=this._listeners[e],n=0;n0?0:2147483648,i,n);else if(isNaN(t))e(2143289344,i,n);else if(t>34028234663852886e22)e((a<<31|2139095040)>>>0,i,n);else if(t<11754943508222875e-54)e((a<<31|Math.round(t/1401298464324817e-60))>>>0,i,n);else{var r=Math.floor(Math.log(t)/Math.LN2);e((a<<31|r+127<<23|8388607&Math.round(t*Math.pow(2,-r)*8388608))>>>0,i,n)}}function i(e,t,i){var n=e(t,i),a=2*(n>>31)+1,r=n>>>23&255,o=8388607&n;return 255===r?o?NaN:a*(1/0):0===r?1401298464324817e-60*a*o:a*Math.pow(2,r-150)*(o+8388608)}e.writeFloatLE=t.bind(null,a),e.writeFloatBE=t.bind(null,r),e.readFloatLE=i.bind(null,o),e.readFloatBE=i.bind(null,s)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),i=new Uint8Array(t.buffer),n=128===i[7];function a(e,n,a){t[0]=e,n[a]=i[0],n[a+1]=i[1],n[a+2]=i[2],n[a+3]=i[3],n[a+4]=i[4],n[a+5]=i[5],n[a+6]=i[6],n[a+7]=i[7]}function r(e,n,a){t[0]=e,n[a]=i[7],n[a+1]=i[6],n[a+2]=i[5],n[a+3]=i[4],n[a+4]=i[3],n[a+5]=i[2],n[a+6]=i[1],n[a+7]=i[0]}function o(e,n){return i[0]=e[n],i[1]=e[n+1],i[2]=e[n+2],i[3]=e[n+3],i[4]=e[n+4],i[5]=e[n+5],i[6]=e[n+6],i[7]=e[n+7],t[0]}function s(e,n){return i[7]=e[n],i[6]=e[n+1],i[5]=e[n+2],i[4]=e[n+3],i[3]=e[n+4],i[2]=e[n+5],i[1]=e[n+6],i[0]=e[n+7],t[0]}e.writeDoubleLE=n?a:r,e.writeDoubleBE=n?r:a,e.readDoubleLE=n?o:s,e.readDoubleBE=n?s:o}():function(){function t(e,t,i,n,a,r){var o=n<0?1:0;if(o&&(n=-n),0===n)e(0,a,r+t),e(1/n>0?0:2147483648,a,r+i);else if(isNaN(n))e(0,a,r+t),e(2146959360,a,r+i);else if(n>17976931348623157e292)e(0,a,r+t),e((o<<31|2146435072)>>>0,a,r+i);else{var s;if(n<22250738585072014e-324)e((s=n/5e-324)>>>0,a,r+t),e((o<<31|s/4294967296)>>>0,a,r+i);else{var l=Math.floor(Math.log(n)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(s=n*Math.pow(2,-l))>>>0,a,r+t),e((o<<31|l+1023<<20|1048576*s&1048575)>>>0,a,r+i)}}}function i(e,t,i,n,a){var r=e(n,a+t),o=e(n,a+i),s=2*(o>>31)+1,l=o>>>20&2047,u=4294967296*(1048575&o)+r;return 2047===l?u?NaN:s*(1/0):0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,a,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=i.bind(null,o,0,4),e.readDoubleBE=i.bind(null,s,4,0)}(),e}function a(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}function r(e,t,i){t[i]=e>>>24,t[i+1]=e>>>16&255,t[i+2]=e>>>8&255,t[i+3]=255&e}function o(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function s(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}t.exports=n(n)},{}],5:[function(require,module,exports){function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},{}],6:[function(e,t,i){t.exports=function(e,t,i){var n=i||8192,a=n>>>1,r=null,o=n;return function(i){if(i<1||i>a)return e(i);o+i>n&&(r=e(n),o=0);var s=t.call(r,o,o+=i);return 7&o&&(o=1+(7|o)),s}}},{}],7:[function(e,t,i){var n=i;n.length=function(e){for(var t=0,i=0,n=0;n191&&n<224?r[o++]=(31&n)<<6|63&e[t++]:n>239&&n<365?(n=((7&n)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,r[o++]=55296+(n>>10),r[o++]=56320+(1023&n)):r[o++]=(15&n)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,r)),o=0);return a?(o&&a.push(String.fromCharCode.apply(String,r.slice(0,o))),a.join("")):String.fromCharCode.apply(String,r.slice(0,o))},n.write=function(e,t,i){for(var n,a,r=i,o=0;o>6|192,t[i++]=63&n|128):55296==(64512&n)&&56320==(64512&(a=e.charCodeAt(o+1)))?(n=65536+((1023&n)<<10)+(1023&a),++o,t[i++]=n>>18|240,t[i++]=n>>12&63|128,t[i++]=n>>6&63|128,t[i++]=63&n|128):(t[i++]=n>>12|224,t[i++]=n>>6&63|128,t[i++]=63&n|128);return i-r}},{}],8:[function(e,t,i){var n=i;function a(){n.Reader._configure(n.BufferReader),n.util._configure()}n.build="minimal",n.roots={},n.Writer=e(15),n.BufferWriter=e(16),n.Reader=e(9),n.BufferReader=e(10),n.util=e(14),n.rpc=e(11),n.configure=a,n.Writer._configure(n.BufferWriter),a()},{10:10,11:11,14:14,15:15,16:16,9:9}],9:[function(e,t,i){t.exports=l;var n,a=e(14),r=a.LongBits,o=a.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u,d="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")};function c(){var e=new r(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function f(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function h(){if(this.pos+8>this.len)throw s(this,8);return new r(f(this.buf,this.pos+=4),f(this.buf,this.pos+=4))}l.create=a.Buffer?function(e){return(l.create=function(e){return a.Buffer.isBuffer(e)?new n(e):d(e)})(e)}:d,l.prototype._slice=a.Array.prototype.subarray||a.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)|0},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return f(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|f(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=a.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=a.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,i=this.pos+e;if(i>this.len)throw s(this,e);return this.pos+=e,t===i?new this.buf.constructor(0):this._slice.call(this.buf,t,i)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;;){if(4==(e=7&this.uint32()))break;this.skipType(e)}break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){n=e;var t=a.Long?"toLong":"toNumber";a.merge(l.prototype,{int64:function(){return c.call(this)[t](!1)},uint64:function(){return c.call(this)[t](!0)},sint64:function(){return c.call(this).zzDecode()[t](!1)},fixed64:function(){return h.call(this)[t](!0)},sfixed64:function(){return h.call(this)[t](!1)}})}},{14:14}],10:[function(e,t,i){t.exports=r;var n=e(9);(r.prototype=Object.create(n.prototype)).constructor=r;var a=e(14);function r(e){n.call(this,e)}a.Buffer&&(r.prototype._slice=a.Buffer.prototype.slice),r.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len))}},{14:14,9:9}],11:[function(e,t,i){i.Service=e(12)},{12:12}],12:[function(e,t,i){t.exports=a;var n=e(14);function a(e,t,i){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");n.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(i)}(a.prototype=Object.create(n.EventEmitter.prototype)).constructor=a,a.prototype.rpcCall=function e(t,i,a,r,o){if(!r)throw TypeError("request must be specified");var s=this;if(!o)return n.asPromise(e,s,t,i,a,r);if(!s.rpcImpl)return setTimeout((function(){o(Error("already ended"))}),0),undefined$1;try{return s.rpcImpl(t,i[s.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(e,i){if(e)return s.emit("error",e,t),o(e);if(null===i)return s.end(!0),undefined$1;if(!(i instanceof a))try{i=a[s.responseDelimited?"decodeDelimited":"decode"](i)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",i,t),o(null,i)}))}catch(e){return s.emit("error",e,t),setTimeout((function(){o(e)}),0),undefined$1}},a.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},{14:14}],13:[function(e,t,i){t.exports=a;var n=e(14);function a(e,t){this.lo=e>>>0,this.hi=t>>>0}var r=a.zero=new a(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var o=a.zeroHash="\0\0\0\0\0\0\0\0";a.fromNumber=function(e){if(0===e)return r;var t=e<0;t&&(e=-e);var i=e>>>0,n=(e-i)/4294967296>>>0;return t&&(n=~n>>>0,i=~i>>>0,++i>4294967295&&(i=0,++n>4294967295&&(n=0))),new a(i,n)},a.from=function(e){if("number"==typeof e)return a.fromNumber(e);if(n.isString(e)){if(!n.Long)return a.fromNumber(parseInt(e,10));e=n.Long.fromString(e)}return e.low||e.high?new a(e.low>>>0,e.high>>>0):r},a.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,i=~this.hi>>>0;return t||(i=i+1>>>0),-(t+4294967296*i)}return this.lo+4294967296*this.hi},a.prototype.toLong=function(e){return n.Long?new n.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;a.fromHash=function(e){return e===o?r:new a((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},a.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},a.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},a.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},a.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,i=this.hi>>>24;return 0===i?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:i<128?9:10}},{14:14}],14:[function(e,t,i){var n=i;function a(e,t,i){for(var n=Object.keys(t),a=0;a0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=global.dcodeIO&&global.dcodeIO.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var i=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(i.lo,i.hi,t):i.toNumber(Boolean(t))},n.merge=a,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=r,n.ProtocolError=r("ProtocolError"),n.oneOfGetter=function(e){for(var t={},i=0;i-1;--i)if(1===t[e[i]]&&this[e[i]]!==undefined$1&&null!==this[e[i]])return e[i]}},n.oneOfSetter=function(e){return function(t){for(var i=0;i>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[i++]=127&e.lo|128,e.lo=e.lo>>>7;t[i++]=e.lo}function m(e,t,i){t[i]=255&e,t[i+1]=e>>>8&255,t[i+2]=e>>>16&255,t[i+3]=e>>>24}c.create=a.Buffer?function(){return(c.create=function(){return new n})()}:function(){return new c},c.alloc=function(e){return new a.Array(e)},a.Array!==Array&&(c.alloc=a.pool(c.alloc,a.Array.prototype.subarray)),c.prototype.push=function(e,t,i){return this.tail=this.tail.next=new l(e,t,i),this.len+=t,this},h.prototype=Object.create(l.prototype),h.prototype.fn=function(e,t,i){for(;e>127;)t[i++]=127&e|128,e>>>=7;t[i]=e},c.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new h((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},c.prototype.int32=function(e){return e<0?this.push(p,10,r.fromNumber(e)):this.uint32(e)},c.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},c.prototype.uint64=function(e){var t=r.from(e);return this.push(p,t.length(),t)},c.prototype.int64=c.prototype.uint64,c.prototype.sint64=function(e){var t=r.from(e).zzEncode();return this.push(p,t.length(),t)},c.prototype.bool=function(e){return this.push(f,1,e?1:0)},c.prototype.fixed32=function(e){return this.push(m,4,e>>>0)},c.prototype.sfixed32=c.prototype.fixed32,c.prototype.fixed64=function(e){var t=r.from(e);return this.push(m,4,t.lo).push(m,4,t.hi)},c.prototype.sfixed64=c.prototype.fixed64,c.prototype.float=function(e){return this.push(a.float.writeFloatLE,4,e)},c.prototype.double=function(e){return this.push(a.float.writeDoubleLE,8,e)};var _=a.Array.prototype.set?function(e,t,i){t.set(e,i)}:function(e,t,i){for(var n=0;n>>0;if(!t)return this.push(f,1,0);if(a.isString(e)){var i=c.alloc(t=o.length(e));o.decode(e,i,0),e=i}return this.uint32(t).push(_,t,e)},c.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t).push(s.write,t,e):this.push(f,1,0)},c.prototype.fork=function(){return this.states=new d(this),this.head=this.tail=new l(u,0,0),this.len=0,this},c.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},c.prototype.ldelim=function(){var e=this.head,t=this.tail,i=this.len;return this.reset().uint32(i),i&&(this.tail.next=e.next,this.tail=t,this.len+=i),this},c.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),i=0;e;)e.fn(e.val,t,i),i+=e.len,e=e.next;return t},c._configure=function(e){n=e}},{14:14}],16:[function(e,t,i){t.exports=o;var n=e(15);(o.prototype=Object.create(n.prototype)).constructor=o;var a=e(14),r=a.Buffer;function o(){n.call(this)}o.alloc=function(e){return(o.alloc=a._Buffer_allocUnsafe)(e)};var s=r&&r.prototype instanceof Uint8Array&&"set"===r.prototype.set.name?function(e,t,i){t.set(e,i)}:function(e,t,i){if(e.copy)e.copy(t,i,0,e.length);else for(var n=0;n>>0;return this.uint32(t),t&&this.push(s,t,e),this},o.prototype.string=function(e){var t=r.byteLength(e);return this.uint32(t),t&&this.push(l,t,e),this}},{14:14,15:15}]},{},[8])}("object"==typeof window&&window||"object"==typeof self&&self||_commonjsHelpers_3aae1032_js__WEBPACK_IMPORTED_MODULE_0__.a)})),protobuf$1=Object.freeze(_mergeNamespaces({__proto__:null,default:protobuf},[protobuf]))},function(e,t,i){"use strict";var n=i(564),a=i(565),r=i(566),o=i(567),s=i(568),l=i(569),u=i(570),d=i(571),c=i(572),f=i(573),h=i(574),p=i(575),m=i(576),_=i(577),g=i(578),v=i(579),y=i(580),b=i(581),w=i(582),O=i(583),x=i(584),A=i(585),T=i(586),E=i(587),C=i(588),S=i(589),M=i(590),D=i(591),P=i(592),I=i(593),L=i(594),j=i(595),R=i(596),N=i(597),B=i(598),F=i(599),k=i(600),z=i(601),U=i(602),V=i(603),H=i(604),G=i(605),Y=i(606),W=i(607),q=i(608),X=i(609),K=i(610),J=i(611),Z=i(612),Q=i(613),$=i(614),ee=i(615),te=i(616),ie=i(617),ne=i(618),ae=i(619),re=i(620),oe=i(621),se=i(622),le=i(623),ue=i(624),de=i(625),ce=i(626),fe=i(627),he=i(628),pe=i(629),me=i(630),_e=i(631),ge=i(632),ve=i(633),ye=i(634),be=i(635),we=i(636),Oe=i(637),xe=i(638),Ae=i(639),Te=i(640),Ee=i(641),Ce=i(642),Se=i(643),Me=i(644),De=i(645),Pe=i(646),Ie=i(647),Le=i(648),je=i(649),Re=i(650),Ne=i(651),Be=i(652),Fe=i(653),ke=i(654),ze=i(655),Ue=i(656),Ve=i(657),He=i(658),Ge=i(659),Ye=i(660),We=i(661),qe=i(662),Xe=i(663),Ke=i(664),Je=i(665),Ze=i(666),Qe=i(667),$e=i(668),et=i(669),tt=i(670),it=i(671),nt=i(672),at=i(673),rt=i(674),ot=i(675),st=i(676),lt=i(677),ut=i(678),dt=i(679),ct=i(680),ft=i(681),ht=i(682),pt=i(683),mt=i(684),_t=i(685),gt=i(686);t.a={czm_degreesPerRadian:n.a,czm_depthRange:a.a,czm_epsilon1:r.a,czm_epsilon2:o.a,czm_epsilon3:s.a,czm_epsilon4:l.a,czm_epsilon5:u.a,czm_epsilon6:d.a,czm_epsilon7:c.a,czm_infinity:f.a,czm_oneOverPi:h.a,czm_oneOverTwoPi:p.a,czm_passCesium3DTile:m.a,czm_passCesium3DTileClassification:_.a,czm_passCesium3DTileClassificationIgnoreShow:g.a,czm_passClassification:v.a,czm_passCompute:y.a,czm_passEnvironment:b.a,czm_passGlobe:w.a,czm_passOpaque:O.a,czm_passOverlay:x.a,czm_passTerrainClassification:A.a,czm_passTranslucent:T.a,czm_pi:E.a,czm_piOverFour:C.a,czm_piOverSix:S.a,czm_piOverThree:M.a,czm_piOverTwo:D.a,czm_radiansPerDegree:P.a,czm_sceneMode2D:I.a,czm_sceneMode3D:L.a,czm_sceneModeColumbusView:j.a,czm_sceneModeMorphing:R.a,czm_solarRadius:N.a,czm_threePiOver2:B.a,czm_twoPi:F.a,czm_webMercatorMaxLatitude:k.a,czm_depthRangeStruct:z.a,czm_material:U.a,czm_materialInput:V.a,czm_modelMaterial:H.a,czm_modelVertexOutput:G.a,czm_pbrParameters:Y.a,czm_ray:W.a,czm_raySegment:q.a,czm_shadowParameters:X.a,czm_HSBToRGB:K.a,czm_HSLToRGB:J.a,czm_RGBToHSB:Z.a,czm_RGBToHSL:Q.a,czm_RGBToXYZ:$.a,czm_XYZToRGB:ee.a,czm_acesTonemapping:te.a,czm_alphaWeight:ie.a,czm_antialias:ne.a,czm_approximateSphericalCoordinates:ae.a,czm_backFacing:re.a,czm_branchFreeTernary:oe.a,czm_cascadeColor:se.a,czm_cascadeDistance:le.a,czm_cascadeMatrix:ue.a,czm_cascadeWeights:de.a,czm_columbusViewMorph:ce.a,czm_computePosition:fe.a,czm_cosineAndSine:he.a,czm_decompressTextureCoordinates:pe.a,czm_defaultPbrMaterial:me.a,czm_depthClamp:_e.a,czm_eastNorthUpToEyeCoordinates:ge.a,czm_ellipsoidContainsPoint:ve.a,czm_ellipsoidWgs84TextureCoordinates:ye.a,czm_equalsEpsilon:be.a,czm_eyeOffset:we.a,czm_eyeToWindowCoordinates:Oe.a,czm_fastApproximateAtan:xe.a,czm_fog:Ae.a,czm_gammaCorrect:Te.a,czm_geodeticSurfaceNormal:Ee.a,czm_getDefaultMaterial:Ce.a,czm_getLambertDiffuse:Se.a,czm_getSpecular:Me.a,czm_getWaterNoise:De.a,czm_hue:Pe.a,czm_inverseGamma:Ie.a,czm_isEmpty:Le.a,czm_isFull:je.a,czm_latitudeToWebMercatorFraction:Re.a,czm_lineDistance:Ne.a,czm_luminance:Be.a,czm_metersPerPixel:Fe.a,czm_modelToWindowCoordinates:ke.a,czm_multiplyWithColorBalance:ze.a,czm_nearFarScalar:Ue.a,czm_octDecode:Ve.a,czm_packDepth:He.a,czm_pbrLighting:Ge.a,czm_pbrMetallicRoughnessMaterial:Ye.a,czm_pbrSpecularGlossinessMaterial:We.a,czm_phong:qe.a,czm_planeDistance:Xe.a,czm_pointAlongRay:Ke.a,czm_rayEllipsoidIntersectionInterval:Je.a,czm_readDepth:Ze.a,czm_readNonPerspective:Qe.a,czm_reverseLogDepth:$e.a,czm_sampleOctahedralProjection:et.a,czm_saturation:tt.a,czm_shadowDepthCompare:it.a,czm_shadowVisibility:nt.a,czm_signNotZero:at.a,czm_sphericalHarmonics:rt.a,czm_tangentToEyeSpaceMatrix:ot.a,czm_transformPlane:st.a,czm_translateRelativeToEye:lt.a,czm_translucentPhong:ut.a,czm_transpose:dt.a,czm_unpackDepth:ct.a,czm_unpackFloat:ft.a,czm_vertexLogDepth:ht.a,czm_windowToEyeCoordinates:pt.a,czm_writeDepthClamp:mt.a,czm_writeLogDepth:_t.a,czm_writeNonPerspective:gt.a}},function(e,t,i){"use strict";var n=i(17),a=i(11),r=i(2),o=i(0),s=i(3),l=i(15),u=i(125),d=i(46),c=i(28),f=i(82),h=i(95),p=i(38),m=i(6),_=i(138),g=i(135);function v(e,t){var i=e.attributes,n=i.position,r=n.values.length/n.componentsPerAttribute;i.batchId=new c.default({componentDatatype:a.default.FLOAT,componentsPerAttribute:1,values:new Float32Array(r)});for(var o=i.batchId.values,s=0;s1){var s=e[0].modelMatrix;for(n=1;n=0){var u=n[l];a=u.offset+u.count,r=i[s=u.index].indices.length}else a=0,r=i[s=0].indices.length;for(var d=e.length,c=0;cr&&(a=0,r=i[++s].indices.length),n.push({index:s,offset:a,count:h}),a+=h}}}var w={};function O(e,t){var i=e.attributes;for(var n in i)if(i.hasOwnProperty(n)){var a=i[n];Object(o.default)(a)&&Object(o.default)(a.values)&&t.push(a.values.buffer)}Object(o.default)(e.indices)&&t.push(e.indices.buffer)}function x(e,t){var i=e.length,n=new Float64Array(1+19*i),a=0;n[a++]=i;for(var r=0;r0&&((t=y(e)).length>0&&(i=h.a.createAttributeLocations(t[0]),e.createPickOffsets&&(a=function(e,t){var i=[];return b(e,"geometry",t,i),b(e,"westHemisphereGeometry",t,i),b(e,"eastHemisphereGeometry",t,i),i}(s,t))),Object(o.default)(s[0].attributes)&&Object(o.default)(s[0].attributes.offset)&&(r=new Array(l),u=!0));for(var d=new Array(l),c=new Array(l),f=0;f0&&(i.set(c.indices,u),u+=w)}}return t.push(i.buffer),{stringTable:a,packedData:i}},w.unpackCreateGeometryResults=function(e){for(var t,i=e.stringTable,r=e.packedData,o=new Array(r[0]),s=0,l=1;l0){var S=_.length/g;for(w=p.a.createTypedArray(S,m),t=0;t=d*h?(v=o,y=p,b=-2*s*p+o*m):(v=u,y=_,b=-u*m+2*l*_);var w=-(b<0?-1:1)*Math.abs(v)*Math.sqrt(-g),O=(r=-b+w)/2,x=O<0?-Math.pow(-O,1/3):Math.pow(O,1/3),A=r===w?-x:-y/x;return a=y<=0?x+A:-b/(x*x+A*A+y),f*c>=d*h?[(a-s)/o]:[-u/(a+l)]}var T=p,E=-2*s*p+o*m,C=_,S=-u*m+2*l*_,M=Math.sqrt(g),D=Math.sqrt(3)/2,P=Math.abs(Math.atan2(o*M,-E)/3);a=2*Math.sqrt(-T);var I=Math.cos(P);r=a*I;var L=a*(-I/2-D*Math.sin(P)),j=r+L>2*s?r-s:L-s,R=o,N=j/R;P=Math.abs(Math.atan2(u*M,-S)/3);var B=-u,F=(r=(a=2*Math.sqrt(-C))*(I=Math.cos(P)))+(L=a*(-I/2-D*Math.sin(P)))<2*l?r+l:L+l,k=B/F,z=-j*F-R*B,U=(l*z-s*(j*B))/(-s*z+l*(R*F));return N<=U?N<=k?U<=k?[N,U,k]:[N,k,U]:[k,N,U]:N<=k?[U,N,k]:U<=k?[U,k,N]:[k,U,N]}r.computeDiscriminant=function(e,t,i,a){if("number"!=typeof e)throw new n.default("a is a required number.");if("number"!=typeof t)throw new n.default("b is a required number.");if("number"!=typeof i)throw new n.default("c is a required number.");if("number"!=typeof a)throw new n.default("d is a required number.");var r=t*t,o=i*i;return 18*e*t*i*a+r*o-27*(e*e)*(a*a)-4*(e*o*i+r*t*a)},r.computeRealRoots=function(e,t,i,r){if("number"!=typeof e)throw new n.default("a is a required number.");if("number"!=typeof t)throw new n.default("b is a required number.");if("number"!=typeof i)throw new n.default("c is a required number.");if("number"!=typeof r)throw new n.default("d is a required number.");var s,l;if(0===e)return a.a.computeRealRoots(t,i,r);if(0===t){if(0===i){if(0===r)return[0,0,0];var u=(l=-r/e)<0?-Math.pow(-l,1/3):Math.pow(l,1/3);return[u,u,u]}return 0===r?0===(s=a.a.computeRealRoots(e,0,i)).Length?[0]:[s[0],0,s[1]]:o(e,0,i,r)}return 0===i?0===r?(l=-t/e)<0?[l,0,0]:[0,0,l]:o(e,t,0,r):0===r?0===(s=a.a.computeRealRoots(e,t,i)).length?[0]:s[1]<=0?[s[0],s[1],0]:s[0]>=0?[0,s[0],s[1]]:[s[0],0,s[1]]:o(e,t,i,r)},t.a=r},function(e,t,i){"use strict";var n,a=i(0),r=i(127);"undefined"!=typeof requestAnimationFrame&&(n=requestAnimationFrame),function(){if(!Object(a.default)(n)&&"undefined"!=typeof window)for(var e=["webkit","moz","ms","o"],t=0,i=e.length;t0)for(var r=0;r\s*<\/body>/im,h=//im,p=/([\s\S]*)<\/title>/im;function m(e){if(!f.test(e)&&!h.test(e)){var t,i=p.exec(e);i&&i.length>1&&(t=i[1]);var n=new s.a;return n.name=t,n.description=e,n.data=e,[n]}}t.a=function(e,t,i){if(!Object(a.default)(e))throw new r.default("type is required.");if(this.type=e,!Object(a.default)(t))if("json"===e)t="application/json";else if("xml"===e)t="text/xml";else if("html"===e)t="text/html";else{if("text"!==e)throw new r.default('format is required when type is not "json", "xml", "html", or "text".');t="text/plain"}if(this.format=t,!Object(a.default)(i))if("json"===e)i=l;else if("xml"===e)i=u;else if("html"===e)i=m;else{if("text"!==e)throw new r.default('callback is required when type is not "json", "xml", "html", or "text".');i=m}this.callback=i}},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(0);function o(e,t){a.a.typeOf.object("normal",e),a.a.typeOf.number("distance",t),this._distance=t,this._normal=new s(e,this),this.onChangeCallback=void 0,this.index=-1}function s(e,t){this._clippingPlane=t,this._cartesian3=n.default.clone(e)}Object.defineProperties(o.prototype,{distance:{get:function(){return this._distance},set:function(e){a.a.typeOf.number("value",e),Object(r.default)(this.onChangeCallback)&&e!==this._distance&&this.onChangeCallback(this.index),this._distance=e}},normal:{get:function(){return this._normal},set:function(e){a.a.typeOf.object("value",e),Object(r.default)(this.onChangeCallback)&&!n.default.equals(this._normal._cartesian3,e)&&this.onChangeCallback(this.index),n.default.clone(e,this._normal._cartesian3)}}}),o.fromPlane=function(e,t){return a.a.typeOf.object("plane",e),Object(r.default)(t)?(t.normal=e.normal,t.distance=e.distance):t=new o(e.normal,e.distance),t},o.clone=function(e,t){return Object(r.default)(t)?(t.normal=e.normal,t.distance=e.distance,t):new o(e.normal,e.distance)},Object.defineProperties(s.prototype,{x:{get:function(){return this._cartesian3.x},set:function(e){a.a.typeOf.number("value",e),Object(r.default)(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.x&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.x=e}},y:{get:function(){return this._cartesian3.y},set:function(e){a.a.typeOf.number("value",e),Object(r.default)(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.y&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.y=e}},z:{get:function(){return this._cartesian3.z},set:function(e){a.a.typeOf.number("value",e),Object(r.default)(this._clippingPlane.onChangeCallback)&&e!==this._cartesian3.z&&this._clippingPlane.onChangeCallback(this._clippingPlane.index),this._cartesian3.z=e}}}),t.a=o},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\n#ifdef DEBUG_SHOW_DEPTH\nuniform sampler2D u_packedTranslucentDepth;\n#endif\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n#ifdef DEBUG_SHOW_DEPTH\n if (v_textureCoordinates.x < 0.5)\n {\n gl_FragColor.rgb = vec3(czm_unpackDepth(texture2D(u_packedTranslucentDepth, v_textureCoordinates)));\n gl_FragColor.a = 1.0;\n }\n#else\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n\n#ifdef PICK\n if (color == vec4(0.0))\n {\n discard;\n }\n#else\n // Reverse premultiplication process to get the correct composited result of the classification primitives\n color.rgb /= color.a;\n#endif\n gl_FragColor = color;\n#endif\n}\n"},function(e,t,i){"use strict";var n=i(68),a=i(149),r=i(17),o=i(1),s=i(22),l=i(4),u=i(11),d=i(131),c=i(134),f=i(2),h=i(0),p=i(15),m=i(46),_=i(28),g=i(82),v=i(71),y=i(38),b=i(5),w=i(111),O=i(35),x=i(21),A=i(29),T=new o.default,E=new o.default,C=new o.default,S=new o.default,M=new o.default,D=new o.default,P=new o.default,I=new o.default;function L(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}function j(e,t,i,n,a,r){var s=e.normals,l=e.tangents,u=e.bitangents,d=o.default.normalize(o.default.cross(i,t,P),P);r.normal&&c.a.addAttribute(s,t,n,a),r.tangent&&c.a.addAttribute(l,d,n,a),r.bitangent&&c.a.addAttribute(u,i,n,a)}function R(e,t,i){var n,a,r,s=e.positions,l=e.corners,d=e.endPositions,f=e.lefts,p=e.normals,m=new g.a,v=0,w=0,O=0;for(a=0;a<s.length;a+=2)v+=r=s[a].length-3,O+=2*r,w+=s[a+1].length-3;for(v+=3,w+=3,a=0;a<l.length;a++){n=l[a];var x=l[a].leftPositions;Object(h.default)(x)?(v+=r=x.length,O+=r):(w+=r=l[a].rightPositions.length,O+=r)}var A,M=Object(h.default)(d);M&&(v+=A=d[0].length-3,w+=A,O+=6*(A/=3));var L,R,N,B,F,k,z=v+w,U=new Float64Array(z),V={normals:t.normal?new Float32Array(z):void 0,tangents:t.tangent?new Float32Array(z):void 0,bitangents:t.bitangent?new Float32Array(z):void 0},H=0,G=z-1,Y=T,W=E,q=A/2,X=y.a.createTypedArray(z/3,O),K=0;if(M){k=C,F=S;var J=d[0];for(Y=o.default.fromArray(p,0,Y),W=o.default.fromArray(f,0,W),a=0;a<q;a++)k=o.default.fromArray(J,3*(q-1-a),k),F=o.default.fromArray(J,3*(q+a),F),c.a.addAttribute(U,F,H),c.a.addAttribute(U,k,void 0,G),j(V,Y,W,H,G,t),B=(R=H/3)+1,N=(L=(G-2)/3)-1,X[K++]=L,X[K++]=R,X[K++]=N,X[K++]=N,X[K++]=R,X[K++]=B,H+=3,G-=3}var Z,Q,$=0,ee=0,te=s[$++],ie=s[$++];for(U.set(te,H),U.set(ie,G-ie.length+1),W=o.default.fromArray(f,ee,W),r=ie.length-3,a=0;a<r;a+=3)Z=i.geodeticSurfaceNormal(o.default.fromArray(te,a,P),P),Q=i.geodeticSurfaceNormal(o.default.fromArray(ie,r-a,I),I),j(V,Y=o.default.normalize(o.default.add(Z,Q,Y),Y),W,H,G,t),B=(R=H/3)+1,N=(L=(G-2)/3)-1,X[K++]=L,X[K++]=R,X[K++]=N,X[K++]=N,X[K++]=R,X[K++]=B,H+=3,G-=3;for(Z=i.geodeticSurfaceNormal(o.default.fromArray(te,r,P),P),Q=i.geodeticSurfaceNormal(o.default.fromArray(ie,r,I),I),Y=o.default.normalize(o.default.add(Z,Q,Y),Y),ee+=3,a=0;a<l.length;a++){var ne,ae,re,oe=(n=l[a]).leftPositions,se=n.rightPositions,le=D,ue=C,de=S;if(Y=o.default.fromArray(p,ee,Y),Object(h.default)(oe)){for(j(V,Y,W,void 0,G,t),G-=3,ae=B,re=N,ne=0;ne<oe.length/3;ne++)le=o.default.fromArray(oe,3*ne,le),X[K++]=ae,X[K++]=re-ne-1,X[K++]=re-ne,c.a.addAttribute(U,le,void 0,G),ue=o.default.fromArray(U,3*(re-ne-1),ue),de=o.default.fromArray(U,3*ae,de),j(V,Y,W=o.default.normalize(o.default.subtract(ue,de,W),W),void 0,G,t),G-=3;le=o.default.fromArray(U,3*ae,le),ue=o.default.subtract(o.default.fromArray(U,3*re,ue),le,ue),de=o.default.subtract(o.default.fromArray(U,3*(re-ne),de),le,de),j(V,Y,W=o.default.normalize(o.default.add(ue,de,W),W),H,void 0,t),H+=3}else{for(j(V,Y,W,H,void 0,t),H+=3,ae=N,re=B,ne=0;ne<se.length/3;ne++)le=o.default.fromArray(se,3*ne,le),X[K++]=ae,X[K++]=re+ne,X[K++]=re+ne+1,c.a.addAttribute(U,le,H),ue=o.default.fromArray(U,3*ae,ue),de=o.default.fromArray(U,3*(re+ne),de),j(V,Y,W=o.default.normalize(o.default.subtract(ue,de,W),W),H,void 0,t),H+=3;le=o.default.fromArray(U,3*ae,le),ue=o.default.subtract(o.default.fromArray(U,3*(re+ne),ue),le,ue),de=o.default.subtract(o.default.fromArray(U,3*re,de),le,de),j(V,Y,W=o.default.normalize(o.default.negate(o.default.add(de,ue,W),W),W),void 0,G,t),G-=3}for(te=s[$++],ie=s[$++],te.splice(0,3),ie.splice(ie.length-3,3),U.set(te,H),U.set(ie,G-ie.length+1),r=ie.length-3,ee+=3,W=o.default.fromArray(f,ee,W),ne=0;ne<ie.length;ne+=3)Z=i.geodeticSurfaceNormal(o.default.fromArray(te,ne,P),P),Q=i.geodeticSurfaceNormal(o.default.fromArray(ie,r-ne,I),I),j(V,Y=o.default.normalize(o.default.add(Z,Q,Y),Y),W,H,G,t),R=(B=H/3)-1,L=(N=(G-2)/3)+1,X[K++]=L,X[K++]=R,X[K++]=N,X[K++]=N,X[K++]=R,X[K++]=B,H+=3,G-=3;H-=3,G+=3}if(j(V,Y=o.default.fromArray(p,p.length-3,Y),W,H,G,t),M){H+=3,G-=3,k=C,F=S;var ce=d[1];for(a=0;a<q;a++)k=o.default.fromArray(ce,3*(A-a-1),k),F=o.default.fromArray(ce,3*a,F),c.a.addAttribute(U,k,void 0,G),c.a.addAttribute(U,F,H),j(V,Y,W,H,G,t),R=(B=H/3)-1,L=(N=(G-2)/3)+1,X[K++]=L,X[K++]=R,X[K++]=N,X[K++]=N,X[K++]=R,X[K++]=B,H+=3,G-=3}if(m.position=new _.default({componentDatatype:u.default.DOUBLE,componentsPerAttribute:3,values:U}),t.st){var fe,he,pe=new Float32Array(z/3*2),me=0;if(M){v/=3,w/=3;var _e,ge=Math.PI/(A+1);he=1/(v-A+1),fe=1/(w-A+1);var ve=A/2;for(a=ve+1;a<A+1;a++)_e=b.default.PI_OVER_TWO+ge*a,pe[me++]=fe*(1+Math.cos(_e)),pe[me++]=.5*(1+Math.sin(_e));for(a=1;a<w-A+1;a++)pe[me++]=a*fe,pe[me++]=0;for(a=A;a>ve;a--)_e=b.default.PI_OVER_TWO-a*ge,pe[me++]=1-fe*(1+Math.cos(_e)),pe[me++]=.5*(1+Math.sin(_e));for(a=ve;a>0;a--)_e=b.default.PI_OVER_TWO-ge*a,pe[me++]=1-he*(1+Math.cos(_e)),pe[me++]=.5*(1+Math.sin(_e));for(a=v-A;a>0;a--)pe[me++]=a*he,pe[me++]=1;for(a=1;a<ve+1;a++)_e=b.default.PI_OVER_TWO+ge*a,pe[me++]=he*(1+Math.cos(_e)),pe[me++]=.5*(1+Math.sin(_e))}else{for(he=1/((v/=3)-1),fe=1/((w/=3)-1),a=0;a<w;a++)pe[me++]=a*fe,pe[me++]=0;for(a=v;a>0;a--)pe[me++]=(a-1)*he,pe[me++]=1}m.st=new _.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:2,values:pe})}return t.normal&&(m.normal=new _.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:V.normals})),t.tangent&&(m.tangent=new _.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:V.tangents})),t.bitangent&&(m.bitangent=new _.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:V.bitangents})),{attributes:m,indices:X}}function N(e,t,i){i[t++]=e[0],i[t++]=e[1],i[t++]=e[2];for(var n=3;n<e.length;n+=3){var a=e[n],r=e[n+1],o=e[n+2];i[t++]=a,i[t++]=r,i[t++]=o,i[t++]=a,i[t++]=r,i[t++]=o}return i[t++]=e[0],i[t++]=e[1],i[t++]=e[2],i}function B(e,t){var i=new A.a({position:t.position,normal:t.normal||t.bitangent||e.shadowVolume,tangent:t.tangent,bitangent:t.normal||t.bitangent,st:t.st}),a=e.ellipsoid,r=R(c.a.computePositions(e),i,a),s=e.height,l=e.extrudedHeight,d=r.attributes,f=r.indices,p=d.position.values,m=p.length,g=new Float64Array(6*m),b=new Float64Array(m);b.set(p);var O,x=new Float64Array(4*m);x=N(p=w.a.scaleToGeodeticHeight(p,s,a),0,x),x=N(b=w.a.scaleToGeodeticHeight(b,l,a),2*m,x),g.set(p),g.set(b,m),g.set(x,2*m),d.position.values=g,d=function(e,t){if(!(t.normal||t.tangent||t.bitangent||t.st))return e;var i,n,a=e.position.values;(t.normal||t.bitangent)&&(i=e.normal.values,n=e.bitangent.values);var r,s=e.position.values.length/18,l=3*s,u=2*s,d=2*l;if(t.normal||t.bitangent||t.tangent){var f=t.normal?new Float32Array(6*l):void 0,h=t.tangent?new Float32Array(6*l):void 0,p=t.bitangent?new Float32Array(6*l):void 0,m=T,_=E,g=C,v=S,y=M,b=D,w=d;for(r=0;r<l;r+=3){var O=w+d;m=o.default.fromArray(a,r,m),_=o.default.fromArray(a,r+l,_),g=o.default.fromArray(a,(r+3)%l,g),_=o.default.subtract(_,m,_),g=o.default.subtract(g,m,g),v=o.default.normalize(o.default.cross(_,g,v),v),t.normal&&(c.a.addAttribute(f,v,O),c.a.addAttribute(f,v,O+3),c.a.addAttribute(f,v,w),c.a.addAttribute(f,v,w+3)),(t.tangent||t.bitangent)&&(b=o.default.fromArray(i,r,b),t.bitangent&&(c.a.addAttribute(p,b,O),c.a.addAttribute(p,b,O+3),c.a.addAttribute(p,b,w),c.a.addAttribute(p,b,w+3)),t.tangent&&(y=o.default.normalize(o.default.cross(b,v,y),y),c.a.addAttribute(h,y,O),c.a.addAttribute(h,y,O+3),c.a.addAttribute(h,y,w),c.a.addAttribute(h,y,w+3))),w+=6}if(t.normal){for(f.set(i),r=0;r<l;r+=3)f[r+l]=-i[r],f[r+l+1]=-i[r+1],f[r+l+2]=-i[r+2];e.normal.values=f}else e.normal=void 0;if(t.bitangent?(p.set(n),p.set(n,l),e.bitangent.values=p):e.bitangent=void 0,t.tangent){var x=e.tangent.values;h.set(x),h.set(x,l),e.tangent.values=h}}if(t.st){var A=e.st.values,P=new Float32Array(6*u);P.set(A),P.set(A,u);for(var I=2*u,L=0;L<2;L++){for(P[I++]=A[0],P[I++]=A[1],r=2;r<u;r+=2){var j=A[r],R=A[r+1];P[I++]=j,P[I++]=R,P[I++]=j,P[I++]=R}P[I++]=A[0],P[I++]=A[1]}e.st.values=P}return e}(d,t);var P=m/3;if(e.shadowVolume){var I=d.normal.values;m=I.length;var L=new Float32Array(6*m);for(O=0;O<m;O++)I[O]=-I[O];L.set(I,m),L=N(I,4*m,L),d.extrudeDirection=new _.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:L}),t.normal||(d.normal=void 0)}if(Object(h.default)(e.offsetAttribute)){var j=new Uint8Array(6*P);if(e.offsetAttribute===v.a.TOP)j=Object(n.a)(j,1,0,P),j=Object(n.a)(j,1,2*P,4*P);else{var B=e.offsetAttribute===v.a.NONE?0:1;j=Object(n.a)(j,B)}d.applyOffset=new _.default({componentDatatype:u.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:j})}var F=f.length,k=P+P,z=y.a.createTypedArray(g.length/3,2*F+3*k);z.set(f);var U,V,H,G,Y=F;for(O=0;O<F;O+=3){var W=f[O],q=f[O+1],X=f[O+2];z[Y++]=X+P,z[Y++]=q+P,z[Y++]=W+P}for(O=0;O<k;O+=2)H=(U=O+k)+1,G=(V=U+k)+1,z[Y++]=U,z[Y++]=V,z[Y++]=H,z[Y++]=H,z[Y++]=V,z[Y++]=G;return{attributes:d,indices:z}}var F=new o.default,k=new o.default,z=new s.default;function U(e,t,i,n,a,r){var s=o.default.subtract(t,e,F);o.default.normalize(s,s);var l=i.geodeticSurfaceNormal(e,k),u=o.default.cross(s,l,F);o.default.multiplyByScalar(u,n,u);var d=a.latitude,c=a.longitude,f=r.latitude,h=r.longitude;o.default.add(e,u,k),i.cartesianToCartographic(k,z);var p=z.latitude,m=z.longitude;d=Math.min(d,p),c=Math.min(c,m),f=Math.max(f,p),h=Math.max(h,m),o.default.subtract(e,u,k),i.cartesianToCartographic(k,z),p=z.latitude,m=z.longitude,d=Math.min(d,p),c=Math.min(c,m),f=Math.max(f,p),h=Math.max(h,m),a.latitude=d,a.longitude=c,r.latitude=f,r.longitude=h}var V=new o.default,H=new o.default,G=new s.default,Y=new s.default;function W(e,t,i,n,r){e=L(e,t);var s=Object(a.a)(e,o.default.equalsEpsilon),l=s.length;if(l<2||i<=0)return new x.default;var u,c,f=.5*i;if(G.latitude=Number.POSITIVE_INFINITY,G.longitude=Number.POSITIVE_INFINITY,Y.latitude=Number.NEGATIVE_INFINITY,Y.longitude=Number.NEGATIVE_INFINITY,n===d.a.ROUNDED){var p=s[0];o.default.subtract(p,s[1],V),o.default.normalize(V,V),o.default.multiplyByScalar(V,f,V),o.default.add(p,V,H),t.cartesianToCartographic(H,z),u=z.latitude,c=z.longitude,G.latitude=Math.min(G.latitude,u),G.longitude=Math.min(G.longitude,c),Y.latitude=Math.max(Y.latitude,u),Y.longitude=Math.max(Y.longitude,c)}for(var m=0;m<l-1;++m)U(s[m],s[m+1],t,f,G,Y);var _=s[l-1];o.default.subtract(_,s[l-2],V),o.default.normalize(V,V),o.default.multiplyByScalar(V,f,V),o.default.add(_,V,H),U(_,H,t,f,G,Y),n===d.a.ROUNDED&&(t.cartesianToCartographic(H,z),u=z.latitude,c=z.longitude,G.latitude=Math.min(G.latitude,u),G.longitude=Math.min(G.longitude,c),Y.latitude=Math.max(Y.latitude,u),Y.longitude=Math.max(Y.longitude,c));var g=Object(h.default)(r)?r:new x.default;return g.north=Y.latitude,g.south=G.latitude,g.east=Y.longitude,g.west=G.longitude,g}function q(e){var t=(e=Object(f.default)(e,f.default.EMPTY_OBJECT)).positions,i=e.width;l.a.defined("options.positions",t),l.a.defined("options.width",i);var n=Object(f.default)(e.height,0),a=Object(f.default)(e.extrudedHeight,n);this._positions=t,this._ellipsoid=p.default.clone(Object(f.default)(e.ellipsoid,p.default.WGS84)),this._vertexFormat=A.a.clone(Object(f.default)(e.vertexFormat,A.a.DEFAULT)),this._width=i,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=Object(f.default)(e.cornerType,d.a.ROUNDED),this._granularity=Object(f.default)(e.granularity,b.default.RADIANS_PER_DEGREE),this._shadowVolume=Object(f.default)(e.shadowVolume,!1),this._workerName="createCorridorGeometry",this._offsetAttribute=e.offsetAttribute,this._rectangle=void 0,this.packedLength=1+t.length*o.default.packedLength+p.default.packedLength+A.a.packedLength+7}q.pack=function(e,t,i){l.a.defined("value",e),l.a.defined("array",t),i=Object(f.default)(i,0);var n=e._positions,a=n.length;t[i++]=a;for(var r=0;r<a;++r,i+=o.default.packedLength)o.default.pack(n[r],t,i);return p.default.pack(e._ellipsoid,t,i),i+=p.default.packedLength,A.a.pack(e._vertexFormat,t,i),i+=A.a.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i++]=e._shadowVolume?1:0,t[i]=Object(f.default)(e._offsetAttribute,-1),t};var X=p.default.clone(p.default.UNIT_SPHERE),K=new A.a,J={positions:void 0,ellipsoid:X,vertexFormat:K,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,shadowVolume:void 0,offsetAttribute:void 0};q.unpack=function(e,t,i){l.a.defined("array",e),t=Object(f.default)(t,0);for(var n=e[t++],a=new Array(n),r=0;r<n;++r,t+=o.default.packedLength)a[r]=o.default.unpack(e,t);var s=p.default.unpack(e,t,X);t+=p.default.packedLength;var u=A.a.unpack(e,t,K);t+=A.a.packedLength;var d=e[t++],c=e[t++],m=e[t++],_=e[t++],g=e[t++],v=1===e[t++],y=e[t];return Object(h.default)(i)?(i._positions=a,i._ellipsoid=p.default.clone(s,i._ellipsoid),i._vertexFormat=A.a.clone(u,i._vertexFormat),i._width=d,i._height=c,i._extrudedHeight=m,i._cornerType=_,i._granularity=g,i._shadowVolume=v,i._offsetAttribute=-1===y?void 0:y,i):(J.positions=a,J.width=d,J.height=c,J.extrudedHeight=m,J.cornerType=_,J.granularity=g,J.shadowVolume=v,J.offsetAttribute=-1===y?void 0:y,new q(J))},q.computeRectangle=function(e,t){var i=(e=Object(f.default)(e,f.default.EMPTY_OBJECT)).positions,n=e.width;return l.a.defined("options.positions",i),l.a.defined("options.width",n),W(i,Object(f.default)(e.ellipsoid,p.default.WGS84),n,Object(f.default)(e.cornerType,d.a.ROUNDED),t)},q.createGeometry=function(e){var t=e._positions,i=e._width,s=e._ellipsoid;t=L(t,s);var l=Object(a.a)(t,o.default.equalsEpsilon);if(!(l.length<2||i<=0)){var d,f=e._height,p=e._extrudedHeight,g=!b.default.equalsEpsilon(f,p,0,b.default.EPSILON2),y=e._vertexFormat,x={ellipsoid:s,positions:l,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!0};if(g)x.height=f,x.extrudedHeight=p,x.shadowVolume=e._shadowVolume,x.offsetAttribute=e._offsetAttribute,d=B(x,y);else if((d=R(c.a.computePositions(x),y,s)).attributes.position.values=w.a.scaleToGeodeticHeight(d.attributes.position.values,f,s),Object(h.default)(e._offsetAttribute)){var A=e._offsetAttribute===v.a.NONE?0:1,T=d.attributes.position.values.length,E=new Uint8Array(T/3);Object(n.a)(E,A),d.attributes.applyOffset=new _.default({componentDatatype:u.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}var C=d.attributes,S=r.default.fromVertices(C.position.values,void 0,3);return y.position||(d.attributes.position.values=void 0),new m.default({attributes:C,indices:d.indices,primitiveType:O.default.TRIANGLES,boundingSphere:S,offsetAttribute:e._offsetAttribute})}},q.createShadowVolume=function(e,t,i){var n=e._granularity,a=e._ellipsoid,r=t(n,a),o=i(n,a);return new q({positions:e._positions,width:e._width,cornerType:e._cornerType,ellipsoid:a,granularity:n,extrudedHeight:r,height:o,vertexFormat:A.a.POSITION_ONLY,shadowVolume:!0})},Object.defineProperties(q.prototype,{rectangle:{get:function(){return Object(h.default)(this._rectangle)||(this._rectangle=W(this._positions,this._ellipsoid,this._width,this._cornerType)),this._rectangle}},textureCoordinateRotationPoints:{get:function(){return[0,0,0,1,1,0]}}}),t.a=q},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i(167),a=Object(n.b)((function(e,t){!function(i){var n=function(e,t){var i=new Error(e+" at character "+t);throw i.index=t,i.description=e,i},a={"-":!0,"!":!0,"~":!0,"+":!0},r={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},o=function(e){var t,i=0;for(var n in e)(t=n.length)>i&&e.hasOwnProperty(n)&&(i=t);return i},s=o(a),l=o(r),u={true:!0,false:!1,null:null},d=function(e){return r[e]||0},c=function(e,t,i){return{type:"||"===e||"&&"===e?"LogicalExpression":"BinaryExpression",operator:e,left:t,right:i}},f=function(e){return e>=48&&e<=57},h=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=128&&!r[String.fromCharCode(e)]},p=function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e>=128&&!r[String.fromCharCode(e)]},m=function(e){for(var t,i,o=0,m=e.charAt,_=e.charCodeAt,g=function(t){return m.call(e,t)},v=function(t){return _.call(e,t)},y=e.length,b=function(){for(var e=v(o);32===e||9===e||10===e||13===e;)e=v(++o)},w=function(){var e,t,i=x();return b(),63!==v(o)?i:(o++,(e=w())||n("Expected expression",o),b(),58===v(o)?(o++,(t=w())||n("Expected expression",o),{type:"ConditionalExpression",test:i,consequent:e,alternate:t}):void n("Expected :",o))},O=function(){b();for(var t=e.substr(o,l),i=t.length;i>0;){if(r.hasOwnProperty(t)&&(!h(v(o))||o+t.length<e.length&&!p(v(o+t.length))))return o+=i,t;t=t.substr(0,--i)}return!1},x=function(){var e,t,i,a,r,s,l,u,f;if(s=A(),!(t=O()))return s;for(r={value:t,prec:d(t)},(l=A())||n("Expected expression after "+t,o),a=[s,r,l];(t=O())&&0!==(i=d(t));){for(r={value:t,prec:i},f=t;a.length>2&&i<=a[a.length-2].prec;)l=a.pop(),t=a.pop().value,s=a.pop(),e=c(t,s,l),a.push(e);(e=A())||n("Expected expression after "+f,o),a.push(r,e)}for(e=a[u=a.length-1];u>1;)e=c(a[u-1].value,a[u-2],e),u-=2;return e},A=function(){var t,i,n;if(b(),t=v(o),f(t)||46===t)return T();if(39===t||34===t)return E();if(91===t)return P();for(n=(i=e.substr(o,s)).length;n>0;){if(a.hasOwnProperty(i)&&(!h(v(o))||o+i.length<e.length&&!p(v(o+i.length))))return o+=n,{type:"UnaryExpression",operator:i,argument:A(),prefix:!0};i=i.substr(0,--n)}return!(!h(t)&&40!==t)&&M()},T=function(){for(var e,t,i="";f(v(o));)i+=g(o++);if(46===v(o))for(i+=g(o++);f(v(o));)i+=g(o++);if("e"===(e=g(o))||"E"===e){for(i+=g(o++),"+"!==(e=g(o))&&"-"!==e||(i+=g(o++));f(v(o));)i+=g(o++);f(v(o-1))||n("Expected exponent ("+i+g(o)+")",o)}return t=v(o),h(t)?n("Variable names cannot start with a number ("+i+g(o)+")",o):46===t&&n("Unexpected period",o),{type:"Literal",value:parseFloat(i),raw:i}},E=function(){for(var e,t="",i=g(o++),a=!1;o<y;){if((e=g(o++))===i){a=!0;break}if("\\"===e)switch(e=g(o++)){case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"b":t+="\b";break;case"f":t+="\f";break;case"v":t+="\v";break;default:t+=e}else t+=e}return a||n('Unclosed quote after "'+t+'"',o),{type:"Literal",value:t,raw:i+t+i}},C=function(){var t,i=v(o),a=o;for(h(i)?o++:n("Unexpected "+g(o),o);o<y&&(i=v(o),p(i));)o++;return t=e.slice(a,o),u.hasOwnProperty(t)?{type:"Literal",value:u[t],raw:t}:"this"===t?{type:"ThisExpression"}:{type:"Identifier",name:t}},S=function(e){for(var t,i,a=[],r=!1,s=0;o<y;){if(b(),(t=v(o))===e){r=!0,o++,41===e&&s&&s>=a.length&&n("Unexpected token "+String.fromCharCode(e),o);break}if(44===t){if(o++,++s!==a.length)if(41===e)n("Unexpected token ,",o);else if(93===e)for(var l=a.length;l<s;l++)a.push(null)}else(i=w())&&"Compound"!==i.type||n("Expected comma",o),a.push(i)}return r||n("Expected "+String.fromCharCode(e),o),a},M=function(){var e,t;for(t=40===(e=v(o))?D():C(),b(),e=v(o);46===e||91===e||40===e;)o++,46===e?(b(),t={type:"MemberExpression",computed:!1,object:t,property:C()}):91===e?(t={type:"MemberExpression",computed:!0,object:t,property:w()},b(),93!==(e=v(o))&&n("Unclosed [",o),o++):40===e&&(t={type:"CallExpression",arguments:S(41),callee:t}),b(),e=v(o);return t},D=function(){o++;var e=w();if(b(),41===v(o))return o++,e;n("Unclosed (",o)},P=function(){return o++,{type:"ArrayExpression",elements:S(93)}},I=[];o<y;)59===(t=v(o))||44===t?o++:(i=w())?I.push(i):o<y&&n('Unexpected "'+g(o)+'"',o);return 1===I.length?I[0]:{type:"Compound",body:I}};m.version="0.3.5",m.toString=function(){return"JavaScript Expression Parser (JSEP) v"+m.version},m.addUnaryOp=function(e){return s=Math.max(e.length,s),a[e]=!0,this},m.addBinaryOp=function(e,t){return l=Math.max(e.length,l),r[e]=t,this},m.addLiteral=function(e,t){return u[e]=t,this},m.removeUnaryOp=function(e){return delete a[e],e.length===s&&(s=o(a)),this},m.removeAllUnaryOps=function(){return a={},s=0,this},m.removeBinaryOp=function(e){return delete r[e],e.length===l&&(l=o(r)),this},m.removeAllBinaryOps=function(){return r={},l=0,this},m.removeLiteral=function(e){return delete u[e],this},m.removeAllLiterals=function(){return u={},this},e.exports?t=e.exports=m:t.parse=m}()}))},function(e,t,i){"use strict";i.d(t,"a",(function(){return u}));var n=i(2),a=i(0),r=i(3),o=i(18),s=i(165),l=i(72);function u(e){var t=(e=Object(n.default)(e,n.default.EMPTY_OBJECT)).typedArray,i=e.resource,s=e.cacheKey;if(Object(a.default)(t)===Object(a.default)(i))throw new r.default("One of options.typedArray and options.resource must be defined.");this._typedArray=t,this._resource=i,this._cacheKey=s,this._state=l.a.UNLOADED,this._promise=o.a.defer()}Object(a.default)(Object.create)&&(u.prototype=Object.create(s.a.prototype),u.prototype.constructor=u),Object.defineProperties(u.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}}),u.prototype.load=function(){var e,t;Object(a.default)(this._typedArray)?this._promise.resolve(this):(t=(e=this)._resource,e._state=l.a.LOADING,u._fetchArrayBuffer(t).then((function(t){e.isDestroyed()||(e._typedArray=new Uint8Array(t),e._state=l.a.READY,e._promise.resolve(e))})).otherwise((function(i){if(!e.isDestroyed()){e._state=l.a.FAILED;var n="Failed to load external buffer: "+t.url;e._promise.reject(e.getError(n,i))}})))},u._fetchArrayBuffer=function(e){return e.fetchArrayBuffer()},u.prototype.unload=function(){this._typedArray=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(90),a=i(0),r=i(19),o=i(536),s=i(26);function l(e,t,i){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._groupMetadata=void 0}Object.defineProperties(l.prototype,{featuresLength:{get:function(){var e=this._model,t=e.featureTables,i=e.featureTableId;return Object(a.default)(t)&&Object(a.default)(t[i])?t[i].featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){var e=this._model,t=e.featureTables,i=e.featureTableId;if(Object(a.default)(t)&&Object(a.default)(t[i]))return t[i]}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}}),l.prototype.getFeature=function(e){var t=this._model,i=t.featureTableId;if(Object(a.default)(i))return t.featureTables[i].getFeature(e)},l.prototype.hasProperty=function(e,t){var i=this._model,n=i.featureTableId;return!!Object(a.default)(n)&&i.featureTables[n].hasProperty(e,t)},l.prototype.applyDebugSettings=function(e,t){},l.prototype.applyStyle=function(e){this._model.applyStyle(e)},l.prototype.update=function(e,t){var i=this._model,n=this._tile;i.colorBlendAmount=e.colorBlendAmount,i.colorBlendMode=e.colorBlendMode,i.modelMatrix=n.computedTransform,i.customShader=e.customShader,i.update(t)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),Object(r.default)(this)},l.fromGltf=function(e,t,i,a){var r=new l(e,t,i),u={gltf:a,cull:!1,releaseGltfJson:!0,opaquePass:s.default.CESIUM_3D_TILE,basePath:i,modelMatrix:t.computedTransform,upAxis:e._gltfUpAxis,forwardAxis:n.a.X,incrementallyLoadTextures:!1,customShader:e.customShader,content:r,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount};return r._model=o.a.fromGltf(u),r},l.fromB3dm=function(e,t,i,a,r){var u=new l(e,t,i),d={arrayBuffer:a,byteOffset:r,resource:i,cull:!1,releaseGltfJson:!0,opaquePass:s.default.CESIUM_3D_TILE,modelMatrix:t.computedTransform,upAxis:e._gltfUpAxis,forwardAxis:n.a.X,incrementallyLoadTextures:!1,customShader:e.customShader,content:u,colorBlendMode:e.colorBlendMode,colorBlendAmount:e.colorBlendAmount};return u._model=o.a.fromB3dm(d),u}},function(e,t,i){"use strict";(function(e){var i;"undefined"!=typeof ko&&(i=ko),function(e){var t=this||(0,eval)("this"),i=t.document,n=t.navigator,a=t.jQuery,r=t.JSON;a||"undefined"==typeof jQuery||(a=jQuery),function(e){e(t.ko={})}((function(o,s){function l(e,t){return(null===e||typeof e in w)&&e===t}function u(t,i){var n;return function(){n||(n=b.a.setTimeout((function(){n=e,t()}),i))}}function d(e,t){var i;return function(){clearTimeout(i),i=b.a.setTimeout(e,t)}}function c(e,t){t&&"change"!==t?"beforeChange"===t?this.pc(e):this.gb(e,t):this.qc(e)}function f(e,t){null!==t&&t.s&&t.s()}function h(e,t){var i=this.qd,n=i[E];n.ra||(this.Qb&&this.mb[t]?(i.uc(t,e,this.mb[t]),this.mb[t]=null,--this.Qb):n.I[t]||i.uc(t,e,n.J?{da:e}:i.$c(e)),e.Ja&&e.gd())}var p,m,_,g,v,y,b=void 0!==o?o:{};b.b=function(e,t){for(var i=e.split("."),n=b,a=0;a<i.length-1;a++)n=n[i[a]];n[i[i.length-1]]=t},b.L=function(e,t,i){e[t]=i},b.version="3.5.1",b.b("version",b.version),b.options={deferUpdates:!1,useOnlyNativeEvents:!1,foreachHidesDestroyed:!1},b.a=function(){function o(e,t){for(var i in e)d.call(e,i)&&t(i,e[i])}function s(e,t){if(t)for(var i in t)d.call(t,i)&&(e[i]=t[i]);return e}function l(e,t){return e.__proto__=t,e}function u(e,t,i,n){var a=e[t].match(v)||[];b.a.D(i.match(v),(function(e){b.a.Na(a,e,n)})),e[t]=a.join(" ")}var d=Object.prototype.hasOwnProperty,c={__proto__:[]}instanceof Array,f="function"==typeof Symbol,h={},p={};h[n&&/Firefox\/2/i.test(n.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),o(h,(function(e,t){if(t.length)for(var i=0,n=t.length;i<n;i++)p[t[i]]=e}));var m,_={propertychange:!0},g=i&&function(){for(var t=3,n=i.createElement("div"),a=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e",a[0];);return 4<t?t:e}(),v=/\S+/g;return{Jc:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],D:function(e,t,i){for(var n=0,a=e.length;n<a;n++)t.call(i,e[n],n,e)},A:"function"==typeof Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(e,t)}:function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Lb:function(t,i,n){for(var a=0,r=t.length;a<r;a++)if(i.call(n,t[a],a,t))return t[a];return e},Pa:function(e,t){var i=b.a.A(e,t);0<i?e.splice(i,1):0===i&&e.shift()},wc:function(e){var t=[];return e&&b.a.D(e,(function(e){0>b.a.A(t,e)&&t.push(e)})),t},Mb:function(e,t,i){var n=[];if(e)for(var a=0,r=e.length;a<r;a++)n.push(t.call(i,e[a],a));return n},jb:function(e,t,i){var n=[];if(e)for(var a=0,r=e.length;a<r;a++)t.call(i,e[a],a)&&n.push(e[a]);return n},Nb:function(e,t){if(t instanceof Array)e.push.apply(e,t);else for(var i=0,n=t.length;i<n;i++)e.push(t[i]);return e},Na:function(e,t,i){var n=b.a.A(b.a.bc(e),t);0>n?i&&e.push(t):i||e.splice(n,1)},Ba:c,extend:s,setPrototypeOf:l,Ab:c?l:s,P:o,Ga:function(e,t,i){if(!e)return e;var n,a={};for(n in e)d.call(e,n)&&(a[n]=t.call(i,e[n],n,e));return a},Tb:function(e){for(;e.firstChild;)b.removeNode(e.firstChild)},Yb:function(e){for(var t=((e=b.a.la(e))[0]&&e[0].ownerDocument||i).createElement("div"),n=0,a=e.length;n<a;n++)t.appendChild(b.oa(e[n]));return t},Ca:function(e,t){for(var i=0,n=e.length,a=[];i<n;i++){var r=e[i].cloneNode(!0);a.push(t?b.oa(r):r)}return a},va:function(e,t){if(b.a.Tb(e),t)for(var i=0,n=t.length;i<n;i++)e.appendChild(t[i])},Xc:function(e,t){var i=e.nodeType?[e]:e;if(0<i.length){for(var n=i[0],a=n.parentNode,r=0,o=t.length;r<o;r++)a.insertBefore(t[r],n);for(r=0,o=i.length;r<o;r++)b.removeNode(i[r])}},Ua:function(e,t){if(e.length){for(t=8===t.nodeType&&t.parentNode||t;e.length&&e[0].parentNode!==t;)e.splice(0,1);for(;1<e.length&&e[e.length-1].parentNode!==t;)e.length--;if(1<e.length){var i=e[0],n=e[e.length-1];for(e.length=0;i!==n;)e.push(i),i=i.nextSibling;e.push(n)}}return e},Zc:function(e,t){7>g?e.setAttribute("selected",t):e.selected=t},Db:function(t){return null===t||t===e?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Ud:function(e,t){return e=e||"",!(t.length>e.length)&&e.substring(0,t.length)===t},vd:function(e,t){if(e===t)return!0;if(11===e.nodeType)return!1;if(t.contains)return t.contains(1!==e.nodeType?e.parentNode:e);if(t.compareDocumentPosition)return 16==(16&t.compareDocumentPosition(e));for(;e&&e!=t;)e=e.parentNode;return!!e},Sb:function(e){return b.a.vd(e,e.ownerDocument.documentElement)},kd:function(e){return!!b.a.Lb(e,b.a.Sb)},R:function(e){return e&&e.tagName&&e.tagName.toLowerCase()},Ac:function(e){return b.onError?function(){try{return e.apply(this,arguments)}catch(e){throw b.onError&&b.onError(e),e}}:e},setTimeout:function(e,t){return setTimeout(b.a.Ac(e),t)},Gc:function(e){setTimeout((function(){throw b.onError&&b.onError(e),e}),0)},B:function(e,t,i){var n=b.a.Ac(i);if(i=_[t],b.options.useOnlyNativeEvents||i||!a)if(i||"function"!=typeof e.addEventListener){if(void 0===e.attachEvent)throw Error("Browser doesn't support addEventListener or attachEvent");var r=function(t){n.call(e,t)},o="on"+t;e.attachEvent(o,r),b.a.K.za(e,(function(){e.detachEvent(o,r)}))}else e.addEventListener(t,n,!1);else m||(m="function"==typeof a(e).on?"on":"bind"),a(e)[m](t,n)},Fb:function(e,n){if(!e||!e.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var r;if(r=!("input"!==b.a.R(e)||!e.type||"click"!=n.toLowerCase()||"checkbox"!=(r=e.type)&&"radio"!=r),b.options.useOnlyNativeEvents||!a||r)if("function"==typeof i.createEvent){if("function"!=typeof e.dispatchEvent)throw Error("The supplied element doesn't support dispatchEvent");(r=i.createEvent(p[n]||"HTMLEvents")).initEvent(n,!0,!0,t,0,0,0,0,0,!1,!1,!1,!1,0,e),e.dispatchEvent(r)}else if(r&&e.click)e.click();else{if(void 0===e.fireEvent)throw Error("Browser doesn't support triggering events");e.fireEvent("on"+n)}else a(e).trigger(n)},f:function(e){return b.O(e)?e():e},bc:function(e){return b.O(e)?e.v():e},Eb:function(e,t,i){var n;t&&("object"==typeof e.classList?(n=e.classList[i?"add":"remove"],b.a.D(t.match(v),(function(t){n.call(e.classList,t)}))):"string"==typeof e.className.baseVal?u(e.className,"baseVal",t,i):u(e,"className",t,i))},Bb:function(t,i){var n=b.a.f(i);null!==n&&n!==e||(n="");var a=b.h.firstChild(t);!a||3!=a.nodeType||b.h.nextSibling(a)?b.h.va(t,[t.ownerDocument.createTextNode(n)]):a.data=n,b.a.Ad(t)},Yc:function(e,t){if(e.name=t,7>=g)try{var n=e.name.replace(/[&<>'"]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}));e.mergeAttributes(i.createElement("<input name='"+n+"'/>"),!1)}catch(e){}},Ad:function(e){9<=g&&(e=1==e.nodeType?e:e.parentNode).style&&(e.style.zoom=e.style.zoom)},wd:function(e){if(g){var t=e.style.width;e.style.width=0,e.style.width=t}},Pd:function(e,t){e=b.a.f(e),t=b.a.f(t);for(var i=[],n=e;n<=t;n++)i.push(n);return i},la:function(e){for(var t=[],i=0,n=e.length;i<n;i++)t.push(e[i]);return t},Da:function(e){return f?Symbol(e):e},Zd:6===g,$d:7===g,W:g,Lc:function(e,t){for(var i=b.a.la(e.getElementsByTagName("input")).concat(b.a.la(e.getElementsByTagName("textarea"))),n="string"==typeof t?function(e){return e.name===t}:function(e){return t.test(e.name)},a=[],r=i.length-1;0<=r;r--)n(i[r])&&a.push(i[r]);return a},Nd:function(e){return"string"==typeof e&&(e=b.a.Db(e))?r&&r.parse?r.parse(e):new Function("return "+e)():null},hc:function(e,t,i){if(!r||!r.stringify)throw Error("Cannot find JSON.stringify(). Some browsers (e.g., IE < 8) don't support it natively, but you can overcome this by adding a script reference to json2.js, downloadable from http://www.json.org/json2.js");return r.stringify(b.a.f(e),t,i)},Od:function(e,t,n){var a=(n=n||{}).params||{},r=n.includeFields||this.Jc,s=e;if("object"==typeof e&&"form"===b.a.R(e)){s=e.action;for(var l=r.length-1;0<=l;l--)for(var u=b.a.Lc(e,r[l]),d=u.length-1;0<=d;d--)a[u[d].name]=u[d].value}t=b.a.f(t);var c=i.createElement("form");for(var f in c.style.display="none",c.action=s,c.method="post",t)(e=i.createElement("input")).type="hidden",e.name=f,e.value=b.a.hc(b.a.f(t[f])),c.appendChild(e);o(a,(function(e,t){var n=i.createElement("input");n.type="hidden",n.name=e,n.value=t,c.appendChild(n)})),i.body.appendChild(c),n.submitter?n.submitter(c):c.submit(),setTimeout((function(){c.parentNode.removeChild(c)}),0)}}}(),b.b("utils",b.a),b.b("utils.arrayForEach",b.a.D),b.b("utils.arrayFirst",b.a.Lb),b.b("utils.arrayFilter",b.a.jb),b.b("utils.arrayGetDistinctValues",b.a.wc),b.b("utils.arrayIndexOf",b.a.A),b.b("utils.arrayMap",b.a.Mb),b.b("utils.arrayPushAll",b.a.Nb),b.b("utils.arrayRemoveItem",b.a.Pa),b.b("utils.cloneNodes",b.a.Ca),b.b("utils.createSymbolOrString",b.a.Da),b.b("utils.extend",b.a.extend),b.b("utils.fieldsIncludedWithJsonPost",b.a.Jc),b.b("utils.getFormFields",b.a.Lc),b.b("utils.objectMap",b.a.Ga),b.b("utils.peekObservable",b.a.bc),b.b("utils.postJson",b.a.Od),b.b("utils.parseJson",b.a.Nd),b.b("utils.registerEventHandler",b.a.B),b.b("utils.stringifyJson",b.a.hc),b.b("utils.range",b.a.Pd),b.b("utils.toggleDomNodeCssClass",b.a.Eb),b.b("utils.triggerEvent",b.a.Fb),b.b("utils.unwrapObservable",b.a.f),b.b("utils.objectForEach",b.a.P),b.b("utils.addOrRemoveItem",b.a.Na),b.b("utils.setTextContent",b.a.Bb),b.b("unwrap",b.a.f),Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(1===arguments.length)return function(){return t.apply(e,arguments)};var i=Array.prototype.slice.call(arguments,1);return function(){var n=i.slice(0);return n.push.apply(n,arguments),t.apply(e,n)}}),b.a.g=new function(){var t,i,n=0,a="__ko__"+(new Date).getTime(),r={};return b.a.W?(t=function(t,i){var o=t[a];if(!o||"null"===o||!r[o]){if(!i)return e;o=t[a]="ko"+n++,r[o]={}}return r[o]},i=function(e){var t=e[a];return!!t&&(delete r[t],e[a]=null,!0)}):(t=function(e,t){var i=e[a];return!i&&t&&(i=e[a]={}),i},i=function(e){return!!e[a]&&(delete e[a],!0)}),{get:function(e,i){var n=t(e,!1);return n&&n[i]},set:function(i,n,a){(i=t(i,a!==e))&&(i[n]=a)},Ub:function(e,i,n){return(e=t(e,!0))[i]||(e[i]=n)},clear:i,Z:function(){return n+++a}}},b.b("utils.domData",b.a.g),b.b("utils.domData.clear",b.a.g.clear),b.a.K=new function(){function t(t,i){var n=b.a.g.get(t,r);return n===e&&i&&(n=[],b.a.g.set(t,r,n)),n}function i(e){if(i=t(e,!1))for(var i=i.slice(0),a=0;a<i.length;a++)i[a](e);b.a.g.clear(e),b.a.K.cleanExternalData(e),s[e.nodeType]&&n(e.childNodes,!0)}function n(e,t){for(var n,a=[],r=0;r<e.length;r++)if((!t||8===e[r].nodeType)&&(i(a[a.length]=n=e[r]),e[r]!==n))for(;r--&&-1==b.a.A(a,e[r]););}var r=b.a.g.Z(),o={1:!0,8:!0,9:!0},s={1:!0,9:!0};return{za:function(e,i){if("function"!=typeof i)throw Error("Callback must be a function");t(e,!0).push(i)},yb:function(i,n){var a=t(i,!1);a&&(b.a.Pa(a,n),0==a.length&&b.a.g.set(i,r,e))},oa:function(e){return b.u.G((function(){o[e.nodeType]&&(i(e),s[e.nodeType]&&n(e.getElementsByTagName("*")))})),e},removeNode:function(e){b.oa(e),e.parentNode&&e.parentNode.removeChild(e)},cleanExternalData:function(e){a&&"function"==typeof a.cleanData&&a.cleanData([e])}}},b.oa=b.a.K.oa,b.removeNode=b.a.K.removeNode,b.b("cleanNode",b.oa),b.b("removeNode",b.removeNode),b.b("utils.domNodeDisposal",b.a.K),b.b("utils.domNodeDisposal.addDisposeCallback",b.a.K.za),b.b("utils.domNodeDisposal.removeDisposeCallback",b.a.K.yb),p=[0,"",""],v={thead:m=[1,"<table>","</table>"],tbody:m,tfoot:m,tr:[2,"<table><tbody>","</tbody></table>"],td:_=[3,"<table><tbody><tr>","</tr></tbody></table>"],th:_,option:g=[1,"<select multiple='multiple'>","</select>"],optgroup:g},y=8>=b.a.W,b.a.ua=function(e,n){var r;if(a){if(a.parseHTML)r=a.parseHTML(e,n)||[];else if((r=a.clean([e],n))&&r[0]){for(var o=r[0];o.parentNode&&11!==o.parentNode.nodeType;)o=o.parentNode;o.parentNode&&o.parentNode.removeChild(o)}}else{(r=n)||(r=i),o=r.parentWindow||r.defaultView||t;var s,l=b.a.Db(e).toLowerCase(),u=r.createElement("div");for(s=(l=l.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&v[l[1]]||p,l=s[0],s="ignored<div>"+s[1]+e+s[2]+"</div>","function"==typeof o.innerShiv?u.appendChild(o.innerShiv(s)):(y&&r.body.appendChild(u),u.innerHTML=s,y&&u.parentNode.removeChild(u));l--;)u=u.lastChild;r=b.a.la(u.lastChild.childNodes)}return r},b.a.Md=function(e,t){var i=b.a.ua(e,t);return i.length&&i[0].parentElement||b.a.Yb(i)},b.a.fc=function(t,i){if(b.a.Tb(t),null!==(i=b.a.f(i))&&i!==e)if("string"!=typeof i&&(i=i.toString()),a)a(t).html(i);else for(var n=b.a.ua(i,t.ownerDocument),r=0;r<n.length;r++)t.appendChild(n[r])},b.b("utils.parseHtmlFragment",b.a.ua),b.b("utils.setHtml",b.a.fc),b.aa=function(){var t={};return{Xb:function(e){if("function"!=typeof e)throw Error("You can only pass a function to ko.memoization.memoize()");var i=(4294967296*(1+Math.random())|0).toString(16).substring(1)+(4294967296*(1+Math.random())|0).toString(16).substring(1);return t[i]=e,"\x3c!--[ko_memo:"+i+"]--\x3e"},bd:function(i,n){var a=t[i];if(a===e)throw Error("Couldn't find any memo with ID "+i+". Perhaps it's already been unmemoized.");try{return a.apply(null,n||[]),!0}finally{delete t[i]}},cd:function(e,t){var i=[];!function e(t,i){if(t)if(8==t.nodeType)null!=(n=b.aa.Uc(t.nodeValue))&&i.push({ud:t,Kd:n});else if(1==t.nodeType)for(var n=0,a=t.childNodes,r=a.length;n<r;n++)e(a[n],i)}(e,i);for(var n=0,a=i.length;n<a;n++){var r=i[n].ud,o=[r];t&&b.a.Nb(o,t),b.aa.bd(i[n].Kd,o),r.nodeValue="",r.parentNode&&r.parentNode.removeChild(r)}},Uc:function(e){return(e=e.match(/^\[ko_memo\:(.*?)\]$/))?e[1]:null}}}(),b.b("memoization",b.aa),b.b("memoization.memoize",b.aa.Xb),b.b("memoization.unmemoize",b.aa.bd),b.b("memoization.parseMemoText",b.aa.Uc),b.b("memoization.unmemoizeDomNodeAndDescendants",b.aa.cd),b.na=function(){function e(){if(r)for(var e,t=r,i=0;s<r;)if(e=a[s++]){if(s>t){if(5e3<=++i){s=r,b.a.Gc(Error("'Too much recursion' after processing "+i+" task groups."));break}t=r}try{e()}catch(e){b.a.Gc(e)}}}function n(){e(),s=r=a.length=0}var a=[],r=0,o=1,s=0;return{scheduler:t.MutationObserver?function(e){var t=i.createElement("div");return new MutationObserver(e).observe(t,{attributes:!0}),function(){t.classList.toggle("foo")}}(n):i&&"onreadystatechange"in i.createElement("script")?function(e){var t=i.createElement("script");t.onreadystatechange=function(){t.onreadystatechange=null,i.documentElement.removeChild(t),t=null,e()},i.documentElement.appendChild(t)}:function(e){setTimeout(e,0)},zb:function(e){return r||b.na.scheduler(n),a[r++]=e,o++},cancel:function(e){(e-=o-r)>=s&&e<r&&(a[e]=null)},resetForTesting:function(){var e=r-s;return s=r=a.length=0,e},Sd:e}}(),b.b("tasks",b.na),b.b("tasks.schedule",b.na.zb),b.b("tasks.runEarly",b.na.Sd),b.Ta={throttle:function(e,t){e.throttleEvaluation=t;var i=null;return b.$({read:e,write:function(n){clearTimeout(i),i=b.a.setTimeout((function(){e(n)}),t)}})},rateLimit:function(e,t){var i,n,a;"number"==typeof t?i=t:(i=t.timeout,n=t.method),e.Hb=!1,a="function"==typeof n?n:"notifyWhenChangesStop"==n?d:u,e.ub((function(e){return a(e,i,t)}))},deferred:function(t,i){if(!0!==i)throw Error("The 'deferred' extender only accepts the value 'true', because it is not supported to turn deferral off once enabled.");t.Hb||(t.Hb=!0,t.ub((function(i){var n,a=!1;return function(){if(!a){b.na.cancel(n),n=b.na.zb(i);try{a=!0,t.notifySubscribers(e,"dirty")}finally{a=!1}}}})))},notify:function(e,t){e.equalityComparer="always"==t?null:l}};var w={undefined:1,boolean:1,number:1,string:1};b.b("extenders",b.Ta),b.ic=function(e,t,i){this.da=e,this.lc=t,this.mc=i,this.Ib=!1,this.fb=this.Jb=null,b.L(this,"dispose",this.s),b.L(this,"disposeWhenNodeIsRemoved",this.l)},b.ic.prototype.s=function(){this.Ib||(this.fb&&b.a.K.yb(this.Jb,this.fb),this.Ib=!0,this.mc(),this.da=this.lc=this.mc=this.Jb=this.fb=null)},b.ic.prototype.l=function(e){this.Jb=e,b.a.K.za(e,this.fb=this.s.bind(this))},b.T=function(){b.a.Ab(this,O),O.qb(this)};var O={qb:function(e){e.U={change:[]},e.sc=1},subscribe:function(e,t,i){var n=this;i=i||"change";var a=new b.ic(n,t?e.bind(t):e,(function(){b.a.Pa(n.U[i],a),n.hb&&n.hb(i)}));return n.Qa&&n.Qa(i),n.U[i]||(n.U[i]=[]),n.U[i].push(a),a},notifySubscribers:function(e,t){if("change"===(t=t||"change")&&this.Gb(),this.Wa(t)){var i="change"===t&&this.ed||this.U[t].slice(0);try{b.u.xc();for(var n,a=0;n=i[a];++a)n.Ib||n.lc(e)}finally{b.u.end()}}},ob:function(){return this.sc},Dd:function(e){return this.ob()!==e},Gb:function(){++this.sc},ub:function(e){var t,i,n,a,r,o=this,s=b.O(o);o.gb||(o.gb=o.notifySubscribers,o.notifySubscribers=c);var l=e((function(){o.Ja=!1,s&&a===o&&(a=o.nc?o.nc():o());var e=i||r&&o.sb(n,a);r=i=t=!1,e&&o.gb(n=a)}));o.qc=function(e,i){i&&o.Ja||(r=!i),o.ed=o.U.change.slice(0),o.Ja=t=!0,a=e,l()},o.pc=function(e){t||(n=e,o.gb(e,"beforeChange"))},o.rc=function(){r=!0},o.gd=function(){o.sb(n,o.v(!0))&&(i=!0)}},Wa:function(e){return this.U[e]&&this.U[e].length},Bd:function(e){if(e)return this.U[e]&&this.U[e].length||0;var t=0;return b.a.P(this.U,(function(e,i){"dirty"!==e&&(t+=i.length)})),t},sb:function(e,t){return!this.equalityComparer||!this.equalityComparer(e,t)},toString:function(){return"[object Object]"},extend:function(e){var t=this;return e&&b.a.P(e,(function(e,i){var n=b.Ta[e];"function"==typeof n&&(t=n(t,i)||t)})),t}};b.L(O,"init",O.qb),b.L(O,"subscribe",O.subscribe),b.L(O,"extend",O.extend),b.L(O,"getSubscriptionsCount",O.Bd),b.a.Ba&&b.a.setPrototypeOf(O,Function.prototype),b.T.fn=O,b.Qc=function(e){return null!=e&&"function"==typeof e.subscribe&&"function"==typeof e.notifySubscribers},b.b("subscribable",b.T),b.b("isSubscribable",b.Qc),b.S=b.u=function(){function e(e){n.push(i),i=e}function t(){i=n.pop()}var i,n=[],a=0;return{xc:e,end:t,cc:function(e){if(i){if(!b.Qc(e))throw Error("Only subscribable things can act as dependencies");i.od.call(i.pd,e,e.fd||(e.fd=++a))}},G:function(i,n,a){try{return e(),i.apply(n,a||[])}finally{t()}},qa:function(){if(i)return i.o.qa()},Va:function(){if(i)return i.o.Va()},Ya:function(){if(i)return i.Ya},o:function(){if(i)return i.o}}}(),b.b("computedContext",b.S),b.b("computedContext.getDependenciesCount",b.S.qa),b.b("computedContext.getDependencies",b.S.Va),b.b("computedContext.isInitial",b.S.Ya),b.b("computedContext.registerDependency",b.S.cc),b.b("ignoreDependencies",b.Yd=b.u.G);var x=b.a.Da("_latestValue");b.ta=function(e){function t(){return 0<arguments.length?(t.sb(t[x],arguments[0])&&(t.ya(),t[x]=arguments[0],t.xa()),this):(b.u.cc(t),t[x])}return t[x]=e,b.a.Ba||b.a.extend(t,b.T.fn),b.T.fn.qb(t),b.a.Ab(t,A),b.options.deferUpdates&&b.Ta.deferred(t,!0),t};var A={equalityComparer:l,v:function(){return this[x]},xa:function(){this.notifySubscribers(this[x],"spectate"),this.notifySubscribers(this[x])},ya:function(){this.notifySubscribers(this[x],"beforeChange")}};b.a.Ba&&b.a.setPrototypeOf(A,b.T.fn);var T=b.ta.Ma="__ko_proto__";A[T]=b.ta,b.O=function(e){if((e="function"==typeof e&&e[T])&&e!==A[T]&&e!==b.o.fn[T])throw Error("Invalid object that looks like an observable; possibly from another Knockout instance");return!!e},b.Za=function(e){return"function"==typeof e&&(e[T]===A[T]||e[T]===b.o.fn[T]&&e.Nc)},b.b("observable",b.ta),b.b("isObservable",b.O),b.b("isWriteableObservable",b.Za),b.b("isWritableObservable",b.Za),b.b("observable.fn",A),b.L(A,"peek",A.v),b.L(A,"valueHasMutated",A.xa),b.L(A,"valueWillMutate",A.ya),b.Ha=function(e){if("object"!=typeof(e=e||[])||!("length"in e))throw Error("The argument passed when initializing an observable array must be an array, or null, or undefined.");return e=b.ta(e),b.a.Ab(e,b.Ha.fn),e.extend({trackArrayChanges:!0})},b.Ha.fn={remove:function(e){for(var t=this.v(),i=[],n="function"!=typeof e||b.O(e)?function(t){return t===e}:e,a=0;a<t.length;a++){var r=t[a];if(n(r)){if(0===i.length&&this.ya(),t[a]!==r)throw Error("Array modified during remove; cannot remove item");i.push(r),t.splice(a,1),a--}}return i.length&&this.xa(),i},removeAll:function(t){if(t===e){var i=this.v(),n=i.slice(0);return this.ya(),i.splice(0,i.length),this.xa(),n}return t?this.remove((function(e){return 0<=b.a.A(t,e)})):[]},destroy:function(e){var t=this.v(),i="function"!=typeof e||b.O(e)?function(t){return t===e}:e;this.ya();for(var n=t.length-1;0<=n;n--){var a=t[n];i(a)&&(a._destroy=!0)}this.xa()},destroyAll:function(t){return t===e?this.destroy((function(){return!0})):t?this.destroy((function(e){return 0<=b.a.A(t,e)})):[]},indexOf:function(e){var t=this();return b.a.A(t,e)},replace:function(e,t){var i=this.indexOf(e);0<=i&&(this.ya(),this.v()[i]=t,this.xa())},sorted:function(e){var t=this().slice(0);return e?t.sort(e):t.sort()},reversed:function(){return this().slice(0).reverse()}},b.a.Ba&&b.a.setPrototypeOf(b.Ha.fn,b.ta.fn),b.a.D("pop push reverse shift sort splice unshift".split(" "),(function(e){b.Ha.fn[e]=function(){var t=this.v();this.ya(),this.zc(t,e,arguments);var i=t[e].apply(t,arguments);return this.xa(),i===t?this:i}})),b.a.D(["slice"],(function(e){b.Ha.fn[e]=function(){var t=this();return t[e].apply(t,arguments)}})),b.Pc=function(e){return b.O(e)&&"function"==typeof e.remove&&"function"==typeof e.push},b.b("observableArray",b.Ha),b.b("isObservableArray",b.Pc),b.Ta.trackArrayChanges=function(t,i){function n(){function e(){if(u){var e,i=[].concat(t.v()||[]);t.Wa("arrayChange")&&((!l||1<u)&&(l=b.a.Pb(o,i,t.Ob)),e=l),o=i,l=null,u=0,e&&e.length&&t.notifySubscribers(e,"arrayChange")}}s?e():(s=!0,r=t.subscribe((function(){++u}),null,"spectate"),o=[].concat(t.v()||[]),l=null,a=t.subscribe(e))}if(t.Ob={},i&&"object"==typeof i&&b.a.extend(t.Ob,i),t.Ob.sparse=!0,!t.zc){var a,r,o,s=!1,l=null,u=0,d=t.Qa,c=t.hb;t.Qa=function(e){d&&d.call(t,e),"arrayChange"===e&&n()},t.hb=function(i){c&&c.call(t,i),"arrayChange"!==i||t.Wa("arrayChange")||(a&&a.s(),r&&r.s(),r=a=null,s=!1,o=e)},t.zc=function(e,t,i){function n(e,t,i){return a[a.length]={status:e,value:t,index:i}}if(s&&!u){var a=[],r=e.length,o=i.length,d=0;switch(t){case"push":d=r;case"unshift":for(t=0;t<o;t++)n("added",i[t],d+t);break;case"pop":d=r-1;case"shift":r&&n("deleted",e[d],d);break;case"splice":t=Math.min(Math.max(0,0>i[0]?r+i[0]:i[0]),r),r=1===o?r:Math.min(t+(i[1]||0),r),o=t+o-2,d=Math.max(r,o);for(var c=[],f=[],h=2;t<d;++t,++h)t<r&&f.push(n("deleted",e[t],t)),t<o&&c.push(n("added",i[h],t));b.a.Kc(f,c);break;default:return}l=a}}}};var E=b.a.Da("_state");b.o=b.$=function(t,i,n){function a(){if(0<arguments.length){if("function"!=typeof r)throw Error("Cannot write a value to a ko.computed unless you specify a 'write' option. If you wish to read the current value, don't pass any parameters.");return r.apply(o.nb,arguments),this}return o.ra||b.u.cc(a),(o.ka||o.J&&a.Xa())&&a.ha(),o.X}if("object"==typeof t?n=t:(n=n||{},t&&(n.read=t)),"function"!=typeof n.read)throw Error("Pass a function that returns the value of the ko.computed");var r=n.write,o={X:e,sa:!0,ka:!0,rb:!1,jc:!1,ra:!1,wb:!1,J:!1,Wc:n.read,nb:i||n.owner,l:n.disposeWhenNodeIsRemoved||n.l||null,Sa:n.disposeWhen||n.Sa,Rb:null,I:{},V:0,Ic:null};return a[E]=o,a.Nc="function"==typeof r,b.a.Ba||b.a.extend(a,b.T.fn),b.T.fn.qb(a),b.a.Ab(a,C),n.pure?(o.wb=!0,o.J=!0,b.a.extend(a,S)):n.deferEvaluation&&b.a.extend(a,M),b.options.deferUpdates&&b.Ta.deferred(a,!0),o.l&&(o.jc=!0,o.l.nodeType||(o.l=null)),o.J||n.deferEvaluation||a.ha(),o.l&&a.ja()&&b.a.K.za(o.l,o.Rb=function(){a.s()}),a};var C={equalityComparer:l,qa:function(){return this[E].V},Va:function(){var e=[];return b.a.P(this[E].I,(function(t,i){e[i.Ka]=i.da})),e},Vb:function(e){if(!this[E].V)return!1;var t=this.Va();return-1!==b.a.A(t,e)||!!b.a.Lb(t,(function(t){return t.Vb&&t.Vb(e)}))},uc:function(e,t,i){if(this[E].wb&&t===this)throw Error("A 'pure' computed must not be called recursively");this[E].I[e]=i,i.Ka=this[E].V++,i.La=t.ob()},Xa:function(){var e,t,i=this[E].I;for(e in i)if(Object.prototype.hasOwnProperty.call(i,e)&&(t=i[e],this.Ia&&t.da.Ja||t.da.Dd(t.La)))return!0},Jd:function(){this.Ia&&!this[E].rb&&this.Ia(!1)},ja:function(){var e=this[E];return e.ka||0<e.V},Rd:function(){this.Ja?this[E].ka&&(this[E].sa=!0):this.Hc()},$c:function(e){if(e.Hb){var t=e.subscribe(this.Jd,this,"dirty"),i=e.subscribe(this.Rd,this);return{da:e,s:function(){t.s(),i.s()}}}return e.subscribe(this.Hc,this)},Hc:function(){var e=this,t=e.throttleEvaluation;t&&0<=t?(clearTimeout(this[E].Ic),this[E].Ic=b.a.setTimeout((function(){e.ha(!0)}),t)):e.Ia?e.Ia(!0):e.ha(!0)},ha:function(e){var t=this[E],i=t.Sa,n=!1;if(!t.rb&&!t.ra){if(t.l&&!b.a.Sb(t.l)||i&&i()){if(!t.jc)return void this.s()}else t.jc=!1;t.rb=!0;try{n=this.zd(e)}finally{t.rb=!1}return n}},zd:function(t){var i=this[E],n=!1,a=i.wb?e:!i.V;n={qd:this,mb:i.I,Qb:i.V},b.u.xc({pd:n,od:h,o:this,Ya:a}),i.I={},i.V=0;var r=this.yd(i,n);return i.V?n=this.sb(i.X,r):(this.s(),n=!0),n&&(i.J?this.Gb():this.notifySubscribers(i.X,"beforeChange"),i.X=r,this.notifySubscribers(i.X,"spectate"),!i.J&&t&&this.notifySubscribers(i.X),this.rc&&this.rc()),a&&this.notifySubscribers(i.X,"awake"),n},yd:function(e,t){try{var i=e.Wc;return e.nb?i.call(e.nb):i()}finally{b.u.end(),t.Qb&&!e.J&&b.a.P(t.mb,f),e.sa=e.ka=!1}},v:function(e){var t=this[E];return(t.ka&&(e||!t.V)||t.J&&this.Xa())&&this.ha(),t.X},ub:function(e){b.T.fn.ub.call(this,e),this.nc=function(){return this[E].J||(this[E].sa?this.ha():this[E].ka=!1),this[E].X},this.Ia=function(e){this.pc(this[E].X),this[E].ka=!0,e&&(this[E].sa=!0),this.qc(this,!e)}},s:function(){var t=this[E];!t.J&&t.I&&b.a.P(t.I,(function(e,t){t.s&&t.s()})),t.l&&t.Rb&&b.a.K.yb(t.l,t.Rb),t.I=e,t.V=0,t.ra=!0,t.sa=!1,t.ka=!1,t.J=!1,t.l=e,t.Sa=e,t.Wc=e,this.Nc||(t.nb=e)}},S={Qa:function(e){var t=this,i=t[E];if(!i.ra&&i.J&&"change"==e){if(i.J=!1,i.sa||t.Xa())i.I=null,i.V=0,t.ha()&&t.Gb();else{var n=[];b.a.P(i.I,(function(e,t){n[t.Ka]=e})),b.a.D(n,(function(e,n){var a=i.I[e],r=t.$c(a.da);r.Ka=n,r.La=a.La,i.I[e]=r})),t.Xa()&&t.ha()&&t.Gb()}i.ra||t.notifySubscribers(i.X,"awake")}},hb:function(t){var i=this[E];i.ra||"change"!=t||this.Wa("change")||(b.a.P(i.I,(function(e,t){t.s&&(i.I[e]={da:t.da,Ka:t.Ka,La:t.La},t.s())})),i.J=!0,this.notifySubscribers(e,"asleep"))},ob:function(){var e=this[E];return e.J&&(e.sa||this.Xa())&&this.ha(),b.T.fn.ob.call(this)}},M={Qa:function(e){"change"!=e&&"beforeChange"!=e||this.v()}};b.a.Ba&&b.a.setPrototypeOf(C,b.T.fn);var D=b.ta.Ma;C[D]=b.o,b.Oc=function(e){return"function"==typeof e&&e[D]===C[D]},b.Fd=function(e){return b.Oc(e)&&e[E]&&e[E].wb},b.b("computed",b.o),b.b("dependentObservable",b.o),b.b("isComputed",b.Oc),b.b("isPureComputed",b.Fd),b.b("computed.fn",C),b.L(C,"peek",C.v),b.L(C,"dispose",C.s),b.L(C,"isActive",C.ja),b.L(C,"getDependenciesCount",C.qa),b.L(C,"getDependencies",C.Va),b.xb=function(e,t){return"function"==typeof e?b.o(e,t,{pure:!0}):((e=b.a.extend({},e)).pure=!0,b.o(e,t))},b.b("pureComputed",b.xb),function(){function t(n,a,r){if(r=r||new i,"object"!=typeof(n=a(n))||null===n||n===e||n instanceof RegExp||n instanceof Date||n instanceof String||n instanceof Number||n instanceof Boolean)return n;var o=n instanceof Array?[]:{};return r.save(n,o),function(e,t){if(e instanceof Array){for(var i=0;i<e.length;i++)t(i);"function"==typeof e.toJSON&&t("toJSON")}else for(i in e)t(i)}(n,(function(i){var s=a(n[i]);switch(typeof s){case"boolean":case"number":case"string":case"function":o[i]=s;break;case"object":case"undefined":var l=r.get(s);o[i]=l!==e?l:t(s,a,r)}})),o}function i(){this.keys=[],this.values=[]}b.ad=function(e){if(0==arguments.length)throw Error("When calling ko.toJS, pass the object you want to convert.");return t(e,(function(e){for(var t=0;b.O(e)&&10>t;t++)e=e();return e}))},b.toJSON=function(e,t,i){return e=b.ad(e),b.a.hc(e,t,i)},i.prototype={constructor:i,save:function(e,t){var i=b.a.A(this.keys,e);0<=i?this.values[i]=t:(this.keys.push(e),this.values.push(t))},get:function(t){return 0<=(t=b.a.A(this.keys,t))?this.values[t]:e}}}(),b.b("toJS",b.ad),b.b("toJSON",b.toJSON),b.Wd=function(e,t,i){function n(t){var n=b.xb(e,i).extend({ma:"always"}),a=n.subscribe((function(e){e&&(a.s(),t(e))}));return n.notifySubscribers(n.v()),a}return"function"!=typeof Promise||t?n(t.bind(i)):new Promise(n)},b.b("when",b.Wd),b.w={M:function(t){switch(b.a.R(t)){case"option":return!0===t.__ko__hasDomDataOptionValue__?b.a.g.get(t,b.c.options.$b):7>=b.a.W?t.getAttributeNode("value")&&t.getAttributeNode("value").specified?t.value:t.text:t.value;case"select":return 0<=t.selectedIndex?b.w.M(t.options[t.selectedIndex]):e;default:return t.value}},cb:function(t,i,n){switch(b.a.R(t)){case"option":"string"==typeof i?(b.a.g.set(t,b.c.options.$b,e),"__ko__hasDomDataOptionValue__"in t&&delete t.__ko__hasDomDataOptionValue__,t.value=i):(b.a.g.set(t,b.c.options.$b,i),t.__ko__hasDomDataOptionValue__=!0,t.value="number"==typeof i?i:"");break;case"select":""!==i&&null!==i||(i=e);for(var a,r=-1,o=0,s=t.options.length;o<s;++o)if((a=b.w.M(t.options[o]))==i||""===a&&i===e){r=o;break}(n||0<=r||i===e&&1<t.size)&&(t.selectedIndex=r,6===b.a.W&&b.a.setTimeout((function(){t.selectedIndex=r}),0));break;default:null!==i&&i!==e||(i=""),t.value=i}}},b.b("selectExtensions",b.w),b.b("selectExtensions.readValue",b.w.M),b.b("selectExtensions.writeValue",b.w.cb),b.m=function(){function e(e){123===(e=b.a.Db(e)).charCodeAt(0)&&(e=e.slice(1,-1));var t,i=[],o=(e+="\n,").match(n),s=[],l=0;if(1<o.length){for(var u,d=0;u=o[d];++d){var c=u.charCodeAt(0);if(44===c){if(0>=l){i.push(t&&s.length?{key:t,value:s.join("")}:{unknown:t||s.join("")}),t=l=0,s=[];continue}}else if(58===c){if(!l&&!t&&1===s.length){t=s.pop();continue}}else{if(47===c&&1<u.length&&(47===u.charCodeAt(1)||42===u.charCodeAt(1)))continue;47===c&&d&&1<u.length?(c=o[d-1].match(a))&&!r[c[0]]&&(o=(e=e.substr(e.indexOf(u)+1)).match(n),d=-1,u="/"):40===c||123===c||91===c?++l:41===c||125===c||93===c?--l:t||s.length||34!==c&&39!==c||(u=u.slice(1,-1))}s.push(u)}if(0<l)throw Error("Unbalanced parentheses, braces, or brackets")}return i}var t=["true","false","null","undefined"],i=/^(?:[$_a-z][$\w]*|(.+)(\.\s*[$_a-z][$\w]*|\[.+\]))$/i,n=RegExp("\"(?:\\\\.|[^\"])*\"|'(?:\\\\.|[^'])*'|`(?:\\\\.|[^`])*`|/\\*(?:[^*]|\\*+[^*/])*\\*+/|//.*\n|/(?:\\\\.|[^/])+/w*|[^\\s:,/][^,\"'`{}()/:[\\]]*[^\\s,\"'`{}()/:[\\]]|[^\\s]","g"),a=/[\])"'A-Za-z0-9_$]+$/,r={in:1,return:1,typeof:1},o={};return{Ra:[],wa:o,ac:e,vb:function(n,a){function r(e,n){var a;if(!d){var c=b.getBindingHandler(e);if(c&&c.preprocess&&!(n=c.preprocess(n,e,r)))return;(c=o[e])&&(a=n,0<=b.a.A(t,a)?a=!1:(c=a.match(i),a=null!==c&&(c[1]?"Object("+c[1]+")"+c[2]:a)),c=a),c&&l.push("'"+("string"==typeof o[e]?o[e]:e)+"':function(_z){"+a+"=_z}")}u&&(n="function(){return "+n+" }"),s.push("'"+e+"':"+n)}var s=[],l=[],u=(a=a||{}).valueAccessors,d=a.bindingParams,c="string"==typeof n?e(n):n;return b.a.D(c,(function(e){r(e.key||e.unknown,e.value)})),l.length&&r("_ko_property_writers","{"+l.join(",")+" }"),s.join(",")},Id:function(e,t){for(var i=0;i<e.length;i++)if(e[i].key==t)return!0;return!1},eb:function(e,t,i,n,a){e&&b.O(e)?!b.Za(e)||a&&e.v()===n||e(n):(e=t.get("_ko_property_writers"))&&e[i]&&e[i](n)}}}(),b.b("expressionRewriting",b.m),b.b("expressionRewriting.bindingRewriteValidators",b.m.Ra),b.b("expressionRewriting.parseObjectLiteral",b.m.ac),b.b("expressionRewriting.preProcessBindings",b.m.vb),b.b("expressionRewriting._twoWayBindings",b.m.wa),b.b("jsonExpressionRewriting",b.m),b.b("jsonExpressionRewriting.insertPropertyAccessorsIntoJson",b.m.vb),function(){function e(e){return 8==e.nodeType&&o.test(r?e.text:e.nodeValue)}function t(e){return 8==e.nodeType&&s.test(r?e.text:e.nodeValue)}function n(i,n){for(var a=i,r=1,o=[];a=a.nextSibling;){if(t(a)&&(b.a.g.set(a,u,!0),0==--r))return o;o.push(a),e(a)&&r++}if(!n)throw Error("Cannot find closing comment tag to match: "+i.nodeValue);return null}function a(e,t){var i=n(e,t);return i?0<i.length?i[i.length-1].nextSibling:e.nextSibling:null}var r=i&&"\x3c!--test--\x3e"===i.createComment("test").text,o=r?/^\x3c!--\s*ko(?:\s+([\s\S]+))?\s*--\x3e$/:/^\s*ko(?:\s+([\s\S]+))?\s*$/,s=r?/^\x3c!--\s*\/ko\s*--\x3e$/:/^\s*\/ko\s*$/,l={ul:!0,ol:!0},u="__ko_matchedEndComment__";b.h={ea:{},childNodes:function(t){return e(t)?n(t):t.childNodes},Ea:function(t){if(e(t))for(var i=0,n=(t=b.h.childNodes(t)).length;i<n;i++)b.removeNode(t[i]);else b.a.Tb(t)},va:function(t,i){if(e(t)){b.h.Ea(t);for(var n=t.nextSibling,a=0,r=i.length;a<r;a++)n.parentNode.insertBefore(i[a],n)}else b.a.va(t,i)},Vc:function(t,i){var n;e(t)?(n=t.nextSibling,t=t.parentNode):n=t.firstChild,n?i!==n&&t.insertBefore(i,n):t.appendChild(i)},Wb:function(t,i,n){n?(n=n.nextSibling,e(t)&&(t=t.parentNode),n?i!==n&&t.insertBefore(i,n):t.appendChild(i)):b.h.Vc(t,i)},firstChild:function(i){if(e(i))return!i.nextSibling||t(i.nextSibling)?null:i.nextSibling;if(i.firstChild&&t(i.firstChild))throw Error("Found invalid end comment, as the first child of "+i);return i.firstChild},nextSibling:function(i){if(e(i)&&(i=a(i)),i.nextSibling&&t(i.nextSibling)){var n=i.nextSibling;if(t(n)&&!b.a.g.get(n,u))throw Error("Found end comment without a matching opening comment, as child of "+i);return null}return i.nextSibling},Cd:e,Vd:function(e){return(e=(r?e.text:e.nodeValue).match(o))?e[1]:null},Sc:function(i){if(l[b.a.R(i)]){var n=i.firstChild;if(n)do{if(1===n.nodeType){var r,o=null;if(r=n.firstChild)do{if(o)o.push(r);else if(e(r)){var s=a(r,!0);s?r=s:o=[r]}else t(r)&&(o=[r])}while(r=r.nextSibling);if(r=o)for(o=n.nextSibling,s=0;s<r.length;s++)o?i.insertBefore(r[s],o):i.appendChild(r[s])}}while(n=n.nextSibling)}}}}(),b.b("virtualElements",b.h),b.b("virtualElements.allowedBindings",b.h.ea),b.b("virtualElements.emptyNode",b.h.Ea),b.b("virtualElements.insertAfter",b.h.Wb),b.b("virtualElements.prepend",b.h.Vc),b.b("virtualElements.setDomNodeChildren",b.h.va),b.ga=function(){this.nd={}},b.a.extend(b.ga.prototype,{nodeHasBindings:function(e){switch(e.nodeType){case 1:return null!=e.getAttribute("data-bind")||b.j.getComponentNameForNode(e);case 8:return b.h.Cd(e);default:return!1}},getBindings:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e):null;return b.j.tc(i,e,t,!1)},getBindingAccessors:function(e,t){var i=(i=this.getBindingsString(e,t))?this.parseBindingsString(i,t,e,{valueAccessors:!0}):null;return b.j.tc(i,e,t,!0)},getBindingsString:function(e){switch(e.nodeType){case 1:return e.getAttribute("data-bind");case 8:return b.h.Vd(e);default:return null}},parseBindingsString:function(e,t,i,n){try{var a,r=this.nd,o=e+(n&&n.valueAccessors||"");if(!(a=r[o])){var s,l="with($context){with($data||{}){return{"+b.m.vb(e,n)+"}}}";s=new Function("$context","$element",l),a=r[o]=s}return a(t,i)}catch(t){throw t.message="Unable to parse bindings.\nBindings value: "+e+"\nMessage: "+t.message,t}}}),b.ga.instance=new b.ga,b.b("bindingProvider",b.ga),function(){function n(e){var t=(e=b.a.g.get(e,w))&&e.N;t&&(e.N=null,t.Tc())}function r(e,t,i){this.node=e,this.yc=t,this.kb=[],this.H=!1,t.N||b.a.K.za(e,n),i&&i.N&&(i.N.kb.push(e),this.Kb=i)}function o(e){return function(){return e}}function s(e){return e()}function l(e){return b.a.Ga(b.u.G(e),(function(t,i){return function(){return e()[i]}}))}function u(e,t,i){return"function"==typeof e?l(e.bind(null,t,i)):b.a.Ga(e,o)}function d(e,t){return l(this.getBindings.bind(this,e,t))}function c(e,t){var i=b.h.firstChild(t);if(i){var n,a=b.ga.instance,r=a.preprocessNode;if(r){for(;n=i;)i=b.h.nextSibling(n),r.call(a,n);i=b.h.firstChild(t)}for(;n=i;)i=b.h.nextSibling(n),f(e,n)}b.i.ma(t,b.i.H)}function f(e,t){var i=e,n=1===t.nodeType;n&&b.h.Sc(t),(n||b.ga.instance.nodeHasBindings(t))&&(i=h(t,null,e).bindingContextForDescendants),i&&!v[b.a.R(t)]&&c(i,t)}function h(t,i,n){var a,r=b.a.g.Ub(t,w,{}),o=r.hd;if(!i){if(o)throw Error("You cannot apply bindings multiple times to the same element.");r.hd=!0}if(o||(r.context=n),r.Zb||(r.Zb={}),i&&"function"!=typeof i)a=i;else{var l=b.ga.instance,u=l.getBindingAccessors||d,c=b.$((function(){return(a=i?i(n,t):u.call(l,t,n))&&(n[m]&&n[m](),n[g]&&n[g]()),a}),null,{l:t});a&&c.ja()||(c=null)}var f,h=n;if(a){var p=function(){return b.a.Ga(c?c():a,s)},_=c?function(e){return function(){return s(c()[e])}}:function(e){return a[e]};p.get=function(e){return a[e]&&s(_(e))},p.has=function(e){return e in a},b.i.H in a&&b.i.subscribe(t,b.i.H,(function(){var e=(0,a[b.i.H])();if(e){var i=b.h.childNodes(t);i.length&&e(i,b.Ec(i[0]))}})),b.i.pa in a&&(h=b.i.Cb(t,n),b.i.subscribe(t,b.i.pa,(function(){var e=(0,a[b.i.pa])();e&&b.h.firstChild(t)&&e(t)}))),r=function(e){var t=[],i={},n=[];return b.a.P(e,(function a(r){if(!i[r]){var o=b.getBindingHandler(r);o&&(o.after&&(n.push(r),b.a.D(o.after,(function(t){if(e[t]){if(-1!==b.a.A(n,t))throw Error("Cannot combine the following bindings, because they have a cyclic dependency: "+n.join(", "));a(t)}})),n.length--),t.push({key:r,Mc:o})),i[r]=!0}})),t}(a),b.a.D(r,(function(i){var n=i.Mc.init,r=i.Mc.update,o=i.key;if(8===t.nodeType&&!b.h.ea[o])throw Error("The binding '"+o+"' cannot be used with virtual elements");try{"function"==typeof n&&b.u.G((function(){var i=n(t,_(o),p,h.$data,h);if(i&&i.controlsDescendantBindings){if(f!==e)throw Error("Multiple bindings ("+f+" and "+o+") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");f=o}})),"function"==typeof r&&b.$((function(){r(t,_(o),p,h.$data,h)}),null,{l:t})}catch(e){throw e.message='Unable to process binding "'+o+": "+a[o]+'"\nMessage: '+e.message,e}}))}return{shouldBindDescendants:r=f===e,bindingContextForDescendants:r&&h}}function p(t,i){return t&&t instanceof b.fa?t:new b.fa(t,e,e,i)}var m=b.a.Da("_subscribable"),_=b.a.Da("_ancestorBindingInfo"),g=b.a.Da("_dataDependency");b.c={};var v={script:!0,textarea:!0,template:!0};b.getBindingHandler=function(e){return b.c[e]};var y={};b.fa=function(t,i,n,a,r){function o(){var e=c?d():d,t=b.a.f(e);return i?(b.a.extend(l,i),_ in i&&(l[_]=i[_])):(l.$parents=[],l.$root=t,l.ko=b),l[m]=s,u?t=l.$data:(l.$rawData=e,l.$data=t),n&&(l[n]=t),a&&a(l,i,t),i&&i[m]&&!b.S.o().Vb(i[m])&&i[m](),f&&(l[g]=f),l.$data}var s,l=this,u=t===y,d=u?e:t,c="function"==typeof d&&!b.O(d),f=r&&r.dataDependency;r&&r.exportDependencies?o():((s=b.xb(o)).v(),s.ja()?s.equalityComparer=null:l[m]=e)},b.fa.prototype.createChildContext=function(e,t,i,n){if(!n&&t&&"object"==typeof t&&(t=(n=t).as,i=n.extend),t&&n&&n.noChildContext){var a="function"==typeof e&&!b.O(e);return new b.fa(y,this,null,(function(n){i&&i(n),n[t]=a?e():e}),n)}return new b.fa(e,this,t,(function(e,t){e.$parentContext=t,e.$parent=t.$data,e.$parents=(t.$parents||[]).slice(0),e.$parents.unshift(e.$parent),i&&i(e)}),n)},b.fa.prototype.extend=function(e,t){return new b.fa(y,this,null,(function(t){b.a.extend(t,"function"==typeof e?e(t):e)}),t)};var w=b.a.g.Z();r.prototype.Tc=function(){this.Kb&&this.Kb.N&&this.Kb.N.sd(this.node)},r.prototype.sd=function(e){b.a.Pa(this.kb,e),!this.kb.length&&this.H&&this.Cc()},r.prototype.Cc=function(){this.H=!0,this.yc.N&&!this.kb.length&&(this.yc.N=null,b.a.K.yb(this.node,n),b.i.ma(this.node,b.i.pa),this.Tc())},b.i={H:"childrenComplete",pa:"descendantsComplete",subscribe:function(e,t,i,n,a){var r=b.a.g.Ub(e,w,{});return r.Fa||(r.Fa=new b.T),a&&a.notifyImmediately&&r.Zb[t]&&b.u.G(i,n,[e]),r.Fa.subscribe(i,n,t)},ma:function(t,i){var n=b.a.g.get(t,w);if(n&&(n.Zb[i]=!0,n.Fa&&n.Fa.notifySubscribers(t,i),i==b.i.H))if(n.N)n.N.Cc();else if(n.N===e&&n.Fa&&n.Fa.Wa(b.i.pa))throw Error("descendantsComplete event not supported for bindings on this node")},Cb:function(e,t){var i=b.a.g.Ub(e,w,{});return i.N||(i.N=new r(e,i,t[_])),t[_]==i?t:t.extend((function(e){e[_]=i}))}},b.Td=function(e){return(e=b.a.g.get(e,w))&&e.context},b.ib=function(e,t,i){return 1===e.nodeType&&b.h.Sc(e),h(e,t,p(i))},b.ld=function(e,t,i){return i=p(i),b.ib(e,u(t,i,e),i)},b.Oa=function(e,t){1!==t.nodeType&&8!==t.nodeType||c(p(e),t)},b.vc=function(e,n,r){if(!a&&t.jQuery&&(a=t.jQuery),2>arguments.length){if(!(n=i.body))throw Error("ko.applyBindings: could not find document.body; has the document been loaded?")}else if(!n||1!==n.nodeType&&8!==n.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node");f(p(e,r),n)},b.Dc=function(t){return!t||1!==t.nodeType&&8!==t.nodeType?e:b.Td(t)},b.Ec=function(t){return(t=b.Dc(t))?t.$data:e},b.b("bindingHandlers",b.c),b.b("bindingEvent",b.i),b.b("bindingEvent.subscribe",b.i.subscribe),b.b("bindingEvent.startPossiblyAsyncContentBinding",b.i.Cb),b.b("applyBindings",b.vc),b.b("applyBindingsToDescendants",b.Oa),b.b("applyBindingAccessorsToNode",b.ib),b.b("applyBindingsToNode",b.ld),b.b("contextFor",b.Dc),b.b("dataFor",b.Ec)}(),function(e){function t(t,n){var o,s=Object.prototype.hasOwnProperty.call(a,t)?a[t]:e;s?s.subscribe(n):((s=a[t]=new b.T).subscribe(n),i(t,(function(e,i){var n=!(!i||!i.synchronous);r[t]={definition:e,Gd:n},delete a[t],o||n?s.notifySubscribers(e):b.na.zb((function(){s.notifySubscribers(e)}))})),o=!0)}function i(e,t){n("getConfig",[e],(function(i){i?n("loadComponent",[e,i],(function(e){t(e,i)})):t(null,null)}))}function n(t,i,a,r){r||(r=b.j.loaders.slice(0));var o=r.shift();if(o){var s=o[t];if(s){var l=!1;if(s.apply(o,i.concat((function(e){l?a(null):null!==e?a(e):n(t,i,a,r)})))!==e&&(l=!0,!o.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.")}else n(t,i,a,r)}else a(null)}var a={},r={};b.j={get:function(i,n){var a=Object.prototype.hasOwnProperty.call(r,i)?r[i]:e;a?a.Gd?b.u.G((function(){n(a.definition)})):b.na.zb((function(){n(a.definition)})):t(i,n)},Bc:function(e){delete r[e]},oc:n},b.j.loaders=[],b.b("components",b.j),b.b("components.get",b.j.get),b.b("components.clearCachedDefinition",b.j.Bc)}(),function(){function e(e,t,i,n){function a(){0==--s&&n(o)}var o={},s=2,l=i.template;i=i.viewModel,l?r(t,l,(function(t){b.j.oc("loadTemplate",[e,t],(function(e){o.template=e,a()}))})):a(),i?r(t,i,(function(t){b.j.oc("loadViewModel",[e,t],(function(e){o[u]=e,a()}))})):a()}function n(e){switch(b.a.R(e)){case"script":return b.a.ua(e.text);case"textarea":return b.a.ua(e.value);case"template":if(a(e.content))return b.a.Ca(e.content.childNodes)}return b.a.Ca(e.childNodes)}function a(e){return t.DocumentFragment?e instanceof DocumentFragment:e&&11===e.nodeType}function r(e,i,n){"string"==typeof i.require?s||t.require?(s||t.require)([i.require],(function(e){e&&"object"==typeof e&&e.Xd&&e.default&&(e=e.default),n(e)})):e("Uses require, but no AMD loader is present"):n(i)}function o(e){return function(t){throw Error("Component '"+e+"': "+t)}}var l={};b.j.register=function(e,t){if(!t)throw Error("Invalid configuration for "+e);if(b.j.tb(e))throw Error("Component "+e+" is already registered");l[e]=t},b.j.tb=function(e){return Object.prototype.hasOwnProperty.call(l,e)},b.j.unregister=function(e){delete l[e],b.j.Bc(e)},b.j.Fc={getConfig:function(e,t){t(b.j.tb(e)?l[e]:null)},loadComponent:function(t,i,n){var a=o(t);r(a,i,(function(i){e(t,a,i,n)}))},loadTemplate:function(e,r,s){if(e=o(e),"string"==typeof r)s(b.a.ua(r));else if(r instanceof Array)s(r);else if(a(r))s(b.a.la(r.childNodes));else if(r.element)if(r=r.element,t.HTMLElement?r instanceof HTMLElement:r&&r.tagName&&1===r.nodeType)s(n(r));else if("string"==typeof r){var l=i.getElementById(r);l?s(n(l)):e("Cannot find element with ID "+r)}else e("Unknown element type: "+r);else e("Unknown template value: "+r)},loadViewModel:function(e,t,i){!function e(t,i,n){if("function"==typeof i)n((function(e){return new i(e)}));else if("function"==typeof i[u])n(i[u]);else if("instance"in i){var a=i.instance;n((function(){return a}))}else"viewModel"in i?e(t,i.viewModel,n):t("Unknown viewModel value: "+i)}(o(e),t,i)}};var u="createViewModel";b.b("components.register",b.j.register),b.b("components.isRegistered",b.j.tb),b.b("components.unregister",b.j.unregister),b.b("components.defaultLoader",b.j.Fc),b.j.loaders.push(b.j.Fc),b.j.dd=l}(),function(){function e(e,i){if(n=e.getAttribute("params")){var n=t.parseBindingsString(n,i,e,{valueAccessors:!0,bindingParams:!0}),a=(n=b.a.Ga(n,(function(t){return b.o(t,null,{l:e})})),b.a.Ga(n,(function(t){var i=t.v();return t.ja()?b.o({read:function(){return b.a.f(t())},write:b.Za(i)&&function(e){t()(e)},l:e}):i})));return Object.prototype.hasOwnProperty.call(a,"$raw")||(a.$raw=n),a}return{$raw:{}}}b.j.getComponentNameForNode=function(e){var t=b.a.R(e);if(b.j.tb(t)&&(-1!=t.indexOf("-")||"[object HTMLUnknownElement]"==""+e||8>=b.a.W&&e.tagName===t))return t},b.j.tc=function(t,i,n,a){if(1===i.nodeType){var r=b.j.getComponentNameForNode(i);if(r){if((t=t||{}).component)throw Error('Cannot use the "component" binding on a custom element matching a component');var o={name:r,params:e(i,n)};t.component=a?function(){return o}:o}}return t};var t=new b.ga;9>b.a.W&&(b.j.register=function(e){return function(t){return e.apply(this,arguments)}}(b.j.register),i.createDocumentFragment=function(e){return function(){var t,i=e(),n=b.j.dd;for(t in n);return i}}(i.createDocumentFragment))}(),function(){var e=0;b.c.component={init:function(t,i,n,a,r){function o(){var e=s&&s.dispose;"function"==typeof e&&e.call(s),u&&u.s(),l=s=u=null}var s,l,u,d=b.a.la(b.h.childNodes(t));return b.h.Ea(t),b.a.K.za(t,o),b.o((function(){var n,a,c=b.a.f(i());if("string"==typeof c?n=c:(n=b.a.f(c.name),a=b.a.f(c.params)),!n)throw Error("No component name specified");var f=b.i.Cb(t,r),h=l=++e;b.j.get(n,(function(e){if(l===h){if(o(),!e)throw Error("Unknown component '"+n+"'");!function(e,t,i){if(!(t=t.template))throw Error("Component '"+e+"' has no template");e=b.a.Ca(t),b.h.va(i,e)}(n,e,t);var i=function(e,t,i){var n=e.createViewModel;return n?n.call(e,t,i):t}(e,a,{element:t,templateNodes:d});e=f.createChildContext(i,{extend:function(e){e.$component=i,e.$componentTemplateNodes=d}}),i&&i.koDescendantsComplete&&(u=b.i.subscribe(t,b.i.pa,i.koDescendantsComplete,i)),s=i,b.Oa(e,t)}}))}),null,{l:t}),{controlsDescendantBindings:!0}}},b.h.ea.component=!0}();var P={class:"className",for:"htmlFor"};b.c.attr={update:function(t,i){var n=b.a.f(i())||{};b.a.P(n,(function(i,n){n=b.a.f(n);var a=i.indexOf(":"),r=(a="lookupNamespaceURI"in t&&0<a&&t.lookupNamespaceURI(i.substr(0,a)),!1===n||null===n||n===e);r?a?t.removeAttributeNS(a,i):t.removeAttribute(i):n=n.toString(),8>=b.a.W&&i in P?(i=P[i],r?t.removeAttribute(i):t[i]=n):r||(a?t.setAttributeNS(a,i,n):t.setAttribute(i,n)),"name"===i&&b.a.Yc(t,r?"":n)}))}},b.c.checked={after:["value","attr"],init:function(t,i,n){function a(){var a=t.checked,l=r();if(!b.S.Ya()&&(a||!s&&!b.S.qa())){var c=b.u.G(i);if(u){var h=d?c.v():c,p=f;f=l,p!==l?a&&(b.a.Na(h,l,!0),b.a.Na(h,p,!1)):b.a.Na(h,l,a),d&&b.Za(c)&&c(h)}else o&&(l===e?l=a:a||(l=e)),b.m.eb(c,n,"checked",l,!0)}}var r=b.xb((function(){return n.has("checkedValue")?b.a.f(n.get("checkedValue")):c?n.has("value")?b.a.f(n.get("value")):t.value:void 0})),o="checkbox"==t.type,s="radio"==t.type;if(o||s){var l=i(),u=o&&b.a.f(l)instanceof Array,d=!(u&&l.push&&l.splice),c=s||u,f=u?r():e;s&&!t.name&&b.c.uniqueName.init(t,(function(){return!0})),b.o(a,null,{l:t}),b.a.B(t,"click",a),b.o((function(){var n=b.a.f(i()),a=r();u?(t.checked=0<=b.a.A(n,a),f=a):t.checked=o&&a===e?!!n:r()===n}),null,{l:t}),l=e}}},b.m.wa.checked=!0,b.c.checkedValue={update:function(e,t){e.value=b.a.f(t())}},b.c.class={update:function(e,t){var i=b.a.Db(b.a.f(t()));b.a.Eb(e,e.__ko__cssValue,!1),e.__ko__cssValue=i,b.a.Eb(e,i,!0)}},b.c.css={update:function(e,t){var i=b.a.f(t());null!==i&&"object"==typeof i?b.a.P(i,(function(t,i){i=b.a.f(i),b.a.Eb(e,t,i)})):b.c.class.update(e,t)}},b.c.enable={update:function(e,t){var i=b.a.f(t());i&&e.disabled?e.removeAttribute("disabled"):i||e.disabled||(e.disabled=!0)}},b.c.disable={update:function(e,t){b.c.enable.update(e,(function(){return!b.a.f(t())}))}},b.c.event={init:function(e,t,i,n,a){var r=t()||{};b.a.P(r,(function(r){"string"==typeof r&&b.a.B(e,r,(function(e){var o,s=t()[r];if(s){try{var l=b.a.la(arguments);n=a.$data,l.unshift(n),o=s.apply(n,l)}finally{!0!==o&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}!1===i.get(r+"Bubble")&&(e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation())}}))}))}},b.c.foreach={Rc:function(e){return function(){var t=e(),i=b.a.bc(t);return i&&"number"!=typeof i.length?(b.a.f(t),{foreach:i.data,as:i.as,noChildContext:i.noChildContext,includeDestroyed:i.includeDestroyed,afterAdd:i.afterAdd,beforeRemove:i.beforeRemove,afterRender:i.afterRender,beforeMove:i.beforeMove,afterMove:i.afterMove,templateEngine:b.ba.Ma}):{foreach:t,templateEngine:b.ba.Ma}}},init:function(e,t){return b.c.template.init(e,b.c.foreach.Rc(t))},update:function(e,t,i,n,a){return b.c.template.update(e,b.c.foreach.Rc(t),i,n,a)}},b.m.Ra.foreach=!1,b.h.ea.foreach=!0,b.c.hasfocus={init:function(e,t,i){function n(n){e.__ko_hasfocusUpdating=!0;var a=e.ownerDocument;if("activeElement"in a){var r;try{r=a.activeElement}catch(e){r=a.body}n=r===e}a=t(),b.m.eb(a,i,"hasfocus",n,!0),e.__ko_hasfocusLastValue=n,e.__ko_hasfocusUpdating=!1}var a=n.bind(null,!0),r=n.bind(null,!1);b.a.B(e,"focus",a),b.a.B(e,"focusin",a),b.a.B(e,"blur",r),b.a.B(e,"focusout",r),e.__ko_hasfocusLastValue=!1},update:function(e,t){var i=!!b.a.f(t());e.__ko_hasfocusUpdating||e.__ko_hasfocusLastValue===i||(i?e.focus():e.blur(),!i&&e.__ko_hasfocusLastValue&&e.ownerDocument.body.focus(),b.u.G(b.a.Fb,null,[e,i?"focusin":"focusout"]))}},b.m.wa.hasfocus=!0,b.c.hasFocus=b.c.hasfocus,b.m.wa.hasFocus="hasfocus",b.c.html={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){b.a.fc(e,t())}},function(){function e(e,t,i){b.c[e]={init:function(e,n,a,r,o){var s,l,u,d,c,f={};if(t){r=a.get("as");var h=a.get("noChildContext");f={as:r,noChildContext:h,exportDependencies:c=!(r&&h)}}return d=(u="render"==a.get("completeOn"))||a.has(b.i.pa),b.o((function(){var a,r=b.a.f(n()),h=!i!=!r,p=!l;(c||h!==s)&&(d&&(o=b.i.Cb(e,o)),h&&(t&&!c||(f.dataDependency=b.S.o()),a=t?o.createChildContext("function"==typeof r?r:n,f):b.S.qa()?o.extend(null,f):o),p&&b.S.qa()&&(l=b.a.Ca(b.h.childNodes(e),!0)),h?(p||b.h.va(e,b.a.Ca(l)),b.Oa(a,e)):(b.h.Ea(e),u||b.i.ma(e,b.i.H)),s=h)}),null,{l:e}),{controlsDescendantBindings:!0}}},b.m.Ra[e]=!1,b.h.ea[e]=!0}e("if"),e("ifnot",!1,!0),e("with",!0)}(),b.c.let={init:function(e,t,i,n,a){return t=a.extend(t),b.Oa(t,e),{controlsDescendantBindings:!0}}},b.h.ea.let=!0;var I={};b.c.options={init:function(e){if("select"!==b.a.R(e))throw Error("options binding applies only to SELECT elements");for(;0<e.length;)e.remove(0);return{controlsDescendantBindings:!0}},update:function(t,i,n){function a(){return b.a.jb(t.options,(function(e){return e.selected}))}function r(e,t,i){var n=typeof t;return"function"==n?t(e):"string"==n?e[t]:i}function o(e,i){if(p&&d)b.i.ma(t,b.i.H);else if(h.length){var n=0<=b.a.A(h,b.w.M(i[0]));b.a.Zc(i[0],n),p&&!n&&b.u.G(b.a.Fb,null,[t,"change"])}}var s=t.multiple,l=0!=t.length&&s?t.scrollTop:null,u=b.a.f(i()),d=n.get("valueAllowUnset")&&n.has("value"),c=n.get("optionsIncludeDestroyed");i={};var f,h=[];d||(s?h=b.a.Mb(a(),b.w.M):0<=t.selectedIndex&&h.push(b.w.M(t.options[t.selectedIndex]))),u&&(void 0===u.length&&(u=[u]),f=b.a.jb(u,(function(t){return c||t===e||null===t||!b.a.f(t._destroy)})),n.has("optionsCaption")&&null!==(u=b.a.f(n.get("optionsCaption")))&&u!==e&&f.unshift(I));var p=!1;i.beforeRemove=function(e){t.removeChild(e)},u=o,n.has("optionsAfterRender")&&"function"==typeof n.get("optionsAfterRender")&&(u=function(t,i){o(0,i),b.u.G(n.get("optionsAfterRender"),null,[i[0],t!==I?t:e])}),b.a.ec(t,f,(function(i,a,o){return o.length&&(h=!d&&o[0].selected?[b.w.M(o[0])]:[],p=!0),a=t.ownerDocument.createElement("option"),i===I?(b.a.Bb(a,n.get("optionsCaption")),b.w.cb(a,e)):(o=r(i,n.get("optionsValue"),i),b.w.cb(a,b.a.f(o)),i=r(i,n.get("optionsText"),o),b.a.Bb(a,i)),[a]}),i,u),d||(s?h.length&&a().length<h.length:h.length&&0<=t.selectedIndex?b.w.M(t.options[t.selectedIndex])!==h[0]:h.length||0<=t.selectedIndex)&&b.u.G(b.a.Fb,null,[t,"change"]),(d||b.S.Ya())&&b.i.ma(t,b.i.H),b.a.wd(t),l&&20<Math.abs(l-t.scrollTop)&&(t.scrollTop=l)}},b.c.options.$b=b.a.g.Z(),b.c.selectedOptions={init:function(e,t,i){function n(){var n=t(),a=[];b.a.D(e.getElementsByTagName("option"),(function(e){e.selected&&a.push(b.w.M(e))})),b.m.eb(n,i,"selectedOptions",a)}function a(){var i=b.a.f(t()),n=e.scrollTop;i&&"number"==typeof i.length&&b.a.D(e.getElementsByTagName("option"),(function(e){var t=0<=b.a.A(i,b.w.M(e));e.selected!=t&&b.a.Zc(e,t)})),e.scrollTop=n}if("select"!=b.a.R(e))throw Error("selectedOptions binding applies only to SELECT elements");var r;b.i.subscribe(e,b.i.H,(function(){r?n():(b.a.B(e,"change",n),r=b.o(a,null,{l:e}))}),null,{notifyImmediately:!0})},update:function(){}},b.m.wa.selectedOptions=!0,b.c.style={update:function(t,i){var n=b.a.f(i()||{});b.a.P(n,(function(i,n){if(null!==(n=b.a.f(n))&&n!==e&&!1!==n||(n=""),a)a(t).css(i,n);else if(/^--/.test(i))t.style.setProperty(i,n);else{i=i.replace(/-(\w)/g,(function(e,t){return t.toUpperCase()}));var r=t.style[i];t.style[i]=n,n===r||t.style[i]!=r||isNaN(n)||(t.style[i]=n+"px")}}))}},b.c.submit={init:function(e,t,i,n,a){if("function"!=typeof t())throw Error("The value for a submit binding must be a function");b.a.B(e,"submit",(function(i){var n,r=t();try{n=r.call(a.$data,e)}finally{!0!==n&&(i.preventDefault?i.preventDefault():i.returnValue=!1)}}))}},b.c.text={init:function(){return{controlsDescendantBindings:!0}},update:function(e,t){b.a.Bb(e,t())}},b.h.ea.text=!0,function(){if(t&&t.navigator){var i,n,a,r,o,s=function(e){if(e)return parseFloat(e[1])},l=t.navigator.userAgent;(i=t.opera&&t.opera.version&&parseInt(t.opera.version()))||(o=s(l.match(/Edge\/([^ ]+)$/)))||s(l.match(/Chrome\/([^ ]+)/))||(n=s(l.match(/Version\/([^ ]+) Safari/)))||(a=s(l.match(/Firefox\/([^ ]+)/)))||(r=b.a.W||s(l.match(/MSIE ([^ ]+)/)))||(r=s(l.match(/rv:([^ )]+)/)))}if(8<=r&&10>r)var u=b.a.g.Z(),d=b.a.g.Z(),c=function(e){var t=this.activeElement;(t=t&&b.a.g.get(t,d))&&t(e)},f=function(e,t){var i=e.ownerDocument;b.a.g.get(i,u)||(b.a.g.set(i,u,!0),b.a.B(i,"selectionchange",c)),b.a.g.set(e,d,t)};b.c.textInput={init:function(t,s,l){function u(e,i){b.a.B(t,e,i)}function d(){h||(p=t.value,h=b.a.setTimeout(c,4))}function c(){clearTimeout(h),p=h=e;var i=t.value;m!==i&&(m=i,b.m.eb(s(),l,"textInput",i))}var h,p,m=t.value,_=9==b.a.W?d:c,g=!1;r&&u("keypress",c),11>r&&u("propertychange",(function(e){g||"value"!==e.propertyName||_(e)})),8==r&&(u("keyup",c),u("keydown",c)),f&&(f(t,_),u("dragend",d)),(!r||9<=r)&&u("input",_),5>n&&"textarea"===b.a.R(t)?(u("keydown",d),u("paste",d),u("cut",d)):11>i?u("keydown",d):4>a?(u("DOMAutoComplete",c),u("dragdrop",c),u("drop",c)):o&&"number"===t.type&&u("keydown",d),u("change",c),u("blur",c),b.o((function i(){var n=b.a.f(s());null!==n&&n!==e||(n=""),p!==e&&n===p?b.a.setTimeout(i,4):t.value!==n&&(g=!0,t.value=n,g=!1,m=t.value)}),null,{l:t})}},b.m.wa.textInput=!0,b.c.textinput={preprocess:function(e,t,i){i("textInput",e)}}}(),b.c.uniqueName={init:function(e,t){if(t()){var i="ko_unique_"+ ++b.c.uniqueName.rd;b.a.Yc(e,i)}}},b.c.uniqueName.rd=0,b.c.using={init:function(e,t,i,n,a){var r;return i.has("as")&&(r={as:i.get("as"),noChildContext:i.get("noChildContext")}),t=a.createChildContext(t,r),b.Oa(t,e),{controlsDescendantBindings:!0}}},b.h.ea.using=!0,b.c.value={init:function(t,i,n){var a=b.a.R(t),r="input"==a;if(!r||"checkbox"!=t.type&&"radio"!=t.type){var o=[],s=n.get("valueUpdate"),l=!1,u=null;s&&(o="string"==typeof s?[s]:b.a.wc(s),b.a.Pa(o,"change"));var d,c,f=function(){u=null,l=!1;var e=i(),a=b.w.M(t);b.m.eb(e,n,"value",a)};!b.a.W||!r||"text"!=t.type||"off"==t.autocomplete||t.form&&"off"==t.form.autocomplete||-1!=b.a.A(o,"propertychange")||(b.a.B(t,"propertychange",(function(){l=!0})),b.a.B(t,"focus",(function(){l=!1})),b.a.B(t,"blur",(function(){l&&f()}))),b.a.D(o,(function(e){var i=f;b.a.Ud(e,"after")&&(i=function(){u=b.w.M(t),b.a.setTimeout(f,0)},e=e.substring(5)),b.a.B(t,e,i)})),d=r&&"file"==t.type?function(){var n=b.a.f(i());null===n||n===e||""===n?t.value="":b.u.G(f)}:function(){var r=b.a.f(i()),o=b.w.M(t);null!==u&&r===u?b.a.setTimeout(d,0):r===o&&o!==e||("select"===a?(o=n.get("valueAllowUnset"),b.w.cb(t,r,o),o||r===b.w.M(t)||b.u.G(f)):b.w.cb(t,r))},"select"===a?b.i.subscribe(t,b.i.H,(function(){c?n.get("valueAllowUnset")?d():f():(b.a.B(t,"change",f),c=b.o(d,null,{l:t}))}),null,{notifyImmediately:!0}):(b.a.B(t,"change",f),b.o(d,null,{l:t}))}else b.ib(t,{checkedValue:i})},update:function(){}},b.m.wa.value=!0,b.c.visible={update:function(e,t){var i=b.a.f(t()),n="none"!=e.style.display;i&&!n?e.style.display="":!i&&n&&(e.style.display="none")}},b.c.hidden={update:function(e,t){b.c.visible.update(e,(function(){return!b.a.f(t())}))}},function(e){b.c[e]={init:function(t,i,n,a,r){return b.c.event.init.call(this,t,(function(){var t={};return t[e]=i(),t}),n,a,r)}}}("click"),b.ca=function(){},b.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource")},b.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock")},b.ca.prototype.makeTemplateSource=function(e,t){if("string"==typeof e){var n=(t=t||i).getElementById(e);if(!n)throw Error("Cannot find template with ID "+e);return new b.C.F(n)}if(1==e.nodeType||8==e.nodeType)return new b.C.ia(e);throw Error("Unknown template type: "+e)},b.ca.prototype.renderTemplate=function(e,t,i,n){return e=this.makeTemplateSource(e,n),this.renderTemplateSource(e,t,i,n)},b.ca.prototype.isTemplateRewritten=function(e,t){return!1===this.allowTemplateRewriting||this.makeTemplateSource(e,t).data("isRewritten")},b.ca.prototype.rewriteTemplate=function(e,t,i){t=t((e=this.makeTemplateSource(e,i)).text()),e.text(t),e.data("isRewritten",!0)},b.b("templateEngine",b.ca),b.kc=function(){function e(e,t,i,n){e=b.m.ac(e);for(var a=b.m.Ra,r=0;r<e.length;r++){var o=e[r].key;if(Object.prototype.hasOwnProperty.call(a,o)){var s=a[o];if("function"==typeof s){if(o=s(e[r].value))throw Error(o)}else if(!s)throw Error("This template engine does not support the '"+o+"' binding within its templates")}}return i="ko.__tr_ambtns(function($context,$element){return(function(){return{ "+b.m.vb(e,{valueAccessors:!0})+" } })()},'"+i.toLowerCase()+"')",n.createJavaScriptEvaluatorBlock(i)+t}var t=/(<([a-z]+\d*)(?:\s+(?!data-bind\s*=\s*)[a-z0-9\-]+(?:=(?:\"[^\"]*\"|\'[^\']*\'|[^>]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi,i=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{xd:function(e,t,i){t.isTemplateRewritten(e,i)||t.rewriteTemplate(e,(function(e){return b.kc.Ld(e,t)}),i)},Ld:function(n,a){return n.replace(t,(function(t,i,n,r,o){return e(o,i,n,a)})).replace(i,(function(t,i){return e(i,"\x3c!-- ko --\x3e","#comment",a)}))},md:function(e,t){return b.aa.Xb((function(i,n){var a=i.nextSibling;a&&a.nodeName.toLowerCase()===t&&b.ib(a,e,n)}))}}}(),b.b("__tr_ambtns",b.kc.md),function(){b.C={},b.C.F=function(e){if(this.F=e){var t=b.a.R(e);this.ab="script"===t?1:"textarea"===t?2:"template"==t&&e.content&&11===e.content.nodeType?3:4}},b.C.F.prototype.text=function(){var e=1===this.ab?"text":2===this.ab?"value":"innerHTML";if(0==arguments.length)return this.F[e];var t=arguments[0];"innerHTML"===e?b.a.fc(this.F,t):this.F[e]=t};var t=b.a.g.Z()+"_";b.C.F.prototype.data=function(e){if(1===arguments.length)return b.a.g.get(this.F,t+e);b.a.g.set(this.F,t+e,arguments[1])};var i=b.a.g.Z();b.C.F.prototype.nodes=function(){var t=this.F;if(0==arguments.length){var n=b.a.g.get(t,i)||{},a=n.lb||(3===this.ab?t.content:4===this.ab?t:e);if(!a||n.jd){var r=this.text();r&&r!==n.bb&&(a=b.a.Md(r,t.ownerDocument),b.a.g.set(t,i,{lb:a,bb:r,jd:!0}))}return a}n=arguments[0],this.ab!==e&&this.text(""),b.a.g.set(t,i,{lb:n})},b.C.ia=function(e){this.F=e},b.C.ia.prototype=new b.C.F,b.C.ia.prototype.constructor=b.C.ia,b.C.ia.prototype.text=function(){if(0==arguments.length){var t=b.a.g.get(this.F,i)||{};return t.bb===e&&t.lb&&(t.bb=t.lb.innerHTML),t.bb}b.a.g.set(this.F,i,{bb:arguments[0]})},b.b("templateSources",b.C),b.b("templateSources.domElement",b.C.F),b.b("templateSources.anonymousTemplate",b.C.ia)}(),function(){function t(e,t,i){var n;for(t=b.h.nextSibling(t);e&&(n=e)!==t;)i(n,e=b.h.nextSibling(n))}function i(e,i){if(e.length){var n=e[0],a=e[e.length-1],r=n.parentNode,o=b.ga.instance,s=o.preprocessNode;if(s){if(t(n,a,(function(e,t){var i=e.previousSibling,r=s.call(o,e);r&&(e===n&&(n=r[0]||t),e===a&&(a=r[r.length-1]||i))})),e.length=0,!n)return;n===a?e.push(n):(e.push(n,a),b.a.Ua(e,r))}t(n,a,(function(e){1!==e.nodeType&&8!==e.nodeType||b.vc(i,e)})),t(n,a,(function(e){1!==e.nodeType&&8!==e.nodeType||b.aa.cd(e,[i])})),b.a.Ua(e,r)}}function n(e){return e.nodeType?e:0<e.length?e[0]:null}function a(e,t,a,r,s){s=s||{};var l=(e&&n(e)||a||{}).ownerDocument,u=s.templateEngine||o;if(b.kc.xd(a,u,l),"number"!=typeof(a=u.renderTemplate(a,r,s,l)).length||0<a.length&&"number"!=typeof a[0].nodeType)throw Error("Template engine must return an array of DOM nodes");switch(l=!1,t){case"replaceChildren":b.h.va(e,a),l=!0;break;case"replaceNode":b.a.Xc(e,a),l=!0;break;case"ignoreTargetNode":break;default:throw Error("Unknown renderMode: "+t)}return l&&(i(a,r),s.afterRender&&b.u.G(s.afterRender,null,[a,r[s.as||"$data"]]),"replaceChildren"==t&&b.i.ma(e,b.i.H)),a}function r(e,t,i){return b.O(e)?e():"function"==typeof e?e(t,i):e}var o;b.gc=function(t){if(t!=e&&!(t instanceof b.ca))throw Error("templateEngine must inherit from ko.templateEngine");o=t},b.dc=function(t,i,s,l,u){if(((s=s||{}).templateEngine||o)==e)throw Error("Set a template engine before calling renderTemplate");if(u=u||"replaceChildren",l){var d=n(l);return b.$((function(){var e=i&&i instanceof b.fa?i:new b.fa(i,null,null,null,{exportDependencies:!0}),o=r(t,e.$data,e);e=a(l,u,o,e,s),"replaceNode"==u&&(d=n(l=e))}),null,{Sa:function(){return!d||!b.a.Sb(d)},l:d&&"replaceNode"==u?d.parentNode:d})}return b.aa.Xb((function(e){b.dc(t,i,s,e,"replaceNode")}))},b.Qd=function(t,n,o,s,l){function u(e,t){b.u.G(b.a.ec,null,[s,e,c,o,d,t]),b.i.ma(s,b.i.H)}function d(e,t){i(t,f),o.afterRender&&o.afterRender(t,e),f=null}function c(e,i){f=l.createChildContext(e,{as:h,noChildContext:o.noChildContext,extend:function(e){e.$index=i,h&&(e[h+"Index"]=i)}});var n=r(t,e,f);return a(s,"ignoreTargetNode",n,f,o)}var f,h=o.as,p=!1===o.includeDestroyed||b.options.foreachHidesDestroyed&&!o.includeDestroyed;if(p||o.beforeRemove||!b.Pc(n))return b.$((function(){var t=b.a.f(n)||[];void 0===t.length&&(t=[t]),p&&(t=b.a.jb(t,(function(t){return t===e||null===t||!b.a.f(t._destroy)}))),u(t)}),null,{l:s});u(n.v());var m=n.subscribe((function(e){u(n(),e)}),null,"arrayChange");return m.l(s),m};var s=b.a.g.Z(),l=b.a.g.Z();b.c.template={init:function(e,t){var i=b.a.f(t());if("string"==typeof i||"name"in i)b.h.Ea(e);else if("nodes"in i){if(i=i.nodes||[],b.O(i))throw Error('The "nodes" option must be a plain, non-observable array.');var n=i[0]&&i[0].parentNode;n&&b.a.g.get(n,l)||(n=b.a.Yb(i),b.a.g.set(n,l,!0)),new b.C.ia(e).nodes(n)}else{if(!(0<(i=b.h.childNodes(e)).length))throw Error("Anonymous template defined, but no template content was provided");n=b.a.Yb(i),new b.C.ia(e).nodes(n)}return{controlsDescendantBindings:!0}},update:function(t,i,n,a,r){var o=i();n=!0,a=null,"string"==typeof(i=b.a.f(o))?i={}:(o="name"in i?i.name:t,"if"in i&&(n=b.a.f(i.if)),n&&"ifnot"in i&&(n=!b.a.f(i.ifnot)),n&&!o&&(n=!1)),"foreach"in i?a=b.Qd(o,n&&i.foreach||[],i,t,r):n?(n=r,"data"in i&&(n=r.createChildContext(i.data,{as:i.as,noChildContext:i.noChildContext,exportDependencies:!0})),a=b.dc(o,n,i,t)):b.h.Ea(t),r=a,(i=b.a.g.get(t,s))&&"function"==typeof i.s&&i.s(),b.a.g.set(t,s,!r||r.ja&&!r.ja()?e:r)}},b.m.Ra.template=function(e){return 1==(e=b.m.ac(e)).length&&e[0].unknown||b.m.Id(e,"name")?null:"This template engine does not support anonymous templates nested within its templates"},b.h.ea.template=!0}(),b.b("setTemplateEngine",b.gc),b.b("renderTemplate",b.dc),b.a.Kc=function(e,t,i){var n,a,r,o,s;if(e.length&&t.length)for(n=a=0;(!i||n<i)&&(o=e[a]);++a){for(r=0;s=t[r];++r)if(o.value===s.value){o.moved=s.index,s.moved=o.index,t.splice(r,1),n=r=0;break}n+=r}},b.a.Pb=function(){function e(e,t,i,n,a){var r,o,s,l,u,d=Math.min,c=Math.max,f=[],h=e.length,p=t.length,m=p-h||1,_=h+p+1;for(r=0;r<=h;r++)for(l=s,f.push(s=[]),u=d(p,r+m),o=c(0,r-1);o<=u;o++)s[o]=o?r?e[r-1]===t[o-1]?l[o-1]:d(l[o]||_,s[o-1]||_)+1:o+1:r+1;for(d=[],c=[],m=[],r=h,o=p;r||o;)p=f[r][o]-1,o&&p===f[r][o-1]?c.push(d[d.length]={status:i,value:t[--o],index:o}):r&&p===f[r-1][o]?m.push(d[d.length]={status:n,value:e[--r],index:r}):(--o,--r,a.sparse||d.push({status:"retained",value:t[o]}));return b.a.Kc(m,c,!a.dontLimitMoves&&10*h),d.reverse()}return function(t,i,n){return n="boolean"==typeof n?{dontLimitMoves:n}:n||{},i=i||[],(t=t||[]).length<i.length?e(t,i,"added","deleted",n):e(i,t,"deleted","added",n)}}(),b.b("utils.compareArrays",b.a.Pb),function(){function t(t,i,n,a,r){var o=[],s=b.$((function(){var e=i(n,r,b.a.Ua(o,t))||[];0<o.length&&(b.a.Xc(o,e),a&&b.u.G(a,null,[n,e,r])),o.length=0,b.a.Nb(o,e)}),null,{l:t,Sa:function(){return!b.a.kd(o)}});return{Y:o,$:s.ja()?s:e}}var i=b.a.g.Z(),n=b.a.g.Z();b.a.ec=function(a,r,o,s,l,u){function d(e){h={Aa:e,pb:b.ta(O++)},y.push(h),v||C.push(h)}function c(e){h=g[e],O!==h.pb.v()&&E.push(h),h.pb(O++),b.a.Ua(h.Y,a),y.push(h)}function f(e,t){if(e)for(var i=0,n=t.length;i<n;i++)b.a.D(t[i].Y,(function(n){e(n,i,t[i].Aa)}))}void 0===(r=r||[]).length&&(r=[r]),s=s||{};var h,p,m,_,g=b.a.g.get(a,i),v=!g,y=[],w=0,O=0,x=[],A=[],T=[],E=[],C=[],S=0;if(v)b.a.D(r,d);else{if(!u||g&&g._countWaitingForRemove){var M=b.a.Mb(g,(function(e){return e.Aa}));u=b.a.Pb(M,r,{dontLimitMoves:s.dontLimitMoves,sparse:!0})}var D,P,I;for(M=0;D=u[M];M++)switch(P=D.moved,I=D.index,D.status){case"deleted":for(;w<I;)c(w++);P===e&&((h=g[w]).$&&(h.$.s(),h.$=e),b.a.Ua(h.Y,a).length&&(s.beforeRemove&&(y.push(h),S++,h.Aa===n?h=null:T.push(h)),h&&x.push.apply(x,h.Y))),w++;break;case"added":for(;O<I;)c(w++);P!==e?(A.push(y.length),c(P)):d(D.value)}for(;O<r.length;)c(w++);y._countWaitingForRemove=S}b.a.g.set(a,i,y),f(s.beforeMove,E),b.a.D(x,s.beforeRemove?b.oa:b.removeNode);try{_=a.ownerDocument.activeElement}catch(e){}if(A.length)for(;(M=A.shift())!=e;){for(h=y[M],p=e;M;)if((m=y[--M].Y)&&m.length){p=m[m.length-1];break}for(r=0;w=h.Y[r];p=w,r++)b.h.Wb(a,w,p)}for(M=0;h=y[M];M++){for(h.Y||b.a.extend(h,t(a,o,h.Aa,l,h.pb)),r=0;w=h.Y[r];p=w,r++)b.h.Wb(a,w,p);!h.Ed&&l&&(l(h.Aa,h.Y,h.pb),h.Ed=!0,p=h.Y[h.Y.length-1])}for(_&&a.ownerDocument.activeElement!=_&&_.focus(),f(s.beforeRemove,T),M=0;M<T.length;++M)T[M].Aa=n;f(s.afterMove,E),f(s.afterAdd,C)}}(),b.b("utils.setDomNodeChildrenFromArrayMapping",b.a.ec),b.ba=function(){this.allowTemplateRewriting=!1},b.ba.prototype=new b.ca,b.ba.prototype.constructor=b.ba,b.ba.prototype.renderTemplateSource=function(e,t,i,n){return(t=9>b.a.W||!e.nodes?null:e.nodes())?b.a.la(t.cloneNode(!0).childNodes):(e=e.text(),b.a.ua(e,n))},b.ba.Ma=new b.ba,b.gc(b.ba.Ma),b.b("nativeTemplateEngine",b.ba),function(){b.$a=function(){var e=this.Hd=function(){if(!a||!a.tmpl)return 0;try{if(0<=a.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(e){}return 1}();this.renderTemplateSource=function(t,n,r,o){if(o=o||i,r=r||{},2>e)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var s=t.data("precompiled");return s||(s=t.text()||"",s=a.template(null,"{{ko_with $item.koBindingContext}}"+s+"{{/ko_with}}"),t.data("precompiled",s)),t=[n.$data],n=a.extend({koBindingContext:n},r.templateOptions),(n=a.tmpl(s,t,n)).appendTo(o.createElement("div")),a.fragments={},n},this.createJavaScriptEvaluatorBlock=function(e){return"{{ko_code ((function() { return "+e+" })()) }}"},this.addTemplate=function(e,t){i.write("<script type='text/html' id='"+e+"'>"+t+"<\/script>")},0<e&&(a.tmpl.tag.ko_code={open:"__.push($1 || '');"},a.tmpl.tag.ko_with={open:"with($1) {",close:"} "})},b.$a.prototype=new b.ca,b.$a.prototype.constructor=b.$a;var e=new b.$a;0<e.Hd&&b.gc(e),b.b("jqueryTmplTemplateEngine",b.$a)}()}))}();var n=ko;"undefined"!=typeof window?(ko=window.ko,void 0!==i?window.ko=i:delete window.ko):(ko=e.ko,void 0!==i?e.ko=i:delete e.ko),t.a=n}).call(this,i(417))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(99),a=i(19),r=i(6),o=function(){function e(e){this.shouldUpdate=!0,this.classType=this.constructor.name,this.id=e&&e.id?e.id:n.default()}return e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){return this.destroyForward(),a.default(this)},e.prototype.update=function(e,t){void 0===t&&(t=r.default.IDENTITY.clone()),this.shouldUpdate&&this.updateForward(e,t)},e}();t.default=o},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(27),u=i(6),d=i(239),c=i(198),f=i(2),h=i(324),p=i(974),m=i(546),_=i(12),g=i(3),v=i(64),y=i(43),b=i(185),w=i(53),O=i(143),x=i(300),A=new u.default,T=(new u.default,new u.default,new u.default,new u.default,new o.default),E=new o.default(1,1,1),C=new u.default,S=new l.default,M=(new l.default,new l.default,new c.default,new o.default),D={modelConfig:{url:"data/satellite/scene.gltf",initialMatrix:u.default.IDENTITY},billboardConfig:{image:"data/billboard64.gif"},pointConfig:{color:s.default.WHITE},labelConfig:{text:"Satellite"},referenceType:m.default.VVLH},P={width:1,color:s.default.RED,sampleLength:1e3},I=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,r(r({},D),t),i)||this;return n.faceSunNodes=[],n.sampledColorProperty=new d.default(s.default),n.sampledNodeRotationProperty=new d.default(l.default),n.pointTrajectoryPolylines=[],n.pointTrajectoryPositions=[],n.pointTrajectoryEnabled=f.default(t.pointTrajectoryEnabled,!1),n.pointTrajectoryConfig=r(r({},P),t.pointTrajectoryConfig),n}return a(t,e),Object.defineProperty(t.prototype,"modelBoundingSphere",{get:function(){try{return this.model.boundingSphere}catch(e){return}},enumerable:!1,configurable:!0}),t.prototype.addNodeRotationSample=function(e,t){this.sampledNodeRotationProperty.addSample(e,t)},t.prototype.updateForward=function(t){var i=this;if(e.prototype.updateForward.call(this,t),this.model&&this.model.ready&&this.faceSunNodes.length>0){u.default.inverse(this.model.modelMatrix,C);var n=this.getViewer().cesiumViewer.scene.context.uniformState.sunPositionWC;this.faceSunNodes.forEach((function(e){var t=i.model.getNode(e.nodeName);if(t&&e.enable){var a=new o.default(e.rotateAxis.x,e.rotateAxis.y,e.rotateAxis.z);o.default.normalize(a,a);var r=new o.default(e.faceVector.x,e.faceVector.y,e.faceVector.z);o.default.normalize(r,r);var s=o.default.dot(a,r);if(!(Math.abs(s)<.999999))throw new g.default("卫星帆板旋转轴向量与帆板朝向向量平行,无法计算朝向");u.default.multiplyByPoint(C,n,M),o.default.normalize(M,M),o.default.fromElements(M.y,M.z,M.x,M);var l=i.projectedVector(a),d=_.default.multiplyByVector(l,M,new o.default);o.default.normalize(d,d);var c=_.default.multiplyByVector(l,r,new o.default);h.default.calculateQuaternionFromV1ToV2(c,d,S),u.default.getTranslation(t.originalMatrix,T),u.default.fromTranslationQuaternionRotationScale(T,S,E,A),t.matrix=A}}))}if(this.enabled&&this.pointTrajectoryEnabled){var a,r=this.pointTrajectoryPositions.length,s=void 0,l=void 0,d=void 0;if(a=x.default.cartesian3ToWgs84(this.position),s=x.default.wgs84ToCartesian3(a.lon,a.lat,0),this.pointTrajectoryPositions[r-1]&&(l=x.default.cartesian3ToWgs84(this.pointTrajectoryPositions[r-1]),d=x.default.wgs84ToCartesian3(l.lon,l.lat,0)),s.equals(d))return;if(r<2)this.pointTrajectoryPositions.push(s);else if(this.pointTrajectoryPositions.push(s),r>this.pointTrajectoryConfig.sampleLength)this.pointTrajectoryPositions=this.pointTrajectoryPositions.slice(-2),this.createPointTrajectory();else{var c=this.pointTrajectoryPolylines[this.pointTrajectoryPolylines.length-1];this.pointTrajectoryPolylines.pop(),this.parent.polylines.remove(c),this.createPointTrajectory()}}else this.pointTrajectoryPolylines.forEach((function(e){return i.parent.polylines.remove(e)})),this.pointTrajectoryPolylines.length=0,this.pointTrajectoryPositions.length=0},t.prototype.createPointTrajectory=function(){var e=new y.default({geometry:new b.default({positions:this.pointTrajectoryPositions,width:this.pointTrajectoryConfig.width}),attributes:{color:w.default.fromColor(this.pointTrajectoryConfig.color)}}),t=new v.default({geometryInstances:e,asynchronous:!1,appearance:new O.default({translucent:!0})});this.pointTrajectoryPolylines.push(t),this.parent.polylines.add(t)},t.prototype.projectedVector=function(e){return new _.default(1-e.x*e.x,-e.x*e.y,-e.x*e.z,-e.x*e.y,1-e.y*e.y,-e.y*e.z,-e.x*e.z,-e.y*e.z,1-e.z*e.z)},t.prototype.clone=function(){var e=this.id+"_cloned",i=new t(r(r({},this.options),{id:e}),this.performanceMode);return this.children.values.forEach((function(e){var t=e.clone();t&&i.add(t)})),i},t.prototype.addColorSample=function(e,t){this.sampledColorProperty.addSample(e,t)},t}(p.default);t.default=I},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.updateForward=function(e,t){},t}(i(390).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(98),u=i(27),d=i(6),c=i(198),f=i(974),h=(new d.default,new o.default(1,1,1),new d.default,new u.default,new c.default,new o.default,{modelConfig:{url:"data/satellite/scene.gltf"},billboardConfig:{image:"data/billboard64.gif"},pointConfig:{color:s.default.WHITE},labelConfig:{text:"Satellite"}}),p=function(e){function t(t,i){return void 0===t&&(t=h),void 0===i&&(i=!0),e.call(this,r(r({},t),{reference:l.default.FIXED}),i)||this}return a(t,e),t.prototype.clone=function(){var e=this.id+"_cloned",i=new t(r(r({},this.options),{id:e}),this.performanceMode);return this.children.values.forEach((function(e){var t=e.clone();t&&i.add(t)})),i},t}(f.default);t.default=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),this.yaw=e,this.pitch=t,this.roll=i};t.default=n},function(e,t,i){"use strict";i.r(t);var n=i(0),a=i(3),r=i(24),o=i(211),s=i(304),l=i(219);function u(e){this._name=e,this._clock=void 0,this._changed=new r.default,this._error=new r.default,this._isLoading=!1,this._loading=new r.default,this._entityCollection=new l.a(this),this._entityCluster=new s.a}Object.defineProperties(u.prototype,{name:{get:function(){return this._name},set:function(e){this._name!==e&&(this._name=e,this._changed.raiseEvent(this))}},clock:{get:function(){return this._clock},set:function(e){this._clock!==e&&(this._clock=e,this._changed.raiseEvent(this))}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading},set:function(e){o.a.setLoading(this,e)}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!Object(n.default)(e))throw new a.default("value must be defined.");this._entityCluster=e}}}),u.prototype.update=function(e){return!0},t.default=u},function(e,t,i){"use strict";i.r(t);var n=i(54),a=i(1),r=i(7),o=i(2),s=i(0),l=i(19),u=i(43),d=i(6),c=i(185),f=i(143),h=i(64);function p(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),this.length=Object(o.default)(e.length,1e7),this._length=void 0,this.width=Object(o.default)(e.width,2),this._width=void 0,this.show=Object(o.default)(e.show,!0),this.modelMatrix=d.default.clone(Object(o.default)(e.modelMatrix,d.default.IDENTITY)),this._modelMatrix=new d.default,this.id=e.id,this._id=void 0,this._primitive=void 0}p.prototype.update=function(e){if(this.show){if(!Object(s.default)(this._primitive)||!d.default.equals(this._modelMatrix,this.modelMatrix)||this._length!==this.length||this._width!==this.width||this._id!==this.id){this._modelMatrix=d.default.clone(this.modelMatrix,this._modelMatrix),this._length=this.length,this._width=this.width,this._id=this.id,Object(s.default)(this._primitive)&&this._primitive.destroy(),0===this.modelMatrix[12]&&0===this.modelMatrix[13]&&0===this.modelMatrix[14]&&(this.modelMatrix[14]=.01);var t=new u.default({geometry:new c.default({positions:[a.default.ZERO,a.default.UNIT_X],width:this.width,vertexFormat:f.default.VERTEX_FORMAT,colors:[r.default.RED,r.default.RED],arcType:n.default.NONE}),modelMatrix:d.default.multiplyByUniformScale(this.modelMatrix,this.length,new d.default),id:this.id,pickPrimitive:this}),i=new u.default({geometry:new c.default({positions:[a.default.ZERO,a.default.UNIT_Y],width:this.width,vertexFormat:f.default.VERTEX_FORMAT,colors:[r.default.GREEN,r.default.GREEN],arcType:n.default.NONE}),modelMatrix:d.default.multiplyByUniformScale(this.modelMatrix,this.length,new d.default),id:this.id,pickPrimitive:this}),o=new u.default({geometry:new c.default({positions:[a.default.ZERO,a.default.UNIT_Z],width:this.width,vertexFormat:f.default.VERTEX_FORMAT,colors:[r.default.BLUE,r.default.BLUE],arcType:n.default.NONE}),modelMatrix:d.default.multiplyByUniformScale(this.modelMatrix,this.length,new d.default),id:this.id,pickPrimitive:this});this._primitive=new h.default({geometryInstances:[t,i,o],appearance:new f.default,asynchronous:!1})}this._primitive.update(e)}},p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Object(l.default)(this)},t.default=p},function(e,t,i){"use strict";i.r(t);var n=i(77),a=i(1),r=i(307),o=i(2),s=i(0),l=i(19),u=i(3),d=i(15),c=i(59),f=i(333),h=i(478),p=i(222),m=i(372),_=i(742),g=i(756),v=i(761),y=i(13),b=i(86),w=i(822),O=i(823),x=i(827),A=i(92);function T(e){return Object(n.a)("Assets/Textures/SkyBox/tycho2t3_80_"+e+".jpg")}function E(e){var t=e._useBrowserRecommendedResolution?1:window.devicePixelRatio;return t*=e._resolutionScale,Object(s.default)(e._scene)&&(e._scene.pixelRatio=t),t}function C(e){var t=e._canvas,i=t.clientWidth,n=t.clientHeight,a=E(e);e._canvasClientWidth=i,e._canvasClientHeight=n,i*=a,n*=a,t.width=i,t.height=n,e._canRender=0!==i&&0!==n,e._lastDevicePixelRatio=window.devicePixelRatio}function S(e){var t=e._canvas,i=t.width,n=t.height;if(0!==i&&0!==n){var a=e._scene.camera.frustum;Object(s.default)(a.aspectRatio)?a.aspectRatio=i/n:(a.top=a.right*(n/i),a.bottom=-a.top)}}function M(e,t){if(!Object(s.default)(e))throw new u.default("container is required.");e=Object(A.a)(e),t=Object(o.default)(t,o.default.EMPTY_OBJECT);var i=document.createElement("div");i.className="cesium-widget",e.appendChild(i);var n=document.createElement("canvas"),l=c.a.supportsImageRenderingPixelated();function f(){n!==n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()}this._supportsImageRenderingPixelated=l,l&&(n.style.imageRendering=c.a.imageRenderingValue()),n.oncontextmenu=function(){return!1},n.onselectstart=function(){return!1},n.addEventListener("mousedown",f),n.addEventListener("pointerdown",f),i.appendChild(n);var h=document.createElement("div");h.className="cesium-widget-credits";var M=Object(s.default)(t.creditContainer)?Object(A.a)(t.creditContainer):i;M.appendChild(h);var D=Object(s.default)(t.creditViewport)?Object(A.a)(t.creditViewport):i,P=Object(o.default)(t.showRenderLoopErrors,!0),I=Object(o.default)(t.useBrowserRecommendedResolution,!0);this._element=i,this._container=e,this._canvas=n,this._canvasClientWidth=0,this._canvasClientHeight=0,this._lastDevicePixelRatio=0,this._creditViewport=D,this._creditContainer=M,this._innerCreditContainer=h,this._canRender=!1,this._renderLoopRunning=!1,this._showRenderLoopErrors=P,this._resolutionScale=1,this._useBrowserRecommendedResolution=I,this._forceResize=!1,this._clock=Object(s.default)(t.clock)?t.clock:new r.a,C(this);try{var L=new v.a({canvas:n,contextOptions:t.contextOptions,creditContainer:h,creditViewport:D,mapProjection:t.mapProjection,orderIndependentTranslucency:t.orderIndependentTranslucency,scene3DOnly:Object(o.default)(t.scene3DOnly,!1),shadows:t.shadows,mapMode2D:t.mapMode2D,requestRenderMode:t.requestRenderMode,maximumRenderTimeChange:t.maximumRenderTimeChange});this._scene=L,L.camera.constrainedAxis=a.default.UNIT_Z,E(this),S(this);var j=Object(o.default)(L.mapProjection.ellipsoid,d.default.WGS84),R=t.globe;Object(s.default)(R)||(R=new _.a(j)),!1!==R&&(L.globe=R,L.globe.shadows=Object(o.default)(t.terrainShadows,b.a.RECEIVE_ONLY));var N=t.skyBox;Object(s.default)(N)||(N=new O.a({sources:{positiveX:T("px"),negativeX:T("mx"),positiveY:T("py"),negativeY:T("my"),positiveZ:T("pz"),negativeZ:T("mz")}})),!1!==N&&(L.skyBox=N,L.sun=new x.a,L.moon=new g.a);var B=t.skyAtmosphere;Object(s.default)(B)||(B=new w.a(j)),!1!==B&&(L.skyAtmosphere=B);var F=!1!==t.globe&&t.imageryProvider;Object(s.default)(F)||(F=Object(m.a)()),!1!==F&&L.imageryLayers.addImageryProvider(F),Object(s.default)(t.terrainProvider)&&!1!==t.globe&&(L.terrainProvider=t.terrainProvider),this._screenSpaceEventHandler=new p.default(n),Object(s.default)(t.sceneMode)&&(t.sceneMode===y.default.SCENE2D&&this._scene.morphTo2D(0),t.sceneMode===y.default.COLUMBUS_VIEW&&this._scene.morphToColumbusView(0)),this._useDefaultRenderLoop=void 0,this.useDefaultRenderLoop=Object(o.default)(t.useDefaultRenderLoop,!0),this._targetFrameRate=void 0,this.targetFrameRate=t.targetFrameRate;var k=this;this._onRenderError=function(e,t){if(k._useDefaultRenderLoop=!1,k._renderLoopRunning=!1,k._showRenderLoopErrors){k.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}},L.renderError.addEventListener(this._onRenderError)}catch(e){if(P){this.showErrorPanel("Error constructing CesiumWidget.",'Visit <a href="http://get.webgl.org">http://get.webgl.org</a> to verify that your web browser and hardware support WebGL. Consider trying a different web browser or updating your video drivers. Detailed error information is below:',e)}throw e}}Object.defineProperties(M.prototype,{container:{get:function(){return this._container}},canvas:{get:function(){return this._canvas}},creditContainer:{get:function(){return this._creditContainer}},creditViewport:{get:function(){return this._creditViewport}},scene:{get:function(){return this._scene}},imageryLayers:{get:function(){return this._scene.imageryLayers}},terrainProvider:{get:function(){return this._scene.terrainProvider},set:function(e){this._scene.terrainProvider=e}},camera:{get:function(){return this._scene.camera}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._targetFrameRate},set:function(e){if(e<=0)throw new u.default("targetFrameRate must be greater than 0, or undefined.");this._targetFrameRate=e}},useDefaultRenderLoop:{get:function(){return this._useDefaultRenderLoop},set:function(e){this._useDefaultRenderLoop!==e&&(this._useDefaultRenderLoop=e,e&&!this._renderLoopRunning&&function(e){e._renderLoopRunning=!0;var t=0;Object(h.a)((function i(n){if(!e.isDestroyed())if(e._useDefaultRenderLoop)try{var a=e._targetFrameRate;if(Object(s.default)(a)){var r=1e3/a,o=n-t;o>r&&(e.resize(),e.render(),t=n-o%r),Object(h.a)(i)}else e.resize(),e.render(),Object(h.a)(i)}catch(t){if(e._useDefaultRenderLoop=!1,e._renderLoopRunning=!1,e._showRenderLoopErrors){e.showErrorPanel("An error occurred while rendering. Rendering has stopped.",void 0,t)}}else e._renderLoopRunning=!1}))}(this))}},resolutionScale:{get:function(){return this._resolutionScale},set:function(e){if(e<=0)throw new u.default("resolutionScale must be greater than 0.");this._resolutionScale!==e&&(this._resolutionScale=e,this._forceResize=!0)}},useBrowserRecommendedResolution:{get:function(){return this._useBrowserRecommendedResolution},set:function(e){this._useBrowserRecommendedResolution!==e&&(this._useBrowserRecommendedResolution=e,this._forceResize=!0)}}}),M.prototype.showErrorPanel=function(e,t,i){var n=this._element,a=document.createElement("div");a.className="cesium-widget-errorPanel";var r=document.createElement("div");r.className="cesium-widget-errorPanel-content",a.appendChild(r);var o=document.createElement("div");o.className="cesium-widget-errorPanel-header",o.appendChild(document.createTextNode(e)),r.appendChild(o);var l=document.createElement("div");function u(){l.style.maxHeight=Math.max(Math.round(.9*n.clientHeight-100),30)+"px"}l.className="cesium-widget-errorPanel-scroll",r.appendChild(l),u(),Object(s.default)(window.addEventListener)&&window.addEventListener("resize",u,!1);var d=Object(s.default)(t),c=Object(s.default)(i);if(d||c){var h=document.createElement("div");if(h.className="cesium-widget-errorPanel-message",l.appendChild(h),c){var p=Object(f.a)(i);d||("string"==typeof i&&(i=new Error(i)),t=Object(f.a)({name:i.name,message:i.message}),p=i.stack),"undefined"!=typeof console&&console.error(e+"\n"+t+"\n"+p);var m=document.createElement("div");m.className="cesium-widget-errorPanel-message-details collapsed";var _=document.createElement("span");_.className="cesium-widget-errorPanel-more-details",_.appendChild(document.createTextNode("See more...")),m.appendChild(_),m.onclick=function(e){m.removeChild(_),m.appendChild(document.createTextNode(p)),m.className="cesium-widget-errorPanel-message-details",r.className="cesium-widget-errorPanel-content expanded",m.onclick=void 0},l.appendChild(m)}h.innerHTML="<p>"+t+"</p>"}var g=document.createElement("div");g.className="cesium-widget-errorPanel-buttonPanel",r.appendChild(g);var v=document.createElement("button");v.setAttribute("type","button"),v.className="cesium-button",v.appendChild(document.createTextNode("OK")),v.onclick=function(){Object(s.default)(u)&&Object(s.default)(window.removeEventListener)&&window.removeEventListener("resize",u,!1),n.removeChild(a)},g.appendChild(v),n.appendChild(a)},M.prototype.isDestroyed=function(){return!1},M.prototype.destroy=function(){Object(s.default)(this._scene)&&(this._scene.renderError.removeEventListener(this._onRenderError),this._scene=this._scene.destroy()),this._container.removeChild(this._element),this._creditContainer.removeChild(this._innerCreditContainer),Object(l.default)(this)},M.prototype.resize=function(){var e=this._canvas;(this._forceResize||this._canvasClientWidth!==e.clientWidth||this._canvasClientHeight!==e.clientHeight||this._lastDevicePixelRatio!==window.devicePixelRatio)&&(this._forceResize=!1,C(this),S(this),this._scene.requestRender())},M.prototype.render=function(){if(this._canRender){this._scene.initializeFrame();var e=this._clock.tick();this._scene.render(e)}else this._clock.tick()},t.default=M},function(e,t,i){"use strict";i.r(t);var n=i(68),a=i(17),r=i(8),o=i(1),s=i(11),l=i(453),u=i(2),d=i(0),c=i(3),f=i(46),h=i(28),p=i(82),m=i(71),_=i(38),g=i(5),v=i(35),y=i(29),b=new r.default,w=new o.default,O=new o.default,x=new o.default,A=new o.default;function T(e){var t=(e=Object(u.default)(e,u.default.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,a=Object(u.default)(e.vertexFormat,y.a.DEFAULT),r=Object(u.default)(e.slices,128);if(!Object(d.default)(t))throw new c.default("options.length must be defined.");if(!Object(d.default)(i))throw new c.default("options.topRadius must be defined.");if(!Object(d.default)(n))throw new c.default("options.bottomRadius must be defined.");if(r<3)throw new c.default("options.slices must be greater than or equal to 3.");if(Object(d.default)(e.offsetAttribute)&&e.offsetAttribute===m.a.TOP)throw new c.default("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._vertexFormat=y.a.clone(a),this._slices=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderGeometry"}T.packedLength=y.a.packedLength+5,T.pack=function(e,t,i){if(!Object(d.default)(e))throw new c.default("value is required");if(!Object(d.default)(t))throw new c.default("array is required");return i=Object(u.default)(i,0),y.a.pack(e._vertexFormat,t,i),i+=y.a.packedLength,t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i]=Object(u.default)(e._offsetAttribute,-1),t};var E,C=new y.a,S={vertexFormat:C,length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,offsetAttribute:void 0};T.unpack=function(e,t,i){if(!Object(d.default)(e))throw new c.default("array is required");t=Object(u.default)(t,0);var n=y.a.unpack(e,t,C);t+=y.a.packedLength;var a=e[t++],r=e[t++],o=e[t++],s=e[t++],l=e[t];return Object(d.default)(i)?(i._vertexFormat=y.a.clone(n,i._vertexFormat),i._length=a,i._topRadius=r,i._bottomRadius=o,i._slices=s,i._offsetAttribute=-1===l?void 0:l,i):(S.length=a,S.topRadius=r,S.bottomRadius=o,S.slices=s,S.offsetAttribute=-1===l?void 0:l,new T(S))},T.createGeometry=function(e){var t=e._length,i=e._topRadius,u=e._bottomRadius,c=e._vertexFormat,y=e._slices;if(!(t<=0||i<0||u<0||0===i&&0===u)){var T,E=y+y,C=y+E,S=E+E,M=l.a.computePositions(t,i,u,y,!0),D=c.st?new Float32Array(2*S):void 0,P=c.normal?new Float32Array(3*S):void 0,I=c.tangent?new Float32Array(3*S):void 0,L=c.bitangent?new Float32Array(3*S):void 0,j=c.normal||c.tangent||c.bitangent;if(j){var R=c.tangent||c.bitangent,N=0,B=0,F=0,k=Math.atan2(u-i,t),z=w;z.z=Math.sin(k);var U=Math.cos(k),V=x,H=O;for(T=0;T<y;T++){var G=T/y*g.default.TWO_PI,Y=U*Math.cos(G),W=U*Math.sin(G);j&&(z.x=Y,z.y=W,R&&(V=o.default.normalize(o.default.cross(o.default.UNIT_Z,z,V),V)),c.normal&&(P[N++]=z.x,P[N++]=z.y,P[N++]=z.z,P[N++]=z.x,P[N++]=z.y,P[N++]=z.z),c.tangent&&(I[B++]=V.x,I[B++]=V.y,I[B++]=V.z,I[B++]=V.x,I[B++]=V.y,I[B++]=V.z),c.bitangent&&(H=o.default.normalize(o.default.cross(z,V,H),H),L[F++]=H.x,L[F++]=H.y,L[F++]=H.z,L[F++]=H.x,L[F++]=H.y,L[F++]=H.z))}for(T=0;T<y;T++)c.normal&&(P[N++]=0,P[N++]=0,P[N++]=-1),c.tangent&&(I[B++]=1,I[B++]=0,I[B++]=0),c.bitangent&&(L[F++]=0,L[F++]=-1,L[F++]=0);for(T=0;T<y;T++)c.normal&&(P[N++]=0,P[N++]=0,P[N++]=1),c.tangent&&(I[B++]=1,I[B++]=0,I[B++]=0),c.bitangent&&(L[F++]=0,L[F++]=1,L[F++]=0)}var q=12*y-12,X=_.a.createTypedArray(S,q),K=0,J=0;for(T=0;T<y-1;T++)X[K++]=J,X[K++]=J+2,X[K++]=J+3,X[K++]=J,X[K++]=J+3,X[K++]=J+1,J+=2;for(X[K++]=E-2,X[K++]=0,X[K++]=1,X[K++]=E-2,X[K++]=1,X[K++]=E-1,T=1;T<y-1;T++)X[K++]=E+T+1,X[K++]=E+T,X[K++]=E;for(T=1;T<y-1;T++)X[K++]=C,X[K++]=C+T,X[K++]=C+T+1;var Z=0;if(c.st){var Q=Math.max(i,u);for(T=0;T<S;T++){var $=o.default.fromArray(M,3*T,A);D[Z++]=($.x+Q)/(2*Q),D[Z++]=($.y+Q)/(2*Q)}}var ee=new p.a;c.position&&(ee.position=new h.default({componentDatatype:s.default.DOUBLE,componentsPerAttribute:3,values:M})),c.normal&&(ee.normal=new h.default({componentDatatype:s.default.FLOAT,componentsPerAttribute:3,values:P})),c.tangent&&(ee.tangent=new h.default({componentDatatype:s.default.FLOAT,componentsPerAttribute:3,values:I})),c.bitangent&&(ee.bitangent=new h.default({componentDatatype:s.default.FLOAT,componentsPerAttribute:3,values:L})),c.st&&(ee.st=new h.default({componentDatatype:s.default.FLOAT,componentsPerAttribute:2,values:D})),b.x=.5*t,b.y=Math.max(u,i);var te=new a.default(o.default.ZERO,r.default.magnitude(b));if(Object(d.default)(e._offsetAttribute)){t=M.length;var ie=new Uint8Array(t/3),ne=e._offsetAttribute===m.a.NONE?0:1;Object(n.a)(ie,ne),ee.applyOffset=new h.default({componentDatatype:s.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:ie})}return new f.default({attributes:ee,indices:X,primitiveType:v.default.TRIANGLES,boundingSphere:te,offsetAttribute:e._offsetAttribute})}},T.getUnitCylinder=function(){return Object(d.default)(E)||(E=T.createGeometry(new T({topRadius:1,bottomRadius:1,length:1,vertexFormat:y.a.POSITION_ONLY}))),E},t.default=T},function(e,t,i){"use strict";i.r(t);var n=i(68),a=i(17),r=i(8),o=i(1),s=i(4),l=i(11),u=i(453),d=i(2),c=i(0),f=i(3),h=i(46),p=i(28),m=i(82),_=i(71),g=i(38),v=i(35),y=new r.default;function b(e){var t=(e=Object(d.default)(e,d.default.EMPTY_OBJECT)).length,i=e.topRadius,n=e.bottomRadius,a=Object(d.default)(e.slices,128),r=Math.max(Object(d.default)(e.numberOfVerticalLines,16),0);if(s.a.typeOf.number("options.positions",t),s.a.typeOf.number("options.topRadius",i),s.a.typeOf.number("options.bottomRadius",n),s.a.typeOf.number.greaterThanOrEquals("options.slices",a,3),Object(c.default)(e.offsetAttribute)&&e.offsetAttribute===_.a.TOP)throw new f.default("GeometryOffsetAttribute.TOP is not a supported options.offsetAttribute for this geometry.");this._length=t,this._topRadius=i,this._bottomRadius=n,this._slices=a,this._numberOfVerticalLines=r,this._offsetAttribute=e.offsetAttribute,this._workerName="createCylinderOutlineGeometry"}b.packedLength=6,b.pack=function(e,t,i){return s.a.typeOf.object("value",e),s.a.defined("array",t),i=Object(d.default)(i,0),t[i++]=e._length,t[i++]=e._topRadius,t[i++]=e._bottomRadius,t[i++]=e._slices,t[i++]=e._numberOfVerticalLines,t[i]=Object(d.default)(e._offsetAttribute,-1),t};var w={length:void 0,topRadius:void 0,bottomRadius:void 0,slices:void 0,numberOfVerticalLines:void 0,offsetAttribute:void 0};b.unpack=function(e,t,i){s.a.defined("array",e),t=Object(d.default)(t,0);var n=e[t++],a=e[t++],r=e[t++],o=e[t++],l=e[t++],u=e[t];return Object(c.default)(i)?(i._length=n,i._topRadius=a,i._bottomRadius=r,i._slices=o,i._numberOfVerticalLines=l,i._offsetAttribute=-1===u?void 0:u,i):(w.length=n,w.topRadius=a,w.bottomRadius=r,w.slices=o,w.numberOfVerticalLines=l,w.offsetAttribute=-1===u?void 0:u,new b(w))},b.createGeometry=function(e){var t=e._length,i=e._topRadius,s=e._bottomRadius,d=e._slices,f=e._numberOfVerticalLines;if(!(t<=0||i<0||s<0||0===i&&0===s)){var b,w=2*d,O=u.a.computePositions(t,i,s,d,!1),x=2*d;if(f>0){var A=Math.min(f,d);b=Math.round(d/A),x+=A}var T,E=g.a.createTypedArray(w,2*x),C=0;for(T=0;T<d-1;T++)E[C++]=T,E[C++]=T+1,E[C++]=T+d,E[C++]=T+1+d;if(E[C++]=d-1,E[C++]=0,E[C++]=d+d-1,E[C++]=d,f>0)for(T=0;T<d;T+=b)E[C++]=T,E[C++]=T+d;var S=new m.a;S.position=new p.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:O}),y.x=.5*t,y.y=Math.max(s,i);var M=new a.default(o.default.ZERO,r.default.magnitude(y));if(Object(c.default)(e._offsetAttribute)){t=O.length;var D=new Uint8Array(t/3),P=e._offsetAttribute===_.a.NONE?0:1;Object(n.a)(D,P),S.applyOffset=new p.default({componentDatatype:l.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:D})}return new h.default({attributes:S,indices:E,primitiveType:v.default.LINES,boundingSphere:M,offsetAttribute:e._offsetAttribute})}},t.default=b},function(e,t,i){"use strict";i.r(t);var n=i(17),a=i(1),r=i(4),o=i(11),s=i(2),l=i(0),u=i(46),d=i(28),c=i(82),f=i(35),h=i(29);function p(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT);var t=Object(s.default)(e.vertexFormat,h.a.DEFAULT);this._vertexFormat=t,this._workerName="createPlaneGeometry"}p.packedLength=h.a.packedLength,p.pack=function(e,t,i){return r.a.typeOf.object("value",e),r.a.defined("array",t),i=Object(s.default)(i,0),h.a.pack(e._vertexFormat,t,i),t};var m=new h.a,_={vertexFormat:m};p.unpack=function(e,t,i){r.a.defined("array",e),t=Object(s.default)(t,0);var n=h.a.unpack(e,t,m);return Object(l.default)(i)?(i._vertexFormat=h.a.clone(n,i._vertexFormat),i):new p(_)};var g=new a.default(-.5,-.5,0),v=new a.default(.5,.5,0);p.createGeometry=function(e){var t,i,r=e._vertexFormat,s=new c.a;if(r.position){if((i=new Float64Array(12))[0]=g.x,i[1]=g.y,i[2]=0,i[3]=v.x,i[4]=g.y,i[5]=0,i[6]=v.x,i[7]=v.y,i[8]=0,i[9]=g.x,i[10]=v.y,i[11]=0,s.position=new d.default({componentDatatype:o.default.DOUBLE,componentsPerAttribute:3,values:i}),r.normal){var l=new Float32Array(12);l[0]=0,l[1]=0,l[2]=1,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=1,l[9]=0,l[10]=0,l[11]=1,s.normal=new d.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:3,values:l})}if(r.st){var h=new Float32Array(8);h[0]=0,h[1]=0,h[2]=1,h[3]=0,h[4]=1,h[5]=1,h[6]=0,h[7]=1,s.st=new d.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:2,values:h})}if(r.tangent){var p=new Float32Array(12);p[0]=1,p[1]=0,p[2]=0,p[3]=1,p[4]=0,p[5]=0,p[6]=1,p[7]=0,p[8]=0,p[9]=1,p[10]=0,p[11]=0,s.tangent=new d.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:3,values:p})}if(r.bitangent){var m=new Float32Array(12);m[0]=0,m[1]=1,m[2]=0,m[3]=0,m[4]=1,m[5]=0,m[6]=0,m[7]=1,m[8]=0,m[9]=0,m[10]=1,m[11]=0,s.bitangent=new d.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:3,values:m})}(t=new Uint16Array(6))[0]=0,t[1]=1,t[2]=2,t[3]=0,t[4]=2,t[5]=3}return new u.default({attributes:s,indices:t,primitiveType:f.default.TRIANGLES,boundingSphere:new n.default(a.default.ZERO,Math.sqrt(2))})},t.default=p},function(e,t,i){"use strict";i.r(t);var n=i(17),a=i(1),r=i(4),o=i(11),s=i(0),l=i(46),u=i(28),d=i(82),c=i(35);function f(){this._workerName="createPlaneOutlineGeometry"}f.packedLength=0,f.pack=function(e,t){return r.a.defined("value",e),r.a.defined("array",t),t},f.unpack=function(e,t,i){return r.a.defined("array",e),Object(s.default)(i)?i:new f};var h=new a.default(-.5,-.5,0),p=new a.default(.5,.5,0);f.createGeometry=function(){var e=new d.a,t=new Uint16Array(8),i=new Float64Array(12);return i[0]=h.x,i[1]=h.y,i[2]=h.z,i[3]=p.x,i[4]=h.y,i[5]=h.z,i[6]=p.x,i[7]=p.y,i[8]=h.z,i[9]=h.x,i[10]=p.y,i[11]=h.z,e.position=new u.default({componentDatatype:o.default.DOUBLE,componentsPerAttribute:3,values:i}),t[0]=0,t[1]=1,t[2]=1,t[3]=2,t[4]=2,t[5]=3,t[6]=3,t[7]=0,new l.default({attributes:e,indices:t,primitiveType:c.default.LINES,boundingSphere:new n.default(a.default.ZERO,Math.sqrt(2))})},t.default=f},function(e,t,i){"use strict";i.r(t);var n=i(2),a=i(0),r=i(19),o=i(3),s=i(24),l=i(5),u=i(18);function d(){this._dataSources=[],this._dataSourceAdded=new s.default,this._dataSourceRemoved=new s.default,this._dataSourceMoved=new s.default}function c(e,t){if(!Object(a.default)(t))throw new o.default("dataSource is required.");var i=e.indexOf(t);if(-1===i)throw new o.default("dataSource is not in this collection.");return i}function f(e,t,i){var n=e._dataSources,a=n.length-1;if((t=l.default.clamp(t,0,a))!==(i=l.default.clamp(i,0,a))){var r=n[t];n[t]=n[i],n[i]=r,e.dataSourceMoved.raiseEvent(r,i,t)}}Object.defineProperties(d.prototype,{length:{get:function(){return this._dataSources.length}},dataSourceAdded:{get:function(){return this._dataSourceAdded}},dataSourceRemoved:{get:function(){return this._dataSourceRemoved}},dataSourceMoved:{get:function(){return this._dataSourceMoved}}}),d.prototype.add=function(e){if(!Object(a.default)(e))throw new o.default("dataSource is required.");var t=this,i=this._dataSources;return Object(u.a)(e,(function(e){return i===t._dataSources&&(t._dataSources.push(e),t._dataSourceAdded.raiseEvent(t,e)),e}))},d.prototype.remove=function(e,t){t=Object(n.default)(t,!1);var i=this._dataSources.indexOf(e);return-1!==i&&(this._dataSources.splice(i,1),this._dataSourceRemoved.raiseEvent(this,e),t&&"function"==typeof e.destroy&&e.destroy(),!0)},d.prototype.removeAll=function(e){e=Object(n.default)(e,!1);for(var t=this._dataSources,i=0,a=t.length;i<a;++i){var r=t[i];this._dataSourceRemoved.raiseEvent(this,r),e&&"function"==typeof r.destroy&&r.destroy()}this._dataSources=[]},d.prototype.contains=function(e){return-1!==this.indexOf(e)},d.prototype.indexOf=function(e){return this._dataSources.indexOf(e)},d.prototype.get=function(e){if(!Object(a.default)(e))throw new o.default("index is required.");return this._dataSources[e]},d.prototype.getByName=function(e){if(!Object(a.default)(e))throw new o.default("name is required.");return this._dataSources.filter((function(t){return t.name===e}))},d.prototype.raise=function(e){var t=c(this._dataSources,e);f(this,t,t+1)},d.prototype.lower=function(e){var t=c(this._dataSources,e);f(this,t,t-1)},d.prototype.raiseToTop=function(e){var t=c(this._dataSources,e);t!==this._dataSources.length-1&&(this._dataSources.splice(t,1),this._dataSources.push(e),this.dataSourceMoved.raiseEvent(e,this._dataSources.length-1,t))},d.prototype.lowerToBottom=function(e){var t=c(this._dataSources,e);0!==t&&(this._dataSources.splice(t,1),this._dataSources.splice(0,0,e),this.dataSourceMoved.raiseEvent(e,0,t))},d.prototype.isDestroyed=function(){return!1},d.prototype.destroy=function(){return this.removeAll(!0),Object(r.default)(this)},t.default=d},function(e,t,i){"use strict";i.r(t);var n,a=i(54),r=i(41),o=i(8),s=i(1),l=i(22),u=i(194),d=i(163),c=i(7),f=i(131),h=i(75),p=i(99),m=i(2),_=i(0),g=i(3),v=i(49),y=i(15),b=i(24),w=i(278),O=i(369),x=i(966),A=i(40),T=i(14),E=i(327),C=i(328),S=i(5),M=i(65),D=i(206),P=i(27),I=i(21),L=i(98),j=i(30),R=i(23),N=i(393),B=i(76),F=i(189),k=i(97),z=i(193),U=i(42),V=i(129),H=i(174),G=i(86),Y=i(89),W=i(115),q=i(18),X=i(252),K=i(434),J=i(309),Z=i(538),Q=i(63),$=i(539),ee=i(212),te=i(232),ie=i(238),ne=i(109),ae=i(435),re=i(436),oe=i(211),se=i(411),le=i(437),ue=i(438),de=i(304),ce=i(219),fe=i(540),he=i(399),pe=i(352),me=i(353),_e=i(439),ge=i(354),ve=i(441),ye=i(305),be=i(541),we=i(472),Oe=i(473),xe=i(254),Ae=i(542),Te=i(442),Ee=i(383),Ce=i(9),Se=i(543),Me=i(256),De=i(306),Pe=i(368),Ie=i(299),Le=i(208),je=i(239),Re=i(544),Ne=i(320),Be=i(382),Fe=i(339),ke=i(419),ze=i(443),Ue=i(355),Ve=i(440);function He(){}function Ge(e,t){return"#"===t[0]&&(t=n+t),Pe.a.fromString(e,t)}function Ye(e,t,i){if(Object(_.default)(i.reference))return Ge(t,i.reference);if(Object(_.default)(i.velocityReference)){var n=Ge(t,i.velocityReference);switch(e){case s.default:case He:return new ze.a(n,e===He);case P.default:return new ke.default(n)}}throw new R.a(JSON.stringify(i)+" is not valid CZML.")}He.packedLength=s.default.packedLength,He.unpack=s.default.unpack,He.pack=s.default.pack;var We=new s.default,qe=new N.default,Xe=new l.default,Ke=new B.default,Je=new P.default;function Ze(e,t){var i=Object(m.default)(e.uri,e);return Object(_.default)(t)?t.getDerivedResource({url:i}):j.default.createIfNeeded(i)}function Qe(e){var t=e.cartesian;if(Object(_.default)(t))return t;var i=e.cartesianVelocity;if(Object(_.default)(i))return i;var n=e.unitCartesian;if(Object(_.default)(n))return n;var a=e.unitSpherical;if(Object(_.default)(a))return function(e){var t=e.length;if(qe.magnitude=1,2===t)return qe.clock=e[0],qe.cone=e[1],s.default.fromSpherical(qe,We),[We.x,We.y,We.z];for(var i=new Array(t/3*4),n=0,a=0;n<t;n+=3,a+=4)i[a]=e[n],qe.clock=e[n+1],qe.cone=e[n+2],s.default.fromSpherical(qe,We),i[a+1]=We.x,i[a+2]=We.y,i[a+3]=We.z;return i}(a);var r=e.spherical;if(Object(_.default)(r))return function(e){var t=e.length;if(3===t)return qe.clock=e[0],qe.cone=e[1],qe.magnitude=e[2],s.default.fromSpherical(qe,We),[We.x,We.y,We.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],qe.clock=e[n+1],qe.cone=e[n+2],qe.magnitude=e[n+3],s.default.fromSpherical(qe,We),i[n+1]=We.x,i[n+2]=We.y,i[n+3]=We.z;return i}(r);var o=e.cartographicRadians;if(Object(_.default)(o))return function(e){var t=e.length;if(3===t)return Xe.longitude=e[0],Xe.latitude=e[1],Xe.height=e[2],y.default.WGS84.cartographicToCartesian(Xe,We),[We.x,We.y,We.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],Xe.longitude=e[n+1],Xe.latitude=e[n+2],Xe.height=e[n+3],y.default.WGS84.cartographicToCartesian(Xe,We),i[n+1]=We.x,i[n+2]=We.y,i[n+3]=We.z;return i}(o);var l=e.cartographicDegrees;if(Object(_.default)(l))return function(e){var t=e.length;if(3===t)return Xe.longitude=S.default.toRadians(e[0]),Xe.latitude=S.default.toRadians(e[1]),Xe.height=e[2],y.default.WGS84.cartographicToCartesian(Xe,We),[We.x,We.y,We.z];for(var i=new Array(t),n=0;n<t;n+=4)i[n]=e[n],Xe.longitude=S.default.toRadians(e[n+1]),Xe.latitude=S.default.toRadians(e[n+2]),Xe.height=e[n+3],y.default.WGS84.cartographicToCartesian(Xe,We),i[n+1]=We.x,i[n+2]=We.y,i[n+3]=We.z;return i}(l);throw new R.a(JSON.stringify(e)+" is not a valid CZML interval.")}function $e(e,t){s.default.unpack(e,t,We),s.default.normalize(We,We),s.default.pack(We,e,t)}function et(e,t){P.default.unpack(e,t,Je),P.default.normalize(Je,Je),P.default.pack(Je,e,t)}function tt(e){return"boolean"==typeof e?Boolean:"number"==typeof e?Number:"string"==typeof e?String:e.hasOwnProperty("array")?Array:e.hasOwnProperty("boolean")?Boolean:e.hasOwnProperty("boundingRectangle")?r.a:e.hasOwnProperty("cartesian2")?o.default:e.hasOwnProperty("cartesian")||e.hasOwnProperty("spherical")||e.hasOwnProperty("cartographicRadians")||e.hasOwnProperty("cartographicDegrees")?s.default:e.hasOwnProperty("unitCartesian")||e.hasOwnProperty("unitSpherical")?He:e.hasOwnProperty("rgba")||e.hasOwnProperty("rgbaf")?c.default:e.hasOwnProperty("arcType")?a.default:e.hasOwnProperty("classificationType")?k.default:e.hasOwnProperty("colorBlendMode")?z.default:e.hasOwnProperty("cornerType")?f.a:e.hasOwnProperty("heightReference")?U.a:e.hasOwnProperty("horizontalOrigin")?V.a:e.hasOwnProperty("date")?T.default:e.hasOwnProperty("labelStyle")?H.a:e.hasOwnProperty("number")?Number:e.hasOwnProperty("nearFarScalar")?M.a:e.hasOwnProperty("distanceDisplayCondition")?v.default:e.hasOwnProperty("object")||e.hasOwnProperty("value")?Object:e.hasOwnProperty("unitQuaternion")?P.default:e.hasOwnProperty("shadowMode")?G.a:e.hasOwnProperty("string")?String:e.hasOwnProperty("stripeOrientation")?Ne.a:e.hasOwnProperty("wsen")||e.hasOwnProperty("wsenDegrees")?I.default:e.hasOwnProperty("uri")?W.a:e.hasOwnProperty("verticalOrigin")?Y.default:Object}function it(e,t,i){switch(e){case a.default:return a.default[Object(m.default)(t.arcType,t)];case Array:return t.array;case Boolean:return Object(m.default)(t.boolean,t);case r.a:return t.boundingRectangle;case o.default:return t.cartesian2;case s.default:return Qe(t);case He:return function(e){var t=Qe(e);if(3===t.length)return $e(t,0),t;for(var i=1;i<t.length;i+=4)$e(t,i);return t}(t);case c.default:return function(e){var t=e.rgbaf;if(Object(_.default)(t))return t;var i=e.rgba;if(Object(_.default)(i)){var n=i.length;if(n===c.default.packedLength)return[c.default.byteToFloat(i[0]),c.default.byteToFloat(i[1]),c.default.byteToFloat(i[2]),c.default.byteToFloat(i[3])];t=new Array(n);for(var a=0;a<n;a+=5)t[a]=i[a],t[a+1]=c.default.byteToFloat(i[a+1]),t[a+2]=c.default.byteToFloat(i[a+2]),t[a+3]=c.default.byteToFloat(i[a+3]),t[a+4]=c.default.byteToFloat(i[a+4]);return t}}(t);case k.default:return k.default[Object(m.default)(t.classificationType,t)];case z.default:return z.default[Object(m.default)(t.colorBlendMode,t)];case f.a:return f.a[Object(m.default)(t.cornerType,t)];case U.a:return U.a[Object(m.default)(t.heightReference,t)];case V.a:return V.a[Object(m.default)(t.horizontalOrigin,t)];case Image:return Ze(t,i);case T.default:return T.default.fromIso8601(Object(m.default)(t.date,t));case H.a:return H.a[Object(m.default)(t.labelStyle,t)];case Number:return Object(m.default)(t.number,t);case M.a:return t.nearFarScalar;case v.default:return t.distanceDisplayCondition;case Object:return Object(m.default)(Object(m.default)(t.object,t.value),t);case P.default:return function(e){var t=e.unitQuaternion;if(Object(_.default)(t)){if(4===t.length)return et(t,0),t;for(var i=1;i<t.length;i+=5)et(t,i)}return t}(t);case Ie.a:return Object(m.default)(t.number,t);case G.a:return G.a[Object(m.default)(Object(m.default)(t.shadowMode,t.shadows),t)];case String:return Object(m.default)(t.string,t);case Ne.a:return Ne.a[Object(m.default)(t.stripeOrientation,t)];case I.default:return function(e){var t=e.wsen;if(Object(_.default)(t))return t;var i=e.wsenDegrees;if(Object(_.default)(i)){var n=i.length;if(n===I.default.packedLength)return[S.default.toRadians(i[0]),S.default.toRadians(i[1]),S.default.toRadians(i[2]),S.default.toRadians(i[3])];t=new Array(n);for(var a=0;a<n;a+=5)t[a]=i[a],t[a+1]=S.default.toRadians(i[a+1]),t[a+2]=S.default.toRadians(i[a+2]),t[a+3]=S.default.toRadians(i[a+3]),t[a+4]=S.default.toRadians(i[a+4]);return t}}(t);case W.a:return Ze(t,i);case Y.default:return Y.default[Object(m.default)(t.verticalOrigin,t)];default:throw new R.a(e)}}var nt={HERMITE:x.a,LAGRANGE:E.default,LINEAR:C.default};function at(e,t){var i=e.interpolationAlgorithm,n=e.interpolationDegree;(Object(_.default)(i)||Object(_.default)(n))&&t.setInterpolationOptions({interpolationAlgorithm:nt[i],interpolationDegree:n});var a=e.forwardExtrapolationType;Object(_.default)(a)&&(t.forwardExtrapolationType=w.a[a]);var r=e.forwardExtrapolationDuration;Object(_.default)(r)&&(t.forwardExtrapolationDuration=r);var o=e.backwardExtrapolationType;Object(_.default)(o)&&(t.backwardExtrapolationType=w.a[o]);var s=e.backwardExtrapolationDuration;Object(_.default)(s)&&(t.backwardExtrapolationDuration=s)}var rt={iso8601:void 0};function ot(e){if(Object(_.default)(e))return rt.iso8601=e,B.default.fromIso8601(rt)}function st(e){var t=A.a.MAXIMUM_INTERVAL.clone();return t.data=e,t}function lt(e){var t=new te.a;return t.intervals.addInterval(st(e)),t}function ut(e){var t=new ee.a(e.referenceFrame);return t.intervals.addInterval(st(e)),t}function dt(e,t,i,n,a,r,o){var s,l,u,d=ot(n.interval);Object(_.default)(a)&&(d=Object(_.default)(d)?B.default.intersect(d,a,Ke):a);var c=!Object(_.default)(n.reference)&&!Object(_.default)(n.velocityReference),f=Object(_.default)(d)&&!d.equals(A.a.MAXIMUM_INTERVAL);if(!0===n.delete)return f?function e(t,i){if(t instanceof je.default)return void t.removeSamples(i);if(t instanceof Fe.default)return void t.intervals.removeInterval(i);if(t instanceof te.a){for(var n=t.intervals,a=0;a<n.length;++a){var r=B.default.intersect(n.get(a),i,Ke);r.isEmpty||e(r.data,i)}return void n.removeInterval(i)}}(t[i],d):void(t[i]=void 0);var h=!1;if(c){if(l=it(e,n,r),!Object(_.default)(l))return;s=Object(m.default)(e.packedLength,1),u=Object(m.default)(l.length,1),h=!Object(_.default)(n.array)&&"string"!=typeof l&&u>s&&e!==Object}var p="function"==typeof e.unpack&&e!==Ie.a;if(h||f){var g,v,y=t[i],b=n.epoch;if(Object(_.default)(b)&&(g=T.default.fromIso8601(b)),h&&!f)return y instanceof je.default||(t[i]=y=new je.default(e)),y.addSamplesPackedArray(l,g),void at(n,y);if(!h&&f)return(d=d.clone()).data=c?p?e.unpack(l,0):l:Ye(e,o,n),Object(_.default)(y)||(t[i]=y=c?new Fe.default:new te.a),void(c&&y instanceof Fe.default?y.intervals.addInterval(d):y instanceof te.a?(c&&(d.data=new ne.default(d.data)),y.intervals.addInterval(d)):(t[i]=y=lt(y),c&&(d.data=new ne.default(d.data)),y.intervals.addInterval(d)));Object(_.default)(y)||(t[i]=y=new te.a),y instanceof te.a||(t[i]=y=lt(y));var w=y.intervals;v=w.findInterval(d),Object(_.default)(v)&&v.data instanceof je.default||((v=d.clone()).data=new je.default(e),w.addInterval(v)),v.data.addSamplesPackedArray(l,g),at(n,v.data)}else t[i]=c?new ne.default(p?e.unpack(l,0):l):Ye(e,o,n)}function ct(e,t,i,n,a,r,o){if(Object(_.default)(n))if(Array.isArray(n))for(var s=0,l=n.length;s<l;++s)dt(e,t,i,n[s],a,r,o);else dt(e,t,i,n,a,r,o)}function ft(e,t,i,n,a,r){var o=ot(i.interval);Object(_.default)(n)&&(o=Object(_.default)(o)?B.default.intersect(o,n,Ke):n);var l,u,d=Object(_.default)(i.cartesianVelocity)?1:0,c=s.default.packedLength*(d+1),f=!Object(_.default)(i.reference),h=Object(_.default)(o)&&!o.equals(A.a.MAXIMUM_INTERVAL);if(!0===i.delete)return h?function e(t,i){if(t instanceof Le.default)return void t.removeSamples(i);if(t instanceof Be.a)return void t.intervals.removeInterval(i);if(t instanceof ee.a){for(var n=t.intervals,a=0;a<n.length;++a){var r=B.default.intersect(n.get(a),i,Ke);r.isEmpty||e(r.data,i)}return void n.removeInterval(i)}}(e[t],o):void(e[t]=void 0);var p=!1;if(f&&(Object(_.default)(i.referenceFrame)&&(u=L.default[i.referenceFrame]),u=Object(m.default)(u,L.default.FIXED),l=Qe(i),p=Object(m.default)(l.length,1)>c),p||h){var g,v,y=e[t],b=i.epoch;if(Object(_.default)(b)&&(g=T.default.fromIso8601(b)),p&&!h)return y instanceof Le.default&&(!Object(_.default)(u)||y.referenceFrame===u)||(e[t]=y=new Le.default(u,d)),y.addSamplesPackedArray(l,g),void at(i,y);if(!p&&h)return(o=o.clone()).data=f?s.default.unpack(l):Ge(r,i.reference),Object(_.default)(y)||(y=f?new Be.a(u):new ee.a(u),e[t]=y),void(f&&y instanceof Be.a&&Object(_.default)(u)&&y.referenceFrame===u?y.intervals.addInterval(o):y instanceof ee.a?(f&&(o.data=new ie.a(o.data,u)),y.intervals.addInterval(o)):(e[t]=y=ut(y),f&&(o.data=new ie.a(o.data,u)),y.intervals.addInterval(o)));Object(_.default)(y)?y instanceof ee.a||(e[t]=y=ut(y)):e[t]=y=new ee.a(u);var w=y.intervals;v=w.findInterval(o),Object(_.default)(v)&&v.data instanceof Le.default&&(!Object(_.default)(u)||v.data.referenceFrame===u)||((v=o.clone()).data=new Le.default(u,d),w.addInterval(v)),v.data.addSamplesPackedArray(l,g),at(i,v.data)}else e[t]=f?new ie.a(s.default.unpack(l),u):Ge(r,i.reference)}function ht(e,t,i,n,a,r){if(Object(_.default)(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)ft(e,t,i[o],n,0,r);else ft(e,t,i,n,0,r)}function pt(e,t,i,n){Object(_.default)(i.references)?gt(e,t,i.references,i.interval,n,Se.a,te.a):(Object(_.default)(i.cartesian2)?i.array=o.default.unpackArray(i.cartesian2):Object(_.default)(i.cartesian)&&(i.array=o.default.unpackArray(i.cartesian)),Object(_.default)(i.array)&&ct(Array,e,t,i,void 0,void 0,n))}function mt(e,t,i,n,a,r){var s=ot(i.interval);Object(_.default)(n)&&(s=Object(_.default)(s)?B.default.intersect(s,n,Ke):n);var l,u,d,f=e[t];if(Object(_.default)(s)){f instanceof $.a||(f=new $.a,e[t]=f);var h=f.intervals;u=h.findInterval({start:s.start,stop:s.stop}),Object(_.default)(u)?l=u.data:(u=s.clone(),h.addInterval(u))}else l=f;Object(_.default)(i.solidColor)?(l instanceof Q.a||(l=new Q.a),d=i.solidColor,ct(c.default,l,"color",d.color,void 0,void 0,r)):Object(_.default)(i.grid)?(l instanceof fe.a||(l=new fe.a),d=i.grid,ct(c.default,l,"color",d.color,void 0,a,r),ct(Number,l,"cellAlpha",d.cellAlpha,void 0,a,r),ct(o.default,l,"lineCount",d.lineCount,void 0,a,r),ct(o.default,l,"lineThickness",d.lineThickness,void 0,a,r),ct(o.default,l,"lineOffset",d.lineOffset,void 0,a,r)):Object(_.default)(i.image)?(l instanceof he.a||(l=new he.a),d=i.image,ct(Image,l,"image",d.image,void 0,a,r),ct(o.default,l,"repeat",d.repeat,void 0,a,r),ct(c.default,l,"color",d.color,void 0,a,r),ct(Boolean,l,"transparent",d.transparent,void 0,a,r)):Object(_.default)(i.stripe)?(l instanceof Re.a||(l=new Re.a),d=i.stripe,ct(Ne.a,l,"orientation",d.orientation,void 0,a,r),ct(c.default,l,"evenColor",d.evenColor,void 0,a,r),ct(c.default,l,"oddColor",d.oddColor,void 0,a,r),ct(Number,l,"offset",d.offset,void 0,a,r),ct(Number,l,"repeat",d.repeat,void 0,a,r)):Object(_.default)(i.polylineOutline)?(l instanceof Ae.a||(l=new Ae.a),d=i.polylineOutline,ct(c.default,l,"color",d.color,void 0,a,r),ct(c.default,l,"outlineColor",d.outlineColor,void 0,a,r),ct(Number,l,"outlineWidth",d.outlineWidth,void 0,a,r)):Object(_.default)(i.polylineGlow)?(l instanceof Oe.default||(l=new Oe.default),d=i.polylineGlow,ct(c.default,l,"color",d.color,void 0,a,r),ct(Number,l,"glowPower",d.glowPower,void 0,a,r),ct(Number,l,"taperPower",d.taperPower,void 0,a,r)):Object(_.default)(i.polylineArrow)?(l instanceof be.a||(l=new be.a),d=i.polylineArrow,ct(c.default,l,"color",d.color,void 0,void 0,r)):Object(_.default)(i.polylineDash)?(l instanceof we.default||(l=new we.default),d=i.polylineDash,ct(c.default,l,"color",d.color,void 0,void 0,r),ct(c.default,l,"gapColor",d.gapColor,void 0,void 0,r),ct(Number,l,"dashLength",d.dashLength,void 0,a,r),ct(Number,l,"dashPattern",d.dashPattern,void 0,a,r)):Object(_.default)(i.checkerboard)&&(l instanceof Z.a||(l=new Z.a),d=i.checkerboard,ct(c.default,l,"evenColor",d.evenColor,void 0,a,r),ct(c.default,l,"oddColor",d.oddColor,void 0,a,r),ct(o.default,l,"repeat",d.repeat,void 0,a,r)),Object(_.default)(u)?u.data=l:e[t]=l}function _t(e,t,i,n,a,r){if(Object(_.default)(i))if(Array.isArray(i))for(var o=0,s=i.length;o<s;++o)mt(e,t,i[o],n,a,r);else mt(e,t,i,n,a,r)}function gt(e,t,i,n,a,r,o){var s=i.map((function(e){return Ge(a,e)}));if(Object(_.default)(n)){n=ot(n);var l=e[t];if(!(l instanceof o)){var u=new o;u.intervals.addInterval(st(l)),e[t]=l=u}n.data=new r(s),l.intervals.addInterval(n)}else e[t]=new r(s)}function vt(e,t,i,n){var a=i.references;Object(_.default)(a)?gt(e,t,a,i.interval,n,Se.a,te.a):ct(Array,e,t,i,void 0,void 0,n)}function yt(e,t,i,n){if(Object(_.default)(i))if(Array.isArray(i))for(var a=0,r=i.length;a<r;++a)vt(e,t,i[a],n);else vt(e,t,i,n)}function bt(e,t,i,n){var a=i.references;Object(_.default)(a)?gt(e,t,a,i.interval,n,Ee.a,ee.a):(Object(_.default)(i.cartesian)?i.array=s.default.unpackArray(i.cartesian):Object(_.default)(i.cartographicRadians)?i.array=s.default.fromRadiansArrayHeights(i.cartographicRadians):Object(_.default)(i.cartographicDegrees)&&(i.array=s.default.fromDegreesArrayHeights(i.cartographicDegrees)),Object(_.default)(i.array)&&ct(Array,e,t,i,void 0,void 0,n))}function wt(e,t,i,n){if(Object(_.default)(i))if(Array.isArray(i))for(var a=0,r=i.length;a<r;++a)bt(e,t,i[a],n);else bt(e,t,i,n)}function Ot(e){return s.default.unpackArray(e)}function xt(e){return s.default.fromRadiansArrayHeights(e)}function At(e){return s.default.fromDegreesArrayHeights(e)}function Tt(e,t,i,n){var a=i.references;if(Object(_.default)(a)){var r=a.map((function(e){var t={};return gt(t,"positions",e,i.interval,n,Ee.a,ee.a),t.positions}));e[t]=new Ee.a(r)}else Object(_.default)(i.cartesian)?i.array=i.cartesian.map(Ot):Object(_.default)(i.cartographicRadians)?i.array=i.cartographicRadians.map(xt):Object(_.default)(i.cartographicDegrees)&&(i.array=i.cartographicDegrees.map(At)),Object(_.default)(i.array)&&ct(Array,e,t,i,void 0,void 0,n)}function Et(e,t,i,n,a){var r=ot(t.interval);Object(_.default)(i)&&(r=Object(_.default)(r)?B.default.intersect(r,i,Ke):i);for(var o=e.nodeTransformations,l=Object.keys(t),u=0,d=l.length;u<d;++u){var c=l[u];if("interval"!==c){var f=t[c];if(Object(_.default)(f)){Object(_.default)(o)||(e.nodeTransformations=o=new Me.a),o.hasProperty(c)||o.addProperty(c);var h=o[c];Object(_.default)(h)||(o[c]=h=new _e.a),ct(s.default,h,"translation",f.translation,r,n,a),ct(P.default,h,"rotation",f.rotation,r,n,a),ct(s.default,h,"scale",f.scale,r,n,a)}}}}function Ct(e,t,i,n,a){var r=ot(t.interval);Object(_.default)(i)&&(r=Object(_.default)(r)?B.default.intersect(r,i,Ke):i);for(var o=e.articulations,s=Object.keys(t),l=0,u=s.length;l<u;++l){var d=s[l];if("interval"!==d){var c=t[d];Object(_.default)(c)&&(Object(_.default)(o)||(e.articulations=o=new Me.a),o.hasProperty(d)||o.addProperty(d),ct(Number,o,d,c,r,n,a))}}}function St(e){this.polygon=e,this._definitionChanged=new b.default}function Mt(e){return e?a.default.GEODESIC:a.default.NONE}function Dt(e,t,i,a,r){var o=e.id;if(Object(_.default)(o)||(o=Object(p.default)()),n=o,!Object(_.default)(r._version)&&"document"!==o)throw new R.a("The first CZML packet is required to be the document object.");if(!0===e.delete)t.removeById(o);else if("document"===o)!function(e,t){var i=e.version;if(Object(_.default)(i)&&"string"==typeof i){var n=i.split(".");if(2===n.length){if("1"!==n[0])throw new R.a("Cesium only supports CZML version 1.");t._version=i}}if(!Object(_.default)(t._version))throw new R.a("CZML version information invalid. It is expected to be a property on the document object in the <Major>.<Minor> version format.");var a=t._documentPacket;Object(_.default)(e.name)&&(a.name=e.name);var r=e.clock;if(Object(_.default)(r)){var o=a.clock;Object(_.default)(o)?(o.interval=Object(m.default)(r.interval,o.interval),o.currentTime=Object(m.default)(r.currentTime,o.currentTime),o.range=Object(m.default)(r.range,o.range),o.step=Object(m.default)(r.step,o.step),o.multiplier=Object(m.default)(r.multiplier,o.multiplier)):a.clock={interval:r.interval,currentTime:r.currentTime,range:r.range,step:r.step,multiplier:r.multiplier}}}(e,r);else{var s=t.getOrCreateEntity(o),l=e.parent;Object(_.default)(l)&&(s.parent=t.getOrCreateEntity(l));for(var u=i.length-1;u>-1;u--)i[u](s,e,t,a)}n=void 0}function Pt(e,t,i,n){if(!Object(_.default)(t))throw new g.default("czml is required.");var a=t,r=(i=Object(m.default)(i,m.default.EMPTY_OBJECT)).sourceUri,o=i.credit;if("string"==typeof o&&(o=new h.a(o)),e._credit=o,"string"==typeof t||t instanceof j.default){a=(t=j.default.createIfNeeded(t)).fetchJson(),r=Object(m.default)(r,t.clone());var s=e._resourceCredits,l=t.credits;if(Object(_.default)(l))for(var c=l.length,f=0;f<c;f++)s.push(l[f])}return r=j.default.createIfNeeded(r),oe.a.setLoading(e,!0),Object(q.a)(a,(function(t){return function(e,t,i,n){oe.a.setLoading(e,!0);var a=e._entityCollection;n&&(e._version=void 0,e._documentPacket=new It,a.removeAll());Lt._processCzml(t,a,i,void 0,e);var r=function(e){var t,i=e._documentPacket.clock;if(!Object(_.default)(i)){if(!Object(_.default)(e._clock)){var n=e._entityCollection.computeAvailability();if(!n.start.equals(A.a.MINIMUM_VALUE)){var a=n.start,r=n.stop,o=T.default.secondsDifference(r,a),s=Math.round(o/120);return(t=new se.a).startTime=T.default.clone(a),t.stopTime=T.default.clone(r),t.clockRange=u.default.LOOP_STOP,t.multiplier=s,t.currentTime=T.default.clone(a),t.clockStep=d.a.SYSTEM_CLOCK_MULTIPLIER,e._clock=t,!0}}return!1}Object(_.default)(e._clock)?t=e._clock.clone():((t=new se.a).startTime=A.a.MINIMUM_VALUE.clone(),t.stopTime=A.a.MAXIMUM_VALUE.clone(),t.currentTime=A.a.MINIMUM_VALUE.clone(),t.clockRange=u.default.LOOP_STOP,t.clockStep=d.a.SYSTEM_CLOCK_MULTIPLIER,t.multiplier=1);var l=ot(i.interval);return Object(_.default)(l)&&(t.startTime=l.start,t.stopTime=l.stop),Object(_.default)(i.currentTime)&&(t.currentTime=T.default.fromIso8601(i.currentTime)),Object(_.default)(i.range)&&(t.clockRange=Object(m.default)(u.default[i.range],u.default.LOOP_STOP)),Object(_.default)(i.step)&&(t.clockStep=Object(m.default)(d.a[i.step],d.a.SYSTEM_CLOCK_MULTIPLIER)),Object(_.default)(i.multiplier)&&(t.multiplier=i.multiplier),!t.equals(e._clock)&&(e._clock=t.clone(e._clock),!0)}(e),o=e._documentPacket;Object(_.default)(o.name)&&e._name!==o.name?(e._name=o.name,r=!0):!Object(_.default)(e._name)&&Object(_.default)(i)&&(e._name=Object(O.a)(i.getUrlComponent()),r=!0);oe.a.setLoading(e,!1),r&&e._changed.raiseEvent(e);return e}(e,t,r,n)})).otherwise((function(t){return oe.a.setLoading(e,!1),e._error.raiseEvent(e,t),console.log(t),q.a.reject(t)}))}function It(){this.name=void 0,this.clock=void 0}function Lt(e){this._name=e,this._changed=new b.default,this._error=new b.default,this._isLoading=!1,this._loading=new b.default,this._clock=void 0,this._documentPacket=new It,this._version=void 0,this._entityCollection=new ce.a(this),this._entityCluster=new de.a,this._credit=void 0,this._resourceCredits=[]}Object.defineProperties(St.prototype,{isConstant:{get:function(){var e=this.polygon._positions,t=this.polygon._holes;return(!Object(_.default)(e)||e.isConstant)&&(!Object(_.default)(t)||t.isConstant)}},definitionChanged:{get:function(){return this._definitionChanged}}}),St.prototype.getValue=function(e,t){var i,n;return Object(_.default)(this.polygon._positions)&&(i=this.polygon._positions.getValue(e)),Object(_.default)(this.polygon._holes)&&(n=this.polygon._holes.getValue(e),Object(_.default)(n)&&(n=n.map((function(e){return new D.default(e)})))),Object(_.default)(t)?(t.positions=i,t.holes=n,t):new D.default(i,n)},St.prototype.equals=function(e){return this===e||e instanceof St&&Ce.default.equals(this.polygon._positions,e.polygon._positions)&&Ce.default.equals(this.polygon._holes,e.polygon._holes)},Lt.load=function(e,t){return(new Lt).load(e,t)},Object.defineProperties(Lt.prototype,{name:{get:function(){return this._name}},clock:{get:function(){return this._clock}},entities:{get:function(){return this._entityCollection}},isLoading:{get:function(){return this._isLoading}},changedEvent:{get:function(){return this._changed}},errorEvent:{get:function(){return this._error}},loadingEvent:{get:function(){return this._loading}},show:{get:function(){return this._entityCollection.show},set:function(e){this._entityCollection.show=e}},clustering:{get:function(){return this._entityCluster},set:function(e){if(!Object(_.default)(e))throw new g.default("value must be defined.");this._entityCluster=e}},credit:{get:function(){return this._credit}}}),Lt.updaters=[function(e,t,i,n){var a=t.billboard;if(Object(_.default)(a)){var l=ot(a.interval),u=e.billboard;Object(_.default)(u)||(e.billboard=u=new X.a),ct(Boolean,u,"show",a.show,l,n,i),ct(Image,u,"image",a.image,l,n,i),ct(Number,u,"scale",a.scale,l,n,i),ct(o.default,u,"pixelOffset",a.pixelOffset,l,n,i),ct(s.default,u,"eyeOffset",a.eyeOffset,l,n,i),ct(V.a,u,"horizontalOrigin",a.horizontalOrigin,l,n,i),ct(Y.default,u,"verticalOrigin",a.verticalOrigin,l,n,i),ct(U.a,u,"heightReference",a.heightReference,l,n,i),ct(c.default,u,"color",a.color,l,n,i),ct(Ie.a,u,"rotation",a.rotation,l,n,i),function(e,t,i,n,a){Object(_.default)(t)&&ct(He,e,"alignedAxis",t,i,n,a)}(u,a.alignedAxis,l,n,i),ct(Boolean,u,"sizeInMeters",a.sizeInMeters,l,n,i),ct(Number,u,"width",a.width,l,n,i),ct(Number,u,"height",a.height,l,n,i),ct(M.a,u,"scaleByDistance",a.scaleByDistance,l,n,i),ct(M.a,u,"translucencyByDistance",a.translucencyByDistance,l,n,i),ct(M.a,u,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,l,n,i),ct(r.a,u,"imageSubRegion",a.imageSubRegion,l,n,i),ct(v.default,u,"distanceDisplayCondition",a.distanceDisplayCondition,l,n,i),ct(Number,u,"disableDepthTestDistance",a.disableDepthTestDistance,l,n,i)}},function(e,t,i,n){var a=t.box;if(Object(_.default)(a)){var r=ot(a.interval),o=e.box;Object(_.default)(o)||(e.box=o=new K.a),ct(Boolean,o,"show",a.show,r,n,i),ct(s.default,o,"dimensions",a.dimensions,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.corridor;if(Object(_.default)(a)){var r=ot(a.interval),o=e.corridor;Object(_.default)(o)||(e.corridor=o=new ae.a),ct(Boolean,o,"show",a.show,r,n,i),wt(o,"positions",a.positions,i),ct(Number,o,"width",a.width,r,n,i),ct(Number,o,"height",a.height,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Number,o,"extrudedHeight",a.extrudedHeight,r,n,i),ct(U.a,o,"extrudedHeightReference",a.extrudedHeightReference,r,n,i),ct(f.a,o,"cornerType",a.cornerType,r,n,i),ct(Number,o,"granularity",a.granularity,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i),ct(k.default,o,"classificationType",a.classificationType,r,n,i),ct(Number,o,"zIndex",a.zIndex,r,n,i)}},function(e,t,i,n){var a=t.cylinder;if(Object(_.default)(a)){var r=ot(a.interval),o=e.cylinder;Object(_.default)(o)||(e.cylinder=o=new re.a),ct(Boolean,o,"show",a.show,r,n,i),ct(Number,o,"length",a.length,r,n,i),ct(Number,o,"topRadius",a.topRadius,r,n,i),ct(Number,o,"bottomRadius",a.bottomRadius,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(Number,o,"numberOfVerticalLines",a.numberOfVerticalLines,r,n,i),ct(Number,o,"slices",a.slices,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.ellipse;if(Object(_.default)(a)){var r=ot(a.interval),o=e.ellipse;Object(_.default)(o)||(e.ellipse=o=new le.a),ct(Boolean,o,"show",a.show,r,n,i),ct(Number,o,"semiMajorAxis",a.semiMajorAxis,r,n,i),ct(Number,o,"semiMinorAxis",a.semiMinorAxis,r,n,i),ct(Number,o,"height",a.height,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Number,o,"extrudedHeight",a.extrudedHeight,r,n,i),ct(U.a,o,"extrudedHeightReference",a.extrudedHeightReference,r,n,i),ct(Ie.a,o,"rotation",a.rotation,r,n,i),ct(Ie.a,o,"stRotation",a.stRotation,r,n,i),ct(Number,o,"granularity",a.granularity,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(Number,o,"numberOfVerticalLines",a.numberOfVerticalLines,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i),ct(k.default,o,"classificationType",a.classificationType,r,n,i),ct(Number,o,"zIndex",a.zIndex,r,n,i)}},function(e,t,i,n){var a=t.ellipsoid;if(Object(_.default)(a)){var r=ot(a.interval),o=e.ellipsoid;Object(_.default)(o)||(e.ellipsoid=o=new ue.a),ct(Boolean,o,"show",a.show,r,n,i),ct(s.default,o,"radii",a.radii,r,n,i),ct(s.default,o,"innerRadii",a.innerRadii,r,n,i),ct(Number,o,"minimumClock",a.minimumClock,r,n,i),ct(Number,o,"maximumClock",a.maximumClock,r,n,i),ct(Number,o,"minimumCone",a.minimumCone,r,n,i),ct(Number,o,"maximumCone",a.maximumCone,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(Number,o,"stackPartitions",a.stackPartitions,r,n,i),ct(Number,o,"slicePartitions",a.slicePartitions,r,n,i),ct(Number,o,"subdivisions",a.subdivisions,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.label;if(Object(_.default)(a)){var r=ot(a.interval),l=e.label;Object(_.default)(l)||(e.label=l=new pe.a),ct(Boolean,l,"show",a.show,r,n,i),ct(String,l,"text",a.text,r,n,i),ct(String,l,"font",a.font,r,n,i),ct(H.a,l,"style",a.style,r,n,i),ct(Number,l,"scale",a.scale,r,n,i),ct(Boolean,l,"showBackground",a.showBackground,r,n,i),ct(c.default,l,"backgroundColor",a.backgroundColor,r,n,i),ct(o.default,l,"backgroundPadding",a.backgroundPadding,r,n,i),ct(o.default,l,"pixelOffset",a.pixelOffset,r,n,i),ct(s.default,l,"eyeOffset",a.eyeOffset,r,n,i),ct(V.a,l,"horizontalOrigin",a.horizontalOrigin,r,n,i),ct(Y.default,l,"verticalOrigin",a.verticalOrigin,r,n,i),ct(U.a,l,"heightReference",a.heightReference,r,n,i),ct(c.default,l,"fillColor",a.fillColor,r,n,i),ct(c.default,l,"outlineColor",a.outlineColor,r,n,i),ct(Number,l,"outlineWidth",a.outlineWidth,r,n,i),ct(M.a,l,"translucencyByDistance",a.translucencyByDistance,r,n,i),ct(M.a,l,"pixelOffsetScaleByDistance",a.pixelOffsetScaleByDistance,r,n,i),ct(M.a,l,"scaleByDistance",a.scaleByDistance,r,n,i),ct(v.default,l,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i),ct(Number,l,"disableDepthTestDistance",a.disableDepthTestDistance,r,n,i)}},function(e,t,i,n){var a=t.model;if(Object(_.default)(a)){var r,o,s=ot(a.interval),l=e.model;Object(_.default)(l)||(e.model=l=new me.a),ct(Boolean,l,"show",a.show,s,n,i),ct(W.a,l,"uri",a.gltf,s,n,i),ct(Number,l,"scale",a.scale,s,n,i),ct(Number,l,"minimumPixelSize",a.minimumPixelSize,s,n,i),ct(Number,l,"maximumScale",a.maximumScale,s,n,i),ct(Boolean,l,"incrementallyLoadTextures",a.incrementallyLoadTextures,s,n,i),ct(Boolean,l,"runAnimations",a.runAnimations,s,n,i),ct(Boolean,l,"clampAnimations",a.clampAnimations,s,n,i),ct(G.a,l,"shadows",a.shadows,s,n,i),ct(U.a,l,"heightReference",a.heightReference,s,n,i),ct(c.default,l,"silhouetteColor",a.silhouetteColor,s,n,i),ct(Number,l,"silhouetteSize",a.silhouetteSize,s,n,i),ct(c.default,l,"color",a.color,s,n,i),ct(z.default,l,"colorBlendMode",a.colorBlendMode,s,n,i),ct(Number,l,"colorBlendAmount",a.colorBlendAmount,s,n,i),ct(v.default,l,"distanceDisplayCondition",a.distanceDisplayCondition,s,n,i);var u=a.nodeTransformations;if(Object(_.default)(u))if(Array.isArray(u))for(r=0,o=u.length;r<o;++r)Et(l,u[r],s,n,i);else Et(l,u,s,n,i);var d=a.articulations;if(Object(_.default)(d))if(Array.isArray(d))for(r=0,o=d.length;r<o;++r)Ct(l,d[r],s,n,i);else Ct(l,d,s,n,i)}},function(e,t,i,n){var a=t.name;Object(_.default)(a)&&(e.name=t.name)},function(e,t,i,n){var a=t.description;Object(_.default)(a)&&ct(String,e,"description",a,void 0,n,i)},function(e,t,i,n){var a=t.path;if(Object(_.default)(a)){var r=ot(a.interval),o=e.path;Object(_.default)(o)||(e.path=o=new ge.a),ct(Boolean,o,"show",a.show,r,n,i),ct(Number,o,"leadTime",a.leadTime,r,n,i),ct(Number,o,"trailTime",a.trailTime,r,n,i),ct(Number,o,"width",a.width,r,n,i),ct(Number,o,"resolution",a.resolution,r,n,i),_t(o,"material",a.material,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.point;if(Object(_.default)(a)){var r=ot(a.interval),o=e.point;Object(_.default)(o)||(e.point=o=new ve.a),ct(Boolean,o,"show",a.show,r,n,i),ct(Number,o,"pixelSize",a.pixelSize,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(c.default,o,"color",a.color,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(M.a,o,"scaleByDistance",a.scaleByDistance,r,n,i),ct(M.a,o,"translucencyByDistance",a.translucencyByDistance,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i),ct(Number,o,"disableDepthTestDistance",a.disableDepthTestDistance,r,n,i)}},function(e,t,i,n){var r=t.polygon;if(Object(_.default)(r)){var o=ot(r.interval),s=e.polygon;Object(_.default)(s)||(e.polygon=s=new ye.a),ct(Boolean,s,"show",r.show,o,n,i),wt(s,"_positions",r.positions,i),function(e,t,i,n){if(Object(_.default)(i))if(Array.isArray(i))for(var a=0,r=i.length;a<r;++a)Tt(e,t,i[a],n);else Tt(e,t,i,n)}(s,"_holes",r.holes,i),(Object(_.default)(s._positions)||Object(_.default)(s._holes))&&(s.hierarchy=new St(s)),ct(Number,s,"height",r.height,o,n,i),ct(U.a,s,"heightReference",r.heightReference,o,n,i),ct(Number,s,"extrudedHeight",r.extrudedHeight,o,n,i),ct(U.a,s,"extrudedHeightReference",r.extrudedHeightReference,o,n,i),ct(Ie.a,s,"stRotation",r.stRotation,o,n,i),ct(Number,s,"granularity",r.granularity,o,n,i),ct(Boolean,s,"fill",r.fill,o,n,i),_t(s,"material",r.material,o,n,i),ct(Boolean,s,"outline",r.outline,o,n,i),ct(c.default,s,"outlineColor",r.outlineColor,o,n,i),ct(Number,s,"outlineWidth",r.outlineWidth,o,n,i),ct(Boolean,s,"perPositionHeight",r.perPositionHeight,o,n,i),ct(Boolean,s,"closeTop",r.closeTop,o,n,i),ct(Boolean,s,"closeBottom",r.closeBottom,o,n,i),ct(a.default,s,"arcType",r.arcType,o,n,i),ct(G.a,s,"shadows",r.shadows,o,n,i),ct(v.default,s,"distanceDisplayCondition",r.distanceDisplayCondition,o,n,i),ct(k.default,s,"classificationType",r.classificationType,o,n,i),ct(Number,s,"zIndex",r.zIndex,o,n,i)}},function(e,t,i,n){var r=t.polyline;if(Object(_.default)(r)){var o,s,l=ot(r.interval),u=e.polyline;if(Object(_.default)(u)||(e.polyline=u=new xe.a),ct(Boolean,u,"show",r.show,l,n,i),wt(u,"positions",r.positions,i),ct(Number,u,"width",r.width,l,n,i),ct(Number,u,"granularity",r.granularity,l,n,i),_t(u,"material",r.material,l,n,i),_t(u,"depthFailMaterial",r.depthFailMaterial,l,n,i),ct(a.default,u,"arcType",r.arcType,l,n,i),ct(Boolean,u,"clampToGround",r.clampToGround,l,n,i),ct(G.a,u,"shadows",r.shadows,l,n,i),ct(v.default,u,"distanceDisplayCondition",r.distanceDisplayCondition,l,n,i),ct(k.default,u,"classificationType",r.classificationType,l,n,i),ct(Number,u,"zIndex",r.zIndex,l,n,i),Object(_.default)(r.followSurface)&&!Object(_.default)(r.arcType)){var d={};ct(Boolean,d,"followSurface",r.followSurface,l,n,i),u.arcType=(o=d.followSurface,s=Mt,new J.a((function(e,t){return s(o.getValue(e,t))}),o.isConstant))}}},function(e,t,i,n){var a=t.polylineVolume;if(Object(_.default)(a)){var r=ot(a.interval),o=e.polylineVolume;Object(_.default)(o)||(e.polylineVolume=o=new Te.a),wt(o,"positions",a.positions,i),function(e,t,i,n){if(Object(_.default)(i))if(Array.isArray(i))for(var a=0,r=i.length;a<r;a++)pt(e,t,i[a],n);else pt(e,t,i,n)}(o,"shape",a.shape,i),ct(Boolean,o,"show",a.show,r,n,i),ct(f.a,o,"cornerType",a.cornerType,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(Number,o,"granularity",a.granularity,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.properties;if(Object(_.default)(a))for(var r in Object(_.default)(e.properties)||(e.properties=new Me.a),a)if(a.hasOwnProperty(r)){e.properties.hasProperty(r)||e.properties.addProperty(r);var o=a[r];if(Array.isArray(o))for(var s=0,l=o.length;s<l;++s)dt(tt(o[s]),e.properties,r,o[s],void 0,n,i);else dt(tt(o),e.properties,r,o,void 0,n,i)}},function(e,t,i,n){var a=t.rectangle;if(Object(_.default)(a)){var r=ot(a.interval),o=e.rectangle;Object(_.default)(o)||(e.rectangle=o=new De.a),ct(Boolean,o,"show",a.show,r,n,i),ct(I.default,o,"coordinates",a.coordinates,r,n,i),ct(Number,o,"height",a.height,r,n,i),ct(U.a,o,"heightReference",a.heightReference,r,n,i),ct(Number,o,"extrudedHeight",a.extrudedHeight,r,n,i),ct(U.a,o,"extrudedHeightReference",a.extrudedHeightReference,r,n,i),ct(Ie.a,o,"rotation",a.rotation,r,n,i),ct(Ie.a,o,"stRotation",a.stRotation,r,n,i),ct(Number,o,"granularity",a.granularity,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i),ct(k.default,o,"classificationType",a.classificationType,r,n,i),ct(Number,o,"zIndex",a.zIndex,r,n,i)}},function(e,t,i,n){var a=t.position;Object(_.default)(a)&&ht(e,"position",a,void 0,0,i)},function(e,t,i,n){var a=t.tileset;if(Object(_.default)(a)){var r=ot(a.interval),o=e.tileset;Object(_.default)(o)||(e.tileset=o=new Ve.a),ct(Boolean,o,"show",a.show,r,n,i),ct(W.a,o,"uri",a.uri,r,n,i),ct(Number,o,"maximumScreenSpaceError",a.maximumScreenSpaceError,r,n,i)}},function(e,t,i,n){var a=t.viewFrom;Object(_.default)(a)&&ct(s.default,e,"viewFrom",a,void 0,n,i)},function(e,t,i,n){var a=t.wall;if(Object(_.default)(a)){var r=ot(a.interval),o=e.wall;Object(_.default)(o)||(e.wall=o=new Ue.a),ct(Boolean,o,"show",a.show,r,n,i),wt(o,"positions",a.positions,i),yt(o,"minimumHeights",a.minimumHeights,i),yt(o,"maximumHeights",a.maximumHeights,i),ct(Number,o,"granularity",a.granularity,r,n,i),ct(Boolean,o,"fill",a.fill,r,n,i),_t(o,"material",a.material,r,n,i),ct(Boolean,o,"outline",a.outline,r,n,i),ct(c.default,o,"outlineColor",a.outlineColor,r,n,i),ct(Number,o,"outlineWidth",a.outlineWidth,r,n,i),ct(G.a,o,"shadows",a.shadows,r,n,i),ct(v.default,o,"distanceDisplayCondition",a.distanceDisplayCondition,r,n,i)}},function(e,t,i,n){var a=t.orientation;Object(_.default)(a)&&ct(P.default,e,"orientation",a,void 0,n,i)},function(e,t,i,n){var a=t.availability;if(Object(_.default)(a)){var r;if(Array.isArray(a))for(var o=0,s=a.length;o<s;++o)Object(_.default)(r)||(r=new F.default),r.addInterval(ot(a[o]));else(r=new F.default).addInterval(ot(a));e.availability=r}}],Lt.prototype.process=function(e,t){return Pt(this,e,t,!1)},Lt.prototype.load=function(e,t){return Pt(this,e,t,!0)},Lt.prototype.update=function(e){return!0},Lt.processPacketData=ct,Lt.processPositionPacketData=ht,Lt.processMaterialPacketData=_t,Lt._processCzml=function(e,t,i,n,a){if(n=Object(m.default)(n,Lt.updaters),Array.isArray(e))for(var r=0,o=e.length;r<o;++r)Dt(e[r],t,n,i,a);else Dt(e,t,n,i,a)},t.default=Lt},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=function(e){null==e&&(e=(new Date).getTime()),this.N=624,this.M=397,this.MATRIX_A=2567483615,this.UPPER_MASK=2147483648,this.LOWER_MASK=2147483647,this.mt=new Array(this.N),this.mti=this.N+1,e.constructor==Array?this.init_by_array(e,e.length):this.init_seed(e)};n.prototype.init_seed=function(e){for(this.mt[0]=e>>>0,this.mti=1;this.mti<this.N;this.mti++){e=this.mt[this.mti-1]^this.mt[this.mti-1]>>>30;this.mt[this.mti]=(1812433253*((4294901760&e)>>>16)<<16)+1812433253*(65535&e)+this.mti,this.mt[this.mti]>>>=0}},n.prototype.init_by_array=function(e,t){var i,n,a;for(this.init_seed(19650218),i=1,n=0,a=this.N>t?this.N:t;a;a--){var r=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1664525*((4294901760&r)>>>16)<<16)+1664525*(65535&r))+e[n]+n,this.mt[i]>>>=0,n++,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1),n>=t&&(n=0)}for(a=this.N-1;a;a--){r=this.mt[i-1]^this.mt[i-1]>>>30;this.mt[i]=(this.mt[i]^(1566083941*((4294901760&r)>>>16)<<16)+1566083941*(65535&r))-i,this.mt[i]>>>=0,++i>=this.N&&(this.mt[0]=this.mt[this.N-1],i=1)}this.mt[0]=2147483648},n.prototype.random_int=function(){var e,t=new Array(0,this.MATRIX_A);if(this.mti>=this.N){var i;for(this.mti==this.N+1&&this.init_seed(5489),i=0;i<this.N-this.M;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+this.M]^e>>>1^t[1&e];for(;i<this.N-1;i++)e=this.mt[i]&this.UPPER_MASK|this.mt[i+1]&this.LOWER_MASK,this.mt[i]=this.mt[i+(this.M-this.N)]^e>>>1^t[1&e];e=this.mt[this.N-1]&this.UPPER_MASK|this.mt[0]&this.LOWER_MASK,this.mt[this.N-1]=this.mt[this.M-1]^e>>>1^t[1&e],this.mti=0}return e=this.mt[this.mti++],e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,(e^=e>>>18)>>>0},n.prototype.random_int31=function(){return this.random_int()>>>1},n.prototype.random_incl=function(){return this.random_int()*(1/4294967295)},n.prototype.random=function(){return this.random_int()*(1/4294967296)},n.prototype.random_excl=function(){return(this.random_int()+.5)*(1/4294967296)},n.prototype.random_long=function(){return(67108864*(this.random_int()>>>5)+(this.random_int()>>>6))*(1/9007199254740992)};var a=n},function(e,t,i){"use strict";var n=i(115),a=i(0),r=i(3),o={},s={};o.add=function(e,t){if(!Object(a.default)(e))throw new r.default("host is required.");if(!Object(a.default)(t)||t<=0)throw new r.default("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;Object(a.default)(s[i])||(s[i]=!0)},o.remove=function(e,t){if(!Object(a.default)(e))throw new r.default("host is required.");if(!Object(a.default)(t)||t<=0)throw new r.default("port is required to be greater than 0.");var i=e.toLowerCase()+":"+t;Object(a.default)(s[i])&&delete s[i]},o.contains=function(e){if(!Object(a.default)(e))throw new r.default("url is required.");var t=function(e){var t=new n.a(e);t.normalize();var i=t.authority();if(0!==i.length){if(t.authority(i),-1!==i.indexOf("@")){var a=i.split("@");i=a[1]}if(-1===i.indexOf(":")){var r=t.scheme();if(0===r.length&&(r=(r=window.location.protocol).substring(0,r.length-1)),"http"===r)i+=":80";else{if("https"!==r)return;i+=":443"}}return i}}(e);return!(!Object(a.default)(t)||!Object(a.default)(s[t]))},o.clear=function(){s={}},t.a=o},function(e,t,i){"use strict";var n=i(53),a=i(60),r=i(2),o=i(0),s=i(19),l=i(3),u=i(43),d=i(44),c=i(26),f=i(39),h=i(67),p=i(34),m=i(730),_=i(398),g=i(18),v=i(74),y=i(97),b=i(223),w=i(61),O=i(64),x=i(13),A=i(271),T=i(81),E=i(122),C=i(66);function S(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).geometryInstances;this.geometryInstances=t,this.show=Object(r.default)(e.show,!0),this.classificationType=Object(r.default)(e.classificationType,y.default.BOTH),this.debugShowBoundingVolume=Object(r.default)(e.debugShowBoundingVolume,!1),this.debugShowShadowVolume=Object(r.default)(e.debugShowShadowVolume,!1),this._debugShowShadowVolume=!1,this._extruded=Object(r.default)(e._extruded,!1),this._uniformMap=e._uniformMap,this._sp=void 0,this._spStencil=void 0,this._spPick=void 0,this._spColor=void 0,this._spPick2D=void 0,this._spColor2D=void 0,this._rsStencilDepthPass=void 0,this._rsStencilDepthPass3DTiles=void 0,this._rsColorPass=void 0,this._rsPickPass=void 0,this._commandsIgnoreShow=[],this._ready=!1,this._readyPromise=g.a.defer(),this._primitive=void 0,this._pickPrimitive=e._pickPrimitive,this._hasSphericalExtentsAttribute=!1,this._hasPlanarExtentsAttributes=!1,this._hasPerColorAttribute=!1,this.appearance=e.appearance,this._createBoundingVolumeFunction=e._createBoundingVolumeFunction,this._updateAndQueueCommandsFunction=e._updateAndQueueCommandsFunction,this._usePickOffsets=!1,this._primitiveOptions={geometryInstances:void 0,appearance:void 0,vertexCacheOptimize:Object(r.default)(e.vertexCacheOptimize,!1),interleave:Object(r.default)(e.interleave,!1),releaseGeometryInstances:Object(r.default)(e.releaseGeometryInstances,!0),allowPicking:Object(r.default)(e.allowPicking,!0),asynchronous:Object(r.default)(e.asynchronous,!0),compressVertices:Object(r.default)(e.compressVertices,!0),_createBoundingVolumeFunction:void 0,_createRenderStatesFunction:void 0,_createShaderProgramFunction:void 0,_createCommandsFunction:void 0,_updateAndQueueCommandsFunction:void 0,_createPickOffsets:!0}}function M(e,t){var i=t?E.a.EQUAL:E.a.ALWAYS;return{colorMask:{red:!1,green:!1,blue:!1,alpha:!1},stencilTest:{enabled:e,frontFunction:i,frontOperation:{fail:C.a.KEEP,zFail:C.a.DECREMENT_WRAP,zPass:C.a.KEEP},backFunction:i,backOperation:{fail:C.a.KEEP,zFail:C.a.INCREMENT_WRAP,zPass:C.a.KEEP},reference:T.a.CESIUM_3D_TILE_MASK,mask:T.a.CESIUM_3D_TILE_MASK},stencilMask:T.a.CLASSIFICATION_MASK,depthTest:{enabled:!0,func:b.a.LESS_OR_EQUAL},depthMask:!1}}function D(e){return{stencilTest:{enabled:e,frontFunction:E.a.NOT_EQUAL,frontOperation:{fail:C.a.ZERO,zFail:C.a.ZERO,zPass:C.a.ZERO},backFunction:E.a.NOT_EQUAL,backOperation:{fail:C.a.ZERO,zFail:C.a.ZERO,zPass:C.a.ZERO},reference:0,mask:T.a.CLASSIFICATION_MASK},stencilMask:T.a.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1,blending:v.default.PRE_MULTIPLIED_ALPHA_BLEND}}Object.defineProperties(S.prototype,{vertexCacheOptimize:{get:function(){return this._primitiveOptions.vertexCacheOptimize}},interleave:{get:function(){return this._primitiveOptions.interleave}},releaseGeometryInstances:{get:function(){return this._primitiveOptions.releaseGeometryInstances}},allowPicking:{get:function(){return this._primitiveOptions.allowPicking}},asynchronous:{get:function(){return this._primitiveOptions.asynchronous}},compressVertices:{get:function(){return this._primitiveOptions.compressVertices}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},_needs2DShader:{get:function(){return this._hasPlanarExtentsAttributes||this._hasSphericalExtentsAttribute}}}),S.isSupported=function(e){return e.context.stencilBuffer};var P={stencilTest:{enabled:!0,frontFunction:E.a.NOT_EQUAL,frontOperation:{fail:C.a.ZERO,zFail:C.a.ZERO,zPass:C.a.ZERO},backFunction:E.a.NOT_EQUAL,backOperation:{fail:C.a.ZERO,zFail:C.a.ZERO,zPass:C.a.ZERO},reference:0,mask:T.a.CLASSIFICATION_MASK},stencilMask:T.a.CLASSIFICATION_MASK,depthTest:{enabled:!1},depthMask:!1};function I(e,t){var i=t.context,n=e._primitive,a=m.a;a=e._primitive._batchTable.getVertexShaderCallback()(a),a=O.default._appendDistanceDisplayConditionToShader(n,a),a=O.default._modifyShaderPosition(e,a,t.scene3DOnly),a=O.default._updateColorAttribute(n,a);var r=e._hasPlanarExtentsAttributes,s=r||e._hasSphericalExtentsAttribute;e._extruded&&(a=function(e,t){if(!e.compressVertices)return t;if(-1!==t.search(/attribute\s+vec3\s+extrudeDirection;/g)){var i="attribute vec2 compressedAttributes;",n=t;return n=n.replace(/attribute\s+vec3\s+extrudeDirection;/g,""),[i,"vec3 extrudeDirection;\n",n=p.default.replaceMain(n,"czm_non_compressed_main"),"void main() \n{ \n extrudeDirection = czm_octDecode(compressedAttributes, 65535.0);\n czm_non_compressed_main(); \n}"].join("\n")}}(n,a));var l=e._extruded?"EXTRUDED_GEOMETRY":"",u=new p.default({defines:[l],sources:[a]}),d=new p.default({sources:[_.a]}),c=e._primitive._attributeLocations,f=new A.a(s,r,e.appearance);if(e._spStencil=h.default.replaceCache({context:i,shaderProgram:e._spStencil,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:c}),e._primitive.allowPicking){var g=p.default.createPickVertexShaderSource(a);g=O.default._appendShowToShader(n,g),g=O.default._updatePickColorAttribute(g);var v=f.createPickFragmentShader(!1),y=f.createPickVertexShader([l],g,!1,t.mapProjection);if(e._spPick=h.default.replaceCache({context:i,shaderProgram:e._spPick,vertexShaderSource:y,fragmentShaderSource:v,attributeLocations:c}),s){var b=i.shaderCache.getDerivedShaderProgram(e._spPick,"2dPick");if(!Object(o.default)(b)){var w=f.createPickFragmentShader(!0),x=f.createPickVertexShader([l],g,!0,t.mapProjection);b=i.shaderCache.createDerivedShaderProgram(e._spPick,"2dPick",{vertexShaderSource:x,fragmentShaderSource:w,attributeLocations:c})}e._spPick2D=b}}else e._spPick=h.default.fromCache({context:i,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:c});a=O.default._appendShowToShader(n,a),u=new p.default({defines:[l],sources:[a]}),e._sp=h.default.replaceCache({context:i,shaderProgram:e._sp,vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:c});var T=f.createFragmentShader(!1),E=f.createVertexShader([l],a,!1,t.mapProjection);if(e._spColor=h.default.replaceCache({context:i,shaderProgram:e._spColor,vertexShaderSource:E,fragmentShaderSource:T,attributeLocations:c}),s){var C=i.shaderCache.getDerivedShaderProgram(e._spColor,"2dColor");if(!Object(o.default)(C)){var S=f.createFragmentShader(!0),M=f.createVertexShader([l],a,!0,t.mapProjection);C=i.shaderCache.createDerivedShaderProgram(e._spColor,"2dColor",{vertexShaderSource:M,fragmentShaderSource:S,attributeLocations:c})}e._spColor2D=C}}function L(e,t,i,n,r,s,l){!function(e,t){var i,n,r,s=e._primitive,l=2*s._va.length;t.length=l;var u=0,f=s._batchTable.getUniformMapCallback()(e._uniformMap),h=e._needs2DShader;for(i=0;i<l;i+=2){var p=s._va[u++];n=t[i],Object(o.default)(n)||(n=t[i]=new d.default({owner:e,primitiveType:s._primitiveType})),n.vertexArray=p,n.renderState=e._rsStencilDepthPass,n.shaderProgram=e._sp,n.uniformMap=f,n.pass=c.default.TERRAIN_CLASSIFICATION,(r=d.default.shallowClone(n,n.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,r.pass=c.default.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r,n=t[i+1],Object(o.default)(n)||(n=t[i+1]=new d.default({owner:e,primitiveType:s._primitiveType})),n.vertexArray=p,n.renderState=e._rsColorPass,n.shaderProgram=e._spColor,n.pass=c.default.TERRAIN_CLASSIFICATION;var m=e.appearance.material;if(Object(o.default)(m)&&(f=Object(a.default)(f,m._uniforms)),n.uniformMap=f,(r=d.default.shallowClone(n,n.derivedCommands.tileset)).pass=c.default.CESIUM_3D_TILE_CLASSIFICATION,n.derivedCommands.tileset=r,h){var _=d.default.shallowClone(n,n.derivedCommands.appearance2D);_.shaderProgram=e._spColor2D,n.derivedCommands.appearance2D=_,(_=d.default.shallowClone(r,r.derivedCommands.appearance2D)).shaderProgram=e._spColor2D,r.derivedCommands.appearance2D=_}}var g=e._commandsIgnoreShow,v=e._spStencil,y=0;l=g.length=l/2;for(var b=0;b<l;++b){var w=g[b]=d.default.shallowClone(t[y],g[b]);w.shaderProgram=v,w.pass=c.default.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW,y+=2}}(e,s),function(e,t){var i,n,a,r,s,l=e._usePickOffsets,u=e._primitive,f=2*u._va.length,h=0;l&&(f=2*(i=u._pickOffsets).length),t.length=f;var p=0,m=u._batchTable.getUniformMapCallback()(e._uniformMap),_=e._needs2DShader;for(a=0;a<f;a+=2){var g=u._va[p++];if(l&&(n=i[h++],g=u._va[n.index]),r=t[a],Object(o.default)(r)||(r=t[a]=new d.default({owner:e,primitiveType:u._primitiveType,pickOnly:!0})),r.vertexArray=g,r.renderState=e._rsStencilDepthPass,r.shaderProgram=e._sp,r.uniformMap=m,r.pass=c.default.TERRAIN_CLASSIFICATION,l&&(r.offset=n.offset,r.count=n.count),(s=d.default.shallowClone(r,r.derivedCommands.tileset)).renderState=e._rsStencilDepthPass3DTiles,s.pass=c.default.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,r=t[a+1],Object(o.default)(r)||(r=t[a+1]=new d.default({owner:e,primitiveType:u._primitiveType,pickOnly:!0})),r.vertexArray=g,r.renderState=e._rsPickPass,r.shaderProgram=e._spPick,r.uniformMap=m,r.pass=c.default.TERRAIN_CLASSIFICATION,l&&(r.offset=n.offset,r.count=n.count),(s=d.default.shallowClone(r,r.derivedCommands.tileset)).pass=c.default.CESIUM_3D_TILE_CLASSIFICATION,r.derivedCommands.tileset=s,_){var v=d.default.shallowClone(r,r.derivedCommands.pick2D);v.shaderProgram=e._spPick2D,r.derivedCommands.pick2D=v,(v=d.default.shallowClone(s,s.derivedCommands.pick2D)).shaderProgram=e._spPick2D,s.derivedCommands.pick2D=v}}}(e,l)}function j(e,t){return Math.floor(e%t/2)}function R(e,t,i,n,a,r){e.modelMatrix=i,e.boundingVolume=a,e.cull=n,e.debugShowBoundingVolume=r,t.commandList.push(e)}function N(e,t,i,n,a){e.modelMatrix=i,e.boundingVolume=a,e.cull=n,t.commandList.push(e)}S.prototype.update=function(e){if(Object(o.default)(this._primitive)||Object(o.default)(this.geometryInstances)){var t=this.appearance;Object(o.default)(t)&&Object(o.default)(t.material)&&t.material.update(e.context);var i=this,a=this._primitiveOptions;if(!Object(o.default)(this._primitive)){var s,d,c,h,p=Array.isArray(this.geometryInstances)?this.geometryInstances:[this.geometryInstances],m=p.length,_=!1,g=!0,v=!1,b=!1;for(m>0&&(c=p[0].attributes,v=A.a.hasAttributesForSphericalExtents(c),b=A.a.hasAttributesForTextureCoordinatePlanes(c),h=c.color),s=0;s<m;s++){var T=(d=p[s]).attributes.color;if(Object(o.default)(T))_=!0;else if(_)throw new l.default("All GeometryInstances must have color attributes to use per-instance color.");g=g&&Object(o.default)(T)&&n.default.equals(h,T)}if(!g&&!v&&!b)throw new l.default("All GeometryInstances must have the same color attribute except via GroundPrimitives");if(_&&!Object(o.default)(t)&&(t=new w.default({flat:!0}),this.appearance=t),!_&&t instanceof w.default)throw new l.default("PerInstanceColorAppearance requires color GeometryInstanceAttributes on all GeometryInstances");if(Object(o.default)(t.material)&&!v&&!b)throw new l.default("Materials on ClassificationPrimitives are not supported except via GroundPrimitives");this._usePickOffsets=!v&&!b,this._hasSphericalExtentsAttribute=v,this._hasPlanarExtentsAttributes=b,this._hasPerColorAttribute=_;var E=new Array(m);for(s=0;s<m;++s)d=p[s],E[s]=new u.default({geometry:d.geometry,attributes:d.attributes,modelMatrix:d.modelMatrix,id:d.id,pickPrimitive:Object(r.default)(this._pickPrimitive,i)});a.appearance=t,a.geometryInstances=E,Object(o.default)(this._createBoundingVolumeFunction)&&(a._createBoundingVolumeFunction=function(e,t){i._createBoundingVolumeFunction(e,t)}),a._createRenderStatesFunction=function(e,t,n,a){!function(e,t,i,n){if(!Object(o.default)(e._rsStencilDepthPass)){var a=!e.debugShowShadowVolume;e._rsStencilDepthPass=f.default.fromCache(M(a,!1)),e._rsStencilDepthPass3DTiles=f.default.fromCache(M(a,!0)),e._rsColorPass=f.default.fromCache(D(a)),e._rsPickPass=f.default.fromCache(P)}}(i)},a._createShaderProgramFunction=function(e,t,n){I(i,t)},a._createCommandsFunction=function(e,t,n,a,r,o,s){L(i,0,0,0,0,o,s)},Object(o.default)(this._updateAndQueueCommandsFunction)?a._updateAndQueueCommandsFunction=function(e,t,n,a,r,o,s,l){i._updateAndQueueCommandsFunction(e,t,n,a,r,o,s,l)}:a._updateAndQueueCommandsFunction=function(e,t,n,a,r,s,l,u){!function(e,t,i,n,a,r,s,l){var u,d=e._primitive;O.default._updateBoundingVolumes(d,t,a),t.mode===x.default.SCENE3D?u=d._boundingSphereWC:t.mode===x.default.COLUMBUS_VIEW?u=d._boundingSphereCV:t.mode===x.default.SCENE2D&&Object(o.default)(d._boundingSphere2D)?u=d._boundingSphere2D:Object(o.default)(d._boundingSphereMorph)&&(u=d._boundingSphereMorph);var c,f,h=e.classificationType,p=h!==y.default.CESIUM_3D_TILE,m=h!==y.default.TERRAIN,_=t.passes;if(_.render){var g=i.length;for(c=0;c<g;++c)f=u[j(c,g)],p&&R(i[c],t,a,r,f,s),m&&R(i[c].derivedCommands.tileset,t,a,r,f,s);if(t.invertClassification){var v=e._commandsIgnoreShow,b=v.length;for(c=0;c<b;++c)f=u[c],R(v[c],t,a,r,f,s)}}if(_.pick){var w=n.length,A=d._pickOffsets;for(c=0;c<w;++c){f=u[A[j(c,w)].index],p&&N(n[c],t,a,r,f),m&&N(n[c].derivedCommands.tileset,t,a,r,f)}}}(i,t,n,a,r,s,l)},this._primitive=new O.default(a),this._primitive.readyPromise.then((function(e){i._ready=!0,i.releaseGeometryInstances&&(i.geometryInstances=void 0);var t=e._error;Object(o.default)(t)?i._readyPromise.reject(t):i._readyPromise.resolve(i)}))}if(this.debugShowShadowVolume&&!this._debugShowShadowVolume&&this._ready?(this._debugShowShadowVolume=!0,this._rsStencilDepthPass=f.default.fromCache(M(!1,!1)),this._rsStencilDepthPass3DTiles=f.default.fromCache(M(!1,!0)),this._rsColorPass=f.default.fromCache(D(!1))):!this.debugShowShadowVolume&&this._debugShowShadowVolume&&(this._debugShowShadowVolume=!1,this._rsStencilDepthPass=f.default.fromCache(M(!0,!1)),this._rsStencilDepthPass3DTiles=f.default.fromCache(M(!0,!0)),this._rsColorPass=f.default.fromCache(D(!0))),this._primitive.appearance!==t){if(!this._hasSphericalExtentsAttribute&&!this._hasPlanarExtentsAttributes&&Object(o.default)(t.material))throw new l.default("Materials on ClassificationPrimitives are not supported except via GroundPrimitive");if(!this._hasPerColorAttribute&&t instanceof w.default)throw new l.default("PerInstanceColorAppearance requires color GeometryInstanceAttribute");this._primitive.appearance=t}this._primitive.show=this.show,this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.update(e)}},S.prototype.getGeometryInstanceAttributes=function(e){if(!Object(o.default)(this._primitive))throw new l.default("must call update before calling getGeometryInstanceAttributes");return this._primitive.getGeometryInstanceAttributes(e)},S.prototype.isDestroyed=function(){return!1},S.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),this._sp=this._sp&&this._sp.destroy(),this._spPick=this._spPick&&this._spPick.destroy(),this._spColor=this._spColor&&this._spColor.destroy(),this._spPick2D=void 0,this._spColor2D=void 0,Object(s.default)(this)},t.a=S},function(e,t,i){"use strict";t.a="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\n#ifdef NORMAL_EC\nvec3 getEyeCoordinate3FromWindowCoordinate(vec2 fragCoord, float logDepthOrDepth) {\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(fragCoord, logDepthOrDepth);\n return eyeCoordinate.xyz / eyeCoordinate.w;\n}\n\nvec3 vectorFromOffset(vec4 eyeCoordinate, vec2 positiveOffset) {\n vec2 glFragCoordXY = gl_FragCoord.xy;\n // Sample depths at both offset and negative offset\n float upOrRightLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY + positiveOffset) / czm_viewport.zw));\n float downOrLeftLogDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, (glFragCoordXY - positiveOffset) / czm_viewport.zw));\n // Explicitly evaluate both paths\n // Necessary for multifrustum and for edges of the screen\n bvec2 upOrRightInBounds = lessThan(glFragCoordXY + positiveOffset, czm_viewport.zw);\n float useUpOrRight = float(upOrRightLogDepth > 0.0 && upOrRightInBounds.x && upOrRightInBounds.y);\n float useDownOrLeft = float(useUpOrRight == 0.0);\n vec3 upOrRightEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY + positiveOffset, upOrRightLogDepth);\n vec3 downOrLeftEC = getEyeCoordinate3FromWindowCoordinate(glFragCoordXY - positiveOffset, downOrLeftLogDepth);\n return (upOrRightEC - (eyeCoordinate.xyz / eyeCoordinate.w)) * useUpOrRight + ((eyeCoordinate.xyz / eyeCoordinate.w) - downOrLeftEC) * useDownOrLeft;\n}\n#endif // NORMAL_EC\n\nvoid main(void)\n{\n#ifdef REQUIRES_EC\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n#endif\n\n#ifdef REQUIRES_WC\n vec4 worldCoordinate4 = czm_inverseView * eyeCoordinate;\n vec3 worldCoordinate = worldCoordinate4.xyz / worldCoordinate4.w;\n#endif\n\n#ifdef TEXTURE_COORDINATES\n vec2 uv;\n#ifdef SPHERICAL\n // Treat world coords as a sphere normal for spherical coordinates\n vec2 sphericalLatLong = czm_approximateSphericalCoordinates(worldCoordinate);\n sphericalLatLong.y += v_uvMinAndSphericalLongitudeRotation.z;\n sphericalLatLong.y = czm_branchFreeTernary(sphericalLatLong.y < czm_pi, sphericalLatLong.y, sphericalLatLong.y - czm_twoPi);\n uv.x = (sphericalLatLong.y - v_sphericalExtents.y) * v_sphericalExtents.w;\n uv.y = (sphericalLatLong.x - v_sphericalExtents.x) * v_sphericalExtents.z;\n#else // SPHERICAL\n // Unpack planes and transform to eye space\n uv.x = czm_planeDistance(v_westPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.x;\n uv.y = czm_planeDistance(v_southPlane, eyeCoordinate.xyz / eyeCoordinate.w) * v_inversePlaneExtents.y;\n#endif // SPHERICAL\n#endif // TEXTURE_COORDINATES\n\n#ifdef PICK\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n // Check for logDepthOrDepth != 0.0 to make sure this should be classified.\n if (0.0 <= uv.x && uv.x <= 1.0 && 0.0 <= uv.y && uv.y <= 1.0 || logDepthOrDepth != 0.0) {\n gl_FragColor.a = 1.0; // 0.0 alpha leads to discard from ShaderSource.createPickFragmentShaderSource\n czm_writeDepthClamp();\n }\n#else // CULL_FRAGMENTS\n gl_FragColor.a = 1.0;\n#endif // CULL_FRAGMENTS\n#else // PICK\n\n#ifdef CULL_FRAGMENTS\n // When classifying translucent geometry, logDepthOrDepth == 0.0\n // indicates a region that should not be classified, possibly due to there\n // being opaque pixels there in another buffer.\n if (uv.x <= 0.0 || 1.0 <= uv.x || uv.y <= 0.0 || 1.0 <= uv.y || logDepthOrDepth == 0.0) {\n discard;\n }\n#endif\n\n#ifdef NORMAL_EC\n // Compute normal by sampling adjacent pixels in 2x2 block in screen space\n vec3 downUp = vectorFromOffset(eyeCoordinate, vec2(0.0, 1.0));\n vec3 leftRight = vectorFromOffset(eyeCoordinate, vec2(1.0, 0.0));\n vec3 normalEC = normalize(cross(leftRight, downUp));\n#endif\n\n\n#ifdef PER_INSTANCE_COLOR\n\n vec4 color = czm_gammaCorrect(v_color);\n#ifdef FLAT\n gl_FragColor = color;\n#else // FLAT\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n gl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n gl_FragColor.rgb *= gl_FragColor.a;\n\n#else // PER_INSTANCE_COLOR\n\n // Material support.\n // USES_ is distinct from REQUIRES_, because some things are dependencies of each other or\n // dependencies for culling but might not actually be used by the material.\n\n czm_materialInput materialInput;\n\n#ifdef USES_NORMAL_EC\n materialInput.normalEC = normalEC;\n#endif\n\n#ifdef USES_POSITION_TO_EYE_EC\n materialInput.positionToEyeEC = -eyeCoordinate.xyz;\n#endif\n\n#ifdef USES_TANGENT_TO_EYE\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(worldCoordinate, normalEC);\n#endif\n\n#ifdef USES_ST\n // Remap texture coordinates from computed (approximately aligned with cartographic space) to the desired\n // texture coordinate system, which typically forms a tight oriented bounding box around the geometry.\n // Shader is provided a set of reference points for remapping.\n materialInput.st.x = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_uMaxAndInverseDistance.xy, uv) * v_uMaxAndInverseDistance.z;\n materialInput.st.y = czm_lineDistance(v_uvMinAndSphericalLongitudeRotation.xy, v_vMaxAndInverseDistance.xy, uv) * v_vMaxAndInverseDistance.z;\n#endif\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else // FLAT\n gl_FragColor = czm_phong(normalize(-eyeCoordinate.xyz), material, czm_lightDirectionEC);\n#endif // FLAT\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n gl_FragColor.rgb *= gl_FragColor.a;\n\n#endif // PER_INSTANCE_COLOR\n czm_writeDepthClamp();\n#endif // PICK\n}\n"},function(e,t,i){"use strict";var n,a=i(0);function r(e){}r.prototype.isReady=function(){return!0},r.prototype.shouldDiscardImage=function(e){return r.EMPTY_IMAGE===e},Object.defineProperties(r,{EMPTY_IMAGE:{get:function(){return Object(a.default)(n)||((n=new Image).src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="),n}}}),t.a=r},function(e,t,i){"use strict";var n=i(395),a=i(17),r=i(8),o=i(1),s=i(2),l=i(0),u=i(3),d=i(15),c=i(329),f=i(5),h=i(6),p=i(123),m=i(21),_=i(225),g=i(52),v=i(135),y={};y.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var b=new o.default,w=new h.default,O=new o.default,x=new o.default;y.computeVertices=function(e){if(!Object(l.default)(e)||!Object(l.default)(e.heightmap))throw new u.default("options.heightmap is required.");if(!Object(l.default)(e.width)||!Object(l.default)(e.height))throw new u.default("options.width and options.height are required.");if(!Object(l.default)(e.nativeRectangle))throw new u.default("options.nativeRectangle is required.");if(!Object(l.default)(e.skirtHeight))throw new u.default("options.skirtHeight is required.");var t,i,A,T,E=Math.cos,C=Math.sin,S=Math.sqrt,M=Math.atan,D=Math.exp,P=f.default.PI_OVER_TWO,I=f.default.toRadians,L=e.heightmap,j=e.width,R=e.height,N=e.skirtHeight,B=N>0,F=Object(s.default)(e.isGeographic,!0),k=Object(s.default)(e.ellipsoid,d.default.WGS84),z=1/k.maximumRadius,U=m.default.clone(e.nativeRectangle),V=m.default.clone(e.rectangle);Object(l.default)(V)?(t=V.west,i=V.south,A=V.east,T=V.north):F?(t=I(U.west),i=I(U.south),A=I(U.east),T=I(U.north)):(t=U.west*z,i=P-2*M(D(-U.south*z)),A=U.east*z,T=P-2*M(D(-U.north*z)));var H=e.relativeToCenter,G=Object(l.default)(H);H=G?H:o.default.ZERO;var Y=Object(s.default)(e.includeWebMercatorT,!1),W=Object(s.default)(e.exaggeration,1),q=Object(s.default)(e.exaggerationRelativeHeight,0),X=1!==W,K=Object(s.default)(e.structure,y.DEFAULT_STRUCTURE),J=Object(s.default)(K.heightScale,y.DEFAULT_STRUCTURE.heightScale),Z=Object(s.default)(K.heightOffset,y.DEFAULT_STRUCTURE.heightOffset),Q=Object(s.default)(K.elementsPerHeight,y.DEFAULT_STRUCTURE.elementsPerHeight),$=Object(s.default)(K.stride,y.DEFAULT_STRUCTURE.stride),ee=Object(s.default)(K.elementMultiplier,y.DEFAULT_STRUCTURE.elementMultiplier),te=Object(s.default)(K.isBigEndian,y.DEFAULT_STRUCTURE.isBigEndian),ie=m.default.computeWidth(U),ne=m.default.computeHeight(U),ae=ie/(j-1),re=ne/(R-1);F||(ie*=z,ne*=z);var oe,se,le=k.radiiSquared,ue=le.x,de=le.y,ce=le.z,fe=65536,he=-65536,pe=g.default.eastNorthUpToFixedFrame(H,k),me=h.default.inverseTransformation(pe,w);Y&&(oe=v.a.geodeticLatitudeToMercatorAngle(i),se=1/(v.a.geodeticLatitudeToMercatorAngle(T)-oe));var _e=O;_e.x=Number.POSITIVE_INFINITY,_e.y=Number.POSITIVE_INFINITY,_e.z=Number.POSITIVE_INFINITY;var ge=x;ge.x=Number.NEGATIVE_INFINITY,ge.y=Number.NEGATIVE_INFINITY,ge.z=Number.NEGATIVE_INFINITY;var ve=Number.POSITIVE_INFINITY,ye=j*R,be=ye+(N>0?2*j+2*R:0),we=new Array(be),Oe=new Array(be),xe=new Array(be),Ae=Y?new Array(be):[],Te=X?new Array(be):[],Ee=0,Ce=R,Se=0,Me=j;B&&(--Ee,++Ce,--Se,++Me);for(var De=Ee;De<Ce;++De){var Pe=De;Pe<0&&(Pe=0),Pe>=R&&(Pe=R-1);var Ie=U.north-re*Pe,Le=((Ie=F?I(Ie):P-2*M(D(-Ie*z)))-i)/(T-i);Le=f.default.clamp(Le,0,1);var je=De===Ee,Re=De===Ce-1;N>0&&(je?Ie+=1e-5*ne:Re&&(Ie-=1e-5*ne));var Ne,Be=E(Ie),Fe=C(Ie),ke=ce*Fe;Y&&(Ne=(v.a.geodeticLatitudeToMercatorAngle(Ie)-oe)*se);for(var ze=Se;ze<Me;++ze){var Ue=ze;Ue<0&&(Ue=0),Ue>=j&&(Ue=j-1);var Ve,He,Ge=Pe*(j*$)+Ue*$;if(1===Q)Ve=L[Ge];else if(Ve=0,te)for(He=0;He<Q;++He)Ve=Ve*ee+L[Ge+He];else for(He=Q-1;He>=0;--He)Ve=Ve*ee+L[Ge+He];Ve=Ve*J+Z,he=Math.max(he,Ve),fe=Math.min(fe,Ve);var Ye=U.west+ae*Ue;F?Ye=I(Ye):Ye*=z;var We=(Ye-t)/(A-t);We=f.default.clamp(We,0,1);var qe=Pe*j+Ue;if(N>0){var Xe=ze===Se,Ke=ze===Me-1,Je=je||Re||Xe||Ke;if((je||Re)&&(Xe||Ke))continue;Je&&(Ve-=N,Xe?(qe=ye+(R-Pe-1),Ye-=1e-5*ie):Re?qe=ye+R+(j-Ue-1):Ke?(qe=ye+R+j+Pe,Ye+=1e-5*ie):je&&(qe=ye+R+j+R+Ue))}var Ze=Be*E(Ye),Qe=Be*C(Ye),$e=ue*Ze,et=de*Qe,tt=1/S($e*Ze+et*Qe+ke*Fe),it=$e*tt,nt=et*tt,at=ke*tt,rt=new o.default;rt.x=it+Ze*Ve,rt.y=nt+Qe*Ve,rt.z=at+Fe*Ve,h.default.multiplyByPoint(me,rt,b),o.default.minimumByComponent(b,_e,_e),o.default.maximumByComponent(b,ge,ge),ve=Math.min(ve,Ve),we[qe]=rt,xe[qe]=new r.default(We,Le),Oe[qe]=Ve,Y&&(Ae[qe]=Ne),X&&(Te[qe]=k.geodeticSurfaceNormal(rt))}}var ot,st,lt=a.default.fromPoints(we);(Object(l.default)(V)&&(ot=p.a.fromRectangle(V,fe,he,k)),G)&&(st=new c.default(k).computeHorizonCullingPointPossiblyUnderEllipsoid(H,we,fe));for(var ut=new n.a(_e,ge,H),dt=new _.a(H,ut,ve,he,pe,!1,Y,X,W,q),ct=new Float32Array(be*dt.stride),ft=0,ht=0;ht<be;++ht)ft=dt.encode(ct,ft,we[ht],xe[ht],Oe[ht],void 0,Ae[ht],Te[ht]);return{vertices:ct,maximumHeight:he,minimumHeight:fe,encoding:dt,boundingSphere3D:lt,orientedBoundingBox:ot,occludeePointInScaledSpace:st}},t.a=y},function(e,t,i){"use strict";t.a="/*!\n * Atmosphere code:\n *\n * Copyright (c) 2000-2005, Sean O'Neil (s_p_oneil@hotmail.com)\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n * * Neither the name of the project nor the names of its contributors may be\n * used to endorse or promote products derived from this software without\n * specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n *\n * Modifications made by Analytical Graphics, Inc.\n */\n\n // Atmosphere:\n // Code: http://sponeil.net/\n // GPU Gems 2 Article: https://developer.nvidia.com/gpugems/GPUGems2/gpugems2_chapter16.html\n\nconst float Kr = 0.0025;\nconst float Km = 0.0015;\nconst float ESun = 15.0;\n\nconst float fKrESun = Kr * ESun;\nconst float fKmESun = Km * ESun;\nconst float fKr4PI = Kr * 4.0 * czm_pi;\nconst float fKm4PI = Km * 4.0 * czm_pi;\n\n// Original: vec3(1.0 / pow(0.650, 4.0), 1.0 / pow(0.570, 4.0), 1.0 / pow(0.475, 4.0));\nconst vec3 v3InvWavelength = vec3(5.60204474633241, 9.473284437923038, 19.64380261047721);\n\nconst float fScaleDepth = 0.25;\n\nstruct AtmosphereColor\n{\n vec3 mie;\n vec3 rayleigh;\n};\n\nconst int nSamples = 2;\nconst float fSamples = 2.0;\n\nfloat scale(float fCos)\n{\n float x = 1.0 - fCos;\n return fScaleDepth * exp(-0.00287 + x*(0.459 + x*(3.83 + x*(-6.80 + x*5.25))));\n}\n\nAtmosphereColor computeGroundAtmosphereFromSpace(vec3 v3Pos, bool dynamicLighting, vec3 lightDirectionWC)\n{\n float fInnerRadius = czm_ellipsoidRadii.x;\n float fOuterRadius = czm_ellipsoidRadii.x * 1.025;\n float fOuterRadius2 = fOuterRadius * fOuterRadius;\n\n float fScale = 1.0 / (fOuterRadius - fInnerRadius);\n float fScaleOverScaleDepth = fScale / fScaleDepth;\n\n // Get the ray from the camera to the vertex and its length (which is the far point of the ray passing through the atmosphere)\n vec3 v3Ray = v3Pos - czm_viewerPositionWC;\n float fFar = length(v3Ray);\n v3Ray /= fFar;\n\n float fCameraHeight = length(czm_viewerPositionWC);\n float fCameraHeight2 = fCameraHeight * fCameraHeight;\n\n // This next line is an ANGLE workaround. It is equivalent to B = 2.0 * dot(czm_viewerPositionWC, v3Ray),\n // which is what it should be, but there are problems at the poles.\n float B = 2.0 * length(czm_viewerPositionWC) * dot(normalize(czm_viewerPositionWC), v3Ray);\n float C = fCameraHeight2 - fOuterRadius2;\n float fDet = max(0.0, B*B - 4.0 * C);\n float fNear = 0.5 * (-B - sqrt(fDet));\n\n // Calculate the ray's starting position, then calculate its scattering offset\n vec3 v3Start = czm_viewerPositionWC + v3Ray * fNear;\n fFar -= fNear;\n float fDepth = exp((fInnerRadius - fOuterRadius) / fScaleDepth);\n\n // The light angle based on the scene's light source would be:\n // dot(lightDirectionWC, v3Pos) / length(v3Pos);\n // When we want the atmosphere to be uniform over the globe so it is set to 1.0.\n\n float fLightAngle = czm_branchFreeTernary(dynamicLighting, dot(lightDirectionWC, v3Pos) / length(v3Pos), 1.0);\n float fCameraAngle = dot(-v3Ray, v3Pos) / length(v3Pos);\n float fCameraScale = scale(fCameraAngle);\n float fLightScale = scale(fLightAngle);\n float fCameraOffset = fDepth*fCameraScale;\n float fTemp = (fLightScale + fCameraScale);\n\n // Initialize the scattering loop variables\n float fSampleLength = fFar / fSamples;\n float fScaledLength = fSampleLength * fScale;\n vec3 v3SampleRay = v3Ray * fSampleLength;\n vec3 v3SamplePoint = v3Start + v3SampleRay * 0.5;\n\n // Now loop through the sample rays\n vec3 v3FrontColor = vec3(0.0);\n vec3 v3Attenuate = vec3(0.0);\n for(int i=0; i<nSamples; i++)\n {\n float fHeight = length(v3SamplePoint);\n float fDepth = exp(fScaleOverScaleDepth * (fInnerRadius - fHeight));\n float fScatter = fDepth*fTemp - fCameraOffset;\n v3Attenuate = exp(-fScatter * (v3InvWavelength * fKr4PI + fKm4PI));\n v3FrontColor += v3Attenuate * (fDepth * fScaledLength);\n v3SamplePoint += v3SampleRay;\n }\n\n AtmosphereColor color;\n color.mie = v3FrontColor * (v3InvWavelength * fKrESun + fKmESun);\n color.rayleigh = v3Attenuate; // Calculate the attenuation factor for the ground\n\n return color;\n}\n\n"},function(e,t,i){"use strict";var n=i(0),a=i(19),r=i(114);function o(e,t,i,a,o){if(this.imageryLayer=e,this.x=t,this.y=i,this.level=a,this.request=void 0,0!==a){var s=t/2|0,l=i/2|0,u=a-1;this.parent=e.getImageryFromCache(s,l,u)}(this.state=r.a.UNLOADED,this.imageUrl=void 0,this.image=void 0,this.texture=void 0,this.textureWebMercator=void 0,this.credits=void 0,this.referenceCount=0,!Object(n.default)(o)&&e.imageryProvider.ready)&&(o=e.imageryProvider.tilingScheme.tileXYToRectangle(t,i,a));this.rectangle=o}o.createPlaceholder=function(e){var t=new o(e,0,0,0);return t.addReference(),t.state=r.a.PLACEHOLDER,t},o.prototype.addReference=function(){++this.referenceCount},o.prototype.releaseReference=function(){return--this.referenceCount,0===this.referenceCount?(this.imageryLayer.removeImageryFromCache(this),Object(n.default)(this.parent)&&this.parent.releaseReference(),Object(n.default)(this.image)&&Object(n.default)(this.image.destroy)&&this.image.destroy(),Object(n.default)(this.texture)&&this.texture.destroy(),Object(n.default)(this.textureWebMercator)&&this.texture!==this.textureWebMercator&&this.textureWebMercator.destroy(),Object(a.default)(this),0):this.referenceCount},o.prototype.processStateMachine=function(e,t,i){this.state!==r.a.UNLOADED||i||(this.state=r.a.TRANSITIONING,this.imageryLayer._requestImagery(this)),this.state===r.a.RECEIVED&&(this.state=r.a.TRANSITIONING,this.imageryLayer._createTexture(e.context,this));var n=this.state===r.a.READY&&t&&!this.texture;(this.state===r.a.TEXTURE_LOADED||n)&&(this.state=r.a.TRANSITIONING,this.imageryLayer._reprojectTexture(e,this,t))},t.a=o},function(e,t,i){"use strict";var n=i(0),a=i(114);function r(e,t,i){this.readyImagery=void 0,this.loadingImagery=e,this.textureCoordinateRectangle=t,this.textureTranslationAndScale=void 0,this.useWebMercatorT=i}r.prototype.freeResources=function(){Object(n.default)(this.readyImagery)&&this.readyImagery.releaseReference(),Object(n.default)(this.loadingImagery)&&this.loadingImagery.releaseReference()},r.prototype.processStateMachine=function(e,t,i){var r=this.loadingImagery,o=r.imageryLayer;if(r.processStateMachine(t,!this.useWebMercatorT,i),r.state===a.a.READY)return Object(n.default)(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=this.loadingImagery,this.loadingImagery=void 0,this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this),!0;for(var s,l=r.parent;Object(n.default)(l)&&(l.state!==a.a.READY||!this.useWebMercatorT&&!Object(n.default)(l.texture));)l.state!==a.a.FAILED&&l.state!==a.a.INVALID&&(s=s||l),l=l.parent;return this.readyImagery!==l&&(Object(n.default)(this.readyImagery)&&this.readyImagery.releaseReference(),this.readyImagery=l,Object(n.default)(l)&&(l.addReference(),this.textureTranslationAndScale=o._calculateTextureTranslationAndScale(e,this))),(r.state===a.a.FAILED||r.state===a.a.INVALID)&&(!Object(n.default)(s)||(s.processStateMachine(t,!this.useWebMercatorT,i),!1))},t.a=r},function(e,t,i){"use strict";var n=i(105),a=i(169),r=i(17),o=i(8),s=i(1),l=i(16),u=i(22),d=i(0),c=i(3),f=i(213),h=i(5),p=i(123),m=i(246),_=i(21),g=i(225),v=i(283),y=i(88),b=i(135),w=i(292),O=i(107);function x(e){this.tile=e,this.frameLastUpdated=void 0,this.westMeshes=[],this.westTiles=[],this.southMeshes=[],this.southTiles=[],this.eastMeshes=[],this.eastTiles=[],this.northMeshes=[],this.northTiles=[],this.southwestMesh=void 0,this.southwestTile=void 0,this.southeastMesh=void 0,this.southeastTile=void 0,this.northwestMesh=void 0,this.northwestTile=void 0,this.northeastMesh=void 0,this.northeastTile=void 0,this.changedThisFrame=!0,this.visitedFrame=void 0,this.enqueuedFrame=void 0,this.mesh=void 0,this.vertexArray=void 0,this.waterMaskTexture=void 0,this.waterMaskTranslationAndScale=new l.a}x.prototype.update=function(e,t,i){this.changedThisFrame&&(H(e,t,this.tile,i),this.changedThisFrame=!1)},x.prototype.destroy=function(e){this._destroyVertexArray(e),Object(d.default)(this.waterMaskTexture)&&(--this.waterMaskTexture.referenceCount,0===this.waterMaskTexture.referenceCount&&this.waterMaskTexture.destroy(),this.waterMaskTexture=void 0)},x.prototype._destroyVertexArray=function(e){Object(d.default)(this.vertexArray)&&(Object(d.default)(e)?e.push(this.vertexArray):w.a._freeVertexArray(this.vertexArray),this.vertexArray=void 0)};var A=new m.a;function T(e,t,i,n,a,r,o,s,l){if(void 0!==n){for(var u=n;u&&(u._lastSelectionResultFrame!==a||O.a.wasKicked(u._lastSelectionResult)||O.a.originalResult(u._lastSelectionResult)===O.a.CULLED);){if(o)return;var f=u.parent;if(r>=y.a.NORTHWEST&&void 0!==f)switch(r){case y.a.NORTHWEST:u=u===f.northwestChild?f:void 0;break;case y.a.NORTHEAST:u=u===f.northeastChild?f:void 0;break;case y.a.SOUTHWEST:u=u===f.southwestChild?f:void 0;break;case y.a.SOUTHEAST:u=u===f.southeastChild?f:void 0}else u=f}if(void 0!==u)if(u._lastSelectionResult!==O.a.RENDERED){if(O.a.originalResult(n._lastSelectionResult)!==O.a.CULLED)switch(r){case y.a.WEST:T(e,t,i,n.northwestChild,a,r,!0,s,l),T(e,t,i,n.southwestChild,a,r,!0,s,l);break;case y.a.EAST:T(e,t,i,n.southeastChild,a,r,!0,s,l),T(e,t,i,n.northeastChild,a,r,!0,s,l);break;case y.a.SOUTH:T(e,t,i,n.southwestChild,a,r,!0,s,l),T(e,t,i,n.southeastChild,a,r,!0,s,l);break;case y.a.NORTH:T(e,t,i,n.northeastChild,a,r,!0,s,l),T(e,t,i,n.northwestChild,a,r,!0,s,l);break;case y.a.NORTHWEST:T(e,t,i,n.northwestChild,a,r,!0,s,l);break;case y.a.NORTHEAST:T(e,t,i,n.northeastChild,a,r,!0,s,l);break;case y.a.SOUTHWEST:T(e,t,i,n.southwestChild,a,r,!0,s,l);break;case y.a.SOUTHEAST:T(e,t,i,n.southeastChild,a,r,!0,s,l);break;default:throw new c.default("Invalid edge")}}else{if(Object(d.default)(u.data.vertexArray))return;!function(e,t,i,n,a,r,o,s){var l=n.data;if(void 0===l.fill)l.fill=new x(n);else if(l.fill.visitedFrame===r)return;l.fill.enqueuedFrame!==r&&(l.fill.enqueuedFrame=r,l.fill.changedThisFrame=!1,o.enqueue(n));!function(e,t,i,n,a,r){var o,s,l,u,c,f,p,m=n.data.fill,_=i.data.fill;Object(d.default)(_)?(_.visitedFrame=t.frameNumber,_.changedThisFrame&&(H(e,t,i,r),_.changedThisFrame=!1),o=i.data.fill.mesh):o=i.data.mesh;switch(a){case y.a.WEST:s=m.westMeshes,l=m.westTiles;break;case y.a.SOUTH:s=m.southMeshes,l=m.southTiles;break;case y.a.EAST:s=m.eastMeshes,l=m.eastTiles;break;case y.a.NORTH:s=m.northMeshes,l=m.northTiles;break;case y.a.NORTHWEST:return m.changedThisFrame=m.changedThisFrame||m.northwestMesh!==o,m.northwestMesh=o,void(m.northwestTile=i);case y.a.NORTHEAST:return m.changedThisFrame=m.changedThisFrame||m.northeastMesh!==o,m.northeastMesh=o,void(m.northeastTile=i);case y.a.SOUTHWEST:return m.changedThisFrame=m.changedThisFrame||m.southwestMesh!==o,m.southwestMesh=o,void(m.southwestTile=i);case y.a.SOUTHEAST:return m.changedThisFrame=m.changedThisFrame||m.southeastMesh!==o,m.southeastMesh=o,void(m.southeastTile=i)}if(i.level<=n.level)return m.changedThisFrame=m.changedThisFrame||s[0]!==o||1!==s.length,s[0]=o,l[0]=i,s.length=1,void(l.length=1);var g,v=i.rectangle,b=n.rectangle;switch(a){case y.a.WEST:for(g=(b.north-b.south)*h.default.EPSILON5,u=0;u<l.length&&(f=l[u],p=f.rectangle,!h.default.greaterThan(v.north,p.south,g));++u);for(c=u;c<l.length&&(f=l[c],p=f.rectangle,!h.default.greaterThanOrEquals(v.south,p.north,g));++c);break;case y.a.SOUTH:for(g=(b.east-b.west)*h.default.EPSILON5,u=0;u<l.length&&(f=l[u],p=f.rectangle,!h.default.lessThan(v.west,p.east,g));++u);for(c=u;c<l.length&&(f=l[c],p=f.rectangle,!h.default.lessThanOrEquals(v.east,p.west,g));++c);break;case y.a.EAST:for(g=(b.north-b.south)*h.default.EPSILON5,u=0;u<l.length&&(f=l[u],p=f.rectangle,!h.default.lessThan(v.south,p.north,g));++u);for(c=u;c<l.length&&(f=l[c],p=f.rectangle,!h.default.lessThanOrEquals(v.north,p.south,g));++c);break;case y.a.NORTH:for(g=(b.east-b.west)*h.default.EPSILON5,u=0;u<l.length&&(f=l[u],p=f.rectangle,!h.default.greaterThan(v.east,p.west,g));++u);for(c=u;c<l.length&&(f=l[c],p=f.rectangle,!h.default.greaterThanOrEquals(v.west,p.east,g));++c);}c-u==1?(m.changedThisFrame=m.changedThisFrame||s[u]!==o,s[u]=o,l[u]=i):(m.changedThisFrame=!0,s.splice(u,c-u,o),l.splice(u,c-u,i))}(e,t,i,n,a,s)}(e,t,i,u,r,a,s,l)}}}x.updateFillTiles=function(e,t,i,n){var a=e._quadtree,r=a._levelZeroTiles,o=a._lastSelectionFrameNumber,s=A;s.clear();for(var l=0;l<t.length;++l){var u=t[l];Object(d.default)(u.data.vertexArray)&&s.enqueue(t[l])}for(var c=s.dequeue();void 0!==c;){var f=c.findTileToWest(r),h=c.findTileToSouth(r),p=c.findTileToEast(r),m=c.findTileToNorth(r);T(e,i,c,f,o,y.a.EAST,!1,s,n),T(e,i,c,h,o,y.a.NORTH,!1,s,n),T(e,i,c,p,o,y.a.WEST,!1,s,n),T(e,i,c,m,o,y.a.SOUTH,!1,s,n);var _=f.findTileToNorth(r),g=f.findTileToSouth(r),v=p.findTileToNorth(r),b=p.findTileToSouth(r);T(e,i,c,_,o,y.a.SOUTHEAST,!1,s,n),T(e,i,c,v,o,y.a.SOUTHWEST,!1,s,n),T(e,i,c,g,o,y.a.NORTHEAST,!1,s,n),T(e,i,c,b,o,y.a.NORTHWEST,!1,s,n),c=s.dequeue()}};var E=new u.default,C=new u.default,S=new s.default,M=new s.default,D=new o.default,P=new o.default,I=new o.default;function L(){this.height=0,this.encodedNormal=new o.default}function j(e,t,i,n,a,r,o,s,l){if(Object(d.default)(a))return a;var u;if(Object(d.default)(r)&&Object(d.default)(o))u=.5*(r.height+o.height);else if(Object(d.default)(r))u=r.height;else if(Object(d.default)(o))u=o.height;else if(Object(d.default)(s))u=s.height;else{var c=e.tile.data.tileBoundingRegion,f=0,h=0;Object(d.default)(c)&&(f=c.minimumHeight,h=c.maximumHeight),u=.5*(f+h)}return Z(e,t,i,n,u,l),l}var R={minimumHeight:0,maximumHeight:0},N=new s.default,B=new L,F=new L,k=new L,z=new L,U="undefined"!=typeof Uint8Array?new Uint8Array(81):void 0,V={tilingScheme:void 0,x:0,y:0,level:0,exaggeration:1,exaggerationRelativeHeight:0};function H(e,t,i,a){w.a.initialize(i,e.terrainProvider,e._imageryLayers);var l=i.data,u=l.fill,c=i.rectangle,h=t.terrainExaggeration,m=t.terrainExaggerationRelativeHeight,O=1!==h,x=i.tilingScheme.ellipsoid,A=Q(u,x,0,1,u.northwestTile,u.northwestMesh,u.northTiles,u.northMeshes,u.westTiles,u.westMeshes,k),T=Q(u,x,0,0,u.southwestTile,u.southwestMesh,u.westTiles,u.westMeshes,u.southTiles,u.southMeshes,B),S=Q(u,x,1,0,u.southeastTile,u.southeastMesh,u.southTiles,u.southMeshes,u.eastTiles,u.eastMeshes,F),P=Q(u,x,1,1,u.northeastTile,u.northeastMesh,u.eastTiles,u.eastMeshes,u.northTiles,u.northMeshes,z);A=j(u,x,0,1,A,T,P,S,k),T=j(u,x,0,0,T,A,S,P,B),S=j(u,x,1,1,S,T,P,A,F),P=j(u,x,1,1,P,S,A,T,z);var L,H,Y=T.height,W=S.height,q=A.height,X=P.height,K=Math.min(Y,W,q,X),J=Math.max(Y,W,q,X),Z=.5*(K+J),$=e.getLevelMaximumGeometricError(i.level),te=x.maximumRadius-$,ie=4*Math.acos(te/x.maximumRadius);if(ie*=1.5,c.width>ie&&J-K<=$){var ne=new f.a({width:9,height:9,buffer:U,structure:{heightOffset:J}}),ae=V;ae.tilingScheme=i.tilingScheme,ae.x=i.x,ae.y=i.y,ae.level=i.level,ae.exaggeration=h,ae.exaggerationRelativeHeight=m,u.mesh=ne._createMeshSync(ae)}else{var oe=O,se=_.default.center(c,C);se.height=Z;var le,ue=x.cartographicToCartesian(se,N),de=new g.a(ue,void 0,void 0,void 0,void 0,!0,!0,oe,h,m),ce=5;for(L=0,H=(le=u.westMeshes).length;L<H;++L)ce+=le[L].eastIndicesNorthToSouth.length;for(L=0,H=(le=u.southMeshes).length;L<H;++L)ce+=le[L].northIndicesWestToEast.length;for(L=0,H=(le=u.eastMeshes).length;L<H;++L)ce+=le[L].westIndicesSouthToNorth.length;for(L=0,H=(le=u.northMeshes).length;L<H;++L)ce+=le[L].southIndicesEastToWest.length;var fe=R;fe.minimumHeight=K,fe.maximumHeight=J;var he=de.stride,pe=new Float32Array(ce*he),me=0,_e=me,ge=me=ee(u,x,de,pe,me=G(x,c,de,pe,me,0,1,A.height,A.encodedNormal,1,fe),u.westTiles,u.westMeshes,y.a.EAST,fe),ve=me=ee(u,x,de,pe,me=G(x,c,de,pe,me,0,0,T.height,T.encodedNormal,0,fe),u.southTiles,u.southMeshes,y.a.NORTH,fe),ye=me=ee(u,x,de,pe,me=G(x,c,de,pe,me,1,0,S.height,S.encodedNormal,0,fe),u.eastTiles,u.eastMeshes,y.a.WEST,fe);me=ee(u,x,de,pe,me=G(x,c,de,pe,me,1,1,P.height,P.encodedNormal,1,fe),u.northTiles,u.northMeshes,y.a.SOUTH,fe),K=fe.minimumHeight,J=fe.maximumHeight;var be=p.a.fromRectangle(c,K,J,i.tilingScheme.ellipsoid),we=b.a.geodeticLatitudeToMercatorAngle(c.south),Oe=1/(b.a.geodeticLatitudeToMercatorAngle(c.north)-we),xe=(b.a.geodeticLatitudeToMercatorAngle(se.latitude)-we)*Oe,Ae=x.geodeticSurfaceNormalCartographic(E,M),Te=n.a.octEncode(Ae,D),Ee=me;de.encode(pe,me*he,be.center,o.default.fromElements(.5,.5,I),Z,Te,xe,Ae);var Ce,Se=++me,Me=3*(Se-1),De=Me*(Se<256?1:2);if((pe.length-Se*he)*Float32Array.BYTES_PER_ELEMENT>=De){var Pe=Se*he*Float32Array.BYTES_PER_ELEMENT;Ce=Se<256?new Uint8Array(pe.buffer,Pe,Me):new Uint16Array(pe.buffer,Pe,Me)}else Ce=Se<256?new Uint8Array(Me):new Uint16Array(Me);pe=new Float32Array(pe.buffer,0,Se*he);var Ie=0;for(L=0;L<Se-2;++L)Ce[Ie++]=Ee,Ce[Ie++]=L,Ce[Ie++]=L+1;Ce[Ie++]=Ee,Ce[Ie++]=L,Ce[Ie++]=0;var Le=[];for(L=ge;L>=_e;--L)Le.push(L);var je=[];for(L=ve;L>=ge;--L)je.push(L);var Re=[];for(L=ye;L>=ve;--L)Re.push(L);var Ne=[];for(Ne.push(0),L=Ee-1;L>=ye;--L)Ne.push(L);u.mesh=new v.a(de.center,pe,Ce,Me,Se,K,J,r.default.fromOrientedBoundingBox(be),function(e,t,i,n,a,r){var o=e.quadtree._occluders.ellipsoid,l=o.ellipsoid,u=re;return s.default.fromRadians(i.west,i.south,a,l,u[0]),s.default.fromRadians(i.east,i.south,a,l,u[1]),s.default.fromRadians(i.west,i.north,a,l,u[2]),s.default.fromRadians(i.east,i.north,a,l,u[3]),o.computeHorizonCullingPointPossiblyUnderEllipsoid(t,u,n,r)}(e,be.center,c,K,J),de.stride,be,de,Le,je,Re,Ne)}var Be=t.context;u._destroyVertexArray(a),u.vertexArray=w.a._createVertexArrayForMesh(Be,u.mesh),l.processImagery(i,e.terrainProvider,t,!0);var Fe=u.waterMaskTexture;if(u.waterMaskTexture=void 0,e.terrainProvider.hasWaterMask){var ke=l._findAncestorTileWithTerrainData(i);Object(d.default)(ke)&&Object(d.default)(ke.data.waterMaskTexture)&&(u.waterMaskTexture=ke.data.waterMaskTexture,++u.waterMaskTexture.referenceCount,l._computeWaterMaskTranslationAndScale(i,ke,u.waterMaskTranslationAndScale))}Object(d.default)(Fe)&&(--Fe.referenceCount,0===Fe.referenceCount&&Fe.destroy())}function G(e,t,i,n,a,r,o,s,l,u,d){var c=E;c.longitude=h.default.lerp(t.west,t.east,r),c.latitude=h.default.lerp(t.south,t.north,o),c.height=s;var f,p=e.cartographicToCartesian(c,S);i.hasGeodeticSurfaceNormals&&(f=e.geodeticSurfaceNormal(p,M));var m=P;return m.x=r,m.y=o,i.encode(n,a*i.stride,p,m,s,l,u,f),d.minimumHeight=Math.min(d.minimumHeight,s),d.maximumHeight=Math.max(d.maximumHeight,s),a+1}var Y=new _.default;function W(e,t,i,n){var a=e.rectangle,r=t.rectangle;0===t.x&&1===i.x&&e.x===e.tilingScheme.getNumberOfXTilesAtLevel(e.level)-1?((a=_.default.clone(e.rectangle,Y)).west-=h.default.TWO_PI,a.east-=h.default.TWO_PI):0===e.x&&0===i.x&&t.x===t.tilingScheme.getNumberOfXTilesAtLevel(t.level)-1&&((a=_.default.clone(e.rectangle,Y)).west+=h.default.TWO_PI,a.east+=h.default.TWO_PI);var o=a.east-a.west,s=(r.west-a.west)/o,l=(r.east-a.west)/o,u=a.north-a.south,d=(r.south-a.south)/u,c=(r.north-a.south)/u,f=(i.x-s)/(l-s),p=(i.y-d)/(c-d);return Math.abs(f)<Math.EPSILON5?f=0:Math.abs(f-1)<Math.EPSILON5&&(f=1),Math.abs(p)<Math.EPSILON5?p=0:Math.abs(p-1)<Math.EPSILON5&&(p=1),n.x=f,n.y=p,n}var q=new o.default;function X(e,t,i,n,a){var r=e.encoding,o=e.vertices;if(a.height=r.decodeHeight(o,t),r.hasVertexNormals)r.getOctEncodedNormal(o,t,a.encodedNormal);else{var s=a.encodedNormal;s.x=0,s.y=0}}var K=new o.default,J=new s.default;function Z(e,t,i,a,r,o){o.height=r;var s=t.geodeticSurfaceNormalCartographic(E,S);n.a.octEncode(s,o.encodedNormal)}function Q(e,t,i,n,a,r,o,s,l,u,c){var f;return ae(e,t,s,o,!1,i,n,c)||ae(e,t,u,l,!0,i,n,c)?c:ne(a,r)?(X(r,0===i?0===n?r.eastIndicesNorthToSouth[0]:r.southIndicesEastToWest[0]:0===n?r.northIndicesWestToEast[0]:r.westIndicesSouthToNorth[0],0,0,c),c):(f=0===i?0===n?$(e.westMeshes,e.westTiles,y.a.EAST,e.southMeshes,e.southTiles,y.a.NORTH,i,n):$(e.northMeshes,e.northTiles,y.a.SOUTH,e.westMeshes,e.westTiles,y.a.EAST,i,n):0===n?$(e.southMeshes,e.southTiles,y.a.NORTH,e.eastMeshes,e.eastTiles,y.a.WEST,i,n):$(e.eastMeshes,e.eastTiles,y.a.WEST,e.northMeshes,e.northTiles,y.a.SOUTH,i,n),Object(d.default)(f)?(Z(0,t,0,0,f,c),c):void 0)}function $(e,t,i,n,a,r,o,s){var l=ie(e,t,!1,i,o,s),u=ie(n,a,!0,r,o,s);return Object(d.default)(l)&&Object(d.default)(u)?.5*(l+u):Object(d.default)(l)?l:u}function ee(e,t,i,n,a,r,o,s,l){for(var u=0;u<r.length;++u)a=te(e,t,i,n,a,r[u],o[u],s,l);return a}function te(e,t,i,n,a,r,o,s,l){var u=r.rectangle;s===y.a.EAST&&0===e.tile.x?((u=_.default.clone(r.rectangle,Y)).west-=h.default.TWO_PI,u.east-=h.default.TWO_PI):s===y.a.WEST&&0===r.x&&((u=_.default.clone(r.rectangle,Y)).west+=h.default.TWO_PI,u.east+=h.default.TWO_PI);var d,c,f,p,m=e.tile.rectangle;switch(a>0&&(i.decodeTextureCoordinates(n,a-1,I),d=I.x,c=I.y),s){case y.a.WEST:f=o.westIndicesSouthToNorth,p=!1;break;case y.a.NORTH:f=o.northIndicesWestToEast,p=!0;break;case y.a.EAST:f=o.eastIndicesNorthToSouth,p=!1;break;case y.a.SOUTH:f=o.southIndicesEastToWest,p=!0}var g,v,w=r,O=e.tile,x=o.encoding,A=o.vertices,T=i.stride;x.hasWebMercatorT&&(g=b.a.geodeticLatitudeToMercatorAngle(m.south),v=1/(b.a.geodeticLatitudeToMercatorAngle(m.north)-g));for(var E=0;E<f.length;++E){var C=f[E],P=x.decodeTextureCoordinates(A,C,I);W(w,O,P,P);var L=P.x,j=P.y,R=p?L:j;if(!(R<0||R>1)&&!(Math.abs(L-d)<h.default.EPSILON5&&Math.abs(j-c)<h.default.EPSILON5)){var N=Math.abs(L)<h.default.EPSILON5||Math.abs(L-1)<h.default.EPSILON5,B=Math.abs(j)<h.default.EPSILON5||Math.abs(j-1)<h.default.EPSILON5;if(!N||!B){var F,k=x.decodePosition(A,C,S),z=x.decodeHeight(A,C);x.hasVertexNormals?F=x.getOctEncodedNormal(A,C,D):((F=D).x=0,F.y=0);var U,V=j;if(x.hasWebMercatorT){var H=h.default.lerp(m.south,m.north,j);V=(b.a.geodeticLatitudeToMercatorAngle(H)-g)*v}i.hasGeodeticSurfaceNormals&&(U=t.geodeticSurfaceNormal(k,M)),i.encode(n,a*T,k,P,z,F,V,U),l.minimumHeight=Math.min(l.minimumHeight,z),l.maximumHeight=Math.max(l.maximumHeight,z),++a}}}return a}function ie(e,t,i,n,a,r){var o,s,l;i?(o=0,s=e.length,l=1):(o=e.length-1,s=-1,l=-1);for(var u=o;u!==s;u+=l){var c=e[u];if(ne(t[u],c)){var f;switch(n){case y.a.WEST:f=c.westIndicesSouthToNorth;break;case y.a.SOUTH:f=c.southIndicesEastToWest;break;case y.a.EAST:f=c.eastIndicesNorthToSouth;break;case y.a.NORTH:f=c.northIndicesWestToEast}var h=f[i?0:f.length-1];if(Object(d.default)(h))return c.encoding.decodeHeight(c.vertices,h)}}}function ne(e,t){return Object(d.default)(t)&&(!Object(d.default)(e.data.fill)||!e.data.fill.changedThisFrame)}function ae(e,t,i,r,o,l,u,d){var c,f,p,m,_,g=r[o?0:i.length-1],v=i[o?0:i.length-1];if(ne(g,v)&&(0===l?0===u?(c=o?v.northIndicesWestToEast:v.eastIndicesNorthToSouth,f=o,p=o):(c=o?v.eastIndicesNorthToSouth:v.southIndicesEastToWest,f=!o,p=!1):0===u?(c=o?v.westIndicesSouthToNorth:v.northIndicesWestToEast,f=!o,p=!0):(c=o?v.southIndicesEastToWest:v.westIndicesSouthToNorth,f=o,p=!o),c.length>0)){_=c[m=o?0:c.length-1],v.encoding.decodeTextureCoordinates(v.vertices,_,I);var y=W(g,e.tile,I,I);if(y.x===l&&y.y===u)return X(v,_,0,0,d),!0;if(!((m=Object(a.a)(c,f?l:u,(function(t,i){v.encoding.decodeTextureCoordinates(v.vertices,t,I);var n=W(g,e.tile,I,I);return p?f?n.x-l:n.y-u:f?l-n.x:u-n.y})))<0))return X(v,c[m],0,0,d),!0;if((m=~m)>0&&m<c.length)return function(e,t,i,a,r,o,l,u,d,c){var f,p=a.encoding,m=a.vertices,_=W(t,i,p.decodeTextureCoordinates(m,r,I),I),g=W(t,i,p.decodeTextureCoordinates(m,o,P),P);f=d?(l-_.x)/(g.x-_.x):(u-_.y)/(g.y-_.y);var v,y=p.decodeHeight(m,r),b=p.decodeHeight(m,o),w=i.rectangle;if(E.longitude=h.default.lerp(w.west,w.east,l),E.latitude=h.default.lerp(w.south,w.north,u),c.height=E.height=h.default.lerp(y,b,f),p.hasVertexNormals){var O=p.getOctEncodedNormal(m,r,q),x=p.getOctEncodedNormal(m,o,K),A=n.a.octDecode(O.x,O.y,S),T=n.a.octDecode(x.x,x.y,J);v=s.default.lerp(A,T,f,S),s.default.normalize(v,v),n.a.octEncode(v,c.encodedNormal)}else v=e.geodeticSurfaceNormalCartographic(E,S),n.a.octEncode(v,c.encodedNormal)}(t,g,e.tile,v,c[m-1],c[m],l,u,f,d),!0}return!1}var re=[new s.default,new s.default,new s.default,new s.default];t.a=x},function(e,t,i){"use strict";t.a="#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n#endif\n\nuniform vec3 u_radii;\nuniform vec3 u_oneOverEllipsoidRadiiSquared;\n\nvarying vec3 v_positionEC;\n\nvec4 computeEllipsoidColor(czm_ray ray, float intersection, float side)\n{\n vec3 positionEC = czm_pointAlongRay(ray, intersection);\n vec3 positionMC = (czm_inverseModelView * vec4(positionEC, 1.0)).xyz;\n vec3 geodeticNormal = normalize(czm_geodeticSurfaceNormal(positionMC, vec3(0.0), u_oneOverEllipsoidRadiiSquared));\n vec3 sphericalNormal = normalize(positionMC / u_radii);\n vec3 normalMC = geodeticNormal * side; // normalized surface normal (always facing the viewer) in model coordinates\n vec3 normalEC = normalize(czm_normal * normalMC); // normalized surface normal in eye coordiantes\n\n vec2 st = czm_ellipsoidWgs84TextureCoordinates(sphericalNormal);\n vec3 positionToEyeEC = -positionEC;\n\n czm_materialInput materialInput;\n materialInput.s = st.s;\n materialInput.st = st;\n materialInput.str = (positionMC + u_radii) / u_radii;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef ONLY_SUN_LIGHTING\n return czm_private_phong(normalize(positionToEyeEC), material, czm_sunDirectionEC);\n#else\n return czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n\nvoid main()\n{\n // PERFORMANCE_TODO: When dynamic branching is available, compute ratio of maximum and minimum radii\n // in the vertex shader. Only when it is larger than some constant, march along the ray.\n // Otherwise perform one intersection test which will be the common case.\n\n // Test if the ray intersects a sphere with the ellipsoid's maximum radius.\n // For very oblate ellipsoids, using the ellipsoid's radii for an intersection test\n // may cause false negatives. This will discard fragments before marching the ray forward.\n float maxRadius = max(u_radii.x, max(u_radii.y, u_radii.z)) * 1.5;\n vec3 direction = normalize(v_positionEC);\n vec3 ellipsoidCenter = czm_modelView[3].xyz;\n\n float t1 = -1.0;\n float t2 = -1.0;\n\n float b = -2.0 * dot(direction, ellipsoidCenter);\n float c = dot(ellipsoidCenter, ellipsoidCenter) - maxRadius * maxRadius;\n\n float discriminant = b * b - 4.0 * c;\n if (discriminant >= 0.0) {\n t1 = (-b - sqrt(discriminant)) * 0.5;\n t2 = (-b + sqrt(discriminant)) * 0.5;\n }\n\n if (t1 < 0.0 && t2 < 0.0) {\n discard;\n }\n\n float t = min(t1, t2);\n if (t < 0.0) {\n t = 0.0;\n }\n\n // March ray forward to intersection with larger sphere and find\n czm_ray ray = czm_ray(t * direction, direction);\n\n vec3 ellipsoid_inverseRadii = vec3(1.0 / u_radii.x, 1.0 / u_radii.y, 1.0 / u_radii.z);\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoidCenter, ellipsoid_inverseRadii);\n\n if (czm_isEmpty(intersection))\n {\n discard;\n }\n\n // If the viewer is outside, compute outsideFaceColor, with normals facing outward.\n vec4 outsideFaceColor = (intersection.start != 0.0) ? computeEllipsoidColor(ray, intersection.start, 1.0) : vec4(0.0);\n\n // If the viewer either is inside or can see inside, compute insideFaceColor, with normals facing inward.\n vec4 insideFaceColor = (outsideFaceColor.a < 1.0) ? computeEllipsoidColor(ray, intersection.stop, -1.0) : vec4(0.0);\n\n gl_FragColor = mix(insideFaceColor, outsideFaceColor, outsideFaceColor.a);\n gl_FragColor.a = 1.0 - (1.0 - insideFaceColor.a) * (1.0 - outsideFaceColor.a);\n\n#ifdef WRITE_DEPTH\n#ifdef GL_EXT_frag_depth\n t = (intersection.start != 0.0) ? intersection.start : intersection.stop;\n vec3 positionEC = czm_pointAlongRay(ray, t);\n vec4 positionCC = czm_projection * vec4(positionEC, 1.0);\n#ifdef LOG_DEPTH\n czm_writeLogDepth(1.0 + positionCC.w);\n#else\n float z = positionCC.z / positionCC.w;\n\n float n = czm_depthRange.near;\n float f = czm_depthRange.far;\n\n gl_FragDepthEXT = (z * (f - n) + f + n) * 0.5;\n#endif\n#endif\n#endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position;\n\nuniform vec3 u_radii;\n\nvarying vec3 v_positionEC;\n\nvoid main()\n{\n // In the vertex data, the cube goes from (-1.0, -1.0, -1.0) to (1.0, 1.0, 1.0) in model coordinates.\n // Scale to consider the radii. We could also do this once on the CPU when using the BoxGeometry,\n // but doing it here allows us to change the radii without rewriting the vertex data, and\n // allows all ellipsoids to reuse the same vertex data.\n vec4 p = vec4(u_radii * position, 1.0);\n\n v_positionEC = (czm_modelView * p).xyz; // position in eye coordinates\n gl_Position = czm_modelViewProjection * p; // position in clip coordinates\n\n // With multi-frustum, when the ellipsoid primitive is positioned on the intersection of two frustums\n // and close to terrain, the terrain (writes depth) in the closest frustum can overwrite part of the\n // ellipsoid (does not write depth) that was rendered in the farther frustum.\n //\n // Here, we clamp the depth in the vertex shader to avoid being overwritten; however, this creates\n // artifacts since some fragments can be alpha blended twice. This is solved by only rendering\n // the ellipsoid in the closest frustum to the viewer.\n gl_Position.z = clamp(gl_Position.z, czm_depthRange.near, czm_depthRange.far);\n\n czm_vertexLogDepth();\n}\n"},function(e,t,i){"use strict";var n=i(78),a=i(273),r=i(183);function o(){}var s={stack:new a.a,stackMaximumLength:0};function l(e){return e._visible&&e._inRequestVolume}function u(e){return e.hasEmptyContent||e.hasTilesetContent||e.hasImplicitContent}function d(e,t){return 0!==t.children.length&&(t.hasTilesetContent||t.hasImplicitContent?!t.contentExpired:(t.hasEmptyContent,!0))}function c(e,t,i,n){for(var a=t.children,r=a.length,o=0;o<r;++o){var s=a[o];s.updateVisibility(n),l(s)&&i.push(s)}}function f(e,t){(function(e){return!u(e)&&e.contentUnloaded}(t)||t.contentExpired)&&(t._priority=0,e._requestedTiles.push(t))}function h(e,t,i){t._touchedFrame!==i.frameNumber&&(e._cache.touch(t),t._touchedFrame=i.frameNumber)}function p(e){++e.statistics.visited}function m(e,t,i){t.contentAvailable&&t.contentVisibility(i)!==n.a.OUTSIDE&&e._selectedTiles.push(t)}o.selectTiles=function(e,t){e._selectedTiles.length=0,e._requestedTiles.length=0,e._hasMixedContent=!1;var i=!0,n=e.root;if(n.updateVisibility(t),!l(n))return i;var a=s.stack;for(a.push(e.root);a.length>0;){s.stackMaximumLength=Math.max(s.stackMaximumLength,a.length);var o=a.pop(),_=o.refine===r.a.ADD,g=o.refine===r.a.REPLACE,v=d(e,o);v&&c(e,o,a,t),(_||g&&!v)&&(f(e,o),h(e,o,t),m(e,o,t),u(o)||o.contentAvailable||(i=!1)),p(e)}return s.stack.trim(s.stackMaximumLength),i},t.a=o},function(e,t,i){"use strict";var n=i(7),a=i(0),r=i(19),o=i(33),s=i(108),l=i(91),u=i(32),d=i(39),c=i(58),f=i(34),h=i(45),p=i(118),m=i(62),_=i(83),g=i(244),v=i(74),y=i(81),b=i(122),w=i(66);function O(){this.previousFramebuffer=void 0,this._previousFramebuffer=void 0,this._texture=void 0,this._classifiedTexture=void 0,this._depthStencilTexture=void 0,this._fbo=void 0,this._fboClassified=void 0,this._rsUnclassified=void 0,this._rsClassified=void 0,this._unclassifiedCommand=void 0,this._classifiedCommand=void 0,this._translucentCommand=void 0,this._clearColorCommand=new s.default({color:new n.default(0,0,0,0),owner:this}),this._clearCommand=new s.default({color:new n.default(0,0,0,0),depth:1,stencil:0});var e=this;this._uniformMap={colorTexture:function(){return e._texture},depthTexture:function(){return e._depthStencilTexture},classifiedTexture:function(){return e._classifiedTexture}}}Object.defineProperties(O.prototype,{unclassifiedCommand:{get:function(){return this._unclassifiedCommand}}}),O.isTranslucencySupported=function(e){return e.depthTexture&&e.fragmentDepth};var x={depthMask:!1,stencilTest:{enabled:!0,frontFunction:b.a.EQUAL,frontOperation:{fail:w.a.KEEP,zFail:w.a.KEEP,zPass:w.a.KEEP},backFunction:b.a.NEVER,reference:0,mask:y.a.CLASSIFICATION_MASK},blending:v.default.ALPHA_BLEND},A={depthMask:!1,stencilTest:{enabled:!0,frontFunction:b.a.NOT_EQUAL,frontOperation:{fail:w.a.KEEP,zFail:w.a.KEEP,zPass:w.a.KEEP},backFunction:b.a.NEVER,reference:0,mask:y.a.CLASSIFICATION_MASK},blending:v.default.ALPHA_BLEND},T={depthMask:!0,depthTest:{enabled:!0},stencilTest:y.a.setCesium3DTileBit(),stencilMask:y.a.CESIUM_3D_TILE_MASK,blending:v.default.ALPHA_BLEND};O.prototype.update=function(e){var t=this._texture,i=!Object(a.default)(t)||this.previousFramebuffer!==this._previousFramebuffer;this._previousFramebuffer=this.previousFramebuffer;var n,r,s=e.drawingBufferWidth,v=e.drawingBufferHeight,y=!Object(a.default)(t)||t.width!==s||t.height!==v;((y||i)&&(this._texture=this._texture&&this._texture.destroy(),this._classifiedTexture=this._classifiedTexture&&this._classifiedTexture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),this._texture=new h.default({context:e,width:s,height:v,pixelFormat:o.default.RGBA,pixelDatatype:u.default.UNSIGNED_BYTE,sampler:new c.default({wrapS:_.default.CLAMP_TO_EDGE,wrapT:_.default.CLAMP_TO_EDGE,minificationFilter:m.default.LINEAR,magnificationFilter:p.default.LINEAR})}),Object(a.default)(this._previousFramebuffer)||(this._classifiedTexture=new h.default({context:e,width:s,height:v,pixelFormat:o.default.RGBA,pixelDatatype:u.default.UNSIGNED_BYTE,sampler:new c.default({wrapS:_.default.CLAMP_TO_EDGE,wrapT:_.default.CLAMP_TO_EDGE,minificationFilter:m.default.LINEAR,magnificationFilter:p.default.LINEAR})}),this._depthStencilTexture=new h.default({context:e,width:s,height:v,pixelFormat:o.default.DEPTH_STENCIL,pixelDatatype:u.default.UNSIGNED_INT_24_8}))),!Object(a.default)(this._fbo)||y||i)&&(this._fbo=this._fbo&&this._fbo.destroy(),this._fboClassified=this._fboClassified&&this._fboClassified.destroy(),Object(a.default)(this._previousFramebuffer)?(n=this._previousFramebuffer.depthStencilTexture,r=this._previousFramebuffer.depthStencilRenderbuffer):n=this._depthStencilTexture,this._fbo=new l.default({context:e,colorTextures:[this._texture],depthStencilTexture:n,depthStencilRenderbuffer:r,destroyAttachments:!1}),Object(a.default)(this._previousFramebuffer)||(this._fboClassified=new l.default({context:e,colorTextures:[this._classifiedTexture],depthStencilTexture:n,destroyAttachments:!1})));if(Object(a.default)(this._rsUnclassified)||(this._rsUnclassified=d.default.fromCache(x),this._rsClassified=d.default.fromCache(A),this._rsDefault=d.default.fromCache(T)),!Object(a.default)(this._unclassifiedCommand)||i){Object(a.default)(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy());var b=Object(a.default)(this._previousFramebuffer)?"uniform sampler2D colorTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n#ifdef UNCLASSIFIED\n gl_FragColor = color * czm_invertClassificationColor;\n#else\n gl_FragColor = color;\n#endif\n}\n":"#extension GL_EXT_frag_depth : enable\nuniform sampler2D colorTexture;\nuniform sampler2D depthTexture;\nuniform sampler2D classifiedTexture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n if (color.a == 0.0)\n {\n discard;\n }\n bool isClassified = all(equal(texture2D(classifiedTexture, v_textureCoordinates), vec4(0.0)));\n#ifdef UNCLASSIFIED\n vec4 highlightColor = czm_invertClassificationColor;\n if (isClassified)\n {\n discard;\n }\n#else\n vec4 highlightColor = vec4(1.0);\n if (!isClassified)\n {\n discard;\n }\n#endif\n gl_FragColor = color * highlightColor;\n gl_FragDepthEXT = texture2D(depthTexture, v_textureCoordinates).r;\n}\n",w=new f.default({defines:["UNCLASSIFIED"],sources:[b]}),O=new f.default({sources:[b]});this._unclassifiedCommand=e.createViewportQuadCommand(w,{renderState:Object(a.default)(this._previousFramebuffer)?this._rsUnclassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),this._classifiedCommand=e.createViewportQuadCommand(O,{renderState:Object(a.default)(this._previousFramebuffer)?this._rsClassified:this._rsDefault,uniformMap:this._uniformMap,owner:this}),Object(a.default)(this._translucentCommand)&&(this._translucentCommand.shaderProgram=this._translucentCommand.shaderProgram&&this._translucentCommand.shaderProgram.destroy()),Object(a.default)(this._previousFramebuffer)||(this._translucentCommand=e.createViewportQuadCommand(g.a,{renderState:this._rsUnclassified,uniformMap:this._uniformMap,owner:this}))}},O.prototype.clear=function(e,t){var i=t.framebuffer;Object(a.default)(this._previousFramebuffer)?(t.framebuffer=this._fbo,this._clearColorCommand.execute(e,t)):(t.framebuffer=this._fbo,this._clearCommand.execute(e,t),t.framebuffer=this._fboClassified,this._clearCommand.execute(e,t)),t.framebuffer=i},O.prototype.executeClassified=function(e,t){if(!Object(a.default)(this._previousFramebuffer)){var i=t.framebuffer;t.framebuffer=this._fboClassified,this._translucentCommand.execute(e,t),t.framebuffer=i}this._classifiedCommand.execute(e,t)},O.prototype.executeUnclassified=function(e,t){this._unclassifiedCommand.execute(e,t)},O.prototype.isDestroyed=function(){return!1},O.prototype.destroy=function(){return this._fbo=this._fbo&&this._fbo.destroy(),this._texture=this._texture&&this._texture.destroy(),this._depthStencilTexture=this._depthStencilTexture&&this._depthStencilTexture.destroy(),Object(a.default)(this._unclassifiedCommand)&&(this._unclassifiedCommand.shaderProgram=this._unclassifiedCommand.shaderProgram&&this._unclassifiedCommand.shaderProgram.destroy(),this._classifiedCommand.shaderProgram=this._classifiedCommand.shaderProgram&&this._classifiedCommand.shaderProgram.destroy()),Object(r.default)(this)},t.a=O},function(e,t,i){"use strict";t.a="#ifdef MRT\n#extension GL_EXT_draw_buffers : enable\n#endif\n\nuniform vec4 u_bgColor;\nuniform sampler2D u_depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n if (texture2D(u_depthTexture, v_textureCoordinates).r < 1.0)\n {\n#ifdef MRT\n gl_FragData[0] = u_bgColor;\n gl_FragData[1] = vec4(u_bgColor.a);\n#else\n gl_FragColor = u_bgColor;\n#endif\n return;\n }\n \n discard;\n}\n"},function(e,t,i){"use strict";t.a="varying vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\n\nvoid main (void)\n{\n vec3 toCamera = czm_viewerPositionWC - v_outerPositionWC;\n vec3 lightDirection = getLightDirection(czm_viewerPositionWC);\n vec3 mieColor;\n vec3 rayleighColor;\n\n#ifdef PER_FRAGMENT_ATMOSPHERE\n calculateMieColorAndRayleighColor(v_outerPositionWC, mieColor, rayleighColor);\n#else\n mieColor = v_mieColor;\n rayleighColor = v_rayleighColor;\n#endif\n\n gl_FragColor = calculateFinalColor(czm_viewerPositionWC, toCamera, lightDirection, mieColor, rayleighColor);\n}\n"},function(e,t,i){"use strict";t.a="attribute vec4 position;\n\nvarying vec3 v_outerPositionWC;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\nvarying vec3 v_mieColor;\nvarying vec3 v_rayleighColor;\n#endif\n\nvoid main(void)\n{\n vec4 positionWC = czm_model * position;\n\n#ifndef PER_FRAGMENT_ATMOSPHERE\n calculateMieColorAndRayleighColor(positionWC.xyz, v_mieColor, v_rayleighColor);\n#endif\n v_outerPositionWC = positionWC.xyz;\n gl_Position = czm_modelViewProjection * position;\n}\n"},function(e,t,i){"use strict";var n=i(47),a=i(7),r=i(53),o=i(0),s=i(49),l=i(96),u=i(87),d=i(195),c=i(48),f=i(9),h=i(455),p=new a.default,m=new s.default,_=new s.default;function g(e,t,i,a){this.primitives=e,this.zIndex=a,this.classificationType=t,this.color=i,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new n.default,this.updaters=new n.default,this.updatersWithAttributes=new n.default,this.attributes=new n.default,this.subscriptions=new n.default,this.showsUpdated=new n.default,this.itemsToRemove=[],this.isDirty=!1,this.rectangleCollisionCheck=new h.a}function v(e,t){this._batches=[],this._primitives=e,this._classificationType=t}g.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},g.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),this.rectangleCollisionCheck.insert(i,t.geometry.rectangle),e.hasConstantFill&&e.fillMaterialProperty.isConstant&&f.default.isConstant(e.distanceDisplayConditionProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,a,r){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},g.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return Object(o.default)(n)&&(n(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},g.prototype.update=function(e){var t,i=!0,n=this.primitive,c=this.primitives;if(this.createPrimitive){var h=this.geometry.values;if(h.length>0)Object(o.default)(n)&&(Object(o.default)(this.oldPrimitive)?c.remove(n):this.oldPrimitive=n),n=new d.default({show:!1,asynchronous:!0,geometryInstances:h.slice(),classificationType:this.classificationType}),c.add(n,this.zIndex),i=!1;else{Object(o.default)(n)&&(c.remove(n),n=void 0);var g=this.oldPrimitive;Object(o.default)(g)&&(c.remove(g),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(Object(o.default)(n)&&n.ready){n.show=!0,Object(o.default)(this.oldPrimitive)&&(c.remove(this.oldPrimitive),this.oldPrimitive=void 0);var v=this.updatersWithAttributes.values,y=v.length,b=this.waitingOnCreate;for(t=0;t<y;t++){var w=v[t],O=this.geometry.get(w.id),x=this.attributes.get(O.id.id);if(Object(o.default)(x)||(x=n.getGeometryInstanceAttributes(O.id),this.attributes.set(O.id.id,x)),!w.fillMaterialProperty.isConstant||b){var A=w.fillMaterialProperty.color,T=f.default.getValueOrDefault(A,e,a.default.WHITE,p);a.default.equals(x._lastColor,T)||(x._lastColor=a.default.clone(T,x._lastColor),x.color=r.default.toValue(T,x.color))}var E=w.entity.isShowing&&(w.hasConstantFill||w.isFilled(e));E!==(1===x.show[0])&&(x.show=u.default.toValue(E,x.show));var C=w.distanceDisplayConditionProperty;if(!f.default.isConstant(C)){var S=f.default.getValueOrDefault(C,e,_,m);s.default.equals(S,x._lastDistanceDisplayCondition)||(x._lastDistanceDisplayCondition=s.default.clone(S,x._lastDistanceDisplayCondition),x.distanceDisplayCondition=l.a.toValue(S,x.distanceDisplayCondition))}}this.updateShows(n),this.waitingOnCreate=!1}else Object(o.default)(n)&&!n.ready&&(i=!1);return this.itemsToRemove.length=0,i},g.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var a=t[n],r=this.geometry.get(a.id),s=this.attributes.get(r.id.id);Object(o.default)(s)||(s=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,s));var l=a.entity.isShowing;l!==(1===s.show[0])&&(s.show=u.default.toValue(l,s.show),r.attributes.show.value[0]=s.show[0])}this.showsUpdated.removeAll()},g.prototype.contains=function(e){return this.updaters.contains(e.id)},g.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return c.a.PENDING;var n=i.getBoundingSphere(e.entity);return Object(o.default)(n)?(n.clone(t),c.a.DONE):c.a.FAILED},g.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;Object(o.default)(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;Object(o.default)(i)&&(e.remove(i),this.oldPrimitive=void 0)},v.prototype.add=function(e,t){for(var i,n=t.createFillGeometryInstance(e),a=this._batches,r=f.default.getValueOrDefault(t.zIndex,0),s=a.length,l=0;l<s;++l){var u=a[l];if(u.zIndex===r&&!u.overlapping(n.geometry.rectangle)){i=u;break}}return Object(o.default)(i)||(i=new g(this._primitives,this._classificationType,n.attributes.color.value,r),a.push(i)),i.add(t,n),i},v.prototype.remove=function(e){for(var t=this._batches,i=t.length,n=0;n<i;++n)if(t[n].remove(e))return},v.prototype.update=function(e){var t,i,n=!0,a=this._batches,r=a.length;for(t=0;t<r;++t)n=a[t].update(e)&&n;for(t=0;t<r;++t)for(var o=a[t],s=o.itemsToRemove,l=s.length,u=0;u<l;u++){i=s[u],o.remove(i);var d=this.add(e,i);o.isDirty=!0,d.isDirty=!0}for(t=r-1;t>=0;--t){var c=a[t];c.isDirty&&(n=a[t].update(e)&&n,c.isDirty=!1),0===c.geometry.length&&a.splice(t,1)}return n},v.prototype.getBoundingSphere=function(e,t){for(var i=this._batches,n=i.length,a=0;a<n;++a){var r=i[a];if(r.contains(e))return r.getBoundingSphere(e,t)}return c.a.FAILED},v.prototype.removeAllPrimitives=function(){for(var e=this._batches,t=e.length,i=0;i<t;++i)e[i].removeAllPrimitives()},t.a=v},function(e,t,i){"use strict";var n=i(47),a=i(1),r=i(7),o=i(53),s=i(0),l=i(49),u=i(96),d=i(138),c=i(87),f=i(61),h=i(64),p=i(48),m=i(9),_=new r.default,g=new l.default,v=new l.default,y=a.default.ZERO,b=new a.default;function w(e,t,i,a){this.translucent=t,this.width=i,this.shadows=a,this.primitives=e,this.createPrimitive=!1,this.waitingOnCreate=!1,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new n.default,this.updaters=new n.default,this.updatersWithAttributes=new n.default,this.attributes=new n.default,this.itemsToRemove=[],this.subscriptions=new n.default,this.showsUpdated=new n.default}function O(e,t,i){this._primitives=e,this._scene=t,this._shadows=i,this._solidBatches=new n.default,this._translucentBatches=new n.default}w.prototype.add=function(e,t){var i=e.id;if(this.createPrimitive=!0,this.geometry.set(i,t),this.updaters.set(i,e),e.hasConstantOutline&&e.outlineColorProperty.isConstant&&m.default.isConstant(e.distanceDisplayConditionProperty)&&m.default.isConstant(e.terrainOffsetProperty)){var n=this;this.subscriptions.set(i,e.entity.definitionChanged.addEventListener((function(t,i,a,r){"isShowing"===i&&n.showsUpdated.set(e.id,e)})))}else this.updatersWithAttributes.set(i,e)},w.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return Object(s.default)(i)&&(i(),this.subscriptions.remove(t),this.showsUpdated.remove(t)),!0}return!1},w.prototype.update=function(e){var t,i=!0,n=0,p=this.primitive,w=this.primitives;if(this.createPrimitive){var O=this.geometry.values;if(O.length>0)Object(s.default)(p)&&(Object(s.default)(this.oldPrimitive)?w.remove(p):this.oldPrimitive=p),p=new h.default({show:!1,asynchronous:!0,geometryInstances:O.slice(),appearance:new f.default({flat:!0,translucent:this.translucent,renderState:{lineWidth:this.width}}),shadows:this.shadows}),w.add(p),i=!1;else{Object(s.default)(p)&&(w.remove(p),p=void 0);var x=this.oldPrimitive;Object(s.default)(x)&&(w.remove(x),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=p,this.createPrimitive=!1,this.waitingOnCreate=!0}else if(Object(s.default)(p)&&p.ready){p.show=!0,Object(s.default)(this.oldPrimitive)&&(w.remove(this.oldPrimitive),this.oldPrimitive=void 0);var A=this.updatersWithAttributes.values,T=A.length,E=this.waitingOnCreate;for(t=0;t<T;t++){var C=A[t],S=this.geometry.get(C.id),M=this.attributes.get(S.id.id);if(Object(s.default)(M)||(M=p.getGeometryInstanceAttributes(S.id),this.attributes.set(S.id.id,M)),!C.outlineColorProperty.isConstant||E){var D=C.outlineColorProperty,P=m.default.getValueOrDefault(D,e,r.default.WHITE,_);r.default.equals(M._lastColor,P)||(M._lastColor=r.default.clone(P,M._lastColor),M.color=o.default.toValue(P,M.color),(this.translucent&&255===M.color[3]||!this.translucent&&255!==M.color[3])&&(this.itemsToRemove[n++]=C))}var I=C.entity.isShowing&&(C.hasConstantOutline||C.isOutlineVisible(e));I!==(1===M.show[0])&&(M.show=c.default.toValue(I,M.show));var L=C.distanceDisplayConditionProperty;if(!m.default.isConstant(L)){var j=m.default.getValueOrDefault(L,e,v,g);l.default.equals(j,M._lastDistanceDisplayCondition)||(M._lastDistanceDisplayCondition=l.default.clone(j,M._lastDistanceDisplayCondition),M.distanceDisplayCondition=u.a.toValue(j,M.distanceDisplayCondition))}var R=C.terrainOffsetProperty;if(!m.default.isConstant(R)){var N=m.default.getValueOrDefault(R,e,y,b);a.default.equals(N,M._lastOffset)||(M._lastOffset=a.default.clone(N,M._lastOffset),M.offset=d.a.toValue(N,M.offset))}}this.updateShows(p),this.waitingOnCreate=!1}else Object(s.default)(p)&&!p.ready&&(i=!1);return this.itemsToRemove.length=n,i},w.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var a=t[n],r=this.geometry.get(a.id),o=this.attributes.get(r.id.id);Object(s.default)(o)||(o=e.getGeometryInstanceAttributes(r.id),this.attributes.set(r.id.id,o));var l=a.entity.isShowing;l!==(1===o.show[0])&&(o.show=c.default.toValue(l,o.show),r.attributes.show.value[0]=o.show[0])}this.showsUpdated.removeAll()},w.prototype.contains=function(e){return this.updaters.contains(e.id)},w.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return p.a.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!Object(s.default)(n)||!Object(s.default)(n.boundingSphere)||Object(s.default)(n.show)&&0===n.show[0]?p.a.FAILED:(n.boundingSphere.clone(t),p.a.DONE)},w.prototype.removeAllPrimitives=function(){var e=this.primitives,t=this.primitive;Object(s.default)(t)&&(e.remove(t),this.primitive=void 0,this.geometry.removeAll(),this.updaters.removeAll());var i=this.oldPrimitive;Object(s.default)(i)&&(e.remove(i),this.oldPrimitive=void 0)},O.prototype.add=function(e,t){var i,n,a=t.createOutlineGeometryInstance(e),r=this._scene.clampLineWidth(t.outlineWidth);255===a.attributes.color.value[3]?(n=(i=this._solidBatches).get(r),Object(s.default)(n)||(n=new w(this._primitives,!1,r,this._shadows),i.set(r,n)),n.add(t,a)):(n=(i=this._translucentBatches).get(r),Object(s.default)(n)||(n=new w(this._primitives,!0,r,this._shadows),i.set(r,n)),n.add(t,a))},O.prototype.remove=function(e){var t,i=this._solidBatches.values,n=i.length;for(t=0;t<n;t++)if(i[t].remove(e))return;var a=this._translucentBatches.values,r=a.length;for(t=0;t<r;t++)if(a[t].remove(e))return},O.prototype.update=function(e){var t,i,n,a,r,o=this._solidBatches.values,s=o.length,l=this._translucentBatches.values,u=l.length,d=!0,c=!1;do{for(c=!1,i=0;i<s;i++){d=(a=o[i]).update(e);var f=(r=a.itemsToRemove).length;if(f>0)for(c=!0,t=0;t<f;t++)n=r[t],a.remove(n),this.add(e,n)}for(i=0;i<u;i++){d=(a=l[i]).update(e);var h=(r=a.itemsToRemove).length;if(h>0)for(c=!0,t=0;t<h;t++)n=r[t],a.remove(n),this.add(e,n)}}while(c);return d},O.prototype.getBoundingSphere=function(e,t){var i,n=this._solidBatches.values,a=n.length;for(i=0;i<a;i++){var r=n[i];if(r.contains(e))return r.getBoundingSphere(e,t)}var o=this._translucentBatches.values,s=o.length;for(i=0;i<s;i++){var l=o[i];if(l.contains(e))return l.getBoundingSphere(e,t)}return p.a.FAILED},O.prototype.removeAllPrimitives=function(){var e,t=this._solidBatches.values,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._translucentBatches.values,a=n.length;for(e=0;e<a;e++)n[e].removeAllPrimitives()},t.a=O},function(e,t,i){"use strict";var n=i(191),a=i(363),r=i(192),o=i(68),s=i(11),l=i(0);t.a=function(e,t){const i=e.bufferViews,u=e.buffers,d=t.bufferView,c=Object(r.a)(t.type);if(!Object(l.default)(t.bufferView))return{min:Object(o.a)(new Array(c),0),max:Object(o.a)(new Array(c),0)};const f=Object(o.a)(new Array(c),Number.POSITIVE_INFINITY),h=Object(o.a)(new Array(c),Number.NEGATIVE_INFINITY),p=i[d],m=u[p.buffer].extras._pipeline.source,_=t.count,g=Object(n.a)(e,t);let v=t.byteOffset+p.byteOffset+m.byteOffset;const y=t.componentType,b=s.default.getSizeInBytes(y),w=new DataView(m.buffer),O=new Array(c),x=Object(a.a)(y);for(let e=0;e<_;e++){x(w,v,c,b,O);for(let e=0;e<c;e++){const t=O[e];f[e]=Math.min(f[e],t),h[e]=Math.max(h[e],t)}v+=g}return{min:f,max:h}}},function(e,t,i){"use strict";var n=i(25),a=i(4),r=i(0);t.a=function(e,t){a.a.typeOf.object("material",e),a.a.defined("handler",t);const i=e.pbrMetallicRoughness;if(Object(r.default)(i)){if(Object(r.default)(i.baseColorTexture)){const e=i.baseColorTexture,n=t(e.index,e);if(Object(r.default)(n))return n}if(Object(r.default)(i.metallicRoughnessTexture)){const e=i.metallicRoughnessTexture,n=t(e.index,e);if(Object(r.default)(n))return n}}if(Object(r.default)(e.extensions)){const i=e.extensions.KHR_materials_pbrSpecularGlossiness;if(Object(r.default)(i)){if(Object(r.default)(i.diffuseTexture)){const e=i.diffuseTexture,n=t(e.index,e);if(Object(r.default)(n))return n}if(Object(r.default)(i.specularGlossinessTexture)){const e=i.specularGlossinessTexture,n=t(e.index,e);if(Object(r.default)(n))return n}}const n=e.extensions.KHR_materials_common;if(Object(r.default)(n)){const e=n.values.diffuse,i=n.values.ambient,a=n.values.emission,o=n.values.specular;if(Object(r.default)(e)&&Object(r.default)(e.index)){const i=t(e.index,e);if(Object(r.default)(i))return i}if(Object(r.default)(i)&&Object(r.default)(i.index)){const e=t(i.index,i);if(Object(r.default)(e))return e}if(Object(r.default)(a)&&Object(r.default)(a.index)){const e=t(a.index,a);if(Object(r.default)(e))return e}if(Object(r.default)(o)&&Object(r.default)(o.index)){const e=t(o.index,o);if(Object(r.default)(e))return e}}}const o=n.a.materialValue(e,(function(e){if(Object(r.default)(e.index)){const i=t(e.index,e);if(Object(r.default)(i))return i}}));if(Object(r.default)(o))return o;if(Object(r.default)(e.emissiveTexture)){const i=e.emissiveTexture,n=t(i.index,i);if(Object(r.default)(n))return n}if(Object(r.default)(e.normalTexture)){const i=e.normalTexture,n=t(i.index,i);if(Object(r.default)(n))return n}if(Object(r.default)(e.occlusionTexture)){const i=e.occlusionTexture,n=t(i.index,i);if(Object(r.default)(n))return n}}},function(e,t,i){"use strict";var n=i(0),a=i(33),r=i(56),o=i(58),s=i(45),l=i(118),u=i(62),d=i(83),c=i(25);function f(){}function h(e,t,i,n,a){var r=3*t,o=e[r],s=e[r+1],l=e[r+2];return void 0===o?63:((o===i&&s===n&&l===a)<<0)+((o===i&&s===a&&l===n)<<1)+((o===n&&s===i&&l===a)<<2)+((o===n&&s===a&&l===i)<<3)+((o===a&&s===i&&l===n)<<4)+((o===a&&s===n&&l===i)<<5)}function p(e){return(1&e)+(e>>1&1)+(e>>2&1)+(e>>3&1)+(e>>4&1)+(e>>5&1)}function m(e,t,i,n,a,r,o){var s=o?1:0,l=a?1:0,u=h(e,t,s,l,0);if(0===u)return t;var d=a?1:0,c=r?1:0,f=h(e,i,0,d,c);if(0===f)return i;var m=o?1:0,_=r?1:0,g=h(e,n,m,0,_);if(0===g)return n;var v,y,b,w=u&f&g;if(1&w)v=0,y=1,b=2;else if(2&w)v=0,b=1,y=2;else if(4&w)y=0,v=1,b=2;else if(8&w)y=0,b=1,v=2;else if(16&w)b=0,v=1,y=2;else{if(!(32&w)){var O=p(u),x=p(f),A=p(g);return O<x&&O<A?t:x<A?i:n}b=0,y=1,v=2}var T=3*t;e[T+v]=s,e[T+y]=l,e[T+b]=0;var E=3*i;e[E+v]=0,e[E+y]=d,e[E+b]=c;var C=3*n;return e[C+v]=m,e[C+y]=0,e[C+b]=_,-1}function _(e,t,i){var n=e[0];return 1===e[Math.min(t,i)*n+Math.max(t,i)]}function g(e){var t=new Uint8Array(e);return t[e-1]=192,8===e?t[e-1]=96:4===e?t[e-1]=48:2===e?t[e-1]=24:1===e&&(t[e-1]=12),t}function v(e,t){var i,n,a=e.gltf,r=e._loadResources;for(i=0;i<t.length;++i){var o=t[i],s=o.extras._pipeline.vertexNumberingScope;o.extras._pipeline.vertexNumberingScope=void 0;var l=s.extraVertices,u=r.getBuffer(o),d=o.byteStride||4,c=l.length,f=new Uint8Array(u.byteLength+c*d);for(f.set(u),n=0;n<c;++n)for(var h=l[n]*d,p=u.length+n*d,m=0;m<d;++m)f[p+m]=f[h+m];o.byteOffset=0,o.byteLength=f.byteLength;var _=a.buffers.push({byteLength:f.byteLength,extras:{_pipeline:{source:f.buffer}}})-1;o.buffer=_,r.buffers[_]=f;var g=s.accessors;for(n=0;n<g.length;++n){var v=g[n];a.accessors[v].count+=c}if(!s.createdOutlines){var y=s.outlineCoordinates,b=new Float32Array(y),w=e.gltf.buffers.push({byteLength:b.byteLength,extras:{_pipeline:{source:b.buffer}}})-1;r.buffers[w]=new Uint8Array(b.buffer,0,b.byteLength);var O=e.gltf.bufferViews.push({buffer:w,byteLength:b.byteLength,byteOffset:0,byteStride:3*Float32Array.BYTES_PER_ELEMENT,target:34962})-1,x=e.gltf.accessors.push({bufferView:O,byteOffset:0,componentType:5126,count:b.length/3,type:"VEC3",min:[0,0,0],max:[1,1,1]})-1,A=s.primitives;for(n=0;n<A.length;++n)A[n].attributes._OUTLINE_COORDINATES=x;r.vertexBuffersToCreate.enqueue(O),s.createdOutlines=!0}}}function y(e,t){return t.buffer===e}f.hasExtension=function(e){return Object(n.default)(e.extensionsRequired.CESIUM_primitive_outline)||Object(n.default)(e.extensionsUsed.CESIUM_primitive_outline)},f.outlinePrimitives=function(e){if(f.hasExtension(e)){var t=e.gltf,i=[];c.a.mesh(t,(function(t,a){c.a.meshPrimitive(t,(function(t,r){if(Object(n.default)(t.extensions)){var o=t.extensions.CESIUM_primitive_outline;if(Object(n.default)(o)){var s=function(e,t){var i=t.attributes;if(void 0===i)return;var a,r=e.gltf;for(var o in i)if(i.hasOwnProperty(o)){var s=i[o],l=r.accessors[s].bufferView,u=r.bufferViews[l];if(Object(n.default)(u.extras)||(u.extras={}),Object(n.default)(u.extras._pipeline)||(u.extras._pipeline={}),Object(n.default)(u.extras._pipeline.vertexNumberingScope)){if(void 0!==a&&u.extras._pipeline.vertexNumberingScope!==a)return}else u.extras._pipeline.vertexNumberingScope=a||{vertexCopies:[],extraVertices:[],outlineCoordinates:[],accessors:[],bufferViews:[],primitives:[],createdOutlines:!1};(a=u.extras._pipeline.vertexNumberingScope).bufferViews.indexOf(u)<0&&a.bufferViews.push(u),a.accessors.indexOf(s)<0&&a.accessors.push(s)}return a.primitives.push(t),a}(e,t);void 0!==s&&(i.indexOf(s)<0&&i.push(s),function(e,t,i,a,r){var o,s=r.vertexCopies,l=r.extraVertices,u=r.outlineCoordinates,d=e.gltf,c=d.meshes[t].primitives[i],f=d.accessors,h=d.bufferViews;for(var p in c.attributes)if(c.attributes.hasOwnProperty(p)){var g=c.attributes[p],v=f[g];if(Object(n.default)(v)){o=v.count;break}}if(!Object(n.default)(o))return;var y,b=f[c.indices],w=h[b.bufferView],O=f[a],x=h[O.bufferView],A=e._loadResources,T=A.getBuffer(w),E=A.getBuffer(x),C=5123===b.componentType?new Uint16Array(T.buffer,T.byteOffset+b.byteOffset,b.count):new Uint32Array(T.buffer,T.byteOffset+b.byteOffset,b.count),S=5123===O.componentType?new Uint16Array(E.buffer,E.byteOffset+O.byteOffset,O.count):new Uint32Array(E.buffer,E.byteOffset+O.byteOffset,O.count),M=o,D=[M];for(y=0;y<S.length;y+=2){var P=S[y],I=S[y+1],L=Math.min(P,I),j=Math.max(P,I);D[L*M+j]=1}for(y=0;y<C.length;y+=3)for(var R=C[y],N=C[y+1],B=C[y+2],F=_(D,R,N),k=_(D,N,B),z=_(D,B,R),U=m(u,R,N,B,F,k,z);U>=0;){var V;if(void 0===(V=U===R?s[R]:U===N?s[N]:s[B])){V=o+l.length;for(var H=U;H>=o;)H=l[H-o];l.push(H),s[U]=V}V>65534&&C instanceof Uint16Array&&(C=new Uint32Array(C),b.componentType=5125,w.buffer=d.buffers.push({byteLength:C.byteLength,extras:{_pipeline:{source:C.buffer}}})-1,w.byteLength=C.byteLength,w.byteOffset=0,e._loadResources.buffers[w.buffer]=new Uint8Array(C.buffer,0,C.byteLength),A.indexBuffersToCreate._array.forEach((function(e){e.id===b.bufferView&&(e.componentType=b.componentType)}))),U===R?(R=V,C[y]=V):U===N?(N=V,C[y+1]=V):(B=V,C[y+2]=V),Object(n.default)(b.max)&&(b.max[0]=Math.max(b.max[0],V)),U=m(u,R,N,B,F,k,z)}}(e,a,r,o.indices,s))}}}))}));for(var a=0;a<i.length;++a)v(e,i[a].bufferViews);!function(e){var t,i=e.gltf,n=e._loadResources;for(t=0;t<i.buffers.length;++t){var a=i.buffers[t],r=i.bufferViews.filter(y.bind(void 0,t)),o=r.reduce((function(e,t){return e+t.byteLength}),0);if(o!==a.byteLength){for(var s=new Uint8Array(o),l=0,u=0;u<r.length;++u){var d=r[u],c=n.getBuffer(d);s.set(c,l),d.byteOffset=l,l+=c.byteLength}n.buffers[t]=s,a.extras._pipeline.source=s.buffer,a.byteLength=o}}}(e)}},f.createTexture=function(e,t){var i=t.cache.modelOutliningCache;if(Object(n.default)(i)||(i=t.cache.modelOutliningCache={}),Object(n.default)(i.outlineTexture))return i.outlineTexture;for(var c=Math.min(4096,r.a.maximumTextureSize),f=c,h=g(f),p=[];f>1;)f>>=1,p.push(g(f));var m=new s.default({context:t,source:{arrayBufferView:h,mipLevels:p},width:c,height:1,pixelFormat:a.default.LUMINANCE,sampler:new o.default({wrapS:d.default.CLAMP_TO_EDGE,wrapT:d.default.CLAMP_TO_EDGE,minificationFilter:u.default.LINEAR_MIPMAP_LINEAR,magnificationFilter:l.default.LINEAR})});return i.outlineTexture=m,m},t.a=f},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(7),o=i(53),s=i(207),l=i(2),u=i(0),d=i(214),c=i(19),f=i(15),h=i(78),p=i(14),m=i(5),_=i(12),g=i(6),v=i(123),y=i(79),b=i(21),w=i(164),O=i(217),x=i(120),A=i(157),T=i(30),E=i(23),C=i(18),S=i(461),M=i(168),D=i(231),P=i(288),I=i(171),L=i(183),j=i(947),R=i(470),N=i(160),B=i(948),F=i(471),k=i(13),z=i(285),U=i(949),V=i(381),H=i(950),G=i(291),Y=i(26);function W(e,t,i,n){this._tileset=e,this._header=i;var a=i.content;this.transform=Object(u.default)(i.transform)?g.default.unpack(i.transform):g.default.clone(g.default.IDENTITY);var o,s,l,d,c=Object(u.default)(n)?n.computedTransform:e.modelMatrix,f=g.default.multiply(c,this.transform,new g.default),h=Object(u.default)(n)?n._initialTransform:g.default.IDENTITY;this._initialTransform=g.default.multiply(h,this.transform,new g.default),this.computedTransform=f,this._boundingVolume=this.createBoundingVolume(i.boundingVolume,f),this._boundingVolume2D=void 0,Object(u.default)(a)&&Object(u.default)(a.boundingVolume)&&(o=this.createBoundingVolume(a.boundingVolume,f)),this._contentBoundingVolume=o,this._contentBoundingVolume2D=void 0,Object(u.default)(i.viewerRequestVolume)&&(s=this.createBoundingVolume(i.viewerRequestVolume,f)),this._viewerRequestVolume=s,this.geometricError=i.geometricError,this._geometricError=i.geometricError,Object(u.default)(this._geometricError)||(this._geometricError=Object(u.default)(n)?n.geometricError:e._geometricError,W._deprecationWarning("geometricErrorUndefined","Required property geometricError is undefined for this tile. Using parent's geometric error instead.")),this.updateGeometricErrorScale(),Object(u.default)(i.refine)?("replace"!==i.refine&&"add"!==i.refine||W._deprecationWarning("lowercase-refine",'This tile uses a lowercase refine "'+i.refine+'". Instead use "'+i.refine.toUpperCase()+'".'),l="REPLACE"===i.refine.toUpperCase()?L.a.REPLACE:L.a.ADD):l=Object(u.default)(n)?n.refine:L.a.REPLACE,this.refine=l,this.children=[],this.parent=n;var m,_,v,y,b=!1,w=!1;if(t=T.default.createIfNeeded(t),Object(N.a)(i,"3DTILES_multiple_contents"))w=!0,m=M.a.UNLOADED,_=t.clone();else if(Object(u.default)(a)){var x=a.uri;Object(u.default)(a.url)&&(W._deprecationWarning("contentUrl",'This tileset JSON uses the "content.url" property which has been deprecated. Use "content.uri" instead.'),x=a.url),m=M.a.UNLOADED,_=t.getDerivedResource({url:x}),v=O.default.getServerKey(_.getUrlComponent())}else d=new j.a(e,this),b=!0,m=M.a.READY;if(this._content=d,this._contentResource=_,this._contentState=m,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this._expiredContent=void 0,this._serverKey=v,this.hasEmptyContent=b,this.hasTilesetContent=!1,this.hasImplicitContent=!1,this.hasMultipleContents=w,Object(N.a)(i,"3DTILES_metadata")){var A=i.extensions["3DTILES_metadata"],E=e.metadata.schema.classes[A.class];y=new H.a({tile:A,class:E})}this.metadata=y,this.cacheNode=void 0;var C,S,D=i.expire;Object(u.default)(D)&&(C=D.duration,Object(u.default)(D.date)&&(S=p.default.fromIso8601(D.date))),this.expireDuration=C,this.expireDate=S,this.lastStyleTime=0,this._optimChildrenWithinParent=P.a.NOT_COMPUTED,this.clippingPlanesDirty=!1,this.priorityDeferred=!1,this.implicitTileset=void 0,this.implicitCoordinates=void 0,this.implicitSubtree=void 0,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._screenSpaceErrorProgressiveResolution=0,this._visibilityPlaneMask=0,this._visible=!1,this._inRequestVolume=!1,this._finalResolution=!0,this._depth=0,this._stackLength=0,this._selectionDepth=0,this._updatedVisibilityFrame=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._ancestorWithContent=void 0,this._ancestorWithContentAvailable=void 0,this._refines=!1,this._shouldSelect=!1,this._isClipped=!0,this._clippingPlanesState=0,this._debugBoundingVolume=void 0,this._debugContentBoundingVolume=void 0,this._debugViewerRequestVolume=void 0,this._debugColor=r.default.fromRandom({alpha:1}),this._debugColorizeTiles=!1,this._priority=0,this._priorityHolder=this,this._priorityProgressiveResolution=!1,this._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1,this._priorityReverseScreenSpaceError=0,this._foveatedFactor=0,this._wasMinPriorityChild=!1,this._loadTimestamp=new p.default,this._commandsLength=0,this._color=void 0,this._colorDirty=!1,this._request=void 0}W._deprecationWarning=d.a,Object.defineProperties(W.prototype,{tileset:{get:function(){return this._tileset}},content:{get:function(){return this._content}},boundingVolume:{get:function(){return this._boundingVolume}},contentBoundingVolume:{get:function(){return Object(l.default)(this._contentBoundingVolume,this._boundingVolume)}},boundingSphere:{get:function(){return this._boundingVolume.boundingSphere}},extras:{get:function(){return this._header.extras}},color:{get:function(){return Object(u.default)(this._color)||(this._color=new r.default),r.default.clone(this._color)},set:function(e){this._color=r.default.clone(e,this._color),this._colorDirty=!0}},contentAvailable:{get:function(){return this.contentReady&&!this.hasEmptyContent&&!this.hasTilesetContent&&!this.hasImplicitContent||Object(u.default)(this._expiredContent)&&!this.contentFailed}},contentReady:{get:function(){return this._contentState===M.a.READY}},contentUnloaded:{get:function(){return this._contentState===M.a.UNLOADED}},contentExpired:{get:function(){return this._contentState===M.a.EXPIRED}},contentFailed:{get:function(){return this._contentState===M.a.FAILED}},contentReadyToProcessPromise:{get:function(){if(Object(u.default)(this._contentReadyToProcessPromise))return this._contentReadyToProcessPromise.promise}},contentReadyPromise:{get:function(){if(Object(u.default)(this._contentReadyPromise))return this._contentReadyPromise.promise}},commandsLength:{get:function(){return this._commandsLength}}});var q=new a.default;var X=new p.default;function K(e){return function(){return e._priority}}function J(e,t,i){e._contentState===M.a.PROCESSING&&--t.statistics.numberOfTilesProcessing,e._contentState=M.a.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}function Z(e,t,i){e._contentState===M.a.PROCESSING?--t.statistics.numberOfTilesProcessing:--t.statistics.numberOfPendingRequests,e._contentState=M.a.FAILED,e._contentReadyPromise.reject(i),e._contentReadyToProcessPromise.reject(i)}W.prototype.getScreenSpaceError=function(e,t,i){var n=this._tileset,a=Object(l.default)(i,1),r=Object(u.default)(this.parent)?this.parent.geometricError:n._geometricError,o=t?r:this.geometricError;if(0===o)return 0;var s,d=e.camera,c=d.frustum,f=e.context,h=f.drawingBufferWidth,p=f.drawingBufferHeight*a;if(e.mode===k.default.SCENE2D||c instanceof y.a){Object(u.default)(c._offCenterFrustum)&&(c=c._offCenterFrustum),s=o/(Math.max(c.top-c.bottom,c.right-c.left)/Math.max(h,p))}else{var _=Math.max(this._distanceToCamera,m.default.EPSILON7);if(s=o*p/(_*d.frustum.sseDenominator),n.dynamicScreenSpaceError){var g=n._dynamicScreenSpaceErrorComputedDensity,v=n.dynamicScreenSpaceErrorFactor;s-=m.default.fog(_,g)*v}}return s/=e.pixelRatio},W.prototype.updateVisibility=function(e){var t=this.parent,i=this._tileset,n=Object(u.default)(t)?t.computedTransform:i.modelMatrix,r=Object(u.default)(t)?t._visibilityPlaneMask:s.a.MASK_INDETERMINATE;this.updateTransform(n),this._distanceToCamera=this.distanceToTile(e),this._centerZDepth=this.distanceToTileCenter(e),this._screenSpaceError=this.getScreenSpaceError(e,!1),this._screenSpaceErrorProgressiveResolution=this.getScreenSpaceError(e,!1,i.progressiveResolutionHeightFraction),this._visibilityPlaneMask=this.visibility(e,r),this._visible=this._visibilityPlaneMask!==s.a.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(e),this._priorityReverseScreenSpaceError=function(e,t){var i=t.parent,n=Object(u.default)(i)&&(!e._skipLevelOfDetail||0===t._screenSpaceError||i.hasTilesetContent||i.hasImplicitContent)?i._screenSpaceError:t._screenSpaceError;return e.root._screenSpaceError-n}(i,this),this._priorityProgressiveResolution=function(e,t){if(e.progressiveResolutionHeightFraction<=0||e.progressiveResolutionHeightFraction>.5)return!1;var i=t._screenSpaceErrorProgressiveResolution>e._maximumScreenSpaceError;t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!1;var n=t.parent,a=e._maximumScreenSpaceError,r=t._screenSpaceErrorProgressiveResolution<=a,o=Object(u.default)(n)&&n._screenSpaceErrorProgressiveResolution>a;return r&&o&&(t._priorityProgressiveResolutionScreenSpaceErrorLeaf=!0,i=!0),i}(i,this),this.priorityDeferred=function(e,t){var i=e._tileset,n=t.camera,r=e.boundingSphere,o=r.radius,s=a.default.multiplyByScalar(n.directionWC,e._centerZDepth,q),l=a.default.add(n.positionWC,s,q),d=a.default.subtract(l,r.center,q);if(a.default.magnitude(d)>o){var c=a.default.normalize(d,q),f=a.default.multiplyByScalar(c,o,q),h=a.default.add(r.center,f,q),p=a.default.subtract(h,n.positionWC,q),_=a.default.normalize(p,q);e._foveatedFactor=1-Math.abs(a.default.dot(n.directionWC,_))}else e._foveatedFactor=0;var g=e.refine===L.a.REPLACE,v=i._skipLevelOfDetail;if(g&&!v||!i.foveatedScreenSpaceError||1===i.foveatedConeSize||e._priorityProgressiveResolution&&g&&v||i._pass===I.a.PRELOAD_FLIGHT||i._pass===I.a.PRELOAD)return!1;var y=1-Math.cos(.5*n.frustum.fov),b=i.foveatedConeSize*y;if(e._foveatedFactor<=b)return!1;var w=y-b,O=m.default.clamp((e._foveatedFactor-b)/w,0,1),x=i.foveatedInterpolationCallback(i.foveatedMinimumScreenSpaceErrorRelaxation,i.maximumScreenSpaceError,O),A=0===e._screenSpaceError&&Object(u.default)(e.parent)?.5*e.parent._screenSpaceError:e._screenSpaceError;return i.maximumScreenSpaceError-x<=A}(this,e)},W.prototype.updateExpiration=function(){if(Object(u.default)(this.expireDate)&&this.contentReady&&!this.hasEmptyContent&&!this.hasMultipleContents){var e=p.default.now(X);p.default.lessThan(this.expireDate,e)&&(this._contentState=M.a.EXPIRED,this._expiredContent=this._content)}},W.prototype.requestContent=function(){return this.hasEmptyContent?0:this.hasMultipleContents?function(e){var t=e._content,i=e._tileset;if(!Object(u.default)(t)){var n=e._header.extensions["3DTILES_multiple_contents"];t=new B.a(i,e,e._contentResource.clone(),n),e._content=t}var a=t.requestInnerContents();if(a>0)return a;return e._contentState=M.a.LOADING,e._contentReadyToProcessPromise=C.a.defer(),e._contentReadyPromise=C.a.defer(),t.contentsFetchedPromise.then((function(){if(e._contentState===M.a.LOADING){if(!e.isDestroyed())return e._contentState=M.a.PROCESSING,e._contentReadyToProcessPromise.resolve(t),t.readyPromise.then((function(t){e.isDestroyed()?J(e,i,"Tile was unloaded while content was processing"):(e._selectedFrame=0,e.lastStyleTime=0,p.default.now(e._loadTimestamp),e._contentState=M.a.READY,e._contentReadyPromise.resolve(t))}));J(e,i,"Tile was unloaded while content was loading")}})).otherwise((function(t){J(e,i,t)})),0}(this):function(e){var t=e._contentResource.clone(),i=e.contentExpired;i&&t.setQueryParameters({expired:e.expireDate.toString()});var n=new w.default({throttle:!0,throttleByServer:!0,type:A.a.TILES3D,priorityFunction:K(e),serverKey:e._serverKey});e._request=n,t.request=n;var a=t.fetchArrayBuffer();if(!Object(u.default)(a))return 1;var r=e._contentState,o=e._tileset;return e._contentState=M.a.LOADING,e._contentReadyToProcessPromise=C.a.defer(),e._contentReadyPromise=C.a.defer(),++o.statistics.numberOfPendingRequests,a.then((function(t){if(!e.isDestroyed()){var n=function(e,t){var i,n=Object(F.a)(t),a=e._tileset;a._disableSkipLevelOfDetail=a._disableSkipLevelOfDetail||n.contentType===D.a.GEOMETRY||n.contentType===D.a.VECTOR,n.contentType===D.a.IMPLICIT_SUBTREE&&(e.hasImplicitContent=!0);n.contentType===D.a.EXTERNAL_TILESET&&(e.hasTilesetContent=!0);var r=S.a[n.contentType];i=Object(u.default)(n.binaryPayload)?r(a,e,e._contentResource,n.binaryPayload.buffer,0):r(a,e,e._contentResource,n.jsonPayload);var o=e._header.content;return i.groupMetadata=Object(R.a)(a,o),i}(e,t);return i&&(e.expireDate=void 0),e._content=n,e._contentState=M.a.PROCESSING,e._contentReadyToProcessPromise.resolve(n),--o.statistics.numberOfPendingRequests,n.readyPromise.then((function(t){e.isDestroyed()?Z(e,o):(!function(e){if(Object(u.default)(e.expireDuration)){var t=p.default.now(X);p.default.addSeconds(t,e.expireDuration,t),Object(u.default)(e.expireDate)?p.default.lessThan(e.expireDate,t)&&p.default.clone(t,e.expireDate):e.expireDate=p.default.clone(t)}}(e),e._selectedFrame=0,e.lastStyleTime=0,p.default.now(e._loadTimestamp),e._contentState=M.a.READY,e._contentReadyPromise.resolve(t))}))}Z(e,o)})).otherwise((function(t){if(n.state===x.a.CANCELLED)return e._contentState=r,--o.statistics.numberOfPendingRequests,void++o.statistics.numberOfAttemptedRequests;Z(e,o,t)})),0}(this)},W.prototype.cancelRequests=function(){this.hasMultipleContents?this._content.cancelRequests():this._request.cancel()},W.prototype.unloadContent=function(){this.hasEmptyContent||this.hasTilesetContent||this.hasImplicitContent||(this._content=this._content&&this._content.destroy(),this._contentState=M.a.UNLOADED,this._contentReadyToProcessPromise=void 0,this._contentReadyPromise=void 0,this.lastStyleTime=0,this.clippingPlanesDirty=0===this._clippingPlanesState,this._clippingPlanesState=0,this._debugColorizeTiles=!1,this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy())};var Q=new n.default;function $(e,t){if(t.mode!==k.default.SCENE3D&&!Object(u.default)(e._boundingVolume2D)){var i=e._boundingVolume.boundingSphere,a=n.default.projectTo2D(i,t.mapProjection,Q);e._boundingVolume2D=new V.a(a.center,a.radius)}return t.mode!==k.default.SCENE3D?e._boundingVolume2D:e._boundingVolume}W.prototype.visibility=function(e,t){var i=e.cullingVolume,n=$(this,e),a=this._tileset,r=a.clippingPlanes;if(Object(u.default)(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(n,a.clippingPlanesOriginMatrix);if(this._isClipped=o!==h.a.INSIDE,o===h.a.OUTSIDE)return s.a.MASK_OUTSIDE}return i.computeVisibilityWithPlaneMask(n,t)},W.prototype.contentVisibility=function(e){if(!Object(u.default)(this._contentBoundingVolume))return h.a.INSIDE;if(this._visibilityPlaneMask===s.a.MASK_INSIDE)return h.a.INSIDE;var t=e.cullingVolume,i=function(e,t){if(t.mode!==k.default.SCENE3D&&!Object(u.default)(e._contentBoundingVolume2D)){var i=e._contentBoundingVolume.boundingSphere,a=n.default.projectTo2D(i,t.mapProjection,Q);e._contentBoundingVolume2D=new V.a(a.center,a.radius)}return t.mode!==k.default.SCENE3D?e._contentBoundingVolume2D:e._contentBoundingVolume}(this,e),a=this._tileset,r=a.clippingPlanes;if(Object(u.default)(r)&&r.enabled){var o=r.computeIntersectionWithBoundingVolume(i,a.clippingPlanesOriginMatrix);if(this._isClipped=o!==h.a.INSIDE,o===h.a.OUTSIDE)return h.a.OUTSIDE}return t.computeVisibility(i)},W.prototype.distanceToTile=function(e){return $(this,e).distanceToCamera(e)};var ee=new a.default;W.prototype.distanceToTileCenter=function(e){var t=$(this,e).boundingVolume,i=a.default.subtract(t.center,e.camera.positionWC,ee);return a.default.dot(e.camera.directionWC,i)},W.prototype.insideViewerRequestVolume=function(e){var t=this._viewerRequestVolume;return!Object(u.default)(t)||0===t.distanceToCamera(e)};var te=new _.default,ie=new a.default,ne=new _.default,ae=new a.default,re=new b.default,oe=new v.a,se=new g.default;function le(e,t,i,n){if(!g.default.equalsEpsilon(t,i,m.default.EPSILON8))return function(e,t,i,n){var a=b.default.unpack(e,0,re),r=e[4],o=e[5],s=v.a.fromRectangle(a,r,o,f.default.WGS84,oe),l=s.center,d=s.halfAxes;t=g.default.multiplyTransformation(t,g.default.inverseTransformation(i,se),se),l=g.default.multiplyByPoint(t,l,l);var c=g.default.getMatrix3(t,te);return d=_.default.multiply(c,d,d),Object(u.default)(n)&&n instanceof G.a?(n.update(l,d),n):new G.a(l,d)}(e,t,i,n);if(Object(u.default)(n))return n;var a=b.default.unpack(e,0,re);return new z.a({rectangle:a,minimumHeight:e[4],maximumHeight:e[5]})}W.prototype.createBoundingVolume=function(e,t,i){if(!Object(u.default)(e))throw new E.a("boundingVolume must be defined");if(Object(N.a)(e,"3DTILES_bounding_volume_S2"))return new U.a(e.extensions["3DTILES_bounding_volume_S2"]);if(Object(u.default)(e.box))return function(e,t,i){var n=a.default.fromElements(e[0],e[1],e[2],ae),r=_.default.fromArray(e,3,ne);n=g.default.multiplyByPoint(t,n,n);var o=g.default.getMatrix3(t,te);return r=_.default.multiply(o,r,r),Object(u.default)(i)?(i.update(n,r),i):new G.a(n,r)}(e.box,t,i);if(Object(u.default)(e.region))return le(e.region,t,this._initialTransform,i);if(Object(u.default)(e.sphere))return function(e,t,i){var n=a.default.fromElements(e[0],e[1],e[2],ae),r=e[3];n=g.default.multiplyByPoint(t,n,n);var o=g.default.getScale(t,ie);return r*=a.default.maximumComponent(o),Object(u.default)(i)?(i.update(n,r),i):new V.a(n,r)}(e.sphere,t,i);throw new E.a("boundingVolume must contain a sphere, region, or box")},W.prototype.updateTransform=function(e){e=Object(l.default)(e,g.default.IDENTITY);var t=g.default.multiply(e,this.transform,se);if(!g.default.equals(t,this.computedTransform)){g.default.clone(t,this.computedTransform);var i=this._header,n=this._header.content;this._boundingVolume=this.createBoundingVolume(i.boundingVolume,this.computedTransform,this._boundingVolume),Object(u.default)(this._contentBoundingVolume)&&(this._contentBoundingVolume=this.createBoundingVolume(n.boundingVolume,this.computedTransform,this._contentBoundingVolume)),Object(u.default)(this._viewerRequestVolume)&&(this._viewerRequestVolume=this.createBoundingVolume(i.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)),this.updateGeometricErrorScale(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy()}},W.prototype.updateGeometricErrorScale=function(){var e=g.default.getScale(this.computedTransform,ie),t=a.default.maximumComponent(e);this.geometricError=this._geometricError*t},W.prototype.update=function(e,t,i){var n=t.commandList.length;!function(e,t){var i=t.clippingPlanes,n=0;Object(u.default)(i)&&e._isClipped&&i.enabled&&(n=i.clippingPlanesState),n!==e._clippingPlanesState&&(e._clippingPlanesState=n,e.clippingPlanesDirty=!0)}(this,e),function(e,t,i,n){if(n.isRender){var a=Object(u.default)(e._header.content)&&Object(u.default)(e._header.content.boundingVolume),s=e.hasEmptyContent||e.hasTilesetContent||e.hasImplicitContent,l=t.debugShowBoundingVolume||t.debugShowContentBoundingVolume&&!a;if(l){var d;d=e._finalResolution?s?r.default.DARKGRAY:r.default.WHITE:r.default.YELLOW,Object(u.default)(e._debugBoundingVolume)||(e._debugBoundingVolume=e._boundingVolume.createDebugVolume(d)),e._debugBoundingVolume.update(i);var c=e._debugBoundingVolume.getGeometryInstanceAttributes("outline");c.color=o.default.toValue(d,c.color)}else!l&&Object(u.default)(e._debugBoundingVolume)&&(e._debugBoundingVolume=e._debugBoundingVolume.destroy());t.debugShowContentBoundingVolume&&a?(Object(u.default)(e._debugContentBoundingVolume)||(e._debugContentBoundingVolume=e._contentBoundingVolume.createDebugVolume(r.default.BLUE)),e._debugContentBoundingVolume.update(i)):!t.debugShowContentBoundingVolume&&Object(u.default)(e._debugContentBoundingVolume)&&(e._debugContentBoundingVolume=e._debugContentBoundingVolume.destroy()),t.debugShowViewerRequestVolume&&Object(u.default)(e._viewerRequestVolume)?(Object(u.default)(e._debugViewerRequestVolume)||(e._debugViewerRequestVolume=e._viewerRequestVolume.createDebugVolume(r.default.YELLOW)),e._debugViewerRequestVolume.update(i)):!t.debugShowViewerRequestVolume&&Object(u.default)(e._debugViewerRequestVolume)&&(e._debugViewerRequestVolume=e._debugViewerRequestVolume.destroy());var f=t.debugColorizeTiles&&!e._debugColorizeTiles||Object(u.default)(t._heatmap.tilePropertyName),h=!t.debugColorizeTiles&&e._debugColorizeTiles;f?(t._heatmap.colorize(e,i),e._debugColorizeTiles=!0,e.color=e._debugColor):h&&(e._debugColorizeTiles=!1,e.color=r.default.WHITE),e._colorDirty&&(e._colorDirty=!1,e._content.applyDebugSettings(!0,e._color)),h&&t.makeStyleDirty()}}(this,e,t,i),function(e,t,i){var n=e._content,a=e._expiredContent;if(!e.hasMultipleContents&&Object(u.default)(a)){if(!e.contentReady)return void a.update(t,i);e._expiredContent.destroy(),e._expiredContent=void 0}n.update(t,i)}(this,e,t);var a=t.commandList.length-n;this._commandsLength=a;for(var s=0;s<a;++s){var l=t.commandList[n+s],d=l.pass===Y.default.TRANSLUCENT;l.depthForTranslucentClassification=d}this.clippingPlanesDirty=!1};var ue=[];function de(e,t,i){var n=e*Math.pow(10,t);return parseInt(n)*Math.pow(10,i)}function ce(e,t,i){return Math.max(m.default.normalize(e,t,i)-m.default.EPSILON7,0)}W.prototype.process=function(e,t){var i=t.commandList;t.commandList=ue,this._content.update(e,t),ue.length=0,t.commandList=i},W.prototype.updatePriority=function(){var e=this.tileset,t=e.preferLeaves,i=e._minimumPriority,n=e._maximumPriority,a=Math.pow(10,8),r=Math.pow(10,9),o=Math.pow(10,10),s=ce(this._depth,i.depth,n.depth);s=t?1-s:s;var l=de(!e._skipLevelOfDetail&&this.refine===L.a.REPLACE?ce(this._priorityHolder._distanceToCamera,i.distance,n.distance):ce(this._priorityReverseScreenSpaceError,i.reverseScreenSpaceError,n.reverseScreenSpaceError),4,0),u=this._priorityProgressiveResolution?0:a,d=de(ce(this._priorityHolder._foveatedFactor,i.foveatedFactor,n.foveatedFactor),4,4),c=this.priorityDeferred?r:0,f=e._pass===I.a.PRELOAD_FLIGHT?0:o;this._priority=s+l+u+d+c+f},W.prototype.isDestroyed=function(){return!1},W.prototype.destroy=function(){return this._content=this._content&&this._content.destroy(),this._expiredContent=this._expiredContent&&!this._expiredContent.isDestroyed()&&this._expiredContent.destroy(),this._debugBoundingVolume=this._debugBoundingVolume&&this._debugBoundingVolume.destroy(),this._debugContentBoundingVolume=this._debugContentBoundingVolume&&this._debugContentBoundingVolume.destroy(),this._debugViewerRequestVolume=this._debugViewerRequestVolume&&this._debugViewerRequestVolume.destroy(),Object(c.default)(this)},t.a=W},function(e,t,i){"use strict";t.a="attribute vec3 position;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelViewProjection;\n\nvoid main()\n{\n gl_Position = czm_depthClamp(u_modifiedModelViewProjection * vec4(position, 1.0));\n}\n"},function(e,t,i){"use strict";var n=i(7),a=i(0),r=i(19),o=i(157),s=i(26),l=i(90),u=i(250),d=i(209);function c(e,t,i,n){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t){var i=e._tileset,n=e._tile,a=e._resource,r={content:e,primitive:i};e._model=new u.default({gltf:t,cull:!1,releaseGltfJson:!0,opaquePass:s.default.CESIUM_3D_TILE,basePath:a,requestType:o.a.TILES3D,modelMatrix:n.computedTransform,upAxis:i._gltfUpAxis,forwardAxis:l.a.X,shadows:i.shadows,debugWireframe:i.debugWireframe,incrementallyLoadTextures:!1,addBatchIdToGeneratedShaders:!1,pickObject:r,imageBasedLightingFactor:i.imageBasedLightingFactor,lightColor:i.lightColor,luminanceAtZenith:i.luminanceAtZenith,sphericalHarmonicCoefficients:i.sphericalHarmonicCoefficients,specularEnvironmentMaps:i.specularEnvironmentMaps,backFaceCulling:i.backFaceCulling,showOutline:i.showOutline}),e._model.readyPromise.then((function(e){e.activeAnimations.addAll({loop:d.a.REPEAT})}))}(this,n)}Object.defineProperties(c.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return this._model.pointsLength}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}}),c.prototype.hasProperty=function(e,t){return!1},c.prototype.getFeature=function(e){},c.prototype.applyDebugSettings=function(e,t){t=e?t:n.default.WHITE,this._model.color=t},c.prototype.applyStyle=function(e){var t=Object(a.default)(e)&&Object(a.default)(e.color),i=Object(a.default)(e)&&Object(a.default)(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):n.default.clone(n.default.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)},c.prototype.update=function(e,t){var i=this._model,n=this._tile;i.modelMatrix=n.computedTransform,i.shadows=e.shadows,i.imageBasedLightingFactor=e.imageBasedLightingFactor,i.lightColor=e.lightColor,i.luminanceAtZenith=e.luminanceAtZenith,i.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,i.specularEnvironmentMaps=e.specularEnvironmentMaps,i.backFaceCulling=e.backFaceCulling,i.debugWireframe=e.debugWireframe;var r=e.clippingPlanes;i.referenceMatrix=e.clippingPlanesOriginMatrix,Object(a.default)(r)&&n.clippingPlanesDirty&&(i._clippingPlanes=r.enabled&&n._isClipped?r:void 0),Object(a.default)(r)&&Object(a.default)(i._clippingPlanes)&&i._clippingPlanes!==r&&(i._clippingPlanes=r),i.update(t)},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),Object(r.default)(this)},t.a=c},function(e,t,i){"use strict";var n=i(4),a=i(3),r={};function o(e,t,i,n){if(0===n){1===i&&(t.x=e-1-t.x,t.y=e-1-t.y);var a=t.x;t.x=t.y,t.y=a}}r.encode2D=function(e,t,i){var r=Math.pow(2,e);if(n.a.typeOf.number("level",e),n.a.typeOf.number("x",t),n.a.typeOf.number("y",i),e<1)throw new a.default("Hilbert level cannot be less than 1.");if(t<0||t>=r||i<0||i>=r)throw new a.default("Invalid coordinates for given level.");var s,l,u,d={x:t,y:i},c=BigInt(0);for(u=r/2;u>0;u/=2)s=(d.x&u)>0?1:0,l=(d.y&u)>0?1:0,c+=BigInt((3*s^l)*u*u),o(r,d,s,l);return c},r.decode2D=function(e,t){if(n.a.typeOf.number("level",e),n.a.typeOf.bigint("index",t),e<1)throw new a.default("Hilbert level cannot be less than 1.");if(t<BigInt(0)||t>=BigInt(Math.pow(4,e)))throw new a.default("Hilbert index exceeds valid maximum for given level.");var i,r,s,l,u=Math.pow(2,e),d={x:0,y:0};for(s=1,l=t;s<u;s*=2)o(s,d,i=1&Number(l/BigInt(2)),r=1&Number(l^BigInt(i))),d.x+=s*i,d.y+=s*r,l/=BigInt(4);return[d.x,d.y]},t.a=r},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(4),a=i(0),r=i(2),o=i(3),s=i(23);function l(e){var t=e.lengthBits,i=e.availableCount;n.a.typeOf.number("options.lengthBits",t);var o=e.constant,l=e.bitstream;if(Object(a.default)(o))i=t;else{var u=Math.ceil(t/8);if(l.length!==u)throw new s.a("Availability bitstream must be exactly "+u+" bytes long to store "+t+" bits. Actual bitstream was "+l.length+" bytes long.");var d=Object(r.default)(e.computeAvailableCountEnabled,!1);!Object(a.default)(i)&&d&&(i=function(e,t){for(var i=0,n=0;n<t;n++){var a=n%8;i+=e[n>>3]>>a&1}return i}(l,t))}this._lengthBits=t,this._availableCount=i,this._constant=o,this._bitstream=l}Object.defineProperties(l.prototype,{lengthBits:{get:function(){return this._lengthBits}},availableCount:{get:function(){return this._availableCount}}}),l.prototype.getBit=function(e){if(e<0||e>=this._lengthBits)throw new o.default("Bit index out of bounds.");if(Object(a.default)(this._constant))return this._constant;var t=e>>3,i=e%8;return 1==(this._bitstream[t]>>i&1)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i(4),a=i(2),r=i(0),o=i(160),s=i(18),l=i(880),u=i(165),d=i(72);function c(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,r=e.bufferViewId,l=e.gltfResource,u=e.baseResource,c=e.cacheKey;n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltf",i),n.a.typeOf.number("options.bufferViewId",r),n.a.typeOf.object("options.gltfResource",l),n.a.typeOf.object("options.baseResource",u);var f,h,p,m,_=i.bufferViews[r],g=_.buffer,v=_.byteOffset,y=_.byteLength,b=!1;if(Object(o.a)(_,"EXT_meshopt_compression")){var w=_.extensions.EXT_meshopt_compression;g=w.buffer,v=Object(a.default)(w.byteOffset,0),y=w.byteLength,b=!0,f=w.byteStride,h=w.count,p=w.mode,m=Object(a.default)(w.filter,"NONE")}var O=i.buffers[g];this._hasMeshopt=b,this._meshoptByteStride=f,this._meshoptCount=h,this._meshoptMode=p,this._meshoptFilter=m,this._resourceCache=t,this._gltfResource=l,this._baseResource=u,this._buffer=O,this._bufferId=g,this._byteOffset=v,this._byteLength=y,this._cacheKey=c,this._bufferLoader=void 0,this._typedArray=void 0,this._state=d.a.UNLOADED,this._promise=s.a.defer()}Object(r.default)(Object.create)&&(c.prototype=Object.create(u.a.prototype),c.prototype.constructor=c),Object.defineProperties(c.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},typedArray:{get:function(){return this._typedArray}}}),c.prototype.load=function(){var e=function(e){var t=e._resourceCache,i=e._buffer;if(Object(r.default)(i.uri)){var n=e._baseResource.getDerivedResource({url:i.uri});return t.loadExternalBuffer({resource:n})}return t.loadEmbeddedBuffer({parentResource:e._gltfResource,bufferId:e._bufferId})}(this);this._bufferLoader=e,this._state=d.a.LOADING;var t=this;e.promise.then((function(){if(!t.isDestroyed()){var i=e.typedArray,n=new Uint8Array(i.buffer,i.byteOffset+t._byteOffset,t._byteLength);t.unload(),t._typedArray=n,t._hasMeshopt?t._state=d.a.PROCESSING:(t._state=d.a.READY,t._promise.resolve(t))}})).otherwise((function(e){if(!t.isDestroyed()){t.unload(),t._state=d.a.FAILED;t._promise.reject(t.getError("Failed to load buffer view",e))}}))},c.prototype.process=function(e){if(n.a.typeOf.object("frameState",e),this._hasMeshopt&&Object(r.default)(this._typedArray)&&this._state===d.a.PROCESSING){var t=this._meshoptCount,i=this._meshoptByteStride,a=new Uint8Array(t*i);l.a.decodeGltfBuffer(a,t,i,this._typedArray,this._meshoptMode,this._meshoptFilter),this._typedArray=a,this._state=d.a.READY,this._promise.resolve(this)}},c.prototype.unload=function(){Object(r.default)(this._bufferLoader)&&this._resourceCache.unload(this._bufferLoader),this._bufferLoader=void 0,this._typedArray=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var n=i(4),a=i(2),r=i(0),o=i(18),s=i(275),l=i(165),u=i(72);function d(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,r=e.draco,s=e.gltfResource,l=e.baseResource,d=e.cacheKey;n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltf",i),n.a.typeOf.object("options.draco",r),n.a.typeOf.object("options.gltfResource",s),n.a.typeOf.object("options.baseResource",l),this._resourceCache=t,this._gltfResource=s,this._baseResource=l,this._gltf=i,this._draco=r,this._cacheKey=d,this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodePromise=void 0,this._decodedData=void 0,this._state=u.a.UNLOADED,this._promise=o.a.defer()}function c(e,t){e.unload(),e._state=u.a.FAILED;e._promise.reject(e.getError("Failed to load Draco",t))}Object(r.default)(Object.create)&&(d.prototype=Object.create(l.a.prototype),d.prototype.constructor=d),Object.defineProperties(d.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},decodedData:{get:function(){return this._decodedData}}}),d.prototype.load=function(){var e=this._resourceCache.loadBufferView({gltf:this._gltf,bufferViewId:this._draco.bufferView,gltfResource:this._gltfResource,baseResource:this._baseResource});this._bufferViewLoader=e,this._state=u.a.LOADING;var t=this;e.promise.then((function(){t.isDestroyed()||(t._bufferViewTypedArray=e.typedArray,t._state=u.a.PROCESSING)})).otherwise((function(e){t.isDestroyed()||c(t,e)}))},d.prototype.process=function(e){if(n.a.typeOf.object("frameState",e),Object(r.default)(this._bufferViewTypedArray)&&!Object(r.default)(this._decodePromise)){var t=this._draco,i=this._gltf.bufferViews[t.bufferView],a=t.attributes,o={array:new Uint8Array(this._bufferViewTypedArray),bufferView:i,compressedAttributes:a,dequantizeInShader:!0},l=s.a.decodeBufferView(o);if(Object(r.default)(l)){var d=this;this._decodePromise=l.then((function(e){d.isDestroyed()||(d.unload(),d._decodedData={indices:e.indexArray,vertexAttributes:e.attributeData},d._state=u.a.READY,d._promise.resolve(d))})).otherwise((function(e){d.isDestroyed()||c(d,e)}))}}},d.prototype.unload=function(){Object(r.default)(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._bufferViewTypedArray=void 0,this._decodedData=void 0,this._gltf=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var n=i(4),a=i(2),r=i(0),o=i(360),s=i(215),l=i(23),u=i(18),d=i(165),c=i(72);function f(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,r=e.imageId,o=e.gltfResource,s=e.baseResource,l=e.cacheKey;n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltf",i),n.a.typeOf.number("options.imageId",r),n.a.typeOf.object("options.gltfResource",o),n.a.typeOf.object("options.baseResource",s);var d=i.images[r],f=d.bufferView,h=d.uri;this._resourceCache=t,this._gltfResource=o,this._baseResource=s,this._gltf=i,this._bufferViewId=f,this._uri=h,this._cacheKey=l,this._bufferViewLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._state=c.a.UNLOADED,this._promise=u.a.defer()}function h(e){var t;return Array.isArray(e)&&(t=e.slice(1,e.length).map((function(e){return e.bufferView})),e=e[0]),{image:e,mipLevels:t}}function p(e,t,i){e.unload(),e._state=c.a.FAILED,e._promise.reject(e.getError(i,t))}Object(r.default)(Object.create)&&(f.prototype=Object.create(d.a.prototype),f.prototype.constructor=f),Object.defineProperties(f.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},image:{get:function(){return this._image}},mipLevels:{get:function(){return this._mipLevels}}}),f.prototype.load=function(){var e,t;Object(r.default)(this._bufferViewId)?(t=(e=this)._resourceCache.loadBufferView({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource}),e._bufferViewLoader=t,e._state=c.a.LOADING,t.promise.then((function(){if(!e.isDestroyed())return function(e){var t=function(e){var t=e.subarray(0,2),i=e.subarray(0,4),n=e.subarray(8,12);if(255===t[0]&&216===t[1])return"image/jpeg";if(137===t[0]&&80===t[1])return"image/png";if(171===t[0]&&75===t[1])return"image/ktx2";if(82===i[0]&&73===i[1]&&70===i[2]&&70===i[3]&&87===n[0]&&69===n[1]&&66===n[2]&&80===n[3])return"image/webp";throw new l.a("Image format is not recognized")}(e);if("image/ktx2"===t){var i=new Uint8Array(e);return Object(s.a)(i)}return f._loadImageFromTypedArray({uint8Array:e,format:t,flipY:!1,skipColorSpaceConversion:!0})}(t.typedArray).then((function(t){if(!e.isDestroyed()){var i=h(t);e.unload(),e._image=i.image,e._mipLevels=i.mipLevels,e._state=c.a.READY,e._promise.resolve(e)}}))})).otherwise((function(t){e.isDestroyed()||p(e,t,"Failed to load embedded image")}))):function(e){var t=e._baseResource,i=e._uri,n=t.getDerivedResource({url:i});e._state=c.a.LOADING,function(e){var t=e.url;if(m.test(t))return Object(s.a)(e);return e.fetchImage({skipColorSpaceConversion:!0,preferImageBitmap:!0})}(n).then((function(t){if(!e.isDestroyed()){var i=h(t);e.unload(),e._image=i.image,e._mipLevels=i.mipLevels,e._state=c.a.READY,e._promise.resolve(e)}})).otherwise((function(t){e.isDestroyed()||p(e,t,"Failed to load image: "+i)}))}(this)};var m=/(^data:image\/ktx2)|(\.ktx2$)/i;f.prototype.unload=function(){Object(r.default)(this._bufferViewLoader)&&this._resourceCache.unload(this._bufferViewLoader),this._bufferViewLoader=void 0,this._uri=void 0,this._image=void 0,this._mipLevels=void 0,this._gltf=void 0},f._loadImageFromTypedArray=o.a},function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var n=i(4),a=i(11),r=i(2),o=i(0),s=i(38),l=i(57),u=i(36),d=i(18),c=i(184),f=i(165),h=i(72);function p(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,a=e.accessorId,o=e.gltfResource,s=e.baseResource,l=e.draco,u=e.cacheKey,c=Object(r.default)(e.asynchronous,!0),f=Object(r.default)(e.loadAsTypedArray,!1);n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltf",i),n.a.typeOf.number("options.accessorId",a),n.a.typeOf.object("options.gltfResource",o),n.a.typeOf.object("options.baseResource",s);var p=i.accessors[a].componentType;this._resourceCache=t,this._gltfResource=o,this._baseResource=s,this._gltf=i,this._accessorId=a,this._indexDatatype=p,this._draco=l,this._cacheKey=u,this._asynchronous=c,this._loadAsTypedArray=f,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=h.a.UNLOADED,this._promise=d.a.defer()}function m(e,t){e.unload(),e._state=h.a.FAILED;t=e.getError("Failed to load index buffer",t),e._promise.reject(t)}function _(){this.typedArray=void 0,this.indexDatatype=void 0,this.context=void 0,this.buffer=void 0}function g(e,t,i){var n=l.default.createIndexBuffer({typedArray:e,context:i,usage:u.default.STATIC_DRAW,indexDatatype:t});return n.vertexArrayDestroyable=!1,n}Object(o.default)(Object.create)&&(p.prototype=Object.create(f.a.prototype),p.prototype.constructor=p),Object.defineProperties(p.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},indexDatatype:{get:function(){return this._indexDatatype}}}),p.prototype.load=function(){var e,t;Object(o.default)(this._draco)?(t=(e=this)._resourceCache.loadDraco({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource}),e._dracoLoader=t,e._state=h.a.LOADING,t.promise.then((function(){if(!e.isDestroyed()){var i=t.decodedData.indices.typedArray;e._typedArray=i,e._indexDatatype=a.default.fromTypedArray(i),e._state=h.a.PROCESSING}})).otherwise((function(t){e.isDestroyed()||m(e,t)}))):function(e){var t=e._gltf,i=e._accessorId,n=t.accessors[i].bufferView,a=e._resourceCache.loadBufferView({gltf:t,bufferViewId:n,gltfResource:e._gltfResource,baseResource:e._baseResource});e._state=h.a.LOADING,e._bufferViewLoader=a,a.promise.then((function(){if(!e.isDestroyed()){var t=a.typedArray;e._typedArray=function(e,t){var i,n=e._gltf,a=e._accessorId,r=n.accessors[a],o=r.count,l=r.componentType,u=t.buffer,d=t.byteOffset+r.byteOffset;l===s.a.UNSIGNED_BYTE?i=new Uint8Array(u,d,o):l===s.a.UNSIGNED_SHORT?i=new Uint16Array(u,d,o):l===s.a.UNSIGNED_INT&&(i=new Uint32Array(u,d,o));return i}(e,t),e._state=h.a.PROCESSING}})).otherwise((function(t){e.isDestroyed()||m(e,t)}))}(this)},_.prototype.set=function(e,t,i){this.typedArray=e,this.indexDatatype=t,this.context=i},_.prototype.execute=function(){this.buffer=g(this.typedArray,this.indexDatatype,this.context)};var v=new _;p.prototype.process=function(e){if(n.a.typeOf.object("frameState",e),this._state!==h.a.READY){var t=this._typedArray,i=this._indexDatatype;if(Object(o.default)(this._dracoLoader)&&this._dracoLoader.process(e),Object(o.default)(this._bufferViewLoader)&&this._bufferViewLoader.process(e),Object(o.default)(t)){if(this._loadAsTypedArray)return this.unload(),this._typedArray=t,this._state=h.a.READY,void this._promise.resolve(this);var a;if(this._asynchronous){var r=v;if(r.set(t,i,e.context),!e.jobScheduler.execute(r,c.a.BUFFER))return;a=r.buffer}else a=g(t,i,e.context);this.unload(),this._buffer=a,this._state=h.a.READY,this._promise.resolve(this)}}},p.prototype.unload=function(){Object(o.default)(this._buffer)&&this._buffer.destroy();var e=this._resourceCache;Object(o.default)(this._bufferViewLoader)&&e.unload(this._bufferViewLoader),Object(o.default)(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return y}));var n=i(4),a=i(2),r=i(0),o=i(159),s=i(265),l=i(350),u=i(30),d=i(361),c=i(334),f=i(25),h=i(335),p=i(881),m=i(362),_=i(18),g=i(165),v=i(72);function y(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).resourceCache,i=e.gltfResource,r=e.baseResource,o=e.typedArray,s=e.gltfJson,l=e.cacheKey;n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltfResource",i),n.a.typeOf.object("options.baseResource",r),this._resourceCache=t,this._gltfResource=i,this._baseResource=r,this._typedArray=o,this._gltfJson=s,this._cacheKey=l,this._gltf=void 0,this._bufferLoaders=[],this._state=v.a.UNLOADED,this._promise=_.a.defer()}function b(e,t){return Object(c.a)(t),function(e){var t=[];return f.a.buffer(e,(function(e){var i=e.uri;!Object(r.default)(e.extras._pipeline.source)&&Object(r.default)(i)&&Object(l.a)(i)&&(delete e.uri,t.push(u.default.fetchArrayBuffer(i).then((function(t){e.extras._pipeline.source=new Uint8Array(t)}))))})),_.a.all(t)}(t).then((function(){return function(e,t){if("2.0"===t.asset.version)return _.a.resolve();var i=[];return f.a.buffer(t,(function(t){if(!Object(r.default)(t.extras._pipeline.source)&&Object(r.default)(t.uri)){var n=e._baseResource.getDerivedResource({url:t.uri}),a=e._resourceCache.loadExternalBuffer({resource:n});e._bufferLoaders.push(a),i.push(a.promise.then((function(e){t.extras._pipeline.source=e.typedArray})))}})),_.a.all(i).then((function(){Object(m.a)(t)}))}(e,t).then((function(){return Object(d.a)(t),function(e,t){var i=[];return f.a.buffer(t,(function(t,n){var a=t.extras._pipeline.source;if(Object(r.default)(a)&&!Object(r.default)(t.uri)){var o=e._resourceCache.loadEmbeddedBuffer({parentResource:e._gltfResource,bufferId:n,typedArray:a});e._bufferLoaders.push(o),i.push(o.promise)}})),_.a.all(i)}(e,t).then((function(){return Object(p.a)(t),t}))}))}))}function w(e,t){return b(e,"glTF"===Object(s.a)(t)?Object(h.a)(t):Object(o.a)(t))}Object(r.default)(Object.create)&&(y.prototype=Object.create(g.a.prototype),y.prototype.constructor=y),Object.defineProperties(y.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},gltf:{get:function(){return this._gltf}}}),y.prototype.load=function(){var e,t;this._state=v.a.LOADING,e=Object(r.default)(this._gltfJson)?b(this,this._gltfJson):Object(r.default)(this._typedArray)?w(this,this._typedArray):(t=this)._fetchGltf().then((function(e){if(!t.isDestroyed()){var i=new Uint8Array(e);return w(t,i)}}));var i=this;return e.then((function(e){i.isDestroyed()||(i._gltf=e,i._state=v.a.READY,i._promise.resolve(i))})).otherwise((function(e){i.isDestroyed()||function(e,t){e.unload(),e._state=v.a.FAILED;var i="Failed to load glTF: "+e._gltfResource.url;e._promise.reject(e.getError(i,t))}(i,e)}))},y.prototype.unload=function(){for(var e=this._bufferLoaders,t=e.length,i=0;i<t;++i)this._resourceCache.unload(e[i]);this._bufferLoaders.length=0,this._gltf=void 0},y.prototype._fetchGltf=function(){return this._gltfResource.fetchArrayBuffer()}},function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var n=i(4),a=i(5),r=i(2),o=i(0),s=i(33),l=i(45),u=i(62),d=i(83),c=i(18),f=i(255),h=i(184),p=i(165),m=i(72);function _(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,a=e.textureInfo,o=e.gltfResource,s=e.baseResource,l=e.supportedImageFormats,u=e.cacheKey,d=Object(r.default)(e.asynchronous,!0);n.a.typeOf.func("options.resourceCache",t),n.a.typeOf.object("options.gltf",i),n.a.typeOf.object("options.textureInfo",a),n.a.typeOf.object("options.gltfResource",o),n.a.typeOf.object("options.baseResource",s),n.a.typeOf.object("options.supportedImageFormats",l);var h=a.index,p=f.a.getImageIdFromTexture({gltf:i,textureId:h,supportedImageFormats:l});this._resourceCache=t,this._gltf=i,this._textureInfo=a,this._imageId=p,this._gltfResource=o,this._baseResource=s,this._cacheKey=u,this._asynchronous=d,this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._state=m.a.UNLOADED,this._promise=c.a.defer()}function g(){this.gltf=void 0,this.textureInfo=void 0,this.image=void 0,this.context=void 0,this.texture=void 0}function v(e,t,i,n,r){var c=i.internalFormat,h=!1;s.default.isCompressedFormat(c)&&!Object(o.default)(n)&&(h=!0);var p,m=f.a.createSampler({gltf:e,textureInfo:t,compressedTextureNoMipmap:h}),_=m.minificationFilter,g=m.wrapS,v=m.wrapT,y=_===u.default.NEAREST_MIPMAP_NEAREST||_===u.default.NEAREST_MIPMAP_LINEAR||_===u.default.LINEAR_MIPMAP_NEAREST||_===u.default.LINEAR_MIPMAP_LINEAR,b=!Object(o.default)(c)&&y,w=b||g===d.default.REPEAT||g===d.default.MIRRORED_REPEAT||v===d.default.REPEAT||v===d.default.MIRRORED_REPEAT,O=!a.default.isPowerOfTwo(i.width)||!a.default.isPowerOfTwo(i.height),x=w&&O;return Object(o.default)(c)?(!r.webgl2&&s.default.isCompressedFormat(c)&&O&&w&&console.warn("Compressed texture uses REPEAT or MIRRORED_REPEAT texture wrap mode and dimensions are not powers of two. The texture may be rendered incorrectly."),p=l.default.create({context:r,source:{arrayBufferView:i.bufferView,mipLevels:n},width:i.width,height:i.height,pixelFormat:i.internalFormat,sampler:m})):(x&&(i=function(e){var t=document.createElement("canvas");return t.width=a.default.nextPowerOfTwo(e.width),t.height=a.default.nextPowerOfTwo(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),t}(i)),p=l.default.create({context:r,source:i,sampler:m,flipY:!1,skipColorSpaceConversion:!0})),b&&p.generateMipmap(),p}Object(o.default)(Object.create)&&(_.prototype=Object.create(p.a.prototype),_.prototype.constructor=_),Object.defineProperties(_.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},texture:{get:function(){return this._texture}}}),_.prototype.load=function(){var e=this._resourceCache.loadImage({gltf:this._gltf,imageId:this._imageId,gltfResource:this._gltfResource,baseResource:this._baseResource});this._imageLoader=e,this._state=m.a.LOADING;var t=this;e.promise.then((function(){t.isDestroyed()||(t._image=e.image,t._mipLevels=e.mipLevels,t._state=m.a.PROCESSING)})).otherwise((function(e){if(!t.isDestroyed()){t.unload(),t._state=m.a.FAILED;t._promise.reject(t.getError("Failed to load texture",e))}}))},g.prototype.set=function(e,t,i,n,a){this.gltf=e,this.textureInfo=t,this.image=i,this.mipLevels=n,this.context=a},g.prototype.execute=function(){this.texture=v(this.gltf,this.textureInfo,this.image,this.mipLevels,this.context)};var y=new g;_.prototype.process=function(e){if(n.a.typeOf.object("frameState",e),!Object(o.default)(this._texture)&&Object(o.default)(this._image)){var t;if(this._asynchronous){var i=y;if(i.set(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context),!e.jobScheduler.execute(i,h.a.TEXTURE))return;t=i.texture}else t=v(this._gltf,this._textureInfo,this._image,this._mipLevels,e.context);this.unload(),this._texture=t,this._state=m.a.READY,this._promise.resolve(this)}},_.prototype.unload=function(){Object(o.default)(this._texture)&&this._texture.destroy(),Object(o.default)(this._imageLoader)&&this._resourceCache.unload(this._imageLoader),this._imageLoader=void 0,this._image=void 0,this._mipLevels=void 0,this._texture=void 0,this._gltf=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return v}));var n=i(68),a=i(4),r=i(2),o=i(0),s=i(3),l=i(57),u=i(36),d=i(18),c=i(150),f=i(184),h=i(162),p=i(165),m=i(72),_=i(105),g=i(11);function v(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).resourceCache,i=e.gltf,n=e.gltfResource,l=e.baseResource,u=e.bufferViewId,c=e.draco,f=e.attributeSemantic,h=e.accessorId,p=e.cacheKey,_=Object(r.default)(e.asynchronous,!0),g=Object(r.default)(e.dequantize,!1),v=Object(r.default)(e.loadAsTypedArray,!1);a.a.typeOf.func("options.resourceCache",t),a.a.typeOf.object("options.gltf",i),a.a.typeOf.object("options.gltfResource",n),a.a.typeOf.object("options.baseResource",l);var y=Object(o.default)(u),b=Object(o.default)(c),w=Object(o.default)(f),O=Object(o.default)(h);if(y===b)throw new s.default("One of options.bufferViewId and options.draco must be defined.");if(b&&!w)throw new s.default("When options.draco is defined options.attributeSemantic must also be defined.");if(b&&!O)throw new s.default("When options.draco is defined options.accessorId must also be defined.");b&&(a.a.typeOf.object("options.draco",c),a.a.typeOf.string("options.attributeSemantic",f),a.a.typeOf.number("options.accessorId",h)),this._resourceCache=t,this._gltfResource=n,this._baseResource=l,this._gltf=i,this._bufferViewId=u,this._draco=c,this._attributeSemantic=f,this._accessorId=h,this._cacheKey=p,this._asynchronous=_,this._dequantize=g,this._loadAsTypedArray=v,this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._quantization=void 0,this._typedArray=void 0,this._buffer=void 0,this._state=m.a.UNLOADED,this._promise=d.a.defer()}function y(e,t){e.unload(),e._state=m.a.FAILED;t=e.getError("Failed to load vertex buffer",t),e._promise.reject(t)}function b(){this.typedArray=void 0,this.dequantize=void 0,this.componentType=void 0,this.type=void 0,this.count=void 0,this.context=void 0,this.buffer=void 0}function w(e,t,i,n,a,r){t&&i!==g.default.FLOAT&&(e=_.a.dequantize(e,i,n,a));var o=l.default.createVertexBuffer({typedArray:e,context:r,usage:u.default.STATIC_DRAW});return o.vertexArrayDestroyable=!1,o}Object(o.default)(Object.create)&&(v.prototype=Object.create(p.a.prototype),v.prototype.constructor=v),Object.defineProperties(v.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},buffer:{get:function(){return this._buffer}},typedArray:{get:function(){return this._typedArray}},quantization:{get:function(){return this._quantization}}}),v.prototype.load=function(){var e,t;Object(o.default)(this._draco)?(t=(e=this)._resourceCache.loadDraco({gltf:e._gltf,draco:e._draco,gltfResource:e._gltfResource,baseResource:e._baseResource}),e._dracoLoader=t,e._state=m.a.LOADING,t.promise.then((function(){if(!e.isDestroyed()){var i=t.decodedData.vertexAttributes[e._attributeSemantic],a=e._accessorId,r=e._gltf.accessors[a].type,s=i.array,l=i.data.quantization;Object(o.default)(l)&&(e._quantization=function(e,t,i,a){var r=(1<<e.quantizationBits)-1,o=1/r,s=new h.a.Quantization;if(s.componentDatatype=t,s.octEncoded=e.octEncoded,s.octEncodedZXY=!0,s.type=a,s.octEncoded)s.type=c.a.VEC2,s.normalizationRange=r;else{var l=c.a.getMathType(a);if(l===Number){var u=e.range;s.quantizedVolumeOffset=e.minValues[0],s.quantizedVolumeDimensions=u,s.normalizationRange=r,s.quantizedVolumeStepSize=u*o}else{s.quantizedVolumeOffset=l.unpack(e.minValues),s.normalizationRange=l.unpack(Object(n.a)(new Array(i),r));var d=Object(n.a)(new Array(i),e.range);s.quantizedVolumeDimensions=l.unpack(d);var f=d.map((function(e){return e*o}));s.quantizedVolumeStepSize=l.unpack(f)}}return s}(l,i.data.componentDatatype,i.data.componentsPerAttribute,r)),e._typedArray=s,e._state=m.a.PROCESSING}})).otherwise((function(t){e.isDestroyed()||y(e,t)}))):function(e){var t=e._resourceCache.loadBufferView({gltf:e._gltf,bufferViewId:e._bufferViewId,gltfResource:e._gltfResource,baseResource:e._baseResource});e._state=m.a.LOADING,e._bufferViewLoader=t,t.promise.then((function(){e.isDestroyed()||(e._typedArray=t.typedArray,e._state=m.a.PROCESSING)})).otherwise((function(t){e.isDestroyed()||y(e,t)}))}(this)},b.prototype.set=function(e,t,i,n,a,r){this.typedArray=e,this.dequantize=t,this.componentType=i,this.type=n,this.count=a,this.context=r},b.prototype.execute=function(){this.buffer=w(this.typedArray,this.dequantize,this.componentType,this.type,this.count,this.context)};var O=new b;v.prototype.process=function(e){if(a.a.typeOf.object("frameState",e),this._state!==m.a.READY){var t=this._typedArray,i=this._dequantize;if(Object(o.default)(this._dracoLoader)&&this._dracoLoader.process(e),Object(o.default)(this._bufferViewLoader)&&this._bufferViewLoader.process(e),Object(o.default)(t)){if(this._loadAsTypedArray)return this.unload(),this._typedArray=t,this._state=m.a.READY,void this._promise.resolve(this);var n,r=this._gltf.accessors[this._accessorId];if(this._asynchronous){var s=O;if(s.set(t,i,r.componentType,r.type,r.count,e.context),!e.jobScheduler.execute(s,f.a.BUFFER))return;n=s.buffer}else n=w(t,i,r.componentType,r.type,r.count,e.context);this.unload(),this._buffer=n,this._state=m.a.READY,this._promise.resolve(this)}}},v.prototype.unload=function(){Object(o.default)(this._buffer)&&this._buffer.destroy();var e=this._resourceCache;Object(o.default)(this._bufferViewLoader)&&e.unload(this._bufferViewLoader),Object(o.default)(this._dracoLoader)&&e.unload(this._dracoLoader),this._bufferViewLoader=void 0,this._dracoLoader=void 0,this._typedArray=void 0,this._buffer=void 0,this._gltf=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var n=i(2),a=i(0),r=i(3),o=i(18),s=i(408),l=i(165),u=i(72);function d(e){var t=(e=Object(n.default)(e,n.default.EMPTY_OBJECT)).schema,i=e.resource,l=e.cacheKey;if(Object(a.default)(t)===Object(a.default)(i))throw new r.default("One of options.schema and options.resource must be defined.");this._schema=Object(a.default)(t)?new s.a(t):void 0,this._resource=i,this._cacheKey=l,this._state=u.a.UNLOADED,this._promise=o.a.defer()}Object(a.default)(Object.create)&&(d.prototype=Object.create(l.a.prototype),d.prototype.constructor=d),Object.defineProperties(d.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},schema:{get:function(){return this._schema}}}),d.prototype.load=function(){var e,t;Object(a.default)(this._schema)?this._promise.resolve(this):(t=(e=this)._resource,e._state=u.a.LOADING,t.fetchJson().then((function(t){e.isDestroyed()||(e._schema=new s.a(t),e._state=u.a.READY,e._promise.resolve(e))})).otherwise((function(i){if(!e.isDestroyed()){e._state=u.a.FAILED;var n="Failed to load schema: "+t.url;e._promise.reject(e.getError(n,i))}})))},d.prototype.unload=function(){this._schema=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return y}));var n=i(4),a=i(193),r=i(0),o=i(2),s=i(3),l=i(467),u=i(141),d=i(907),c=i(26),f=i(30),h=i(18),p=i(19),m=i(6),_=i(942),g=i(944),v=i(7);function y(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),n.a.typeOf.object("options.loader",e.loader),n.a.typeOf.object("options.resource",e.resource),this._loader=e.loader,this._resource=e.resource,this._modelMatrix=m.default.clone(Object(o.default)(e.modelMatrix,m.default.IDENTITY)),this._resourcesLoaded=!1,this._drawCommandsBuilt=!1,this._ready=!1,this._readyPromise=h.a.defer(),this._customShader=e.customShader,this._content=e.content,this._texturesLoaded=!1;var t,i,s,l=e.color;this._color=Object(o.default)(l)?v.default.clone(l):void 0,this._colorBlendMode=Object(o.default)(e.colorBlendMode,a.default.HIGHLIGHT),this._colorBlendAmount=Object(o.default)(e.colorBlendAmount,.5),this._cull=Object(o.default)(e.cull,!0),this._opaquePass=Object(o.default)(e.opaquePass,c.default.OPAQUE),this._allowPicking=Object(o.default)(e.allowPicking,!0),this._show=Object(o.default)(e.show,!0),this._featureIdAttributeIndex=Object(o.default)(e.featureIdAttributeIndex,0),this._featureIdTextureIndex=Object(o.default)(e.featureIdTextureIndex,0),this._featureTables=void 0,this._featureTableId=void 0,this._resources=[],this._boundingSphere=void 0,this._debugShowBoundingVolumeDirty=!1,this._debugShowBoundingVolume=Object(o.default)(e.debugShowBoundingVolume,!1),i=(t=this)._loader,s=t._resource,i.load(),i.promise.then((function(e){m.default.multiply(t._modelMatrix,e.transform,t._modelMatrix);var i=e.components,n=i.featureMetadata;if(Object(r.default)(n)&&n.propertyTableCount>0){var a=function(e,t){var i,n,a,o,s,l=t._featureIdAttributeIndex,u=t._featureIdTextureIndex;for(i=0;i<e.nodes.length;i++)if(s=e.nodes[i],Object(r.default)(s.instances)&&(a=s.instances.featureIdAttributes[l],Object(r.default)(a)))return a.propertyTableId;for(i=0;i<e.nodes.length;i++)for(s=e.nodes[i],n=0;n<s.primitives.length;n++){var d=s.primitives[n];if(o=d.featureIdTextures[u],a=d.featureIdAttributes[l],Object(r.default)(o))return o.propertyTableId;if(Object(r.default)(a))return a.propertyTableId}}(i,t),o=function(e,t){for(var i=[],n=t.propertyTables,a=0;a<n.length;a++){var r=n[a],o=new _.a({model:e,propertyTable:r});o.featuresLength>0&&i.push(o)}return i}(t,n);t.featureTables=o,t.featureTableId=a}t._sceneGraph=new d.a({model:t,modelComponents:i}),t._resourcesLoaded=!0})).otherwise(u.a.getFailedLoadFunction(t,"model",s)),i.texturesLoadedPromise.then((function(){t._texturesLoaded=!0})).otherwise(u.a.getFailedLoadFunction(t,"model",s))}Object.defineProperties(y.prototype,{ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},cull:{get:function(){return this._cull}},opaquePass:{get:function(){return this._opaquePass}},customShader:{get:function(){return this._customShader},set:function(e){e!==this._customShader&&this.resetDrawCommands(),this._customShader=e}},content:{get:function(){return this._content}},featureTableId:{get:function(){return this._featureTableId},set:function(e){this._featureTableId=e}},featureTables:{get:function(){return this._featureTables},set:function(e){this._featureTables=e}},allowPicking:{get:function(){return this._allowPicking}},style:{get:function(){return this._style},set:function(e){e!==this._style&&this.applyStyle(e),this._style=e}},color:{get:function(){return this._color},set:function(e){v.default.equals(this._color,e)||this.resetDrawCommands(),this._color=e}},colorBlendMode:{get:function(){return this._colorBlendMode},set:function(e){this._colorBlendMode=e}},colorBlendAmount:{get:function(){return this._colorBlendAmount},set:function(e){this._colorBlendAmount=e}},boundingSphere:{get:function(){if(!this._ready)throw new s.default("The model is not loaded. Use ModelExperimental.readyPromise or wait for ModelExperimental.ready to be true.");return this._sceneGraph._boundingSphere}},modelMatrix:{get:function(){return this._modelMatrix},set:function(e){this._modelMatrix=e}},debugShowBoundingVolume:{get:function(){return this._debugShowBoundingVolume},set:function(e){this._debugShowBoundingVolume!==e&&(this._debugShowBoundingVolumeDirty=!0),this._debugShowBoundingVolume=e}},show:{get:function(){return this._show},set:function(e){this._show=e}},featureIdAttributeIndex:{get:function(){return this._featureIdAttributeIndex}},featureIdTextureIndex:{get:function(){return this._featureIdTextureIndex}}}),y.prototype.resetDrawCommands=function(){this._drawCommandsBuilt&&(this.destroyResources(),this._drawCommandsBuilt=!1,this._sceneGraph._drawCommands=[])},y.prototype.update=function(e){if(this._resourcesLoaded&&this._texturesLoaded||this._loader.process(e),Object(r.default)(this._customShader)&&this._customShader.update(e),this._resourcesLoaded){var t=this._featureTables;if(Object(r.default)(t))for(var i=0;i<t.length;i++)t[i].update(e),t[i].styleCommandsNeededDirty&&this.resetDrawCommands();if(!this._drawCommandsBuilt){this._sceneGraph.buildDrawCommands(e),this._drawCommandsBuilt=!0;var n=this;if(!n._ready)return void e.afterRender.push((function(){n._ready=!0,n._readyPromise.resolve(n)}))}this._debugShowBoundingVolumeDirty&&(!function(e,t){for(var i=e._drawCommands,n=0;n<i.length;n++)i[n].debugShowBoundingVolume=t}(this._sceneGraph,this._debugShowBoundingVolume),this._debugShowBoundingVolumeDirty=!1),this._show&&e.commandList.push.apply(e.commandList,this._sceneGraph._drawCommands)}},y.prototype.isDestroyed=function(){return!1},y.prototype.destroy=function(){var e=this._loader;Object(r.default)(e)&&e.destroy();var t=this._featureTables;if(Object(r.default)(t))for(var i=0;i<t.length;i++)t[i].destroy();this.destroyResources(),Object(p.default)(this)},y.prototype.destroyResources=function(){for(var e=this._resources,t=0;t<e.length;t++)e[t].destroy();this._resources=[]},y.fromGltf=function(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),n.a.defined("options.gltf",e.gltf);var t={releaseGltfJson:e.releaseGltfJson,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis},i=e.gltf,a=Object(o.default)(e.basePath,""),s=f.default.createIfNeeded(a);return Object(r.default)(i.asset)?(t.gltfJson=i,t.baseResource=s,t.gltfResource=s):i instanceof Uint8Array?(t.typedArray=i,t.baseResource=s,t.gltfResource=s):t.gltfResource=f.default.createIfNeeded(e.gltf),new y({loader:new l.a(t),resource:t.gltfResource,modelMatrix:e.modelMatrix,debugShowBoundingVolume:e.debugShowBoundingVolume,cull:e.cull,opaquePass:e.opaquePass,allowPicking:e.allowPicking,customShader:e.customShader,content:e.content,show:e.show,color:e.color,colorBlendAmount:e.colorBlendAmount,colorBlendMode:e.colorBlendMode,featureIdAttributeIndex:e.featureIdAttributeIndex,featureIdTextureIndex:e.featureIdTextureIndex})},y.fromB3dm=function(e){var t={b3dmResource:e.resource,arrayBuffer:e.arrayBuffer,byteOffset:e.byteOffset,releaseGltfJson:e.releaseGltfJson,incrementallyLoadTextures:e.incrementallyLoadTextures,upAxis:e.upAxis,forwardAxis:e.forwardAxis};return new y({loader:new g.a(t),resource:t.b3dmResource,modelMatrix:e.modelMatrix,debugShowBoundingVolume:e.debugShowBoundingVolume,cull:e.cull,opaquePass:e.opaquePass,allowPicking:e.allowPicking,customShader:e.customShader,content:e.content,show:e.show,featureIdAttributeIndex:e.featureIdAttributeIndex,featureIdTextureIndex:e.featureIdTextureIndex})},y.prototype.applyColorAndShow=function(e){var t=Object(r.default)(e)&&Object(r.default)(e.color),i=Object(r.default)(e)&&Object(r.default)(e.show);this._color=t?e.color.evaluateColor(void 0,this._color):v.default.clone(v.default.WHITE,this._color),this._show=!i||e.show.evaluate(void 0)},y.prototype.applyStyle=function(e){Object(r.default)(this.featureTableId)&&this.featureTables[this.featureTableId].featuresLength>0?this.featureTables[this.featureTableId].applyStyle(e):this.applyColorAndShow(e);this.resetDrawCommands()}},function(e,t,i){"use strict";t.a="vec2 computeSt(float featureId)\n{\n float stepX = model_textureStep.x;\n float centerX = model_textureStep.y;\n\n #ifdef MULTILINE_BATCH_TEXTURE\n float stepY = model_textureStep.z;\n float centerY = model_textureStep.w;\n\n float xId = mod(featureId, model_textureDimensions.x); \n float yId = floor(featureId / model_textureDimensions.x);\n \n return vec2(centerX + (xId * stepX), centerY + (yId * stepY));\n #else\n return vec2(centerX + (featureId * stepX), 0.5);\n #endif\n}\n"},function(e,t,i){"use strict";var n=i(8),a=i(7),r=i(2),o=i(0),s=i(24),l=i(20),u=i(9),d=a.default.WHITE,c=a.default.BLACK,f=new n.default(2,2);function h(e){e=Object(r.default)(e,r.default.EMPTY_OBJECT),this._definitionChanged=new s.default,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.repeat=e.repeat}Object.defineProperties(h.prototype,{isConstant:{get:function(){return u.default.isConstant(this._evenColor)&&u.default.isConstant(this._oddColor)&&u.default.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},evenColor:Object(l.default)("evenColor"),oddColor:Object(l.default)("oddColor"),repeat:Object(l.default)("repeat")}),h.prototype.getType=function(e){return"Checkerboard"},h.prototype.getValue=function(e,t){return Object(o.default)(t)||(t={}),t.lightColor=u.default.getValueOrClonedDefault(this._evenColor,e,d,t.lightColor),t.darkColor=u.default.getValueOrClonedDefault(this._oddColor,e,c,t.darkColor),t.repeat=u.default.getValueOrDefault(this._repeat,e,f),t},h.prototype.equals=function(e){return this===e||e instanceof h&&u.default.equals(this._evenColor,e._evenColor)&&u.default.equals(this._oddColor,e._oddColor)&&u.default.equals(this._repeat,e._repeat)},t.a=h},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(24),o=i(232),s=i(9);function l(){this._definitionChanged=new r.default,this._composite=new o.a,this._composite.definitionChanged.addEventListener(l.prototype._raiseDefinitionChanged,this)}Object.defineProperties(l.prototype,{isConstant:{get:function(){return this._composite.isConstant}},definitionChanged:{get:function(){return this._definitionChanged}},intervals:{get:function(){return this._composite._intervals}}}),l.prototype.getType=function(e){if(!Object(n.default)(e))throw new a.default("time is required");var t=this._composite._intervals.findDataForIntervalContainingDate(e);if(Object(n.default)(t))return t.getType(e)},l.prototype.getValue=function(e,t){if(!Object(n.default)(e))throw new a.default("time is required");var i=this._composite._intervals.findDataForIntervalContainingDate(e);if(Object(n.default)(i))return i.getValue(e,t)},l.prototype.equals=function(e){return this===e||e instanceof l&&this._composite.equals(e._composite,s.default.equals)},l.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},t.a=l},function(e,t,i){"use strict";var n=i(8),a=i(7),r=i(2),o=i(0),s=i(24),l=i(20),u=i(9),d=a.default.WHITE,c=new n.default(8,8),f=new n.default(0,0),h=new n.default(1,1);function p(e){e=Object(r.default)(e,r.default.EMPTY_OBJECT),this._definitionChanged=new s.default,this._color=void 0,this._colorSubscription=void 0,this._cellAlpha=void 0,this._cellAlphaSubscription=void 0,this._lineCount=void 0,this._lineCountSubscription=void 0,this._lineThickness=void 0,this._lineThicknessSubscription=void 0,this._lineOffset=void 0,this._lineOffsetSubscription=void 0,this.color=e.color,this.cellAlpha=e.cellAlpha,this.lineCount=e.lineCount,this.lineThickness=e.lineThickness,this.lineOffset=e.lineOffset}Object.defineProperties(p.prototype,{isConstant:{get:function(){return u.default.isConstant(this._color)&&u.default.isConstant(this._cellAlpha)&&u.default.isConstant(this._lineCount)&&u.default.isConstant(this._lineThickness)&&u.default.isConstant(this._lineOffset)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Object(l.default)("color"),cellAlpha:Object(l.default)("cellAlpha"),lineCount:Object(l.default)("lineCount"),lineThickness:Object(l.default)("lineThickness"),lineOffset:Object(l.default)("lineOffset")}),p.prototype.getType=function(e){return"Grid"},p.prototype.getValue=function(e,t){return Object(o.default)(t)||(t={}),t.color=u.default.getValueOrClonedDefault(this._color,e,d,t.color),t.cellAlpha=u.default.getValueOrDefault(this._cellAlpha,e,.1),t.lineCount=u.default.getValueOrClonedDefault(this._lineCount,e,c,t.lineCount),t.lineThickness=u.default.getValueOrClonedDefault(this._lineThickness,e,h,t.lineThickness),t.lineOffset=u.default.getValueOrClonedDefault(this._lineOffset,e,f,t.lineOffset),t},p.prototype.equals=function(e){return this===e||e instanceof p&&u.default.equals(this._color,e._color)&&u.default.equals(this._cellAlpha,e._cellAlpha)&&u.default.equals(this._lineCount,e._lineCount)&&u.default.equals(this._lineThickness,e._lineThickness)&&u.default.equals(this._lineOffset,e._lineOffset)},t.a=p},function(e,t,i){"use strict";var n=i(7),a=i(0),r=i(24),o=i(20),s=i(9);function l(e){this._definitionChanged=new r.default,this._color=void 0,this._colorSubscription=void 0,this.color=e}Object.defineProperties(l.prototype,{isConstant:{get:function(){return s.default.isConstant(this._color)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Object(o.default)("color")}),l.prototype.getType=function(e){return"PolylineArrow"},l.prototype.getValue=function(e,t){return Object(a.default)(t)||(t={}),t.color=s.default.getValueOrClonedDefault(this._color,e,n.default.WHITE,t.color),t},l.prototype.equals=function(e){return this===e||e instanceof l&&s.default.equals(this._color,e._color)},t.a=l},function(e,t,i){"use strict";var n=i(7),a=i(2),r=i(0),o=i(24),s=i(20),l=i(9),u=n.default.WHITE,d=n.default.BLACK;function c(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),this._definitionChanged=new o.default,this._color=void 0,this._colorSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.color=e.color,this.outlineColor=e.outlineColor,this.outlineWidth=e.outlineWidth}Object.defineProperties(c.prototype,{isConstant:{get:function(){return l.default.isConstant(this._color)&&l.default.isConstant(this._outlineColor)&&l.default.isConstant(this._outlineWidth)}},definitionChanged:{get:function(){return this._definitionChanged}},color:Object(s.default)("color"),outlineColor:Object(s.default)("outlineColor"),outlineWidth:Object(s.default)("outlineWidth")}),c.prototype.getType=function(e){return"PolylineOutline"},c.prototype.getValue=function(e,t){return Object(r.default)(t)||(t={}),t.color=l.default.getValueOrClonedDefault(this._color,e,u,t.color),t.outlineColor=l.default.getValueOrClonedDefault(this._outlineColor,e,d,t.outlineColor),t.outlineWidth=l.default.getValueOrDefault(this._outlineWidth,e,1),t},c.prototype.equals=function(e){return this===e||e instanceof c&&l.default.equals(this._color,e._color)&&l.default.equals(this._outlineColor,e._outlineColor)&&l.default.equals(this._outlineWidth,e._outlineWidth)},t.a=c},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(24),o=i(181),s=i(9);function l(e){this._value=void 0,this._definitionChanged=new r.default,this._eventHelper=new o.a,this.setValue(e)}Object.defineProperties(l.prototype,{isConstant:{get:function(){var e=this._value;if(!Object(n.default)(e))return!0;for(var t=e.length,i=0;i<t;i++)if(!s.default.isConstant(e[i]))return!1;return!0}},definitionChanged:{get:function(){return this._definitionChanged}}}),l.prototype.getValue=function(e,t){if(!Object(n.default)(e))throw new a.default("time is required.");var i=this._value;if(Object(n.default)(i)){var r=i.length;Object(n.default)(t)||(t=new Array(r));for(var o=0,s=0;o<r;){var l=this._value[o].getValue(e,t[o]);Object(n.default)(l)&&(t[s]=l,s++),o++}return t.length=s,t}},l.prototype.setValue=function(e){var t=this._eventHelper;if(t.removeAll(),Object(n.default)(e)){this._value=e.slice();for(var i=e.length,a=0;a<i;a++){var r=e[a];Object(n.default)(r)&&t.add(r.definitionChanged,l.prototype._raiseDefinitionChanged,this)}}else this._value=void 0;this._definitionChanged.raiseEvent(this)},l.prototype.equals=function(e){return this===e||e instanceof l&&s.default.arrayEquals(this._value,e._value)},l.prototype._raiseDefinitionChanged=function(){this._definitionChanged.raiseEvent(this)},t.a=l},function(e,t,i){"use strict";var n=i(7),a=i(2),r=i(0),o=i(24),s=i(20),l=i(9),u=i(320),d=u.a.HORIZONTAL,c=n.default.WHITE,f=n.default.BLACK;function h(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),this._definitionChanged=new o.default,this._orientation=void 0,this._orientationSubscription=void 0,this._evenColor=void 0,this._evenColorSubscription=void 0,this._oddColor=void 0,this._oddColorSubscription=void 0,this._offset=void 0,this._offsetSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.orientation=e.orientation,this.evenColor=e.evenColor,this.oddColor=e.oddColor,this.offset=e.offset,this.repeat=e.repeat}Object.defineProperties(h.prototype,{isConstant:{get:function(){return l.default.isConstant(this._orientation)&&l.default.isConstant(this._evenColor)&&l.default.isConstant(this._oddColor)&&l.default.isConstant(this._offset)&&l.default.isConstant(this._repeat)}},definitionChanged:{get:function(){return this._definitionChanged}},orientation:Object(s.default)("orientation"),evenColor:Object(s.default)("evenColor"),oddColor:Object(s.default)("oddColor"),offset:Object(s.default)("offset"),repeat:Object(s.default)("repeat")}),h.prototype.getType=function(e){return"Stripe"},h.prototype.getValue=function(e,t){return Object(r.default)(t)||(t={}),t.horizontal=l.default.getValueOrDefault(this._orientation,e,d)===u.a.HORIZONTAL,t.evenColor=l.default.getValueOrClonedDefault(this._evenColor,e,c,t.evenColor),t.oddColor=l.default.getValueOrClonedDefault(this._oddColor,e,f,t.oddColor),t.offset=l.default.getValueOrDefault(this._offset,e,0),t.repeat=l.default.getValueOrDefault(this._repeat,e,1),t},h.prototype.equals=function(e){return this===e||e instanceof h&&l.default.equals(this._orientation,e._orientation)&&l.default.equals(this._evenColor,e._evenColor)&&l.default.equals(this._oddColor,e._oddColor)&&l.default.equals(this._offset,e._offset)&&l.default.equals(this._repeat,e._repeat)},t.a=h},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.J2000="j2000",e.ECEF="ecef",e.CATOGRAPHIC="cartographic",e.LOCAL="local",e.ENU="enu",e.VVLH="vvlh"}(n||(n={})),t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),a=i(0),r=i(3),o=i(15),s=i(124),l=i(205),u=i(6),d=i(85),c=i(5),f=new n.default,h=new n.default,p=new l.default,m=new d.default,_=[],g=[],v=function(){function e(){}return e.lineSegmentEllipsoid=function(e,t,i,o,l){if(!a.default(e))throw new r.default("p0 is required.");if(!a.default(t))throw new r.default("p1 is required.");if(!a.default(i))throw new r.default("ellipsoid is required.");var u=o;n.default.clone(e,u.origin);var d=n.default.subtract(t,e,u.direction),c=n.default.magnitude(d);if(0!==c&&(n.default.normalize(d,d),l=s.default.rayEllipsoid(u,i),!(!a.default(l)||l.stop<0||l.start>c)))return l.start=Math.max(l.start,0),l.stop=Math.min(l.stop,c),l},e.calcuateIntersectionPointsFromConeAndWGS84Ellipsoid=function(t,i,n,a,r){r.length=0,_.length=0;var s=0;if(t.forEach((function(l,v){if(!(v>t.length-2)){var y,b=0,w=e.lineSegmentEllipsoid(u.default.multiplyByPoint(i,n,f),u.default.multiplyByPoint(i,l,h),o.default.WGS84,m,p);if(w&&0!==w.start)b++,d.default.getPoint(m,w.start,h),r.push(h.clone()),(y=e.lineSegmentEllipsoid(u.default.multiplyByPoint(i,a,f),u.default.multiplyByPoint(i,l,h),o.default.WGS84,m,p))&&0!==y.start&&(b++,d.default.getPoint(m,y.start,h),_.unshift(h.clone()));else(y=e.lineSegmentEllipsoid(h,u.default.multiplyByPoint(i,a,f),o.default.WGS84,m,p))&&0!==y.start&&(b++,d.default.getPoint(m,y.start,h),r.push(h.clone()),d.default.getPoint(m,y.stop,h),h.equalsEpsilon(f,c.default.EPSILON6)||(0===v?0:v===t.length-2&&100,b++,_.unshift(h.clone())));g[s]=b,s++}})),g[0]>0&&g[g.length-1]>0)for(var l=g.length-1;l>0&&0!==g[l];l--)1===g[l]?r.unshift(r.pop()):2===g[l]&&(r.unshift(r.pop()),_.push(_.shift()));return _.forEach((function(e){r.push(e)})),r.push(r[0]),r},e}();t.default=v},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(280),l=i(49),u=i(327),d=i(27),c=i(6),f=i(2),h=i(389),p=(c.default.IDENTITY.clone(),function(e){function t(t){var i=e.call(this,t)||this;return i.initPosition=new o.default(0,0,0),i.labelConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},f.default(t.labelConfig,{})),i.pointConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},f.default(t.pointConfig,{})),t.position&&(i.initPosition=t.position),i.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:u.default,interpolationDegree:5}),t.htmlLabelConfig&&t.htmlLabelConfig.length>0&&(i._htmlLabel=[],t.htmlLabelConfig.forEach((function(e){var t=new h.default(e);i._htmlLabel.push(t),i.add(t)}))),i}return a(t,e),Object.defineProperty(t.prototype,"htmlLabel",{get:function(){return this._htmlLabel},set:function(e){var t=this;this._htmlLabel&&this._htmlLabel.length>0&&this._htmlLabel.forEach((function(e){e.destroy()})),this._htmlLabel=e,e.forEach((function(e){t.add(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){o.default.clone(e,this._position),this.point&&(this.point.position=e),this.label&&(this.label.position=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){d.default.clone(e,this._rotation),this._rotation=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.point&&(this.point.show=e),this.label&&(this.label.show=e),this._htmlLabel&&(e?this._htmlLabel.forEach((function(e){e.visibleFollowParent&&(e.show=!0)})):this._htmlLabel.forEach((function(e){e.show=!1}))),this.afterSetVisible(e)},enumerable:!1,configurable:!0}),t.prototype.appendHtmlLabel=function(e){this._htmlLabel.push(e),this.add(e)},t.prototype.afterTracked=function(){},t.prototype.afterUnTracked=function(){},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);var i=this.getLODSceneLayer();this.point=i.points.add(r({},this.pointConfig)),this.label=i.labels.add(Object.assign({distanceDisplayCondition:new l.default(0,2e8)},this.labelConfig)),this.point.show=f.default(this.pointConfig.show,this.show)&&this.parent.show,this.label.show=f.default(this.labelConfig.show,this.show)&&this.parent.show,this.point.entityId=this.id,this.label.entityId=this.id,this.position=this.initPosition,this.isAdded=!0},t.prototype.updatePoint=function(){var e,t;this.isAdded&&this.point&&this.pointConfig.dynamicDepthTest&&((null===(t=null===(e=this.getViewer())||void 0===e?void 0:e.cesiumViewer.scene.frameState.occluder)||void 0===t?void 0:t.isPointVisible(this.position))?this.point.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.point.disableDepthTestDistance=0)},t.prototype.updateLabel=function(){var e,t;this.isAdded&&this.label&&this.labelConfig.dynamicDepthTest&&((null===(t=null===(e=this.getViewer())||void 0===e?void 0:e.cesiumViewer.scene.frameState.occluder)||void 0===t?void 0:t.isPointVisible(this.position))?this.label.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.label.disableDepthTestDistance=0)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&(this.updateLabel(),this.updatePoint())},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();t.labels.remove(this.label),t.points.remove(this.point)},t.prototype.beforeSwitchMode=function(){},t}(s.default));t.default=p},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.afterAdded=function(e){throw"not function"},t.prototype.destroyForward=function(){throw"not function"},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(487).default);t.default=r},function(e,t,i){"use strict";var n=i(18),a=i(169),r=i(2),o=i(0),s=i(394),l=i(14),u=i(136),d=i(30),c=i(23),f=i(106),h=i(103);function p(e){if(e=Object(r.default)(e,r.default.EMPTY_OBJECT),this._dates=void 0,this._samples=void 0,this._dateColumn=-1,this._xPoleWanderRadiansColumn=-1,this._yPoleWanderRadiansColumn=-1,this._ut1MinusUtcSecondsColumn=-1,this._xCelestialPoleOffsetRadiansColumn=-1,this._yCelestialPoleOffsetRadiansColumn=-1,this._taiMinusUtcSecondsColumn=-1,this._columnCount=0,this._lastIndex=-1,this._downloadPromise=void 0,this._dataError=void 0,this._addNewLeapSeconds=Object(r.default)(e.addNewLeapSeconds,!0),Object(o.default)(e.data))_(this,e.data);else if(Object(o.default)(e.url)){var t=d.default.createIfNeeded(e.url),i=this;this._downloadPromise=t.fetchJson().then((function(e){_(i,e)})).otherwise((function(){i._dataError="An error occurred while retrieving the EOP data from the URL "+t.url+"."}))}else _(this,{columnNames:["dateIso8601","modifiedJulianDateUtc","xPoleWanderRadians","yPoleWanderRadians","ut1MinusUtcSeconds","lengthOfDayCorrectionSeconds","xCelestialPoleOffsetRadians","yCelestialPoleOffsetRadians","taiMinusUtcSeconds"],samples:[]})}function m(e,t){return l.default.compare(e.julianDate,t)}function _(e,t){if(Object(o.default)(t.columnNames))if(Object(o.default)(t.samples)){var i=t.columnNames.indexOf("modifiedJulianDateUtc"),n=t.columnNames.indexOf("xPoleWanderRadians"),r=t.columnNames.indexOf("yPoleWanderRadians"),s=t.columnNames.indexOf("ut1MinusUtcSeconds"),d=t.columnNames.indexOf("xCelestialPoleOffsetRadians"),c=t.columnNames.indexOf("yCelestialPoleOffsetRadians"),p=t.columnNames.indexOf("taiMinusUtcSeconds");if(i<0||n<0||r<0||s<0||d<0||c<0||p<0)e._dataError="Error in loaded EOP data: The columnNames property must include modifiedJulianDateUtc, xPoleWanderRadians, yPoleWanderRadians, ut1MinusUtcSeconds, xCelestialPoleOffsetRadians, yCelestialPoleOffsetRadians, and taiMinusUtcSeconds columns";else{var _,g=e._samples=t.samples,v=e._dates=[];e._dateColumn=i,e._xPoleWanderRadiansColumn=n,e._yPoleWanderRadiansColumn=r,e._ut1MinusUtcSecondsColumn=s,e._xCelestialPoleOffsetRadiansColumn=d,e._yCelestialPoleOffsetRadiansColumn=c,e._taiMinusUtcSecondsColumn=p,e._columnCount=t.columnNames.length,e._lastIndex=void 0;for(var y=e._addNewLeapSeconds,b=0,w=g.length;b<w;b+=e._columnCount){var O=g[b+i],x=g[b+p],A=O+f.a.MODIFIED_JULIAN_DATE_DIFFERENCE,T=new l.default(A,x,h.a.TAI);if(v.push(T),y){if(x!==_&&Object(o.default)(_)){var E=l.default.leapSeconds,C=Object(a.a)(E,T,m);if(C<0){var S=new u.a(T,x);E.splice(~C,0,S)}}_=x}}}}else e._dataError="Error in loaded EOP data: The samples property is required.";else e._dataError="Error in loaded EOP data: The columnNames property is required."}function g(e,t,i,n,a){var r=i*n;a.xPoleWander=t[r+e._xPoleWanderRadiansColumn],a.yPoleWander=t[r+e._yPoleWanderRadiansColumn],a.xPoleOffset=t[r+e._xCelestialPoleOffsetRadiansColumn],a.yPoleOffset=t[r+e._yCelestialPoleOffsetRadiansColumn],a.ut1MinusUtc=t[r+e._ut1MinusUtcSecondsColumn]}function v(e,t,i){return t+e*(i-t)}function y(e,t,i,n,a,r,o){var s=e._columnCount;if(r>t.length-1)return o.xPoleWander=0,o.yPoleWander=0,o.xPoleOffset=0,o.yPoleOffset=0,o.ut1MinusUtc=0,o;var u=t[a],d=t[r];if(u.equals(d)||n.equals(u))return g(e,i,a,s,o),o;if(n.equals(d))return g(e,i,r,s,o),o;var c=l.default.secondsDifference(n,u)/l.default.secondsDifference(d,u),f=a*s,h=r*s,p=i[f+e._ut1MinusUtcSecondsColumn],m=i[h+e._ut1MinusUtcSecondsColumn],_=m-p;if(_>.5||_<-.5){var y=i[f+e._taiMinusUtcSecondsColumn],b=i[h+e._taiMinusUtcSecondsColumn];y!==b&&(d.equals(n)?p=m:m-=b-y)}return o.xPoleWander=v(c,i[f+e._xPoleWanderRadiansColumn],i[h+e._xPoleWanderRadiansColumn]),o.yPoleWander=v(c,i[f+e._yPoleWanderRadiansColumn],i[h+e._yPoleWanderRadiansColumn]),o.xPoleOffset=v(c,i[f+e._xCelestialPoleOffsetRadiansColumn],i[h+e._xCelestialPoleOffsetRadiansColumn]),o.yPoleOffset=v(c,i[f+e._yCelestialPoleOffsetRadiansColumn],i[h+e._yCelestialPoleOffsetRadiansColumn]),o.ut1MinusUtc=v(c,p,m),o}p.NONE=Object.freeze({getPromiseToLoad:function(){return n.a.resolve()},compute:function(e,t){return Object(o.default)(t)?(t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0):t=new s.a(0,0,0,0,0),t}}),p.prototype.getPromiseToLoad=function(){return Object(n.a)(this._downloadPromise)},p.prototype.compute=function(e,t){if(Object(o.default)(this._samples)){if(Object(o.default)(t)||(t=new s.a(0,0,0,0,0)),0===this._samples.length)return t.xPoleWander=0,t.yPoleWander=0,t.xPoleOffset=0,t.yPoleOffset=0,t.ut1MinusUtc=0,t;var i=this._dates,n=this._lastIndex,r=0,u=0;if(Object(o.default)(n)){var d=i[n],f=i[n+1],h=l.default.lessThanOrEquals(d,e),p=!Object(o.default)(f),m=p||l.default.greaterThanOrEquals(f,e);if(h&&m)return r=n,!p&&f.equals(e)&&++r,u=r+1,y(this,i,this._samples,e,r,u,t),t}var _=Object(a.a)(i,e,l.default.compare,this._dateColumn);return _>=0?(_<i.length-1&&i[_+1].equals(e)&&++_,r=_,u=_):(r=(u=~_)-1)<0&&(r=0),this._lastIndex=r,y(this,i,this._samples,e,r,u,t),t}if(Object(o.default)(this._dataError))throw new c.a(this._dataError)},t.a=p},function(e,t,i){"use strict";t.a=function(e){return 0!==e.length&&"/"===e[e.length-1]||(e+="/"),e}},function(e,t,i){"use strict";var n=i(115),a=i(0),r=i(3);t.a=function(e,t){if(!Object(a.default)(e))throw new r.default("uri is required.");var i="",o=e.lastIndexOf("/");return-1!==o&&(i=e.substring(0,o+1)),t?(0!==(e=new n.a(e)).query().length&&(i+="?"+e.query()),0!==e.fragment().length&&(i+="#"+e.fragment()),i):i}},function(e,t,i){"use strict";t.a=function(e){var t={};if(!e)return t;for(var i=e.split("\r\n"),n=0;n<i.length;++n){var a=i[n],r=a.indexOf(": ");if(r>0){var o=a.substring(0,r),s=a.substring(r+2);t[o]=s}}return t}},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0);function o(e){n.a.typeOf.object("options",e),n.a.defined("options.comparator",e.comparator),this._comparator=e.comparator,this._array=[],this._length=0,this._maximumLength=void 0}function s(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}Object.defineProperties(o.prototype,{length:{get:function(){return this._length}},internalArray:{get:function(){return this._array}},maximumLength:{get:function(){return this._maximumLength},set:function(e){n.a.typeOf.number.greaterThanOrEquals("maximumLength",e,0);var t=this._length;if(e<t){for(var i=this._array,a=e;a<t;++a)i[a]=void 0;this._length=e,i.length=e}this._maximumLength=e}},comparator:{get:function(){return this._comparator}}}),o.prototype.reserve=function(e){e=Object(a.default)(e,this._length),this._array.length=e},o.prototype.heapify=function(e){e=Object(a.default)(e,0);for(var t=this._length,i=this._comparator,n=this._array,r=-1,o=!0;o;){var l=2*(e+1),u=l-1;r=u<t&&i(n[u],n[e])<0?u:e,l<t&&i(n[l],n[r])<0&&(r=l),r!==e?(s(n,r,e),e=r):o=!1}},o.prototype.resort=function(){for(var e=this._length,t=Math.ceil(e/2);t>=0;--t)this.heapify(t)},o.prototype.insert=function(e){n.a.defined("element",e);var t,i=this._array,a=this._comparator,o=this._maximumLength,l=this._length++;for(l<i.length?i[l]=e:i.push(e);0!==l;){var u=Math.floor((l-1)/2);if(!(a(i[l],i[u])<0))break;s(i,l,u),l=u}return Object(r.default)(o)&&this._length>o&&(t=i[o],this._length=o),t},o.prototype.pop=function(e){if(e=Object(a.default)(e,0),0!==this._length){n.a.typeOf.number.lessThan("index",e,this._length);var t=this._array,i=t[e];return s(t,e,--this._length),this.heapify(e),t[this._length]=void 0,i}},t.a=o},function(e,t,i){"use strict";var n=i(18),a=i(77),r=i(2),o=i(0),s=i(427),l=i(14),u=i(30),d=i(103);function c(e){e=Object(r.default)(e,r.default.EMPTY_OBJECT),this._xysFileUrlTemplate=u.default.createIfNeeded(e.xysFileUrlTemplate),this._interpolationOrder=Object(r.default)(e.interpolationOrder,9),this._sampleZeroJulianEphemerisDate=Object(r.default)(e.sampleZeroJulianEphemerisDate,2442396.5),this._sampleZeroDateTT=new l.default(this._sampleZeroJulianEphemerisDate,0,d.a.TAI),this._stepSizeDays=Object(r.default)(e.stepSizeDays,1),this._samplesPerXysFile=Object(r.default)(e.samplesPerXysFile,1e3),this._totalSamples=Object(r.default)(e.totalSamples,27426),this._samples=new Array(3*this._totalSamples),this._chunkDownloadsInProgress=[];for(var t=this._interpolationOrder,i=this._denominators=new Array(t+1),n=this._xTable=new Array(t+1),a=Math.pow(this._stepSizeDays,t),o=0;o<=t;++o){i[o]=a,n[o]=o*this._stepSizeDays;for(var s=0;s<=t;++s)s!==o&&(i[o]*=o-s);i[o]=1/i[o]}this._work=new Array(t+1),this._coef=new Array(t+1)}var f=new l.default(0,0,d.a.TAI);function h(e,t,i){var n=f;return n.dayNumber=t,n.secondsOfDay=i,l.default.daysDifference(n,e._sampleZeroDateTT)}function p(e,t){if(e._chunkDownloadsInProgress[t])return e._chunkDownloadsInProgress[t];var i,r=n.a.defer();e._chunkDownloadsInProgress[t]=r;var s=e._xysFileUrlTemplate;return i=Object(o.default)(s)?s.getDerivedResource({templateValues:{0:t}}):new u.default({url:Object(a.a)("Assets/IAU2006_XYS/IAU2006_XYS_"+t+".json")}),Object(n.a)(i.fetchJson(),(function(i){e._chunkDownloadsInProgress[t]=!1;for(var n=e._samples,a=i.samples,o=t*e._samplesPerXysFile*3,s=0,l=a.length;s<l;++s)n[o+s]=a[s];r.resolve()})),r.promise}c.prototype.preload=function(e,t,i,a){var r=h(this,e,t),o=h(this,i,a),s=r/this._stepSizeDays-this._interpolationOrder/2|0;s<0&&(s=0);var l=o/this._stepSizeDays-this._interpolationOrder/2|0+this._interpolationOrder;l>=this._totalSamples&&(l=this._totalSamples-1);for(var u=s/this._samplesPerXysFile|0,d=l/this._samplesPerXysFile|0,c=[],f=u;f<=d;++f)c.push(p(this,f));return n.a.all(c)},c.prototype.computeXysRadians=function(e,t,i){var n=h(this,e,t);if(!(n<0)){var a=n/this._stepSizeDays|0;if(!(a>=this._totalSamples)){var r=this._interpolationOrder,l=a-(r/2|0);l<0&&(l=0);var u=l+r;u>=this._totalSamples&&(l=(u=this._totalSamples-1)-r)<0&&(l=0);var d=!1,c=this._samples;if(Object(o.default)(c[3*l])||(p(this,l/this._samplesPerXysFile|0),d=!0),Object(o.default)(c[3*u])||(p(this,u/this._samplesPerXysFile|0),d=!0),!d){Object(o.default)(i)?(i.x=0,i.y=0,i.s=0):i=new s.a(0,0,0);var f,m,_=n-l*this._stepSizeDays,g=this._work,v=this._denominators,y=this._coef,b=this._xTable;for(f=0;f<=r;++f)g[f]=_-b[f];for(f=0;f<=r;++f){for(y[f]=1,m=0;m<=r;++m)m!==f&&(y[f]*=g[m]);y[f]*=v[f];var w=3*(l+f);i.x+=y[f]*c[w++],i.y+=y[f]*c[w++],i.s+=y[f]*c[w]}return i}}}},t.a=c},function(e,t,i){"use strict";t.a="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n vec4 color = czm_gammaCorrect(v_color);\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec4 v_color;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_color = color;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";var n=i(0),a=i(3);t.a=function(e,t){if(!Object(n.default)(e))throw new a.default("array is required.");if(!Object(n.default)(t)||t<1)throw new a.default("numberOfArrays must be greater than 0.");for(var i=[],r=e.length,o=0;o<r;){var s=Math.ceil((r-o)/t--);i.push(e.slice(o,o+s)),o+=s}return i}},function(e,t,i){"use strict";t.a=function e(t){if("object"!=typeof t||null===t)return t;for(var i,n=Object.keys(t),a=0;a<n.length;a++)i=n[a],t.hasOwnProperty(i)&&"_applyFunctions"!==i&&(t[i]=e(t[i]));return Object.freeze(t)}},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(16),o=i(7),s=i(0),l=i(3),u=i(128),d=i(12),c=i(6),f=i(23);function h(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function p(e,t,i,a){this.name=i,this.value=void 0,this._value=new n.default,this._gl=e,this._location=a}function m(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function _(e,t,i,n){this.name=i,this.value=void 0,this._value=void 0,this._gl=e,this._location=n}function g(e,t,i,n){this.name=i,this.value=void 0,this._gl=e,this._location=n,this.textureUnitIndex=void 0}function v(e,t,i,n){this.name=i,this.value=void 0,this._value=0,this._gl=e,this._location=n}function y(e,t,i,a){this.name=i,this.value=void 0,this._value=new n.default,this._gl=e,this._location=a}function b(e,t,i,n){this.name=i,this.value=void 0,this._value=new a.default,this._gl=e,this._location=n}function w(e,t,i,n){this.name=i,this.value=void 0,this._value=new r.a,this._gl=e,this._location=n}h.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1f(this._location,this.value))},p.prototype.set=function(){var e=this.value;n.default.equals(e,this._value)||(n.default.clone(e,this._value),this._gl.uniform2f(this._location,e.x,e.y))},m.prototype.set=function(){var e=this.value;if(Object(s.default)(e.red))o.default.equals(e,this._value)||(this._value=o.default.clone(e,this._value),this._gl.uniform3f(this._location,e.red,e.green,e.blue));else{if(!Object(s.default)(e.x))throw new l.default('Invalid vec3 value for uniform "'+this.name+'".');a.default.equals(e,this._value)||(this._value=a.default.clone(e,this._value),this._gl.uniform3f(this._location,e.x,e.y,e.z))}},_.prototype.set=function(){var e=this.value;if(Object(s.default)(e.red))o.default.equals(e,this._value)||(this._value=o.default.clone(e,this._value),this._gl.uniform4f(this._location,e.red,e.green,e.blue,e.alpha));else{if(!Object(s.default)(e.x))throw new l.default('Invalid vec4 value for uniform "'+this.name+'".');r.a.equals(e,this._value)||(this._value=r.a.clone(e,this._value),this._gl.uniform4f(this._location,e.x,e.y,e.z,e.w))}},g.prototype.set=function(){var e=this._gl;e.activeTexture(e.TEXTURE0+this.textureUnitIndex);var t=this.value;e.bindTexture(t._target,t._texture)},g.prototype._setSampler=function(e){return this.textureUnitIndex=e,this._gl.uniform1i(this._location,e),e+1},v.prototype.set=function(){this.value!==this._value&&(this._value=this.value,this._gl.uniform1i(this._location,this.value))},y.prototype.set=function(){var e=this.value;n.default.equals(e,this._value)||(n.default.clone(e,this._value),this._gl.uniform2i(this._location,e.x,e.y))},b.prototype.set=function(){var e=this.value;a.default.equals(e,this._value)||(a.default.clone(e,this._value),this._gl.uniform3i(this._location,e.x,e.y,e.z))},w.prototype.set=function(){var e=this.value;r.a.equals(e,this._value)||(r.a.clone(e,this._value),this._gl.uniform4i(this._location,e.x,e.y,e.z,e.w))};var O=new Float32Array(4);function x(e,t,i,n){this.name=i,this.value=void 0,this._value=new u.a,this._gl=e,this._location=n}x.prototype.set=function(){if(!u.a.equalsArray(this.value,this._value,0)){u.a.clone(this.value,this._value);var e=u.a.toArray(this.value,O);this._gl.uniformMatrix2fv(this._location,!1,e)}};var A=new Float32Array(9);function T(e,t,i,n){this.name=i,this.value=void 0,this._value=new d.default,this._gl=e,this._location=n}T.prototype.set=function(){if(!d.default.equalsArray(this.value,this._value,0)){d.default.clone(this.value,this._value);var e=d.default.toArray(this.value,A);this._gl.uniformMatrix3fv(this._location,!1,e)}};var E=new Float32Array(16);function C(e,t,i,n){this.name=i,this.value=void 0,this._value=new c.default,this._gl=e,this._location=n}C.prototype.set=function(){if(!c.default.equalsArray(this.value,this._value,0)){c.default.clone(this.value,this._value);var e=c.default.toArray(this.value,E);this._gl.uniformMatrix4fv(this._location,!1,e)}},t.a=function(e,t,i,n){switch(t.type){case e.FLOAT:return new h(e,t,i,n);case e.FLOAT_VEC2:return new p(e,t,i,n);case e.FLOAT_VEC3:return new m(e,t,i,n);case e.FLOAT_VEC4:return new _(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new g(e,t,i,n);case e.INT:case e.BOOL:return new v(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new y(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new b(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new w(e,t,i,n);case e.FLOAT_MAT2:return new x(e,t,i,n);case e.FLOAT_MAT3:return new T(e,t,i,n);case e.FLOAT_MAT4:return new C(e,t,i,n);default:throw new f.a("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(16),o=i(7),s=i(0),l=i(3),u=i(128),d=i(12),c=i(6),f=i(23);function h(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(a),this._gl=e,this._location=n[0]}function p(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(2*a),this._gl=e,this._location=n[0]}function m(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(3*a),this._gl=e,this._location=n[0]}function _(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(4*a),this._gl=e,this._location=n[0]}function g(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(a),this._gl=e,this._locations=n,this.textureUnitIndex=void 0}function v(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Int32Array(a),this._gl=e,this._location=n[0]}function y(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Int32Array(2*a),this._gl=e,this._location=n[0]}function b(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Int32Array(3*a),this._gl=e,this._location=n[0]}function w(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Int32Array(4*a),this._gl=e,this._location=n[0]}function O(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(4*a),this._gl=e,this._location=n[0]}function x(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(9*a),this._gl=e,this._location=n[0]}function A(e,t,i,n){var a=n.length;this.name=i,this.value=new Array(a),this._value=new Float32Array(16*a),this._gl=e,this._location=n[0]}h.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0;a<t;++a){var r=e[a];r!==i[a]&&(i[a]=r,n=!0)}n&&this._gl.uniform1fv(this._location,i)},p.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,a=!1,r=0,o=0;o<t;++o){var s=e[o];n.default.equalsArray(s,i,r)||(n.default.pack(s,i,r),a=!0),r+=2}a&&this._gl.uniform2fv(this._location,i)},m.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var u=e[o];if(Object(s.default)(u.red))u.red===i[r]&&u.green===i[r+1]&&u.blue===i[r+2]||(i[r]=u.red,i[r+1]=u.green,i[r+2]=u.blue,n=!0);else{if(!Object(s.default)(u.x))throw new l.default("Invalid vec3 value.");a.default.equalsArray(u,i,r)||(a.default.pack(u,i,r),n=!0)}r+=3}n&&this._gl.uniform3fv(this._location,i)},_.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0,u=0;u<t;++u){var d=e[u];if(Object(s.default)(d.red))o.default.equalsArray(d,i,a)||(o.default.pack(d,i,a),n=!0);else{if(!Object(s.default)(d.x))throw new l.default("Invalid vec4 value.");r.a.equalsArray(d,i,a)||(r.a.pack(d,i,a),n=!0)}a+=4}n&&this._gl.uniform4fv(this._location,i)},g.prototype.set=function(){for(var e=this._gl,t=e.TEXTURE0+this.textureUnitIndex,i=this.value,n=i.length,a=0;a<n;++a){var r=i[a];e.activeTexture(t+a),e.bindTexture(r._target,r._texture)}},g.prototype._setSampler=function(e){this.textureUnitIndex=e;for(var t=this._locations,i=t.length,n=0;n<i;++n){var a=e+n;this._gl.uniform1i(t[n],a)}return e+i},v.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0;a<t;++a){var r=e[a];r!==i[a]&&(i[a]=r,n=!0)}n&&this._gl.uniform1iv(this._location,i)},y.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,a=!1,r=0,o=0;o<t;++o){var s=e[o];n.default.equalsArray(s,i,r)||(n.default.pack(s,i,r),a=!0),r+=2}a&&this._gl.uniform2iv(this._location,i)},b.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,r=0,o=0;o<t;++o){var s=e[o];a.default.equalsArray(s,i,r)||(a.default.pack(s,i,r),n=!0),r+=3}n&&this._gl.uniform3iv(this._location,i)},w.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0,o=0;o<t;++o){var s=e[o];r.a.equalsArray(s,i,a)||(r.a.pack(s,i,a),n=!0),a+=4}n&&this._gl.uniform4iv(this._location,i)},O.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0,r=0;r<t;++r){var o=e[r];u.a.equalsArray(o,i,a)||(u.a.pack(o,i,a),n=!0),a+=4}n&&this._gl.uniformMatrix2fv(this._location,!1,i)},x.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0,r=0;r<t;++r){var o=e[r];d.default.equalsArray(o,i,a)||(d.default.pack(o,i,a),n=!0),a+=9}n&&this._gl.uniformMatrix3fv(this._location,!1,i)},A.prototype.set=function(){for(var e=this.value,t=e.length,i=this._value,n=!1,a=0,r=0;r<t;++r){var o=e[r];c.default.equalsArray(o,i,a)||(c.default.pack(o,i,a),n=!0),a+=16}n&&this._gl.uniformMatrix4fv(this._location,!1,i)},t.a=function(e,t,i,n){switch(t.type){case e.FLOAT:return new h(e,t,i,n);case e.FLOAT_VEC2:return new p(e,t,i,n);case e.FLOAT_VEC3:return new m(e,t,i,n);case e.FLOAT_VEC4:return new _(e,t,i,n);case e.SAMPLER_2D:case e.SAMPLER_CUBE:return new g(e,t,i,n);case e.INT:case e.BOOL:return new v(e,t,i,n);case e.INT_VEC2:case e.BOOL_VEC2:return new y(e,t,i,n);case e.INT_VEC3:case e.BOOL_VEC3:return new b(e,t,i,n);case e.INT_VEC4:case e.BOOL_VEC4:return new w(e,t,i,n);case e.FLOAT_MAT2:return new O(e,t,i,n);case e.FLOAT_MAT3:return new x(e,t,i,n);case e.FLOAT_MAT4:return new A(e,t,i,n);default:throw new f.a("Unrecognized uniform type: "+t.type+' for uniform "'+i+'".')}}},function(e,t,i){"use strict";var n=i(0),a=i(3);function r(e,t,i){for(var n=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),a=i.length,r=0;r<a;++r){var o=i[r];i[r]=o.replace(n,"$1"+t+"$3")}}function o(e,t){-1===t.indexOf(e)&&t.push(e)}function s(e,t,i){!function(e,t,i){for(var n=i.length,a=0;a<n;++a){var r=i[a];i[a]=r.replace(e,t)}}(new RegExp("#extension\\s+GL_"+e+"\\s+:\\s+[a-zA-Z0-9]+\\s*$","g"),"",i),r("GL_"+e,t,i)}t.a=function(e,t){var i=/#define OUTPUT_DECLARATION/,l=e.split("\n");if(/#version 300 es/g.test(e))return e;var u,d,c=-1;for(u=0;u<l.length;++u)if(d=l[u],i.test(d)){c=u;break}if(-1===c)throw new a.default("Could not find a #define OUTPUT_DECLARATION!");var f=[];for(u=0;u<10;u++){var h="gl_FragData\\["+u+"\\]",p="czm_out"+u;new RegExp(h,"g").test(e)&&(o(p,f),r(h,p,l),l.splice(c,0,"layout(location = "+u+") out vec4 "+p+";"),c+=1)}(function(e,t){for(var i=new RegExp("(^|[^\\w])("+e+")($|[^\\w])","g"),n=t.length,a=0;a<n;++a){var r=t[a];if(i.test(r))return!0}return!1})("gl_FragColor",l)&&(o("czm_fragColor",f),r("gl_FragColor","czm_fragColor",l),l.splice(c,0,"layout(location = 0) out vec4 czm_fragColor;"),c+=1);var m=function(e,t){for(var i={},a=e.length,r=[],o=0;o<t.length;++o){var s=t[o],l=/(#ifdef|#if)/g.test(s),u=/#else/g.test(s),d=/#endif/g.test(s);if(l)r.push(s);else if(u){var c=r[r.length-1].replace("ifdef","ifndef");/if/g.test(c)&&(c=c.replace(/(#if\s+)(\S*)([^]*)/,"$1!($2)$3")),r.pop(),r.push(c)}else if(d)r.pop();else if(!/layout/g.test(s))for(var f=0;f<a;++f){var h=e[f];-1!==s.indexOf(h)&&(Object(n.default)(i[h])?i[h]=i[h].filter((function(e){return r.indexOf(e)>=0})):i[h]=r.slice())}}return i}(f,l),_={};for(u=0;u<l.length;u++)for(var g in d=l[u],m){if(m.hasOwnProperty(g))new RegExp("(layout)[^]+(out)[^]+("+g+")[^]+","g").test(d)&&(_[d]=g)}for(var v in _)if(_.hasOwnProperty(v)){var y,b=_[v],w=l.indexOf(v),O=m[b],x=O.length;for(y=0;y<x;y++)l.splice(w,0,O[y]);for(w+=x+1,y=x-1;y>=0;y--)l.splice(w,0,"#endif //"+O[y])}var A=!1;for(u=0;u<l.length;u++)if(/#version/.test(l[u])){l[u]="#version 300 es",A=!0;break}return A||l.splice(0,0,"#version 300 es"),l.splice(1,0,"#define WEBGL_2"),s("EXT_draw_buffers","WEBGL_2",l),s("EXT_frag_depth","WEBGL_2",l),s("OES_standard_derivatives","WEBGL_2",l),r("texture2D","texture",l),r("texture3D","texture",l),r("textureCube","texture",l),r("gl_FragDepthEXT","gl_FragDepth",l),t?r("varying","in",l):(r("attribute","in",l),r("varying","out",l)),function(e){for(var t="",i=e.length,n=0;n<i;++n)t+=e[n]+"\n";return t}(l)}},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for converting radians to degrees.\n *\n * @alias czm_degreesPerRadian\n * @glslConstant\n *\n * @see CesiumMath.DEGREES_PER_RADIAN\n *\n * @example\n * // GLSL declaration\n * const float czm_degreesPerRadian = ...;\n *\n * // Example\n * float deg = czm_degreesPerRadian * rad;\n */\nconst float czm_degreesPerRadian = 57.29577951308232;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL vec2 constant for defining the depth range.\n * This is a workaround to a bug where IE11 does not implement gl_DepthRange.\n *\n * @alias czm_depthRange\n * @glslConstant\n *\n * @example\n * // GLSL declaration\n * float depthRangeNear = czm_depthRange.near;\n * float depthRangeFar = czm_depthRange.far;\n *\n */\nconst czm_depthRangeStruct czm_depthRange = czm_depthRangeStruct(0.0, 1.0);\n"},function(e,t,i){"use strict";t.a="/**\n * 0.1\n *\n * @name czm_epsilon1\n * @glslConstant\n */\nconst float czm_epsilon1 = 0.1;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.01\n *\n * @name czm_epsilon2\n * @glslConstant\n */\nconst float czm_epsilon2 = 0.01;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.001\n *\n * @name czm_epsilon3\n * @glslConstant\n */\nconst float czm_epsilon3 = 0.001;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.0001\n *\n * @name czm_epsilon4\n * @glslConstant\n */\nconst float czm_epsilon4 = 0.0001;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.00001\n *\n * @name czm_epsilon5\n * @glslConstant\n */\nconst float czm_epsilon5 = 0.00001;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.000001\n *\n * @name czm_epsilon6\n * @glslConstant\n */\nconst float czm_epsilon6 = 0.000001;\n"},function(e,t,i){"use strict";t.a="/**\n * 0.0000001\n *\n * @name czm_epsilon7\n * @glslConstant\n */\nconst float czm_epsilon7 = 0.0000001;\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_infinity\n * @glslConstant\n */\nconst float czm_infinity = 5906376272000.0; // Distance from the Sun to Pluto in meters. TODO: What is best given lowp, mediump, and highp?\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>1/pi</code>.\n *\n * @alias czm_oneOverPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverPi = ...;\n *\n * // Example\n * float pi = 1.0 / czm_oneOverPi;\n */\nconst float czm_oneOverPi = 0.3183098861837907;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>1/2pi</code>.\n *\n * @alias czm_oneOverTwoPi\n * @glslConstant\n *\n * @see CesiumMath.ONE_OVER_TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_oneOverTwoPi = ...;\n *\n * // Example\n * float pi = 2.0 * czm_oneOverTwoPi;\n */\nconst float czm_oneOverTwoPi = 0.15915494309189535;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE}\n *\n * @name czm_passCesium3DTile\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTile = 4.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION}\n *\n * @name czm_passCesium3DTileClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassification = 5.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW}\n *\n * @name czm_passCesium3DTileClassificationIgnoreShow\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCesium3DTileClassificationIgnoreShow = 6.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#CLASSIFICATION}\n *\n * @name czm_passClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passClassification = 7.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#COMPUTE}\n *\n * @name czm_passCompute\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passCompute = 1.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#ENVIRONMENT}\n *\n * @name czm_passEnvironment\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passEnvironment = 0.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#GLOBE}\n *\n * @name czm_passGlobe\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passGlobe = 2.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#OPAQUE}\n *\n * @name czm_passOpaque\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOpaque = 7.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#OVERLAY}\n *\n * @name czm_passOverlay\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passOverlay = 9.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#TERRAIN_CLASSIFICATION}\n *\n * @name czm_passTerrainClassification\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTerrainClassification = 3.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The automatic GLSL constant for {@link Pass#TRANSLUCENT}\n *\n * @name czm_passTranslucent\n * @glslConstant\n *\n * @see czm_pass\n */\nconst float czm_passTranslucent = 8.0;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>Math.PI</code>.\n *\n * @alias czm_pi\n * @glslConstant\n *\n * @see CesiumMath.PI\n *\n * @example\n * // GLSL declaration\n * const float czm_pi = ...;\n *\n * // Example\n * float twoPi = 2.0 * czm_pi;\n */\nconst float czm_pi = 3.141592653589793;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>pi/4</code>.\n *\n * @alias czm_piOverFour\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_FOUR\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverFour = ...;\n *\n * // Example\n * float pi = 4.0 * czm_piOverFour;\n */\nconst float czm_piOverFour = 0.7853981633974483;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>pi/6</code>.\n *\n * @alias czm_piOverSix\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_SIX\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverSix = ...;\n *\n * // Example\n * float pi = 6.0 * czm_piOverSix;\n */\nconst float czm_piOverSix = 0.5235987755982988;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>pi/3</code>.\n *\n * @alias czm_piOverThree\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_THREE\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverThree = ...;\n *\n * // Example\n * float pi = 3.0 * czm_piOverThree;\n */\nconst float czm_piOverThree = 1.0471975511965976;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>pi/2</code>.\n *\n * @alias czm_piOverTwo\n * @glslConstant\n *\n * @see CesiumMath.PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_piOverTwo = ...;\n *\n * // Example\n * float pi = 2.0 * czm_piOverTwo;\n */\nconst float czm_piOverTwo = 1.5707963267948966;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for converting degrees to radians.\n *\n * @alias czm_radiansPerDegree\n * @glslConstant\n *\n * @see CesiumMath.RADIANS_PER_DEGREE\n *\n * @example\n * // GLSL declaration\n * const float czm_radiansPerDegree = ...;\n *\n * // Example\n * float rad = czm_radiansPerDegree * deg;\n */\nconst float czm_radiansPerDegree = 0.017453292519943295;\n"},function(e,t,i){"use strict";t.a="/**\n * The constant identifier for the 2D {@link SceneMode}\n *\n * @name czm_sceneMode2D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode2D = 2.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The constant identifier for the 3D {@link SceneMode}\n *\n * @name czm_sceneMode3D\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneMode3D = 3.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The constant identifier for the Columbus View {@link SceneMode}\n *\n * @name czm_sceneModeColumbusView\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneMode3D\n * @see czm_sceneModeMorphing\n */\nconst float czm_sceneModeColumbusView = 1.0;\n"},function(e,t,i){"use strict";t.a="/**\n * The constant identifier for the Morphing {@link SceneMode}\n *\n * @name czm_sceneModeMorphing\n * @glslConstant\n * @see czm_sceneMode\n * @see czm_sceneMode2D\n * @see czm_sceneModeColumbusView\n * @see czm_sceneMode3D\n */\nconst float czm_sceneModeMorphing = 0.0;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for one solar radius.\n *\n * @alias czm_solarRadius\n * @glslConstant\n *\n * @see CesiumMath.SOLAR_RADIUS\n *\n * @example\n * // GLSL declaration\n * const float czm_solarRadius = ...;\n */\nconst float czm_solarRadius = 695500000.0;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>3pi/2</code>.\n *\n * @alias czm_threePiOver2\n * @glslConstant\n *\n * @see CesiumMath.THREE_PI_OVER_TWO\n *\n * @example\n * // GLSL declaration\n * const float czm_threePiOver2 = ...;\n *\n * // Example\n * float pi = (2.0 / 3.0) * czm_threePiOver2;\n */\nconst float czm_threePiOver2 = 4.71238898038469;\n"},function(e,t,i){"use strict";t.a="/**\n * A built-in GLSL floating-point constant for <code>2pi</code>.\n *\n * @alias czm_twoPi\n * @glslConstant\n *\n * @see CesiumMath.TWO_PI\n *\n * @example\n * // GLSL declaration\n * const float czm_twoPi = ...;\n *\n * // Example\n * float pi = czm_twoPi / 2.0;\n */\nconst float czm_twoPi = 6.283185307179586;\n"},function(e,t,i){"use strict";t.a="/**\n * The maximum latitude, in radians, both North and South, supported by a Web Mercator\n * (EPSG:3857) projection. Technically, the Mercator projection is defined\n * for any latitude up to (but not including) 90 degrees, but it makes sense\n * to cut it off sooner because it grows exponentially with increasing latitude.\n * The logic behind this particular cutoff value, which is the one used by\n * Google Maps, Bing Maps, and Esri, is that it makes the projection\n * square. That is, the rectangle is equal in the X and Y directions.\n *\n * The constant value is computed as follows:\n * czm_pi * 0.5 - (2.0 * atan(exp(-czm_pi)))\n *\n * @name czm_webMercatorMaxLatitude\n * @glslConstant\n */\nconst float czm_webMercatorMaxLatitude = 1.4844222297453324;\n"},function(e,t,i){"use strict";t.a="/**\n * @name czm_depthRangeStruct\n * @glslStruct\n */\nstruct czm_depthRangeStruct\n{\n float near;\n float far;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Holds material information that can be used for lighting. Returned by all czm_getMaterial functions.\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} specular Intensity of incoming light reflecting in a single direction.\n * @property {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n * @property {vec3} normal Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {vec3} emission Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n */\nstruct czm_material\n{\n vec3 diffuse;\n float specular;\n float shininess;\n vec3 normal;\n vec3 emission;\n float alpha;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Used as input to every material's czm_getMaterial function.\n *\n * @name czm_materialInput\n * @glslStruct\n *\n * @property {float} s 1D texture coordinates.\n * @property {vec2} st 2D texture coordinates.\n * @property {vec3} str 3D texture coordinates.\n * @property {vec3} normalEC Unperturbed surface normal in eye coordinates.\n * @property {mat3} tangentToEyeMatrix Matrix for converting a tangent space normal to eye space.\n * @property {vec3} positionToEyeEC Vector from the fragment to the eye in eye coordinates. The magnitude is the distance in meters from the fragment to the eye.\n * @property {float} height The height of the terrain in meters above or below the WGS84 ellipsoid. Only available for globe materials.\n * @property {float} slope The slope of the terrain in radians. 0 is flat; pi/2 is vertical. Only available for globe materials.\n * @property {float} aspect The aspect of the terrain in radians. 0 is East, pi/2 is North, pi is West, 3pi/2 is South. Only available for globe materials.\n */\nstruct czm_materialInput\n{\n float s;\n vec2 st;\n vec3 str;\n vec3 normalEC;\n mat3 tangentToEyeMatrix;\n vec3 positionToEyeEC;\n float height;\n float slope;\n float aspect;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Struct for representing a material for a {@link ModelExperimental}. The model\n * rendering pipeline will pass this struct between material, custom shaders,\n * and lighting stages. This is not to be confused with {@link czm_material}\n * which is used by the older Fabric materials system, although they are similar\n *\n * @name czm_modelMaterial\n * @glslStruct\n *\n * @property {vec3} diffuse Incoming light that scatters evenly in all directions.\n * @property {float} alpha Alpha of this material. 0.0 is completely transparent; 1.0 is completely opaque.\n * @property {vec3} specular Color of reflected light at normal incidence in PBR materials. This is sometimes referred to as f0 in the literature.\n * @property {float} roughness A number from 0.0 to 1.0 representing how rough the surface is. Values near 0.0 produce glossy surfaces, while values near 1.0 produce rough surfaces.\n * @property {vec3} normalEC Surface's normal in eye coordinates. It is used for effects such as normal mapping. The default is the surface's unmodified normal.\n * @property {float} occlusion Ambient occlusion recieved at this point on the material. 1.0 means fully lit, 0.0 means fully occluded.\n * @property {vec3} emissive Light emitted by the material equally in all directions. The default is vec3(0.0), which emits no light.\n */\nstruct czm_modelMaterial {\n vec3 diffuse;\n float alpha;\n vec3 specular;\n float roughness;\n vec3 normalEC;\n float occlusion;\n vec3 emissive;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Struct for representing the output of a custom vertex shader.\n * \n * @name czm_modelVertexOutput\n * @glslStruct\n *\n * @see {@link CustomShader}\n * @see {@link ModelExperimental}\n *\n * @property {vec3} positionMC The position of the vertex in model coordinates\n * @property {float} pointSize A custom value for gl_PointSize. This is only used for point primitives. \n */\nstruct czm_modelVertexOutput {\n vec3 positionMC;\n float pointSize;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Parameters for {@link czm_pbrLighting}\n *\n * @name czm_material\n * @glslStruct\n *\n * @property {vec3} diffuseColor the diffuse color of the material for the lambert term of the rendering equation\n * @property {float} roughness a value from 0.0 to 1.0 that indicates how rough the surface of the material is.\n * @property {vec3} f0 The reflectance of the material at normal incidence\n */\nstruct czm_pbrParameters\n{\n vec3 diffuseColor;\n float roughness;\n vec3 f0;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_ray\n * @glslStruct\n */\nstruct czm_ray\n{\n vec3 origin;\n vec3 direction;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_raySegment\n * @glslStruct\n */\nstruct czm_raySegment\n{\n float start;\n float stop;\n};\n\n/**\n * DOC_TBA\n *\n * @name czm_emptyRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_emptyRaySegment = czm_raySegment(-czm_infinity, -czm_infinity);\n\n/**\n * DOC_TBA\n *\n * @name czm_fullRaySegment\n * @glslConstant \n */\nconst czm_raySegment czm_fullRaySegment = czm_raySegment(0.0, czm_infinity);\n"},function(e,t,i){"use strict";t.a="struct czm_shadowParameters\n{\n#ifdef USE_CUBE_MAP_SHADOW\n vec3 texCoords;\n#else\n vec2 texCoords;\n#endif\n\n float depthBias;\n float depth;\n float nDotL;\n vec2 texelStepSize;\n float normalShadingSmooth;\n float darkness;\n};\n"},function(e,t,i){"use strict";t.a="/**\n * Converts an HSB color (hue, saturation, brightness) to RGB\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_HSBToRGB\n * @glslFunction\n * \n * @param {vec3} hsb The color in HSB.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_HSB2RGB = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n\nvec3 czm_HSBToRGB(vec3 hsb)\n{\n vec3 p = abs(fract(hsb.xxx + K_HSB2RGB.xyz) * 6.0 - K_HSB2RGB.www);\n return hsb.z * mix(K_HSB2RGB.xxx, clamp(p - K_HSB2RGB.xxx, 0.0, 1.0), hsb.y);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts an HSL color (hue, saturation, lightness) to RGB\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_HSLToRGB\n * @glslFunction\n * \n * @param {vec3} rgb The color in HSL.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n\nvec3 hueToRGB(float hue)\n{\n float r = abs(hue * 6.0 - 3.0) - 1.0;\n float g = 2.0 - abs(hue * 6.0 - 2.0);\n float b = 2.0 - abs(hue * 6.0 - 4.0);\n return clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 czm_HSLToRGB(vec3 hsl)\n{\n vec3 rgb = hueToRGB(hsl.x);\n float c = (1.0 - abs(2.0 * hsl.z - 1.0)) * hsl.y;\n return (rgb - 0.5) * c + hsl.z;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts an RGB color to HSB (hue, saturation, brightness)\n * HSB <-> RGB conversion with minimal branching: {@link http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl}\n *\n * @name czm_RGBToHSB\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSB.\n *\n * @example\n * vec3 hsb = czm_RGBToHSB(rgb);\n * hsb.z *= 0.1;\n * rgb = czm_HSBToRGB(hsb);\n */\n\nconst vec4 K_RGB2HSB = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\nvec3 czm_RGBToHSB(vec3 rgb)\n{\n vec4 p = mix(vec4(rgb.bg, K_RGB2HSB.wz), vec4(rgb.gb, K_RGB2HSB.xy), step(rgb.b, rgb.g));\n vec4 q = mix(vec4(p.xyw, rgb.r), vec4(rgb.r, p.yzx), step(p.x, rgb.r));\n\n float d = q.x - min(q.w, q.y);\n return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + czm_epsilon7)), d / (q.x + czm_epsilon7), q.x);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts an RGB color to HSL (hue, saturation, lightness)\n * HSL <-> RGB conversion: {@link http://www.chilliant.com/rgb2hsv.html}\n *\n * @name czm_RGBToHSL\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in HSL.\n *\n * @example\n * vec3 hsl = czm_RGBToHSL(rgb);\n * hsl.z *= 0.1;\n * rgb = czm_HSLToRGB(hsl);\n */\n \nvec3 RGBtoHCV(vec3 rgb)\n{\n // Based on work by Sam Hocevar and Emil Persson\n vec4 p = (rgb.g < rgb.b) ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);\n vec4 q = (rgb.r < p.x) ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);\n float c = q.x - min(q.w, q.y);\n float h = abs((q.w - q.y) / (6.0 * c + czm_epsilon7) + q.z);\n return vec3(h, c, q.x);\n}\n\nvec3 czm_RGBToHSL(vec3 rgb)\n{\n vec3 hcv = RGBtoHCV(rgb);\n float l = hcv.z - hcv.y * 0.5;\n float s = hcv.y / (1.0 - abs(l * 2.0 - 1.0) + czm_epsilon7);\n return vec3(hcv.x, s, l);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts an RGB color to CIE Yxy.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_RGBToXYZ\n * @glslFunction\n * \n * @param {vec3} rgb The color in RGB.\n *\n * @returns {vec3} The color in CIE Yxy.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_RGBToXYZ(vec3 rgb)\n{\n const mat3 RGB2XYZ = mat3(0.4124, 0.2126, 0.0193,\n 0.3576, 0.7152, 0.1192,\n 0.1805, 0.0722, 0.9505);\n vec3 xyz = RGB2XYZ * rgb;\n vec3 Yxy;\n Yxy.r = xyz.g;\n float temp = dot(vec3(1.0), xyz);\n Yxy.gb = xyz.rg / temp;\n return Yxy;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts a CIE Yxy color to RGB.\n * <p>The conversion is described in\n * {@link http://content.gpwiki.org/index.php/D3DBook:High-Dynamic_Range_Rendering#Luminance_Transform|Luminance Transform}\n * </p>\n * \n * @name czm_XYZToRGB\n * @glslFunction\n * \n * @param {vec3} Yxy The color in CIE Yxy.\n *\n * @returns {vec3} The color in RGB.\n *\n * @example\n * vec3 xyz = czm_RGBToXYZ(rgb);\n * xyz.x = max(xyz.x - luminanceThreshold, 0.0);\n * rgb = czm_XYZToRGB(xyz);\n */\nvec3 czm_XYZToRGB(vec3 Yxy)\n{\n const mat3 XYZ2RGB = mat3( 3.2405, -0.9693, 0.0556,\n -1.5371, 1.8760, -0.2040,\n -0.4985, 0.0416, 1.0572);\n vec3 xyz;\n xyz.r = Yxy.r * Yxy.g / Yxy.b;\n xyz.g = Yxy.r;\n xyz.b = Yxy.r * (1.0 - Yxy.g - Yxy.b) / Yxy.b;\n \n return XYZ2RGB * xyz;\n}\n"},function(e,t,i){"use strict";t.a="// See:\n// https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\nvec3 czm_acesTonemapping(vec3 color) {\n float g = 0.985;\n float a = 0.065;\n float b = 0.0001;\n float c = 0.433;\n float d = 0.238;\n\n color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\n color = clamp(color, 0.0, 1.0);\n\n return color;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * @private\n */\nfloat czm_alphaWeight(float a)\n{\n float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n\n // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n // http://jcgt.org/published/0002/02/09/\n return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Procedural anti-aliasing by blurring two colors that meet at a sharp edge.\n *\n * @name czm_antialias\n * @glslFunction\n *\n * @param {vec4} color1 The color on one side of the edge.\n * @param {vec4} color2 The color on the other side of the edge.\n * @param {vec4} currentcolor The current color, either <code>color1</code> or <code>color2</code>.\n * @param {float} dist The distance to the edge in texture coordinates.\n * @param {float} [fuzzFactor=0.1] Controls the blurriness between the two colors.\n * @returns {vec4} The anti-aliased color.\n *\n * @example\n * // GLSL declarations\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor);\n * vec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist);\n *\n * // get the color for a material that has a sharp edge at the line y = 0.5 in texture space\n * float dist = abs(textureCoordinates.t - 0.5);\n * vec4 currentColor = mix(bottomColor, topColor, step(0.5, textureCoordinates.t));\n * vec4 color = czm_antialias(bottomColor, topColor, currentColor, dist, 0.1);\n */\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist, float fuzzFactor)\n{\n float val1 = clamp(dist / fuzzFactor, 0.0, 1.0);\n float val2 = clamp((dist - 0.5) / fuzzFactor, 0.0, 1.0);\n val1 = val1 * (1.0 - val2);\n val1 = val1 * val1 * (3.0 - (2.0 * val1));\n val1 = pow(val1, 0.5); //makes the transition nicer\n \n vec4 midColor = (color1 + color2) * 0.5;\n return mix(midColor, currentColor, val1);\n}\n\nvec4 czm_antialias(vec4 color1, vec4 color2, vec4 currentColor, float dist)\n{\n return czm_antialias(color1, color2, currentColor, dist, 0.1);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Approximately computes spherical coordinates given a normal.\n * Uses approximate inverse trigonometry for speed and consistency,\n * since inverse trigonometry can differ from vendor-to-vendor and when compared with the CPU.\n *\n * @name czm_approximateSphericalCoordinates\n * @glslFunction\n *\n * @param {vec3} normal arbitrary-length normal.\n *\n * @returns {vec2} Approximate latitude and longitude spherical coordinates.\n */\nvec2 czm_approximateSphericalCoordinates(vec3 normal) {\n // Project into plane with vertical for latitude\n float latitudeApproximation = czm_fastApproximateAtan(sqrt(normal.x * normal.x + normal.y * normal.y), normal.z);\n float longitudeApproximation = czm_fastApproximateAtan(normal.x, normal.y);\n return vec2(latitudeApproximation, longitudeApproximation);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Determines if the fragment is back facing\n *\n * @name czm_backFacing\n * @glslFunction \n * \n * @returns {bool} <code>true</code> if the fragment is back facing; otherwise, <code>false</code>.\n */\nbool czm_backFacing()\n{\n // !gl_FrontFacing doesn't work as expected on Mac/Intel so use the more verbose form instead. See https://github.com/CesiumGS/cesium/pull/8494.\n return gl_FrontFacing == false;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a float expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {float} a Value to return if the comparison is true.\n * @param {float} b Value to return if the comparison is false.\n *\n * @returns {float} equivalent of comparison ? a : b\n */\nfloat czm_branchFreeTernary(bool comparison, float a, float b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec2 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec2} a Value to return if the comparison is true.\n * @param {vec2} b Value to return if the comparison is false.\n *\n * @returns {vec2} equivalent of comparison ? a : b\n */\nvec2 czm_branchFreeTernary(bool comparison, vec2 a, vec2 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec3 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec3 czm_branchFreeTernary(bool comparison, vec3 a, vec3 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n\n/**\n * Branchless ternary operator to be used when it's inexpensive to explicitly\n * evaluate both possibilities for a vec4 expression.\n *\n * @name czm_branchFreeTernary\n * @glslFunction\n *\n * @param {bool} comparison A comparison statement\n * @param {vec3} a Value to return if the comparison is true.\n * @param {vec3} b Value to return if the comparison is false.\n *\n * @returns {vec3} equivalent of comparison ? a : b\n */\nvec4 czm_branchFreeTernary(bool comparison, vec4 a, vec4 b) {\n float useA = float(comparison);\n return a * useA + b * (1.0 - useA);\n}\n"},function(e,t,i){"use strict";t.a="\nvec4 czm_cascadeColor(vec4 weights)\n{\n return vec4(1.0, 0.0, 0.0, 1.0) * weights.x +\n vec4(0.0, 1.0, 0.0, 1.0) * weights.y +\n vec4(0.0, 0.0, 1.0, 1.0) * weights.z +\n vec4(1.0, 0.0, 1.0, 1.0) * weights.w;\n}\n"},function(e,t,i){"use strict";t.a="\nuniform vec4 shadowMap_cascadeDistances;\n\nfloat czm_cascadeDistance(vec4 weights)\n{\n return dot(shadowMap_cascadeDistances, weights);\n}\n"},function(e,t,i){"use strict";t.a="\nuniform mat4 shadowMap_cascadeMatrices[4];\n\nmat4 czm_cascadeMatrix(vec4 weights)\n{\n return shadowMap_cascadeMatrices[0] * weights.x +\n shadowMap_cascadeMatrices[1] * weights.y +\n shadowMap_cascadeMatrices[2] * weights.z +\n shadowMap_cascadeMatrices[3] * weights.w;\n}\n"},function(e,t,i){"use strict";t.a="\nuniform vec4 shadowMap_cascadeSplits[2];\n\nvec4 czm_cascadeWeights(float depthEye)\n{\n // One component is set to 1.0 and all others set to 0.0.\n vec4 near = step(shadowMap_cascadeSplits[0], vec4(depthEye));\n vec4 far = step(depthEye, shadowMap_cascadeSplits[1]);\n return near * far;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_columbusViewMorph\n * @glslFunction\n */\nvec4 czm_columbusViewMorph(vec4 position2D, vec4 position3D, float time)\n{\n // Just linear for now.\n vec3 p = mix(position2D.xyz, position3D.xyz, time);\n return vec4(p, 1.0);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Returns a position in model coordinates relative to eye taking into\n * account the current scene mode: 3D, 2D, or Columbus view.\n * <p>\n * This uses standard position attributes, <code>position3DHigh</code>, \n * <code>position3DLow</code>, <code>position2DHigh</code>, and <code>position2DLow</code>, \n * and should be used when writing a vertex shader for an {@link Appearance}.\n * </p>\n *\n * @name czm_computePosition\n * @glslFunction\n *\n * @returns {vec4} The position relative to eye.\n *\n * @example\n * vec4 p = czm_computePosition();\n * v_positionEC = (czm_modelViewRelativeToEye * p).xyz;\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n *\n * @see czm_translateRelativeToEye\n */\nvec4 czm_computePosition();\n"},function(e,t,i){"use strict";t.a="/**\n * @private\n */\nvec2 cordic(float angle)\n{\n// Scale the vector by the appropriate factor for the 24 iterations to follow.\n vec2 vector = vec2(6.0725293500888267e-1, 0.0);\n// Iteration 1\n float sense = (angle < 0.0) ? -1.0 : 1.0;\n // float factor = sense * 1.0; // 2^-0\n mat2 rotation = mat2(1.0, sense, -sense, 1.0);\n vector = rotation * vector;\n angle -= sense * 7.8539816339744828e-1; // atan(2^-0)\n// Iteration 2\n sense = (angle < 0.0) ? -1.0 : 1.0;\n float factor = sense * 5.0e-1; // 2^-1\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.6364760900080609e-1; // atan(2^-1)\n// Iteration 3\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.5e-1; // 2^-2\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4497866312686414e-1; // atan(2^-2)\n// Iteration 4\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.25e-1; // 2^-3\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2435499454676144e-1; // atan(2^-3)\n// Iteration 5\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.25e-2; // 2^-4\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.2418809995957350e-2; // atan(2^-4)\n// Iteration 6\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.125e-2; // 2^-5\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.1239833430268277e-2; // atan(2^-5)\n// Iteration 7\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.5625e-2; // 2^-6\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5623728620476831e-2; // atan(2^-6)\n// Iteration 8\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.8125e-3; // 2^-7\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.8123410601011111e-3; // atan(2^-7)\n// Iteration 9\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.90625e-3; // 2^-8\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.9062301319669718e-3; // atan(2^-8)\n// Iteration 10\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.953125e-3; // 2^-9\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9531225164788188e-3; // atan(2^-9)\n// Iteration 11\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.765625e-4; // 2^-10\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.7656218955931946e-4; // atan(2^-10)\n// Iteration 12\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.8828125e-4; // 2^-11\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.8828121119489829e-4; // atan(2^-11)\n// Iteration 13\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.44140625e-4; // 2^-12\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.4414062014936177e-4; // atan(2^-12)\n// Iteration 14\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.220703125e-4; // 2^-13\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.2207031189367021e-4; // atan(2^-13)\n// Iteration 15\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 6.103515625e-5; // 2^-14\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 6.1035156174208773e-5; // atan(2^-14)\n// Iteration 16\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.0517578125e-5; // 2^-15\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.0517578115526096e-5; // atan(2^-15)\n// Iteration 17\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.52587890625e-5; // 2^-16\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.5258789061315762e-5; // atan(2^-16)\n// Iteration 18\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 7.62939453125e-6; // 2^-17\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 7.6293945311019700e-6; // atan(2^-17)\n// Iteration 19\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 3.814697265625e-6; // 2^-18\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 3.8146972656064961e-6; // atan(2^-18)\n// Iteration 20\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.9073486328125e-6; // 2^-19\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 1.9073486328101870e-6; // atan(2^-19)\n// Iteration 21\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 9.5367431640625e-7; // 2^-20\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 9.5367431640596084e-7; // atan(2^-20)\n// Iteration 22\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 4.76837158203125e-7; // 2^-21\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 4.7683715820308884e-7; // atan(2^-21)\n// Iteration 23\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 2.384185791015625e-7; // 2^-22\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n angle -= sense * 2.3841857910155797e-7; // atan(2^-22)\n// Iteration 24\n sense = (angle < 0.0) ? -1.0 : 1.0;\n factor = sense * 1.1920928955078125e-7; // 2^-23\n rotation[0][1] = factor;\n rotation[1][0] = -factor;\n vector = rotation * vector;\n// angle -= sense * 1.1920928955078068e-7; // atan(2^-23)\n\n return vector;\n}\n\n/**\n * Computes the cosine and sine of the provided angle using the CORDIC algorithm.\n *\n * @name czm_cosineAndSine\n * @glslFunction\n *\n * @param {float} angle The angle in radians.\n *\n * @returns {vec2} The resulting cosine of the angle (as the x coordinate) and sine of the angle (as the y coordinate).\n *\n * @example\n * vec2 v = czm_cosineAndSine(czm_piOverSix);\n * float cosine = v.x;\n * float sine = v.y;\n */\nvec2 czm_cosineAndSine(float angle)\n{\n if (angle < -czm_piOverTwo || angle > czm_piOverTwo)\n {\n if (angle < 0.0)\n {\n return -cordic(angle + czm_pi);\n }\n else\n {\n return -cordic(angle - czm_pi);\n }\n }\n else\n {\n return cordic(angle);\n }\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Decompresses texture coordinates that were packed into a single float.\n *\n * @name czm_decompressTextureCoordinates\n * @glslFunction\n *\n * @param {float} encoded The compressed texture coordinates.\n * @returns {vec2} The decompressed texture coordinates.\n */\n vec2 czm_decompressTextureCoordinates(float encoded)\n {\n float temp = encoded / 4096.0;\n float xZeroTo4095 = floor(temp);\n float stx = xZeroTo4095 / 4095.0;\n float sty = (encoded - xZeroTo4095 * 4096.0) / 4095.0;\n return vec2(stx, sty);\n }\n"},function(e,t,i){"use strict";t.a="/**\n * Get default parameters for physically based rendering. These defaults\n * describe a rough dielectric (non-metal) surface (e.g. rough plastic).\n *\n * @return {czm_pbrParameters} Default parameters for {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_defaultPbrMaterial()\n{\n czm_pbrParameters results;\n results.diffuseColor = vec3(1.0);\n results.roughness = 1.0;\n\n const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);\n results.f0 = REFLECTANCE_DIELECTRIC;\n return results;\n}\n"},function(e,t,i){"use strict";t.a="// emulated noperspective\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP, which is not available in WebGL 1 or 2.\n * GL_DEPTH_CLAMP clamps geometry that is outside the near and far planes, \n * capping the shadow volume. More information here: \n * https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_depth_clamp.txt.\n *\n * When GL_EXT_frag_depth is available we emulate GL_DEPTH_CLAMP by ensuring \n * no geometry gets clipped by setting the clip space z value to 0.0 and then\n * sending the unaltered screen space z value (using emulated noperspective\n * interpolation) to the frag shader where it is clamped to [0,1] and then\n * written with gl_FragDepth (see czm_writeDepthClamp). This technique is based on:\n * https://stackoverflow.com/questions/5960757/how-to-emulate-gl-depth-clamp-nv.\n *\n * When GL_EXT_frag_depth is not available, which is the case on some mobile \n * devices, we must attempt to fix this only in the vertex shader. \n * The approach is to clamp the z value to the far plane, which closes the \n * shadow volume but also distorts the geometry, so there can still be artifacts\n * on frustum seams.\n *\n * @name czm_depthClamp\n * @glslFunction\n *\n * @param {vec4} coords The vertex in clip coordinates.\n * @returns {vec4} The modified vertex.\n *\n * @example\n * gl_Position = czm_depthClamp(czm_modelViewProjection * vec4(position, 1.0));\n *\n * @see czm_writeDepthClamp\n */\nvec4 czm_depthClamp(vec4 coords)\n{\n#ifndef LOG_DEPTH\n#ifdef GL_EXT_frag_depth\n v_WindowZ = (0.5 * (coords.z / coords.w) + 0.5) * coords.w;\n coords.z = 0.0;\n#else\n coords.z = min(coords.z, coords.w);\n#endif\n#endif\n return coords;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes a 3x3 rotation matrix that transforms vectors from an ellipsoid's east-north-up coordinate system \n * to eye coordinates. In east-north-up coordinates, x points east, y points north, and z points along the \n * surface normal. East-north-up can be used as an ellipsoid's tangent space for operations such as bump mapping.\n * <br /><br />\n * The ellipsoid is assumed to be centered at the model coordinate's origin.\n *\n * @name czm_eastNorthUpToEyeCoordinates\n * @glslFunction\n *\n * @param {vec3} positionMC The position on the ellipsoid in model coordinates.\n * @param {vec3} normalEC The normalized ellipsoid surface normal, at <code>positionMC</code>, in eye coordinates.\n *\n * @returns {mat3} A 3x3 rotation matrix that transforms vectors from the east-north-up coordinate system to eye coordinates.\n *\n * @example\n * // Transform a vector defined in the east-north-up coordinate \n * // system, (0, 0, 1) which is the surface normal, to eye \n * // coordinates.\n * mat3 m = czm_eastNorthUpToEyeCoordinates(positionMC, normalEC);\n * vec3 normalEC = m * vec3(0.0, 0.0, 1.0);\n */\nmat3 czm_eastNorthUpToEyeCoordinates(vec3 positionMC, vec3 normalEC)\n{\n vec3 tangentMC = normalize(vec3(-positionMC.y, positionMC.x, 0.0)); // normalized surface tangent in model coordinates\n vec3 tangentEC = normalize(czm_normal3D * tangentMC); // normalized surface tangent in eye coordiantes\n vec3 bitangentEC = normalize(cross(normalEC, tangentEC)); // normalized surface bitangent in eye coordinates\n\n return mat3(\n tangentEC.x, tangentEC.y, tangentEC.z,\n bitangentEC.x, bitangentEC.y, bitangentEC.z,\n normalEC.x, normalEC.y, normalEC.z);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidContainsPoint\n * @glslFunction\n *\n */\nbool czm_ellipsoidContainsPoint(vec3 ellipsoid_inverseRadii, vec3 point)\n{\n vec3 scaled = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(point, 1.0)).xyz;\n return (dot(scaled, scaled) <= 1.0);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_ellipsoidWgs84TextureCoordinates\n * @glslFunction\n */\nvec2 czm_ellipsoidWgs84TextureCoordinates(vec3 normal)\n{\n return vec2(atan(normal.y, normal.x) * czm_oneOverTwoPi + 0.5, asin(normal.z) * czm_oneOverPi + 0.5);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Compares <code>left</code> and <code>right</code> componentwise. Returns <code>true</code>\n * if they are within <code>epsilon</code> and <code>false</code> otherwise. The inputs\n * <code>left</code> and <code>right</code> can be <code>float</code>s, <code>vec2</code>s,\n * <code>vec3</code>s, or <code>vec4</code>s.\n *\n * @name czm_equalsEpsilon\n * @glslFunction\n *\n * @param {} left The first vector.\n * @param {} right The second vector.\n * @param {float} epsilon The epsilon to use for equality testing.\n * @returns {bool} <code>true</code> if the components are within <code>epsilon</code> and <code>false</code> otherwise.\n *\n * @example\n * // GLSL declarations\n * bool czm_equalsEpsilon(float left, float right, float epsilon);\n * bool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon);\n * bool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon);\n * bool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon);\n */\nbool czm_equalsEpsilon(vec4 left, vec4 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec4(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec3 left, vec3 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec3(epsilon)));\n}\n\nbool czm_equalsEpsilon(vec2 left, vec2 right, float epsilon) {\n return all(lessThanEqual(abs(left - right), vec2(epsilon)));\n}\n\nbool czm_equalsEpsilon(float left, float right, float epsilon) {\n return (abs(left - right) <= epsilon);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_eyeOffset\n * @glslFunction\n *\n * @param {vec4} positionEC DOC_TBA.\n * @param {vec3} eyeOffset DOC_TBA.\n *\n * @returns {vec4} DOC_TBA.\n */\nvec4 czm_eyeOffset(vec4 positionEC, vec3 eyeOffset)\n{\n // This equation is approximate in x and y.\n vec4 p = positionEC;\n vec4 zEyeOffset = normalize(p) * eyeOffset.z;\n p.xy += eyeOffset.xy + zEyeOffset.xy;\n p.z += zEyeOffset.z;\n return p;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Transforms a position from eye to window coordinates. The transformation\n * from eye to clip coordinates is done using {@link czm_projection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n *\n * @name czm_eyeToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in eye coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_projection\n * @see czm_viewportTransformation\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n */\nvec4 czm_eyeToWindowCoordinates(vec4 positionEC)\n{\n vec4 q = czm_projection * positionEC; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Approxiamtes atan over the range [0, 1]. Safe to flip output for negative input.\n *\n * Based on Michal Drobot's approximation from ShaderFastLibs, which in turn is based on\n * \"Efficient approximations for the arctangent function,\" Rajan, S. Sichun Wang Inkol, R. Joyal, A., May 2006.\n * Adapted from ShaderFastLibs under MIT License.\n *\n * Chosen for the following characteristics over range [0, 1]:\n * - basically no error at 0 and 1, important for getting around range limit (naive atan2 via atan requires infinite range atan)\n * - no visible artifacts from first-derivative discontinuities, unlike latitude via range-reduced sqrt asin approximations (at equator)\n *\n * The original code is x * (-0.1784 * abs(x) - 0.0663 * x * x + 1.0301);\n * Removed the abs() in here because it isn't needed, the input range is guaranteed as [0, 1] by how we're approximating atan2.\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between 0 and 1 inclusive.\n *\n * @returns {float} Approximation of atan(x)\n */\nfloat czm_fastApproximateAtan(float x) {\n return x * (-0.1784 * x - 0.0663 * x * x + 1.0301);\n}\n\n/**\n * Approximation of atan2.\n *\n * Range reduction math based on nvidia's cg reference implementation for atan2: http://developer.download.nvidia.com/cg/atan2.html\n * However, we replaced their atan curve with Michael Drobot's (see above).\n *\n * @name czm_fastApproximateAtan\n * @glslFunction\n *\n * @param {float} x Value between -1 and 1 inclusive.\n * @param {float} y Value between -1 and 1 inclusive.\n *\n * @returns {float} Approximation of atan2(x, y)\n */\nfloat czm_fastApproximateAtan(float x, float y) {\n // atan approximations are usually only reliable over [-1, 1], or, in our case, [0, 1] due to modifications.\n // So range-reduce using abs and by flipping whether x or y is on top.\n float t = abs(x); // t used as swap and atan result.\n float opposite = abs(y);\n float adjacent = max(t, opposite);\n opposite = min(t, opposite);\n\n t = czm_fastApproximateAtan(opposite / adjacent);\n\n // Undo range reduction\n t = czm_branchFreeTernary(abs(y) > abs(x), czm_piOverTwo - t, t);\n t = czm_branchFreeTernary(x < 0.0, czm_pi - t, t);\n t = czm_branchFreeTernary(y < 0.0, -t, t);\n return t;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-(scalar * scalar));\n return mix(color, fogColor, fog);\n}\n\n/**\n * Gets the color with fog at a distance from the camera.\n *\n * @name czm_fog\n * @glslFunction\n *\n * @param {float} distanceToCamera The distance to the camera in meters.\n * @param {vec3} color The original color.\n * @param {vec3} fogColor The color of the fog.\n * @param {float} fogModifierConstant A constant to modify the appearance of fog.\n *\n * @returns {vec3} The color adjusted for fog at the distance from the camera.\n */\nvec3 czm_fog(float distanceToCamera, vec3 color, vec3 fogColor, float fogModifierConstant)\n{\n float scalar = distanceToCamera * czm_fogDensity;\n float fog = 1.0 - exp(-((fogModifierConstant * scalar + fogModifierConstant) * (scalar * (1.0 + fogModifierConstant))));\n return mix(color, fogColor, fog);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts a color from RGB space to linear space.\n *\n * @name czm_gammaCorrect\n * @glslFunction\n *\n * @param {vec3} color The color in RGB space.\n * @returns {vec3} The color in linear space.\n */\nvec3 czm_gammaCorrect(vec3 color) {\n#ifdef HDR\n color = pow(color, vec3(czm_gamma));\n#endif\n return color;\n}\n\nvec4 czm_gammaCorrect(vec4 color) {\n#ifdef HDR\n color.rgb = pow(color.rgb, vec3(czm_gamma));\n#endif\n return color;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_geodeticSurfaceNormal\n * @glslFunction\n *\n * @param {vec3} positionOnEllipsoid DOC_TBA\n * @param {vec3} ellipsoidCenter DOC_TBA\n * @param {vec3} oneOverEllipsoidRadiiSquared DOC_TBA\n * \n * @returns {vec3} DOC_TBA.\n */\nvec3 czm_geodeticSurfaceNormal(vec3 positionOnEllipsoid, vec3 ellipsoidCenter, vec3 oneOverEllipsoidRadiiSquared)\n{\n return normalize((positionOnEllipsoid - ellipsoidCenter) * oneOverEllipsoidRadiiSquared);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * An czm_material with default values. Every material's czm_getMaterial\n * should use this default material as a base for the material it returns.\n * The default normal value is given by materialInput.normalEC.\n *\n * @name czm_getDefaultMaterial\n * @glslFunction\n *\n * @param {czm_materialInput} input The input used to construct the default material.\n *\n * @returns {czm_material} The default material.\n *\n * @see czm_materialInput\n * @see czm_material\n * @see czm_getMaterial\n */\nczm_material czm_getDefaultMaterial(czm_materialInput materialInput)\n{\n czm_material material;\n material.diffuse = vec3(0.0);\n material.specular = 0.0;\n material.shininess = 1.0;\n material.normal = materialInput.normalEC;\n material.emission = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Calculates the intensity of diffusely reflected light.\n *\n * @name czm_getLambertDiffuse\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n *\n * @returns {float} The intensity of the diffuse reflection.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getLambertDiffuse(vec3 lightDirectionEC, vec3 normalEC)\n{\n return max(dot(lightDirectionEC, normalEC), 0.0);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Calculates the specular intensity of reflected light.\n *\n * @name czm_getSpecular\n * @glslFunction\n *\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} toEyeEC Unit vector pointing to the eye position in eye coordinates.\n * @param {vec3} normalEC The surface normal in eye coordinates.\n * @param {float} shininess The sharpness of the specular reflection. Higher values create a smaller, more focused specular highlight.\n *\n * @returns {float} The intensity of the specular highlight.\n *\n * @see czm_phong\n *\n * @example\n * float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);\n * float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);\n * vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);\n */\nfloat czm_getSpecular(vec3 lightDirectionEC, vec3 toEyeEC, vec3 normalEC, float shininess)\n{\n vec3 toReflectedLight = reflect(-lightDirectionEC, normalEC);\n float specular = max(dot(toReflectedLight, toEyeEC), 0.0);\n\n // pow has undefined behavior if both parameters <= 0.\n // Prevent this by making sure shininess is at least czm_epsilon2.\n return pow(specular, max(shininess, czm_epsilon2));\n}\n"},function(e,t,i){"use strict";t.a="/**\n * @private\n */\nvec4 czm_getWaterNoise(sampler2D normalMap, vec2 uv, float time, float angleInRadians)\n{\n float cosAngle = cos(angleInRadians);\n float sinAngle = sin(angleInRadians);\n\n // time dependent sampling directions\n vec2 s0 = vec2(1.0/17.0, 0.0);\n vec2 s1 = vec2(-1.0/29.0, 0.0);\n vec2 s2 = vec2(1.0/101.0, 1.0/59.0);\n vec2 s3 = vec2(-1.0/109.0, -1.0/57.0);\n\n // rotate sampling direction by specified angle\n s0 = vec2((cosAngle * s0.x) - (sinAngle * s0.y), (sinAngle * s0.x) + (cosAngle * s0.y));\n s1 = vec2((cosAngle * s1.x) - (sinAngle * s1.y), (sinAngle * s1.x) + (cosAngle * s1.y));\n s2 = vec2((cosAngle * s2.x) - (sinAngle * s2.y), (sinAngle * s2.x) + (cosAngle * s2.y));\n s3 = vec2((cosAngle * s3.x) - (sinAngle * s3.y), (sinAngle * s3.x) + (cosAngle * s3.y));\n\n vec2 uv0 = (uv/103.0) + (time * s0);\n vec2 uv1 = uv/107.0 + (time * s1) + vec2(0.23);\n vec2 uv2 = uv/vec2(897.0, 983.0) + (time * s2) + vec2(0.51);\n vec2 uv3 = uv/vec2(991.0, 877.0) + (time * s3) + vec2(0.71);\n\n uv0 = fract(uv0);\n uv1 = fract(uv1);\n uv2 = fract(uv2);\n uv3 = fract(uv3);\n vec4 noise = (texture2D(normalMap, uv0)) +\n (texture2D(normalMap, uv1)) +\n (texture2D(normalMap, uv2)) +\n (texture2D(normalMap, uv3));\n\n // average and scale to between -1 and 1\n return ((noise / 4.0) - 0.5) * 2.0;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Adjusts the hue of a color.\n * \n * @name czm_hue\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the hue of the color in radians.\n *\n * @returns {float} The color with the hue adjusted.\n *\n * @example\n * vec3 adjustHue = czm_hue(color, czm_pi); // The same as czm_hue(color, -czm_pi)\n */\nvec3 czm_hue(vec3 rgb, float adjustment)\n{\n const mat3 toYIQ = mat3(0.299, 0.587, 0.114,\n 0.595716, -0.274453, -0.321263,\n 0.211456, -0.522591, 0.311135);\n const mat3 toRGB = mat3(1.0, 0.9563, 0.6210,\n 1.0, -0.2721, -0.6474,\n 1.0, -1.107, 1.7046);\n \n vec3 yiq = toYIQ * rgb;\n float hue = atan(yiq.z, yiq.y) + adjustment;\n float chroma = sqrt(yiq.z * yiq.z + yiq.y * yiq.y);\n \n vec3 color = vec3(yiq.x, chroma * cos(hue), chroma * sin(hue));\n return toRGB * color;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Converts a color in linear space to RGB space.\n *\n * @name czm_inverseGamma\n * @glslFunction\n *\n * @param {vec3} color The color in linear space.\n * @returns {vec3} The color in RGB space.\n */\nvec3 czm_inverseGamma(vec3 color) {\n return pow(color, vec3(1.0 / czm_gamma));\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isEmpty\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isEmpty(czm_raySegment interval)\n{\n return (interval.stop < 0.0);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Determines if a time interval is empty.\n *\n * @name czm_isFull\n * @glslFunction \n * \n * @param {czm_raySegment} interval The interval to test.\n * \n * @returns {bool} <code>true</code> if the time interval is empty; otherwise, <code>false</code>.\n *\n * @example\n * bool b0 = czm_isEmpty(czm_emptyRaySegment); // true\n * bool b1 = czm_isEmpty(czm_raySegment(0.0, 1.0)); // false\n * bool b2 = czm_isEmpty(czm_raySegment(1.0, 1.0)); // false, contains 1.0.\n */\nbool czm_isFull(czm_raySegment interval)\n{\n return (interval.start == 0.0 && interval.stop == czm_infinity);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes the fraction of a Web Wercator rectangle at which a given geodetic latitude is located.\n *\n * @name czm_latitudeToWebMercatorFraction\n * @glslFunction\n *\n * @param {float} latitude The geodetic latitude, in radians.\n * @param {float} southMercatorY The Web Mercator coordinate of the southern boundary of the rectangle.\n * @param {float} oneOverMercatorHeight The total height of the rectangle in Web Mercator coordinates.\n *\n * @returns {float} The fraction of the rectangle at which the latitude occurs. If the latitude is the southern\n * boundary of the rectangle, the return value will be zero. If it is the northern boundary, the return\n * value will be 1.0. Latitudes in between are mapped according to the Web Mercator projection.\n */ \nfloat czm_latitudeToWebMercatorFraction(float latitude, float southMercatorY, float oneOverMercatorHeight)\n{\n float sinLatitude = sin(latitude);\n float mercatorY = 0.5 * log((1.0 + sinLatitude) / (1.0 - sinLatitude));\n \n return (mercatorY - southMercatorY) * oneOverMercatorHeight;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes distance from an point in 2D to a line in 2D.\n *\n * @name czm_lineDistance\n * @glslFunction\n *\n * param {vec2} point1 A point along the line.\n * param {vec2} point2 A point along the line.\n * param {vec2} point A point that may or may not be on the line.\n * returns {float} The distance from the point to the line.\n */\nfloat czm_lineDistance(vec2 point1, vec2 point2, vec2 point) {\n return abs((point2.y - point1.y) * point.x - (point2.x - point1.x) * point.y + point2.x * point1.y - point2.y * point1.x) / distance(point2, point1);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes the luminance of a color. \n *\n * @name czm_luminance\n * @glslFunction\n *\n * @param {vec3} rgb The color.\n * \n * @returns {float} The luminance.\n *\n * @example\n * float light = czm_luminance(vec3(0.0)); // 0.0\n * float dark = czm_luminance(vec3(1.0)); // ~1.0 \n */\nfloat czm_luminance(vec3 rgb)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n return dot(rgb, W);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when passing in a custom pixel ratio. For example, passing in 1.0 will return meters per native device pixel.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n * @param {float} pixelRatio The scaling factor from pixel space to coordinate space\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC, float pixelRatio)\n{\n float width = czm_viewport.z;\n float height = czm_viewport.w;\n float pixelWidth;\n float pixelHeight;\n\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n if (czm_sceneMode == czm_sceneMode2D || czm_orthographicIn3D == 1.0)\n {\n float frustumWidth = right - left;\n float frustumHeight = top - bottom;\n pixelWidth = frustumWidth / width;\n pixelHeight = frustumHeight / height;\n }\n else\n {\n float distanceToPixel = -positionEC.z;\n float inverseNear = 1.0 / czm_currentFrustum.x;\n float tanTheta = top * inverseNear;\n pixelHeight = 2.0 * distanceToPixel * tanTheta / height;\n tanTheta = right * inverseNear;\n pixelWidth = 2.0 * distanceToPixel * tanTheta / width;\n }\n\n return max(pixelWidth, pixelHeight) * pixelRatio;\n}\n\n/**\n * Computes the size of a pixel in meters at a distance from the eye.\n * <p>\n * Use this version when scaling by pixel ratio.\n * </p>\n * @name czm_metersPerPixel\n * @glslFunction\n *\n * @param {vec3} positionEC The position to get the meters per pixel in eye coordinates.\n *\n * @returns {float} The meters per pixel at positionEC.\n */\nfloat czm_metersPerPixel(vec4 positionEC)\n{\n return czm_metersPerPixel(positionEC, czm_pixelRatio);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Transforms a position from model to window coordinates. The transformation\n * from model to clip coordinates is done using {@link czm_modelViewProjection}.\n * The transform from normalized device coordinates to window coordinates is\n * done using {@link czm_viewportTransformation}, which assumes a depth range\n * of <code>near = 0</code> and <code>far = 1</code>.\n * <br /><br />\n * This transform is useful when there is a need to manipulate window coordinates\n * in a vertex shader as done by {@link BillboardCollection}.\n * <br /><br />\n * This function should not be confused with {@link czm_viewportOrthographic},\n * which is an orthographic projection matrix that transforms from window \n * coordinates to clip coordinates.\n *\n * @name czm_modelToWindowCoordinates\n * @glslFunction\n *\n * @param {vec4} position The position in model coordinates to transform.\n *\n * @returns {vec4} The transformed position in window coordinates.\n *\n * @see czm_eyeToWindowCoordinates\n * @see czm_modelViewProjection\n * @see czm_viewportTransformation\n * @see czm_viewportOrthographic\n * @see BillboardCollection\n *\n * @example\n * vec4 positionWC = czm_modelToWindowCoordinates(positionMC);\n */\nvec4 czm_modelToWindowCoordinates(vec4 position)\n{\n vec4 q = czm_modelViewProjection * position; // clip coordinates\n q.xyz /= q.w; // normalized device coordinates\n q.xyz = (czm_viewportTransformation * vec4(q.xyz, 1.0)).xyz; // window coordinates\n return q;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_multiplyWithColorBalance\n * @glslFunction\n */\nvec3 czm_multiplyWithColorBalance(vec3 left, vec3 right)\n{\n // Algorithm from Chapter 10 of Graphics Shaders.\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n \n vec3 target = left * right;\n float leftLuminance = dot(left, W);\n float rightLuminance = dot(right, W);\n float targetLuminance = dot(target, W);\n \n return ((leftLuminance + rightLuminance) / (2.0 * targetLuminance)) * target;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes a value that scales with distance. The scaling is clamped at the near and\n * far distances, and does not extrapolate. This function works with the\n * {@link NearFarScalar} JavaScript class.\n *\n * @name czm_nearFarScalar\n * @glslFunction\n *\n * @param {vec4} nearFarScalar A vector with 4 components: Near distance (x), Near value (y), Far distance (z), Far value (w).\n * @param {float} cameraDistSq The square of the current distance from the camera.\n *\n * @returns {float} The value at this distance.\n */\nfloat czm_nearFarScalar(vec4 nearFarScalar, float cameraDistSq)\n{\n float valueAtMin = nearFarScalar.y;\n float valueAtMax = nearFarScalar.w;\n float nearDistanceSq = nearFarScalar.x * nearFarScalar.x;\n float farDistanceSq = nearFarScalar.z * nearFarScalar.z;\n\n float t = (cameraDistSq - nearDistanceSq) / (farDistanceSq - nearDistanceSq);\n\n t = pow(clamp(t, 0.0, 1.0), 0.2);\n\n return mix(valueAtMin, valueAtMax, t);\n}\n"},function(e,t,i){"use strict";t.a=" /**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @param {float} range The maximum value of the SNORM range. The encoded vector is stored in log2(rangeMax+1) bits.\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded, float range)\n {\n if (encoded.x == 0.0 && encoded.y == 0.0) {\n return vec3(0.0, 0.0, 0.0);\n }\n\n encoded = encoded / range * 2.0 - 1.0;\n vec3 v = vec3(encoded.x, encoded.y, 1.0 - abs(encoded.x) - abs(encoded.y));\n if (v.z < 0.0)\n {\n v.xy = (1.0 - abs(v.yx)) * czm_signNotZero(v.xy);\n }\n\n return normalize(v);\n }\n\n/**\n * Decodes a unit-length vector in 'oct' encoding to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(vec2 encoded)\n {\n return czm_octDecode(encoded, 255.0);\n }\n\n /**\n * Decodes a unit-length vector in 'oct' encoding packed into a floating-point number to a normalized 3-component Cartesian vector.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {float} encoded The oct-encoded, unit-length vector\n * @returns {vec3} The decoded and normalized vector\n */\n vec3 czm_octDecode(float encoded)\n {\n float temp = encoded / 256.0;\n float x = floor(temp);\n float y = (temp - x) * 256.0;\n return czm_octDecode(vec2(x, y));\n }\n\n/**\n * Decodes three unit-length vectors in 'oct' encoding packed into two floating-point numbers to normalized 3-component Cartesian vectors.\n * The 'oct' encoding is described in \"A Survey of Efficient Representations of Independent Unit Vectors\",\n * Cigolle et al 2014: http://jcgt.org/published/0003/02/01/\n *\n * @name czm_octDecode\n * @param {vec2} encoded The packed oct-encoded, unit-length vectors.\n * @param {vec3} vector1 One decoded and normalized vector.\n * @param {vec3} vector2 One decoded and normalized vector.\n * @param {vec3} vector3 One decoded and normalized vector.\n */\n void czm_octDecode(vec2 encoded, out vec3 vector1, out vec3 vector2, out vec3 vector3)\n {\n float temp = encoded.x / 65536.0;\n float x = floor(temp);\n float encodedFloat1 = (temp - x) * 65536.0;\n\n temp = encoded.y / 65536.0;\n float y = floor(temp);\n float encodedFloat2 = (temp - y) * 65536.0;\n\n vector1 = czm_octDecode(encodedFloat1);\n vector2 = czm_octDecode(encodedFloat2);\n vector3 = czm_octDecode(vec2(x, y));\n }\n\n"},function(e,t,i){"use strict";t.a="/**\n * Packs a depth value into a vec3 that can be represented by unsigned bytes.\n *\n * @name czm_packDepth\n * @glslFunction\n *\n * @param {float} depth The floating-point depth.\n * @returns {vec3} The packed depth.\n */\nvec4 czm_packDepth(float depth)\n{\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n vec4 enc = vec4(1.0, 255.0, 65025.0, 16581375.0) * depth;\n enc = fract(enc);\n enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n return enc;\n}\n"},function(e,t,i){"use strict";t.a="vec3 lambertianDiffuse(vec3 diffuseColor)\n{\n return diffuseColor / czm_pi;\n}\n\nvec3 fresnelSchlick2(vec3 f0, vec3 f90, float VdotH)\n{\n return f0 + (f90 - f0) * pow(clamp(1.0 - VdotH, 0.0, 1.0), 5.0);\n}\n\nfloat smithVisibilityG1(float NdotV, float roughness)\n{\n // this is the k value for direct lighting.\n // for image based lighting it will be roughness^2 / 2\n float k = (roughness + 1.0) * (roughness + 1.0) / 8.0;\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat smithVisibilityGGX(float roughness, float NdotL, float NdotV)\n{\n return (\n smithVisibilityG1(NdotL, roughness) *\n smithVisibilityG1(NdotV, roughness)\n );\n}\n\nfloat GGX(float roughness, float NdotH)\n{\n float roughnessSquared = roughness * roughness;\n float f = (NdotH * roughnessSquared - NdotH) * NdotH + 1.0;\n return roughnessSquared / (czm_pi * f * f);\n}\n\n/**\n * Compute the diffuse and specular contributions using physically based\n * rendering. This function only handles direct lighting.\n * <p>\n * This function only handles the lighting calculations. Metallic/roughness\n * and specular/glossy must be handled separately. See {@czm_pbrMetallicRoughnessMaterial}, {@czm_pbrSpecularGlossinessMaterial} and {@czm_defaultPbrMaterial}\n * </p>\n *\n * @name czm_pbrlighting\n * @glslFunction\n *\n * @param {vec3} positionEC The position of the fragment in eye coordinates\n * @param {vec3} normalEC The surface normal in eye coordinates\n * @param {vec3} lightDirectionEC Unit vector pointing to the light source in eye coordinates.\n * @param {vec3} lightColorHdr radiance of the light source. This is a HDR value.\n * @param {czm_pbrParameters} The computed PBR parameters.\n * @return {vec3} The computed HDR color\n *\n * @example\n * czm_pbrParameters pbrParameters = czm_pbrMetallicRoughnessMaterial(\n * baseColor,\n * metallic,\n * roughness\n * );\n * vec3 color = czm_pbrlighting(\n * positionEC,\n * normalEC,\n * lightDirectionEC,\n * lightColorHdr,\n * pbrParameters);\n */\nvec3 czm_pbrLighting(\n vec3 positionEC,\n vec3 normalEC,\n vec3 lightDirectionEC,\n vec3 lightColorHdr,\n czm_pbrParameters pbrParameters\n)\n{\n vec3 v = -normalize(positionEC);\n vec3 l = normalize(lightDirectionEC);\n vec3 h = normalize(v + l);\n vec3 n = normalEC;\n float NdotL = clamp(dot(n, l), 0.001, 1.0);\n float NdotV = abs(dot(n, v)) + 0.001;\n float NdotH = clamp(dot(n, h), 0.0, 1.0);\n float LdotH = clamp(dot(l, h), 0.0, 1.0);\n float VdotH = clamp(dot(v, h), 0.0, 1.0);\n\n vec3 f0 = pbrParameters.f0;\n float reflectance = max(max(f0.r, f0.g), f0.b);\n vec3 f90 = vec3(clamp(reflectance * 25.0, 0.0, 1.0));\n vec3 F = fresnelSchlick2(f0, f90, VdotH);\n\n float alpha = pbrParameters.roughness;\n float G = smithVisibilityGGX(alpha, NdotL, NdotV);\n float D = GGX(alpha, NdotH);\n vec3 specularContribution = F * G * D / (4.0 * NdotL * NdotV);\n\n vec3 diffuseColor = pbrParameters.diffuseColor;\n // F here represents the specular contribution\n vec3 diffuseContribution = (1.0 - F) * lambertianDiffuse(diffuseColor);\n\n // Lo = (diffuse + specular) * Li * NdotL\n return (diffuseContribution + specularContribution) * NdotL * lightColorHdr;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Compute parameters for physically based rendering using the\n * metallic/roughness workflow. All inputs are linear; sRGB texture values must\n * be decoded beforehand\n *\n * @name czm_pbrMetallicRoughnessMaterial\n * @glslFunction\n *\n * @param {vec3} baseColor For dielectrics, this is the base color. For metals, this is the f0 value (reflectance at normal incidence)\n * @param {float} metallic 0.0 indicates dielectric. 1.0 indicates metal. Values in between are allowed (e.g. to model rust or dirt);\n * @param {float} roughness A value between 0.0 and 1.0\n * @return {czm_pbrParameters} parameters to pass into {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_pbrMetallicRoughnessMaterial(\n vec3 baseColor,\n float metallic,\n float roughness\n) \n{\n czm_pbrParameters results;\n\n // roughness is authored as perceptual roughness\n // square it to get material roughness\n roughness = clamp(roughness, 0.0, 1.0);\n results.roughness = roughness * roughness;\n\n // dielectrics us f0 = 0.04, metals use albedo as f0\n metallic = clamp(metallic, 0.0, 1.0);\n const vec3 REFLECTANCE_DIELECTRIC = vec3(0.04);\n vec3 f0 = mix(REFLECTANCE_DIELECTRIC, baseColor, metallic);\n results.f0 = f0;\n\n // diffuse only applies to dielectrics.\n results.diffuseColor = baseColor * (1.0 - f0) * (1.0 - metallic);\n\n return results;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Compute parameters for physically based rendering using the\n * specular/glossy workflow. All inputs are linear; sRGB texture values must\n * be decoded beforehand\n *\n * @name czm_pbrSpecularGlossinessMaterial\n * @glslFunction\n *\n * @param {vec3} diffuse The diffuse color for dielectrics (non-metals)\n * @param {vec3} specular The reflectance at normal incidence (f0)\n * @param {float} glossiness A number from 0.0 to 1.0 indicating how smooth the surface is.\n * @return {czm_pbrParameters} parameters to pass into {@link czm_pbrLighting}\n */\nczm_pbrParameters czm_pbrSpecularGlossinessMaterial(\n vec3 diffuse,\n vec3 specular,\n float glossiness\n) \n{\n czm_pbrParameters results;\n\n // glossiness is the opposite of roughness, but easier for artists to use.\n float roughness = 1.0 - glossiness;\n results.roughness = roughness * roughness;\n\n results.diffuseColor = diffuse * (1.0 - max(max(specular.r, specular.g), specular.b));\n results.f0 = specular;\n\n return results;\n}\n"},function(e,t,i){"use strict";t.a="float czm_private_getLambertDiffuseOfMaterial(vec3 lightDirectionEC, czm_material material)\n{\n return czm_getLambertDiffuse(lightDirectionEC, material.normal);\n}\n\nfloat czm_private_getSpecularOfMaterial(vec3 lightDirectionEC, vec3 toEyeEC, czm_material material)\n{\n return czm_getSpecular(lightDirectionEC, toEyeEC, material.normal, material.shininess);\n}\n\n/**\n * Computes a color using the Phong lighting model.\n *\n * @name czm_phong\n * @glslFunction\n *\n * @param {vec3} toEye A normalized vector from the fragment to the eye in eye coordinates.\n * @param {czm_material} material The fragment's material.\n *\n * @returns {vec4} The computed color.\n *\n * @example\n * vec3 positionToEyeEC = // ...\n * czm_material material = // ...\n * vec3 lightDirectionEC = // ...\n * gl_FragColor = czm_phong(normalize(positionToEyeEC), material, lightDirectionEC);\n *\n * @see czm_getMaterial\n */\nvec4 czm_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down)\n float diffuse = czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 0.0, 1.0), material);\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_private_getLambertDiffuseOfMaterial(vec3(0.0, 1.0, 0.0), material);\n }\n\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n\nvec4 czm_private_phong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n float diffuse = czm_private_getLambertDiffuseOfMaterial(lightDirectionEC, material);\n float specular = czm_private_getSpecularOfMaterial(lightDirectionEC, toEye, material);\n\n vec3 ambient = vec3(0.0);\n vec3 color = ambient + material.emission;\n color += material.diffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec4} plane A Plane in Hessian Normal Form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec4 plane, vec3 point) {\n return (dot(plane.xyz, point) + plane.w);\n}\n\n/**\n * Computes distance from a point to a plane.\n *\n * @name czm_planeDistance\n * @glslFunction\n *\n * param {vec3} planeNormal Normal for a plane in Hessian Normal Form. See Plane.js\n * param {float} planeDistance Distance for a plane in Hessian Normal form. See Plane.js\n * param {vec3} point A point in the same space as the plane.\n * returns {float} The distance from the point to the plane.\n */\nfloat czm_planeDistance(vec3 planeNormal, float planeDistance, vec3 point) {\n return (dot(planeNormal, point) + planeDistance);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes the point along a ray at the given time. <code>time</code> can be positive, negative, or zero.\n *\n * @name czm_pointAlongRay\n * @glslFunction\n *\n * @param {czm_ray} ray The ray to compute the point along.\n * @param {float} time The time along the ray.\n * \n * @returns {vec3} The point along the ray at the given time.\n * \n * @example\n * czm_ray ray = czm_ray(vec3(0.0), vec3(1.0, 0.0, 0.0)); // origin, direction\n * vec3 v = czm_pointAlongRay(ray, 2.0); // (2.0, 0.0, 0.0)\n */\nvec3 czm_pointAlongRay(czm_ray ray, float time)\n{\n return ray.origin + (time * ray.direction);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * DOC_TBA\n *\n * @name czm_rayEllipsoidIntersectionInterval\n * @glslFunction\n */\nczm_raySegment czm_rayEllipsoidIntersectionInterval(czm_ray ray, vec3 ellipsoid_center, vec3 ellipsoid_inverseRadii)\n{\n // ray and ellipsoid center in eye coordinates. radii in model coordinates.\n vec3 q = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.origin, 1.0)).xyz;\n vec3 w = ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ray.direction, 0.0)).xyz;\n\n q = q - ellipsoid_inverseRadii * (czm_inverseModelView * vec4(ellipsoid_center, 1.0)).xyz;\n\n float q2 = dot(q, q);\n float qw = dot(q, w);\n\n if (q2 > 1.0) // Outside ellipsoid.\n {\n if (qw >= 0.0) // Looking outward or tangent (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else // qw < 0.0.\n {\n float qw2 = qw * qw;\n float difference = q2 - 1.0; // Positively valued.\n float w2 = dot(w, w);\n float product = w2 * difference;\n\n if (qw2 < product) // Imaginary roots (0 intersections).\n {\n return czm_emptyRaySegment;\n }\n else if (qw2 > product) // Distinct roots (2 intersections).\n {\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Avoid cancellation.\n float root0 = temp / w2;\n float root1 = difference / temp;\n if (root0 < root1)\n {\n czm_raySegment i = czm_raySegment(root0, root1);\n return i;\n }\n else\n {\n czm_raySegment i = czm_raySegment(root1, root0);\n return i;\n }\n }\n else // qw2 == product. Repeated roots (2 intersections).\n {\n float root = sqrt(difference / w2);\n czm_raySegment i = czm_raySegment(root, root);\n return i;\n }\n }\n }\n else if (q2 < 1.0) // Inside ellipsoid (2 intersections).\n {\n float difference = q2 - 1.0; // Negatively valued.\n float w2 = dot(w, w);\n float product = w2 * difference; // Negatively valued.\n float discriminant = qw * qw - product;\n float temp = -qw + sqrt(discriminant); // Positively valued.\n czm_raySegment i = czm_raySegment(0.0, temp / w2);\n return i;\n }\n else // q2 == 1.0. On ellipsoid.\n {\n if (qw < 0.0) // Looking inward.\n {\n float w2 = dot(w, w);\n czm_raySegment i = czm_raySegment(0.0, -qw / w2);\n return i;\n }\n else // qw >= 0.0. Looking outward or tangent.\n {\n return czm_emptyRaySegment;\n }\n }\n}\n"},function(e,t,i){"use strict";t.a="float czm_readDepth(sampler2D depthTexture, vec2 texCoords)\n{\n return czm_reverseLogDepth(texture2D(depthTexture, texCoords).r);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Reads a value previously transformed with {@link czm_writeNonPerspective}\n * by dividing it by `w`, the value used in the perspective divide.\n * This function is intended to be called in a fragment shader to access a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The value should have been\n * previously written in the vertex shader with a call to\n * {@link czm_writeNonPerspective}.\n *\n * @name czm_readNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The non-perspective value to be read.\n * @param {float} oneOverW One over the perspective divide value, `w`. Usually this is simply `gl_FragCoord.w`.\n * @returns {float|vec2|vec3|vec4} The usable value.\n */\nfloat czm_readNonPerspective(float value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec2 czm_readNonPerspective(vec2 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec3 czm_readNonPerspective(vec3 value, float oneOverW) {\n return value * oneOverW;\n}\n\nvec4 czm_readNonPerspective(vec4 value, float oneOverW) {\n return value * oneOverW;\n}\n"},function(e,t,i){"use strict";t.a="float czm_reverseLogDepth(float logZ)\n{\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = logZ * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n return far * (1.0 - near / (depthFromNear + near)) / (far - near);\n#endif\n return logZ;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Samples the 4 neighboring pixels and return the weighted average.\n *\n * @private\n */\nvec3 czm_sampleOctahedralProjectionWithFiltering(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod)\n{\n direction /= dot(vec3(1.0), abs(direction));\n vec2 rev = abs(direction.zx) - vec2(1.0);\n vec2 neg = vec2(direction.x < 0.0 ? rev.x : -rev.x,\n direction.z < 0.0 ? rev.y : -rev.y);\n vec2 uv = direction.y < 0.0 ? neg : direction.xz;\n vec2 coord = 0.5 * uv + vec2(0.5);\n vec2 pixel = 1.0 / textureSize;\n\n if (lod > 0.0)\n {\n // Each subseqeuent mip level is half the size\n float scale = 1.0 / pow(2.0, lod);\n float offset = ((textureSize.y + 1.0) / textureSize.x);\n\n coord.x *= offset;\n coord *= scale;\n\n coord.x += offset + pixel.x;\n coord.y += (1.0 - (1.0 / pow(2.0, lod - 1.0))) + pixel.y * (lod - 1.0) * 2.0;\n }\n else\n {\n coord.x *= (textureSize.y / textureSize.x);\n }\n\n // Do bilinear filtering\n #ifndef OES_texture_float_linear\n vec3 color1 = texture2D(projectedMap, coord + vec2(0.0, pixel.y)).rgb;\n vec3 color2 = texture2D(projectedMap, coord + vec2(pixel.x, 0.0)).rgb;\n vec3 color3 = texture2D(projectedMap, coord + pixel).rgb;\n vec3 color4 = texture2D(projectedMap, coord).rgb;\n\n vec2 texturePosition = coord * textureSize;\n\n float fu = fract(texturePosition.x);\n float fv = fract(texturePosition.y);\n\n vec3 average1 = mix(color4, color2, fu);\n vec3 average2 = mix(color1, color3, fu);\n\n vec3 color = mix(average1, average2, fv);\n #else\n vec3 color = texture2D(projectedMap, coord).rgb;\n #endif\n\n return color;\n}\n\n\n/**\n * Samples from a cube map that has been projected using an octahedral projection from the given direction.\n *\n * @name czm_sampleOctahedralProjection\n * @glslFunction\n *\n * @param {sampler2D} projectedMap The texture with the octahedral projected cube map.\n * @param {vec2} textureSize The width and height dimensions in pixels of the projected map.\n * @param {vec3} direction The normalized direction used to sample the cube map.\n * @param {float} lod The level of detail to sample.\n * @param {float} maxLod The maximum level of detail.\n * @returns {vec3} The color of the cube map at the direction.\n */\nvec3 czm_sampleOctahedralProjection(sampler2D projectedMap, vec2 textureSize, vec3 direction, float lod, float maxLod) {\n float currentLod = floor(lod + 0.5);\n float nextLod = min(currentLod + 1.0, maxLod);\n\n vec3 colorCurrentLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, currentLod);\n vec3 colorNextLod = czm_sampleOctahedralProjectionWithFiltering(projectedMap, textureSize, direction, nextLod);\n\n return mix(colorNextLod, colorCurrentLod, nextLod - lod);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Adjusts the saturation of a color.\n * \n * @name czm_saturation\n * @glslFunction\n * \n * @param {vec3} rgb The color.\n * @param {float} adjustment The amount to adjust the saturation of the color.\n *\n * @returns {float} The color with the saturation adjusted.\n *\n * @example\n * vec3 greyScale = czm_saturation(color, 0.0);\n * vec3 doubleSaturation = czm_saturation(color, 2.0);\n */\nvec3 czm_saturation(vec3 rgb, float adjustment)\n{\n // Algorithm from Chapter 16 of OpenGL Shading Language\n const vec3 W = vec3(0.2125, 0.7154, 0.0721);\n vec3 intensity = vec3(dot(rgb, W));\n return mix(intensity, rgb, adjustment);\n}\n"},function(e,t,i){"use strict";t.a="\nfloat czm_sampleShadowMap(highp samplerCube shadowMap, vec3 d)\n{\n return czm_unpackDepth(textureCube(shadowMap, d));\n}\n\nfloat czm_sampleShadowMap(highp sampler2D shadowMap, vec2 uv)\n{\n#ifdef USE_SHADOW_DEPTH_TEXTURE\n return texture2D(shadowMap, uv).r;\n#else\n return czm_unpackDepth(texture2D(shadowMap, uv));\n#endif\n}\n\nfloat czm_shadowDepthCompare(samplerCube shadowMap, vec3 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n\nfloat czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth)\n{\n return step(depth, czm_sampleShadowMap(shadowMap, uv));\n}\n"},function(e,t,i){"use strict";t.a="\nfloat czm_private_shadowVisibility(float visibility, float nDotL, float normalShadingSmooth, float darkness)\n{\n#ifdef USE_NORMAL_SHADING\n#ifdef USE_NORMAL_SHADING_SMOOTH\n float strength = clamp(nDotL / normalShadingSmooth, 0.0, 1.0);\n#else\n float strength = step(0.0, nDotL);\n#endif\n visibility *= strength;\n#endif\n\n visibility = max(visibility, darkness);\n return visibility;\n}\n\n#ifdef USE_CUBE_MAP_SHADOW\nfloat czm_shadowVisibility(samplerCube shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec3 uvw = shadowParameters.texCoords;\n\n depth -= depthBias;\n float visibility = czm_shadowDepthCompare(shadowMap, uvw, depth);\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#else\nfloat czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters)\n{\n float depthBias = shadowParameters.depthBias;\n float depth = shadowParameters.depth;\n float nDotL = shadowParameters.nDotL;\n float normalShadingSmooth = shadowParameters.normalShadingSmooth;\n float darkness = shadowParameters.darkness;\n vec2 uv = shadowParameters.texCoords;\n\n depth -= depthBias;\n#ifdef USE_SOFT_SHADOWS\n vec2 texelStepSize = shadowParameters.texelStepSize;\n float radius = 1.0;\n float dx0 = -texelStepSize.x * radius;\n float dy0 = -texelStepSize.y * radius;\n float dx1 = texelStepSize.x * radius;\n float dy1 = texelStepSize.y * radius;\n float visibility = (\n czm_shadowDepthCompare(shadowMap, uv, depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\n czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\n ) * (1.0 / 9.0);\n#else\n float visibility = czm_shadowDepthCompare(shadowMap, uv, depth);\n#endif\n\n return czm_private_shadowVisibility(visibility, nDotL, normalShadingSmooth, darkness);\n}\n#endif\n"},function(e,t,i){"use strict";t.a="/**\n * Returns 1.0 if the given value is positive or zero, and -1.0 if it is negative. This is similar to the GLSL\n * built-in function <code>sign</code> except that returns 1.0 instead of 0.0 when the input value is 0.0.\n * \n * @name czm_signNotZero\n * @glslFunction\n *\n * @param {} value The value for which to determine the sign.\n * @returns {} 1.0 if the value is positive or zero, -1.0 if the value is negative.\n */\nfloat czm_signNotZero(float value)\n{\n return value >= 0.0 ? 1.0 : -1.0;\n}\n\nvec2 czm_signNotZero(vec2 value)\n{\n return vec2(czm_signNotZero(value.x), czm_signNotZero(value.y));\n}\n\nvec3 czm_signNotZero(vec3 value)\n{\n return vec3(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z));\n}\n\nvec4 czm_signNotZero(vec4 value)\n{\n return vec4(czm_signNotZero(value.x), czm_signNotZero(value.y), czm_signNotZero(value.z), czm_signNotZero(value.w));\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Computes a color from the third order spherical harmonic coefficients and a normalized direction vector.\n * <p>\n * The order of the coefficients is [L00, L1_1, L10, L11, L2_2, L2_1, L20, L21, L22].\n * </p>\n *\n * @name czm_sphericalHarmonics\n * @glslFunction\n *\n * @param {vec3} normal The normalized direction.\n * @param {vec3[9]} coefficients The third order spherical harmonic coefficients.\n * @returns {vec3} The color at the direction.\n *\n * @see https://graphics.stanford.edu/papers/envmap/envmap.pdf\n */\nvec3 czm_sphericalHarmonics(vec3 normal, vec3 coefficients[9])\n{\n vec3 L00 = coefficients[0];\n vec3 L1_1 = coefficients[1];\n vec3 L10 = coefficients[2];\n vec3 L11 = coefficients[3];\n vec3 L2_2 = coefficients[4];\n vec3 L2_1 = coefficients[5];\n vec3 L20 = coefficients[6];\n vec3 L21 = coefficients[7];\n vec3 L22 = coefficients[8];\n\n float x = normal.x;\n float y = normal.y;\n float z = normal.z;\n\n return\n L00\n + L1_1 * y\n + L10 * z\n + L11 * x\n + L2_2 * (y * x)\n + L2_1 * (y * z)\n + L20 * (3.0 * z * z - 1.0)\n + L21 * (z * x)\n + L22 * (x * x - y * y);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Creates a matrix that transforms vectors from tangent space to eye space.\n *\n * @name czm_tangentToEyeSpaceMatrix\n * @glslFunction\n *\n * @param {vec3} normalEC The normal vector in eye coordinates.\n * @param {vec3} tangentEC The tangent vector in eye coordinates.\n * @param {vec3} bitangentEC The bitangent vector in eye coordinates.\n *\n * @returns {mat3} The matrix that transforms from tangent space to eye space.\n *\n * @example\n * mat3 tangentToEye = czm_tangentToEyeSpaceMatrix(normalEC, tangentEC, bitangentEC);\n * vec3 normal = tangentToEye * texture2D(normalMap, st).xyz;\n */\nmat3 czm_tangentToEyeSpaceMatrix(vec3 normalEC, vec3 tangentEC, vec3 bitangentEC)\n{\n vec3 normal = normalize(normalEC);\n vec3 tangent = normalize(tangentEC);\n vec3 bitangent = normalize(bitangentEC);\n return mat3(tangent.x , tangent.y , tangent.z,\n bitangent.x, bitangent.y, bitangent.z,\n normal.x , normal.y , normal.z);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Transforms a plane.\n * \n * @name czm_transformPlane\n * @glslFunction\n *\n * @param {vec4} plane The plane in Hessian Normal Form.\n * @param {mat4} transform The inverse-transpose of a transformation matrix.\n */\nvec4 czm_transformPlane(vec4 plane, mat4 transform) {\n vec4 transformedPlane = transform * plane;\n // Convert the transformed plane to Hessian Normal Form\n float normalMagnitude = length(transformedPlane.xyz);\n return transformedPlane / normalMagnitude;\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Translates a position (or any <code>vec3</code>) that was encoded with {@link EncodedCartesian3},\n * and then provided to the shader as separate <code>high</code> and <code>low</code> bits to\n * be relative to the eye. As shown in the example, the position can then be transformed in eye\n * or clip coordinates using {@link czm_modelViewRelativeToEye} or {@link czm_modelViewProjectionRelativeToEye},\n * respectively.\n * <p>\n * This technique, called GPU RTE, eliminates jittering artifacts when using large coordinates as\n * described in {@link http://help.agi.com/AGIComponents/html/BlogPrecisionsPrecisions.htm|Precisions, Precisions}.\n * </p>\n *\n * @name czm_translateRelativeToEye\n * @glslFunction\n *\n * @param {vec3} high The position's high bits.\n * @param {vec3} low The position's low bits.\n * @returns {vec3} The position translated to be relative to the camera's position.\n *\n * @example\n * attribute vec3 positionHigh;\n * attribute vec3 positionLow;\n *\n * void main()\n * {\n * vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n * gl_Position = czm_modelViewProjectionRelativeToEye * p;\n * }\n *\n * @see czm_modelViewRelativeToEye\n * @see czm_modelViewProjectionRelativeToEye\n * @see czm_computePosition\n * @see EncodedCartesian3\n */\nvec4 czm_translateRelativeToEye(vec3 high, vec3 low)\n{\n vec3 highDifference = high - czm_encodedCameraPositionMCHigh;\n vec3 lowDifference = low - czm_encodedCameraPositionMCLow;\n\n return vec4(highDifference + lowDifference, 1.0);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * @private\n */\nvec4 czm_translucentPhong(vec3 toEye, czm_material material, vec3 lightDirectionEC)\n{\n // Diffuse from directional light sources at eye (for top-down and horizon views)\n float diffuse = czm_getLambertDiffuse(vec3(0.0, 0.0, 1.0), material.normal);\n\n if (czm_sceneMode == czm_sceneMode3D) {\n // (and horizon views in 3D)\n diffuse += czm_getLambertDiffuse(vec3(0.0, 1.0, 0.0), material.normal);\n }\n\n diffuse = clamp(diffuse, 0.0, 1.0);\n\n float specular = czm_getSpecular(lightDirectionEC, toEye, material.normal, material.shininess);\n\n // Temporary workaround for adding ambient.\n vec3 materialDiffuse = material.diffuse * 0.5;\n\n vec3 ambient = materialDiffuse;\n vec3 color = ambient + material.emission;\n color += materialDiffuse * diffuse * czm_lightColor;\n color += material.specular * specular * czm_lightColor;\n\n return vec4(color, material.alpha);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Returns the transpose of the matrix. The input <code>matrix</code> can be\n * a <code>mat2</code>, <code>mat3</code>, or <code>mat4</code>.\n *\n * @name czm_transpose\n * @glslFunction\n *\n * @param {} matrix The matrix to transpose.\n *\n * @returns {} The transposed matrix.\n *\n * @example\n * // GLSL declarations\n * mat2 czm_transpose(mat2 matrix);\n * mat3 czm_transpose(mat3 matrix);\n * mat4 czm_transpose(mat4 matrix);\n *\n * // Transpose a 3x3 rotation matrix to find its inverse.\n * mat3 eastNorthUpToEye = czm_eastNorthUpToEyeCoordinates(\n * positionMC, normalEC);\n * mat3 eyeToEastNorthUp = czm_transpose(eastNorthUpToEye);\n */\nmat2 czm_transpose(mat2 matrix)\n{\n return mat2(\n matrix[0][0], matrix[1][0],\n matrix[0][1], matrix[1][1]);\n}\n\nmat3 czm_transpose(mat3 matrix)\n{\n return mat3(\n matrix[0][0], matrix[1][0], matrix[2][0],\n matrix[0][1], matrix[1][1], matrix[2][1],\n matrix[0][2], matrix[1][2], matrix[2][2]);\n}\n\nmat4 czm_transpose(mat4 matrix)\n{\n return mat4(\n matrix[0][0], matrix[1][0], matrix[2][0], matrix[3][0],\n matrix[0][1], matrix[1][1], matrix[2][1], matrix[3][1],\n matrix[0][2], matrix[1][2], matrix[2][2], matrix[3][2],\n matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]);\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Unpacks a vec4 depth value to a float in [0, 1) range.\n *\n * @name czm_unpackDepth\n * @glslFunction\n *\n * @param {vec4} packedDepth The packed depth.\n *\n * @returns {float} The floating-point depth in [0, 1) range.\n */\n float czm_unpackDepth(vec4 packedDepth)\n {\n // See Aras Pranckevičius' post Encoding Floats to RGBA\n // http://aras-p.info/blog/2009/07/30/encoding-floats-to-rgba-the-final/\n return dot(packedDepth, vec4(1.0, 1.0 / 255.0, 1.0 / 65025.0, 1.0 / 16581375.0));\n }\n"},function(e,t,i){"use strict";t.a="/**\n * Unpack an IEEE 754 single-precision float that is packed as a little-endian unsigned normalized vec4.\n *\n * @name czm_unpackFloat\n * @glslFunction\n *\n * @param {vec4} packedFloat The packed float.\n *\n * @returns {float} The floating-point depth in arbitrary range.\n */\nfloat czm_unpackFloat(vec4 packedFloat)\n{\n // Convert to [0.0, 255.0] and round to integer\n packedFloat = floor(packedFloat * 255.0 + 0.5);\n float sign = 1.0 - step(128.0, packedFloat[3]) * 2.0;\n float exponent = 2.0 * mod(packedFloat[3], 128.0) + step(128.0, packedFloat[2]) - 127.0; \n if (exponent == -127.0)\n {\n return 0.0;\n }\n float mantissa = mod(packedFloat[2], 128.0) * 65536.0 + packedFloat[1] * 256.0 + packedFloat[0] + float(0x800000);\n float result = sign * exp2(exponent - 23.0) * mantissa;\n return result;\n}\n"},function(e,t,i){"use strict";t.a="#ifdef LOG_DEPTH\n// 1.0 at the near plane, increasing linearly from there.\nvarying float v_depthFromNearPlusOne;\n#ifdef SHADOW_MAP\nvarying vec3 v_logPositionEC;\n#endif\n#endif\n\nvec4 czm_updatePositionDepth(vec4 coords) {\n#if defined(LOG_DEPTH)\n\n#ifdef SHADOW_MAP\n vec3 logPositionEC = (czm_inverseProjection * coords).xyz;\n v_logPositionEC = logPositionEC;\n#endif\n\n // With the very high far/near ratios used with the logarithmic depth\n // buffer, floating point rounding errors can cause linear depth values\n // to end up on the wrong side of the far plane, even for vertices that\n // are really nowhere near it. Since we always write a correct logarithmic\n // depth value in the fragment shader anyway, we just need to make sure\n // such errors don't cause the primitive to be clipped entirely before\n // we even get to the fragment shader.\n coords.z = clamp(coords.z / coords.w, -1.0, 1.0) * coords.w;\n#endif\n\n return coords;\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the already computed gl_Position.\n *\n * @name czm_vertexLogDepth\n * @glslFunction\n */\nvoid czm_vertexLogDepth()\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (gl_Position.w - czm_currentFrustum.x) + 1.0;\n gl_Position = czm_updatePositionDepth(gl_Position);\n#endif\n}\n\n/**\n * Writes the logarithmic depth to gl_Position using the provided clip coordinates.\n * <p>\n * An example use case for this function would be moving the vertex in window coordinates\n * before converting back to clip coordinates. Use the original vertex clip coordinates.\n * </p>\n * @name czm_vertexLogDepth\n * @glslFunction\n *\n * @param {vec4} clipCoords The vertex in clip coordinates.\n *\n * @example\n * czm_vertexLogDepth(czm_projection * vec4(positionEyeCoordinates, 1.0));\n */\nvoid czm_vertexLogDepth(vec4 clipCoords)\n{\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = (clipCoords.w - czm_currentFrustum.x) + 1.0;\n czm_updatePositionDepth(clipCoords);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Transforms a position from window to eye coordinates.\n * The transform from window to normalized device coordinates is done using components\n * of (@link czm_viewport} and {@link czm_viewportTransformation} instead of calculating\n * the inverse of <code>czm_viewportTransformation</code>. The transformation from\n * normalized device coordinates to clip coordinates is done using <code>fragmentCoordinate.w</code>,\n * which is expected to be the scalar used in the perspective divide. The transformation\n * from clip to eye coordinates is done using {@link czm_inverseProjection}.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec4} fragmentCoordinate The position in window coordinates to transform.\n *\n * @returns {vec4} The transformed position in eye coordinates.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @example\n * vec4 positionEC = czm_windowToEyeCoordinates(gl_FragCoord);\n */\nvec4 czm_windowToEyeCoordinates(vec4 fragmentCoordinate)\n{\n // Reconstruct NDC coordinates\n float x = 2.0 * (fragmentCoordinate.x - czm_viewport.x) / czm_viewport.z - 1.0;\n float y = 2.0 * (fragmentCoordinate.y - czm_viewport.y) / czm_viewport.w - 1.0;\n float z = (fragmentCoordinate.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n vec4 q = vec4(x, y, z, 1.0);\n\n // Reverse the perspective division to obtain clip coordinates.\n q /= fragmentCoordinate.w;\n\n // Reverse the projection transformation to obtain eye coordinates.\n if (!(czm_inverseProjection == mat4(0.0))) // IE and Edge sometimes do something weird with != between mat4s\n {\n q = czm_inverseProjection * q;\n }\n else\n {\n float top = czm_frustumPlanes.x;\n float bottom = czm_frustumPlanes.y;\n float left = czm_frustumPlanes.z;\n float right = czm_frustumPlanes.w;\n\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n\n q.x = (q.x * (right - left) + left + right) * 0.5;\n q.y = (q.y * (top - bottom) + bottom + top) * 0.5;\n q.z = (q.z * (near - far) - near - far) * 0.5;\n q.w = 1.0;\n }\n\n return q;\n}\n\n/**\n * Transforms a position given as window x/y and a depth or a log depth from window to eye coordinates.\n * This function produces more accurate results for window positions with log depth than\n * conventionally unpacking the log depth using czm_reverseLogDepth and using the standard version\n * of czm_windowToEyeCoordinates.\n *\n * @name czm_windowToEyeCoordinates\n * @glslFunction\n *\n * @param {vec2} fragmentCoordinateXY The XY position in window coordinates to transform.\n * @param {float} depthOrLogDepth A depth or log depth for the fragment.\n *\n * @see czm_modelToWindowCoordinates\n * @see czm_eyeToWindowCoordinates\n * @see czm_inverseProjection\n * @see czm_viewport\n * @see czm_viewportTransformation\n *\n * @returns {vec4} The transformed position in eye coordinates.\n */\nvec4 czm_windowToEyeCoordinates(vec2 fragmentCoordinateXY, float depthOrLogDepth)\n{\n // See reverseLogDepth.glsl. This is separate to re-use the pow.\n#ifdef LOG_DEPTH\n float near = czm_currentFrustum.x;\n float far = czm_currentFrustum.y;\n float log2Depth = depthOrLogDepth * czm_log2FarDepthFromNearPlusOne;\n float depthFromNear = pow(2.0, log2Depth) - 1.0;\n float depthFromCamera = depthFromNear + near;\n vec4 windowCoord = vec4(fragmentCoordinateXY, far * (1.0 - near / depthFromCamera) / (far - near), 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n eyeCoordinate.w = 1.0 / depthFromCamera; // Better precision\n return eyeCoordinate;\n#else\n vec4 windowCoord = vec4(fragmentCoordinateXY, depthOrLogDepth, 1.0);\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(windowCoord);\n#endif\n return eyeCoordinate;\n}\n"},function(e,t,i){"use strict";t.a="// emulated noperspective\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\nvarying float v_WindowZ;\n#endif\n\n/**\n * Emulates GL_DEPTH_CLAMP. Clamps a fragment to the near and far plane\n * by writing the fragment's depth. See czm_depthClamp for more details.\n * <p>\n * The shader must enable the GL_EXT_frag_depth extension.\n * </p>\n *\n * @name czm_writeDepthClamp\n * @glslFunction\n *\n * @example\n * gl_FragColor = color;\n * czm_writeDepthClamp();\n *\n * @see czm_depthClamp\n */\nvoid czm_writeDepthClamp()\n{\n#if defined(GL_EXT_frag_depth) && !defined(LOG_DEPTH)\n gl_FragDepthEXT = clamp(v_WindowZ * gl_FragCoord.w, 0.0, 1.0);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="#ifdef LOG_DEPTH\nvarying float v_depthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\nuniform vec2 u_polygonOffset;\n#endif\n\n#endif\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader does not call {@link czm_vertexlogDepth}, for example, when\n * ray-casting geometry using a full screen quad.\n * </p>\n * @name czm_writeLogDepth\n * @glslFunction\n *\n * @param {float} depth The depth coordinate, where 1.0 is on the near plane and\n * depth increases in eye-space units from there\n *\n * @example\n * czm_writeLogDepth((czm_projection * v_positionEyeCoordinates).w + 1.0);\n */\nvoid czm_writeLogDepth(float depth)\n{\n#if defined(GL_EXT_frag_depth) && defined(LOG_DEPTH)\n // Discard the vertex if it's not between the near and far planes.\n // We allow a bit of epsilon on the near plane comparison because a 1.0\n // from the vertex shader (indicating the vertex should be _on_ the near\n // plane) will not necessarily come here as exactly 1.0.\n if (depth <= 0.9999999 || depth > czm_farDepthFromNearPlusOne) {\n discard;\n }\n\n#ifdef POLYGON_OFFSET\n // Polygon offset: m * factor + r * units\n float factor = u_polygonOffset[0];\n float units = u_polygonOffset[1];\n\n // If we can't compute derivatives, just leave out the factor I guess?\n#ifdef GL_OES_standard_derivatives\n // m = sqrt(dZdX^2 + dZdY^2);\n float x = dFdx(depth);\n float y = dFdy(depth);\n float m = sqrt(x * x + y * y);\n\n // Apply the factor before computing the log depth.\n depth += m * factor;\n#endif\n\n#endif\n\n gl_FragDepthEXT = log2(depth) * czm_oneOverLog2FarDepthFromNearPlusOne;\n\n#ifdef POLYGON_OFFSET\n // Apply the units after the log depth.\n gl_FragDepthEXT += czm_epsilon7 * units;\n#endif\n\n#endif\n}\n\n/**\n * Writes the fragment depth to the logarithmic depth buffer.\n * <p>\n * Use this when the vertex shader calls {@link czm_vertexlogDepth}.\n * </p>\n *\n * @name czm_writeLogDepth\n * @glslFunction\n */\nvoid czm_writeLogDepth() {\n#ifdef LOG_DEPTH\n czm_writeLogDepth(v_depthFromNearPlusOne);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="/**\n * Transforms a value for non-perspective interpolation by multiplying\n * it by w, the value used in the perspective divide. This function is\n * intended to be called in a vertex shader to compute the value of a\n * `varying` that should not be subject to perspective interpolation.\n * For example, screen-space texture coordinates. The fragment shader\n * must call {@link czm_readNonPerspective} to retrieve the final\n * non-perspective value.\n *\n * @name czm_writeNonPerspective\n * @glslFunction\n *\n * @param {float|vec2|vec3|vec4} value The value to be interpolated without accounting for perspective.\n * @param {float} w The perspective divide value. Usually this is the computed `gl_Position.w`.\n * @returns {float|vec2|vec3|vec4} The transformed value, intended to be stored in a `varying` and read in the\n * fragment shader with {@link czm_readNonPerspective}.\n */\nfloat czm_writeNonPerspective(float value, float w) {\n return value * w;\n}\n\nvec2 czm_writeNonPerspective(vec2 value, float w) {\n return value * w;\n}\n\nvec3 czm_writeNonPerspective(vec3 value, float w) {\n return value * w;\n}\n\nvec4 czm_writeNonPerspective(vec4 value, float w) {\n return value * w;\n}\n"},function(e,t,i){"use strict";var n=i(477),a=i(3),r=i(5),o=i(245),s={};function l(e,t,i,a){var s=e*e,l=t-3*s/8,u=i-t*e/2+s*e/8,d=a-i*e/4+t*s/16-3*s*s/256,c=n.a.computeRealRoots(1,2*l,l*l-4*d,-u*u);if(c.length>0){var f=-e/4,h=c[c.length-1];if(Math.abs(h)<r.default.EPSILON14){var p=o.a.computeRealRoots(1,l,d);if(2===p.length){var m,_=p[0],g=p[1];if(_>=0&&g>=0){var v=Math.sqrt(_),y=Math.sqrt(g);return[f-y,f-v,f+v,f+y]}if(_>=0&&g<0)return[f-(m=Math.sqrt(_)),f+m];if(_<0&&g>=0)return[f-(m=Math.sqrt(g)),f+m]}return[]}if(h>0){var b=Math.sqrt(h),w=(l+h-u/b)/2,O=(l+h+u/b)/2,x=o.a.computeRealRoots(1,b,w),A=o.a.computeRealRoots(1,-b,O);return 0!==x.length?(x[0]+=f,x[1]+=f,0!==A.length?(A[0]+=f,A[1]+=f,x[1]<=A[0]?[x[0],x[1],A[0],A[1]]:A[1]<=x[0]?[A[0],A[1],x[0],x[1]]:x[0]>=A[0]&&x[1]<=A[1]?[A[0],x[0],x[1],A[1]]:A[0]>=x[0]&&A[1]<=x[1]?[x[0],A[0],A[1],x[1]]:x[0]>A[0]&&x[0]<A[1]?[A[0],x[0],A[1],x[1]]:[x[0],A[0],x[1],A[1]]):x):0!==A.length?(A[0]+=f,A[1]+=f,A):[]}}return[]}function u(e,t,i,a){var s=e*e,l=-2*t,u=i*e+t*t-4*a,d=s*a-i*t*e+i*i,c=n.a.computeRealRoots(1,l,u,d);if(c.length>0){var f,h,p,m,_,g,v=c[0],y=t-v,b=y*y,w=e/2,O=y/2,x=b-4*a,A=b+4*Math.abs(a),T=s-4*v,E=s+4*Math.abs(v);if(v<0||x*E<T*A){var C=Math.sqrt(T);f=C/2,h=0===C?0:(e*O-i)/C}else{var S=Math.sqrt(x);f=0===S?0:(e*O-i)/S,h=S/2}0===w&&0===f?(p=0,m=0):r.default.sign(w)===r.default.sign(f)?m=v/(p=w+f):p=v/(m=w-f),0===O&&0===h?(_=0,g=0):r.default.sign(O)===r.default.sign(h)?g=a/(_=O+h):_=a/(g=O-h);var M=o.a.computeRealRoots(1,p,_),D=o.a.computeRealRoots(1,m,g);if(0!==M.length)return 0!==D.length?M[1]<=D[0]?[M[0],M[1],D[0],D[1]]:D[1]<=M[0]?[D[0],D[1],M[0],M[1]]:M[0]>=D[0]&&M[1]<=D[1]?[D[0],M[0],M[1],D[1]]:D[0]>=M[0]&&D[1]<=M[1]?[M[0],D[0],D[1],M[1]]:M[0]>D[0]&&M[0]<D[1]?[D[0],M[0],D[1],M[1]]:[M[0],D[0],M[1],D[1]]:M;if(0!==D.length)return D}return[]}s.computeDiscriminant=function(e,t,i,n,r){if("number"!=typeof e)throw new a.default("a is a required number.");if("number"!=typeof t)throw new a.default("b is a required number.");if("number"!=typeof i)throw new a.default("c is a required number.");if("number"!=typeof n)throw new a.default("d is a required number.");if("number"!=typeof r)throw new a.default("e is a required number.");var o=e*e,s=t*t,l=s*t,u=i*i,d=u*i,c=n*n,f=c*n,h=r*r;return s*u*c-4*l*f-4*e*d*c+18*e*t*i*f-27*o*c*c+256*(o*e)*(h*r)+r*(18*l*i*n-4*s*d+16*e*u*u-80*e*t*u*n-6*e*s*c+144*o*i*c)+h*(144*e*s*i-27*s*s-128*o*u-192*o*t*n)},s.computeRealRoots=function(e,t,i,o,s){if("number"!=typeof e)throw new a.default("a is a required number.");if("number"!=typeof t)throw new a.default("b is a required number.");if("number"!=typeof i)throw new a.default("c is a required number.");if("number"!=typeof o)throw new a.default("d is a required number.");if("number"!=typeof s)throw new a.default("e is a required number.");if(Math.abs(e)<r.default.EPSILON15)return n.a.computeRealRoots(t,i,o,s);var d=t/e,c=i/e,f=o/e,h=s/e,p=d<0?1:0;switch(p+=c<0?p+1:p,p+=f<0?p+1:p,p+=h<0?p+1:p){case 0:return l(d,c,f,h);case 1:case 2:return u(d,c,f,h);case 3:case 4:return l(d,c,f,h);case 5:return u(d,c,f,h);case 6:case 7:return l(d,c,f,h);case 8:return u(d,c,f,h);case 9:case 10:return l(d,c,f,h);case 11:return u(d,c,f,h);case 12:case 13:case 14:case 15:return l(d,c,f,h);default:return}},t.a=s},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o={calculateACMR:function(e){var t=(e=Object(n.default)(e,n.default.EMPTY_OBJECT)).indices,i=e.maximumIndex,o=Object(n.default)(e.cacheSize,24);if(!Object(a.default)(t))throw new r.default("indices is required.");var s=t.length;if(s<3||s%3!=0)throw new r.default("indices length must be a multiple of three.");if(i<=0)throw new r.default("maximumIndex must be greater than zero.");if(o<3)throw new r.default("cacheSize must be greater than two.");if(!Object(a.default)(i)){i=0;for(var l=0,u=t[l];l<s;)u>i&&(i=u),u=t[++l]}for(var d=[],c=0;c<i+1;c++)d[c]=0;for(var f=o+1,h=0;h<s;++h)f-d[t[h]]>o&&(d[t[h]]=f,++f);return(f-o+1)/(s/3)}};o.tipsify=function(e){var t,i=(e=Object(n.default)(e,n.default.EMPTY_OBJECT)).indices,o=e.maximumIndex,s=Object(n.default)(e.cacheSize,24);function l(e,i,n,a,r,o,s){for(var l,u=-1,d=-1,c=0;c<n.length;){var f=n[c];a[f].numLiveTriangles&&(l=0,r-a[f].timeStamp+2*a[f].numLiveTriangles<=i&&(l=r-a[f].timeStamp),(l>d||-1===d)&&(d=l,u=f)),++c}return-1===u?function(e,i,n,a){for(;i.length>=1;){var r=i[i.length-1];if(i.splice(i.length-1,1),e[r].numLiveTriangles>0)return r}for(;t<a;){if(e[t].numLiveTriangles>0)return++t-1;++t}return-1}(a,o,0,s):u}if(!Object(a.default)(i))throw new r.default("indices is required.");var u=i.length;if(u<3||u%3!=0)throw new r.default("indices length must be a multiple of three.");if(o<=0)throw new r.default("maximumIndex must be greater than zero.");if(s<3)throw new r.default("cacheSize must be greater than two.");var d=0,c=0,f=i[c],h=u;if(Object(a.default)(o))d=o+1;else{for(;c<h;)f>d&&(d=f),f=i[++c];if(-1===d)return 0;++d}var p,m=[];for(p=0;p<d;p++)m[p]={numLiveTriangles:0,timeStamp:0,vertexTriangles:[]};c=0;for(var _=0;c<h;)m[i[c]].vertexTriangles.push(_),++m[i[c]].numLiveTriangles,m[i[c+1]].vertexTriangles.push(_),++m[i[c+1]].numLiveTriangles,m[i[c+2]].vertexTriangles.push(_),++m[i[c+2]].numLiveTriangles,++_,c+=3;var g=0,v=s+1;t=1;var y,b,w,O,x=[],A=[],T=0,E=[],C=u/3,S=[];for(p=0;p<C;p++)S[p]=!1;for(;-1!==g;){x=[],O=(b=m[g]).vertexTriangles.length;for(var M=0;M<O;++M)if(!S[_=b.vertexTriangles[M]]){S[_]=!0,c=_+_+_;for(var D=0;D<3;++D)w=i[c],x.push(w),A.push(w),E[T]=w,++T,--(y=m[w]).numLiveTriangles,v-y.timeStamp>s&&(y.timeStamp=v,++v),++c}g=l(0,s,x,m,v,A,d)}return E},t.a=o},function(e,t,i){"use strict";i.d(t,"a",(function(){return n}));var n=r,a=r;function r(e,t,i){i=i||2;var n,a,r,u,d,c,f,m=t&&t.length,_=m?t[0]*i:e.length,v=o(e,0,_,i,!0),y=[];if(!v||v.next===v.prev)return y;if(m&&(v=function(e,t,i,n){var a,r,l,u,d,c=[];for(a=0,r=t.length;a<r;a++)l=t[a]*n,u=a<r-1?t[a+1]*n:e.length,(d=o(e,l,u,n,!1))===d.next&&(d.steiner=!0),c.push(g(d));for(c.sort(h),a=0;a<c.length;a++)i=s(i=p(c[a],i),i.next);return i}(e,t,v,i)),e.length>80*i){n=r=e[0],a=u=e[1];for(var b=i;b<_;b+=i)(d=e[b])<n&&(n=d),(c=e[b+1])<a&&(a=c),d>r&&(r=d),c>u&&(u=c);f=0!==(f=Math.max(r-n,u-a))?1/f:0}return l(v,y,i,n,a,f),y}function o(e,t,i,n,a){var r,o;if(a===D(e,t,i,n)>0)for(r=t;r<i;r+=n)o=C(r,e[r],e[r+1],o);else for(r=i-n;r>=t;r-=n)o=C(r,e[r],e[r+1],o);return o&&w(o,o.next)&&(S(o),o=o.next),o}function s(e,t){if(!e)return e;t||(t=e);var i,n=e;do{if(i=!1,n.steiner||!w(n,n.next)&&0!==b(n.prev,n,n.next))n=n.next;else{if(S(n),(n=t=n.prev)===n.next)break;i=!0}}while(i||n!==t);return t}function l(e,t,i,n,a,r,o){if(e){!o&&r&&function(e,t,i,n){var a=e;do{null===a.z&&(a.z=_(a.x,a.y,t,i,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next}while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,function(e){var t,i,n,a,r,o,s,l,u=1;do{for(i=e,e=null,r=null,o=0;i;){for(o++,n=i,s=0,t=0;t<u&&(s++,n=n.nextZ);t++);for(l=u;s>0||l>0&&n;)0!==s&&(0===l||!n||i.z<=n.z)?(a=i,i=i.nextZ,s--):(a=n,n=n.nextZ,l--),r?r.nextZ=a:e=a,a.prevZ=r,r=a;i=n}r.nextZ=null,u*=2}while(o>1)}(a)}(e,n,a,r);for(var h,p,m=e;e.prev!==e.next;)if(h=e.prev,p=e.next,r?d(e,n,a,r):u(e))t.push(h.i/i),t.push(e.i/i),t.push(p.i/i),S(e),e=p.next,m=p.next;else if((e=p)===m){o?1===o?l(e=c(s(e),t,i),t,i,n,a,r,2):2===o&&f(e,t,i,n,a,r):l(s(e),t,i,n,a,r,1);break}}}function u(e){var t=e.prev,i=e,n=e.next;if(b(t,i,n)>=0)return!1;for(var a=e.next.next;a!==e.prev;){if(v(t.x,t.y,i.x,i.y,n.x,n.y,a.x,a.y)&&b(a.prev,a,a.next)>=0)return!1;a=a.next}return!0}function d(e,t,i,n){var a=e.prev,r=e,o=e.next;if(b(a,r,o)>=0)return!1;for(var s=a.x<r.x?a.x<o.x?a.x:o.x:r.x<o.x?r.x:o.x,l=a.y<r.y?a.y<o.y?a.y:o.y:r.y<o.y?r.y:o.y,u=a.x>r.x?a.x>o.x?a.x:o.x:r.x>o.x?r.x:o.x,d=a.y>r.y?a.y>o.y?a.y:o.y:r.y>o.y?r.y:o.y,c=_(s,l,t,i,n),f=_(u,d,t,i,n),h=e.prevZ,p=e.nextZ;h&&h.z>=c&&p&&p.z<=f;){if(h!==e.prev&&h!==e.next&&v(a.x,a.y,r.x,r.y,o.x,o.y,h.x,h.y)&&b(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,p!==e.prev&&p!==e.next&&v(a.x,a.y,r.x,r.y,o.x,o.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;h&&h.z>=c;){if(h!==e.prev&&h!==e.next&&v(a.x,a.y,r.x,r.y,o.x,o.y,h.x,h.y)&&b(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;p&&p.z<=f;){if(p!==e.prev&&p!==e.next&&v(a.x,a.y,r.x,r.y,o.x,o.y,p.x,p.y)&&b(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function c(e,t,i){var n=e;do{var a=n.prev,r=n.next.next;!w(a,r)&&O(a,n,n.next,r)&&T(a,r)&&T(r,a)&&(t.push(a.i/i),t.push(n.i/i),t.push(r.i/i),S(n),S(n.next),n=e=r),n=n.next}while(n!==e);return s(n)}function f(e,t,i,n,a,r){var o=e;do{for(var u=o.next.next;u!==o.prev;){if(o.i!==u.i&&y(o,u)){var d=E(o,u);return o=s(o,o.next),d=s(d,d.next),l(o,t,i,n,a,r),void l(d,t,i,n,a,r)}u=u.next}o=o.next}while(o!==e)}function h(e,t){return e.x-t.x}function p(e,t){var i=function(e,t){var i,n=t,a=e.x,r=e.y,o=-1/0;do{if(r<=n.y&&r>=n.next.y&&n.next.y!==n.y){var s=n.x+(r-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=a&&s>o){if(o=s,s===a){if(r===n.y)return n;if(r===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==t);if(!i)return null;if(a===o)return i;var l,u=i,d=i.x,c=i.y,f=1/0;n=i;do{a>=n.x&&n.x>=d&&a!==n.x&&v(r<c?a:o,r,d,c,r<c?o:a,r,n.x,n.y)&&(l=Math.abs(r-n.y)/(a-n.x),T(n,e)&&(l<f||l===f&&(n.x>i.x||n.x===i.x&&m(i,n)))&&(i=n,f=l)),n=n.next}while(n!==u);return i}(e,t);if(!i)return t;var n=E(i,e),a=s(i,i.next);return s(n,n.next),t===i?a:t}function m(e,t){return b(e.prev,e,t.prev)<0&&b(t.next,e,e.next)<0}function _(e,t,i,n,a){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*a)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*a)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function g(e){var t=e,i=e;do{(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next}while(t!==e);return i}function v(e,t,i,n,a,r,o,s){return(a-o)*(t-s)-(e-o)*(r-s)>=0&&(e-o)*(n-s)-(i-o)*(t-s)>=0&&(i-o)*(r-s)-(a-o)*(n-s)>=0}function y(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var i=e;do{if(i.i!==e.i&&i.next.i!==e.i&&i.i!==t.i&&i.next.i!==t.i&&O(i,i.next,e,t))return!0;i=i.next}while(i!==e);return!1}(e,t)&&(T(e,t)&&T(t,e)&&function(e,t){var i=e,n=!1,a=(e.x+t.x)/2,r=(e.y+t.y)/2;do{i.y>r!=i.next.y>r&&i.next.y!==i.y&&a<(i.next.x-i.x)*(r-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==e);return n}(e,t)&&(b(e.prev,e,t.prev)||b(e,t.prev,t))||w(e,t)&&b(e.prev,e,e.next)>0&&b(t.prev,t,t.next)>0)}function b(e,t,i){return(t.y-e.y)*(i.x-t.x)-(t.x-e.x)*(i.y-t.y)}function w(e,t){return e.x===t.x&&e.y===t.y}function O(e,t,i,n){var a=A(b(e,t,i)),r=A(b(e,t,n)),o=A(b(i,n,e)),s=A(b(i,n,t));return a!==r&&o!==s||(!(0!==a||!x(e,i,t))||(!(0!==r||!x(e,n,t))||(!(0!==o||!x(i,e,n))||!(0!==s||!x(i,t,n)))))}function x(e,t,i){return t.x<=Math.max(e.x,i.x)&&t.x>=Math.min(e.x,i.x)&&t.y<=Math.max(e.y,i.y)&&t.y>=Math.min(e.y,i.y)}function A(e){return e>0?1:e<0?-1:0}function T(e,t){return b(e.prev,e,e.next)<0?b(e,t,e.next)>=0&&b(e,e.prev,t)>=0:b(e,t,e.prev)<0||b(e,e.next,t)<0}function E(e,t){var i=new M(e.i,e.x,e.y),n=new M(t.i,t.x,t.y),a=e.next,r=t.prev;return e.next=t,t.prev=e,i.next=a,a.prev=i,n.next=i,i.prev=n,r.next=n,n.prev=r,n}function C(e,t,i,n){var a=new M(e,t,i);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function S(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function M(e,t,i){this.i=e,this.x=t,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(e,t,i,n){for(var a=0,r=t,o=i-n;r<i;r+=n)a+=(e[o]-e[r])*(e[r+1]+e[o+1]),o=r;return a}r.deviation=function(e,t,i,n){var a=t&&t.length,r=a?t[0]*i:e.length,o=Math.abs(D(e,0,r,i));if(a)for(var s=0,l=t.length;s<l;s++){var u=t[s]*i,d=s<l-1?t[s+1]*i:e.length;o-=Math.abs(D(e,u,d,i))}var c=0;for(s=0;s<n.length;s+=3){var f=n[s]*i,h=n[s+1]*i,p=n[s+2]*i;c+=Math.abs((e[f]-e[p])*(e[h+1]-e[f+1])-(e[f]-e[h])*(e[p+1]-e[f+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},r.flatten=function(e){for(var t=e[0][0].length,i={vertices:[],holes:[],dimensions:t},n=0,a=0;a<e.length;a++){for(var r=0;r<e[a].length;r++)for(var o=0;o<t;o++)i.vertices.push(e[a][r][o]);a>0&&(n+=e[a-1].length,i.holes.push(n))}return i},n.default=a},function(e,t,i){"use strict";t.a="varying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n czm_materialInput materialInput;\n\n vec3 normalEC = normalize(czm_normal3D * czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)));\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n materialInput.s = v_st.s;\n materialInput.st = v_st;\n materialInput.str = vec3(v_st, 0.0);\n\n // Convert tangent space material normal to eye space\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, materialInput.normalEC);\n\n // Convert view vector to world space\n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionMC = position3DHigh + position3DLow; // position in model coordinates\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";var n=i(4),a=i(693),r=i(0),o=i(126);function s(){}s._transcodeTaskProcessor=new o.a("transcodeKTX2",Number.POSITIVE_INFINITY),s._readyPromise=void 0,s.transcode=function(e,t){var i;return n.a.defined("supportedTargetFormats",t),Object(r.default)(s._readyPromise)||(i=s._transcodeTaskProcessor.initWebAssemblyModule({modulePath:"ThirdParty/Workers/basis_transcoder.js",wasmBinaryFile:"ThirdParty/basis_transcoder.wasm"}).then((function(){return s._transcodeTaskProcessor})),s._readyPromise=i),s._readyPromise.then((function(i){var n;if(e instanceof ArrayBuffer){var a=new Uint8Array(e);return n={supportedTargetFormats:t,ktx2Buffer:a},i.scheduleTask(n,[e])}return n={supportedTargetFormats:t,ktx2Buffer:e},i.scheduleTask(n,[e.buffer])})).then((function(e){var t,i=e.length,n=Object.keys(e[0]),r=n.length;for(t=0;t<i;t++)for(var o=e[t],s=0;s<r;s++){var l=o[n[s]];o[n[s]]=new a.a(l.internalFormat,l.datatype,l.width,l.height,l.levelBuffer)}if(1===r){for(t=0;t<i;++t)e[t]=e[t][n[0]];1===i&&(e=e[0])}return e})).otherwise((function(e){throw e}))},t.a=s},function(e,t,i){"use strict";var n=i(0);function a(e,t,i,n,a){this._format=e,this._datatype=t,this._width=i,this._height=n,this._buffer=a}Object.defineProperties(a.prototype,{internalFormat:{get:function(){return this._format}},pixelDatatype:{get:function(){return this._datatype}},width:{get:function(){return this._width}},height:{get:function(){return this._height}},bufferView:{get:function(){return this._buffer}}}),a.clone=function(e){if(Object(n.default)(e))return new a(e._format,e._datatype,e._width,e._height,e._buffer)},a.prototype.clone=function(){return a.clone(this)},t.a=a},function(e,t,i){"use strict";t.a="uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture2D(image, vec2(materialInput.aspect / (2.0 * czm_pi), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n vec2 centerPixel = fract(repeat * st);\n float centerBump = texture2D(image, centerPixel).channel;\n\n float imageWidth = float(imageDimensions.x);\n vec2 rightPixel = fract(repeat * (st + vec2(1.0 / imageWidth, 0.0)));\n float rightBump = texture2D(image, rightPixel).channel;\n\n float imageHeight = float(imageDimensions.y);\n vec2 leftPixel = fract(repeat * (st + vec2(0.0, 1.0 / imageHeight)));\n float topBump = texture2D(image, leftPixel).channel;\n\n vec3 normalTangentSpace = normalize(vec3(centerBump - rightBump, centerBump - topBump, clamp(1.0 - strength, 0.1, 1.0)));\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n\n material.normal = normalEC;\n material.diffuse = vec3(0.01);\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = mod(floor(repeat.s * st.s) + floor(repeat.t * st.t), 2.0); // 0.0 or 1.0\n\n // Find the distance from the closest separator (region between two colors)\n float scaledWidth = fract(repeat.s * st.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(repeat.t * st.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n float value = min(scaledWidth, scaledHeight);\n\n vec4 currentColor = mix(lightColor, darkColor, b);\n vec4 color = czm_antialias(lightColor, darkColor, currentColor, value, 0.03);\n\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 lightColor;\nuniform vec4 darkColor;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\n float b = smoothstep(0.3, 0.32, length(fract(repeat * materialInput.st) - 0.5)); // 0.0 or 1.0\n\n vec4 color = mix(lightColor, darkColor, b);\n color = czm_gammaCorrect(color);\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D heights;\nuniform sampler2D colors;\n\n// This material expects heights to be sorted from lowest to highest.\n\nfloat getHeight(int idx, float invTexSize)\n{\n vec2 uv = vec2((float(idx) + 0.5) * invTexSize, 0.5);\n#ifdef OES_texture_float\n return texture2D(heights, uv).x;\n#else\n return czm_unpackFloat(texture2D(heights, uv));\n#endif\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float height = materialInput.height;\n float invTexSize = 1.0 / float(heightsDimensions.x);\n\n float minHeight = getHeight(0, invTexSize);\n float maxHeight = getHeight(heightsDimensions.x - 1, invTexSize);\n\n // early-out when outside the height range\n if (height < minHeight || height > maxHeight) {\n material.diffuse = vec3(0.0);\n material.alpha = 0.0;\n return material;\n }\n\n // Binary search to find heights above and below.\n int idxBelow = 0;\n int idxAbove = heightsDimensions.x;\n float heightBelow = minHeight;\n float heightAbove = maxHeight;\n\n // while loop not allowed, so use for loop with max iterations.\n // maxIterations of 16 supports a texture size up to 65536 (2^16).\n const int maxIterations = 16;\n for (int i = 0; i < maxIterations; i++) {\n if (idxBelow >= idxAbove - 1) {\n break;\n }\n\n int idxMid = (idxBelow + idxAbove) / 2;\n float heightTex = getHeight(idxMid, invTexSize);\n\n if (height > heightTex) {\n idxBelow = idxMid;\n heightBelow = heightTex;\n } else {\n idxAbove = idxMid;\n heightAbove = heightTex;\n }\n }\n\n float lerper = heightBelow == heightAbove ? 1.0 : (height - heightBelow) / (heightAbove - heightBelow);\n vec2 colorUv = vec2(invTexSize * (float(idxBelow) + 0.5 + lerper), 0.5);\n vec4 color = texture2D(colors, colorUv);\n\n // undo preumultiplied alpha\n if (color.a > 0.0) \n {\n color.rgb /= color.a;\n }\n \n color.rgb = czm_gammaCorrect(color.rgb);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="#ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\nuniform float spacing;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float distanceToContour = mod(materialInput.height, spacing);\n\n#ifdef GL_OES_standard_derivatives\n float dxc = abs(dFdx(materialInput.height));\n float dyc = abs(dFdy(materialInput.height));\n float dF = max(dxc, dyc) * czm_pixelRatio * width;\n float alpha = (distanceToContour < dF) ? 1.0 : 0.0;\n#else\n float alpha = (distanceToContour < (czm_pixelRatio * width)) ? 1.0 : 0.0;\n#endif\n\n vec4 outColor = czm_gammaCorrect(vec4(color.rgb, alpha * color.a));\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D image;\nuniform float minimumHeight;\nuniform float maximumHeight;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n float scaledHeight = clamp((materialInput.height - minimumHeight) / (maximumHeight - minimumHeight), 0.0, 1.0);\n vec4 rampColor = texture2D(image, vec2(scaledHeight, 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 fadeInColor;\nuniform vec4 fadeOutColor;\nuniform float maximumDistance;\nuniform bool repeat;\nuniform vec2 fadeDirection;\nuniform vec2 time;\n\nfloat getTime(float t, float coord)\n{\n float scalar = 1.0 / maximumDistance;\n float q = distance(t, coord) * scalar;\n if (repeat)\n {\n float r = distance(t, coord + 1.0) * scalar;\n float s = distance(t, coord - 1.0) * scalar;\n q = min(min(r, s), q);\n }\n return clamp(q, 0.0, 1.0);\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float s = getTime(time.x, st.s) * fadeDirection.s;\n float t = getTime(time.y, st.t) * fadeDirection.t;\n\n float u = length(vec2(s, t));\n vec4 color = mix(fadeInColor, fadeOutColor, u);\n\n color = czm_gammaCorrect(color);\n material.emission = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a='#ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\nuniform float cellAlpha;\nuniform vec2 lineCount;\nuniform vec2 lineThickness;\nuniform vec2 lineOffset;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n float scaledWidth = fract(lineCount.s * st.s - lineOffset.s);\n scaledWidth = abs(scaledWidth - floor(scaledWidth + 0.5));\n float scaledHeight = fract(lineCount.t * st.t - lineOffset.t);\n scaledHeight = abs(scaledHeight - floor(scaledHeight + 0.5));\n\n float value;\n#ifdef GL_OES_standard_derivatives\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 1.2;\n vec2 thickness = (lineThickness * czm_pixelRatio) - 1.0;\n\n // From "3D Engine Design for Virtual Globes" by Cozzi and Ring, Listing 4.13.\n vec2 dx = abs(dFdx(st));\n vec2 dy = abs(dFdy(st));\n vec2 dF = vec2(max(dx.s, dy.s), max(dx.t, dy.t)) * lineCount;\n value = min(\n smoothstep(dF.s * thickness.s, dF.s * (fuzz + thickness.s), scaledWidth),\n smoothstep(dF.t * thickness.t, dF.t * (fuzz + thickness.t), scaledHeight));\n#else\n // Fuzz Factor - Controls blurriness of lines\n const float fuzz = 0.05;\n\n vec2 range = 0.5 - (lineThickness * 0.05);\n value = min(\n 1.0 - smoothstep(range.s, range.s + fuzz, scaledWidth),\n 1.0 - smoothstep(range.t, range.t + fuzz, scaledHeight));\n#endif\n\n // Edges taken from RimLightingMaterial.glsl\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float dRim = 1.0 - abs(dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC)));\n float sRim = smoothstep(0.8, 1.0, dRim);\n value *= (1.0 - sRim);\n\n vec4 halfColor;\n halfColor.rgb = color.rgb * 0.5;\n halfColor.a = color.a * (1.0 - ((1.0 - cellAlpha) * value));\n halfColor = czm_gammaCorrect(halfColor);\n material.diffuse = halfColor.rgb;\n material.emission = halfColor.rgb;\n material.alpha = halfColor.a;\n\n return material;\n}\n'},function(e,t,i){"use strict";t.a="uniform sampler2D image;\nuniform float strength;\nuniform vec2 repeat;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n vec4 textureValue = texture2D(image, fract(repeat * materialInput.st));\n vec3 normalTangentSpace = textureValue.channels;\n normalTangentSpace.xy = normalTangentSpace.xy * 2.0 - 1.0;\n normalTangentSpace.z = clamp(1.0 - strength, 0.1, 1.0);\n normalTangentSpace = normalize(normalTangentSpace);\n vec3 normalEC = materialInput.tangentToEyeMatrix * normalTangentSpace;\n \n material.normal = normalEC;\n \n return material;\n}\n"},function(e,t,i){"use strict";t.a="#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform vec4 color;\n\nfloat getPointOnLine(vec2 p0, vec2 p1, float x)\n{\n float slope = (p0.y - p1.y) / (p0.x - p1.x);\n return slope * (x - p0.x) + p0.y;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n\n#ifdef GL_OES_standard_derivatives\n float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;\n#else\n float base = 0.975; // 2.5% of the line will be the arrow head\n#endif\n\n vec2 center = vec2(1.0, 0.5);\n float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);\n float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);\n\n float halfWidth = 0.15;\n float s = step(0.5 - halfWidth, st.t);\n s *= 1.0 - step(0.5 + halfWidth, st.t);\n s *= 1.0 - step(base, st.s);\n\n float t = step(base, materialInput.st.s);\n t *= 1.0 - step(ptOnUpperLine, st.t);\n t *= step(ptOnLowerLine, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float dist;\n if (st.s < base)\n {\n float d1 = abs(st.t - (0.5 - halfWidth));\n float d2 = abs(st.t - (0.5 + halfWidth));\n dist = min(d1, d2);\n }\n else\n {\n float d1 = czm_infinity;\n if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)\n {\n d1 = abs(st.s - base);\n }\n float d2 = abs(st.t - ptOnUpperLine);\n float d3 = abs(st.t - ptOnLowerLine);\n dist = min(min(d1, d2), d3);\n }\n\n vec4 outsideColor = vec4(0.0);\n vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));\n vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);\n\n outColor = czm_gammaCorrect(outColor);\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 color;\nuniform vec4 gapColor;\nuniform float dashLength;\nuniform float dashPattern;\nvarying float v_polylineAngle;\n\nconst float maskLength = 16.0;\n\nmat2 rotate(float rad) {\n float c = cos(rad);\n float s = sin(rad);\n return mat2(\n c, s,\n -s, c\n );\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;\n\n // Get the relative position within the dash from 0 to 1\n float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));\n // Figure out the mask index.\n float maskIndex = floor(dashPosition * maskLength);\n // Test the bit mask.\n float maskTest = floor(dashPattern / pow(2.0, maskIndex));\n vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;\n if (fragColor.a < 0.005) { // matches 0/255 and 1/255\n discard;\n }\n\n fragColor = czm_gammaCorrect(fragColor);\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 color;\nuniform float glowPower;\nuniform float taperPower;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\n if (taperPower <= 0.99999) {\n glow *= min(1.0, taperPower / (0.5 - st.s * 0.5) - (taperPower / 0.5));\n }\n\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\n fragColor = czm_gammaCorrect(fragColor);\n\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 color;\nuniform vec4 outlineColor;\nuniform float outlineWidth;\n\nvarying float v_width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n vec2 st = materialInput.st;\n float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n float b = step(0.5 - halfInteriorWidth, st.t);\n b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\n // Find the distance from the closest separator (region between two colors)\n float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n float dist = min(d1, d2);\n\n vec4 currentColor = mix(outlineColor, color, b);\n vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n outColor = czm_gammaCorrect(outColor);\n\n material.diffuse = outColor.rgb;\n material.alpha = outColor.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 color;\nuniform vec4 rimColor;\nuniform float width;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // See http://www.fundza.com/rman_shaders/surface/fake_rim/fake_rim1.html\n float d = 1.0 - dot(materialInput.normalEC, normalize(materialInput.positionToEyeEC));\n float s = smoothstep(1.0 - width, 1.0, d);\n\n vec4 outColor = czm_gammaCorrect(color);\n vec4 outRimColor = czm_gammaCorrect(rimColor);\n\n material.diffuse = outColor.rgb;\n material.emission = outRimColor.rgb * s;\n material.alpha = mix(outColor.a, outRimColor.a, s);\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D image;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec4 rampColor = texture2D(image, vec2(materialInput.slope / (czm_pi / 2.0), 0.5));\n rampColor = czm_gammaCorrect(rampColor);\n material.diffuse = rampColor.rgb;\n material.alpha = rampColor.a;\n return material;\n}\n"},function(e,t,i){"use strict";t.a="uniform vec4 evenColor;\nuniform vec4 oddColor;\nuniform float offset;\nuniform float repeat;\nuniform bool horizontal;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n // Based on the Stripes Fragment Shader in the Orange Book (11.1.2)\n float coord = mix(materialInput.st.s, materialInput.st.t, float(horizontal));\n float value = fract((coord - offset) * (repeat * 0.5));\n float dist = min(value, min(abs(value - 0.5), 1.0 - value));\n\n vec4 currentColor = mix(evenColor, oddColor, step(0.5, value));\n vec4 color = czm_antialias(evenColor, oddColor, currentColor, dist);\n color = czm_gammaCorrect(color);\n\n material.diffuse = color.rgb;\n material.alpha = color.a;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="// Thanks for the contribution Jonas\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\nuniform sampler2D specularMap;\nuniform sampler2D normalMap;\nuniform vec4 baseWaterColor;\nuniform vec4 blendColor;\nuniform float frequency;\nuniform float animationSpeed;\nuniform float amplitude;\nuniform float specularIntensity;\nuniform float fadeFactor;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n\n float time = czm_frameNumber * animationSpeed;\n\n // fade is a function of the distance from the fragment and the frequency of the waves\n float fade = max(1.0, (length(materialInput.positionToEyeEC) / 10000000000.0) * frequency * fadeFactor);\n\n float specularMapValue = texture2D(specularMap, materialInput.st).r;\n\n // note: not using directional motion at this time, just set the angle to 0.0;\n vec4 noise = czm_getWaterNoise(normalMap, materialInput.st * frequency, time, 0.0);\n vec3 normalTangentSpace = noise.xyz * vec3(1.0, 1.0, (1.0 / amplitude));\n\n // fade out the normal perturbation as we move further from the water surface\n normalTangentSpace.xy /= fade;\n\n // attempt to fade out the normal perturbation as we approach non water areas (low specular map value)\n normalTangentSpace = mix(vec3(0.0, 0.0, 50.0), normalTangentSpace, specularMapValue);\n\n normalTangentSpace = normalize(normalTangentSpace);\n\n // get ratios for alignment of the new normal vector with a vector perpendicular to the tangent plane\n float tsPerturbationRatio = clamp(dot(normalTangentSpace, vec3(0.0, 0.0, 1.0)), 0.0, 1.0);\n\n // fade out water effect as specular map value decreases\n material.alpha = mix(blendColor.a, baseWaterColor.a, specularMapValue) * specularMapValue;\n\n // base color is a blend of the water and non-water color based on the value from the specular map\n // may need a uniform blend factor to better control this\n material.diffuse = mix(blendColor.rgb, baseWaterColor.rgb, specularMapValue);\n\n // diffuse highlights are based on how perturbed the normal is\n material.diffuse += (0.1 * tsPerturbationRatio);\n\n material.diffuse = material.diffuse;\n\n material.normal = normalize(materialInput.tangentToEyeMatrix * normalTangentSpace);\n\n material.specular = specularIntensity;\n material.shininess = 10.0;\n\n return material;\n}\n"},function(e,t,i){"use strict";t.a="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n mat3 tangentToEyeMatrix = czm_tangentToEyeSpaceMatrix(v_normalEC, v_tangentEC, v_bitangentEC);\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.tangentToEyeMatrix = tangentToEyeMatrix;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec3 tangent;\nattribute vec3 bitangent;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec3 v_tangentEC;\nvarying vec3 v_bitangentEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_tangentEC = czm_normal * tangent; // tangent in eye coordinates\n v_bitangentEC = czm_normal * bitangent; // bitangent in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";t.a="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";t.a="varying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec3 positionToEyeEC = -v_positionEC;\n\n vec3 normalEC = normalize(v_normalEC);\n#ifdef FACE_FORWARD\n normalEC = faceforward(normalEC, vec3(0.0, 0.0, 1.0), -normalEC);\n#endif\n\n czm_materialInput materialInput;\n materialInput.normalEC = normalEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n materialInput.st = v_st;\n czm_material material = czm_getMaterial(materialInput);\n\n#ifdef FLAT\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#else\n gl_FragColor = czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC);\n#endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 normal;\nattribute vec2 st;\nattribute float batchId;\n\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\nvarying vec2 v_st;\n\nvoid main()\n{\n vec4 p = czm_computePosition();\n\n v_positionEC = (czm_modelViewRelativeToEye * p).xyz; // position in eye coordinates\n v_normalEC = czm_normal * normal; // normal in eye coordinates\n v_st = st;\n\n gl_Position = czm_modelViewProjectionRelativeToEye * p;\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec4 color;\nattribute float batchId;\n\nvarying vec4 v_color;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_color = color;\n}\n"},function(e,t,i){"use strict";t.a='#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n\nuniform sampler2D u_atlas;\n\n#ifdef VECTOR_TILE\nuniform vec4 u_highlightColor;\n#endif\n\nvarying vec2 v_textureCoordinates;\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds; // the min and max x and y values for the texture coordinates\nvarying vec4 v_originTextureCoordinateAndTranslate; // texture coordinate at the origin, billboard translate (used for label glyphs)\nvarying vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nvarying mat2 v_rotationMatrix;\n\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nfloat getGlobeDepth(vec2 adjustedST, vec2 depthLookupST, bool applyTranslate, vec2 dimensions, vec2 imageSize)\n{\n vec2 lookupVector = imageSize * (depthLookupST - adjustedST);\n lookupVector = v_rotationMatrix * lookupVector;\n vec2 labelOffset = (dimensions - imageSize) * (depthLookupST - vec2(0.0, v_originTextureCoordinateAndTranslate.y)); // aligns label glyph with bounding rectangle. Will be zero for billboards because dimensions and imageSize will be equal\n\n vec2 translation = v_originTextureCoordinateAndTranslate.zw;\n\n if (applyTranslate)\n {\n // this is only needed for labels where the horizontal origin is not LEFT\n // it moves the label back to where the "origin" should be since all label glyphs are set to HorizontalOrigin.LEFT\n translation += (dimensions * v_originTextureCoordinateAndTranslate.xy * vec2(1.0, 0.0));\n }\n\n vec2 st = ((lookupVector - translation + labelOffset) + gl_FragCoord.xy) / czm_viewport.zw;\n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st));\n\n if (logDepthOrDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\n\n\n#ifdef SDF\n\n// Get the distance from the edge of a glyph at a given position sampling an SDF texture.\nfloat getDistance(vec2 position)\n{\n return texture2D(u_atlas, position).r;\n}\n\n// Samples the sdf texture at the given position and produces a color based on the fill color and the outline.\nvec4 getSDFColor(vec2 position, float outlineWidth, vec4 outlineColor, float smoothing)\n{\n float distance = getDistance(position);\n\n if (outlineWidth > 0.0)\n {\n // Don\'t get the outline edge exceed the SDF_EDGE\n float outlineEdge = clamp(SDF_EDGE - outlineWidth, 0.0, SDF_EDGE);\n float outlineFactor = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n vec4 sdfColor = mix(outlineColor, v_color, outlineFactor);\n float alpha = smoothstep(outlineEdge - smoothing, outlineEdge + smoothing, distance);\n return vec4(sdfColor.rgb, sdfColor.a * alpha);\n }\n else\n {\n float alpha = smoothstep(SDF_EDGE - smoothing, SDF_EDGE + smoothing, distance);\n return vec4(v_color.rgb, v_color.a * alpha);\n }\n}\n#endif\n\nvoid main()\n{\n vec4 color = texture2D(u_atlas, v_textureCoordinates);\n\n#ifdef SDF\n float outlineWidth = v_outlineWidth;\n vec4 outlineColor = v_outlineColor;\n\n // Get the current distance\n float distance = getDistance(v_textureCoordinates);\n\n#ifdef GL_OES_standard_derivatives\n float smoothing = fwidth(distance);\n // Get an offset that is approximately half the distance to the neighbor pixels\n // 0.354 is approximately half of 1/sqrt(2)\n vec2 sampleOffset = 0.354 * vec2(dFdx(v_textureCoordinates) + dFdy(v_textureCoordinates));\n\n // Sample the center point\n vec4 center = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n\n // Sample the 4 neighbors\n vec4 color1 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color2 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color3 = getSDFColor(v_textureCoordinates + vec2(-sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n vec4 color4 = getSDFColor(v_textureCoordinates + vec2(sampleOffset.x, -sampleOffset.y), outlineWidth, outlineColor, smoothing);\n\n // Equally weight the center sample and the 4 neighboring samples\n color = (center + color1 + color2 + color3 + color4)/5.0;\n#else\n // Just do a single sample\n float smoothing = 1.0/32.0;\n color = getSDFColor(v_textureCoordinates, outlineWidth, outlineColor, smoothing);\n#endif\n\n color = czm_gammaCorrect(color);\n#else\n color = czm_gammaCorrect(color);\n color *= czm_gammaCorrect(v_color);\n#endif\n\n// Fully transparent parts of the billboard are not pickable.\n#if !defined(OPAQUE) && !defined(TRANSLUCENT)\n if (color.a < 0.005) // matches 0/255 and 1/255\n {\n discard;\n }\n#else\n// The billboard is rendered twice. The opaque pass discards translucent fragments\n// and the translucent pass discards opaque fragments.\n#ifdef OPAQUE\n if (color.a < 0.995) // matches < 254/255\n {\n discard;\n }\n#else\n if (color.a >= 0.995) // matches 254/255 and 255/255\n {\n discard;\n }\n#endif\n#endif\n\n#ifdef VECTOR_TILE\n color *= u_highlightColor;\n#endif\n gl_FragColor = color;\n\n#ifdef LOG_DEPTH\n czm_writeLogDepth();\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float temp = v_compressed.y;\n\n temp = temp * SHIFT_RIGHT1;\n\n float temp2 = (temp - floor(temp)) * SHIFT_LEFT1;\n bool enableDepthTest = temp2 != 0.0;\n bool applyTranslate = floor(temp) != 0.0;\n\n if (enableDepthTest) {\n temp = v_compressed.z;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n\n temp = v_compressed.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 imageSize;\n imageSize.y = (temp - floor(temp)) * SHIFT_LEFT12;\n imageSize.x = floor(temp);\n\n vec2 adjustedST = v_textureCoordinates - v_textureCoordinateBounds.xy;\n adjustedST = adjustedST / vec2(v_textureCoordinateBounds.z - v_textureCoordinateBounds.x, v_textureCoordinateBounds.w - v_textureCoordinateBounds.y);\n\n float epsilonEyeDepth = v_compressed.x + czm_epsilon1;\n float globeDepth1 = getGlobeDepth(adjustedST, v_originTextureCoordinateAndTranslate.xy, applyTranslate, dimensions, imageSize);\n\n // negative values go into the screen\n if (globeDepth1 != 0.0 && globeDepth1 > epsilonEyeDepth)\n {\n float globeDepth2 = getGlobeDepth(adjustedST, vec2(0.0, 1.0), applyTranslate, dimensions, imageSize); // top left corner\n if (globeDepth2 != 0.0 && globeDepth2 > epsilonEyeDepth)\n {\n float globeDepth3 = getGlobeDepth(adjustedST, vec2(1.0, 1.0), applyTranslate, dimensions, imageSize); // top right corner\n if (globeDepth3 != 0.0 && globeDepth3 > epsilonEyeDepth)\n {\n discard;\n }\n }\n }\n }\n#endif\n\n}\n'},function(e,t,i){"use strict";t.a="#ifdef INSTANCED\nattribute vec2 direction;\n#endif\nattribute vec4 positionHighAndScale;\nattribute vec4 positionLowAndRotation;\nattribute vec4 compressedAttribute0; // pixel offset, translate, horizontal origin, vertical origin, show, direction, texture coordinates (texture offset)\nattribute vec4 compressedAttribute1; // aligned axis, translucency by distance, image width\nattribute vec4 compressedAttribute2; // label horizontal origin, image height, color, pick color, size in meters, valid aligned axis, 13 bits free\nattribute vec4 eyeOffset; // eye offset in meters, 4 bytes free (texture range)\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec4 pixelOffsetScaleByDistance; // near, nearScale, far, farScale\nattribute vec4 compressedAttribute3; // distance display condition near, far, disableDepthTestDistance, dimensions\nattribute vec2 sdf; // sdf outline color (rgb) and width (w)\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\nattribute vec4 textureCoordinateBoundsOrLabelTranslate; // the min and max x and y values for the texture coordinates\n#endif\n#ifdef VECTOR_TILE\nattribute float a_batchId;\n#endif\n\nvarying vec2 v_textureCoordinates;\n#ifdef FRAGMENT_DEPTH_CHECK\nvarying vec4 v_textureCoordinateBounds;\nvarying vec4 v_originTextureCoordinateAndTranslate;\nvarying vec4 v_compressed; // x: eyeDepth, y: applyTranslate & enableDepthCheck, z: dimensions, w: imageSize\nvarying mat2 v_rotationMatrix;\n#endif\n\nvarying vec4 v_pickColor;\nvarying vec4 v_color;\n#ifdef SDF\nvarying vec4 v_outlineColor;\nvarying float v_outlineWidth;\n#endif\n\nconst float UPPER_BOUND = 32768.0;\n\nconst float SHIFT_LEFT16 = 65536.0;\nconst float SHIFT_LEFT12 = 4096.0;\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_LEFT7 = 128.0;\nconst float SHIFT_LEFT5 = 32.0;\nconst float SHIFT_LEFT3 = 8.0;\nconst float SHIFT_LEFT2 = 4.0;\nconst float SHIFT_LEFT1 = 2.0;\n\nconst float SHIFT_RIGHT12 = 1.0 / 4096.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\nconst float SHIFT_RIGHT7 = 1.0 / 128.0;\nconst float SHIFT_RIGHT5 = 1.0 / 32.0;\nconst float SHIFT_RIGHT3 = 1.0 / 8.0;\nconst float SHIFT_RIGHT2 = 1.0 / 4.0;\nconst float SHIFT_RIGHT1 = 1.0 / 2.0;\n\nvec4 addScreenSpaceOffset(vec4 positionEC, vec2 imageSize, float scale, vec2 direction, vec2 origin, vec2 translate, vec2 pixelOffset, vec3 alignedAxis, bool validAlignedAxis, float rotation, bool sizeInMeters, out mat2 rotationMatrix, out float mpp)\n{\n // Note the halfSize cannot be computed in JavaScript because it is sent via\n // compressed vertex attributes that coerce it to an integer.\n vec2 halfSize = imageSize * scale * 0.5;\n halfSize *= ((direction * 2.0) - 1.0);\n\n vec2 originTranslate = origin * abs(halfSize);\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n if (validAlignedAxis || rotation != 0.0)\n {\n float angle = rotation;\n if (validAlignedAxis)\n {\n vec4 projectedAlignedAxis = czm_modelViewProjection * vec4(alignedAxis, 0.0);\n angle += sign(-projectedAlignedAxis.x) * acos(sign(projectedAlignedAxis.y) * (projectedAlignedAxis.y * projectedAlignedAxis.y) /\n (projectedAlignedAxis.x * projectedAlignedAxis.x + projectedAlignedAxis.y * projectedAlignedAxis.y));\n }\n\n float cosTheta = cos(angle);\n float sinTheta = sin(angle);\n rotationMatrix = mat2(cosTheta, sinTheta, -sinTheta, cosTheta);\n halfSize = rotationMatrix * halfSize;\n }\n else\n {\n rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n mpp = czm_metersPerPixel(positionEC);\n positionEC.xy += (originTranslate + halfSize) * czm_branchFreeTernary(sizeInMeters, 1.0, mpp);\n positionEC.xy += (translate + pixelOffset) * mpp;\n\n return positionEC;\n}\n\n#ifdef VERTEX_DEPTH_CHECK\nfloat getGlobeDepth(vec4 positionEC)\n{\n vec4 posWC = czm_eyeToWindowCoordinates(positionEC);\n\n float globeDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, posWC.xy / czm_viewport.zw));\n\n if (globeDepth == 0.0)\n {\n return 0.0; // not on the globe\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(posWC.xy, globeDepth);\n return eyeCoordinate.z / eyeCoordinate.w;\n}\n#endif\nvoid main()\n{\n // Modifying this shader may also require modifications to Billboard._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndScale.xyz;\n vec3 positionLow = positionLowAndRotation.xyz;\n float scale = positionHighAndScale.w;\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n float rotation = positionLowAndRotation.w;\n#else\n float rotation = 0.0;\n#endif\n\n float compressed = compressedAttribute0.x;\n\n vec2 pixelOffset;\n pixelOffset.x = floor(compressed * SHIFT_RIGHT7);\n compressed -= pixelOffset.x * SHIFT_LEFT7;\n pixelOffset.x -= UPPER_BOUND;\n\n vec2 origin;\n origin.x = floor(compressed * SHIFT_RIGHT5);\n compressed -= origin.x * SHIFT_LEFT5;\n\n origin.y = floor(compressed * SHIFT_RIGHT3);\n compressed -= origin.y * SHIFT_LEFT3;\n\n#ifdef FRAGMENT_DEPTH_CHECK\n vec2 depthOrigin = origin.xy;\n#endif\n origin -= vec2(1.0);\n\n float show = floor(compressed * SHIFT_RIGHT2);\n compressed -= show * SHIFT_LEFT2;\n\n#ifdef INSTANCED\n vec2 textureCoordinatesBottomLeft = czm_decompressTextureCoordinates(compressedAttribute0.w);\n vec2 textureCoordinatesRange = czm_decompressTextureCoordinates(eyeOffset.w);\n vec2 textureCoordinates = textureCoordinatesBottomLeft + direction * textureCoordinatesRange;\n#else\n vec2 direction;\n direction.x = floor(compressed * SHIFT_RIGHT1);\n direction.y = compressed - direction.x * SHIFT_LEFT1;\n\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressedAttribute0.w);\n#endif\n\n float temp = compressedAttribute0.y * SHIFT_RIGHT8;\n pixelOffset.y = -(floor(temp) - UPPER_BOUND);\n\n vec2 translate;\n translate.y = (temp - floor(temp)) * SHIFT_LEFT16;\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n translate.x = floor(temp) - UPPER_BOUND;\n\n translate.y += (temp - floor(temp)) * SHIFT_LEFT8;\n translate.y -= UPPER_BOUND;\n\n temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float temp2 = floor(compressedAttribute2.w * SHIFT_RIGHT2);\n\n vec2 imageSize = vec2(floor(temp), temp2);\n\n#ifdef FRAGMENT_DEPTH_CHECK\n float labelHorizontalOrigin = floor(compressedAttribute2.w - (temp2 * SHIFT_LEFT2));\n float applyTranslate = 0.0;\n if (labelHorizontalOrigin != 0.0) // is a billboard, so set apply translate to false\n {\n applyTranslate = 1.0;\n labelHorizontalOrigin -= 2.0;\n depthOrigin.x = labelHorizontalOrigin + 1.0;\n }\n\n depthOrigin = vec2(1.0) - (depthOrigin * 0.5);\n#endif\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n#if defined(VERTEX_DEPTH_CHECK) || defined(FRAGMENT_DEPTH_CHECK)\n temp = compressedAttribute3.w;\n temp = temp * SHIFT_RIGHT12;\n\n vec2 dimensions;\n dimensions.y = (temp - floor(temp)) * SHIFT_LEFT12;\n dimensions.x = floor(temp);\n#endif\n\n#ifdef ALIGNED_AXIS\n vec3 alignedAxis = czm_octDecode(floor(compressedAttribute1.y * SHIFT_RIGHT8));\n temp = compressedAttribute2.z * SHIFT_RIGHT5;\n bool validAlignedAxis = (temp - floor(temp)) * SHIFT_LEFT1 > 0.0;\n#else\n vec3 alignedAxis = vec3(0.0);\n bool validAlignedAxis = false;\n#endif\n\n vec4 pickColor;\n vec4 color;\n\n temp = compressedAttribute2.y;\n temp = temp * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n temp = compressedAttribute2.x;\n temp = temp * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n temp = compressedAttribute2.z * SHIFT_RIGHT8;\n bool sizeInMeters = floor((temp - floor(temp)) * SHIFT_LEFT7) > 0.0;\n temp = floor(temp) * SHIFT_RIGHT8;\n\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor /= 255.0;\n\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n#if defined(FRAGMENT_DEPTH_CHECK) || defined(VERTEX_DEPTH_CHECK)\n float eyeDepth = positionEC.z;\n#endif\n\n positionEC = czm_eyeOffset(positionEC, eyeOffset.xyz);\n positionEC.xyz *= show;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(EYE_DISTANCE_PIXEL_OFFSET) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n float distanceScale = czm_nearFarScalar(scaleByDistance, lengthSq);\n scale *= distanceScale;\n translate *= distanceScale;\n // push vertex behind near plane for clipping\n if (scale == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency == 0.0)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef EYE_DISTANCE_PIXEL_OFFSET\n float pixelOffsetScale = czm_nearFarScalar(pixelOffsetScaleByDistance, lengthSq);\n pixelOffset *= pixelOffsetScale;\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = compressedAttribute3.x;\n float farSq = compressedAttribute3.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n mat2 rotationMatrix;\n float mpp;\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = compressedAttribute3.z;\n#endif\n\n#ifdef VERTEX_DEPTH_CHECK\nif (lengthSq < disableDepthTestDistance) {\n float depthsilon = 10.0;\n\n vec2 labelTranslate = textureCoordinateBoundsOrLabelTranslate.xy;\n vec4 pEC1 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth1 = getGlobeDepth(pEC1);\n\n if (globeDepth1 != 0.0 && pEC1.z + depthsilon < globeDepth1)\n {\n vec4 pEC2 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(0.0, 1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth2 = getGlobeDepth(pEC2);\n\n if (globeDepth2 != 0.0 && pEC2.z + depthsilon < globeDepth2)\n {\n vec4 pEC3 = addScreenSpaceOffset(positionEC, dimensions, scale, vec2(1.0), origin, labelTranslate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n float globeDepth3 = getGlobeDepth(pEC3);\n if (globeDepth3 != 0.0 && pEC3.z + depthsilon < globeDepth3)\n {\n positionEC.xyz = vec3(0.0);\n }\n }\n }\n}\n#endif\n\n positionEC = addScreenSpaceOffset(positionEC, imageSize, scale, direction, origin, translate, pixelOffset, alignedAxis, validAlignedAxis, rotation, sizeInMeters, rotationMatrix, mpp);\n gl_Position = czm_projection * positionEC;\n v_textureCoordinates = textureCoordinates;\n\n#ifdef LOG_DEPTH\n czm_vertexLogDepth();\n#endif\n\n#ifdef DISABLE_DEPTH_DISTANCE\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don't try to \"multiply both sides\" by w. Greater/less-than comparisons won't work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n v_depthFromNearPlusOne = 1.0;\n#endif\n }\n }\n#endif\n\n#ifdef FRAGMENT_DEPTH_CHECK\n if (sizeInMeters) {\n translate /= mpp;\n dimensions /= mpp;\n imageSize /= mpp;\n }\n\n#if defined(ROTATION) || defined(ALIGNED_AXIS)\n v_rotationMatrix = rotationMatrix;\n#else\n v_rotationMatrix = mat2(1.0, 0.0, 0.0, 1.0);\n#endif\n\n float enableDepthCheck = 0.0;\n if (lengthSq < disableDepthTestDistance)\n {\n enableDepthCheck = 1.0;\n }\n\n float dw = floor(clamp(dimensions.x, 0.0, SHIFT_LEFT12));\n float dh = floor(clamp(dimensions.y, 0.0, SHIFT_LEFT12));\n\n float iw = floor(clamp(imageSize.x, 0.0, SHIFT_LEFT12));\n float ih = floor(clamp(imageSize.y, 0.0, SHIFT_LEFT12));\n\n v_compressed.x = eyeDepth;\n v_compressed.y = applyTranslate * SHIFT_LEFT1 + enableDepthCheck;\n v_compressed.z = dw * SHIFT_LEFT12 + dh;\n v_compressed.w = iw * SHIFT_LEFT12 + ih;\n v_originTextureCoordinateAndTranslate.xy = depthOrigin;\n v_originTextureCoordinateAndTranslate.zw = translate;\n v_textureCoordinateBounds = textureCoordinateBoundsOrLabelTranslate;\n\n#endif\n\n#ifdef SDF\n vec4 outlineColor;\n float outlineWidth;\n\n temp = sdf.x;\n temp = temp * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n temp = sdf.y;\n temp = temp * SHIFT_RIGHT8;\n float temp3 = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineWidth = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.a = floor(temp);\n outlineColor /= 255.0;\n\n v_outlineWidth = outlineWidth / 255.0;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency;\n#endif\n\n v_pickColor = pickColor;\n\n v_color = color;\n v_color.a *= translucency;\n\n}\n"},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=function(e,t,i){return t<i?e<t?t:e>i?i:e:e<i?i:e>t?t:e};var a=function(e,t){t||(t={});var i,a,s,l,u,d,c,f,h,p,m,_=null==t.cutoff?.25:t.cutoff,g=null==t.radius?8:t.radius,v=t.channel||0;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,a=t.height,l=e,d=t.stride?t.stride:Math.floor(e.length/i/a)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(c=(f=e).getContext("2d"),i=f.width,a=f.height,h=c.getImageData(0,0,i,a),l=h.data,d=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(f=e.canvas,c=e,i=f.width,a=f.height,h=c.getImageData(0,0,i,a),l=h.data,d=4):window.ImageData&&e instanceof window.ImageData&&(h=e,i=e.width,a=e.height,l=h.data,d=4);if(s=Math.max(i,a),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*a),p=0,m=u.length;p<m;p++)l[p]=u[p*d+v]/255;else if(1!==d)throw Error("Raw data can have only 1 value per pixel");var y=Array(i*a),b=Array(i*a),w=Array(s),O=Array(s),x=Array(s+1),A=Array(s);for(p=0,m=i*a;p<m;p++){var T=l[p];y[p]=1===T?0:0===T?r:Math.pow(Math.max(0,.5-T),2),b[p]=1===T?r:0===T?0:Math.pow(Math.max(0,T-.5),2)}o(y,i,a,w,O,A,x),o(b,i,a,w,O,A,x);var E=window.Float32Array?new Float32Array(i*a):new Array(i*a);for(p=0,m=i*a;p<m;p++)E[p]=n(1-((y[p]-b[p])/g+_),0,1);return E},r=1e20;function o(e,t,i,n,a,r,o){for(var l=0;l<t;l++){for(var u=0;u<i;u++)n[u]=e[u*t+l];for(s(n,a,r,o,i),u=0;u<i;u++)e[u*t+l]=a[u]}for(u=0;u<i;u++){for(l=0;l<t;l++)n[l]=e[u*t+l];for(s(n,a,r,o,t),l=0;l<t;l++)e[u*t+l]=Math.sqrt(a[l])}}function s(e,t,i,n,a){i[0]=0,n[0]=-r,n[1]=+r;for(var o=1,s=0;o<a;o++){for(var l=(e[o]+o*o-(e[i[s]]+i[s]*i[s]))/(2*o-2*i[s]);l<=n[s];)s--,l=(e[o]+o*o-(e[i[s]]+i[s]*i[s]))/(2*o-2*i[s]);i[++s]=o,n[s]=l,n[s+1]=+r}for(o=0,s=0;o<a;o++){for(;n[s+1]<o;)s++;t[o]=(o-i[s])*(o-i[s])+e[i[s]]}}},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i(167),a=Object(n.b)((function(e){e.exports&&(e.exports=function(){var e=3,t=4,i=12,n=13,a=16,r=17;function o(e,t){void 0===t&&(t=0);var i=e.charCodeAt(t);if(55296<=i&&i<=56319&&t<e.length-1){var n=i;return 56320<=(a=e.charCodeAt(t+1))&&a<=57343?1024*(n-55296)+(a-56320)+65536:n}if(56320<=i&&i<=57343&&t>=1){var a=i;return 55296<=(n=e.charCodeAt(t-1))&&n<=56319?1024*(n-55296)+(a-56320)+65536:a}return i}function s(o,s,l){var u=[o].concat(s).concat([l]),d=u[u.length-2],c=l,f=u.lastIndexOf(14);if(f>1&&u.slice(1,f).every((function(t){return t==e}))&&-1==[e,n,r].indexOf(o))return 2;var h=u.lastIndexOf(t);if(h>0&&u.slice(1,h).every((function(e){return e==t}))&&-1==[i,t].indexOf(d))return u.filter((function(e){return e==t})).length%2==1?3:4;if(0==d&&1==c)return 0;if(2==d||0==d||1==d)return 14==c&&s.every((function(t){return t==e}))?2:1;if(2==c||0==c||1==c)return 1;if(6==d&&(6==c||7==c||9==c||10==c))return 0;if(!(9!=d&&7!=d||7!=c&&8!=c))return 0;if((10==d||8==d)&&8==c)return 0;if(c==e||15==c)return 0;if(5==c)return 0;if(d==i)return 0;var p=-1!=u.indexOf(e)?u.lastIndexOf(e)-1:u.length-2;return-1!=[n,r].indexOf(u[p])&&u.slice(p+1,-1).every((function(t){return t==e}))&&14==c||15==d&&-1!=[a,r].indexOf(c)?0:-1!=s.indexOf(t)?2:d==t&&c==t?0:1}function l(o){return 1536<=o&&o<=1541||1757==o||1807==o||2274==o||3406==o||69821==o||70082<=o&&o<=70083||72250==o||72326<=o&&o<=72329||73030==o?i:13==o?0:10==o?1:0<=o&&o<=9||11<=o&&o<=12||14<=o&&o<=31||127<=o&&o<=159||173==o||1564==o||6158==o||8203==o||8206<=o&&o<=8207||8232==o||8233==o||8234<=o&&o<=8238||8288<=o&&o<=8292||8293==o||8294<=o&&o<=8303||55296<=o&&o<=57343||65279==o||65520<=o&&o<=65528||65529<=o&&o<=65531||113824<=o&&o<=113827||119155<=o&&o<=119162||917504==o||917505==o||917506<=o&&o<=917535||917632<=o&&o<=917759||918e3<=o&&o<=921599?2:768<=o&&o<=879||1155<=o&&o<=1159||1160<=o&&o<=1161||1425<=o&&o<=1469||1471==o||1473<=o&&o<=1474||1476<=o&&o<=1477||1479==o||1552<=o&&o<=1562||1611<=o&&o<=1631||1648==o||1750<=o&&o<=1756||1759<=o&&o<=1764||1767<=o&&o<=1768||1770<=o&&o<=1773||1809==o||1840<=o&&o<=1866||1958<=o&&o<=1968||2027<=o&&o<=2035||2070<=o&&o<=2073||2075<=o&&o<=2083||2085<=o&&o<=2087||2089<=o&&o<=2093||2137<=o&&o<=2139||2260<=o&&o<=2273||2275<=o&&o<=2306||2362==o||2364==o||2369<=o&&o<=2376||2381==o||2385<=o&&o<=2391||2402<=o&&o<=2403||2433==o||2492==o||2494==o||2497<=o&&o<=2500||2509==o||2519==o||2530<=o&&o<=2531||2561<=o&&o<=2562||2620==o||2625<=o&&o<=2626||2631<=o&&o<=2632||2635<=o&&o<=2637||2641==o||2672<=o&&o<=2673||2677==o||2689<=o&&o<=2690||2748==o||2753<=o&&o<=2757||2759<=o&&o<=2760||2765==o||2786<=o&&o<=2787||2810<=o&&o<=2815||2817==o||2876==o||2878==o||2879==o||2881<=o&&o<=2884||2893==o||2902==o||2903==o||2914<=o&&o<=2915||2946==o||3006==o||3008==o||3021==o||3031==o||3072==o||3134<=o&&o<=3136||3142<=o&&o<=3144||3146<=o&&o<=3149||3157<=o&&o<=3158||3170<=o&&o<=3171||3201==o||3260==o||3263==o||3266==o||3270==o||3276<=o&&o<=3277||3285<=o&&o<=3286||3298<=o&&o<=3299||3328<=o&&o<=3329||3387<=o&&o<=3388||3390==o||3393<=o&&o<=3396||3405==o||3415==o||3426<=o&&o<=3427||3530==o||3535==o||3538<=o&&o<=3540||3542==o||3551==o||3633==o||3636<=o&&o<=3642||3655<=o&&o<=3662||3761==o||3764<=o&&o<=3769||3771<=o&&o<=3772||3784<=o&&o<=3789||3864<=o&&o<=3865||3893==o||3895==o||3897==o||3953<=o&&o<=3966||3968<=o&&o<=3972||3974<=o&&o<=3975||3981<=o&&o<=3991||3993<=o&&o<=4028||4038==o||4141<=o&&o<=4144||4146<=o&&o<=4151||4153<=o&&o<=4154||4157<=o&&o<=4158||4184<=o&&o<=4185||4190<=o&&o<=4192||4209<=o&&o<=4212||4226==o||4229<=o&&o<=4230||4237==o||4253==o||4957<=o&&o<=4959||5906<=o&&o<=5908||5938<=o&&o<=5940||5970<=o&&o<=5971||6002<=o&&o<=6003||6068<=o&&o<=6069||6071<=o&&o<=6077||6086==o||6089<=o&&o<=6099||6109==o||6155<=o&&o<=6157||6277<=o&&o<=6278||6313==o||6432<=o&&o<=6434||6439<=o&&o<=6440||6450==o||6457<=o&&o<=6459||6679<=o&&o<=6680||6683==o||6742==o||6744<=o&&o<=6750||6752==o||6754==o||6757<=o&&o<=6764||6771<=o&&o<=6780||6783==o||6832<=o&&o<=6845||6846==o||6912<=o&&o<=6915||6964==o||6966<=o&&o<=6970||6972==o||6978==o||7019<=o&&o<=7027||7040<=o&&o<=7041||7074<=o&&o<=7077||7080<=o&&o<=7081||7083<=o&&o<=7085||7142==o||7144<=o&&o<=7145||7149==o||7151<=o&&o<=7153||7212<=o&&o<=7219||7222<=o&&o<=7223||7376<=o&&o<=7378||7380<=o&&o<=7392||7394<=o&&o<=7400||7405==o||7412==o||7416<=o&&o<=7417||7616<=o&&o<=7673||7675<=o&&o<=7679||8204==o||8400<=o&&o<=8412||8413<=o&&o<=8416||8417==o||8418<=o&&o<=8420||8421<=o&&o<=8432||11503<=o&&o<=11505||11647==o||11744<=o&&o<=11775||12330<=o&&o<=12333||12334<=o&&o<=12335||12441<=o&&o<=12442||42607==o||42608<=o&&o<=42610||42612<=o&&o<=42621||42654<=o&&o<=42655||42736<=o&&o<=42737||43010==o||43014==o||43019==o||43045<=o&&o<=43046||43204<=o&&o<=43205||43232<=o&&o<=43249||43302<=o&&o<=43309||43335<=o&&o<=43345||43392<=o&&o<=43394||43443==o||43446<=o&&o<=43449||43452==o||43493==o||43561<=o&&o<=43566||43569<=o&&o<=43570||43573<=o&&o<=43574||43587==o||43596==o||43644==o||43696==o||43698<=o&&o<=43700||43703<=o&&o<=43704||43710<=o&&o<=43711||43713==o||43756<=o&&o<=43757||43766==o||44005==o||44008==o||44013==o||64286==o||65024<=o&&o<=65039||65056<=o&&o<=65071||65438<=o&&o<=65439||66045==o||66272==o||66422<=o&&o<=66426||68097<=o&&o<=68099||68101<=o&&o<=68102||68108<=o&&o<=68111||68152<=o&&o<=68154||68159==o||68325<=o&&o<=68326||69633==o||69688<=o&&o<=69702||69759<=o&&o<=69761||69811<=o&&o<=69814||69817<=o&&o<=69818||69888<=o&&o<=69890||69927<=o&&o<=69931||69933<=o&&o<=69940||70003==o||70016<=o&&o<=70017||70070<=o&&o<=70078||70090<=o&&o<=70092||70191<=o&&o<=70193||70196==o||70198<=o&&o<=70199||70206==o||70367==o||70371<=o&&o<=70378||70400<=o&&o<=70401||70460==o||70462==o||70464==o||70487==o||70502<=o&&o<=70508||70512<=o&&o<=70516||70712<=o&&o<=70719||70722<=o&&o<=70724||70726==o||70832==o||70835<=o&&o<=70840||70842==o||70845==o||70847<=o&&o<=70848||70850<=o&&o<=70851||71087==o||71090<=o&&o<=71093||71100<=o&&o<=71101||71103<=o&&o<=71104||71132<=o&&o<=71133||71219<=o&&o<=71226||71229==o||71231<=o&&o<=71232||71339==o||71341==o||71344<=o&&o<=71349||71351==o||71453<=o&&o<=71455||71458<=o&&o<=71461||71463<=o&&o<=71467||72193<=o&&o<=72198||72201<=o&&o<=72202||72243<=o&&o<=72248||72251<=o&&o<=72254||72263==o||72273<=o&&o<=72278||72281<=o&&o<=72283||72330<=o&&o<=72342||72344<=o&&o<=72345||72752<=o&&o<=72758||72760<=o&&o<=72765||72767==o||72850<=o&&o<=72871||72874<=o&&o<=72880||72882<=o&&o<=72883||72885<=o&&o<=72886||73009<=o&&o<=73014||73018==o||73020<=o&&o<=73021||73023<=o&&o<=73029||73031==o||92912<=o&&o<=92916||92976<=o&&o<=92982||94095<=o&&o<=94098||113821<=o&&o<=113822||119141==o||119143<=o&&o<=119145||119150<=o&&o<=119154||119163<=o&&o<=119170||119173<=o&&o<=119179||119210<=o&&o<=119213||119362<=o&&o<=119364||121344<=o&&o<=121398||121403<=o&&o<=121452||121461==o||121476==o||121499<=o&&o<=121503||121505<=o&&o<=121519||122880<=o&&o<=122886||122888<=o&&o<=122904||122907<=o&&o<=122913||122915<=o&&o<=122916||122918<=o&&o<=122922||125136<=o&&o<=125142||125252<=o&&o<=125258||917536<=o&&o<=917631||917760<=o&&o<=917999?e:127462<=o&&o<=127487?t:2307==o||2363==o||2366<=o&&o<=2368||2377<=o&&o<=2380||2382<=o&&o<=2383||2434<=o&&o<=2435||2495<=o&&o<=2496||2503<=o&&o<=2504||2507<=o&&o<=2508||2563==o||2622<=o&&o<=2624||2691==o||2750<=o&&o<=2752||2761==o||2763<=o&&o<=2764||2818<=o&&o<=2819||2880==o||2887<=o&&o<=2888||2891<=o&&o<=2892||3007==o||3009<=o&&o<=3010||3014<=o&&o<=3016||3018<=o&&o<=3020||3073<=o&&o<=3075||3137<=o&&o<=3140||3202<=o&&o<=3203||3262==o||3264<=o&&o<=3265||3267<=o&&o<=3268||3271<=o&&o<=3272||3274<=o&&o<=3275||3330<=o&&o<=3331||3391<=o&&o<=3392||3398<=o&&o<=3400||3402<=o&&o<=3404||3458<=o&&o<=3459||3536<=o&&o<=3537||3544<=o&&o<=3550||3570<=o&&o<=3571||3635==o||3763==o||3902<=o&&o<=3903||3967==o||4145==o||4155<=o&&o<=4156||4182<=o&&o<=4183||4228==o||6070==o||6078<=o&&o<=6085||6087<=o&&o<=6088||6435<=o&&o<=6438||6441<=o&&o<=6443||6448<=o&&o<=6449||6451<=o&&o<=6456||6681<=o&&o<=6682||6741==o||6743==o||6765<=o&&o<=6770||6916==o||6965==o||6971==o||6973<=o&&o<=6977||6979<=o&&o<=6980||7042==o||7073==o||7078<=o&&o<=7079||7082==o||7143==o||7146<=o&&o<=7148||7150==o||7154<=o&&o<=7155||7204<=o&&o<=7211||7220<=o&&o<=7221||7393==o||7410<=o&&o<=7411||7415==o||43043<=o&&o<=43044||43047==o||43136<=o&&o<=43137||43188<=o&&o<=43203||43346<=o&&o<=43347||43395==o||43444<=o&&o<=43445||43450<=o&&o<=43451||43453<=o&&o<=43456||43567<=o&&o<=43568||43571<=o&&o<=43572||43597==o||43755==o||43758<=o&&o<=43759||43765==o||44003<=o&&o<=44004||44006<=o&&o<=44007||44009<=o&&o<=44010||44012==o||69632==o||69634==o||69762==o||69808<=o&&o<=69810||69815<=o&&o<=69816||69932==o||70018==o||70067<=o&&o<=70069||70079<=o&&o<=70080||70188<=o&&o<=70190||70194<=o&&o<=70195||70197==o||70368<=o&&o<=70370||70402<=o&&o<=70403||70463==o||70465<=o&&o<=70468||70471<=o&&o<=70472||70475<=o&&o<=70477||70498<=o&&o<=70499||70709<=o&&o<=70711||70720<=o&&o<=70721||70725==o||70833<=o&&o<=70834||70841==o||70843<=o&&o<=70844||70846==o||70849==o||71088<=o&&o<=71089||71096<=o&&o<=71099||71102==o||71216<=o&&o<=71218||71227<=o&&o<=71228||71230==o||71340==o||71342<=o&&o<=71343||71350==o||71456<=o&&o<=71457||71462==o||72199<=o&&o<=72200||72249==o||72279<=o&&o<=72280||72343==o||72751==o||72766==o||72873==o||72881==o||72884==o||94033<=o&&o<=94078||119142==o||119149==o?5:4352<=o&&o<=4447||43360<=o&&o<=43388?6:4448<=o&&o<=4519||55216<=o&&o<=55238?7:4520<=o&&o<=4607||55243<=o&&o<=55291?8:44032==o||44060==o||44088==o||44116==o||44144==o||44172==o||44200==o||44228==o||44256==o||44284==o||44312==o||44340==o||44368==o||44396==o||44424==o||44452==o||44480==o||44508==o||44536==o||44564==o||44592==o||44620==o||44648==o||44676==o||44704==o||44732==o||44760==o||44788==o||44816==o||44844==o||44872==o||44900==o||44928==o||44956==o||44984==o||45012==o||45040==o||45068==o||45096==o||45124==o||45152==o||45180==o||45208==o||45236==o||45264==o||45292==o||45320==o||45348==o||45376==o||45404==o||45432==o||45460==o||45488==o||45516==o||45544==o||45572==o||45600==o||45628==o||45656==o||45684==o||45712==o||45740==o||45768==o||45796==o||45824==o||45852==o||45880==o||45908==o||45936==o||45964==o||45992==o||46020==o||46048==o||46076==o||46104==o||46132==o||46160==o||46188==o||46216==o||46244==o||46272==o||46300==o||46328==o||46356==o||46384==o||46412==o||46440==o||46468==o||46496==o||46524==o||46552==o||46580==o||46608==o||46636==o||46664==o||46692==o||46720==o||46748==o||46776==o||46804==o||46832==o||46860==o||46888==o||46916==o||46944==o||46972==o||47e3==o||47028==o||47056==o||47084==o||47112==o||47140==o||47168==o||47196==o||47224==o||47252==o||47280==o||47308==o||47336==o||47364==o||47392==o||47420==o||47448==o||47476==o||47504==o||47532==o||47560==o||47588==o||47616==o||47644==o||47672==o||47700==o||47728==o||47756==o||47784==o||47812==o||47840==o||47868==o||47896==o||47924==o||47952==o||47980==o||48008==o||48036==o||48064==o||48092==o||48120==o||48148==o||48176==o||48204==o||48232==o||48260==o||48288==o||48316==o||48344==o||48372==o||48400==o||48428==o||48456==o||48484==o||48512==o||48540==o||48568==o||48596==o||48624==o||48652==o||48680==o||48708==o||48736==o||48764==o||48792==o||48820==o||48848==o||48876==o||48904==o||48932==o||48960==o||48988==o||49016==o||49044==o||49072==o||49100==o||49128==o||49156==o||49184==o||49212==o||49240==o||49268==o||49296==o||49324==o||49352==o||49380==o||49408==o||49436==o||49464==o||49492==o||49520==o||49548==o||49576==o||49604==o||49632==o||49660==o||49688==o||49716==o||49744==o||49772==o||49800==o||49828==o||49856==o||49884==o||49912==o||49940==o||49968==o||49996==o||50024==o||50052==o||50080==o||50108==o||50136==o||50164==o||50192==o||50220==o||50248==o||50276==o||50304==o||50332==o||50360==o||50388==o||50416==o||50444==o||50472==o||50500==o||50528==o||50556==o||50584==o||50612==o||50640==o||50668==o||50696==o||50724==o||50752==o||50780==o||50808==o||50836==o||50864==o||50892==o||50920==o||50948==o||50976==o||51004==o||51032==o||51060==o||51088==o||51116==o||51144==o||51172==o||51200==o||51228==o||51256==o||51284==o||51312==o||51340==o||51368==o||51396==o||51424==o||51452==o||51480==o||51508==o||51536==o||51564==o||51592==o||51620==o||51648==o||51676==o||51704==o||51732==o||51760==o||51788==o||51816==o||51844==o||51872==o||51900==o||51928==o||51956==o||51984==o||52012==o||52040==o||52068==o||52096==o||52124==o||52152==o||52180==o||52208==o||52236==o||52264==o||52292==o||52320==o||52348==o||52376==o||52404==o||52432==o||52460==o||52488==o||52516==o||52544==o||52572==o||52600==o||52628==o||52656==o||52684==o||52712==o||52740==o||52768==o||52796==o||52824==o||52852==o||52880==o||52908==o||52936==o||52964==o||52992==o||53020==o||53048==o||53076==o||53104==o||53132==o||53160==o||53188==o||53216==o||53244==o||53272==o||53300==o||53328==o||53356==o||53384==o||53412==o||53440==o||53468==o||53496==o||53524==o||53552==o||53580==o||53608==o||53636==o||53664==o||53692==o||53720==o||53748==o||53776==o||53804==o||53832==o||53860==o||53888==o||53916==o||53944==o||53972==o||54e3==o||54028==o||54056==o||54084==o||54112==o||54140==o||54168==o||54196==o||54224==o||54252==o||54280==o||54308==o||54336==o||54364==o||54392==o||54420==o||54448==o||54476==o||54504==o||54532==o||54560==o||54588==o||54616==o||54644==o||54672==o||54700==o||54728==o||54756==o||54784==o||54812==o||54840==o||54868==o||54896==o||54924==o||54952==o||54980==o||55008==o||55036==o||55064==o||55092==o||55120==o||55148==o||55176==o?9:44033<=o&&o<=44059||44061<=o&&o<=44087||44089<=o&&o<=44115||44117<=o&&o<=44143||44145<=o&&o<=44171||44173<=o&&o<=44199||44201<=o&&o<=44227||44229<=o&&o<=44255||44257<=o&&o<=44283||44285<=o&&o<=44311||44313<=o&&o<=44339||44341<=o&&o<=44367||44369<=o&&o<=44395||44397<=o&&o<=44423||44425<=o&&o<=44451||44453<=o&&o<=44479||44481<=o&&o<=44507||44509<=o&&o<=44535||44537<=o&&o<=44563||44565<=o&&o<=44591||44593<=o&&o<=44619||44621<=o&&o<=44647||44649<=o&&o<=44675||44677<=o&&o<=44703||44705<=o&&o<=44731||44733<=o&&o<=44759||44761<=o&&o<=44787||44789<=o&&o<=44815||44817<=o&&o<=44843||44845<=o&&o<=44871||44873<=o&&o<=44899||44901<=o&&o<=44927||44929<=o&&o<=44955||44957<=o&&o<=44983||44985<=o&&o<=45011||45013<=o&&o<=45039||45041<=o&&o<=45067||45069<=o&&o<=45095||45097<=o&&o<=45123||45125<=o&&o<=45151||45153<=o&&o<=45179||45181<=o&&o<=45207||45209<=o&&o<=45235||45237<=o&&o<=45263||45265<=o&&o<=45291||45293<=o&&o<=45319||45321<=o&&o<=45347||45349<=o&&o<=45375||45377<=o&&o<=45403||45405<=o&&o<=45431||45433<=o&&o<=45459||45461<=o&&o<=45487||45489<=o&&o<=45515||45517<=o&&o<=45543||45545<=o&&o<=45571||45573<=o&&o<=45599||45601<=o&&o<=45627||45629<=o&&o<=45655||45657<=o&&o<=45683||45685<=o&&o<=45711||45713<=o&&o<=45739||45741<=o&&o<=45767||45769<=o&&o<=45795||45797<=o&&o<=45823||45825<=o&&o<=45851||45853<=o&&o<=45879||45881<=o&&o<=45907||45909<=o&&o<=45935||45937<=o&&o<=45963||45965<=o&&o<=45991||45993<=o&&o<=46019||46021<=o&&o<=46047||46049<=o&&o<=46075||46077<=o&&o<=46103||46105<=o&&o<=46131||46133<=o&&o<=46159||46161<=o&&o<=46187||46189<=o&&o<=46215||46217<=o&&o<=46243||46245<=o&&o<=46271||46273<=o&&o<=46299||46301<=o&&o<=46327||46329<=o&&o<=46355||46357<=o&&o<=46383||46385<=o&&o<=46411||46413<=o&&o<=46439||46441<=o&&o<=46467||46469<=o&&o<=46495||46497<=o&&o<=46523||46525<=o&&o<=46551||46553<=o&&o<=46579||46581<=o&&o<=46607||46609<=o&&o<=46635||46637<=o&&o<=46663||46665<=o&&o<=46691||46693<=o&&o<=46719||46721<=o&&o<=46747||46749<=o&&o<=46775||46777<=o&&o<=46803||46805<=o&&o<=46831||46833<=o&&o<=46859||46861<=o&&o<=46887||46889<=o&&o<=46915||46917<=o&&o<=46943||46945<=o&&o<=46971||46973<=o&&o<=46999||47001<=o&&o<=47027||47029<=o&&o<=47055||47057<=o&&o<=47083||47085<=o&&o<=47111||47113<=o&&o<=47139||47141<=o&&o<=47167||47169<=o&&o<=47195||47197<=o&&o<=47223||47225<=o&&o<=47251||47253<=o&&o<=47279||47281<=o&&o<=47307||47309<=o&&o<=47335||47337<=o&&o<=47363||47365<=o&&o<=47391||47393<=o&&o<=47419||47421<=o&&o<=47447||47449<=o&&o<=47475||47477<=o&&o<=47503||47505<=o&&o<=47531||47533<=o&&o<=47559||47561<=o&&o<=47587||47589<=o&&o<=47615||47617<=o&&o<=47643||47645<=o&&o<=47671||47673<=o&&o<=47699||47701<=o&&o<=47727||47729<=o&&o<=47755||47757<=o&&o<=47783||47785<=o&&o<=47811||47813<=o&&o<=47839||47841<=o&&o<=47867||47869<=o&&o<=47895||47897<=o&&o<=47923||47925<=o&&o<=47951||47953<=o&&o<=47979||47981<=o&&o<=48007||48009<=o&&o<=48035||48037<=o&&o<=48063||48065<=o&&o<=48091||48093<=o&&o<=48119||48121<=o&&o<=48147||48149<=o&&o<=48175||48177<=o&&o<=48203||48205<=o&&o<=48231||48233<=o&&o<=48259||48261<=o&&o<=48287||48289<=o&&o<=48315||48317<=o&&o<=48343||48345<=o&&o<=48371||48373<=o&&o<=48399||48401<=o&&o<=48427||48429<=o&&o<=48455||48457<=o&&o<=48483||48485<=o&&o<=48511||48513<=o&&o<=48539||48541<=o&&o<=48567||48569<=o&&o<=48595||48597<=o&&o<=48623||48625<=o&&o<=48651||48653<=o&&o<=48679||48681<=o&&o<=48707||48709<=o&&o<=48735||48737<=o&&o<=48763||48765<=o&&o<=48791||48793<=o&&o<=48819||48821<=o&&o<=48847||48849<=o&&o<=48875||48877<=o&&o<=48903||48905<=o&&o<=48931||48933<=o&&o<=48959||48961<=o&&o<=48987||48989<=o&&o<=49015||49017<=o&&o<=49043||49045<=o&&o<=49071||49073<=o&&o<=49099||49101<=o&&o<=49127||49129<=o&&o<=49155||49157<=o&&o<=49183||49185<=o&&o<=49211||49213<=o&&o<=49239||49241<=o&&o<=49267||49269<=o&&o<=49295||49297<=o&&o<=49323||49325<=o&&o<=49351||49353<=o&&o<=49379||49381<=o&&o<=49407||49409<=o&&o<=49435||49437<=o&&o<=49463||49465<=o&&o<=49491||49493<=o&&o<=49519||49521<=o&&o<=49547||49549<=o&&o<=49575||49577<=o&&o<=49603||49605<=o&&o<=49631||49633<=o&&o<=49659||49661<=o&&o<=49687||49689<=o&&o<=49715||49717<=o&&o<=49743||49745<=o&&o<=49771||49773<=o&&o<=49799||49801<=o&&o<=49827||49829<=o&&o<=49855||49857<=o&&o<=49883||49885<=o&&o<=49911||49913<=o&&o<=49939||49941<=o&&o<=49967||49969<=o&&o<=49995||49997<=o&&o<=50023||50025<=o&&o<=50051||50053<=o&&o<=50079||50081<=o&&o<=50107||50109<=o&&o<=50135||50137<=o&&o<=50163||50165<=o&&o<=50191||50193<=o&&o<=50219||50221<=o&&o<=50247||50249<=o&&o<=50275||50277<=o&&o<=50303||50305<=o&&o<=50331||50333<=o&&o<=50359||50361<=o&&o<=50387||50389<=o&&o<=50415||50417<=o&&o<=50443||50445<=o&&o<=50471||50473<=o&&o<=50499||50501<=o&&o<=50527||50529<=o&&o<=50555||50557<=o&&o<=50583||50585<=o&&o<=50611||50613<=o&&o<=50639||50641<=o&&o<=50667||50669<=o&&o<=50695||50697<=o&&o<=50723||50725<=o&&o<=50751||50753<=o&&o<=50779||50781<=o&&o<=50807||50809<=o&&o<=50835||50837<=o&&o<=50863||50865<=o&&o<=50891||50893<=o&&o<=50919||50921<=o&&o<=50947||50949<=o&&o<=50975||50977<=o&&o<=51003||51005<=o&&o<=51031||51033<=o&&o<=51059||51061<=o&&o<=51087||51089<=o&&o<=51115||51117<=o&&o<=51143||51145<=o&&o<=51171||51173<=o&&o<=51199||51201<=o&&o<=51227||51229<=o&&o<=51255||51257<=o&&o<=51283||51285<=o&&o<=51311||51313<=o&&o<=51339||51341<=o&&o<=51367||51369<=o&&o<=51395||51397<=o&&o<=51423||51425<=o&&o<=51451||51453<=o&&o<=51479||51481<=o&&o<=51507||51509<=o&&o<=51535||51537<=o&&o<=51563||51565<=o&&o<=51591||51593<=o&&o<=51619||51621<=o&&o<=51647||51649<=o&&o<=51675||51677<=o&&o<=51703||51705<=o&&o<=51731||51733<=o&&o<=51759||51761<=o&&o<=51787||51789<=o&&o<=51815||51817<=o&&o<=51843||51845<=o&&o<=51871||51873<=o&&o<=51899||51901<=o&&o<=51927||51929<=o&&o<=51955||51957<=o&&o<=51983||51985<=o&&o<=52011||52013<=o&&o<=52039||52041<=o&&o<=52067||52069<=o&&o<=52095||52097<=o&&o<=52123||52125<=o&&o<=52151||52153<=o&&o<=52179||52181<=o&&o<=52207||52209<=o&&o<=52235||52237<=o&&o<=52263||52265<=o&&o<=52291||52293<=o&&o<=52319||52321<=o&&o<=52347||52349<=o&&o<=52375||52377<=o&&o<=52403||52405<=o&&o<=52431||52433<=o&&o<=52459||52461<=o&&o<=52487||52489<=o&&o<=52515||52517<=o&&o<=52543||52545<=o&&o<=52571||52573<=o&&o<=52599||52601<=o&&o<=52627||52629<=o&&o<=52655||52657<=o&&o<=52683||52685<=o&&o<=52711||52713<=o&&o<=52739||52741<=o&&o<=52767||52769<=o&&o<=52795||52797<=o&&o<=52823||52825<=o&&o<=52851||52853<=o&&o<=52879||52881<=o&&o<=52907||52909<=o&&o<=52935||52937<=o&&o<=52963||52965<=o&&o<=52991||52993<=o&&o<=53019||53021<=o&&o<=53047||53049<=o&&o<=53075||53077<=o&&o<=53103||53105<=o&&o<=53131||53133<=o&&o<=53159||53161<=o&&o<=53187||53189<=o&&o<=53215||53217<=o&&o<=53243||53245<=o&&o<=53271||53273<=o&&o<=53299||53301<=o&&o<=53327||53329<=o&&o<=53355||53357<=o&&o<=53383||53385<=o&&o<=53411||53413<=o&&o<=53439||53441<=o&&o<=53467||53469<=o&&o<=53495||53497<=o&&o<=53523||53525<=o&&o<=53551||53553<=o&&o<=53579||53581<=o&&o<=53607||53609<=o&&o<=53635||53637<=o&&o<=53663||53665<=o&&o<=53691||53693<=o&&o<=53719||53721<=o&&o<=53747||53749<=o&&o<=53775||53777<=o&&o<=53803||53805<=o&&o<=53831||53833<=o&&o<=53859||53861<=o&&o<=53887||53889<=o&&o<=53915||53917<=o&&o<=53943||53945<=o&&o<=53971||53973<=o&&o<=53999||54001<=o&&o<=54027||54029<=o&&o<=54055||54057<=o&&o<=54083||54085<=o&&o<=54111||54113<=o&&o<=54139||54141<=o&&o<=54167||54169<=o&&o<=54195||54197<=o&&o<=54223||54225<=o&&o<=54251||54253<=o&&o<=54279||54281<=o&&o<=54307||54309<=o&&o<=54335||54337<=o&&o<=54363||54365<=o&&o<=54391||54393<=o&&o<=54419||54421<=o&&o<=54447||54449<=o&&o<=54475||54477<=o&&o<=54503||54505<=o&&o<=54531||54533<=o&&o<=54559||54561<=o&&o<=54587||54589<=o&&o<=54615||54617<=o&&o<=54643||54645<=o&&o<=54671||54673<=o&&o<=54699||54701<=o&&o<=54727||54729<=o&&o<=54755||54757<=o&&o<=54783||54785<=o&&o<=54811||54813<=o&&o<=54839||54841<=o&&o<=54867||54869<=o&&o<=54895||54897<=o&&o<=54923||54925<=o&&o<=54951||54953<=o&&o<=54979||54981<=o&&o<=55007||55009<=o&&o<=55035||55037<=o&&o<=55063||55065<=o&&o<=55091||55093<=o&&o<=55119||55121<=o&&o<=55147||55149<=o&&o<=55175||55177<=o&&o<=55203?10:9757==o||9977==o||9994<=o&&o<=9997||127877==o||127938<=o&&o<=127940||127943==o||127946<=o&&o<=127948||128066<=o&&o<=128067||128070<=o&&o<=128080||128110==o||128112<=o&&o<=128120||128124==o||128129<=o&&o<=128131||128133<=o&&o<=128135||128170==o||128372<=o&&o<=128373||128378==o||128400==o||128405<=o&&o<=128406||128581<=o&&o<=128583||128587<=o&&o<=128591||128675==o||128692<=o&&o<=128694||128704==o||128716==o||129304<=o&&o<=129308||129310<=o&&o<=129311||129318==o||129328<=o&&o<=129337||129341<=o&&o<=129342||129489<=o&&o<=129501?n:127995<=o&&o<=127999?14:8205==o?15:9792==o||9794==o||9877<=o&&o<=9878||9992==o||10084==o||127752==o||127806==o||127859==o||127891==o||127908==o||127912==o||127979==o||127981==o||128139==o||128187<=o&&o<=128188||128295==o||128300==o||128488==o||128640==o||128658==o?a:128102<=o&&o<=128105?r:11}return this.nextBreak=function(e,t){if(void 0===t&&(t=0),t<0)return 0;if(t>=e.length-1)return e.length;for(var i,n,a=l(o(e,t)),r=[],u=t+1;u<e.length;u++)if(n=u-1,!(55296<=(i=e).charCodeAt(n)&&i.charCodeAt(n)<=56319&&56320<=i.charCodeAt(n+1)&&i.charCodeAt(n+1)<=57343)){var d=l(o(e,u));if(s(a,r,d))return u;r.push(d)}return e.length},this.splitGraphemes=function(e){for(var t,i=[],n=0;(t=this.nextBreak(e,n))<e.length;)i.push(e.slice(n,t)),n=t;return n<e.length&&i.push(e.slice(n)),i},this.iterateGraphemes=function(e){var t=0,i={next:function(){var i,n;return(n=this.nextBreak(e,t))<e.length?(i=e.slice(t,n),t=n,{value:i,done:!1}):t<e.length?(i=e.slice(t),t=e.length,{value:i,done:!1}):{value:void 0,done:!0}}.bind(this)};return"undefined"!=typeof Symbol&&Symbol.iterator&&(i[Symbol.iterator]=function(){return i}),i},this.countGraphemes=function(e){for(var t,i=0,n=0;(t=this.nextBreak(e,n))<e.length;)n=t,i++;return n<e.length&&i++,i},this})}))},function(e,t,i){"use strict";t.a='uniform float u_maxTotalPointSize;\n\nattribute vec4 positionHighAndSize;\nattribute vec4 positionLowAndOutline;\nattribute vec4 compressedAttribute0; // color, outlineColor, pick color\nattribute vec4 compressedAttribute1; // show, translucency by distance, some free space\nattribute vec4 scaleByDistance; // near, nearScale, far, farScale\nattribute vec3 distanceDisplayConditionAndDisableDepth; // near, far, disableDepthTestDistance\n\nvarying vec4 v_color;\nvarying vec4 v_outlineColor;\nvarying float v_innerPercent;\nvarying float v_pixelDistance;\nvarying vec4 v_pickColor;\n\nconst float SHIFT_LEFT8 = 256.0;\nconst float SHIFT_RIGHT8 = 1.0 / 256.0;\n\nvoid main()\n{\n // Modifying this shader may also require modifications to PointPrimitive._computeScreenSpacePosition\n\n // unpack attributes\n vec3 positionHigh = positionHighAndSize.xyz;\n vec3 positionLow = positionLowAndOutline.xyz;\n float outlineWidthBothSides = 2.0 * positionLowAndOutline.w;\n float totalSize = positionHighAndSize.w + outlineWidthBothSides;\n float outlinePercent = outlineWidthBothSides / totalSize;\n // Scale in response to browser-zoom.\n totalSize *= czm_pixelRatio;\n // Add padding for anti-aliasing on both sides.\n totalSize += 3.0;\n\n float temp = compressedAttribute1.x * SHIFT_RIGHT8;\n float show = floor(temp);\n\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n vec4 translucencyByDistance;\n translucencyByDistance.x = compressedAttribute1.z;\n translucencyByDistance.z = compressedAttribute1.w;\n\n translucencyByDistance.y = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n\n temp = compressedAttribute1.y * SHIFT_RIGHT8;\n translucencyByDistance.w = ((temp - floor(temp)) * SHIFT_LEFT8) / 255.0;\n#endif\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 color;\n vec4 outlineColor;\n vec4 pickColor;\n\n // compressedAttribute0.z => pickColor.rgb\n\n temp = compressedAttribute0.z * SHIFT_RIGHT8;\n pickColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n pickColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor.r = floor(temp);\n\n // compressedAttribute0.x => color.rgb\n\n temp = compressedAttribute0.x * SHIFT_RIGHT8;\n color.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n color.g = (temp - floor(temp)) * SHIFT_LEFT8;\n color.r = floor(temp);\n\n // compressedAttribute0.y => outlineColor.rgb\n\n temp = compressedAttribute0.y * SHIFT_RIGHT8;\n outlineColor.b = (temp - floor(temp)) * SHIFT_LEFT8;\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.g = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor.r = floor(temp);\n\n // compressedAttribute0.w => color.a, outlineColor.a, pickColor.a\n\n temp = compressedAttribute0.w * SHIFT_RIGHT8;\n pickColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n pickColor = pickColor / 255.0;\n\n temp = floor(temp) * SHIFT_RIGHT8;\n outlineColor.a = (temp - floor(temp)) * SHIFT_LEFT8;\n outlineColor /= 255.0;\n color.a = floor(temp);\n color /= 255.0;\n\n ///////////////////////////////////////////////////////////////////////////\n\n vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n vec4 positionEC = czm_modelViewRelativeToEye * p;\n\n ///////////////////////////////////////////////////////////////////////////\n\n#if defined(EYE_DISTANCE_SCALING) || defined(EYE_DISTANCE_TRANSLUCENCY) || defined(DISTANCE_DISPLAY_CONDITION) || defined(DISABLE_DEPTH_DISTANCE)\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n // 2D camera distance is a special case\n // treat all billboards as flattened to the z=0.0 plane\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n lengthSq = dot(positionEC.xyz, positionEC.xyz);\n }\n#endif\n\n#ifdef EYE_DISTANCE_SCALING\n totalSize *= czm_nearFarScalar(scaleByDistance, lengthSq);\n#endif\n // Clamp to max point size.\n totalSize = min(totalSize, u_maxTotalPointSize);\n // If size is too small, push vertex behind near plane for clipping.\n // Note that context.minimumAliasedPointSize "will be at most 1.0".\n if (totalSize < 1.0)\n {\n positionEC.xyz = vec3(0.0);\n totalSize = 1.0;\n }\n\n float translucency = 1.0;\n#ifdef EYE_DISTANCE_TRANSLUCENCY\n translucency = czm_nearFarScalar(translucencyByDistance, lengthSq);\n // push vertex behind near plane for clipping\n if (translucency < 0.004)\n {\n positionEC.xyz = vec3(0.0);\n }\n#endif\n\n#ifdef DISTANCE_DISPLAY_CONDITION\n float nearSq = distanceDisplayConditionAndDisableDepth.x;\n float farSq = distanceDisplayConditionAndDisableDepth.y;\n if (lengthSq < nearSq || lengthSq > farSq) {\n // push vertex behind camera to force it to be clipped\n positionEC.xyz = vec3(0.0, 0.0, 1.0);\n }\n#endif\n\n gl_Position = czm_projection * positionEC;\n czm_vertexLogDepth();\n\n#ifdef DISABLE_DEPTH_DISTANCE\n float disableDepthTestDistance = distanceDisplayConditionAndDisableDepth.z;\n if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n {\n disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n }\n\n if (disableDepthTestDistance != 0.0)\n {\n // Don\'t try to "multiply both sides" by w. Greater/less-than comparisons won\'t work for negative values of w.\n float zclip = gl_Position.z / gl_Position.w;\n bool clipped = (zclip < -1.0 || zclip > 1.0);\n if (!clipped && (disableDepthTestDistance < 0.0 || (lengthSq > 0.0 && lengthSq < disableDepthTestDistance)))\n {\n // Position z on the near plane.\n gl_Position.z = -gl_Position.w;\n#ifdef LOG_DEPTH\n czm_vertexLogDepth(vec4(czm_currentFrustum.x));\n#endif\n }\n }\n#endif\n\n v_color = color;\n v_color.a *= translucency * show;\n v_outlineColor = outlineColor;\n v_outlineColor.a *= translucency * show;\n\n v_innerPercent = 1.0 - outlinePercent;\n v_pixelDistance = 2.0 / totalSize;\n gl_PointSize = totalSize * show;\n gl_Position *= show;\n\n v_pickColor = pickColor;\n}\n'},function(e,t,i){"use strict";function n(e,t,i,r,o,s){if(o-r<=i)return;const l=r+o>>1;!function e(t,i,n,r,o,s){for(;o>r;){if(o-r>600){const a=o-r+1,l=n-r+1,u=Math.log(a),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(a-d)/a)*(l-a/2<0?-1:1),f=Math.max(r,Math.floor(n-l*d/a+c)),h=Math.min(o,Math.floor(n+(a-l)*d/a+c));e(t,i,n,f,h,s)}const l=i[2*n+s];let u=r,d=o;for(a(t,i,r,n),i[2*o+s]>l&&a(t,i,r,o);u<d;){for(a(t,i,u,d),u++,d--;i[2*u+s]<l;)u++;for(;i[2*d+s]>l;)d--}i[2*r+s]===l?a(t,i,r,d):(d++,a(t,i,d,o)),d<=n&&(r=d+1),n<=d&&(o=d-1)}}(e,t,l,r,o,s%2),n(e,t,i,r,l-1,s+1),n(e,t,i,l+1,o,s+1)}function a(e,t,i,n){r(e,i,n),r(t,2*i,2*n),r(t,2*i+1,2*n+1)}function r(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function o(e,t,i,n){const a=e-i,r=t-n;return a*a+r*r}i.d(t,"a",(function(){return u}));const s=e=>e[0],l=e=>e[1];class u{constructor(e,t=s,i=l,a=64,r=Float64Array){this.nodeSize=a,this.points=e;const o=e.length<65536?Uint16Array:Uint32Array,u=this.ids=new o(e.length),d=this.coords=new r(2*e.length);for(let n=0;n<e.length;n++)u[n]=n,d[2*n]=t(e[n]),d[2*n+1]=i(e[n]);n(u,d,a,0,u.length-1,0)}range(e,t,i,n){return function(e,t,i,n,a,r,o){const s=[0,e.length-1,0],l=[];let u,d;for(;s.length;){const c=s.pop(),f=s.pop(),h=s.pop();if(f-h<=o){for(let o=h;o<=f;o++)u=t[2*o],d=t[2*o+1],u>=i&&u<=a&&d>=n&&d<=r&&l.push(e[o]);continue}const p=Math.floor((h+f)/2);u=t[2*p],d=t[2*p+1],u>=i&&u<=a&&d>=n&&d<=r&&l.push(e[p]);const m=(c+1)%2;(0===c?i<=u:n<=d)&&(s.push(h),s.push(p-1),s.push(m)),(0===c?a>=u:r>=d)&&(s.push(p+1),s.push(f),s.push(m))}return l}(this.ids,this.coords,e,t,i,n,this.nodeSize)}within(e,t,i){return function(e,t,i,n,a,r){const s=[0,e.length-1,0],l=[],u=a*a;for(;s.length;){const d=s.pop(),c=s.pop(),f=s.pop();if(c-f<=r){for(let a=f;a<=c;a++)o(t[2*a],t[2*a+1],i,n)<=u&&l.push(e[a]);continue}const h=Math.floor((f+c)/2),p=t[2*h],m=t[2*h+1];o(p,m,i,n)<=u&&l.push(e[h]);const _=(d+1)%2;(0===d?i-a<=p:n-a<=m)&&(s.push(f),s.push(h-1),s.push(_)),(0===d?i+a>=p:n+a>=m)&&(s.push(h+1),s.push(c),s.push(_))}return l}(this.ids,this.coords,e,t,i,this.nodeSize)}}},function(e,t,i){"use strict";t.a='#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC; // Technically can compute distance for this here\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main(void)\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n vec3 ecStart = vec3(v_endEcAndStartEcX.w, v_texcoordNormalizationAndStartEcYZ.zw);\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_startPlaneNormalEcAndHalfWidth.w * czm_metersPerPixel(eyeCoordinate);\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneNormalEcAndHalfWidth.xyz, -dot(ecStart, v_startPlaneNormalEcAndHalfWidth.xyz), eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneNormalEcAndBatchId.xyz, -dot(v_endEcAndStartEcX.xyz, v_endPlaneNormalEcAndBatchId.xyz), eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n // Check distance of the eye coordinate against start and end planes with normals in the right plane.\n // For computing unskewed lengthwise texture coordinate.\n // Can also be used for clipping extremely pointy miters, but in practice unnecessary because of miter breaking.\n\n // aligned plane: cross the right plane normal with miter plane normal, then cross the result with right again to point it more "forward"\n vec3 alignedPlaneNormal;\n\n // start aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_startPlaneNormalEcAndHalfWidth.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromStart = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, ecStart), eyeCoordinate.xyz);\n\n // end aligned plane\n alignedPlaneNormal = cross(v_rightPlaneEC.xyz, v_endPlaneNormalEcAndBatchId.xyz);\n alignedPlaneNormal = normalize(cross(alignedPlaneNormal, v_rightPlaneEC.xyz));\n distanceFromEnd = czm_planeDistance(alignedPlaneNormal, -dot(alignedPlaneNormal, v_endEcAndStartEcX.xyz), eyeCoordinate.xyz);\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Clamp - distance to aligned planes may be negative due to mitering,\n // so fragment texture coordinate might be out-of-bounds.\n float s = clamp(distanceFromStart / (distanceFromStart + distanceFromEnd), 0.0, 1.0);\n s = (s * v_texcoordNormalizationAndStartEcYZ.x) + v_texcoordNormalizationAndStartEcYZ.y;\n float t = (widthwiseDistance + halfMaxWidth) / (2.0 * halfMaxWidth);\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, t);\n materialInput.str = vec3(s, t, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n\n // Premultiply alpha. Required for classification primitives on translucent globe.\n gl_FragColor.rgb *= gl_FragColor.a;\n\n czm_writeDepthClamp();\n}\n'},function(e,t,i){"use strict";t.a="varying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\nfloat rayPlaneDistanceUnsafe(vec3 origin, vec3 direction, vec3 planeNormal, float planeDistance) {\n // We don't expect the ray to ever be parallel to the plane\n return (-planeDistance - dot(planeNormal, origin)) / dot(planeNormal, direction);\n}\n\nvoid main(void)\n{\n vec4 eyeCoordinate = gl_FragCoord;\n eyeCoordinate /= eyeCoordinate.w;\n\n#ifdef PER_INSTANCE_COLOR\n gl_FragColor = czm_gammaCorrect(v_color);\n#else // PER_INSTANCE_COLOR\n // Use distances for planes aligned with segment to prevent skew in dashing\n float distanceFromStart = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, -v_forwardDirectionEC, v_forwardDirectionEC.xyz, v_alignedPlaneDistances.x);\n float distanceFromEnd = rayPlaneDistanceUnsafe(eyeCoordinate.xyz, v_forwardDirectionEC, -v_forwardDirectionEC.xyz, v_alignedPlaneDistances.y);\n\n // Clamp - distance to aligned planes may be negative due to mitering\n distanceFromStart = max(0.0, distanceFromStart);\n distanceFromEnd = max(0.0, distanceFromEnd);\n\n float s = distanceFromStart / (distanceFromStart + distanceFromEnd);\n s = (s * v_texcoordNormalizationAndHalfWidth.x) + v_texcoordNormalizationAndHalfWidth.y;\n\n czm_materialInput materialInput;\n\n materialInput.s = s;\n materialInput.st = vec2(s, v_texcoordT);\n materialInput.str = vec3(s, v_texcoordT, 0.0);\n\n czm_material material = czm_getMaterial(materialInput);\n gl_FragColor = vec4(material.diffuse + material.emission, material.alpha);\n#endif // PER_INSTANCE_COLOR\n}\n"},function(e,t,i){"use strict";t.a='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n\nattribute float batchId;\n\nvarying vec3 v_forwardDirectionEC;\nvarying vec3 v_texcoordNormalizationAndHalfWidth;\nvarying float v_batchId;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#else\nvarying vec2 v_alignedPlaneDistances;\nvarying float v_texcoordT;\n#endif\n\n// Morphing planes using SLERP or NLERP doesn\'t seem to work, so instead draw the material directly on the shadow volume.\n// Morph views are from very far away and aren\'t meant to be used precisely, so this should be sufficient.\nvoid main()\n{\n v_batchId = batchId;\n\n // Start position\n vec4 posRelativeToEye2D = czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw));\n vec4 posRelativeToEye3D = czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz);\n vec4 posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n vec3 posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n vec3 posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 startEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n\n // Start plane\n vec4 startPlane2D;\n vec4 startPlane3D;\n startPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlane3D.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlane2D.w = -dot(startPlane2D.xyz, posEc2D);\n startPlane3D.w = -dot(startPlane3D.xyz, posEc3D);\n\n // Right plane\n vec4 rightPlane2D;\n vec4 rightPlane3D;\n rightPlane2D.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n rightPlane3D.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n rightPlane2D.w = -dot(rightPlane2D.xyz, posEc2D);\n rightPlane3D.w = -dot(rightPlane3D.xyz, posEc3D);\n\n // End position\n posRelativeToEye2D = posRelativeToEye2D + vec4(0.0, offsetAndRight2D.xy, 0.0);\n posRelativeToEye3D = posRelativeToEye3D + vec4(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w, 0.0);\n posRelativeToEye = czm_columbusViewMorph(posRelativeToEye2D, posRelativeToEye3D, czm_morphTime);\n posEc2D = (czm_modelViewRelativeToEye * posRelativeToEye2D).xyz;\n posEc3D = (czm_modelViewRelativeToEye * posRelativeToEye3D).xyz;\n vec3 endEC = (czm_modelViewRelativeToEye * posRelativeToEye).xyz;\n vec3 forwardEc3D = czm_normal * normalize(vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w));\n vec3 forwardEc2D = czm_normal * normalize(vec3(0.0, offsetAndRight2D.xy));\n\n // End plane\n vec4 endPlane2D;\n vec4 endPlane3D;\n endPlane2D.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlane3D.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlane2D.w = -dot(endPlane2D.xyz, posEc2D);\n endPlane3D.w = -dot(endPlane3D.xyz, posEc3D);\n\n // Forward direction\n v_forwardDirectionEC = normalize(endEC - startEC);\n\n vec2 cleanTexcoordNormalization2D;\n cleanTexcoordNormalization2D.x = abs(texcoordNormalization2D.x);\n cleanTexcoordNormalization2D.y = czm_branchFreeTernary(texcoordNormalization2D.y > 1.0, 0.0, abs(texcoordNormalization2D.y));\n vec2 cleanTexcoordNormalization3D;\n cleanTexcoordNormalization3D.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n cleanTexcoordNormalization3D.y = rightNormalAndTextureCoordinateNormalizationY.w;\n cleanTexcoordNormalization3D.y = czm_branchFreeTernary(cleanTexcoordNormalization3D.y > 1.0, 0.0, abs(cleanTexcoordNormalization3D.y));\n\n v_texcoordNormalizationAndHalfWidth.xy = mix(cleanTexcoordNormalization2D, cleanTexcoordNormalization3D, czm_morphTime);\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#else // PER_INSTANCE_COLOR\n // For computing texture coordinates\n\n v_alignedPlaneDistances.x = -dot(v_forwardDirectionEC, startEC);\n v_alignedPlaneDistances.y = -dot(-v_forwardDirectionEC, endEC);\n#endif // PER_INSTANCE_COLOR\n\n#ifdef WIDTH_VARYING\n float width = czm_batchTable_width(batchId);\n float halfWidth = width * 0.5;\n v_width = width;\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#else\n float halfWidth = 0.5 * czm_batchTable_width(batchId);\n v_texcoordNormalizationAndHalfWidth.z = halfWidth;\n#endif\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n // Since this is morphing, compute both 3D and 2D positions and then blend.\n\n // ****** 3D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc3D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position3DHigh, position3DLow); // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlane3D, positionEc3D.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlane3D, positionEc3D.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane3D.xyz, endPlane3D.xyz);\n vec3 upOrDown = normalize(cross(rightPlane3D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n vec3 geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc3D));\n geodeticSurfaceNormal *= float(0.0 <= rightNormalAndTextureCoordinateNormalizationY.w && rightNormalAndTextureCoordinateNormalizationY.w <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc3D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc3D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc3D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // ****** 2D ******\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEc2D = czm_modelViewRelativeToEye * czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy); // w = 1.0, see czm_computePosition\n absStartPlaneDistance = abs(czm_planeDistance(startPlane2D, positionEc2D.xyz));\n absEndPlaneDistance = abs(czm_planeDistance(endPlane2D, positionEc2D.xyz));\n planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlane2D.xyz, endPlane2D.xyz);\n upOrDown = normalize(cross(rightPlane2D.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Nudge the top vertex upwards to prevent flickering\n geodeticSurfaceNormal = normalize(cross(normalEC, forwardEc2D));\n geodeticSurfaceNormal *= float(0.0 <= texcoordNormalization2D.y && texcoordNormalization2D.y <= 1.0);\n geodeticSurfaceNormal *= MAX_TERRAIN_HEIGHT;\n positionEc2D.xyz += geodeticSurfaceNormal;\n\n // Determine if this vertex is on the "left" or "right"\n normalEC *= sign(texcoordNormalization2D.x);\n#ifndef PER_INSTANCE_COLOR\n // Use vertex\'s sidedness to compute its texture coordinate.\n v_texcoordT = clamp(sign(texcoordNormalization2D.x), 0.0, 1.0);\n#endif\n\n // A "perfect" implementation would push along normals according to the angle against forward.\n // In practice, just pushing the normal out by halfWidth is sufficient for morph views.\n positionEc2D.xyz += halfWidth * max(0.0, czm_metersPerPixel(positionEc2D)) * normalEC; // prevent artifacts when czm_metersPerPixel is negative (behind camera)\n\n // Blend for actual position\n gl_Position = czm_projection * mix(positionEc2D, positionEc3D, czm_morphTime);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(v_forwardDirectionEC.x, -v_forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n'},function(e,t,i){"use strict";t.a='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\n\n// In 2D and in 3D, texture coordinate normalization component signs encodes:\n// * X sign - sidedness relative to right plane\n// * Y sign - is negative OR magnitude is greater than 1.0 if vertex is on bottom of volume\n#ifndef COLUMBUS_VIEW_2D\nattribute vec4 startHiAndForwardOffsetX;\nattribute vec4 startLoAndForwardOffsetY;\nattribute vec4 startNormalAndForwardOffsetZ;\nattribute vec4 endNormalAndTextureCoordinateNormalizationX;\nattribute vec4 rightNormalAndTextureCoordinateNormalizationY;\n#else\nattribute vec4 startHiLo2D;\nattribute vec4 offsetAndRight2D;\nattribute vec4 startEndNormals2D;\nattribute vec2 texcoordNormalization2D;\n#endif\n\nattribute float batchId;\n\nvarying vec4 v_startPlaneNormalEcAndHalfWidth;\nvarying vec4 v_endPlaneNormalEcAndBatchId;\nvarying vec4 v_rightPlaneEC;\nvarying vec4 v_endEcAndStartEcX;\nvarying vec4 v_texcoordNormalizationAndStartEcYZ;\n\n// For materials\n#ifdef WIDTH_VARYING\nvarying float v_width;\n#endif\n#ifdef ANGLE_VARYING\nvarying float v_polylineAngle;\n#endif\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif\n\nvoid main()\n{\n#ifdef COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, startHiLo2D.xy), vec3(0.0, startHiLo2D.zw))).xyz;\n\n vec3 forwardDirectionEC = czm_normal * vec3(0.0, offsetAndRight2D.xy);\n vec3 ecEnd = forwardDirectionEC + ecStart;\n forwardDirectionEC = normalize(forwardDirectionEC);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * vec3(0.0, offsetAndRight2D.zw);\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.xy);\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * vec3(0.0, startEndNormals2D.zw);\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(texcoordNormalization2D.x);\n v_texcoordNormalizationAndStartEcYZ.y = texcoordNormalization2D.y;\n\n#else // COLUMBUS_VIEW_2D\n vec3 ecStart = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(startHiAndForwardOffsetX.xyz, startLoAndForwardOffsetY.xyz)).xyz;\n vec3 offset = czm_normal * vec3(startHiAndForwardOffsetX.w, startLoAndForwardOffsetY.w, startNormalAndForwardOffsetZ.w);\n vec3 ecEnd = ecStart + offset;\n\n vec3 forwardDirectionEC = normalize(offset);\n\n // start plane\n vec4 startPlaneEC;\n startPlaneEC.xyz = czm_normal * startNormalAndForwardOffsetZ.xyz;\n startPlaneEC.w = -dot(startPlaneEC.xyz, ecStart);\n\n // end plane\n vec4 endPlaneEC;\n endPlaneEC.xyz = czm_normal * endNormalAndTextureCoordinateNormalizationX.xyz;\n endPlaneEC.w = -dot(endPlaneEC.xyz, ecEnd);\n\n // Right plane\n v_rightPlaneEC.xyz = czm_normal * rightNormalAndTextureCoordinateNormalizationY.xyz;\n v_rightPlaneEC.w = -dot(v_rightPlaneEC.xyz, ecStart);\n\n v_texcoordNormalizationAndStartEcYZ.x = abs(endNormalAndTextureCoordinateNormalizationX.w);\n v_texcoordNormalizationAndStartEcYZ.y = rightNormalAndTextureCoordinateNormalizationY.w;\n\n#endif // COLUMBUS_VIEW_2D\n\n v_endEcAndStartEcX.xyz = ecEnd;\n v_endEcAndStartEcX.w = ecStart.x;\n v_texcoordNormalizationAndStartEcYZ.zw = ecStart.yz;\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif // PER_INSTANCE_COLOR\n\n // Compute a normal along which to "push" the position out, extending the miter depending on view distance.\n // Position has already been "pushed" by unit length along miter normal, and miter normals are encoded in the planes.\n // Decode the normal to use at this specific vertex, push the position back, and then push to where it needs to be.\n vec4 positionRelativeToEye = czm_computePosition();\n\n // Check distance to the end plane and start plane, pick the plane that is closer\n vec4 positionEC = czm_modelViewRelativeToEye * positionRelativeToEye; // w = 1.0, see czm_computePosition\n float absStartPlaneDistance = abs(czm_planeDistance(startPlaneEC, positionEC.xyz));\n float absEndPlaneDistance = abs(czm_planeDistance(endPlaneEC, positionEC.xyz));\n vec3 planeDirection = czm_branchFreeTernary(absStartPlaneDistance < absEndPlaneDistance, startPlaneEC.xyz, endPlaneEC.xyz);\n vec3 upOrDown = normalize(cross(v_rightPlaneEC.xyz, planeDirection)); // Points "up" for start plane, "down" at end plane.\n vec3 normalEC = normalize(cross(planeDirection, upOrDown)); // In practice, the opposite seems to work too.\n\n // Extrude bottom vertices downward for far view distances, like for GroundPrimitives\n upOrDown = cross(forwardDirectionEC, normalEC);\n upOrDown = float(czm_sceneMode == czm_sceneMode3D) * upOrDown;\n upOrDown = float(v_texcoordNormalizationAndStartEcYZ.y > 1.0 || v_texcoordNormalizationAndStartEcYZ.y < 0.0) * upOrDown;\n upOrDown = min(GLOBE_MINIMUM_ALTITUDE, czm_geometricToleranceOverMeter * length(positionRelativeToEye.xyz)) * upOrDown;\n positionEC.xyz += upOrDown;\n\n v_texcoordNormalizationAndStartEcYZ.y = czm_branchFreeTernary(v_texcoordNormalizationAndStartEcYZ.y > 1.0, 0.0, abs(v_texcoordNormalizationAndStartEcYZ.y));\n\n // Determine distance along normalEC to push for a volume of appropriate width.\n // Make volumes about double pixel width for a conservative fit - in practice the\n // extra cost here is minimal compared to the loose volume heights.\n //\n // N = normalEC (guaranteed "right-facing")\n // R = rightEC\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n float width = czm_batchTable_width(batchId);\n#ifdef WIDTH_VARYING\n v_width = width;\n#endif\n\n v_startPlaneNormalEcAndHalfWidth.xyz = startPlaneEC.xyz;\n v_startPlaneNormalEcAndHalfWidth.w = width * 0.5;\n\n v_endPlaneNormalEcAndBatchId.xyz = endPlaneEC.xyz;\n v_endPlaneNormalEcAndBatchId.w = batchId;\n\n width = width * max(0.0, czm_metersPerPixel(positionEC)); // width = distance to push along R\n width = width / dot(normalEC, v_rightPlaneEC.xyz); // width = distance to push along N\n\n // Determine if this vertex is on the "left" or "right"\n#ifdef COLUMBUS_VIEW_2D\n normalEC *= sign(texcoordNormalization2D.x);\n#else\n normalEC *= sign(endNormalAndTextureCoordinateNormalizationX.w);\n#endif\n\n positionEC.xyz += width * normalEC;\n gl_Position = czm_depthClamp(czm_projection * positionEC);\n\n#ifdef ANGLE_VARYING\n // Approximate relative screen space direction of the line.\n vec2 approxLineDirection = normalize(vec2(forwardDirectionEC.x, -forwardDirectionEC.y));\n approxLineDirection.y = czm_branchFreeTernary(approxLineDirection.x == 0.0 && approxLineDirection.y == 0.0, -1.0, approxLineDirection.y);\n v_polylineAngle = czm_fastApproximateAtan(approxLineDirection.x, approxLineDirection.y);\n#endif\n}\n'},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec2 expandAndWidth;\nattribute vec2 st;\nattribute float batchId;\n\nvarying float v_width;\nvarying vec2 v_st;\nvarying float v_polylineAngle;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = czm_computePosition();\n vec4 prev = czm_computePrevPosition();\n vec4 next = czm_computeNextPosition();\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n\n v_width = width;\n v_st.s = st.s;\n v_st.t = czm_writeNonPerspective(st.t, gl_Position.w);\n v_polylineAngle = angle;\n}\n"},function(e,t,i){"use strict";t.a='attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute float batchId;\n\n#ifdef EXTRUDED_GEOMETRY\nattribute vec3 extrudeDirection;\n\nuniform float u_globeMinimumAltitude;\n#endif // EXTRUDED_GEOMETRY\n\n#ifdef PER_INSTANCE_COLOR\nvarying vec4 v_color;\n#endif // PER_INSTANCE_COLOR\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\nvarying vec4 v_sphericalExtents;\n#else // SPHERICAL\nvarying vec2 v_inversePlaneExtents;\nvarying vec4 v_westPlane;\nvarying vec4 v_southPlane;\n#endif // SPHERICAL\nvarying vec3 v_uvMinAndSphericalLongitudeRotation;\nvarying vec3 v_uMaxAndInverseDistance;\nvarying vec3 v_vMaxAndInverseDistance;\n#endif // TEXTURE_COORDINATES\n\nvoid main()\n{\n vec4 position = czm_computePosition();\n\n#ifdef EXTRUDED_GEOMETRY\n float delta = min(u_globeMinimumAltitude, czm_geometricToleranceOverMeter * length(position.xyz));\n delta *= czm_sceneMode == czm_sceneMode3D ? 1.0 : 0.0;\n\n //extrudeDirection is zero for the top layer\n position = position + vec4(extrudeDirection * delta, 0.0);\n#endif\n\n#ifdef TEXTURE_COORDINATES\n#ifdef SPHERICAL\n v_sphericalExtents = czm_batchTable_sphericalExtents(batchId);\n v_uvMinAndSphericalLongitudeRotation.z = czm_batchTable_longitudeRotation(batchId);\n#else // SPHERICAL\n#ifdef COLUMBUS_VIEW_2D\n vec4 planes2D_high = czm_batchTable_planes2D_HIGH(batchId);\n vec4 planes2D_low = czm_batchTable_planes2D_LOW(batchId);\n\n // If the primitive is split across the IDL (planes2D_high.x > planes2D_high.w):\n // - If this vertex is on the east side of the IDL (position3DLow.y > 0.0, comparison with position3DHigh may produce artifacts)\n // - existing "east" is on the wrong side of the world, far away (planes2D_high/low.w)\n // - so set "east" as beyond the eastmost extent of the projection (idlSplitNewPlaneHiLow)\n vec2 idlSplitNewPlaneHiLow = vec2(EAST_MOST_X_HIGH - (WEST_MOST_X_HIGH - planes2D_high.w), EAST_MOST_X_LOW - (WEST_MOST_X_LOW - planes2D_low.w));\n bool idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y > 0.0;\n planes2D_high.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.w);\n planes2D_low.w = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.w);\n\n // - else, if this vertex is on the west side of the IDL (position3DLow.y < 0.0)\n // - existing "west" is on the wrong side of the world, far away (planes2D_high/low.x)\n // - so set "west" as beyond the westmost extent of the projection (idlSplitNewPlaneHiLow)\n idlSplit = planes2D_high.x > planes2D_high.w && position3DLow.y < 0.0;\n idlSplitNewPlaneHiLow = vec2(WEST_MOST_X_HIGH - (EAST_MOST_X_HIGH - planes2D_high.x), WEST_MOST_X_LOW - (EAST_MOST_X_LOW - planes2D_low.x));\n planes2D_high.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.x, planes2D_high.x);\n planes2D_low.x = czm_branchFreeTernary(idlSplit, idlSplitNewPlaneHiLow.y, planes2D_low.x);\n\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.xy), vec3(0.0, planes2D_low.xy))).xyz;\n vec3 northWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.x, planes2D_high.z), vec3(0.0, planes2D_low.x, planes2D_low.z))).xyz;\n vec3 southEastCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(vec3(0.0, planes2D_high.w, planes2D_high.y), vec3(0.0, planes2D_low.w, planes2D_low.y))).xyz;\n#else // COLUMBUS_VIEW_2D\n // 3D case has smaller "plane extents," so planes encoded as a 64 bit position and 2 vec3s for distances/direction\n vec3 southWestCorner = (czm_modelViewRelativeToEye * czm_translateRelativeToEye(czm_batchTable_southWest_HIGH(batchId), czm_batchTable_southWest_LOW(batchId))).xyz;\n vec3 northWestCorner = czm_normal * czm_batchTable_northward(batchId) + southWestCorner;\n vec3 southEastCorner = czm_normal * czm_batchTable_eastward(batchId) + southWestCorner;\n#endif // COLUMBUS_VIEW_2D\n\n vec3 eastWard = southEastCorner - southWestCorner;\n float eastExtent = length(eastWard);\n eastWard /= eastExtent;\n\n vec3 northWard = northWestCorner - southWestCorner;\n float northExtent = length(northWard);\n northWard /= northExtent;\n\n v_westPlane = vec4(eastWard, -dot(eastWard, southWestCorner));\n v_southPlane = vec4(northWard, -dot(northWard, southWestCorner));\n v_inversePlaneExtents = vec2(1.0 / eastExtent, 1.0 / northExtent);\n#endif // SPHERICAL\n vec4 uvMinAndExtents = czm_batchTable_uvMinAndExtents(batchId);\n vec4 uMaxVmax = czm_batchTable_uMaxVmax(batchId);\n\n v_uMaxAndInverseDistance = vec3(uMaxVmax.xy, uvMinAndExtents.z);\n v_vMaxAndInverseDistance = vec3(uMaxVmax.zw, uvMinAndExtents.w);\n v_uvMinAndSphericalLongitudeRotation.xy = uvMinAndExtents.xy;\n#endif // TEXTURE_COORDINATES\n\n#ifdef PER_INSTANCE_COLOR\n v_color = czm_batchTable_color(batchId);\n#endif\n\n gl_Position = czm_depthClamp(czm_modelViewProjectionRelativeToEye * position);\n}\n'},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(152),l=i(20);function u(e){this._definitionChanged=new o.default,this._show=void 0,this._showSubscription=void 0,this._plane=void 0,this._planeSubscription=void 0,this._dimensions=void 0,this._dimensionsSubscription=void 0,this._fill=void 0,this._fillSubscription=void 0,this._material=void 0,this._materialSubscription=void 0,this._outline=void 0,this._outlineSubscription=void 0,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this._shadows=void 0,this._shadowsSubscription=void 0,this._distanceDisplayCondition=void 0,this._distanceDisplayConditionSubscription=void 0,this.merge(Object(n.default)(e,n.default.EMPTY_OBJECT))}Object.defineProperties(u.prototype,{definitionChanged:{get:function(){return this._definitionChanged}},show:Object(l.default)("show"),plane:Object(l.default)("plane"),dimensions:Object(l.default)("dimensions"),fill:Object(l.default)("fill"),material:Object(s.default)("material"),outline:Object(l.default)("outline"),outlineColor:Object(l.default)("outlineColor"),outlineWidth:Object(l.default)("outlineWidth"),shadows:Object(l.default)("shadows"),distanceDisplayCondition:Object(l.default)("distanceDisplayCondition")}),u.prototype.clone=function(e){return Object(a.default)(e)?(e.show=this.show,e.plane=this.plane,e.dimensions=this.dimensions,e.fill=this.fill,e.material=this.material,e.outline=this.outline,e.outlineColor=this.outlineColor,e.outlineWidth=this.outlineWidth,e.shadows=this.shadows,e.distanceDisplayCondition=this.distanceDisplayCondition,e):new u(this)},u.prototype.merge=function(e){if(!Object(a.default)(e))throw new r.default("source is required.");this.show=Object(n.default)(this.show,e.show),this.plane=Object(n.default)(this.plane,e.plane),this.dimensions=Object(n.default)(this.dimensions,e.dimensions),this.fill=Object(n.default)(this.fill,e.fill),this.material=Object(n.default)(this.material,e.material),this.outline=Object(n.default)(this.outline,e.outline),this.outlineColor=Object(n.default)(this.outlineColor,e.outlineColor),this.outlineWidth=Object(n.default)(this.outlineWidth,e.outlineWidth),this.shadows=Object(n.default)(this.shadows,e.shadows),this.distanceDisplayCondition=Object(n.default)(this.distanceDisplayCondition,e.distanceDisplayCondition)},t.a=u},function(e,t,i){"use strict";t.a="attribute vec3 position3DHigh;\nattribute vec3 position3DLow;\nattribute vec3 position2DHigh;\nattribute vec3 position2DLow;\nattribute vec3 prevPosition3DHigh;\nattribute vec3 prevPosition3DLow;\nattribute vec3 prevPosition2DHigh;\nattribute vec3 prevPosition2DLow;\nattribute vec3 nextPosition3DHigh;\nattribute vec3 nextPosition3DLow;\nattribute vec3 nextPosition2DHigh;\nattribute vec3 nextPosition2DLow;\nattribute vec4 texCoordExpandAndBatchIndex;\n\nvarying vec2 v_st;\nvarying float v_width;\nvarying vec4 v_pickColor;\nvarying float v_polylineAngle;\n\nvoid main()\n{\n float texCoord = texCoordExpandAndBatchIndex.x;\n float expandDir = texCoordExpandAndBatchIndex.y;\n bool usePrev = texCoordExpandAndBatchIndex.z < 0.0;\n float batchTableIndex = texCoordExpandAndBatchIndex.w;\n\n vec2 widthAndShow = batchTable_getWidthAndShow(batchTableIndex);\n float width = widthAndShow.x + 0.5;\n float show = widthAndShow.y;\n\n if (width < 1.0)\n {\n show = 0.0;\n }\n\n vec4 pickColor = batchTable_getPickColor(batchTableIndex);\n\n vec4 p, prev, next;\n if (czm_morphTime == 1.0)\n {\n p = czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz);\n prev = czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz);\n next = czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz);\n }\n else if (czm_morphTime == 0.0)\n {\n p = czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy);\n prev = czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy);\n next = czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy);\n }\n else\n {\n p = czm_columbusViewMorph(\n czm_translateRelativeToEye(position2DHigh.zxy, position2DLow.zxy),\n czm_translateRelativeToEye(position3DHigh.xyz, position3DLow.xyz),\n czm_morphTime);\n prev = czm_columbusViewMorph(\n czm_translateRelativeToEye(prevPosition2DHigh.zxy, prevPosition2DLow.zxy),\n czm_translateRelativeToEye(prevPosition3DHigh.xyz, prevPosition3DLow.xyz),\n czm_morphTime);\n next = czm_columbusViewMorph(\n czm_translateRelativeToEye(nextPosition2DHigh.zxy, nextPosition2DLow.zxy),\n czm_translateRelativeToEye(nextPosition3DHigh.xyz, nextPosition3DLow.xyz),\n czm_morphTime);\n }\n\n #ifdef DISTANCE_DISPLAY_CONDITION\n vec3 centerHigh = batchTable_getCenterHigh(batchTableIndex);\n vec4 centerLowAndRadius = batchTable_getCenterLowAndRadius(batchTableIndex);\n vec3 centerLow = centerLowAndRadius.xyz;\n float radius = centerLowAndRadius.w;\n vec2 distanceDisplayCondition = batchTable_getDistanceDisplayCondition(batchTableIndex);\n\n float lengthSq;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n lengthSq = czm_eyeHeight2D.y;\n }\n else\n {\n vec4 center = czm_translateRelativeToEye(centerHigh.xyz, centerLow.xyz);\n lengthSq = max(0.0, dot(center.xyz, center.xyz) - radius * radius);\n }\n\n float nearSq = distanceDisplayCondition.x * distanceDisplayCondition.x;\n float farSq = distanceDisplayCondition.y * distanceDisplayCondition.y;\n if (lengthSq < nearSq || lengthSq > farSq)\n {\n show = 0.0;\n }\n #endif\n\n float polylineAngle;\n vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev, polylineAngle);\n gl_Position = czm_viewportOrthographic * positionWC * show;\n\n v_st.s = texCoord;\n v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\n v_width = width;\n v_pickColor = pickColor;\n v_polylineAngle = polylineAngle;\n}\n"},function(e,t,i){"use strict";i.d(t,"a",(function(){return Z}));var n=Object.hasOwnProperty,a=Object.setPrototypeOf,r=Object.isFrozen,o=Object.getPrototypeOf,s=Object.getOwnPropertyDescriptor,l=Object.freeze,u=Object.seal,d=Object.create,c="undefined"!=typeof Reflect&&Reflect,f=c.apply,h=c.construct;f||(f=function(e,t,i){return e.apply(t,i)}),l||(l=function(e){return e}),u||(u=function(e){return e}),h||(h=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat( /*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */ function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}(t))))});var p,m=T(Array.prototype.forEach),_=T(Array.prototype.pop),g=T(Array.prototype.push),v=T(String.prototype.toLowerCase),y=T(String.prototype.match),b=T(String.prototype.replace),w=T(String.prototype.indexOf),O=T(String.prototype.trim),x=T(RegExp.prototype.test),A=(p=TypeError,function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return h(p,t)});function T(e){return function(t){for(var i=arguments.length,n=Array(i>1?i-1:0),a=1;a<i;a++)n[a-1]=arguments[a];return f(e,t,n)}}function E(e,t){a&&a(e,null);for(var i=t.length;i--;){var n=t[i];if("string"==typeof n){var o=v(n);o!==n&&(r(t)||(t[i]=o),n=o)}e[n]=!0}return e}function C(e){var t=d(null),i=void 0;for(i in e)f(n,e,[i])&&(t[i]=e[i]);return t}function S(e,t){for(;null!==e;){var i=s(e,t);if(i){if(i.get)return T(i.get);if("function"==typeof i.value)return T(i.value)}e=o(e)}return function(e){return console.warn("fallback value for",e),null}}var M=l(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),D=l(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),P=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),I=l(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),L=l(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),j=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=l(["#text"]),N=l(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),B=l(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),F=l(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),k=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),z=u(/\{\{[\s\S]*|[\s\S]*\}\}/gm),U=u(/<%[\s\S]*|[\s\S]*%>/gm),V=u(/^data-[\-\w.\u00B7-\uFFFF]/),H=u(/^aria-[\-\w]+$/),G=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Y=u(/^(?:\w+script|data):/i),W=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function X(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var K=function(){return"undefined"==typeof window?null:window},J=function(e,t){if("object"!==(void 0===e?"undefined":q(e))||"function"!=typeof e.createPolicy)return null;var i=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(i=t.currentScript.getAttribute("data-tt-policy-suffix"));var n="dompurify"+(i?"#"+i:"");try{return e.createPolicy(n,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+n+" could not be created."),null}};var Z=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),i=function(t){return e(t)};if(i.version="2.3.4",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,a=t.document,r=t.DocumentFragment,o=t.HTMLTemplateElement,s=t.Node,u=t.Element,d=t.NodeFilter,c=t.NamedNodeMap,f=void 0===c?t.NamedNodeMap||t.MozNamedAttrMap:c,h=t.HTMLFormElement,p=t.DOMParser,T=t.trustedTypes,Z=u.prototype,Q=S(Z,"cloneNode"),$=S(Z,"nextSibling"),ee=S(Z,"childNodes"),te=S(Z,"parentNode");if("function"==typeof o){var ie=a.createElement("template");ie.content&&ie.content.ownerDocument&&(a=ie.content.ownerDocument)}var ne=J(T,n),ae=ne&&Ne?ne.createHTML(""):"",re=a,oe=re.implementation,se=re.createNodeIterator,le=re.createDocumentFragment,ue=re.getElementsByTagName,de=n.importNode,ce={};try{ce=C(a).documentMode?a.documentMode:{}}catch(e){}var fe={};i.isSupported="function"==typeof te&&oe&&void 0!==oe.createHTMLDocument&&9!==ce;var he=z,pe=U,me=V,_e=H,ge=Y,ve=W,ye=G,be=null,we=E({},[].concat(X(M),X(D),X(P),X(L),X(R))),Oe=null,xe=E({},[].concat(X(N),X(B),X(F),X(k))),Ae=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Te=null,Ee=null,Ce=!0,Se=!0,Me=!1,De=!1,Pe=!1,Ie=!1,Le=!1,je=!1,Re=!1,Ne=!1,Be=!0,Fe=!0,ke=!1,ze={},Ue=null,Ve=E({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),He=null,Ge=E({},["audio","video","img","source","image","track"]),Ye=null,We=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),qe="http://www.w3.org/1998/Math/MathML",Xe="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml",Je=Ke,Ze=!1,Qe=void 0,$e=["application/xhtml+xml","text/html"],et="text/html",tt=void 0,it=null,nt=a.createElement("form"),at=function(e){return e instanceof RegExp||e instanceof Function},rt=function(e){it&&it===e||(e&&"object"===(void 0===e?"undefined":q(e))||(e={}),e=C(e),be="ALLOWED_TAGS"in e?E({},e.ALLOWED_TAGS):we,Oe="ALLOWED_ATTR"in e?E({},e.ALLOWED_ATTR):xe,Ye="ADD_URI_SAFE_ATTR"in e?E(C(We),e.ADD_URI_SAFE_ATTR):We,He="ADD_DATA_URI_TAGS"in e?E(C(Ge),e.ADD_DATA_URI_TAGS):Ge,Ue="FORBID_CONTENTS"in e?E({},e.FORBID_CONTENTS):Ve,Te="FORBID_TAGS"in e?E({},e.FORBID_TAGS):{},Ee="FORBID_ATTR"in e?E({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Ce=!1!==e.ALLOW_ARIA_ATTR,Se=!1!==e.ALLOW_DATA_ATTR,Me=e.ALLOW_UNKNOWN_PROTOCOLS||!1,De=e.SAFE_FOR_TEMPLATES||!1,Pe=e.WHOLE_DOCUMENT||!1,je=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_TRUSTED_TYPE||!1,Le=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,Fe=!1!==e.KEEP_CONTENT,ke=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Je=e.NAMESPACE||Ke,e.CUSTOM_ELEMENT_HANDLING&&at(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ae.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&at(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ae.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ae.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Qe=Qe=-1===$e.indexOf(e.PARSER_MEDIA_TYPE)?et:e.PARSER_MEDIA_TYPE,tt="application/xhtml+xml"===Qe?function(e){return e}:v,De&&(Se=!1),Re&&(je=!0),ze&&(be=E({},[].concat(X(R))),Oe=[],!0===ze.html&&(E(be,M),E(Oe,N)),!0===ze.svg&&(E(be,D),E(Oe,B),E(Oe,k)),!0===ze.svgFilters&&(E(be,P),E(Oe,B),E(Oe,k)),!0===ze.mathMl&&(E(be,L),E(Oe,F),E(Oe,k))),e.ADD_TAGS&&(be===we&&(be=C(be)),E(be,e.ADD_TAGS)),e.ADD_ATTR&&(Oe===xe&&(Oe=C(Oe)),E(Oe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&E(Ye,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(Ue===Ve&&(Ue=C(Ue)),E(Ue,e.FORBID_CONTENTS)),Fe&&(be["#text"]=!0),Pe&&E(be,["html","head","body"]),be.table&&(E(be,["tbody"]),delete Te.tbody),l&&l(e),it=e)},ot=E({},["mi","mo","mn","ms","mtext"]),st=E({},["foreignobject","desc","title","annotation-xml"]),lt=E({},D);E(lt,P),E(lt,I);var ut=E({},L);E(ut,j);var dt=function(e){var t=te(e);t&&t.tagName||(t={namespaceURI:Ke,tagName:"template"});var i=v(e.tagName),n=v(t.tagName);if(e.namespaceURI===Xe)return t.namespaceURI===Ke?"svg"===i:t.namespaceURI===qe?"svg"===i&&("annotation-xml"===n||ot[n]):Boolean(lt[i]);if(e.namespaceURI===qe)return t.namespaceURI===Ke?"math"===i:t.namespaceURI===Xe?"math"===i&&st[n]:Boolean(ut[i]);if(e.namespaceURI===Ke){if(t.namespaceURI===Xe&&!st[n])return!1;if(t.namespaceURI===qe&&!ot[n])return!1;var a=E({},["title","style","font","a","script"]);return!ut[i]&&(a[i]||!lt[i])}return!1},ct=function(e){g(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=ae}catch(t){e.remove()}}},ft=function(e,t){try{g(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Oe[e])if(je||Re)try{ct(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ht=function(e){var t=void 0,i=void 0;if(Le)e="<remove></remove>"+e;else{var n=y(e,/^[\r\n\t ]+/);i=n&&n[0]}"application/xhtml+xml"===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var r=ne?ne.createHTML(e):e;if(Je===Ke)try{t=(new p).parseFromString(r,Qe)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Ze?"":r}catch(e){}}var o=t.body||t.documentElement;return e&&i&&o.insertBefore(a.createTextNode(i),o.childNodes[0]||null),Je===Ke?ue.call(t,Pe?"html":"body")[0]:Pe?t.documentElement:o},pt=function(e){return se.call(e.ownerDocument||e,e,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},mt=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof f)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},_t=function(e){return"object"===(void 0===s?"undefined":q(s))?e instanceof s:e&&"object"===(void 0===e?"undefined":q(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},gt=function(e,t,n){fe[e]&&m(fe[e],(function(e){e.call(i,t,n,it)}))},vt=function(e){var t=void 0;if(gt("beforeSanitizeElements",e,null),mt(e))return ct(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return ct(e),!0;var n=tt(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:n,allowedTags:be}),!_t(e.firstElementChild)&&(!_t(e.content)||!_t(e.content.firstElementChild))&&x(/<[/\w]/g,e.innerHTML)&&x(/<[/\w]/g,e.textContent))return ct(e),!0;if("select"===n&&x(/<template/i,e.innerHTML))return ct(e),!0;if(!be[n]||Te[n]){if(Fe&&!Ue[n]){var a=te(e)||e.parentNode,r=ee(e)||e.childNodes;if(r&&a)for(var o=r.length-1;o>=0;--o)a.insertBefore(Q(r[o],!0),$(e))}if(!Te[n]&&bt(n)){if(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,n))return!1;if(Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(n))return!1}return ct(e),!0}return e instanceof u&&!dt(e)?(ct(e),!0):"noscript"!==n&&"noembed"!==n||!x(/<\/no(script|embed)/i,e.innerHTML)?(De&&3===e.nodeType&&(t=e.textContent,t=b(t,he," "),t=b(t,pe," "),e.textContent!==t&&(g(i.removed,{element:e.cloneNode()}),e.textContent=t)),gt("afterSanitizeElements",e,null),!1):(ct(e),!0)},yt=function(e,t,i){if(Be&&("id"===t||"name"===t)&&(i in a||i in nt))return!1;if(Se&&!Ee[t]&&x(me,t));else if(Ce&&x(_e,t));else if(!Oe[t]||Ee[t]){if(!(bt(e)&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,e)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(e))&&(Ae.attributeNameCheck instanceof RegExp&&x(Ae.attributeNameCheck,t)||Ae.attributeNameCheck instanceof Function&&Ae.attributeNameCheck(t))||"is"===t&&Ae.allowCustomizedBuiltInElements&&(Ae.tagNameCheck instanceof RegExp&&x(Ae.tagNameCheck,i)||Ae.tagNameCheck instanceof Function&&Ae.tagNameCheck(i))))return!1}else if(Ye[t]);else if(x(ye,b(i,ve,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==w(i,"data:")||!He[e]){if(Me&&!x(ge,b(i,ve,"")));else if(i)return!1}else;return!0},bt=function(e){return e.indexOf("-")>0},wt=function(e){var t=void 0,n=void 0,a=void 0,r=void 0;gt("beforeSanitizeAttributes",e,null);var o=e.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Oe};for(r=o.length;r--;){var l=t=o[r],u=l.name,d=l.namespaceURI;if(n=O(t.value),a=tt(u),s.attrName=a,s.attrValue=n,s.keepAttr=!0,s.forceKeepAttr=void 0,gt("uponSanitizeAttribute",e,s),n=s.attrValue,!s.forceKeepAttr&&(ft(u,e),s.keepAttr))if(x(/\/>/i,n))ft(u,e);else{De&&(n=b(n,he," "),n=b(n,pe," "));var c=tt(e.nodeName);if(yt(c,a,n))try{d?e.setAttributeNS(d,u,n):e.setAttribute(u,n),_(i.removed)}catch(e){}}}gt("afterSanitizeAttributes",e,null)}},Ot=function e(t){var i=void 0,n=pt(t);for(gt("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)gt("uponSanitizeShadowNode",i,null),vt(i)||(i.content instanceof r&&e(i.content),wt(i));gt("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,a){var o=void 0,l=void 0,u=void 0,d=void 0,c=void 0;if((Ze=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!_t(e)){if("function"!=typeof e.toString)throw A("toString is not a function");if("string"!=typeof(e=e.toString()))throw A("dirty is not a string, aborting")}if(!i.isSupported){if("object"===q(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(_t(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ie||rt(a),i.removed=[],"string"==typeof e&&(ke=!1),ke);else if(e instanceof s)1===(l=(o=ht("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?o=l:o.appendChild(l);else{if(!je&&!De&&!Pe&&-1===e.indexOf("<"))return ne&&Ne?ne.createHTML(e):e;if(!(o=ht(e)))return je?null:ae}o&&Le&&ct(o.firstChild);for(var f=pt(ke?e:o);u=f.nextNode();)3===u.nodeType&&u===d||vt(u)||(u.content instanceof r&&Ot(u.content),wt(u),d=u);if(d=null,ke)return e;if(je){if(Re)for(c=le.call(o.ownerDocument);o.firstChild;)c.appendChild(o.firstChild);else c=o;return Oe.shadowroot&&(c=de.call(n,c,!0)),c}var h=Pe?o.outerHTML:o.innerHTML;return De&&(h=b(h,he," "),h=b(h,pe," ")),ne&&Ne?ne.createHTML(h):h},i.setConfig=function(e){rt(e),Ie=!0},i.clearConfig=function(){it=null,Ie=!1},i.isValidAttribute=function(e,t,i){it||rt({});var n=tt(e),a=tt(t);return yt(n,a,i)},i.addHook=function(e,t){"function"==typeof t&&(fe[e]=fe[e]||[],g(fe[e],t))},i.removeHook=function(e){fe[e]&&_(fe[e])},i.removeHooks=function(e){fe[e]&&(fe[e]=[])},i.removeAllHooks=function(){fe={}},i}()},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(401),s=i(30);function l(e){if(e=Object(n.default)(e,n.default.EMPTY_OBJECT),!Object(a.default)(e.missingImageUrl))throw new r.default("options.missingImageUrl is required.");if(!Object(a.default)(e.pixelsToCheck))throw new r.default("options.pixelsToCheck is required.");this._pixelsToCheck=e.pixelsToCheck,this._missingImagePixels=void 0,this._missingImageByteLength=void 0,this._isReady=!1;var t=s.default.createIfNeeded(e.missingImageUrl),i=this;t.fetchImage({preferBlob:!0,preferImageBitmap:!0,flipY:!0}).then((function(t){Object(a.default)(t.blob)&&(i._missingImageByteLength=t.blob.size);var n=Object(o.a)(t);if(e.disableCheckIfAllPixelsAreTransparent){for(var r=!0,s=t.width,l=e.pixelsToCheck,u=0,d=l.length;r&&u<d;++u){var c=l[u];n[4*c.x+c.y*s+3]>0&&(r=!1)}r&&(n=void 0)}i._missingImagePixels=n,i._isReady=!0})).otherwise((function(){i._missingImagePixels=void 0,i._isReady=!0}))}l.prototype.isReady=function(){return this._isReady},l.prototype.shouldDiscardImage=function(e){if(!this._isReady)throw new r.default("shouldDiscardImage must not be called before the discard policy is ready.");var t=this._pixelsToCheck,i=this._missingImagePixels;if(!Object(a.default)(i))return!1;if(Object(a.default)(e.blob)&&e.blob.size!==this._missingImageByteLength)return!1;for(var n=Object(o.a)(e),s=e.width,l=0,u=t.length;l<u;++l)for(var d=t[l],c=4*d.x+d.y*s,f=0;f<4;++f){var h=c+f;if(n[h]!==i[h])return!1}return!0},t.a=l},function(e,t,i){"use strict";var n=i(77),a=i(4),r=i(75),o=i(2),s=i(0),l=i(3),u=i(24),d=i(5),c=i(21),f=i(30),h=i(23),p=i(102),m=i(186),_=i(18),g=i(736),v=i(505),y=i(236);function b(e){var t=(e=Object(o.default)(e,o.default.EMPTY_OBJECT)).key;if(!Object(s.default)(e.url))throw new l.default("options.url is required.");if(!Object(s.default)(t))throw new l.default("options.key is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._key=t,this._resource=f.default.createIfNeeded(e.url),this._resource.appendForwardSlash(),this._tileProtocol=e.tileProtocol,this._mapStyle=Object(o.default)(e.mapStyle,g.a.AERIAL),this._culture=Object(o.default)(e.culture,""),this._tileDiscardPolicy=e.tileDiscardPolicy,Object(s.default)(this._tileDiscardPolicy)||(this._tileDiscardPolicy=new v.a),this._proxy=e.proxy,this._credit=new r.a('<a href="http://www.bing.com"><img src="'+b.logoUrl+'" title="Bing Imagery"/></a>'),this._tilingScheme=new m.a({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid}),this._tileWidth=void 0,this._tileHeight=void 0,this._maximumLevel=void 0,this._imageUrlTemplate=void 0,this._imageUrlSubdomains=void 0,this._errorEvent=new u.default,this._ready=!1,this._readyPromise=_.a.defer();var i=this._tileProtocol;Object(s.default)(i)?i.length>0&&":"===i[i.length-1]&&(i=i.substr(0,i.length-1)):i="http:"===document.location.protocol?"http":"https";var n,a=this._resource.getDerivedResource({url:"REST/v1/Imagery/Metadata/"+this._mapStyle,queryParameters:{incl:"ImageryProviders",key:this._key,uriScheme:i}}),y=this;function w(e){if(1===e.resourceSets.length){var t=e.resourceSets[0].resources[0];y._tileWidth=t.imageWidth,y._tileHeight=t.imageHeight,y._maximumLevel=t.zoomMax-1,y._imageUrlSubdomains=t.imageUrlSubdomains,y._imageUrlTemplate=t.imageUrl;var i=y._attributionList=t.imageryProviders;i||(i=y._attributionList=[]);for(var a=0,o=i.length;a<o;++a){var s=i[a];if(s.credit instanceof r.a)break;s.credit=new r.a(s.attribution);for(var l=s.coverageAreas,u=0,f=s.coverageAreas.length;u<f;++u){var h=l[u],m=h.bbox;h.bbox=new c.default(d.default.toRadians(m[1]),d.default.toRadians(m[0]),d.default.toRadians(m[3]),d.default.toRadians(m[2]))}}y._ready=!0,y._readyPromise.resolve(!0),p.a.handleSuccess(n)}else O()}function O(e){var t="An error occurred while accessing "+a.url+".";n=p.a.handleError(n,y,y._errorEvent,t,void 0,void 0,void 0,A),y._readyPromise.reject(new h.a(t))}var x=a.url;function A(){var e=a.fetchJsonp("jsonp");b._metadataCache[x]=e,e.then(w).otherwise(O)}var T=b._metadataCache[x];Object(s.default)(T)?T.then(w).otherwise(O):A()}Object.defineProperties(b.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},key:{get:function(){return this._key}},mapStyle:{get:function(){return this._mapStyle}},culture:{get:function(){return this._culture}},tileWidth:{get:function(){if(!this._ready)throw new l.default("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new l.default("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new l.default("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new l.default("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new l.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){if(!this._ready)throw new l.default("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new l.default("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!1}}});var w=new c.default;b.prototype.getTileCredits=function(e,t,i){if(!this._ready)throw new l.default("getTileCredits must not be called before the imagery provider is ready.");var n=this._tilingScheme.tileXYToRectangle(e,t,i,w);return function(e,t,i){++t;for(var n=[],a=0,r=e.length;a<r;++a){for(var o=e[a],l=o.coverageAreas,u=!1,d=0,f=o.coverageAreas.length;!u&&d<f;++d){var h=l[d];if(t>=h.zoomMin&&t<=h.zoomMax){var p=c.default.intersection(i,h.bbox,O);Object(s.default)(p)&&(u=!0)}}u&&n.push(o.credit)}return n}(this._attributionList,i,n)},b.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new l.default("requestImage must not be called before the imagery provider is ready.");var a=y.a.loadImage(this,function(e,t,i,n,a){var r=e._imageUrlTemplate,o=e._imageUrlSubdomains,s=(t+i+n)%o.length;return e._resource.getDerivedResource({url:r,request:a,templateValues:{quadkey:b.tileXYToQuadKey(t,i,n),subdomain:o[s],culture:e._culture},queryParameters:{n:"z"}})}(this,e,t,i,n));if(Object(s.default)(a))return a.otherwise((function(e){return Object(s.default)(e.blob)&&0===e.blob.size?v.a.EMPTY_IMAGE:_.a.reject(e)}))},b.prototype.pickFeatures=function(e,t,i,n,a){},b.tileXYToQuadKey=function(e,t,i){for(var n="",a=i;a>=0;--a){var r=1<<a,o=0;0!=(e&r)&&(o|=1),0!=(t&r)&&(o|=2),n+=o}return n},b.quadKeyToTileXY=function(e){for(var t=0,i=0,n=e.length-1,a=n;a>=0;--a){var r=1<<a,o=+e[n-a];0!=(1&o)&&(t|=r),0!=(2&o)&&(i|=r)}return{x:t,y:i,level:n}},b._logoUrl=void 0,Object.defineProperties(b,{logoUrl:{get:function(){return Object(s.default)(b._logoUrl)||(b._logoUrl=Object(n.a)("Assets/Images/bing_maps_credit.png")),b._logoUrl},set:function(e){a.a.defined("value",e),b._logoUrl=e}}});var O=new c.default;b._metadataCache={},t.a=b},function(e,t,i){"use strict";t.a=Object.freeze({AERIAL:"Aerial",AERIAL_WITH_LABELS:"AerialWithLabels",AERIAL_WITH_LABELS_ON_DEMAND:"AerialWithLabelsOnDemand",ROAD:"Road",ROAD_ON_DEMAND:"RoadOnDemand",CANVAS_DARK:"CanvasDark",CANVAS_LIGHT:"CanvasLight",CANVAS_GRAY:"CanvasGray",ORDNANCE_SURVEY:"OrdnanceSurvey",COLLINS_BART:"CollinsBart"})},function(e,t,i){"use strict";var n=i(77),a=i(4),r=i(75),o=i(2),s=i(0),l=i(3),u=i(24),d=i(137),c=i(21),f=i(30),h=i(23),p=i(102),m=i(186),_=i(18),g=i(236);function v(e){if(e=Object(o.default)(e,{}),!Object(s.default)(e.url))throw new l.default("options.url is required.");if(!Object(s.default)(e.channel))throw new l.default("options.channel is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=1.9,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=e.url,i=Object(o.default)(e.path,"/default_map"),n=f.default.createIfNeeded(t).getDerivedResource({url:"/"===i[0]?i.substring(1):i});n.appendForwardSlash(),this._resource=n,this._url=t,this._path=i,this._tileDiscardPolicy=e.tileDiscardPolicy,this._channel=e.channel,this._requestType="ImageryMaps",this._credit=new r.a('<a href="http://www.google.com/enterprise/mapsearth/products/earthenterprise.html"><img src="'+v.logoUrl+'" title="Google Imagery"/></a>'),this._tilingScheme=void 0,this._version=void 0,this._tileWidth=256,this._tileHeight=256,this._maximumLevel=e.maximumLevel,this._errorEvent=new u.default,this._ready=!1,this._readyPromise=_.a.defer();var a,g=n.getDerivedResource({url:"query",queryParameters:{request:"Json",vars:"geeServerDefs",is2d:"t"}}),y=this;function b(t){var i,n,r;try{i=JSON.parse(t)}catch(e){i=JSON.parse(t.replace(/([\[\{,])[\n\r ]*([A-Za-z0-9]+)[\n\r ]*:/g,'$1"$2":'))}for(var o=0;o<i.layers.length;o++)if(i.layers[o].id===y._channel){n=i.layers[o];break}if(!Object(s.default)(n))throw r="Could not find layer with channel (id) of "+y._channel+".",a=p.a.handleError(a,y,y._errorEvent,r,void 0,void 0,void 0,O),new h.a(r);if(!Object(s.default)(n.version))throw r="Could not find a version in channel (id) "+y._channel+".",a=p.a.handleError(a,y,y._errorEvent,r,void 0,void 0,void 0,O),new h.a(r);if(y._version=n.version,Object(s.default)(i.projection)&&"flat"===i.projection)y._tilingScheme=new d.a({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,rectangle:new c.default(-Math.PI,-Math.PI,Math.PI,Math.PI),ellipsoid:e.ellipsoid});else{if(Object(s.default)(i.projection)&&"mercator"!==i.projection)throw r="Unsupported projection "+i.projection+".",a=p.a.handleError(a,y,y._errorEvent,r,void 0,void 0,void 0,O),new h.a(r);y._tilingScheme=new m.a({numberOfLevelZeroTilesX:2,numberOfLevelZeroTilesY:2,ellipsoid:e.ellipsoid})}y._ready=!0,y._readyPromise.resolve(!0),p.a.handleSuccess(a)}function w(e){var t="An error occurred while accessing "+g.url+".";a=p.a.handleError(a,y,y._errorEvent,t,void 0,void 0,void 0,O),y._readyPromise.reject(new h.a(t))}function O(){var e=g.fetchText();Object(_.a)(e,b,w)}O()}Object.defineProperties(v.prototype,{url:{get:function(){return this._url}},path:{get:function(){return this._path}},proxy:{get:function(){return this._resource.proxy}},channel:{get:function(){return this._channel}},tileWidth:{get:function(){if(!this._ready)throw new l.default("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new l.default("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new l.default("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}},minimumLevel:{get:function(){if(!this._ready)throw new l.default("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new l.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},version:{get:function(){if(!this._ready)throw new l.default("version must not be called before the imagery provider is ready.");return this._version}},requestType:{get:function(){if(!this._ready)throw new l.default("requestType must not be called before the imagery provider is ready.");return this._requestType}},rectangle:{get:function(){if(!this._ready)throw new l.default("rectangle must not be called before the imagery provider is ready.");return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new l.default("tileDiscardPolicy must not be called before the imagery provider is ready.");return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),v.prototype.getTileCredits=function(e,t,i){},v.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new l.default("requestImage must not be called before the imagery provider is ready.");var a=this._resource.getDerivedResource({url:"query",request:n,queryParameters:{request:this._requestType,channel:this._channel,version:this._version,x:e,y:t,z:i+1}});return g.a.loadImage(this,a)},v.prototype.pickFeatures=function(e,t,i,n,a){},v._logoUrl=void 0,Object.defineProperties(v,{logoUrl:{get:function(){return Object(s.default)(v._logoUrl)||(v._logoUrl=Object(n.a)("Assets/Images/google_earth_credit.png")),v._logoUrl},set:function(e){a.a.defined("value",e),v._logoUrl=e}}}),t.a=v},function(e,t,i){"use strict";var n=i(75),a=i(2),r=i(0),o=i(3),s=i(30),l=i(216),u=/\/$/,d=new n.a('© <a href="https://www.mapbox.com/about/maps/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> <strong><a href="https://www.mapbox.com/map-feedback/">Improve this map</a></strong>');function c(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).mapId;if(!Object(r.default)(t))throw new o.default("options.mapId is required.");var i=e.accessToken;if(!Object(r.default)(i))throw new o.default("options.accessToken is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var c=s.default.createIfNeeded(Object(a.default)(e.url,"https://{s}.tiles.mapbox.com/v4/"));this._mapId=t,this._accessToken=i;var f=Object(a.default)(e.format,"png");/\./.test(f)||(f="."+f),this._format=f;var h,p=c.getUrlComponent();u.test(p)||(p+="/"),p+=t+"/{z}/{x}/{y}"+this._format,c.url=p,c.setQueryParameters({access_token:i}),Object(r.default)(e.credit)?"string"==typeof(h=e.credit)&&(h=new n.a(h)):h=d,this._resource=c,this._imageryProvider=new l.a({url:c,credit:h,ellipsoid:e.ellipsoid,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,rectangle:e.rectangle})}Object.defineProperties(c.prototype,{url:{get:function(){return this._imageryProvider.url}},ready:{get:function(){return this._imageryProvider.ready}},readyPromise:{get:function(){return this._imageryProvider.readyPromise}},rectangle:{get:function(){return this._imageryProvider.rectangle}},tileWidth:{get:function(){return this._imageryProvider.tileWidth}},tileHeight:{get:function(){return this._imageryProvider.tileHeight}},maximumLevel:{get:function(){return this._imageryProvider.maximumLevel}},minimumLevel:{get:function(){return this._imageryProvider.minimumLevel}},tilingScheme:{get:function(){return this._imageryProvider.tilingScheme}},tileDiscardPolicy:{get:function(){return this._imageryProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._imageryProvider.errorEvent}},credit:{get:function(){return this._imageryProvider.credit}},proxy:{get:function(){return this._imageryProvider.proxy}},hasAlphaChannel:{get:function(){return this._imageryProvider.hasAlphaChannel}}}),c.prototype.getTileCredits=function(e,t,i){},c.prototype.requestImage=function(e,t,i,n){return this._imageryProvider.requestImage(e,t,i,n)},c.prototype.pickFeatures=function(e,t,i,n,a){return this._imageryProvider.pickFeatures(e,t,i,n,a)},c._defaultCredit=d,t.a=c},function(e,t,i){"use strict";var n=i(75),a=i(2),r=i(0),o=i(3),s=i(24),l=i(137),u=i(21),d=i(30),c=i(23),f=i(102),h=i(18),p=i(236);function m(e){if(e=Object(a.default)(e,a.default.EMPTY_OBJECT),!Object(r.default)(e.url))throw new o.default("options.url is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=d.default.createIfNeeded(e.url),i=Object(a.default)(e.rectangle,u.default.MAX_VALUE),m=new l.a({rectangle:i,numberOfLevelZeroTilesX:1,numberOfLevelZeroTilesY:1,ellipsoid:e.ellipsoid});this._tilingScheme=m,this._resource=t,this._image=void 0,this._texture=void 0,this._tileWidth=0,this._tileHeight=0,this._errorEvent=new s.default,this._ready=!1,this._readyPromise=h.a.defer();var _=e.credit;"string"==typeof _&&(_=new n.a(_)),this._credit=_;var g,v=this;function y(e){v._image=e,v._tileWidth=e.width,v._tileHeight=e.height,v._ready=!0,v._readyPromise.resolve(!0),f.a.handleSuccess(v._errorEvent)}function b(e){var i="Failed to load image "+t.url+".";g=f.a.handleError(g,v,v._errorEvent,i,0,0,0,w,e),v._readyPromise.reject(new c.a(i))}function w(){p.a.loadImage(null,t).then(y).otherwise(b)}w()}Object.defineProperties(m.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){if(!this._ready)throw new o.default("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}},tileHeight:{get:function(){if(!this._ready)throw new o.default("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}},maximumLevel:{get:function(){if(!this._ready)throw new o.default("maximumLevel must not be called before the imagery provider is ready.");return 0}},minimumLevel:{get:function(){if(!this._ready)throw new o.default("minimumLevel must not be called before the imagery provider is ready.");return 0}},tilingScheme:{get:function(){if(!this._ready)throw new o.default("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}},rectangle:{get:function(){return this._tilingScheme.rectangle}},tileDiscardPolicy:{get:function(){if(!this._ready)throw new o.default("tileDiscardPolicy must not be called before the imagery provider is ready.")}},errorEvent:{get:function(){return this._errorEvent}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}}}),m.prototype.getTileCredits=function(e,t,i){},m.prototype.requestImage=function(e,t,i,n){if(!this._ready)throw new o.default("requestImage must not be called before the imagery provider is ready.");return this._image},m.prototype.pickFeatures=function(e,t,i,n,a){},t.a=m},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(137),s=i(30),l=i(135),u=i(479),d=i(444),c=i(216),f=[3034,3035,3042,3043,3044],h=[4471,4559];function p(e){if(e=Object(n.default)(e,n.default.EMPTY_OBJECT),!Object(a.default)(e.url))throw new r.default("options.url is required.");if(!Object(a.default)(e.layers))throw new r.default("options.layers is required.");if(Object(a.default)(e.times)&&!Object(a.default)(e.clock))throw new r.default("options.times was specified, so options.clock is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0,this._getFeatureInfoUrl=Object(n.default)(e.getFeatureInfoUrl,e.url);var t=s.default.createIfNeeded(e.url),i=s.default.createIfNeeded(this._getFeatureInfoUrl);t.setQueryParameters(p.DefaultParameters,!0),i.setQueryParameters(p.GetFeatureInfoDefaultParameters,!0),Object(a.default)(e.parameters)&&t.setQueryParameters(_(e.parameters)),Object(a.default)(e.getFeatureInfoParameters)&&i.setQueryParameters(_(e.getFeatureInfoParameters));var u=this;this._reload=void 0,Object(a.default)(e.times)&&(this._timeDynamicImagery=new d.a({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,a){return m(u,e,t,i,n,a)},reloadFunction:function(){Object(a.default)(u._reload)&&u._reload()}}));var g={};if(g.layers=e.layers,g.bbox="{westProjected},{southProjected},{eastProjected},{northProjected}",g.width="{width}",g.height="{height}",parseFloat(t.queryParameters.version)>=1.3){g.crs=Object(n.default)(e.crs,e.tilingScheme&&e.tilingScheme.projection instanceof l.a?"EPSG:3857":"CRS:84");var v=g.crs.split(":");if("EPSG"===v[0]&&2===v.length){var y=Number(v[1]);(y>=4e3&&y<5e3&&!h.includes(y)||f.includes(y))&&(g.bbox="{southProjected},{westProjected},{northProjected},{eastProjected}")}}else g.srs=Object(n.default)(e.srs,e.tilingScheme&&e.tilingScheme.projection instanceof l.a?"EPSG:3857":"EPSG:4326");t.setQueryParameters(g,!0),i.setQueryParameters(g,!0);var b={query_layers:e.layers,info_format:"{format}"};parseFloat(i.queryParameters.version)>=1.3?(b.i="{i}",b.j="{j}"):(b.x="{i}",b.y="{j}"),i.setQueryParameters(b,!0),this._resource=t,this._pickFeaturesResource=i,this._layers=e.layers,this._tileProvider=new c.a({url:t,pickFeaturesUrl:i,tilingScheme:Object(n.default)(e.tilingScheme,new o.a({ellipsoid:e.ellipsoid})),rectangle:e.rectangle,tileWidth:e.tileWidth,tileHeight:e.tileHeight,minimumLevel:e.minimumLevel,maximumLevel:e.maximumLevel,subdomains:e.subdomains,tileDiscardPolicy:e.tileDiscardPolicy,credit:e.credit,getFeatureInfoFormats:Object(n.default)(e.getFeatureInfoFormats,p.DefaultGetFeatureInfoFormats),enablePickFeatures:e.enablePickFeatures})}function m(e,t,i,n,r,o){var s=Object(a.default)(o)?o.data:void 0,l=e._tileProvider;return Object(a.default)(s)&&l._resource.setQueryParameters(s),l.requestImage(t,i,n,r)}function _(e){var t={};for(var i in e)e.hasOwnProperty(i)&&(t[i.toLowerCase()]=e[i]);return t}Object.defineProperties(p.prototype,{url:{get:function(){return this._resource._url}},proxy:{get:function(){return this._resource.proxy}},layers:{get:function(){return this._layers}},tileWidth:{get:function(){return this._tileProvider.tileWidth}},tileHeight:{get:function(){return this._tileProvider.tileHeight}},maximumLevel:{get:function(){return this._tileProvider.maximumLevel}},minimumLevel:{get:function(){return this._tileProvider.minimumLevel}},tilingScheme:{get:function(){return this._tileProvider.tilingScheme}},rectangle:{get:function(){return this._tileProvider.rectangle}},tileDiscardPolicy:{get:function(){return this._tileProvider.tileDiscardPolicy}},errorEvent:{get:function(){return this._tileProvider.errorEvent}},ready:{get:function(){return this._tileProvider.ready}},readyPromise:{get:function(){return this._tileProvider.readyPromise}},credit:{get:function(){return this._tileProvider.credit}},hasAlphaChannel:{get:function(){return this._tileProvider.hasAlphaChannel}},enablePickFeatures:{get:function(){return this._tileProvider.enablePickFeatures},set:function(e){this._tileProvider.enablePickFeatures=e}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},getFeatureInfoUrl:{get:function(){return this._getFeatureInfoUrl}}}),p.prototype.getTileCredits=function(e,t,i){return this._tileProvider.getTileCredits(e,t,i)},p.prototype.requestImage=function(e,t,i,n){var r,o,s=this._timeDynamicImagery;return Object(a.default)(s)&&(o=s.currentInterval,r=s.getFromCache(e,t,i,n)),Object(a.default)(r)||(r=m(this,e,t,i,n,o)),Object(a.default)(r)&&Object(a.default)(s)&&s.checkApproachingInterval(e,t,i,n),r},p.prototype.pickFeatures=function(e,t,i,n,r){var o=this._timeDynamicImagery;return function(e,t,i,n,r,o,s){var l=Object(a.default)(s)?s.data:void 0,u=e._tileProvider;return Object(a.default)(l)&&u._pickFeaturesResource.setQueryParameters(l),u.pickFeatures(t,i,n,r,o)}(this,e,t,i,n,r,Object(a.default)(o)?o.currentInterval:void 0)},p.DefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetMap",styles:"",format:"image/jpeg"}),p.GetFeatureInfoDefaultParameters=Object.freeze({service:"WMS",version:"1.1.1",request:"GetFeatureInfo"}),p.DefaultGetFeatureInfoFormats=Object.freeze([Object.freeze(new u.a("json","application/json")),Object.freeze(new u.a("xml","text/xml")),Object.freeze(new u.a("text","text/html"))]),t.a=p},function(e,t,i){"use strict";var n=i(60),a=i(75),r=i(2),o=i(0),s=i(3),l=i(24),u=i(21),d=i(30),c=i(186),f=i(18),h=i(236),p=i(444),m=Object.freeze({service:"WMTS",version:"1.0.0",request:"GetTile"});function _(e){if(e=Object(r.default)(e,r.default.EMPTY_OBJECT),!Object(o.default)(e.url))throw new s.default("options.url is required.");if(!Object(o.default)(e.layer))throw new s.default("options.layer is required.");if(!Object(o.default)(e.style))throw new s.default("options.style is required.");if(!Object(o.default)(e.tileMatrixSetID))throw new s.default("options.tileMatrixSetID is required.");if(Object(o.default)(e.times)&&!Object(o.default)(e.clock))throw new s.default("options.times was specified, so options.clock is required.");this.defaultAlpha=void 0,this.defaultNightAlpha=void 0,this.defaultDayAlpha=void 0,this.defaultBrightness=void 0,this.defaultContrast=void 0,this.defaultHue=void 0,this.defaultSaturation=void 0,this.defaultGamma=void 0,this.defaultMinificationFilter=void 0,this.defaultMagnificationFilter=void 0;var t=d.default.createIfNeeded(e.url),i=e.style,n=e.tileMatrixSetID,h=t.url,_=h.match(/{/g);if(!Object(o.default)(_)||1===_.length&&/{s}/.test(h))t.setQueryParameters(m),this._useKvp=!0;else{var v={style:i,Style:i,TileMatrixSet:n};t.setTemplateValues(v),this._useKvp=!1}this._resource=t,this._layer=e.layer,this._style=i,this._tileMatrixSetID=n,this._tileMatrixLabels=e.tileMatrixLabels,this._format=Object(r.default)(e.format,"image/jpeg"),this._tileDiscardPolicy=e.tileDiscardPolicy,this._tilingScheme=Object(o.default)(e.tilingScheme)?e.tilingScheme:new c.a({ellipsoid:e.ellipsoid}),this._tileWidth=Object(r.default)(e.tileWidth,256),this._tileHeight=Object(r.default)(e.tileHeight,256),this._minimumLevel=Object(r.default)(e.minimumLevel,0),this._maximumLevel=e.maximumLevel,this._rectangle=Object(r.default)(e.rectangle,this._tilingScheme.rectangle),this._dimensions=e.dimensions;var y=this;this._reload=void 0,Object(o.default)(e.times)&&(this._timeDynamicImagery=new p.a({clock:e.clock,times:e.times,requestImageFunction:function(e,t,i,n,a){return g(y,e,t,i,n,a)},reloadFunction:function(){Object(o.default)(y._reload)&&y._reload()}})),this._readyPromise=f.a.resolve(!0);var b=this._tilingScheme.positionToTileXY(u.default.southwest(this._rectangle),this._minimumLevel),w=this._tilingScheme.positionToTileXY(u.default.northeast(this._rectangle),this._minimumLevel),O=(Math.abs(w.x-b.x)+1)*(Math.abs(w.y-b.y)+1);if(O>4)throw new s.default("The imagery provider's rectangle and minimumLevel indicate that there are "+O+" tiles at the minimum level. Imagery providers with more than four tiles at the minimum level are not supported.");this._errorEvent=new l.default;var x=e.credit;this._credit="string"==typeof x?new a.a(x):x,this._subdomains=e.subdomains,Array.isArray(this._subdomains)?this._subdomains=this._subdomains.slice():Object(o.default)(this._subdomains)&&this._subdomains.length>0?this._subdomains=this._subdomains.split(""):this._subdomains=["a","b","c"]}function g(e,t,i,a,r,s){var l,u,d=e._tileMatrixLabels,c=Object(o.default)(d)?d[a]:a.toString(),f=e._subdomains,p=e._dimensions,m=Object(o.default)(s)?s.data:void 0;if(e._useKvp){var _={};_.tilematrix=c,_.layer=e._layer,_.style=e._style,_.tilerow=i,_.tilecol=t,_.tilematrixset=e._tileMatrixSetID,_.format=e._format,Object(o.default)(p)&&(_=Object(n.default)(_,p)),Object(o.default)(m)&&(_=Object(n.default)(_,m)),u={s:f[(t+i+a)%f.length]},(l=e._resource.getDerivedResource({queryParameters:_,request:r})).setTemplateValues(u)}else u={TileMatrix:c,TileRow:i.toString(),TileCol:t.toString(),s:f[(t+i+a)%f.length]},(l=e._resource.getDerivedResource({request:r})).setTemplateValues(u),Object(o.default)(p)&&l.setTemplateValues(p),Object(o.default)(m)&&l.setTemplateValues(m);return h.a.loadImage(e,l)}Object.defineProperties(_.prototype,{url:{get:function(){return this._resource.url}},proxy:{get:function(){return this._resource.proxy}},tileWidth:{get:function(){return this._tileWidth}},tileHeight:{get:function(){return this._tileHeight}},maximumLevel:{get:function(){return this._maximumLevel}},minimumLevel:{get:function(){return this._minimumLevel}},tilingScheme:{get:function(){return this._tilingScheme}},rectangle:{get:function(){return this._rectangle}},tileDiscardPolicy:{get:function(){return this._tileDiscardPolicy}},errorEvent:{get:function(){return this._errorEvent}},format:{get:function(){return this._format}},ready:{value:!0},readyPromise:{get:function(){return this._readyPromise}},credit:{get:function(){return this._credit}},hasAlphaChannel:{get:function(){return!0}},clock:{get:function(){return this._timeDynamicImagery.clock},set:function(e){this._timeDynamicImagery.clock=e}},times:{get:function(){return this._timeDynamicImagery.times},set:function(e){this._timeDynamicImagery.times=e}},dimensions:{get:function(){return this._dimensions},set:function(e){this._dimensions!==e&&(this._dimensions=e,Object(o.default)(this._reload)&&this._reload())}}}),_.prototype.getTileCredits=function(e,t,i){},_.prototype.requestImage=function(e,t,i,n){var a,r,s=this._timeDynamicImagery;return Object(o.default)(s)&&(r=s.currentInterval,a=s.getFromCache(e,t,i,n)),Object(o.default)(a)||(a=g(this,e,t,i,n,r)),Object(o.default)(a)&&Object(o.default)(s)&&s.checkApproachingInterval(e,t,i,n),a},_.prototype.pickFeatures=function(e,t,i,n,a){},t.a=_},function(e,t,i){"use strict";var n=i(17),a=i(77),r=i(1),o=i(22),s=i(7),l=i(2),u=i(0),d=i(19),c=i(3),f=i(15),h=i(331),p=i(24),m=i(124),_=i(65),g=i(85),v=i(21),y=i(30),b=i(34),w=i(45),O=i(743),x=i(744),A=i(507),T=i(18),E=i(745),C=i(746),S=i(750),M=i(751),D=i(752),P=i(13),I=i(86);function L(e){e=Object(l.default)(e,f.default.WGS84);var t=new h.default({ellipsoid:e}),i=new M.a;this._ellipsoid=e,this._imageryLayerCollection=i,this._surfaceShaderSet=new E.a,this._material=void 0,this._surface=new D.a({tileProvider:new C.a({terrainProvider:t,imageryLayers:i,surfaceShaderSet:this._surfaceShaderSet})}),this._terrainProvider=t,this._terrainProviderChanged=new p.default,this._undergroundColor=s.default.clone(s.default.BLACK),this._undergroundColorAlphaByDistance=new _.a(e.maximumRadius/1e3,0,e.maximumRadius/5,1),this._translucency=new S.a,j(this),this.show=!0,this._oceanNormalMapResourceDirty=!0,this._oceanNormalMapResource=new y.default({url:Object(a.a)("Assets/Textures/waterNormalsSmall.jpg")}),this.maximumScreenSpaceError=2,this.tileCacheSize=100,this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this.fillHighlightColor=void 0,this.enableLighting=!1,this.lambertDiffuseMultiplier=.9,this.dynamicAtmosphereLighting=!0,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!0,this.lightingFadeOutDistance=1e7,this.lightingFadeInDistance=2e7,this.nightFadeOutDistance=1e7,this.nightFadeInDistance=5e7,this.showWaterEffect=!0,this.depthTestAgainstTerrain=!1,this.shadows=I.a.RECEIVE_ONLY,this.atmosphereHueShift=0,this.atmosphereSaturationShift=0,this.atmosphereBrightnessShift=0,this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=0,this.showSkirts=!0,this.backFaceCulling=!0,this._oceanNormalMap=void 0,this._zoomedOutOceanSpecularIntensity=void 0}function j(e){var t=[],i=Object(u.default)(e._material)&&(e._material.shaderSource.match(/slope/)||e._material.shaderSource.match("normalEC")),n=[A.a];!Object(u.default)(e._material)||i&&!e._terrainProvider.requestVertexNormals?e._surface._tileProvider.materialUniformMap=void 0:(n.push(e._material.shaderSource),t.push("APPLY_MATERIAL"),e._surface._tileProvider.materialUniformMap=e._material._uniforms),n.push(O.a),e._surfaceShaderSet.baseVertexShaderSource=new b.default({sources:[A.a,x.a],defines:t}),e._surfaceShaderSet.baseFragmentShaderSource=new b.default({sources:n,defines:t}),e._surfaceShaderSet.material=e._material}Object.defineProperties(L.prototype,{ellipsoid:{get:function(){return this._ellipsoid}},imageryLayers:{get:function(){return this._imageryLayerCollection}},imageryLayersUpdatedEvent:{get:function(){return this._surface.tileProvider.imageryLayersUpdatedEvent}},tilesLoaded:{get:function(){return!Object(u.default)(this._surface)||this._surface.tileProvider.ready&&0===this._surface._tileLoadQueueHigh.length&&0===this._surface._tileLoadQueueMedium.length&&0===this._surface._tileLoadQueueLow.length}},baseColor:{get:function(){return this._surface.tileProvider.baseColor},set:function(e){this._surface.tileProvider.baseColor=e}},clippingPlanes:{get:function(){return this._surface.tileProvider.clippingPlanes},set:function(e){this._surface.tileProvider.clippingPlanes=e}},cartographicLimitRectangle:{get:function(){return this._surface.tileProvider.cartographicLimitRectangle},set:function(e){Object(u.default)(e)||(e=v.default.clone(v.default.MAX_VALUE)),this._surface.tileProvider.cartographicLimitRectangle=e}},oceanNormalMapUrl:{get:function(){return this._oceanNormalMapResource.url},set:function(e){this._oceanNormalMapResource.url=e,this._oceanNormalMapResourceDirty=!0}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){e!==this._terrainProvider&&(this._terrainProvider=e,this._terrainProviderChanged.raiseEvent(e),Object(u.default)(this._material)&&j(this))}},terrainProviderChanged:{get:function(){return this._terrainProviderChanged}},tileLoadProgressEvent:{get:function(){return this._surface.tileLoadProgressEvent}},material:{get:function(){return this._material},set:function(e){this._material!==e&&(this._material=e,j(this))}},undergroundColor:{get:function(){return this._undergroundColor},set:function(e){this._undergroundColor=s.default.clone(e,this._undergroundColor)}},undergroundColorAlphaByDistance:{get:function(){return this._undergroundColorAlphaByDistance},set:function(e){if(Object(u.default)(e)&&e.far<e.near)throw new c.default("far distance must be greater than near distance.");this._undergroundColorAlphaByDistance=_.a.clone(e,this._undergroundColorAlphaByDistance)}},translucency:{get:function(){return this._translucency}}});var R=[],N={start:0,stop:0};L.prototype.pickWorldCoordinates=function(e,t,i,a){if(!Object(u.default)(e))throw new c.default("ray is required");if(!Object(u.default)(t))throw new c.default("scene is required");i=Object(l.default)(i,!0);var o=t.mode,s=t.mapProjection,d=R;d.length=0;var f,h,p,_,g=this._surface._tilesToRender,v=g.length;for(h=0;h<v;++h){var y=(f=g[h]).data;if(Object(u.default)(y)){var b=y.pickBoundingSphere;if(o!==P.default.SCENE3D)y.pickBoundingSphere=b=n.default.fromRectangleWithHeights2D(f.rectangle,s,y.tileBoundingRegion.minimumHeight,y.tileBoundingRegion.maximumHeight,b),r.default.fromElements(b.center.z,b.center.x,b.center.y,b.center);else{if(!Object(u.default)(y.renderedMesh))continue;n.default.clone(y.tileBoundingRegion.boundingSphere,b)}var w=m.default.raySphere(e,b,N);Object(u.default)(w)&&d.push(y)}}for(d.sort((p=e.origin,function(e,t){return n.default.distanceSquaredTo(e.pickBoundingSphere,p)-n.default.distanceSquaredTo(t.pickBoundingSphere,p)})),v=d.length,h=0;h<v&&(_=d[h].pick(e,t.mode,t.mapProjection,i,a),!Object(u.default)(_));++h);return _};var B=new o.default;L.prototype.pick=function(e,t,i){if(i=this.pickWorldCoordinates(e,t,!0,i),Object(u.default)(i)&&t.mode!==P.default.SCENE3D){i=r.default.fromElements(i.y,i.z,i.x,i);var n=t.mapProjection.unproject(i,B);i=t.globe.ellipsoid.cartographicToCartesian(n,i)}return i};var F=new r.default,k=new r.default,z=new o.default,U=new g.default;function V(e,t){return Object(u.default)(e)&&v.default.contains(e.rectangle,t)?e:void 0}L.prototype.getHeight=function(e){if(!Object(u.default)(e))throw new c.default("cartographic is required");var t=this._surface._levelZeroTiles;if(Object(u.default)(t)){var i,n,a=t.length;for(n=0;n<a&&(i=t[n],!v.default.contains(i.rectangle,e));++n);if(!(n>=a)){for(var o=i;Object(u.default)(i);)i=V(i._southwestChild,e)||V(i._southeastChild,e)||V(i._northwestChild,e)||i._northeastChild,Object(u.default)(i)&&Object(u.default)(i.data)&&Object(u.default)(i.data.renderedMesh)&&(o=i);if(i=o,Object(u.default)(i)&&Object(u.default)(i.data)&&Object(u.default)(i.data.renderedMesh)){var s=this._surface._tileProvider.tilingScheme.projection,d=this._surface._tileProvider.tilingScheme.ellipsoid,f=r.default.fromRadians(e.longitude,e.latitude,0,d,F),h=U,p=d.geodeticSurfaceNormal(f,h.direction),m=d.getSurfaceNormalIntersectionWithZAxis(f,11500,h.origin);if(!Object(u.default)(m)){var _;Object(u.default)(i.data.tileBoundingRegion)&&(_=i.data.tileBoundingRegion.minimumHeight);var g=Math.min(Object(l.default)(_,0),-11500),y=r.default.multiplyByScalar(p,Math.abs(g)+1,k);r.default.subtract(f,y,h.origin)}var b=i.data.pick(h,void 0,s,!1,k);if(Object(u.default)(b))return d.cartesianToCartographic(b,z).height}}}},L.prototype.update=function(e){this.show&&e.passes.render&&this._surface.update(e)},L.prototype.beginFrame=function(e){var t=this._surface,i=t.tileProvider,n=this.terrainProvider,a=this.showWaterEffect&&n.ready&&n.hasWaterMask;if(a&&this._oceanNormalMapResourceDirty){this._oceanNormalMapResourceDirty=!1;var r=this._oceanNormalMapResource,o=r.url;if(Object(u.default)(o)){var s=this;Object(T.a)(r.fetchImage(),(function(t){o===s._oceanNormalMapResource.url&&(s._oceanNormalMap=s._oceanNormalMap&&s._oceanNormalMap.destroy(),s._oceanNormalMap=new w.default({context:e.context,source:t}))}))}else this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy()}var l=e.passes,d=e.mode;l.render&&(this.showGroundAtmosphere?this._zoomedOutOceanSpecularIntensity=.4:this._zoomedOutOceanSpecularIntensity=.5,t.maximumScreenSpaceError=this.maximumScreenSpaceError,t.tileCacheSize=this.tileCacheSize,t.loadingDescendantLimit=this.loadingDescendantLimit,t.preloadAncestors=this.preloadAncestors,t.preloadSiblings=this.preloadSiblings,i.terrainProvider=this.terrainProvider,i.lightingFadeOutDistance=this.lightingFadeOutDistance,i.lightingFadeInDistance=this.lightingFadeInDistance,i.nightFadeOutDistance=this.nightFadeOutDistance,i.nightFadeInDistance=this.nightFadeInDistance,i.zoomedOutOceanSpecularIntensity=d===P.default.SCENE3D?this._zoomedOutOceanSpecularIntensity:0,i.hasWaterMask=a,i.oceanNormalMap=this._oceanNormalMap,i.enableLighting=this.enableLighting,i.dynamicAtmosphereLighting=this.dynamicAtmosphereLighting,i.dynamicAtmosphereLightingFromSun=this.dynamicAtmosphereLightingFromSun,i.showGroundAtmosphere=this.showGroundAtmosphere,i.shadows=this.shadows,i.hueShift=this.atmosphereHueShift,i.saturationShift=this.atmosphereSaturationShift,i.brightnessShift=this.atmosphereBrightnessShift,i.fillHighlightColor=this.fillHighlightColor,i.showSkirts=this.showSkirts,i.backFaceCulling=this.backFaceCulling,i.undergroundColor=this._undergroundColor,i.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,i.lambertDiffuseMultiplier=this.lambertDiffuseMultiplier,t.beginFrame(e))},L.prototype.render=function(e){this.show&&(Object(u.default)(this._material)&&this._material.update(e.context),this._surface.render(e))},L.prototype.endFrame=function(e){this.show&&e.passes.render&&this._surface.endFrame(e)},L.prototype.isDestroyed=function(){return!1},L.prototype.destroy=function(){return this._surfaceShaderSet=this._surfaceShaderSet&&this._surfaceShaderSet.destroy(),this._surface=this._surface&&this._surface.destroy(),this._oceanNormalMap=this._oceanNormalMap&&this._oceanNormalMap.destroy(),Object(d.default)(this)},t.a=L},function(e,t,i){"use strict";t.a="uniform vec4 u_initialColor;\n\n#if TEXTURE_UNITS > 0\nuniform sampler2D u_dayTextures[TEXTURE_UNITS];\nuniform vec4 u_dayTextureTranslationAndScale[TEXTURE_UNITS];\nuniform bool u_dayTextureUseWebMercatorT[TEXTURE_UNITS];\n\n#ifdef APPLY_ALPHA\nuniform float u_dayTextureAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_DAY_NIGHT_ALPHA\nuniform float u_dayTextureNightAlpha[TEXTURE_UNITS];\nuniform float u_dayTextureDayAlpha[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SPLIT\nuniform float u_dayTextureSplit[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_BRIGHTNESS\nuniform float u_dayTextureBrightness[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_CONTRAST\nuniform float u_dayTextureContrast[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_HUE\nuniform float u_dayTextureHue[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_SATURATION\nuniform float u_dayTextureSaturation[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_GAMMA\nuniform float u_dayTextureOneOverGamma[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_IMAGERY_CUTOUT\nuniform vec4 u_dayTextureCutoutRectangles[TEXTURE_UNITS];\n#endif\n\n#ifdef APPLY_COLOR_TO_ALPHA\nuniform vec4 u_colorsToAlpha[TEXTURE_UNITS];\n#endif\n\nuniform vec4 u_dayTextureTexCoordsRectangle[TEXTURE_UNITS];\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\nuniform sampler2D u_waterMask;\nuniform vec4 u_waterMaskTranslationAndScale;\nuniform float u_zoomedOutOceanSpecularIntensity;\n#endif\n\n#ifdef SHOW_OCEAN_WAVES\nuniform sampler2D u_oceanNormalMap;\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\nuniform vec2 u_lightingFadeDistance;\n#endif\n\n#ifdef TILE_LIMIT_RECTANGLE\nuniform vec4 u_cartographicLimitRectangle;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nuniform vec2 u_nightFadeDistance;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\nuniform highp sampler2D u_clippingPlanes;\nuniform mat4 u_clippingPlanesMatrix;\nuniform vec4 u_clippingPlanesEdgeStyle;\n#endif\n\n#if defined(FOG) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\nuniform float u_minimumBrightness;\n#endif\n\n#ifdef COLOR_CORRECT\nuniform vec3 u_hsbShift; // Hue, saturation, brightness\n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\nuniform vec4 u_fillHighlightColor;\n#endif\n\n#ifdef TRANSLUCENT\nuniform vec4 u_frontFaceAlphaByDistance;\nuniform vec4 u_backFaceAlphaByDistance;\nuniform vec4 u_translucencyRectangle;\n#endif\n\n#ifdef UNDERGROUND_COLOR\nuniform vec4 u_undergroundColor;\nuniform vec4 u_undergroundColorAlphaByDistance;\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\nuniform float u_lambertDiffuseMultiplier;\n#endif\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nvarying float v_height;\nvarying float v_slope;\nvarying float v_aspect;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogRayleighColor;\nvarying vec3 v_fogMieColor;\n#endif\n\n#ifdef GROUND_ATMOSPHERE\nvarying vec3 v_rayleighColor;\nvarying vec3 v_mieColor;\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nfloat interpolateByDistance(vec4 nearFarScalar, float distance)\n{\n float startDistance = nearFarScalar.x;\n float startValue = nearFarScalar.y;\n float endDistance = nearFarScalar.z;\n float endValue = nearFarScalar.w;\n float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\n return mix(startValue, endValue, t);\n}\n#endif\n\n#if defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT) || defined(APPLY_MATERIAL)\nvec4 alphaBlend(vec4 sourceColor, vec4 destinationColor)\n{\n return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\n}\n#endif\n\n#ifdef TRANSLUCENT\nbool inTranslucencyRectangle()\n{\n return\n v_textureCoordinates.x > u_translucencyRectangle.x &&\n v_textureCoordinates.x < u_translucencyRectangle.z &&\n v_textureCoordinates.y > u_translucencyRectangle.y &&\n v_textureCoordinates.y < u_translucencyRectangle.w;\n}\n#endif\n\nvec4 sampleAndBlend(\n vec4 previousColor,\n sampler2D textureToSample,\n vec2 tileTextureCoordinates,\n vec4 textureCoordinateRectangle,\n vec4 textureCoordinateTranslationAndScale,\n float textureAlpha,\n float textureNightAlpha,\n float textureDayAlpha,\n float textureBrightness,\n float textureContrast,\n float textureHue,\n float textureSaturation,\n float textureOneOverGamma,\n float split,\n vec4 colorToAlpha,\n float nightBlend)\n{\n // This crazy step stuff sets the alpha to 0.0 if this following condition is true:\n // tileTextureCoordinates.s < textureCoordinateRectangle.s ||\n // tileTextureCoordinates.s > textureCoordinateRectangle.p ||\n // tileTextureCoordinates.t < textureCoordinateRectangle.t ||\n // tileTextureCoordinates.t > textureCoordinateRectangle.q\n // In other words, the alpha is zero if the fragment is outside the rectangle\n // covered by this texture. Would an actual 'if' yield better performance?\n vec2 alphaMultiplier = step(textureCoordinateRectangle.st, tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n alphaMultiplier = step(vec2(0.0), textureCoordinateRectangle.pq - tileTextureCoordinates);\n textureAlpha = textureAlpha * alphaMultiplier.x * alphaMultiplier.y;\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n textureAlpha *= mix(textureDayAlpha, textureNightAlpha, nightBlend);\n#endif\n\n vec2 translation = textureCoordinateTranslationAndScale.xy;\n vec2 scale = textureCoordinateTranslationAndScale.zw;\n vec2 textureCoordinates = tileTextureCoordinates * scale + translation;\n vec4 value = texture2D(textureToSample, textureCoordinates);\n vec3 color = value.rgb;\n float alpha = value.a;\n\n#ifdef APPLY_COLOR_TO_ALPHA\n vec3 colorDiff = abs(color.rgb - colorToAlpha.rgb);\n colorDiff.r = max(max(colorDiff.r, colorDiff.g), colorDiff.b);\n alpha = czm_branchFreeTernary(colorDiff.r < colorToAlpha.a, 0.0, alpha);\n#endif\n\n#if !defined(APPLY_GAMMA)\n vec4 tempColor = czm_gammaCorrect(vec4(color, alpha));\n color = tempColor.rgb;\n alpha = tempColor.a;\n#else\n color = pow(color, vec3(textureOneOverGamma));\n#endif\n\n#ifdef APPLY_SPLIT\n float splitPosition = czm_imagerySplitPosition;\n // Split to the left\n if (split < 0.0 && gl_FragCoord.x > splitPosition) {\n alpha = 0.0;\n }\n // Split to the right\n else if (split > 0.0 && gl_FragCoord.x < splitPosition) {\n alpha = 0.0;\n }\n#endif\n\n#ifdef APPLY_BRIGHTNESS\n color = mix(vec3(0.0), color, textureBrightness);\n#endif\n\n#ifdef APPLY_CONTRAST\n color = mix(vec3(0.5), color, textureContrast);\n#endif\n\n#ifdef APPLY_HUE\n color = czm_hue(color, textureHue);\n#endif\n\n#ifdef APPLY_SATURATION\n color = czm_saturation(color, textureSaturation);\n#endif\n\n float sourceAlpha = alpha * textureAlpha;\n float outAlpha = mix(previousColor.a, 1.0, sourceAlpha);\n outAlpha += sign(outAlpha) - 1.0;\n\n vec3 outColor = mix(previousColor.rgb * previousColor.a, color, sourceAlpha) / outAlpha;\n\n // When rendering imagery for a tile in multiple passes,\n // some GPU/WebGL implementation combinations will not blend fragments in\n // additional passes correctly if their computation includes an unmasked\n // divide-by-zero operation,\n // even if it's not in the output or if the output has alpha zero.\n //\n // For example, without sanitization for outAlpha,\n // this renders without artifacts:\n // if (outAlpha == 0.0) { outColor = vec3(0.0); }\n //\n // but using czm_branchFreeTernary will cause portions of the tile that are\n // alpha-zero in the additional pass to render as black instead of blending\n // with the previous pass:\n // outColor = czm_branchFreeTernary(outAlpha == 0.0, vec3(0.0), outColor);\n //\n // So instead, sanitize against divide-by-zero,\n // store this state on the sign of outAlpha, and correct on return.\n\n return vec4(outColor, max(outAlpha, 0.0));\n}\n\nvec3 colorCorrect(vec3 rgb) {\n#ifdef COLOR_CORRECT\n // Convert rgb color to hsb\n vec3 hsb = czm_RGBToHSB(rgb);\n // Perform hsb shift\n hsb.x += u_hsbShift.x; // hue\n hsb.y = clamp(hsb.y + u_hsbShift.y, 0.0, 1.0); // saturation\n hsb.z = hsb.z > czm_epsilon7 ? hsb.z + u_hsbShift.z : 0.0; // brightness\n // Convert shifted hsb back to rgb\n rgb = czm_HSBToRGB(hsb);\n#endif\n return rgb;\n}\n\nvec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend);\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float specularMapValue, float fade);\n\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist);\n#endif\n\nconst float fExposure = 2.0;\n\nvoid main()\n{\n#ifdef TILE_LIMIT_RECTANGLE\n if (v_textureCoordinates.x < u_cartographicLimitRectangle.x || u_cartographicLimitRectangle.z < v_textureCoordinates.x ||\n v_textureCoordinates.y < u_cartographicLimitRectangle.y || u_cartographicLimitRectangle.w < v_textureCoordinates.y)\n {\n discard;\n }\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n float clipDistance = clip(gl_FragCoord, u_clippingPlanes, u_clippingPlanesMatrix);\n#endif\n\n#if defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(HDR)\n vec3 normalMC = czm_geodeticSurfaceNormal(v_positionMC, vec3(0.0), vec3(1.0)); // normalized surface normal in model coordinates\n vec3 normalEC = czm_normal3D * normalMC; // normalized surface normal in eye coordiantes\n#endif\n\n#if defined(APPLY_DAY_NIGHT_ALPHA) && defined(ENABLE_DAYNIGHT_SHADING)\n float nightBlend = 1.0 - clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0, 0.0, 1.0);\n#else\n float nightBlend = 0.0;\n#endif\n\n // The clamp below works around an apparent bug in Chrome Canary v23.0.1241.0\n // where the fragment shader sees textures coordinates < 0.0 and > 1.0 for the\n // fragments on the edges of tiles even though the vertex shader is outputting\n // coordinates strictly in the 0-1 range.\n vec4 color = computeDayColor(u_initialColor, clamp(v_textureCoordinates, 0.0, 1.0), nightBlend);\n\n#ifdef SHOW_TILE_BOUNDARIES\n if (v_textureCoordinates.x < (1.0/256.0) || v_textureCoordinates.x > (255.0/256.0) ||\n v_textureCoordinates.y < (1.0/256.0) || v_textureCoordinates.y > (255.0/256.0))\n {\n color = vec4(1.0, 0.0, 0.0, 1.0);\n }\n#endif\n\n#if defined(ENABLE_DAYNIGHT_SHADING) || defined(GROUND_ATMOSPHERE)\n float cameraDist;\n if (czm_sceneMode == czm_sceneMode2D)\n {\n cameraDist = max(czm_frustumPlanes.x - czm_frustumPlanes.y, czm_frustumPlanes.w - czm_frustumPlanes.z) * 0.5;\n }\n else if (czm_sceneMode == czm_sceneModeColumbusView)\n {\n cameraDist = -czm_view[3].z;\n }\n else\n {\n cameraDist = length(czm_view[3]);\n }\n float fadeOutDist = u_lightingFadeDistance.x;\n float fadeInDist = u_lightingFadeDistance.y;\n if (czm_sceneMode != czm_sceneMode3D) {\n vec3 radii = czm_ellipsoidRadii;\n float maxRadii = max(radii.x, max(radii.y, radii.z));\n fadeOutDist -= maxRadii;\n fadeInDist -= maxRadii;\n }\n float fade = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n#else\n float fade = 0.0;\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n vec2 waterMaskTranslation = u_waterMaskTranslationAndScale.xy;\n vec2 waterMaskScale = u_waterMaskTranslationAndScale.zw;\n vec2 waterMaskTextureCoordinates = v_textureCoordinates.xy * waterMaskScale + waterMaskTranslation;\n waterMaskTextureCoordinates.y = 1.0 - waterMaskTextureCoordinates.y;\n\n float mask = texture2D(u_waterMask, waterMaskTextureCoordinates).r;\n\n if (mask > 0.0)\n {\n mat3 enuToEye = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalEC);\n\n vec2 ellipsoidTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC);\n vec2 ellipsoidFlippedTextureCoordinates = czm_ellipsoidWgs84TextureCoordinates(normalMC.zyx);\n\n vec2 textureCoordinates = mix(ellipsoidTextureCoordinates, ellipsoidFlippedTextureCoordinates, czm_morphTime * smoothstep(0.9, 0.95, normalMC.z));\n\n color = computeWaterColor(v_positionEC, textureCoordinates, enuToEye, color, mask, fade);\n }\n#endif\n\n#ifdef APPLY_MATERIAL\n czm_materialInput materialInput;\n materialInput.st = v_textureCoordinates.st;\n materialInput.normalEC = normalize(v_normalEC);\n materialInput.positionToEyeEC = -v_positionEC;\n materialInput.tangentToEyeMatrix = czm_eastNorthUpToEyeCoordinates(v_positionMC, normalize(v_normalEC)); \n materialInput.slope = v_slope;\n materialInput.height = v_height;\n materialInput.aspect = v_aspect;\n czm_material material = czm_getMaterial(materialInput);\n vec4 materialColor = vec4(material.diffuse, material.alpha);\n color = alphaBlend(materialColor, color);\n#endif\n\n#ifdef ENABLE_VERTEX_LIGHTING\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalize(v_normalEC)) * u_lambertDiffuseMultiplier + 0.3, 0.0, 1.0);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#elif defined(ENABLE_DAYNIGHT_SHADING)\n float diffuseIntensity = clamp(czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * 5.0 + 0.3, 0.0, 1.0);\n diffuseIntensity = mix(1.0, diffuseIntensity, fade);\n vec4 finalColor = vec4(color.rgb * czm_lightColor * diffuseIntensity, color.a);\n#else\n vec4 finalColor = color;\n#endif\n\n#ifdef ENABLE_CLIPPING_PLANES\n vec4 clippingPlanesEdgeColor = vec4(1.0);\n clippingPlanesEdgeColor.rgb = u_clippingPlanesEdgeStyle.rgb;\n float clippingPlanesEdgeWidth = u_clippingPlanesEdgeStyle.a;\n\n if (clipDistance < clippingPlanesEdgeWidth)\n {\n finalColor = clippingPlanesEdgeColor;\n }\n#endif\n\n#ifdef HIGHLIGHT_FILL_TILE\n finalColor = vec4(mix(finalColor.rgb, u_fillHighlightColor.rgb, u_fillHighlightColor.a), finalColor.a);\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\n vec3 fogColor = colorCorrect(v_fogMieColor) + finalColor.rgb * colorCorrect(v_fogRayleighColor);\n#ifndef HDR\n fogColor = vec3(1.0) - exp(-fExposure * fogColor);\n#endif\n#endif\n\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN)\n vec3 atmosphereLightDirection = czm_sunDirectionWC;\n#else\n vec3 atmosphereLightDirection = czm_lightDirectionWC;\n#endif\n\n#ifdef FOG\n#if defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_VERTEX_LIGHTING) || defined(ENABLE_DAYNIGHT_SHADING))\n float darken = clamp(dot(normalize(czm_viewerPositionWC), atmosphereLightDirection), u_minimumBrightness, 1.0);\n fogColor *= darken;\n#endif\n\n#ifdef HDR\n const float modifier = 0.15;\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor, modifier), finalColor.a);\n#else\n finalColor = vec4(czm_fog(v_distance, finalColor.rgb, fogColor), finalColor.a);\n#endif\n#endif\n\n#ifdef GROUND_ATMOSPHERE\n if (!czm_backFacing())\n {\n vec3 groundAtmosphereColor = computeGroundAtmosphereColor(fogColor, finalColor, atmosphereLightDirection, cameraDist);\n finalColor = vec4(mix(finalColor.rgb, groundAtmosphereColor, fade), finalColor.a);\n }\n#endif\n\n#ifdef UNDERGROUND_COLOR\n if (czm_backFacing())\n {\n float distanceFromEllipsoid = max(czm_eyeHeight, 0.0);\n float distance = max(v_distance - distanceFromEllipsoid, 0.0);\n float blendAmount = interpolateByDistance(u_undergroundColorAlphaByDistance, distance);\n vec4 undergroundColor = vec4(u_undergroundColor.rgb, u_undergroundColor.a * blendAmount);\n finalColor = alphaBlend(undergroundColor, finalColor);\n }\n#endif\n\n#ifdef TRANSLUCENT\n if (inTranslucencyRectangle())\n {\n vec4 alphaByDistance = gl_FrontFacing ? u_frontFaceAlphaByDistance : u_backFaceAlphaByDistance;\n finalColor.a *= interpolateByDistance(alphaByDistance, v_distance);\n }\n#endif\n\n gl_FragColor = finalColor;\n}\n\n#ifdef GROUND_ATMOSPHERE\nvec3 computeGroundAtmosphereColor(vec3 fogColor, vec4 finalColor, vec3 atmosphereLightDirection, float cameraDist)\n{\n#if defined(PER_FRAGMENT_GROUND_ATMOSPHERE) && defined(DYNAMIC_ATMOSPHERE_LIGHTING) && (defined(ENABLE_DAYNIGHT_SHADING) || defined(ENABLE_VERTEX_LIGHTING))\n float mpp = czm_metersPerPixel(vec4(0.0, 0.0, -czm_currentFrustum.x, 1.0), 1.0);\n vec2 xy = gl_FragCoord.xy / czm_viewport.zw * 2.0 - vec2(1.0);\n xy *= czm_viewport.zw * mpp * 0.5;\n\n vec3 direction = normalize(vec3(xy, -czm_currentFrustum.x));\n czm_ray ray = czm_ray(vec3(0.0), direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\n vec3 ellipsoidPosition = czm_pointAlongRay(ray, intersection.start);\n ellipsoidPosition = (czm_inverseView * vec4(ellipsoidPosition, 1.0)).xyz;\n AtmosphereColor atmosColor = computeGroundAtmosphereFromSpace(ellipsoidPosition, true, atmosphereLightDirection);\n\n vec3 groundAtmosphereColor = colorCorrect(atmosColor.mie) + finalColor.rgb * colorCorrect(atmosColor.rayleigh);\n#ifndef HDR\n groundAtmosphereColor = vec3(1.0) - exp(-fExposure * groundAtmosphereColor);\n#endif\n\n float fadeInDist = u_nightFadeDistance.x;\n float fadeOutDist = u_nightFadeDistance.y;\n\n float sunlitAtmosphereIntensity = clamp((cameraDist - fadeOutDist) / (fadeInDist - fadeOutDist), 0.0, 1.0);\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n sunlitAtmosphereIntensity = max(sunlitAtmosphereIntensity * sunlitAtmosphereIntensity, 0.03);\n#endif\n\n groundAtmosphereColor = mix(groundAtmosphereColor, fogColor, sunlitAtmosphereIntensity);\n#else\n vec3 groundAtmosphereColor = fogColor;\n#endif\n\n#ifdef HDR\n // Some tweaking to make HDR look better\n groundAtmosphereColor = czm_saturation(groundAtmosphereColor, 1.6);\n#endif\n\n return groundAtmosphereColor;\n}\n#endif\n\n#ifdef SHOW_REFLECTIVE_OCEAN\n\nfloat waveFade(float edge0, float edge1, float x)\n{\n float y = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n return pow(1.0 - y, 5.0);\n}\n\nfloat linearFade(float edge0, float edge1, float x)\n{\n return clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0);\n}\n\n// Based on water rendering by Jonas Wagner:\n// http://29a.ch/2012/7/19/webgl-terrain-rendering-water-fog\n\n// low altitude wave settings\nconst float oceanFrequencyLowAltitude = 825000.0;\nconst float oceanAnimationSpeedLowAltitude = 0.004;\nconst float oceanOneOverAmplitudeLowAltitude = 1.0 / 2.0;\nconst float oceanSpecularIntensity = 0.5;\n\n// high altitude wave settings\nconst float oceanFrequencyHighAltitude = 125000.0;\nconst float oceanAnimationSpeedHighAltitude = 0.008;\nconst float oceanOneOverAmplitudeHighAltitude = 1.0 / 2.0;\n\nvec4 computeWaterColor(vec3 positionEyeCoordinates, vec2 textureCoordinates, mat3 enuToEye, vec4 imageryColor, float maskValue, float fade)\n{\n vec3 positionToEyeEC = -positionEyeCoordinates;\n float positionToEyeECLength = length(positionToEyeEC);\n\n // The double normalize below works around a bug in Firefox on Android devices.\n vec3 normalizedPositionToEyeEC = normalize(normalize(positionToEyeEC));\n\n // Fade out the waves as the camera moves far from the surface.\n float waveIntensity = waveFade(70000.0, 1000000.0, positionToEyeECLength);\n\n#ifdef SHOW_OCEAN_WAVES\n // high altitude waves\n float time = czm_frameNumber * oceanAnimationSpeedHighAltitude;\n vec4 noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyHighAltitude, time, 0.0);\n vec3 normalTangentSpaceHighAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeHighAltitude);\n\n // low altitude waves\n time = czm_frameNumber * oceanAnimationSpeedLowAltitude;\n noise = czm_getWaterNoise(u_oceanNormalMap, textureCoordinates * oceanFrequencyLowAltitude, time, 0.0);\n vec3 normalTangentSpaceLowAltitude = vec3(noise.xy, noise.z * oceanOneOverAmplitudeLowAltitude);\n\n // blend the 2 wave layers based on distance to surface\n float highAltitudeFade = linearFade(0.0, 60000.0, positionToEyeECLength);\n float lowAltitudeFade = 1.0 - linearFade(20000.0, 60000.0, positionToEyeECLength);\n vec3 normalTangentSpace =\n (highAltitudeFade * normalTangentSpaceHighAltitude) +\n (lowAltitudeFade * normalTangentSpaceLowAltitude);\n normalTangentSpace = normalize(normalTangentSpace);\n\n // fade out the normal perturbation as we move farther from the water surface\n normalTangentSpace.xy *= waveIntensity;\n normalTangentSpace = normalize(normalTangentSpace);\n#else\n vec3 normalTangentSpace = vec3(0.0, 0.0, 1.0);\n#endif\n\n vec3 normalEC = enuToEye * normalTangentSpace;\n\n const vec3 waveHighlightColor = vec3(0.3, 0.45, 0.6);\n\n // Use diffuse light to highlight the waves\n float diffuseIntensity = czm_getLambertDiffuse(czm_lightDirectionEC, normalEC) * maskValue;\n vec3 diffuseHighlight = waveHighlightColor * diffuseIntensity * (1.0 - fade);\n\n#ifdef SHOW_OCEAN_WAVES\n // Where diffuse light is low or non-existent, use wave highlights based solely on\n // the wave bumpiness and no particular light direction.\n float tsPerturbationRatio = normalTangentSpace.z;\n vec3 nonDiffuseHighlight = mix(waveHighlightColor * 5.0 * (1.0 - tsPerturbationRatio), vec3(0.0), diffuseIntensity);\n#else\n vec3 nonDiffuseHighlight = vec3(0.0);\n#endif\n\n // Add specular highlights in 3D, and in all modes when zoomed in.\n float specularIntensity = czm_getSpecular(czm_lightDirectionEC, normalizedPositionToEyeEC, normalEC, 10.0);\n float surfaceReflectance = mix(0.0, mix(u_zoomedOutOceanSpecularIntensity, oceanSpecularIntensity, waveIntensity), maskValue);\n float specular = specularIntensity * surfaceReflectance;\n\n#ifdef HDR\n specular *= 1.4;\n\n float e = 0.2;\n float d = 3.3;\n float c = 1.7;\n\n vec3 color = imageryColor.rgb + (c * (vec3(e) + imageryColor.rgb * d) * (diffuseHighlight + nonDiffuseHighlight + specular));\n#else\n vec3 color = imageryColor.rgb + diffuseHighlight + nonDiffuseHighlight + specular;\n#endif\n\n return vec4(color, imageryColor.a);\n}\n\n#endif // #ifdef SHOW_REFLECTIVE_OCEAN\n"},function(e,t,i){"use strict";t.a="#ifdef QUANTIZATION_BITS12\nattribute vec4 compressed0;\nattribute float compressed1;\n#else\nattribute vec4 position3DAndHeight;\nattribute vec4 textureCoordAndEncodedNormals;\n#endif\n\n#ifdef GEODETIC_SURFACE_NORMALS\nattribute vec3 geodeticSurfaceNormal;\n#endif\n\n#ifdef EXAGGERATION\nuniform vec2 u_terrainExaggerationAndRelativeHeight;\n#endif\n\nuniform vec3 u_center3D;\nuniform mat4 u_modifiedModelView;\nuniform mat4 u_modifiedModelViewProjection;\nuniform vec4 u_tileRectangle;\n\n// Uniforms for 2D Mercator projection\nuniform vec2 u_southAndNorthLatitude;\nuniform vec2 u_southMercatorYAndOneOverHeight;\n\nvarying vec3 v_positionMC;\nvarying vec3 v_positionEC;\n\nvarying vec3 v_textureCoordinates;\nvarying vec3 v_normalMC;\nvarying vec3 v_normalEC;\n\n#ifdef APPLY_MATERIAL\nvarying float v_slope;\nvarying float v_aspect;\nvarying float v_height;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\nvarying float v_distance;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\nvarying vec3 v_fogMieColor;\nvarying vec3 v_fogRayleighColor;\n#endif\n\n// These functions are generated at runtime.\nvec4 getPosition(vec3 position, float height, vec2 textureCoordinates);\nfloat get2DYPositionFraction(vec2 textureCoordinates);\n\nvec4 getPosition3DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return u_modifiedModelViewProjection * vec4(position, 1.0);\n}\n\nfloat get2DMercatorYPositionFraction(vec2 textureCoordinates)\n{\n // The width of a tile at level 11, in radians and assuming a single root tile, is\n // 2.0 * czm_pi / pow(2.0, 11.0)\n // We want to just linearly interpolate the 2D position from the texture coordinates\n // when we're at this level or higher. The constant below is the expression\n // above evaluated and then rounded up at the 4th significant digit.\n const float maxTileWidth = 0.003068;\n float positionFraction = textureCoordinates.y;\n float southLatitude = u_southAndNorthLatitude.x;\n float northLatitude = u_southAndNorthLatitude.y;\n if (northLatitude - southLatitude > maxTileWidth)\n {\n float southMercatorY = u_southMercatorYAndOneOverHeight.x;\n float oneOverMercatorHeight = u_southMercatorYAndOneOverHeight.y;\n\n float currentLatitude = mix(southLatitude, northLatitude, textureCoordinates.y);\n currentLatitude = clamp(currentLatitude, -czm_webMercatorMaxLatitude, czm_webMercatorMaxLatitude);\n positionFraction = czm_latitudeToWebMercatorFraction(currentLatitude, southMercatorY, oneOverMercatorHeight);\n }\n return positionFraction;\n}\n\nfloat get2DGeographicYPositionFraction(vec2 textureCoordinates)\n{\n return textureCoordinates.y;\n}\n\nvec4 getPositionPlanarEarth(vec3 position, float height, vec2 textureCoordinates)\n{\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 rtcPosition2D = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n return u_modifiedModelViewProjection * rtcPosition2D;\n}\n\nvec4 getPosition2DMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, 0.0, textureCoordinates);\n}\n\nvec4 getPositionColumbusViewMode(vec3 position, float height, vec2 textureCoordinates)\n{\n return getPositionPlanarEarth(position, height, textureCoordinates);\n}\n\nvec4 getPositionMorphingMode(vec3 position, float height, vec2 textureCoordinates)\n{\n // We do not do RTC while morphing, so there is potential for jitter.\n // This is unlikely to be noticeable, though.\n vec3 position3DWC = position + u_center3D;\n float yPositionFraction = get2DYPositionFraction(textureCoordinates);\n vec4 position2DWC = vec4(height, mix(u_tileRectangle.st, u_tileRectangle.pq, vec2(textureCoordinates.x, yPositionFraction)), 1.0);\n vec4 morphPosition = czm_columbusViewMorph(position2DWC, vec4(position3DWC, 1.0), czm_morphTime);\n return czm_modelViewProjection * morphPosition;\n}\n\n#ifdef QUANTIZATION_BITS12\nuniform vec2 u_minMaxHeight;\nuniform mat4 u_scaleAndBias;\n#endif\n\nvoid main()\n{\n#ifdef QUANTIZATION_BITS12\n vec2 xy = czm_decompressTextureCoordinates(compressed0.x);\n vec2 zh = czm_decompressTextureCoordinates(compressed0.y);\n vec3 position = vec3(xy, zh.x);\n float height = zh.y;\n vec2 textureCoordinates = czm_decompressTextureCoordinates(compressed0.z);\n\n height = height * (u_minMaxHeight.y - u_minMaxHeight.x) + u_minMaxHeight.x;\n position = (u_scaleAndBias * vec4(position, 1.0)).xyz;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = compressed1;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = czm_decompressTextureCoordinates(compressed0.w).x;\n float encodedNormal = 0.0;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = compressed0.w;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#else\n // A single float per element\n vec3 position = position3DAndHeight.xyz;\n float height = position3DAndHeight.w;\n vec2 textureCoordinates = textureCoordAndEncodedNormals.xy;\n\n#if (defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)) && defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = textureCoordAndEncodedNormals.w;\n#elif defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = textureCoordAndEncodedNormals.z;\n#elif defined(INCLUDE_WEB_MERCATOR_Y)\n float webMercatorT = textureCoordAndEncodedNormals.z;\n float encodedNormal = 0.0;\n#else\n float webMercatorT = textureCoordinates.y;\n float encodedNormal = 0.0;\n#endif\n\n#endif\n\n vec3 position3DWC = position + u_center3D;\n\n#ifdef GEODETIC_SURFACE_NORMALS\n vec3 ellipsoidNormal = geodeticSurfaceNormal;\n#else\n vec3 ellipsoidNormal = normalize(position3DWC);\n#endif\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n float exaggeration = u_terrainExaggerationAndRelativeHeight.x;\n float relativeHeight = u_terrainExaggerationAndRelativeHeight.y;\n float newHeight = (height - relativeHeight) * exaggeration + relativeHeight;\n\n // stop from going through center of earth\n float minRadius = min(min(czm_ellipsoidRadii.x, czm_ellipsoidRadii.y), czm_ellipsoidRadii.z);\n newHeight = max(newHeight, -minRadius);\n\n vec3 offset = ellipsoidNormal * (newHeight - height);\n position += offset;\n position3DWC += offset;\n height = newHeight;\n#endif\n\n gl_Position = getPosition(position, height, textureCoordinates);\n\n v_textureCoordinates = vec3(textureCoordinates, webMercatorT);\n\n#if defined(ENABLE_VERTEX_LIGHTING) || defined(GENERATE_POSITION_AND_NORMAL) || defined(APPLY_MATERIAL)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n vec3 normalMC = czm_octDecode(encodedNormal);\n\n#if defined(EXAGGERATION) && defined(GEODETIC_SURFACE_NORMALS)\n vec3 projection = dot(normalMC, ellipsoidNormal) * ellipsoidNormal;\n vec3 rejection = normalMC - projection;\n normalMC = normalize(projection + rejection * exaggeration);\n#endif\n\n v_normalMC = normalMC;\n v_normalEC = czm_normal3D * v_normalMC;\n#elif defined(SHOW_REFLECTIVE_OCEAN) || defined(ENABLE_DAYNIGHT_SHADING) || defined(GENERATE_POSITION) || defined(HDR)\n v_positionEC = (u_modifiedModelView * vec4(position, 1.0)).xyz;\n v_positionMC = position3DWC; // position in model coordinates\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE)\n AtmosphereColor atmosFogColor = computeGroundAtmosphereFromSpace(position3DWC, false, vec3(0.0));\n v_fogMieColor = atmosFogColor.mie;\n v_fogRayleighColor = atmosFogColor.rayleigh;\n#endif\n\n#if defined(FOG) || defined(GROUND_ATMOSPHERE) || defined(UNDERGROUND_COLOR) || defined(TRANSLUCENT)\n v_distance = length((czm_modelView3D * vec4(position3DWC, 1.0)).xyz);\n#endif\n\n#ifdef APPLY_MATERIAL\n float northPoleZ = czm_ellipsoidRadii.z;\n vec3 northPolePositionMC = vec3(0.0, 0.0, northPoleZ);\n vec3 vectorEastMC = normalize(cross(northPolePositionMC - v_positionMC, ellipsoidNormal));\n float dotProd = abs(dot(ellipsoidNormal, v_normalMC));\n v_slope = acos(dotProd);\n vec3 normalRejected = ellipsoidNormal * dotProd;\n vec3 normalProjected = v_normalMC - normalRejected;\n vec3 aspectVector = normalize(normalProjected);\n v_aspect = acos(dot(aspectVector, vectorEastMC));\n float determ = dot(cross(vectorEastMC, aspectVector), ellipsoidNormal);\n v_aspect = czm_branchFreeTernary(determ < 0.0, 2.0 * czm_pi - v_aspect, v_aspect);\n v_height = height;\n#endif\n}\n"},function(e,t,i){"use strict";var n=i(0),a=i(19),r=i(202),o=i(67),s=i(356),l=i(13);function u(e,t,i,n,a){this.numberOfDayTextures=e,this.flags=t,this.material=i,this.shaderProgram=n,this.clippingShaderState=a}function d(){this.baseVertexShaderSource=void 0,this.baseFragmentShaderSource=void 0,this._shadersByTexturesFlags=[],this.material=void 0}d.prototype.getShaderProgram=function(e){var t=e.frameState,i=e.surfaceTile,a=e.numberOfDayTextures,d=e.applyBrightness,c=e.applyContrast,f=e.applyHue,h=e.applySaturation,p=e.applyGamma,m=e.applyAlpha,_=e.applyDayNightAlpha,g=e.applySplit,v=e.showReflectiveOcean,y=e.showOceanWaves,b=e.enableLighting,w=e.dynamicAtmosphereLighting,O=e.dynamicAtmosphereLightingFromSun,x=e.showGroundAtmosphere,A=e.perFragmentGroundAtmosphere,T=e.hasVertexNormals,E=e.useWebMercatorProjection,C=e.enableFog,S=e.enableClippingPlanes,M=e.clippingPlanes,D=e.clippedByBoundaries,P=e.hasImageryLayerCutout,I=e.colorCorrect,L=e.highlightFillTile,j=e.colorToAlpha,R=e.hasGeodeticSurfaceNormals,N=e.hasExaggeration,B=e.showUndergroundColor,F=e.translucent,k=0,z="",U=i.renderedMesh.encoding;U.quantization===r.a.BITS12&&(k=1,z="QUANTIZATION_BITS12");var V=0,H="";D&&(V=1,H="TILE_LIMIT_RECTANGLE");var G=0,Y="";P&&(G=1,Y="APPLY_IMAGERY_CUTOUT");var W=t.mode,q=W|d<<2|c<<3|f<<4|h<<5|p<<6|m<<7|v<<8|y<<9|b<<10|w<<11|O<<12|x<<13|A<<14|T<<15|E<<16|C<<17|k<<18|g<<19|S<<20|V<<21|G<<22|I<<23|L<<24|j<<25|R<<26|N<<27|B<<28|F<<29|_<<30,X=0;Object(n.default)(M)&&M.length>0&&(X=S?M.clippingPlanesState:0);var K=i.surfaceShader;if(Object(n.default)(K)&&K.numberOfDayTextures===a&&K.flags===q&&K.material===this.material&&K.clippingShaderState===X)return K.shaderProgram;var J=this._shadersByTexturesFlags[a];if(Object(n.default)(J)||(J=this._shadersByTexturesFlags[a]=[]),K=J[q],!Object(n.default)(K)||K.material!==this.material||K.clippingShaderState!==X){var Z=this.baseVertexShaderSource.clone(),Q=this.baseFragmentShaderSource.clone();0!==X&&Q.sources.unshift(Object(s.a)(M,t.context)),Z.defines.push(z),Q.defines.push("TEXTURE_UNITS "+a,H,Y),d&&Q.defines.push("APPLY_BRIGHTNESS"),c&&Q.defines.push("APPLY_CONTRAST"),f&&Q.defines.push("APPLY_HUE"),h&&Q.defines.push("APPLY_SATURATION"),p&&Q.defines.push("APPLY_GAMMA"),m&&Q.defines.push("APPLY_ALPHA"),_&&Q.defines.push("APPLY_DAY_NIGHT_ALPHA"),v&&(Q.defines.push("SHOW_REFLECTIVE_OCEAN"),Z.defines.push("SHOW_REFLECTIVE_OCEAN")),y&&Q.defines.push("SHOW_OCEAN_WAVES"),j&&Q.defines.push("APPLY_COLOR_TO_ALPHA"),B&&(Z.defines.push("UNDERGROUND_COLOR"),Q.defines.push("UNDERGROUND_COLOR")),F&&(Z.defines.push("TRANSLUCENT"),Q.defines.push("TRANSLUCENT")),b&&(T?(Z.defines.push("ENABLE_VERTEX_LIGHTING"),Q.defines.push("ENABLE_VERTEX_LIGHTING")):(Z.defines.push("ENABLE_DAYNIGHT_SHADING"),Q.defines.push("ENABLE_DAYNIGHT_SHADING"))),w&&(Q.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING"),O&&Q.defines.push("DYNAMIC_ATMOSPHERE_LIGHTING_FROM_SUN")),x&&(Z.defines.push("GROUND_ATMOSPHERE"),Q.defines.push("GROUND_ATMOSPHERE"),A&&Q.defines.push("PER_FRAGMENT_GROUND_ATMOSPHERE")),Z.defines.push("INCLUDE_WEB_MERCATOR_Y"),Q.defines.push("INCLUDE_WEB_MERCATOR_Y"),C&&(Z.defines.push("FOG"),Q.defines.push("FOG")),g&&Q.defines.push("APPLY_SPLIT"),S&&Q.defines.push("ENABLE_CLIPPING_PLANES"),I&&Q.defines.push("COLOR_CORRECT"),L&&Q.defines.push("HIGHLIGHT_FILL_TILE"),R&&Z.defines.push("GEODETIC_SURFACE_NORMALS"),N&&Z.defines.push("EXAGGERATION");var $=" vec4 computeDayColor(vec4 initialColor, vec3 textureCoordinates, float nightBlend)\n {\n vec4 color = initialColor;\n";P&&($+=" vec4 cutoutAndColorResult;\n bool texelUnclipped;\n");for(var ee=0;ee<a;++ee)$+=P?" cutoutAndColorResult = u_dayTextureCutoutRectangles["+ee+"];\n texelUnclipped = v_textureCoordinates.x < cutoutAndColorResult.x || cutoutAndColorResult.z < v_textureCoordinates.x || v_textureCoordinates.y < cutoutAndColorResult.y || cutoutAndColorResult.w < v_textureCoordinates.y;\n cutoutAndColorResult = sampleAndBlend(\n":" color = sampleAndBlend(\n",$+=" color,\n u_dayTextures["+ee+"],\n u_dayTextureUseWebMercatorT["+ee+"] ? textureCoordinates.xz : textureCoordinates.xy,\n u_dayTextureTexCoordsRectangle["+ee+"],\n u_dayTextureTranslationAndScale["+ee+"],\n "+(m?"u_dayTextureAlpha["+ee+"]":"1.0")+",\n "+(_?"u_dayTextureNightAlpha["+ee+"]":"1.0")+",\n"+(_?"u_dayTextureDayAlpha["+ee+"]":"1.0")+",\n"+(d?"u_dayTextureBrightness["+ee+"]":"0.0")+",\n "+(c?"u_dayTextureContrast["+ee+"]":"0.0")+",\n "+(f?"u_dayTextureHue["+ee+"]":"0.0")+",\n "+(h?"u_dayTextureSaturation["+ee+"]":"0.0")+",\n "+(p?"u_dayTextureOneOverGamma["+ee+"]":"0.0")+",\n "+(g?"u_dayTextureSplit["+ee+"]":"0.0")+",\n "+(j?"u_colorsToAlpha["+ee+"]":"vec4(0.0)")+",\n nightBlend );\n",P&&($+=" color = czm_branchFreeTernary(texelUnclipped, cutoutAndColorResult, color);\n");$+=" return color;\n }",Q.sources.push($),Z.sources.push(function(e){var t;switch(e){case l.default.SCENE3D:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPosition3DMode(position, height, textureCoordinates); }";break;case l.default.SCENE2D:case l.default.COLUMBUS_VIEW:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionColumbusViewMode(position, height, textureCoordinates); }";break;case l.default.MORPHING:t="vec4 getPosition(vec3 position, float height, vec2 textureCoordinates) { return getPositionMorphingMode(position, height, textureCoordinates); }"}return t}(W)),Z.sources.push(function(e){return e?"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DMercatorYPositionFraction(textureCoordinates); }":"float get2DYPositionFraction(vec2 textureCoordinates) { return get2DGeographicYPositionFraction(textureCoordinates); }"}(E));var te=o.default.fromCache({context:t.context,vertexShaderSource:Z,fragmentShaderSource:Q,attributeLocations:U.getAttributeLocations()});K=J[q]=new u(a,q,this.material,te,X)}return i.surfaceShader=K,K.shaderProgram},d.prototype.destroy=function(){var e,t,i=this._shadersByTexturesFlags;for(var r in i)if(i.hasOwnProperty(r)){var o=i[r];if(!Object(n.default)(o))continue;for(e in o)o.hasOwnProperty(e)&&(t=o[e],Object(n.default)(t)&&t.shaderProgram.destroy())}return Object(a.default)(this)},t.a=d},function(e,t,i){"use strict";var n=i(17),a=i(308),r=i(8),o=i(1),s=i(16),l=i(22),u=i(50),d=i(7),c=i(53),f=i(60),h=i(2),p=i(0),m=i(19),_=i(3),g=i(24),v=i(43),y=i(95),b=i(38),w=i(78),O=i(5),x=i(6),A=i(65),T=i(123),E=i(79),C=i(35),S=i(21),M=i(357),D=i(242),P=i(202),I=i(176),L=i(135),j=i(57),R=i(36),N=i(56),B=i(44),F=i(26),k=i(39),z=i(104),U=i(74),V=i(253),H=i(223),G=i(292),Y=i(272),W=i(114),q=i(61),X=i(64),K=i(200),J=i(13),Z=i(86),Q=i(510),$=i(147),ee=i(285),te=i(107);function ie(e){if(!Object(p.default)(e))throw new _.default("options is required.");if(!Object(p.default)(e.terrainProvider))throw new _.default("options.terrainProvider is required.");if(!Object(p.default)(e.imageryLayers))throw new _.default("options.imageryLayers is required.");if(!Object(p.default)(e.surfaceShaderSet))throw new _.default("options.surfaceShaderSet is required.");this.lightingFadeOutDistance=65e5,this.lightingFadeInDistance=9e6,this.hasWaterMask=!1,this.oceanNormalMap=void 0,this.zoomedOutOceanSpecularIntensity=.5,this.enableLighting=!1,this.dynamicAtmosphereLighting=!1,this.dynamicAtmosphereLightingFromSun=!1,this.showGroundAtmosphere=!1,this.shadows=Z.a.RECEIVE_ONLY,this.fillHighlightColor=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this.showSkirts=!0,this.backFaceCulling=!0,this.undergroundColor=void 0,this.undergroundColorAlphaByDistance=void 0,this.lambertDiffuseMultiplier=0,this.materialUniformMap=void 0,this._materialUniformMap=void 0,this._quadtree=void 0,this._terrainProvider=e.terrainProvider,this._imageryLayers=e.imageryLayers,this._surfaceShaderSet=e.surfaceShaderSet,this._renderState=void 0,this._blendRenderState=void 0,this._disableCullingRenderState=void 0,this._disableCullingBlendRenderState=void 0,this._errorEvent=new g.default,this._imageryLayers.layerAdded.addEventListener(ie.prototype._onLayerAdded,this),this._imageryLayers.layerRemoved.addEventListener(ie.prototype._onLayerRemoved,this),this._imageryLayers.layerMoved.addEventListener(ie.prototype._onLayerMoved,this),this._imageryLayers.layerShownOrHidden.addEventListener(ie.prototype._onLayerShownOrHidden,this),this._imageryLayersUpdatedEvent=new g.default,this._layerOrderChanged=!1,this._tilesToRenderByTextureCount=[],this._drawCommands=[],this._uniformMaps=[],this._usedDrawCommands=0,this._vertexArraysToDestroy=[],this._debug={wireframe:!1,boundingSphereTile:void 0},this._baseColor=void 0,this._firstPassInitialColor=void 0,this.baseColor=new d.default(0,0,.5,1),this._clippingPlanes=void 0,this.cartographicLimitRectangle=S.default.clone(S.default.MAX_VALUE),this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1,this._oldTerrainExaggeration=void 0,this._oldTerrainExaggerationRelativeHeight=void 0}function ne(e,t){var i=e.loadingImagery;Object(p.default)(i)||(i=e.readyImagery);var n=t.loadingImagery;return Object(p.default)(n)||(n=t.readyImagery),i.imageryLayer._layerIndex-n.imageryLayer._layerIndex}function ae(e,t){var i=t.globeTranslucencyState;if(i.translucent){var n=e.renderState.blending.enabled;i.pushDerivedCommands(e,n,t)}else t.commandList.push(e)}Object.defineProperties(ie.prototype,{baseColor:{get:function(){return this._baseColor},set:function(e){if(!Object(p.default)(e))throw new _.default("value is required.");this._baseColor=e,this._firstPassInitialColor=s.a.fromColor(e,this._firstPassInitialColor)}},quadtree:{get:function(){return this._quadtree},set:function(e){if(!Object(p.default)(e))throw new _.default("value is required.");this._quadtree=e}},ready:{get:function(){return this._terrainProvider.ready&&(0===this._imageryLayers.length||this._imageryLayers.get(0).imageryProvider.ready)}},tilingScheme:{get:function(){return this._terrainProvider.tilingScheme}},errorEvent:{get:function(){return this._errorEvent}},imageryLayersUpdatedEvent:{get:function(){return this._imageryLayersUpdatedEvent}},terrainProvider:{get:function(){return this._terrainProvider},set:function(e){if(this._terrainProvider!==e){if(!Object(p.default)(e))throw new _.default("terrainProvider is required.");this._terrainProvider=e,Object(p.default)(this._quadtree)&&this._quadtree.invalidateAllTiles()}}},clippingPlanes:{get:function(){return this._clippingPlanes},set:function(e){V.a.setOwner(e,this,"_clippingPlanes")}}}),ie.prototype.update=function(e){this._imageryLayers._update()},ie.prototype.initialize=function(e){this._imageryLayers.queueReprojectionCommands(e),this._layerOrderChanged&&(this._layerOrderChanged=!1,this._quadtree.forEachLoadedTile((function(e){e.data.imagery.sort(ne)}))),function(e,t){var i=t.creditDisplay;e._terrainProvider.ready&&Object(p.default)(e._terrainProvider.credit)&&i.addCredit(e._terrainProvider.credit);for(var n=e._imageryLayers,a=0,r=n.length;a<r;++a){var o=n.get(a).imageryProvider;o.ready&&Object(p.default)(o.credit)&&i.addCredit(o.credit)}}(this,e);for(var t=this._vertexArraysToDestroy,i=t.length,n=0;n<i;++n)G.a._freeVertexArray(t[n]);t.length=0},ie.prototype.beginUpdate=function(e){for(var t=this._tilesToRenderByTextureCount,i=0,n=t.length;i<n;++i){var a=t[i];Object(p.default)(a)&&(a.length=0)}var r=this._clippingPlanes;Object(p.default)(r)&&r.enabled&&r.update(e),this._usedDrawCommands=0,this._hasLoadedTilesThisFrame=!1,this._hasFillTilesThisFrame=!1},ie.prototype.endUpdate=function(e){if(!Object(p.default)(this._renderState)){this._renderState=k.default.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:H.a.LESS}}),this._blendRenderState=k.default.fromCache({cull:{enabled:!0},depthTest:{enabled:!0,func:H.a.LESS_OR_EQUAL},blending:U.default.ALPHA_BLEND});var t=Object(u.default)(this._renderState,!0);t.cull.enabled=!1,this._disableCullingRenderState=k.default.fromCache(t),(t=Object(u.default)(this._blendRenderState,!0)).cull.enabled=!1,this._disableCullingBlendRenderState=k.default.fromCache(t)}this._hasFillTilesThisFrame&&this._hasLoadedTilesThisFrame&&Q.a.updateFillTiles(this,this._quadtree._tilesToRender,e,this._vertexArraysToDestroy);var i=this.quadtree,n=e.terrainExaggeration,a=e.terrainExaggerationRelativeHeight,r=this._oldTerrainExaggeration!==n||this._oldTerrainExaggerationRelativeHeight!==a;this._oldTerrainExaggeration=n,this._oldTerrainExaggerationRelativeHeight=a,r&&i.forEachLoadedTile((function(t){t.data.updateExaggeration(t,e,i)}));for(var o=this._tilesToRenderByTextureCount,s=0,l=o.length;s<l;++s){var d=o[s];if(Object(p.default)(d))for(var c=0,f=d.length;c<f;++c){var h=d[c],m=h.data.tileBoundingRegion;Ne(this,h,e),e.minimumTerrainHeight=Math.min(e.minimumTerrainHeight,m.minimumHeight)}}},ie.prototype.updateForPick=function(e){for(var t=this._drawCommands,i=0,n=this._usedDrawCommands;i<n;++i)ae(t[i],e)},ie.prototype.cancelReprojections=function(){this._imageryLayers.cancelReprojections()},ie.prototype.getLevelMaximumGeometricError=function(e){return this._terrainProvider.getLevelMaximumGeometricError(e)},ie.prototype.loadTile=function(e,t){var i,n=t.data,a=!0;Object(p.default)(n)&&(a=n.boundingVolumeSourceTile!==t||t._lastSelectionResult===te.a.CULLED_BUT_NEEDED,i=n.terrainState),G.a.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,a),n=t.data,a&&i!==t.data.terrainState&&this.computeTileVisibility(t,e,this.quadtree.occluders)!==I.a.NONE&&n.boundingVolumeSourceTile===t&&(a=!1,G.a.processStateMachine(t,e,this.terrainProvider,this._imageryLayers,this.quadtree,this._vertexArraysToDestroy,a))};var re=new n.default,oe=new S.default,se=new S.default,le=new l.default;function ue(e,t){if(t.west<t.east)return t;var i=S.default.clone(t,se);return S.default.center(e,le).longitude>0?i.east=O.default.PI:i.west=-O.default.PI,i}function de(e,t){if(t.cameraUnderground)return!0;if(t.globeTranslucencyState.translucent)return!0;if(e.backFaceCulling)return!1;var i=e._clippingPlanes;return!(!Object(p.default)(i)||!i.enabled)||!S.default.equals(e.cartographicLimitRectangle,S.default.MAX_VALUE)}ie.prototype.computeTileVisibility=function(e,t,i){var a=this.computeDistanceToTile(e,t);e._distance=a;var r=de(this,t);if(t.fog.enabled&&!r&&O.default.fog(a,t.fog.density)>=1)return I.a.NONE;var s=e.data,l=s.tileBoundingRegion;if(void 0===s.boundingVolumeSourceTile)return I.a.PARTIAL;var u=t.cullingVolume,d=l.boundingVolume;Object(p.default)(d)||(d=l.boundingSphere),s.clippedByBoundaries=!1;var c=ue(e.rectangle,this.cartographicLimitRectangle),f=S.default.simpleIntersection(c,e.rectangle,oe);if(!Object(p.default)(f))return I.a.NONE;if(S.default.equals(f,e.rectangle)||(s.clippedByBoundaries=!0),t.mode!==J.default.SCENE3D&&(d=re,n.default.fromRectangleWithHeights2D(e.rectangle,t.mapProjection,l.minimumHeight,l.maximumHeight,d),o.default.fromElements(d.center.z,d.center.x,d.center.y,d.center),t.mode===J.default.MORPHING&&Object(p.default)(s.renderedMesh)&&(d=n.default.union(l.boundingSphere,d,d))),!Object(p.default)(d))return I.a.PARTIAL;var h,m=this._clippingPlanes;if(Object(p.default)(m)&&m.enabled){var _=m.computeIntersectionWithBoundingVolume(d);if(e.isClipped=_!==w.a.INSIDE,_===w.a.OUTSIDE)return I.a.NONE}var g=u.computeVisibility(d);if(g===w.a.OUTSIDE?h=I.a.NONE:g===w.a.INTERSECTING?h=I.a.PARTIAL:g===w.a.INSIDE&&(h=I.a.FULL),h===I.a.NONE)return h;var v=t.mode===J.default.SCENE3D&&t.camera.frustum instanceof E.a;if(t.mode===J.default.SCENE3D&&!v&&Object(p.default)(i)&&!r){var y=s.occludeePointInScaledSpace;return Object(p.default)(y)?i.ellipsoid.isScaledSpacePointVisiblePossiblyUnderEllipsoid(y,l.minimumHeight)?h:I.a.NONE:h}return h},ie.prototype.canRefine=function(e){return!!Object(p.default)(e.data.terrainData)||void 0!==this.terrainProvider.getTileDataAvailable(2*e.x,2*e.y,e.level+1)};var ce=[],fe=[];ie.prototype.canRenderWithoutLosingDetail=function(e,t){var i=e.data,n=ce;n.length=this._imageryLayers.length;var a,r,o,s=!1,l=!1;for(Object(p.default)(i)&&(s=i.terrainState===$.a.READY,l=!0,a=i.imagery),r=0,o=n.length;r<o;++r)n[r]=l;if(Object(p.default)(a))for(r=0,o=a.length;r<o;++r){var u=a[r],d=u.loadingImagery,c=!Object(p.default)(d)||d.state===W.a.FAILED||d.state===W.a.INVALID,f=(u.loadingImagery||u.readyImagery).imageryLayer._layerIndex;n[f]=c&&n[f]}var h=this.quadtree._lastSelectionFrameNumber,m=fe;for(m.length=0,m.push(e.southwestChild,e.southeastChild,e.northwestChild,e.northeastChild);m.length>0;){var _=m.pop(),g=_._lastSelectionResultFrame===h?_._lastSelectionResult:te.a.NONE;if(g===te.a.RENDERED){var v=_.data;if(!Object(p.default)(v))continue;if(!s&&_.data.terrainState===$.a.READY)return!1;var y=_.data.imagery;for(r=0,o=y.length;r<o;++r){var b=y[r],w=b.loadingImagery,O=!Object(p.default)(w)||w.state===W.a.FAILED||w.state===W.a.INVALID,x=(b.loadingImagery||b.readyImagery).imageryLayer._layerIndex;if(O&&!n[x])return!1}}else g===te.a.REFINED&&m.push(_.southwestChild,_.southeastChild,_.northwestChild,_.northeastChild)}return!0};var he=new o.default;ie.prototype.computeTileLoadPriority=function(e,t){var i=e.data;if(void 0===i)return 0;var n=i.tileBoundingRegion.boundingVolume;if(void 0===n)return 0;var a=t.camera.positionWC,r=t.camera.directionWC,s=o.default.subtract(n.center,a,he),l=o.default.magnitude(s);return l<O.default.EPSILON5?0:(o.default.divideByScalar(s,l,s),(1-o.default.dot(s,r))*e._distance)};var pe=new x.default,me=new x.default,_e=new s.a,ge=new s.a,ve=new s.a,ye=new o.default,be=new o.default,we=new o.default,Oe=new o.default;ie.prototype.showTileThisFrame=function(e,t){for(var i=0,n=e.data.imagery,a=0,r=n.length;a<r;++a){var o=n[a];Object(p.default)(o.readyImagery)&&0!==o.readyImagery.imageryLayer.alpha&&++i}var s=this._tilesToRenderByTextureCount[i];Object(p.default)(s)||(s=[],this._tilesToRenderByTextureCount[i]=s),s.push(e);var l=e.data;Object(p.default)(l.vertexArray)?this._hasLoadedTilesThisFrame=!0:this._hasFillTilesThisFrame=!0;var u=this._debug;++u.tilesRendered,u.texturesRendered+=i};var xe=[new o.default,new o.default,new o.default,new o.default];function Ae(e,t,i,n,a,r){var s=e.quadtree._occluders.ellipsoid,l=s.ellipsoid,u=xe;return o.default.fromRadians(i.west,i.south,a,l,u[0]),o.default.fromRadians(i.east,i.south,a,l,u[1]),o.default.fromRadians(i.west,i.north,a,l,u[2]),o.default.fromRadians(i.east,i.north,a,l,u[3]),s.computeHorizonCullingPointPossiblyUnderEllipsoid(t,u,n,r)}ie.prototype.computeDistanceToTile=function(e,t){!function(e,t,i){var a=e.data;void 0===a&&(a=e.data=new G.a);var r=e.tilingScheme.ellipsoid;void 0===a.tileBoundingRegion&&(a.tileBoundingRegion=new ee.a({computeBoundingVolumes:!1,rectangle:e.rectangle,ellipsoid:r,minimumHeight:0,maximumHeight:0}));var s=a.tileBoundingRegion,l=s.minimumHeight,u=s.maximumHeight,d=!1,c=e,f=a.mesh,h=a.terrainData;if(void 0!==f&&void 0!==f.minimumHeight&&void 0!==f.maximumHeight)s.minimumHeight=f.minimumHeight,s.maximumHeight=f.maximumHeight,d=!0;else if(void 0!==h&&void 0!==h._minimumHeight&&void 0!==h._maximumHeight)s.minimumHeight=h._minimumHeight,s.maximumHeight=h._maximumHeight;else{s.minimumHeight=Number.NaN,s.maximumHeight=Number.NaN;for(var m=e.parent;void 0!==m;){var _=m.data;if(void 0!==_){var g=_.mesh,v=_.terrainData;if(void 0!==g&&void 0!==g.minimumHeight&&void 0!==g.maximumHeight){s.minimumHeight=g.minimumHeight,s.maximumHeight=g.maximumHeight;break}if(void 0!==v&&void 0!==v._minimumHeight&&void 0!==v._maximumHeight){s.minimumHeight=v._minimumHeight,s.maximumHeight=v._maximumHeight;break}}m=m.parent}c=m}if(void 0!==c){var y=i.terrainExaggeration,b=i.terrainExaggerationRelativeHeight;if(1!==y&&(d=!1,s.minimumHeight=D.a.getHeight(s.minimumHeight,y,b),s.maximumHeight=D.a.getHeight(s.maximumHeight,y,b)),d)a.boundingVolumeIsFromMesh||(s._orientedBoundingBox=T.a.clone(f.orientedBoundingBox,s._orientedBoundingBox),s._boundingSphere=n.default.clone(f.boundingSphere3D,s._boundingSphere),a.occludeePointInScaledSpace=o.default.clone(f.occludeePointInScaledSpace,a.occludeePointInScaledSpace),Object(p.default)(a.occludeePointInScaledSpace)||(a.occludeePointInScaledSpace=Ae(t,s._orientedBoundingBox.center,e.rectangle,s.minimumHeight,s.maximumHeight,a.occludeePointInScaledSpace)));else{var w=void 0===s._orientedBoundingBox||void 0===s._boundingSphere;(s.minimumHeight!==l||s.maximumHeight!==u||w)&&(s.computeBoundingVolumes(r),a.occludeePointInScaledSpace=Ae(t,s._orientedBoundingBox.center,e.rectangle,s.minimumHeight,s.maximumHeight,a.occludeePointInScaledSpace))}a.boundingVolumeSourceTile=c,a.boundingVolumeIsFromMesh=d}else a.boundingVolumeSourceTile=void 0,a.boundingVolumeIsFromMesh=!1}(e,this,t);var i=e.data;if(void 0===i.boundingVolumeSourceTile)return 9999999999;var a=i.tileBoundingRegion,r=a.minimumHeight,s=a.maximumHeight;if(i.boundingVolumeSourceTile!==e){var l=t.camera.positionCartographic.height;Math.abs(l-r)>Math.abs(l-s)?(a.minimumHeight=r,a.maximumHeight=r):(a.minimumHeight=s,a.maximumHeight=s)}var u=a.distanceToCamera(t);return a.minimumHeight=r,a.maximumHeight=s,u},ie.prototype.isDestroyed=function(){return!1},ie.prototype.destroy=function(){return this._tileProvider=this._tileProvider&&this._tileProvider.destroy(),this._clippingPlanes=this._clippingPlanes&&this._clippingPlanes.destroy(),Object(m.default)(this)},ie.prototype._onLayerAdded=function(e,t){if(e.show){var i=this._terrainProvider,n=this,a=e.imageryProvider,r=this._imageryLayersUpdatedEvent;a._reload=function(){e._imageryCache={},n._quadtree.forEachLoadedTile((function(t){if(!Object(p.default)(t._loadedCallbacks[e._layerIndex])){var n,a=t.data.imagery,r=a.length,o=-1,s=0;for(n=0;n<r;++n){var l=a[n];if(Object(h.default)(l.readyImagery,l.loadingImagery).imageryLayer===e)-1===o&&(o=n),++s;else if(-1!==o)break}if(-1!==o){var u=o+s;e._createTileImagerySkeletons(t,i,u)&&(t._loadedCallbacks[e._layerIndex]=function(e,t,i){return function(n){var a,r,o,s=-1,l=n.data.imagery,u=l.length;for(o=0;o<u;++o)if(a=l[o],(r=Object(h.default)(a.readyImagery,a.loadingImagery)).imageryLayer===t){s=o;break}if(-1!==s){var d=s+e;if(a=l[d],r=Object(p.default)(a)?Object(h.default)(a.readyImagery,a.loadingImagery):void 0,!Object(p.default)(r)||r.imageryLayer!==t)return!t._createTileImagerySkeletons(n,i,d);for(o=s;o<d;++o)l[o].freeResources();l.splice(s,e)}return!0}}(s,e,i),t.state=K.a.LOADING)}}}))},this._quadtree.forEachLoadedTile((function(t){e._createTileImagerySkeletons(t,i)&&(t.state=K.a.LOADING,0===t.level||t._lastSelectionResultFrame===n.quadtree._lastSelectionFrameNumber&&t._lastSelectionResult===te.a.RENDERED||(t.renderable=!1))})),this._layerOrderChanged=!0,r.raiseEvent()}},ie.prototype._onLayerRemoved=function(e,t){this._quadtree.forEachLoadedTile((function(t){for(var i=t.data.imagery,n=-1,a=0,r=0,o=i.length;r<o;++r){var s=i[r],l=s.loadingImagery;if(Object(p.default)(l)||(l=s.readyImagery),l.imageryLayer===e)-1===n&&(n=r),s.freeResources(),++a;else if(-1!==n)break}-1!==n&&i.splice(n,a)})),Object(p.default)(e.imageryProvider)&&(e.imageryProvider._reload=void 0),this._imageryLayersUpdatedEvent.raiseEvent()},ie.prototype._onLayerMoved=function(e,t,i){this._layerOrderChanged=!0,this._imageryLayersUpdatedEvent.raiseEvent()},ie.prototype._onLayerShownOrHidden=function(e,t,i){i?this._onLayerAdded(e,t):this._onLayerRemoved(e,t)};var Te,Ee,Ce,Se=new x.default,Me=new x.default;function De(e,t){var i={u_initialColor:function(){return this.properties.initialColor},u_fillHighlightColor:function(){return this.properties.fillHighlightColor},u_zoomedOutOceanSpecularIntensity:function(){return this.properties.zoomedOutOceanSpecularIntensity},u_oceanNormalMap:function(){return this.properties.oceanNormalMap},u_lightingFadeDistance:function(){return this.properties.lightingFadeDistance},u_nightFadeDistance:function(){return this.properties.nightFadeDistance},u_center3D:function(){return this.properties.center3D},u_terrainExaggerationAndRelativeHeight:function(){return this.properties.terrainExaggerationAndRelativeHeight},u_tileRectangle:function(){return this.properties.tileRectangle},u_modifiedModelView:function(){var t=e.context.uniformState.view,i=x.default.multiplyByPoint(t,this.properties.rtc,be);return x.default.setTranslation(t,i,pe),pe},u_modifiedModelViewProjection:function(){var t=e.context.uniformState.view,i=e.context.uniformState.projection,n=x.default.multiplyByPoint(t,this.properties.rtc,be);return x.default.setTranslation(t,n,me),x.default.multiply(i,me,me),me},u_dayTextures:function(){return this.properties.dayTextures},u_dayTextureTranslationAndScale:function(){return this.properties.dayTextureTranslationAndScale},u_dayTextureTexCoordsRectangle:function(){return this.properties.dayTextureTexCoordsRectangle},u_dayTextureUseWebMercatorT:function(){return this.properties.dayTextureUseWebMercatorT},u_dayTextureAlpha:function(){return this.properties.dayTextureAlpha},u_dayTextureNightAlpha:function(){return this.properties.dayTextureNightAlpha},u_dayTextureDayAlpha:function(){return this.properties.dayTextureDayAlpha},u_dayTextureBrightness:function(){return this.properties.dayTextureBrightness},u_dayTextureContrast:function(){return this.properties.dayTextureContrast},u_dayTextureHue:function(){return this.properties.dayTextureHue},u_dayTextureSaturation:function(){return this.properties.dayTextureSaturation},u_dayTextureOneOverGamma:function(){return this.properties.dayTextureOneOverGamma},u_dayIntensity:function(){return this.properties.dayIntensity},u_southAndNorthLatitude:function(){return this.properties.southAndNorthLatitude},u_southMercatorYAndOneOverHeight:function(){return this.properties.southMercatorYAndOneOverHeight},u_waterMask:function(){return this.properties.waterMask},u_waterMaskTranslationAndScale:function(){return this.properties.waterMaskTranslationAndScale},u_minMaxHeight:function(){return this.properties.minMaxHeight},u_scaleAndBias:function(){return this.properties.scaleAndBias},u_dayTextureSplit:function(){return this.properties.dayTextureSplit},u_dayTextureCutoutRectangles:function(){return this.properties.dayTextureCutoutRectangles},u_clippingPlanes:function(){var i=t._clippingPlanes;return Object(p.default)(i)&&Object(p.default)(i.texture)?i.texture:e.context.defaultTexture},u_cartographicLimitRectangle:function(){return this.properties.localizedCartographicLimitRectangle},u_clippingPlanesMatrix:function(){var i=t._clippingPlanes,n=Object(p.default)(i)?x.default.multiply(e.context.uniformState.view,i.modelMatrix,Se):x.default.IDENTITY;return x.default.inverseTranspose(n,Me)},u_clippingPlanesEdgeStyle:function(){var e=this.properties.clippingPlanesEdgeColor;return e.alpha=this.properties.clippingPlanesEdgeWidth,e},u_minimumBrightness:function(){return e.fog.minimumBrightness},u_hsbShift:function(){return this.properties.hsbShift},u_colorsToAlpha:function(){return this.properties.colorsToAlpha},u_frontFaceAlphaByDistance:function(){return this.properties.frontFaceAlphaByDistance},u_backFaceAlphaByDistance:function(){return this.properties.backFaceAlphaByDistance},u_translucencyRectangle:function(){return this.properties.localizedTranslucencyRectangle},u_undergroundColor:function(){return this.properties.undergroundColor},u_undergroundColorAlphaByDistance:function(){return this.properties.undergroundColorAlphaByDistance},u_lambertDiffuseMultiplier:function(){return this.properties.lambertDiffuseMultiplier},properties:{initialColor:new s.a(0,0,.5,1),fillHighlightColor:new d.default(0,0,0,0),zoomedOutOceanSpecularIntensity:.5,oceanNormalMap:void 0,lightingFadeDistance:new r.default(65e5,9e6),nightFadeDistance:new r.default(1e7,4e7),hsbShift:new o.default,center3D:void 0,rtc:new o.default,modifiedModelView:new x.default,tileRectangle:new s.a,terrainExaggerationAndRelativeHeight:new r.default(1,0),dayTextures:[],dayTextureTranslationAndScale:[],dayTextureTexCoordsRectangle:[],dayTextureUseWebMercatorT:[],dayTextureAlpha:[],dayTextureNightAlpha:[],dayTextureDayAlpha:[],dayTextureBrightness:[],dayTextureContrast:[],dayTextureHue:[],dayTextureSaturation:[],dayTextureOneOverGamma:[],dayTextureSplit:[],dayTextureCutoutRectangles:[],dayIntensity:0,colorsToAlpha:[],southAndNorthLatitude:new r.default,southMercatorYAndOneOverHeight:new r.default,waterMask:void 0,waterMaskTranslationAndScale:new s.a,minMaxHeight:new r.default,scaleAndBias:new x.default,clippingPlanesEdgeColor:d.default.clone(d.default.WHITE),clippingPlanesEdgeWidth:0,localizedCartographicLimitRectangle:new s.a,frontFaceAlphaByDistance:new s.a,backFaceAlphaByDistance:new s.a,localizedTranslucencyRectangle:new s.a,undergroundColor:d.default.clone(d.default.TRANSPARENT),undergroundColorAlphaByDistance:new s.a,lambertDiffuseMultiplier:0}};return Object(p.default)(t.materialUniformMap)?Object(f.default)(i,t.materialUniformMap):i}function Pe(e,t,i){var n,a,r=i.data;if(Object(p.default)(r.vertexArray)?(n=r.mesh,a=r.vertexArray):Object(p.default)(r.fill)&&Object(p.default)(r.fill.vertexArray)&&(n=r.fill.mesh,a=r.fill.vertexArray),Object(p.default)(n)&&Object(p.default)(a)){if(Object(p.default)(r.wireframeVertexArray)){if(r.wireframeVertexArray.mesh===n)return;r.wireframeVertexArray.destroy(),r.wireframeVertexArray=void 0}r.wireframeVertexArray=function(e,t,i){var n={indices:i.indices,primitiveType:C.default.TRIANGLES};y.a.toWireframe(n);var a=n.indices,r=j.default.createIndexBuffer({context:e,typedArray:a,usage:R.default.STATIC_DRAW,indexDatatype:b.a.fromSizeInBytes(a.BYTES_PER_ELEMENT)});return new z.default({context:e,attributes:t._attributes,indexBuffer:r})}(e,a,n),r.wireframeVertexArray.mesh=n}}!function(){var e,t,i=new v.default({geometry:a.a.fromDimensions({dimensions:new o.default(2,2,2)})}),n=new v.default({geometry:new M.a({radius:1})}),r=new x.default;function s(e){return new X.default({geometryInstances:e,appearance:new q.default({translucent:!1,flat:!0}),asynchronous:!1})}Te=function(n,a){return n===e?t:(Ce(),e=n,r=x.default.fromRotationTranslation(n.halfAxes,n.center,r),i.modelMatrix=r,i.attributes.color=c.default.fromColor(a),t=s(i))},Ee=function(i,a){return i===e?t:(Ce(),e=i,r=x.default.fromTranslation(i.center,r),r=x.default.multiplyByUniformScale(r,i.radius,r),n.modelMatrix=r,n.attributes.color=c.default.fromColor(a),t=s(n))},Ce=function(){Object(p.default)(t)&&(t.destroy(),t=void 0,e=void 0)}}();var Ie=new s.a(0,0,0,0),Le={frameState:void 0,surfaceTile:void 0,numberOfDayTextures:void 0,applyBrightness:void 0,applyContrast:void 0,applyHue:void 0,applySaturation:void 0,applyGamma:void 0,applyAlpha:void 0,applyDayNightAlpha:void 0,applySplit:void 0,showReflectiveOcean:void 0,showOceanWaves:void 0,enableLighting:void 0,dynamicAtmosphereLighting:void 0,dynamicAtmosphereLightingFromSun:void 0,showGroundAtmosphere:void 0,perFragmentGroundAtmosphere:void 0,hasVertexNormals:void 0,useWebMercatorProjection:void 0,enableFog:void 0,enableClippingPlanes:void 0,clippingPlanes:void 0,clippedByBoundaries:void 0,hasImageryLayerCutout:void 0,colorCorrect:void 0,colorToAlpha:void 0,hasGeodeticSurfaceNormals:void 0,hasExaggeration:void 0},je=d.default.TRANSPARENT,Re=new A.a;function Ne(e,t,i){var a=t.data;Object(p.default)(a.vertexArray)||(void 0===a.fill&&(a.fill=new Q.a(t)),a.fill.update(e,i));var r=i.creditDisplay,l=a.terrainData;if(Object(p.default)(l)&&Object(p.default)(l.credits))for(var u=l.credits,c=0,f=u.length;c<f;++c)r.addCredit(u[c]);var m=N.a.maximumTextureImageUnits,g=a.waterMaskTexture,v=a.waterMaskTranslationAndScale;!Object(p.default)(g)&&Object(p.default)(a.fill)&&(g=a.fill.waterMaskTexture,v=a.fill.waterMaskTranslationAndScale);var y=i.cameraUnderground,b=i.globeTranslucencyState,w=b.translucent,A=b.frontFaceAlphaByDistance,E=b.backFaceAlphaByDistance,M=b.rectangle,D=Object(h.default)(e.undergroundColor,je),I=Object(h.default)(e.undergroundColorAlphaByDistance,Re),j=de(e,i)&&i.mode===J.default.SCENE3D&&D.alpha>0&&(I.nearValue>0||I.farValue>0),R=e.lambertDiffuseMultiplier,k=e.hasWaterMask&&Object(p.default)(g),z=e.oceanNormalMap,U=k&&Object(p.default)(z),V=e.terrainProvider.ready&&e.terrainProvider.hasVertexNormals,H=i.fog.enabled&&!y,G=e.showGroundAtmosphere&&i.mode===J.default.SCENE3D,W=Z.a.castShadows(e.shadows)&&!w,q=Z.a.receiveShadows(e.shadows)&&!w,X=e.hueShift,K=e.saturationShift,$=e.brightnessShift,ee=!(O.default.equalsEpsilon(X,0,O.default.EPSILON7)&&O.default.equalsEpsilon(K,0,O.default.EPSILON7)&&O.default.equalsEpsilon($,0,O.default.EPSILON7)),te=!1;G&&(te=o.default.magnitude(i.camera.positionWC)>e.nightFadeOutDistance);k&&--m,U&&--m,Object(p.default)(i.shadowState)&&i.shadowState.shadowsEnabled&&--m,Object(p.default)(e.clippingPlanes)&&e.clippingPlanes.enabled&&--m,m-=b.numberOfTextureUniforms;var ie=a.renderedMesh,ne=ie.center,re=ie.encoding,se=a.tileBoundingRegion,le=i.terrainExaggeration,ce=i.terrainExaggerationRelativeHeight,fe=1!==le,he=re.hasGeodeticSurfaceNormals,pe=_e,me=0,be=0,xe=0,Ae=0,Se=!1;if(i.mode!==J.default.SCENE3D){var Me=i.mapProjection,Ne=Me.project(S.default.southwest(t.rectangle),we),Be=Me.project(S.default.northeast(t.rectangle),Oe);if(pe.x=Ne.x,pe.y=Ne.y,pe.z=Be.x,pe.w=Be.y,i.mode!==J.default.MORPHING&&((ne=ye).x=0,ne.y=.5*(pe.z+pe.x),ne.z=.5*(pe.w+pe.y),pe.x-=ne.y,pe.y-=ne.z,pe.z-=ne.y,pe.w-=ne.z),i.mode===J.default.SCENE2D&&re.quantization===P.a.BITS12){var Fe=1/(Math.pow(2,12)-1)*.5,ke=(pe.z-pe.x)*Fe,ze=(pe.w-pe.y)*Fe;pe.x-=ke,pe.y-=ze,pe.z+=ke,pe.w+=ze}Me instanceof L.a&&(me=t.rectangle.south,be=t.rectangle.north,xe=L.a.geodeticLatitudeToMercatorAngle(me),Ae=1/(L.a.geodeticLatitudeToMercatorAngle(be)-xe),Se=!0)}var Ue=Le;Ue.frameState=i,Ue.surfaceTile=a,Ue.showReflectiveOcean=k,Ue.showOceanWaves=U,Ue.enableLighting=e.enableLighting,Ue.dynamicAtmosphereLighting=e.dynamicAtmosphereLighting,Ue.dynamicAtmosphereLightingFromSun=e.dynamicAtmosphereLightingFromSun,Ue.showGroundAtmosphere=G,Ue.perFragmentGroundAtmosphere=te,Ue.hasVertexNormals=V,Ue.useWebMercatorProjection=Se,Ue.clippedByBoundaries=a.clippedByBoundaries,Ue.hasGeodeticSurfaceNormals=he,Ue.hasExaggeration=fe;var Ve=a.imagery,He=0,Ge=Ve.length,Ye=e.showSkirts&&!y&&!w,We=e.backFaceCulling&&!y&&!w,qe=We?e._renderState:e._disableCullingRenderState,Xe=We?e._blendRenderState:e._disableCullingBlendRenderState,Ke=qe,Je=e._firstPassInitialColor,Ze=i.context;if(Object(p.default)(e._debug.boundingSphereTile)||Ce(),e._materialUniformMap!==e.materialUniformMap){e._materialUniformMap=e.materialUniformMap;for(var Qe=e._drawCommands.length,$e=0;$e<Qe;++$e)e._uniformMaps[$e]=De(i,e)}do{var et,tt,it=0;if(e._drawCommands.length<=e._usedDrawCommands?((et=new B.default).owner=t,et.cull=!1,et.boundingVolume=new n.default,et.orientedBoundingBox=void 0,tt=De(i,e),e._drawCommands.push(et),e._uniformMaps.push(tt)):(et=e._drawCommands[e._usedDrawCommands],tt=e._uniformMaps[e._usedDrawCommands]),et.owner=t,++e._usedDrawCommands,t===e._debug.boundingSphereTile){var nt=se.boundingVolume,at=se.boundingSphere;Object(p.default)(nt)?Te(nt,d.default.RED).update(i):Object(p.default)(at)&&Ee(at,d.default.RED).update(i)}var rt=tt.properties;s.a.clone(Je,rt.initialColor),rt.oceanNormalMap=z,rt.lightingFadeDistance.x=e.lightingFadeOutDistance,rt.lightingFadeDistance.y=e.lightingFadeInDistance,rt.nightFadeDistance.x=e.nightFadeOutDistance,rt.nightFadeDistance.y=e.nightFadeInDistance,rt.zoomedOutOceanSpecularIntensity=e.zoomedOutOceanSpecularIntensity;var ot=y?E:A,st=y?A:E;Object(p.default)(ot)&&(s.a.fromElements(ot.near,ot.nearValue,ot.far,ot.farValue,rt.frontFaceAlphaByDistance),s.a.fromElements(st.near,st.nearValue,st.far,st.farValue,rt.backFaceAlphaByDistance)),s.a.fromElements(I.near,I.nearValue,I.far,I.farValue,rt.undergroundColorAlphaByDistance),d.default.clone(D,rt.undergroundColor),rt.lambertDiffuseMultiplier=R;var lt=!Object(p.default)(a.vertexArray)&&Object(p.default)(e.fillHighlightColor)&&e.fillHighlightColor.alpha>0;lt&&d.default.clone(e.fillHighlightColor,rt.fillHighlightColor),rt.terrainExaggerationAndRelativeHeight.x=le,rt.terrainExaggerationAndRelativeHeight.y=ce,rt.center3D=ie.center,o.default.clone(ne,rt.rtc),s.a.clone(pe,rt.tileRectangle),rt.southAndNorthLatitude.x=me,rt.southAndNorthLatitude.y=be,rt.southMercatorYAndOneOverHeight.x=xe,rt.southMercatorYAndOneOverHeight.y=Ae;var ut=ge,dt=ue(t.rectangle,e.cartographicLimitRectangle),ct=ve,ft=ue(t.rectangle,M);o.default.fromElements(X,K,$,rt.hsbShift);var ht=t.rectangle,pt=1/ht.width,mt=1/ht.height;ut.x=(dt.west-ht.west)*pt,ut.y=(dt.south-ht.south)*mt,ut.z=(dt.east-ht.west)*pt,ut.w=(dt.north-ht.south)*mt,s.a.clone(ut,rt.localizedCartographicLimitRectangle),ct.x=(ft.west-ht.west)*pt,ct.y=(ft.south-ht.south)*mt,ct.z=(ft.east-ht.west)*pt,ct.w=(ft.north-ht.south)*mt,s.a.clone(ct,rt.localizedTranslucencyRectangle);var _t=H&&O.default.fog(t._distance,i.fog.density)>O.default.EPSILON3;ee=ee&&(_t||G);for(var gt=!1,vt=!1,yt=!1,bt=!1,wt=!1,Ot=!1,xt=!1,At=!1,Tt=!1,Et=!1;it<m&&He<Ge;){var Ct=Ve[He],St=Ct.readyImagery;if(++He,Object(p.default)(St)&&0!==St.imageryLayer.alpha){var Mt=Ct.useWebMercatorT?St.textureWebMercator:St.texture;if(!Object(p.default)(Mt))throw new _.default("readyImagery is not actually ready!");var Dt=St.imageryLayer;Object(p.default)(Ct.textureTranslationAndScale)||(Ct.textureTranslationAndScale=Dt._calculateTextureTranslationAndScale(t,Ct)),rt.dayTextures[it]=Mt,rt.dayTextureTranslationAndScale[it]=Ct.textureTranslationAndScale,rt.dayTextureTexCoordsRectangle[it]=Ct.textureCoordinateRectangle,rt.dayTextureUseWebMercatorT[it]=Ct.useWebMercatorT,rt.dayTextureAlpha[it]=Dt.alpha,Ot=Ot||1!==rt.dayTextureAlpha[it],rt.dayTextureNightAlpha[it]=Dt.nightAlpha,xt=xt||1!==rt.dayTextureNightAlpha[it],rt.dayTextureDayAlpha[it]=Dt.dayAlpha,xt=xt||1!==rt.dayTextureDayAlpha[it],rt.dayTextureBrightness[it]=Dt.brightness,gt=gt||rt.dayTextureBrightness[it]!==Y.a.DEFAULT_BRIGHTNESS,rt.dayTextureContrast[it]=Dt.contrast,vt=vt||rt.dayTextureContrast[it]!==Y.a.DEFAULT_CONTRAST,rt.dayTextureHue[it]=Dt.hue,yt=yt||rt.dayTextureHue[it]!==Y.a.DEFAULT_HUE,rt.dayTextureSaturation[it]=Dt.saturation,bt=bt||rt.dayTextureSaturation[it]!==Y.a.DEFAULT_SATURATION,rt.dayTextureOneOverGamma[it]=1/Dt.gamma,wt=wt||rt.dayTextureOneOverGamma[it]!==1/Y.a.DEFAULT_GAMMA,rt.dayTextureSplit[it]=Dt.splitDirection,At=At||0!==rt.dayTextureSplit[it];var Pt=rt.dayTextureCutoutRectangles[it];if(Object(p.default)(Pt)||(Pt=rt.dayTextureCutoutRectangles[it]=new s.a),s.a.clone(s.a.ZERO,Pt),Object(p.default)(Dt.cutoutRectangle)){var It=ue(ht,Dt.cutoutRectangle),Lt=S.default.simpleIntersection(It,ht,oe);Tt=Object(p.default)(Lt)||Tt,Pt.x=(It.west-ht.west)*pt,Pt.y=(It.south-ht.south)*mt,Pt.z=(It.east-ht.west)*pt,Pt.w=(It.north-ht.south)*mt}var jt=rt.colorsToAlpha[it];Object(p.default)(jt)||(jt=rt.colorsToAlpha[it]=new s.a);var Rt=Object(p.default)(Dt.colorToAlpha)&&Dt.colorToAlphaThreshold>0;if(Et=Et||Rt,Rt){var Nt=Dt.colorToAlpha;jt.x=Nt.red,jt.y=Nt.green,jt.z=Nt.blue,jt.w=Dt.colorToAlphaThreshold}else jt.w=-1;if(Object(p.default)(St.credits))for(var Bt=St.credits,Ft=0,kt=Bt.length;Ft<kt;++Ft)r.addCredit(Bt[Ft]);++it}}rt.dayTextures.length=it,rt.waterMask=g,s.a.clone(v,rt.waterMaskTranslationAndScale),rt.minMaxHeight.x=re.minimumHeight,rt.minMaxHeight.y=re.maximumHeight,x.default.clone(re.matrix,rt.scaleAndBias);var zt=e._clippingPlanes,Ut=Object(p.default)(zt)&&zt.enabled&&t.isClipped;Ut&&(rt.clippingPlanesEdgeColor=d.default.clone(zt.edgeColor,rt.clippingPlanesEdgeColor),rt.clippingPlanesEdgeWidth=zt.edgeWidth),Ue.numberOfDayTextures=it,Ue.applyBrightness=gt,Ue.applyContrast=vt,Ue.applyHue=yt,Ue.applySaturation=bt,Ue.applyGamma=wt,Ue.applyAlpha=Ot,Ue.applyDayNightAlpha=xt,Ue.applySplit=At,Ue.enableFog=_t,Ue.enableClippingPlanes=Ut,Ue.clippingPlanes=zt,Ue.hasImageryLayerCutout=Tt,Ue.colorCorrect=ee,Ue.highlightFillTile=lt,Ue.colorToAlpha=Et,Ue.showUndergroundColor=j,Ue.translucent=w;var Vt=a.renderedMesh.indices.length;Ye||(Vt=a.renderedMesh.indexCountWithoutSkirts),et.shaderProgram=e._surfaceShaderSet.getShaderProgram(Ue),et.castShadows=W,et.receiveShadows=q,et.renderState=Ke,et.primitiveType=C.default.TRIANGLES,et.vertexArray=a.vertexArray||a.fill.vertexArray,et.count=Vt,et.uniformMap=tt,et.pass=F.default.GLOBE,e._debug.wireframe&&(Pe(Ze,0,t),Object(p.default)(a.wireframeVertexArray)&&(et.vertexArray=a.wireframeVertexArray,et.primitiveType=C.default.LINES,et.count=2*Vt));var Ht=et.boundingVolume,Gt=et.orientedBoundingBox;i.mode!==J.default.SCENE3D?(n.default.fromRectangleWithHeights2D(t.rectangle,i.mapProjection,se.minimumHeight,se.maximumHeight,Ht),o.default.fromElements(Ht.center.z,Ht.center.x,Ht.center.y,Ht.center),i.mode===J.default.MORPHING&&(Ht=n.default.union(se.boundingSphere,Ht,Ht))):(et.boundingVolume=n.default.clone(se.boundingSphere,Ht),et.orientedBoundingBox=T.a.clone(se.boundingVolume,Gt)),et.dirty=!0,w&&b.updateDerivedCommands(et,i),ae(et,i),Ke=Xe,Je=Ie}while(He<Ge)}t.a=ie},function(e,t,i){"use strict";t.a="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n gl_FragColor = texture2D(u_texture, v_textureCoordinates);\n}\n"},function(e,t,i){"use strict";t.a="attribute vec4 position;\nattribute float webMercatorT;\n\nuniform vec2 u_textureDimensions;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n v_textureCoordinates = vec2(position.x, webMercatorT);\n gl_Position = czm_viewportOrthographic * (position * vec4(u_textureDimensions, 1.0, 1.0));\n}\n"},function(e,t,i){"use strict";t.a=Object.freeze({LEFT:-1,NONE:0,RIGHT:1})},function(e,t,i){"use strict";var n=i(4),a=i(0),r=i(3),o=i(65),s=i(21);function l(){this._enabled=!1,this._frontFaceAlpha=1,this._frontFaceAlphaByDistance=void 0,this._backFaceAlpha=1,this._backFaceAlphaByDistance=void 0,this._rectangle=s.default.clone(s.default.MAX_VALUE)}Object.defineProperties(l.prototype,{enabled:{get:function(){return this._enabled},set:function(e){n.a.typeOf.bool("enabled",e),this._enabled=e}},frontFaceAlpha:{get:function(){return this._frontFaceAlpha},set:function(e){n.a.typeOf.number.greaterThanOrEquals("frontFaceAlpha",e,0),n.a.typeOf.number.lessThanOrEquals("frontFaceAlpha",e,1),this._frontFaceAlpha=e}},frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance},set:function(e){if(Object(a.default)(e)&&e.far<e.near)throw new r.default("far distance must be greater than near distance.");this._frontFaceAlphaByDistance=o.a.clone(e,this._frontFaceAlphaByDistance)}},backFaceAlpha:{get:function(){return this._backFaceAlpha},set:function(e){n.a.typeOf.number.greaterThanOrEquals("backFaceAlpha",e,0),n.a.typeOf.number.lessThanOrEquals("backFaceAlpha",e,1),this._backFaceAlpha=e}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance},set:function(e){if(Object(a.default)(e)&&e.far<e.near)throw new r.default("far distance must be greater than near distance.");this._backFaceAlphaByDistance=o.a.clone(e,this._backFaceAlphaByDistance)}},rectangle:{get:function(){return this._rectangle},set:function(e){Object(a.default)(e)||(e=s.default.clone(s.default.MAX_VALUE)),s.default.clone(e,this._rectangle)}}}),t.a=l},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(19),o=i(3),s=i(24),l=i(5),u=i(21),d=i(18),c=i(272);function f(){this._layers=[],this.layerAdded=new s.default,this.layerRemoved=new s.default,this.layerMoved=new s.default,this.layerShownOrHidden=new s.default}function h(e,t){if(!Object(a.default)(t))throw new o.default("layer is required.");var i=e.indexOf(t);if(-1===i)throw new o.default("layer is not in this collection.");return i}function p(e,t,i){var n=e._layers;if((t=l.default.clamp(t,0,n.length-1))!==(i=l.default.clamp(i,0,n.length-1))){var a=n[t];n[t]=n[i],n[i]=a,e._update(),e.layerMoved.raiseEvent(a,i,t)}}Object.defineProperties(f.prototype,{length:{get:function(){return this._layers.length}}}),f.prototype.add=function(e,t){var i=Object(a.default)(t);if(!Object(a.default)(e))throw new o.default("layer is required.");if(i){if(t<0)throw new o.default("index must be greater than or equal to zero.");if(t>this._layers.length)throw new o.default("index must be less than or equal to the number of layers.")}i?this._layers.splice(t,0,e):(t=this._layers.length,this._layers.push(e)),this._update(),this.layerAdded.raiseEvent(e,t)},f.prototype.addImageryProvider=function(e,t){if(!Object(a.default)(e))throw new o.default("imageryProvider is required.");var i=new c.a(e);return this.add(i,t),i},f.prototype.remove=function(e,t){t=Object(n.default)(t,!0);var i=this._layers.indexOf(e);return-1!==i&&(this._layers.splice(i,1),this._update(),this.layerRemoved.raiseEvent(e,i),t&&e.destroy(),!0)},f.prototype.removeAll=function(e){e=Object(n.default)(e,!0);for(var t=this._layers,i=0,a=t.length;i<a;i++){var r=t[i];this.layerRemoved.raiseEvent(r,i),e&&r.destroy()}this._layers=[]},f.prototype.contains=function(e){return-1!==this.indexOf(e)},f.prototype.indexOf=function(e){return this._layers.indexOf(e)},f.prototype.get=function(e){if(!Object(a.default)(e))throw new o.default("index is required.","index");return this._layers[e]},f.prototype.raise=function(e){var t=h(this._layers,e);p(this,t,t+1)},f.prototype.lower=function(e){var t=h(this._layers,e);p(this,t,t-1)},f.prototype.raiseToTop=function(e){var t=h(this._layers,e);t!==this._layers.length-1&&(this._layers.splice(t,1),this._layers.push(e),this._update(),this.layerMoved.raiseEvent(e,this._layers.length-1,t))},f.prototype.lowerToBottom=function(e){var t=h(this._layers,e);0!==t&&(this._layers.splice(t,1),this._layers.splice(0,0,e),this._update(),this.layerMoved.raiseEvent(e,0,t))};var m=new u.default;function _(e,t,i,n){for(var r,o=e.globe._surface._tilesToRender,s=0;!Object(a.default)(r)&&s<o.length;++s){var d=o[s];u.default.contains(d.rectangle,t)&&(r=d)}if(Object(a.default)(r))for(var c=r.data.imagery,f=c.length-1;f>=0;--f){var h=c[f],p=h.readyImagery;if(Object(a.default)(p)){var _=p.imageryLayer.imageryProvider;if((!i||Object(a.default)(_.pickFeatures))&&u.default.contains(p.rectangle,t)){var g=m;g.west=l.default.lerp(r.rectangle.west,r.rectangle.east,h.textureCoordinateRectangle.x-1/1024),g.east=l.default.lerp(r.rectangle.west,r.rectangle.east,h.textureCoordinateRectangle.z+1/1024),g.south=l.default.lerp(r.rectangle.south,r.rectangle.north,h.textureCoordinateRectangle.y-1/1024),g.north=l.default.lerp(r.rectangle.south,r.rectangle.north,h.textureCoordinateRectangle.w+1/1024),u.default.contains(g,t)&&n(p)}}}}f.prototype.pickImageryLayers=function(e,t){var i=t.globe.pick(e,t);if(Object(a.default)(i)){var n=t.globe.ellipsoid.cartesianToCartographic(i),r=[];if(_(t,n,!1,(function(e){r.push(e.imageryLayer)})),0!==r.length)return r}},f.prototype.pickImageryLayerFeatures=function(e,t){var i=t.globe.pick(e,t);if(Object(a.default)(i)){var n=t.globe.ellipsoid.cartesianToCartographic(i),r=[],o=[];if(_(t,n,!0,(function(e){var t=e.imageryLayer.imageryProvider.pickFeatures(e.x,e.y,e.level,n.longitude,n.latitude);Object(a.default)(t)&&(r.push(t),o.push(e.imageryLayer))})),0!==r.length)return d.a.all(r,(function(e){for(var t=[],i=0;i<e.length;++i){var r=e[i],s=o[i];if(Object(a.default)(r)&&r.length>0)for(var l=0;l<r.length;++l){var u=r[l];u.imageryLayer=s,Object(a.default)(u.position)||(u.position=n),t.push(u)}}return t}))}},f.prototype.queueReprojectionCommands=function(e){for(var t=this._layers,i=0,n=t.length;i<n;++i)t[i].queueReprojectionCommands(e)},f.prototype.cancelReprojections=function(){for(var e=this._layers,t=0,i=e.length;t<i;++t)e[t].cancelReprojections()},f.prototype.isDestroyed=function(){return!1},f.prototype.destroy=function(){return this.removeAll(!0),Object(r.default)(this)},f.prototype._update=function(){var e,t,i,n,r=!0,o=this._layers;for(i=0,n=o.length;i<n;++i)(t=o[i])._layerIndex=i,t.show?(t._isBaseLayer=r,r=!1):t._isBaseLayer=!1,t.show!==t._show&&(Object(a.default)(t._show)&&(Object(a.default)(e)||(e=[]),e.push(t)),t._show=t.show);if(Object(a.default)(e))for(i=0,n=e.length;i<n;++i)t=e[i],this.layerShownOrHidden.raiseEvent(t,t._layerIndex,t.show)},t.a=f},function(e,t,i){"use strict";var n,a=i(1),r=i(22),o=i(2),s=i(0),l=i(3),u=i(24),d=i(127),c=i(5),f=i(6),h=i(79),p=i(166),m=i(85),_=i(21),g=i(176),v=i(753),y=i(754),b=i(200),w=i(13),O=i(755),x=i(107);function A(e){if(!Object(s.default)(e)||!Object(s.default)(e.tileProvider))throw new l.default("options.tileProvider is required.");if(Object(s.default)(e.tileProvider.quadtree))throw new l.default("A QuadtreeTileProvider can only be used with a single QuadtreePrimitive");this._tileProvider=e.tileProvider,this._tileProvider.quadtree=this,this._debug={enableDebugOutput:!1,maxDepth:0,maxDepthVisited:0,tilesVisited:0,tilesCulled:0,tilesRendered:0,tilesWaitingForChildren:0,lastMaxDepth:-1,lastMaxDepthVisited:-1,lastTilesVisited:-1,lastTilesCulled:-1,lastTilesRendered:-1,lastTilesWaitingForChildren:-1,suspendLodUpdate:!1};var t=this._tileProvider.tilingScheme.ellipsoid;this._tilesToRender=[],this._tileLoadQueueHigh=[],this._tileLoadQueueMedium=[],this._tileLoadQueueLow=[],this._tileReplacementQueue=new O.a,this._levelZeroTiles=void 0,this._loadQueueTimeSlice=5,this._tilesInvalidated=!1,this._addHeightCallbacks=[],this._removeHeightCallbacks=[],this._tileToUpdateHeights=[],this._lastTileIndex=0,this._updateHeightsTimeSlice=2,this._cameraPositionCartographic=void 0,this._cameraReferenceFrameOriginCartographic=void 0,this.maximumScreenSpaceError=Object(o.default)(e.maximumScreenSpaceError,2),this.tileCacheSize=Object(o.default)(e.tileCacheSize,100),this.loadingDescendantLimit=20,this.preloadAncestors=!0,this.preloadSiblings=!1,this._occluders=new v.a({ellipsoid:t}),this._tileLoadProgressEvent=new u.default,this._lastTileLoadQueueLength=0,this._lastSelectionFrameNumber=void 0}function T(e){var t=e._debug;t.maxDepth=0,t.maxDepthVisited=0,t.tilesVisited=0,t.tilesCulled=0,t.tilesRendered=0,t.tilesWaitingForChildren=0,e._tileLoadQueueHigh.length=0,e._tileLoadQueueMedium.length=0,e._tileLoadQueueLow.length=0}Object.defineProperties(A.prototype,{tileProvider:{get:function(){return this._tileProvider}},tileLoadProgressEvent:{get:function(){return this._tileLoadProgressEvent}},occluders:{get:function(){return this._occluders}}}),A.prototype.invalidateAllTiles=function(){this._tilesInvalidated=!0},A.prototype.forEachLoadedTile=function(e){for(var t=this._tileReplacementQueue.head;Object(s.default)(t);)t.state!==b.a.START&&e(t),t=t.replacementNext},A.prototype.forEachRenderedTile=function(e){for(var t=this._tilesToRender,i=0,n=t.length;i<n;++i)e(t[i])},A.prototype.updateHeight=function(e,t){var i=this,n={positionOnEllipsoidSurface:void 0,positionCartographic:e,level:-1,callback:t,removeFunc:function(){for(var e=i._addHeightCallbacks,t=e.length,a=0;a<t;++a)if(e[a]===n){e.splice(a,1);break}i._removeHeightCallbacks.push(n)}};return i._addHeightCallbacks.push(n),n.removeFunc},A.prototype.update=function(e){Object(s.default)(this._tileProvider.update)&&this._tileProvider.update(e)},A.prototype.beginFrame=function(e){e.passes.render&&(this._tilesInvalidated&&(!function(e){var t=e._tileReplacementQueue;t.head=void 0,t.tail=void 0,t.count=0,T(e);var i=e._levelZeroTiles;if(Object(s.default)(i))for(var n=0;n<i.length;++n){for(var a=i[n].customData,r=a.length,o=0;o<r;++o){var l=a[o];l.level=0,e._addHeightCallbacks.push(l)}i[n].freeResources()}e._levelZeroTiles=void 0,e._tileProvider.cancelReprojections()}(this),this._tilesInvalidated=!1),this._tileProvider.initialize(e),T(this),this._debug.suspendLodUpdate||this._tileReplacementQueue.markStartOfRenderFrame())},A.prototype.render=function(e){var t=e.passes,i=this._tileProvider;t.render&&(i.beginUpdate(e),function(e,t){var i,a=e._debug;if(a.suspendLodUpdate)return;e._tilesToRender.length=0;var r,o=e._tileProvider;if(!Object(s.default)(e._levelZeroTiles)){if(!o.ready)return;var l=o.tilingScheme;e._levelZeroTiles=y.a.createLevelZeroTiles(l);var u=e._levelZeroTiles.length;if(M.length<u)for(M=new Array(u),i=0;i<u;++i)void 0===M[i]&&(M[i]=new P)}e._occluders.ellipsoid.cameraPosition=t.camera.positionWC;var d=e._levelZeroTiles,c=d.length>1?e._occluders:void 0;n=t.camera.positionCartographic,d.sort(C);var h,p=e._addHeightCallbacks,m=e._removeHeightCallbacks,_=t.frameNumber;if(p.length>0||m.length>0){for(i=0,h=d.length;i<h;++i)(r=d[i])._updateCustomData(_,p,m);p.length=0,m.length=0}var g=t.camera;e._cameraPositionCartographic=g.positionCartographic;var v=f.default.getTranslation(g.transform,S);for(e._cameraReferenceFrameOriginCartographic=e.tileProvider.tilingScheme.ellipsoid.cartesianToCartographic(v,e._cameraReferenceFrameOriginCartographic),i=0,h=d.length;i<h;++i)r=d[i],e._tileReplacementQueue.markTileRendered(r),r.renderable?N(e,r,o,t,c,!1,M[i]):(D(e,e._tileLoadQueueHigh,r,t),++a.tilesWaitingForChildren);e._lastSelectionFrameNumber=_}(this,e),function(e,t){for(var i=e._tileProvider,n=e._tilesToRender,a=0,r=n.length;a<r;++a){var o=n[a];i.showTileThisFrame(o,t)}}(this,e),i.endUpdate(e)),t.pick&&this._tilesToRender.length>0&&i.updateForPick(e)},A.prototype.endFrame=function(e){e.passes.render&&e.mode!==w.default.MORPHING&&(function(e,t){var i=e._tileLoadQueueHigh,n=e._tileLoadQueueMedium,a=e._tileLoadQueueLow;if(0===i.length&&0===n.length&&0===a.length)return;e._tileReplacementQueue.trimTiles(e.tileCacheSize);var r=Object(d.a)()+e._loadQueueTimeSlice,o=e._tileProvider,s=k(e,t,o,r,i,!1);s=k(e,t,o,r,n,s),k(e,t,o,r,a,s)}(this,e),function(e,t){if(!e.tileProvider.ready)return;var i=H;i.length=0;var n,l=e._tileToUpdateHeights,u=Object(d.a)(),c=e._updateHeightsTimeSlice,f=u+c,h=t.mode,p=t.mapProjection,m=e.tileProvider.tilingScheme.ellipsoid;for(;l.length>0;){var _=l[0];if(Object(s.default)(_.data)&&Object(s.default)(_.data.mesh)){var g=_.customData,v=g.length,y=!1;for(n=e._lastTileIndex;n<v;++n){var b=g[n],O=_.data.terrainData,A=Object(s.default)(O)&&O.wasCreatedByUpsampling();if(_.level>b.level&&!A){if(Object(s.default)(b.positionOnEllipsoidSurface)||(b.positionOnEllipsoidSurface=a.default.fromRadians(b.positionCartographic.longitude,b.positionCartographic.latitude,0,m)),h===w.default.SCENE3D){var T=m.geodeticSurfaceNormal(b.positionOnEllipsoidSurface,z.direction),E=m.getSurfaceNormalIntersectionWithZAxis(b.positionOnEllipsoidSurface,11500,z.origin);if(!Object(s.default)(E)){var C;Object(s.default)(_.data.tileBoundingRegion)&&(C=_.data.tileBoundingRegion.minimumHeight);var S=Math.min(Object(o.default)(C,0),-11500),M=a.default.multiplyByScalar(T,Math.abs(S)+1,V);a.default.subtract(b.positionOnEllipsoidSurface,M,z.origin)}}else r.default.clone(b.positionCartographic,U),U.height=-11500,p.project(U,V),a.default.fromElements(V.z,V.x,V.y,V),a.default.clone(V,z.origin),a.default.clone(a.default.UNIT_X,z.direction);var D=_.data.pick(z,h,p,!1,V);Object(s.default)(D)&&(b.callback(D),b.level=_.level)}if(Object(d.a)()>=f){y=!0;break}}if(y){e._lastTileIndex=n;break}e._lastTileIndex=0,l.shift()}else{var P=_._lastSelectionResultFrame===e._lastSelectionFrameNumber?_._lastSelectionResult:x.a.NONE;P!==x.a.RENDERED&&P!==x.a.CULLED_BUT_NEEDED||i.push(_),l.shift(),e._lastTileIndex=0}}for(n=0;n<i.length;n++)l.push(i[n])}(this,e),function(e,t){var i=e._tileLoadQueueHigh.length+e._tileLoadQueueMedium.length+e._tileLoadQueueLow.length;(i!==e._lastTileLoadQueueLength||e._tilesInvalidated)&&(t.afterRender.push(u.default.prototype.raiseEvent.bind(e._tileLoadProgressEvent,i)),e._lastTileLoadQueueLength=i);var n=e._debug;n.enableDebugOutput&&!n.suspendLodUpdate&&(n.maxDepth=e._tilesToRender.reduce((function(e,t){return Math.max(e,t.level)}),-1),n.tilesRendered=e._tilesToRender.length,n.tilesVisited===n.lastTilesVisited&&n.tilesRendered===n.lastTilesRendered&&n.tilesCulled===n.lastTilesCulled&&n.maxDepth===n.lastMaxDepth&&n.tilesWaitingForChildren===n.lastTilesWaitingForChildren&&n.maxDepthVisited===n.lastMaxDepthVisited||(console.log("Visited "+n.tilesVisited+", Rendered: "+n.tilesRendered+", Culled: "+n.tilesCulled+", Max Depth Rendered: "+n.maxDepth+", Max Depth Visited: "+n.maxDepthVisited+", Waiting for children: "+n.tilesWaitingForChildren),n.lastTilesVisited=n.tilesVisited,n.lastTilesRendered=n.tilesRendered,n.lastTilesCulled=n.tilesCulled,n.lastMaxDepth=n.maxDepth,n.lastTilesWaitingForChildren=n.tilesWaitingForChildren,n.lastMaxDepthVisited=n.maxDepthVisited))}(this,e))},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){this._tileProvider=this._tileProvider&&this._tileProvider.destroy()};var E=new r.default;function C(e,t){var i=_.default.center(e.rectangle,E),a=i.longitude-n.longitude,r=i.latitude-n.latitude,o=(i=_.default.center(t.rectangle,E)).longitude-n.longitude,s=i.latitude-n.latitude;return a*a+r*r-(o*o+s*s)}var S=new a.default,M=[];function D(e,t,i,n){i.needsLoading&&(void 0!==e.tileProvider.computeTileLoadPriority&&(i._loadPriority=e.tileProvider.computeTileLoadPriority(i,n)),t.push(i))}function P(){this.allAreRenderable=!0,this.anyWereRenderedLastFrame=!1,this.notYetRenderableCount=0}function I(){this.southwest=new P,this.southeast=new P,this.northwest=new P,this.northeast=new P}I.prototype.combine=function(e){var t=this.southwest,i=this.southeast,n=this.northwest,a=this.northeast;e.allAreRenderable=t.allAreRenderable&&i.allAreRenderable&&n.allAreRenderable&&a.allAreRenderable,e.anyWereRenderedLastFrame=t.anyWereRenderedLastFrame||i.anyWereRenderedLastFrame||n.anyWereRenderedLastFrame||a.anyWereRenderedLastFrame,e.notYetRenderableCount=t.notYetRenderableCount+i.notYetRenderableCount+n.notYetRenderableCount+a.notYetRenderableCount};for(var L=new Array(31),j=0;j<L.length;++j)L[j]=new I;function R(e,t,i,n,a){var r=e._debug;++r.tilesVisited,e._tileReplacementQueue.markTileRendered(i),i._updateCustomData(t.frameNumber),i.level>r.maxDepthVisited&&(r.maxDepthVisited=i.level);var o=function(e,t,i){if(t.mode===w.default.SCENE2D||t.camera.frustum instanceof h.a||t.camera.frustum instanceof p.a)return function(e,t,i){var n=t.camera.frustum;Object(s.default)(n._offCenterFrustum)&&(n=n._offCenterFrustum);var a=t.context,r=a.drawingBufferWidth,o=a.drawingBufferHeight,l=e._tileProvider.getLevelMaximumGeometricError(i.level),u=Math.max(n.top-n.bottom,n.right-n.left)/Math.max(r,o),d=l/u;t.fog.enabled&&t.mode!==w.default.SCENE2D&&(d-=c.default.fog(i._distance,t.fog.density)*t.fog.sse);return d/=t.pixelRatio}(e,t,i);var n=e._tileProvider.getLevelMaximumGeometricError(i.level),a=i._distance,r=t.context.drawingBufferHeight,o=t.camera.frustum.sseDenominator,l=n*r/(a*o);t.fog.enabled&&(l-=c.default.fog(a,t.fog.density)*t.fog.sse);return l/=t.pixelRatio}(e,t,i)<e.maximumScreenSpaceError,l=i.southwestChild,u=i.southeastChild,d=i.northwestChild,f=i.northeastChild,m=e._lastSelectionFrameNumber,_=i._lastSelectionResultFrame===m?i._lastSelectionResult:x.a.NONE,g=e.tileProvider;if(o||n){var v=x.a.originalResult(_)===x.a.RENDERED,y=x.a.originalResult(_)===x.a.CULLED||_===x.a.NONE,O=i.state===b.a.DONE,A=v||y||O;if(A||Object(s.default)(g.canRenderWithoutLosingDetail)&&(A=g.canRenderWithoutLosingDetail(i)),A)return o&&D(e,e._tileLoadQueueMedium,i,t),B(e,i),a.allAreRenderable=i.renderable,a.anyWereRenderedLastFrame=_===x.a.RENDERED,a.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=x.a.RENDERED,void(a.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));n=!0,o&&D(e,e._tileLoadQueueHigh,i,t)}if(g.canRefine(i)){if(l.upsampledFromParent&&u.upsampledFromParent&&d.upsampledFromParent&&f.upsampledFromParent)return B(e,i),D(e,e._tileLoadQueueMedium,i,t),e._tileReplacementQueue.markTileRendered(l),e._tileReplacementQueue.markTileRendered(u),e._tileReplacementQueue.markTileRendered(d),e._tileReplacementQueue.markTileRendered(f),a.allAreRenderable=i.renderable,a.anyWereRenderedLastFrame=_===x.a.RENDERED,a.notYetRenderableCount=i.renderable?0:1,i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=x.a.RENDERED,void(a.anyWereRenderedLastFrame||e._tileToUpdateHeights.push(i));i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=x.a.REFINED;var T=e._tilesToRender.length,E=e._tileLoadQueueLow.length,C=e._tileLoadQueueMedium.length,S=e._tileLoadQueueHigh.length,M=e._tileToUpdateHeights.length;if(function(e,t,i,n,a,r,o,s){var l=r.camera.positionCartographic,u=e._tileProvider,d=e._occluders,c=L[t.level],f=c.southwest,h=c.southeast,p=c.northwest,m=c.northeast;l.longitude<t.rectangle.east?l.latitude<t.rectangle.north?(N(e,t,u,r,d,o,f),N(e,i,u,r,d,o,h),N(e,n,u,r,d,o,p),N(e,a,u,r,d,o,m)):(N(e,n,u,r,d,o,p),N(e,t,u,r,d,o,f),N(e,a,u,r,d,o,m),N(e,i,u,r,d,o,h)):l.latitude<t.rectangle.north?(N(e,i,u,r,d,o,h),N(e,t,u,r,d,o,f),N(e,a,u,r,d,o,m),N(e,n,u,r,d,o,p)):(N(e,a,u,r,d,o,m),N(e,n,u,r,d,o,p),N(e,i,u,r,d,o,h),N(e,t,u,r,d,o,f));c.combine(s)}(e,l,u,d,f,t,n,a),T!==e._tilesToRender.length){var P=a.allAreRenderable,I=a.anyWereRenderedLastFrame,j=a.notYetRenderableCount,R=!1;if(!P&&!I){for(var F=e._tilesToRender,k=T;k<F.length;++k)for(var z=F[k];void 0!==z&&z._lastSelectionResult!==x.a.KICKED&&z!==i;)z._lastSelectionResult=x.a.kick(z._lastSelectionResult),z=z.parent;e._tilesToRender.length=T,e._tileToUpdateHeights.length=M,B(e,i),i._lastSelectionResult=x.a.RENDERED;var U=_===x.a.RENDERED;!U&&j>e.loadingDescendantLimit&&(e._tileLoadQueueLow.length=E,e._tileLoadQueueMedium.length=C,e._tileLoadQueueHigh.length=S,D(e,e._tileLoadQueueMedium,i,t),a.notYetRenderableCount=i.renderable?0:1,R=!0),a.allAreRenderable=i.renderable,a.anyWereRenderedLastFrame=U,U||e._tileToUpdateHeights.push(i),++r.tilesWaitingForChildren}e.preloadAncestors&&!R&&D(e,e._tileLoadQueueLow,i,t)}}else i._lastSelectionResultFrame=t.frameNumber,i._lastSelectionResult=x.a.RENDERED,B(e,i),D(e,e._tileLoadQueueHigh,i,t),a.allAreRenderable=i.renderable,a.anyWereRenderedLastFrame=_===x.a.RENDERED,a.notYetRenderableCount=i.renderable?0:1}function N(e,t,i,n,a,r,o){if(i.computeTileVisibility(t,n,a)!==g.a.NONE)return R(e,n,t,r,o);if(++e._debug.tilesCulled,e._tileReplacementQueue.markTileRendered(t),o.allAreRenderable=!0,o.anyWereRenderedLastFrame=!1,o.notYetRenderableCount=0,function(e,t){var i=t.rectangle;return Object(s.default)(e._cameraPositionCartographic)&&_.default.contains(i,e._cameraPositionCartographic)||Object(s.default)(e._cameraReferenceFrameOriginCartographic)&&_.default.contains(i,e._cameraReferenceFrameOriginCartographic)}(e,t)){Object(s.default)(t.data)&&Object(s.default)(t.data.vertexArray)||D(e,e._tileLoadQueueMedium,t,n);var l=e._lastSelectionFrameNumber,u=t._lastSelectionResultFrame===l?t._lastSelectionResult:x.a.NONE;u!==x.a.CULLED_BUT_NEEDED&&u!==x.a.RENDERED&&e._tileToUpdateHeights.push(t),t._lastSelectionResult=x.a.CULLED_BUT_NEEDED}else e.preloadSiblings||0===t.level?(D(e,e._tileLoadQueueLow,t,n),t._lastSelectionResult=x.a.CULLED):t._lastSelectionResult=x.a.CULLED;t._lastSelectionResultFrame=n.frameNumber}function B(e,t){e._tilesToRender.push(t)}function F(e,t){return e._loadPriority-t._loadPriority}function k(e,t,i,n,a,r){void 0!==i.computeTileLoadPriority&&a.sort(F);for(var o=0,s=a.length;o<s&&(Object(d.a)()<n||!r);++o){var l=a[o];e._tileReplacementQueue.markTileRendered(l),i.loadTile(t,l),r=!0}return r}var z=new m.default,U=new r.default,V=new a.default,H=[];t.a=A},function(e,t,i){"use strict";var n=i(1),a=i(329);function r(e){this._ellipsoid=new a.default(e.ellipsoid,n.default.ZERO)}Object.defineProperties(r.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),t.a=r},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(21),o=i(200),s=i(107);function l(e){if(!Object(n.default)(e))throw new a.default("options is required.");if(!Object(n.default)(e.x))throw new a.default("options.x is required.");if(!Object(n.default)(e.y))throw new a.default("options.y is required.");if(e.x<0||e.y<0)throw new a.default("options.x and options.y must be greater than or equal to zero.");if(!Object(n.default)(e.level))throw new a.default("options.level is required and must be greater than or equal to zero.");if(!Object(n.default)(e.tilingScheme))throw new a.default("options.tilingScheme is required.");this._tilingScheme=e.tilingScheme,this._x=e.x,this._y=e.y,this._level=e.level,this._parent=e.parent,this._rectangle=this._tilingScheme.tileXYToRectangle(this._x,this._y,this._level),this._southwestChild=void 0,this._southeastChild=void 0,this._northwestChild=void 0,this._northeastChild=void 0,this.replacementPrevious=void 0,this.replacementNext=void 0,this._distance=0,this._loadPriority=0,this._customData=[],this._frameUpdated=void 0,this._lastSelectionResult=s.a.NONE,this._lastSelectionResultFrame=void 0,this._loadedCallbacks={},this.state=o.a.START,this.renderable=!1,this.upsampledFromParent=!1,this.data=void 0}function u(e){Object(n.default)(e)&&e.freeResources()}l.createLevelZeroTiles=function(e){if(!Object(n.default)(e))throw new a.default("tilingScheme is required.");for(var t=e.getNumberOfXTilesAtLevel(0),i=e.getNumberOfYTilesAtLevel(0),r=new Array(t*i),o=0,s=0;s<i;++s)for(var u=0;u<t;++u)r[o++]=new l({tilingScheme:e,x:u,y:s,level:0});return r},l.prototype._updateCustomData=function(e,t,i){var a,o,s,l=this.customData;if(Object(n.default)(t)&&Object(n.default)(i)){for(l=l.filter((function(e){return-1===i.indexOf(e)})),this._customData=l,s=this._rectangle,a=0;a<t.length;++a)o=t[a],r.default.contains(s,o.positionCartographic)&&l.push(o);this._frameUpdated=e}else{var u=this._parent;if(Object(n.default)(u)&&this._frameUpdated!==u._frameUpdated){l.length=0,s=this._rectangle;var d=u.customData;for(a=0;a<d.length;++a)o=d[a],r.default.contains(s,o.positionCartographic)&&l.push(o);this._frameUpdated=u._frameUpdated}}},Object.defineProperties(l.prototype,{tilingScheme:{get:function(){return this._tilingScheme}},x:{get:function(){return this._x}},y:{get:function(){return this._y}},level:{get:function(){return this._level}},parent:{get:function(){return this._parent}},rectangle:{get:function(){return this._rectangle}},children:{get:function(){return[this.northwestChild,this.northeastChild,this.southwestChild,this.southeastChild]}},southwestChild:{get:function(){return Object(n.default)(this._southwestChild)||(this._southwestChild=new l({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y+1,level:this.level+1,parent:this})),this._southwestChild}},southeastChild:{get:function(){return Object(n.default)(this._southeastChild)||(this._southeastChild=new l({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y+1,level:this.level+1,parent:this})),this._southeastChild}},northwestChild:{get:function(){return Object(n.default)(this._northwestChild)||(this._northwestChild=new l({tilingScheme:this.tilingScheme,x:2*this.x,y:2*this.y,level:this.level+1,parent:this})),this._northwestChild}},northeastChild:{get:function(){return Object(n.default)(this._northeastChild)||(this._northeastChild=new l({tilingScheme:this.tilingScheme,x:2*this.x+1,y:2*this.y,level:this.level+1,parent:this})),this._northeastChild}},customData:{get:function(){return this._customData}},needsLoading:{get:function(){return this.state<o.a.DONE}},eligibleForUnloading:{get:function(){var e=!0;return Object(n.default)(this.data)&&(e=this.data.eligibleForUnloading,Object(n.default)(e)||(e=!0)),e}}}),l.prototype.findLevelZeroTile=function(e,t,i){var n=this.tilingScheme.getNumberOfXTilesAtLevel(0);if(t<0?t+=n:t>=n&&(t-=n),!(i<0||i>=this.tilingScheme.getNumberOfYTilesAtLevel(0)))return e.filter((function(e){return e.x===t&&e.y===i}))[0]},l.prototype.findTileToWest=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x-1,this.y);if(t.southeastChild===this)return t.southwestChild;if(t.northeastChild===this)return t.northwestChild;var i=t.findTileToWest(e);return void 0!==i?t.southwestChild===this?i.southeastChild:i.northeastChild:void 0},l.prototype.findTileToEast=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x+1,this.y);if(t.southwestChild===this)return t.southeastChild;if(t.northwestChild===this)return t.northeastChild;var i=t.findTileToEast(e);return void 0!==i?t.southeastChild===this?i.southwestChild:i.northwestChild:void 0},l.prototype.findTileToSouth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y+1);if(t.northwestChild===this)return t.southwestChild;if(t.northeastChild===this)return t.southeastChild;var i=t.findTileToSouth(e);return void 0!==i?t.southwestChild===this?i.northwestChild:i.northeastChild:void 0},l.prototype.findTileToNorth=function(e){var t=this.parent;if(void 0===t)return this.findLevelZeroTile(e,this.x,this.y-1);if(t.southwestChild===this)return t.northwestChild;if(t.southeastChild===this)return t.northeastChild;var i=t.findTileToNorth(e);return void 0!==i?t.northwestChild===this?i.southwestChild:i.southeastChild:void 0},l.prototype.freeResources=function(){this.state=o.a.START,this.renderable=!1,this.upsampledFromParent=!1,Object(n.default)(this.data)&&Object(n.default)(this.data.freeResources)&&this.data.freeResources(),u(this._southwestChild),this._southwestChild=void 0,u(this._southeastChild),this._southeastChild=void 0,u(this._northwestChild),this._northwestChild=void 0,u(this._northeastChild),this._northeastChild=void 0},t.a=l},function(e,t,i){"use strict";var n=i(0);function a(){this.head=void 0,this.tail=void 0,this.count=0,this._lastBeforeStartOfFrame=void 0}function r(e,t){var i=t.replacementPrevious,n=t.replacementNext;t===e._lastBeforeStartOfFrame&&(e._lastBeforeStartOfFrame=n),t===e.head?e.head=n:i.replacementNext=n,t===e.tail?e.tail=i:n.replacementPrevious=i,t.replacementPrevious=void 0,t.replacementNext=void 0,--e.count}a.prototype.markStartOfRenderFrame=function(){this._lastBeforeStartOfFrame=this.head},a.prototype.trimTiles=function(e){for(var t=this.tail,i=!0;i&&Object(n.default)(this._lastBeforeStartOfFrame)&&this.count>e&&Object(n.default)(t);){i=t!==this._lastBeforeStartOfFrame;var a=t.replacementPrevious;t.eligibleForUnloading&&(t.freeResources(),r(this,t)),t=a}},a.prototype.markTileRendered=function(e){var t=this.head;if(t!==e){if(++this.count,!Object(n.default)(t))return e.replacementPrevious=void 0,e.replacementNext=void 0,this.head=e,void(this.tail=e);(Object(n.default)(e.replacementPrevious)||Object(n.default)(e.replacementNext))&&r(this,e),e.replacementPrevious=void 0,e.replacementNext=t,t.replacementPrevious=e,this.head=e}else e===this._lastBeforeStartOfFrame&&(this._lastBeforeStartOfFrame=e.replacementNext)},t.a=a},function(e,t,i){"use strict";var n=i(77),a=i(1),r=i(2),o=i(0),s=i(19),l=i(15),u=i(757),d=i(12),c=i(6),f=i(403),h=i(52),p=i(760),m=i(69);function _(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).textureUrl;Object(o.default)(t)||(t=Object(n.a)("Assets/Textures/moonSmall.jpg")),this.show=Object(r.default)(e.show,!0),this.textureUrl=t,this._ellipsoid=Object(r.default)(e.ellipsoid,l.default.MOON),this.onlySunLighting=Object(r.default)(e.onlySunLighting,!0),this._ellipsoidPrimitive=new p.a({radii:this.ellipsoid.radii,material:m.default.fromType(m.default.ImageType),depthTestEnabled:!1,_owner:this}),this._ellipsoidPrimitive.material.translucent=!1,this._axes=new u.a}Object.defineProperties(_.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}});var g=new d.default,v=new d.default,y=new a.default,b=[];_.prototype.update=function(e){if(this.show){var t=this._ellipsoidPrimitive;t.material.uniforms.image=this.textureUrl,t.onlySunLighting=this.onlySunLighting;var i=e.time;Object(o.default)(h.default.computeIcrfToFixedMatrix(i,g))||h.default.computeTemeToPseudoFixedMatrix(i,g);var n=this._axes.evaluate(i,v);d.default.transpose(n,n),d.default.multiply(g,n,n);var a=f.a.computeMoonPositionInEarthInertialFrame(i,y);d.default.multiplyByVector(g,a,a),c.default.fromRotationTranslation(n,a,t.modelMatrix);var r=e.commandList;return e.commandList=b,b.length=0,t.update(e),e.commandList=r,1===b.length?b[0]:void 0}},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){return this._ellipsoidPrimitive=this._ellipsoidPrimitive&&this._ellipsoidPrimitive.destroy(),Object(s.default)(this)},t.a=_},function(e,t,i){"use strict";var n=i(1),a=i(0),r=i(758),o=i(14),s=i(5),l=i(12),u=i(27);function d(e){Object(a.default)(e)&&"function"==typeof e||(e=r.a.ComputeMoon),this._computeFunction=e}var c=new n.default,f=new n.default,h=new n.default;var p=new l.default,m=new u.default;d.prototype.evaluate=function(e,t){Object(a.default)(e)||(e=o.default.now());var i=this._computeFunction(e),r=function(e,t,i){var r=c;r.x=Math.cos(e+s.default.PI_OVER_TWO),r.y=Math.sin(e+s.default.PI_OVER_TWO),r.z=0;var o=Math.cos(t),u=h;u.x=o*Math.cos(e),u.y=o*Math.sin(e),u.z=Math.sin(t);var d=n.default.cross(u,r,f);return Object(a.default)(i)||(i=new l.default),i[0]=r.x,i[1]=d.x,i[2]=u.x,i[3]=r.y,i[4]=d.y,i[5]=u.y,i[6]=r.z,i[7]=d.z,i[8]=u.z,i}(i.rightAscension,i.declination,t),d=s.default.zeroToTwoPi(i.rotation),_=u.default.fromAxisAngle(n.default.UNIT_Z,d,m),g=l.default.fromQuaternion(u.default.conjugate(_,_),p);return l.default.multiply(g,r,r)},t.a=d},function(e,t,i){"use strict";var n=i(0),a=i(759),r=i(14),o=i(5),s=i(106),l={},u=-.0529921,d=-.1059842,c=13.0120009,f=13.3407154,h=.9856003,p=26.4057084,m=13.064993,_=.3287146,g=1.7484877,v=new r.default;l.ComputeMoon=function(e,t){Object(n.default)(e)||(e=r.default.now()),v=r.default.addSeconds(e,32.184,v);var i=r.default.totalDays(v)-2451545,l=i/s.a.DAYS_PER_JULIAN_CENTURY,y=(125.045+u*i)*o.default.RADIANS_PER_DEGREE,b=(250.089+d*i)*o.default.RADIANS_PER_DEGREE,w=(260.008+c*i)*o.default.RADIANS_PER_DEGREE,O=(176.625+f*i)*o.default.RADIANS_PER_DEGREE,x=(357.529+h*i)*o.default.RADIANS_PER_DEGREE,A=(311.589+p*i)*o.default.RADIANS_PER_DEGREE,T=(134.963+m*i)*o.default.RADIANS_PER_DEGREE,E=(276.617+_*i)*o.default.RADIANS_PER_DEGREE,C=(34.226+g*i)*o.default.RADIANS_PER_DEGREE,S=(15.134+-.1589763*i)*o.default.RADIANS_PER_DEGREE,M=(119.743+.0036096*i)*o.default.RADIANS_PER_DEGREE,D=(239.961+.1643573*i)*o.default.RADIANS_PER_DEGREE,P=(25.053+12.9590088*i)*o.default.RADIANS_PER_DEGREE,I=Math.sin(y),L=Math.sin(b),j=Math.sin(w),R=Math.sin(O),N=Math.sin(x),B=Math.sin(A),F=Math.sin(T),k=Math.sin(E),z=Math.sin(C),U=Math.sin(S),V=Math.sin(M),H=Math.sin(D),G=Math.sin(P),Y=Math.cos(y),W=Math.cos(b),q=Math.cos(w),X=Math.cos(O),K=Math.cos(x),J=Math.cos(A),Z=Math.cos(T),Q=Math.cos(E),$=Math.cos(C),ee=Math.cos(S),te=Math.cos(M),ie=Math.cos(D),ne=Math.cos(P),ae=(269.9949+.0031*l-3.8787*I-.1204*L+.07*j-.0172*R+.0072*B-.0052*U+.0043*G)*o.default.RADIANS_PER_DEGREE,re=(66.5392+.013*l+1.5419*Y+.0239*W-.0278*q+.0068*X-.0029*J+9e-4*Z+8e-4*ee-9e-4*ne)*o.default.RADIANS_PER_DEGREE,oe=(38.3213+13.17635815*i-14e-13*i*i+3.561*I+.1208*L-.0642*j+.0158*R+.0252*N-.0066*B-.0047*F-.0046*k+.0028*z+.0052*U+.004*V+.0019*H-.0044*G)*o.default.RADIANS_PER_DEGREE,se=(13.17635815-2*i*14e-13+3.561*Y*u+.1208*W*d-.0642*q*c+.0158*X*f+.0252*K*h-.0066*J*p-.0047*Z*m-.0046*Q*_+.0028*$*g+.0052*ee*-.1589763+.004*te*.0036096+.0019*ie*.1643573-.0044*ne*12.9590088)/86400*o.default.RADIANS_PER_DEGREE;return Object(n.default)(t)||(t=new a.a),t.rightAscension=ae,t.declination=re,t.rotation=oe,t.rotationRate=se,t},t.a=l},function(e,t,i){"use strict";t.a=function(e,t,i,n){this.rightAscension=e,this.declination=t,this.rotation=i,this.rotationRate=n}},function(e,t,i){"use strict";var n=i(17),a=i(240),r=i(1),o=i(60),s=i(2),l=i(0),u=i(19),d=i(3),c=i(6),f=i(29),h=i(36),p=i(44),m=i(26),_=i(39),g=i(67),v=i(34),y=i(104),b=i(511),w=i(512),O=i(74),x=i(140),A=i(69),T=i(13),E={position:0};function C(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),this.center=r.default.clone(Object(s.default)(e.center,r.default.ZERO)),this._center=new r.default,this.radii=r.default.clone(e.radii),this._radii=new r.default,this._oneOverEllipsoidRadiiSquared=new r.default,this._boundingSphere=new n.default,this.modelMatrix=c.default.clone(Object(s.default)(e.modelMatrix,c.default.IDENTITY)),this._modelMatrix=new c.default,this._computedModelMatrix=new c.default,this.show=Object(s.default)(e.show,!0),this.material=Object(s.default)(e.material,A.default.fromType(A.default.ColorType)),this._material=void 0,this._translucent=void 0,this.id=e.id,this._id=void 0,this.debugShowBoundingVolume=Object(s.default)(e.debugShowBoundingVolume,!1),this.onlySunLighting=Object(s.default)(e.onlySunLighting,!1),this._onlySunLighting=!1,this._depthTestEnabled=Object(s.default)(e.depthTestEnabled,!0),this._useLogDepth=!1,this._sp=void 0,this._rs=void 0,this._va=void 0,this._pickSP=void 0,this._pickId=void 0,this._colorCommand=new p.default({owner:Object(s.default)(e._owner,this)}),this._pickCommand=new p.default({owner:Object(s.default)(e._owner,this),pickOnly:!0});var t=this;this._uniforms={u_radii:function(){return t.radii},u_oneOverEllipsoidRadiiSquared:function(){return t._oneOverEllipsoidRadiiSquared}},this._pickUniforms={czm_pickColor:function(){return t._pickId.color}}}var S="#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n";C.prototype.update=function(e){if(this.show&&e.mode===T.default.SCENE3D&&Object(l.default)(this.center)&&Object(l.default)(this.radii)){if(!Object(l.default)(this.material))throw new d.default("this.material must be defined.");var t=e.context,i=this.material.isTranslucent(),s=this._translucent!==i;Object(l.default)(this._rs)&&!s||(this._translucent=i,this._rs=_.default.fromCache({cull:{enabled:!0,face:x.default.FRONT},depthTest:{enabled:this._depthTestEnabled},depthMask:!i&&t.fragmentDepth,blending:i?O.default.ALPHA_BLEND:void 0})),Object(l.default)(this._va)||(this._va=function(e){var t=e.cache.ellipsoidPrimitive_vertexArray;if(Object(l.default)(t))return t;var i=a.default.createGeometry(a.default.fromDimensions({dimensions:new r.default(2,2,2),vertexFormat:f.a.POSITION_ONLY}));return t=y.default.fromGeometry({context:e,geometry:i,attributeLocations:E,bufferUsage:h.default.STATIC_DRAW,interleave:!0}),e.cache.ellipsoidPrimitive_vertexArray=t,t}(t));var u=!1,p=this.radii;if(!r.default.equals(this._radii,p)){r.default.clone(p,this._radii);var A=this._oneOverEllipsoidRadiiSquared;A.x=1/(p.x*p.x),A.y=1/(p.y*p.y),A.z=1/(p.z*p.z),u=!0}c.default.equals(this.modelMatrix,this._modelMatrix)&&r.default.equals(this.center,this._center)||(c.default.clone(this.modelMatrix,this._modelMatrix),r.default.clone(this.center,this._center),c.default.multiplyByTranslation(this.modelMatrix,this.center,this._computedModelMatrix),u=!0),u&&(r.default.clone(r.default.ZERO,this._boundingSphere.center),this._boundingSphere.radius=r.default.maximumComponent(p),n.default.transform(this._boundingSphere,this._computedModelMatrix,this._boundingSphere));var C=this._material!==this.material;this._material=this.material,this._material.update(t);var M=this.onlySunLighting!==this._onlySunLighting;this._onlySunLighting=this.onlySunLighting;var D=e.useLogDepth,P=this._useLogDepth!==D;this._useLogDepth=D;var I,L,j=this._colorCommand;(C||M||s||P)&&(I=new v.default({sources:[w.a]}),L=new v.default({sources:[this.material.shaderSource,b.a]}),this.onlySunLighting&&L.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&L.defines.push("WRITE_DEPTH"),this._useLogDepth&&(I.defines.push("LOG_DEPTH"),L.defines.push("LOG_DEPTH"),L.sources.push(S)),this._sp=g.default.replaceCache({context:t,shaderProgram:this._sp,vertexShaderSource:I,fragmentShaderSource:L,attributeLocations:E}),j.vertexArray=this._va,j.renderState=this._rs,j.shaderProgram=this._sp,j.uniformMap=Object(o.default)(this._uniforms,this.material._uniforms),j.executeInClosestFrustum=i);var R=e.commandList,N=e.passes;if(N.render&&(j.boundingVolume=this._boundingSphere,j.debugShowBoundingVolume=this.debugShowBoundingVolume,j.modelMatrix=this._computedModelMatrix,j.pass=i?m.default.TRANSLUCENT:m.default.OPAQUE,R.push(j)),N.pick){var B=this._pickCommand;Object(l.default)(this._pickId)&&this._id===this.id||(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this,id:this.id})),(C||M||!Object(l.default)(this._pickSP)||P)&&(I=new v.default({sources:[w.a]}),L=new v.default({sources:[this.material.shaderSource,b.a],pickColorQualifier:"uniform"}),this.onlySunLighting&&L.defines.push("ONLY_SUN_LIGHTING"),!i&&t.fragmentDepth&&L.defines.push("WRITE_DEPTH"),this._useLogDepth&&(I.defines.push("LOG_DEPTH"),L.defines.push("LOG_DEPTH"),L.sources.push(S)),this._pickSP=g.default.replaceCache({context:t,shaderProgram:this._pickSP,vertexShaderSource:I,fragmentShaderSource:L,attributeLocations:E}),B.vertexArray=this._va,B.renderState=this._rs,B.shaderProgram=this._pickSP,B.uniformMap=Object(o.default)(Object(o.default)(this._uniforms,this._pickUniforms),this.material._uniforms),B.executeInClosestFrustum=i),B.boundingVolume=this._boundingSphere,B.modelMatrix=this._computedModelMatrix,B.pass=i?m.default.TRANSLUCENT:m.default.OPAQUE,R.push(B)}}},C.prototype.isDestroyed=function(){return!1},C.prototype.destroy=function(){return this._sp=this._sp&&this._sp.destroy(),this._pickSP=this._pickSP&&this._pickSP.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),Object(u.default)(this)},t.a=C},function(e,t,i){"use strict";var n=i(41),a=i(17),r=i(240),o=i(1),s=i(22),l=i(50),u=i(7),d=i(53),c=i(99),f=i(207),h=i(2),p=i(0),m=i(19),_=i(3),g=i(196),v=i(24),y=i(125),b=i(43),w=i(95),O=i(78),x=i(14),A=i(5),T=i(6),E=i(404),C=i(762),S=i(79),M=i(166),D=i(119),P=i(241),I=i(217),L=i(126),j=i(52),R=i(108),N=i(763),B=i(764),F=i(56),k=i(26),z=i(39),U=i(768),V=i(145),H=i(171),G=i(293),Y=i(771),W=i(342),q=i(773),X=i(384),K=i(776),J=i(777),Z=i(778),Q=i(779),$=i(514),ee=i(780),te=i(243),ie=i(319),ne=i(358),ae=i(61),re=i(784),oe=i(795),se=i(64),le=i(190),ue=i(13),de=i(177),ce=i(815),fe=i(816),he=i(377),pe=i(81),me=i(376),_e=i(818),ge=i(451),ve=i(448),ye=i(821),be=function(e){return function(){e.frameState.afterRender.push((function(){e.requestRender()}))}};function we(e){var t=(e=Object(h.default)(e,h.default.EMPTY_OBJECT)).canvas,i=e.creditContainer,a=e.creditViewport,r=Object(l.default)(e.contextOptions);if(Object(p.default)(r)||(r={}),Object(p.default)(r.webgl)||(r.webgl={}),r.webgl.powerPreference=Object(h.default)(r.webgl.powerPreference,"high-performance"),!Object(p.default)(t))throw new _.default("options and options.canvas are required.");var o=Object(p.default)(i),s=new B.a(t,r);o||((i=document.createElement("div")).style.position="absolute",i.style.bottom="0",i.style["text-shadow"]="0 0 2px #000000",i.style.color="#ffffff",i.style["font-size"]="10px",i.style["padding-right"]="5px",t.parentNode.appendChild(i)),Object(p.default)(a)||(a=t.parentNode),this._id=Object(c.default)(),this._jobScheduler=new ee.a,this._frameState=new Z.a(s,new Y.a(i," • ",a),this._jobScheduler),this._frameState.scene3DOnly=Object(h.default)(e.scene3DOnly,!1),this._removeCreditContainer=!o,this._creditContainer=i,this._canvas=t,this._context=s,this._computeEngine=new N.a(s),this._globe=void 0,this._globeTranslucencyState=new Q.a,this._primitives=new le.default,this._groundPrimitives=new le.default,this._globeHeight=void 0,this._cameraUnderground=!1,this._logDepthBuffer=s.fragmentDepth,this._logDepthBufferDirty=!0,this._tweens=new ge.a,this._shaderFrameCount=0,this._sunPostProcess=void 0,this._computeCommandList=[],this._overlayCommandList=[],this._useOIT=Object(h.default)(e.orderIndependentTranslucency,!0),this._executeOITFunction=void 0,this._depthPlane=new q.a,this._clearColorCommand=new R.default({color:new u.default,stencil:0,owner:this}),this._depthClearCommand=new R.default({depth:1,owner:this}),this._stencilClearCommand=new R.default({stencil:0}),this._classificationStencilClearCommand=new R.default({stencil:0,renderState:z.default.fromCache({stencilMask:pe.a.CLASSIFICATION_MASK})}),this._depthOnlyRenderStateCache={},this._transitioner=new ce.a(this),this._preUpdate=new v.default,this._postUpdate=new v.default,this._renderError=new v.default,this._preRender=new v.default,this._postRender=new v.default,this._minimumDisableDepthTestDistance=0,this._debugInspector=new ye.a,this.rethrowRenderErrors=!1,this.completeMorphOnUserInput=!0,this.morphStart=new v.default,this.morphComplete=new v.default,this.skyBox=void 0,this.skyAtmosphere=void 0,this.sun=void 0,this.sunBloom=!0,this._sunBloom=void 0,this.moon=void 0,this.backgroundColor=u.default.clone(u.default.BLACK),this._mode=ue.default.SCENE3D,this._mapProjection=Object(p.default)(e.mapProjection)?e.mapProjection:new y.a,this.morphTime=1,this.farToNearRatio=1e3,this.logarithmicDepthFarToNearRatio=1e9,this.nearToFarDistance2D=175e4,this.debugCommandFilter=void 0,this.debugShowCommands=!1,this.debugShowFrustums=!1,this.debugShowFramesPerSecond=!1,this.debugShowDepthFrustum=1,this.debugShowFrustumPlanes=!1,this._debugShowFrustumPlanes=!1,this._debugFrustumPlanes=void 0,this.useDepthPicking=!0,this.pickTranslucentDepth=!1,this.cameraEventWaitTime=500,this.fog=new J.a,this._shadowMapCamera=new V.a(this),this.shadowMap=new he.a({context:s,lightCamera:this._shadowMapCamera,enabled:Object(h.default)(e.shadows,!1)}),this.invertClassification=!1,this.invertClassificationColor=u.default.clone(u.default.WHITE),this._actualInvertClassificationColor=u.default.clone(this._invertClassificationColor),this._invertClassification=new $.a,this.focalLength=void 0,this.eyeSeparation=void 0,this.postProcessStages=new oe.a,this._brdfLutGenerator=new U.a,this._performanceDisplay=void 0,this._debugVolume=void 0,this._screenSpaceCameraController=new fe.a(this),this._cameraUnderground=!1,this._mapMode2D=Object(h.default)(e.mapMode2D,te.default.INFINITE_SCROLL),this._environmentState={skyBoxCommand:void 0,skyAtmosphereCommand:void 0,sunDrawCommand:void 0,sunComputeCommand:void 0,moonCommand:void 0,isSunVisible:!1,isMoonVisible:!1,isReadyForAtmosphere:!1,isSkyAtmosphereVisible:!1,clearGlobeDepth:!1,useDepthPlane:!1,renderTranslucentDepthForPick:!1,originalFramebuffer:void 0,useGlobeDepthFramebuffer:!1,separatePrimitiveFramebuffer:!1,useOIT:!1,useInvertClassification:!1,usePostProcess:!1,usePostProcessSelected:!1,useWebVR:!1},this._useWebVR=!1,this._cameraVR=void 0,this._aspectRatioVR=void 0,this.requestRenderMode=Object(h.default)(e.requestRenderMode,!1),this._renderRequested=!0,this.maximumRenderTimeChange=Object(h.default)(e.maximumRenderTimeChange,0),this._lastRenderTime=void 0,this._frameRateMonitor=void 0,this._removeRequestListenerCallback=I.default.requestCompletedEvent.addEventListener(be(this)),this._removeTaskProcessorListenerCallback=L.a.taskCompletedEvent.addEventListener(be(this)),this._removeGlobeCallbacks=[];var d=new n.a(0,0,s.drawingBufferWidth,s.drawingBufferHeight),f=new V.a(this);this._logDepthBuffer&&(f.frustum.near=.1,f.frustum.far=1e10),this.preloadFlightCamera=new V.a(this),this.preloadFlightCullingVolume=void 0,this._picking=new re.a(this),this._defaultView=new ve.a(this,f,d),this._view=this._defaultView,this._hdr=void 0,this._hdrDirty=void 0,this.highDynamicRange=!1,this.gamma=2.2,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this._specularEnvironmentMapAtlas=void 0,this.light=new me.a,Me(this,0,x.default.now()),this.updateFrameState(),this.initializeFrame()}function Oe(e,t,i){var n=e._frameState,a=e._context,r=e._view.oit,o=n.shadowState.lightShadowMaps,s=n.shadowState.lightShadowsEnabled,l=t.derivedCommands;Object(p.default)(t.pickId)&&(l.picking=X.a.createPickDerivedCommand(e,t,a,l.picking)),t.pickOnly||(l.depth=X.a.createDepthOnlyDerivedCommand(e,t,a,l.depth)),l.originalCommand=t,e._hdr&&(l.hdr=X.a.createHdrCommand(t,a,l.hdr),l=(t=l.hdr.command).derivedCommands),s&&t.receiveShadows&&(l.shadows=he.a.createReceiveDerivedCommand(o,t,i,a,l.shadows)),t.pass===k.default.TRANSLUCENT&&Object(p.default)(r)&&r.isSupported()&&(s&&t.receiveShadows?(l.oit=Object(p.default)(l.oit)?l.oit:{},l.oit.shadows=r.createDerivedCommands(l.shadows.receiveCommand,a,l.oit.shadows)):l.oit=r.createDerivedCommands(t,a,l.oit))}Object.defineProperties(we.prototype,{canvas:{get:function(){return this._canvas}},drawingBufferHeight:{get:function(){return this._context.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._context.drawingBufferWidth}},maximumAliasedLineWidth:{get:function(){return F.a.maximumAliasedLineWidth}},maximumCubeMapSize:{get:function(){return F.a.maximumCubeMapSize}},pickPositionSupported:{get:function(){return this._context.depthTexture}},sampleHeightSupported:{get:function(){return this._context.depthTexture}},clampToHeightSupported:{get:function(){return this._context.depthTexture}},invertClassificationSupported:{get:function(){return this._context.depthTexture}},specularEnvironmentMapsSupported:{get:function(){return ie.a.isSupported(this._context)}},globe:{get:function(){return this._globe},set:function(e){this._globe=this._globe&&this._globe.destroy(),this._globe=e,function(e,t){for(var i=0;i<e._removeGlobeCallbacks.length;++i)e._removeGlobeCallbacks[i]();e._removeGlobeCallbacks.length=0;var n=[];Object(p.default)(t)&&(n.push(t.imageryLayersUpdatedEvent.addEventListener(be(e))),n.push(t.terrainProviderChanged.addEventListener(be(e)))),e._removeGlobeCallbacks=n}(this,e)}},primitives:{get:function(){return this._primitives}},groundPrimitives:{get:function(){return this._groundPrimitives}},camera:{get:function(){return this._view.camera},set:function(e){this._view.camera=e}},view:{get:function(){return this._view},set:function(e){this._view=e}},defaultView:{get:function(){return this._defaultView}},picking:{get:function(){return this._picking}},screenSpaceCameraController:{get:function(){return this._screenSpaceCameraController}},mapProjection:{get:function(){return this._mapProjection}},jobScheduler:{get:function(){return this._jobScheduler}},frameState:{get:function(){return this._frameState}},environmentState:{get:function(){return this._environmentState}},tweens:{get:function(){return this._tweens}},imageryLayers:{get:function(){if(Object(p.default)(this.globe))return this.globe.imageryLayers}},terrainProvider:{get:function(){if(Object(p.default)(this.globe))return this.globe.terrainProvider},set:function(e){Object(p.default)(this.globe)&&(this.globe.terrainProvider=e)}},terrainProviderChanged:{get:function(){if(Object(p.default)(this.globe))return this.globe.terrainProviderChanged}},preUpdate:{get:function(){return this._preUpdate}},postUpdate:{get:function(){return this._postUpdate}},renderError:{get:function(){return this._renderError}},preRender:{get:function(){return this._preRender}},postRender:{get:function(){return this._postRender}},lastRenderTime:{get:function(){return this._lastRenderTime}},context:{get:function(){return this._context}},debugFrustumStatistics:{get:function(){return this._view.debugFrustumStatistics}},scene3DOnly:{get:function(){return this._frameState.scene3DOnly}},orderIndependentTranslucency:{get:function(){return this._useOIT}},id:{get:function(){return this._id}},mode:{get:function(){return this._mode},set:function(e){if(this.scene3DOnly&&e!==ue.default.SCENE3D)throw new _.default("Only SceneMode.SCENE3D is valid when scene3DOnly is true.");if(e===ue.default.SCENE2D)this.morphTo2D(0);else if(e===ue.default.SCENE3D)this.morphTo3D(0);else{if(e!==ue.default.COLUMBUS_VIEW)throw new _.default("value must be a valid SceneMode enumeration.");this.morphToColumbusView(0)}this._mode=e}},frustumCommandsList:{get:function(){return this._view.frustumCommandsList}},numberOfFrustums:{get:function(){return this._view.frustumCommandsList.length}},useWebVR:{get:function(){return this._useWebVR},set:function(e){if(this.camera.frustum instanceof S.a)throw new _.default("VR is unsupported with an orthographic projection.");this._useWebVR=e,this._useWebVR?(this._frameState.creditDisplay.container.style.visibility="hidden",this._cameraVR=new V.a(this),Object(p.default)(this._deviceOrientationCameraController)||(this._deviceOrientationCameraController=new K.a(this)),this._aspectRatioVR=this.camera.frustum.aspectRatio):(this._frameState.creditDisplay.container.style.visibility="visible",this._cameraVR=void 0,this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this.camera.frustum.aspectRatio=this._aspectRatioVR,this.camera.frustum.xOffset=0)}},mapMode2D:{get:function(){return this._mapMode2D}},imagerySplitPosition:{get:function(){return this._frameState.imagerySplitPosition},set:function(e){this._frameState.imagerySplitPosition=e}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance},set:function(e){if(!Object(p.default)(e)||e<0)throw new _.default("minimumDisableDepthTestDistance must be greater than or equal to 0.0.");this._minimumDisableDepthTestDistance=e}},logarithmicDepthBuffer:{get:function(){return this._logDepthBuffer},set:function(e){e=this._context.fragmentDepth&&e,this._logDepthBuffer!==e&&(this._logDepthBuffer=e,this._logDepthBufferDirty=!0)}},gamma:{get:function(){return this._context.uniformState.gamma},set:function(e){this._context.uniformState.gamma=e}},highDynamicRange:{get:function(){return this._hdr},set:function(e){var t=this._context,i=e&&t.depthTexture&&(t.colorBufferFloat||t.colorBufferHalfFloat);this._hdrDirty=i!==this._hdr,this._hdr=i}},highDynamicRangeSupported:{get:function(){var e=this._context;return e.depthTexture&&(e.colorBufferFloat||e.colorBufferHalfFloat)}},cameraUnderground:{get:function(){return this._cameraUnderground}},pixelRatio:{get:function(){return this._frameState.pixelRatio},set:function(e){this._frameState.pixelRatio=e}},opaqueFrustumNearOffset:{get:function(){return.9999}},globeHeight:{get:function(){return this._globeHeight}}}),we.prototype.getCompressedTextureFormatSupported=function(e){var t=this.context;return("WEBGL_compressed_texture_s3tc"===e||"s3tc"===e)&&t.s3tc||("WEBGL_compressed_texture_pvrtc"===e||"pvrtc"===e)&&t.pvrtc||("WEBGL_compressed_texture_etc"===e||"etc"===e)&&t.etc||("WEBGL_compressed_texture_etc1"===e||"etc1"===e)&&t.etc1||("WEBGL_compressed_texture_astc"===e||"astc"===e)&&t.astc||("EXT_texture_compression_bptc"===e||"bc7"===e)&&t.bc7},we.prototype.updateDerivedCommands=function(e){if(Object(p.default)(e.derivedCommands)){var t=this._frameState,i=this._context,n=!1,a=t.shadowState.lastDirtyTime;e.lastDirtyTime!==a&&(e.lastDirtyTime=a,e.dirty=!0,n=!0);var r=t.useLogDepth,o=this._hdr,s=e.derivedCommands,l=Object(p.default)(s.logDepth),u=Object(p.default)(s.hdr),d=Object(p.default)(s.originalCommand),c=r&&!l,f=o&&!u,h=!(r&&o||d);if(e.dirty=e.dirty||c||f||h,e.dirty){e.dirty=!1;var m=t.shadowState.shadowMaps;t.shadowState.shadowsEnabled&&e.castShadows&&(s.shadows=he.a.createCastDerivedCommand(m,e,n,i,s.shadows)),(l||c)&&(s.logDepth=X.a.createLogDepthCommand(e,i,s.logDepth),Oe(this,s.logDepth.command,n)),(d||h)&&Oe(this,e,n)}}};var xe,Ae=new G.a({pass:H.a.RENDER}),Te=new G.a({pass:H.a.PRELOAD}),Ee=new G.a({pass:H.a.PRELOAD_FLIGHT}),Ce=new G.a({pass:H.a.REQUEST_RENDER_MODE_DEFER_CHECK}),Se=new a.default;function Me(e,t,i){var n=e._frameState;n.frameNumber=t,n.time=x.default.clone(i,n.time)}we.prototype.clearPasses=function(e){e.render=!1,e.pick=!1,e.depth=!1,e.postProcess=!1,e.offscreen=!1},we.prototype.updateFrameState=function(){var e=this.camera,t=this._frameState;t.commandList.length=0,t.shadowMaps.length=0,t.brdfLutGenerator=this._brdfLutGenerator,t.environmentMap=this.skyBox&&this.skyBox._cubeMap,t.mode=this._mode,t.morphTime=this.morphTime,t.mapProjection=this.mapProjection,t.camera=e,t.cullingVolume=e.frustum.computeCullingVolume(e.positionWC,e.directionWC,e.upWC),t.occluder=function(e){var t=e.globe;if(e._mode===ue.default.SCENE3D&&Object(p.default)(t)&&t.show&&!e._cameraUnderground&&!e._globeTranslucencyState.translucent){var i=t.ellipsoid,n=e.frameState.minimumTerrainHeight;return Se.radius=i.minimumRadius+n,xe=C.a.fromBoundingSphere(Se,e.camera.positionWC,xe)}}(this),t.minimumTerrainHeight=0,t.minimumDisableDepthTestDistance=this._minimumDisableDepthTestDistance,t.invertClassification=this.invertClassification,t.useLogDepth=this._logDepthBuffer&&!(this.camera.frustum instanceof S.a||this.camera.frustum instanceof M.a),t.light=this.light,t.cameraUnderground=this._cameraUnderground,t.globeTranslucencyState=this._globeTranslucencyState,Object(p.default)(this.globe)&&(t.terrainExaggeration=this.globe.terrainExaggeration,t.terrainExaggerationRelativeHeight=this.globe.terrainExaggerationRelativeHeight),Object(p.default)(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.ready?(t.specularEnvironmentMaps=this._specularEnvironmentMapAtlas.texture,t.specularEnvironmentMapsMaximumLOD=this._specularEnvironmentMapAtlas.maximumMipmapLevel):(t.specularEnvironmentMaps=void 0,t.specularEnvironmentMapsMaximumLOD=void 0),t.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,this._actualInvertClassificationColor=u.default.clone(this.invertClassificationColor,this._actualInvertClassificationColor),$.a.isTranslucencySupported(this._context)||(this._actualInvertClassificationColor.alpha=1),t.invertClassificationColor=this._actualInvertClassificationColor,Object(p.default)(this.globe)?t.maximumScreenSpaceError=this.globe.maximumScreenSpaceError:t.maximumScreenSpaceError=2,this.clearPasses(t.passes),t.tilesetPassState=void 0},we.prototype.isVisible=function(e,t,i){return Object(p.default)(e)&&(!Object(p.default)(e.boundingVolume)||!e.cull||t.computeVisibility(e.boundingVolume)!==O.a.OUTSIDE&&(!Object(p.default)(i)||!e.occlude||!e.boundingVolume.isOccluded(i)))};var De=new T.default(0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,1);function Pe(e,t,i,n,a){var s=t._frameState;if(!Object(p.default)(t.debugCommandFilter)||t.debugCommandFilter(e))if(e instanceof R.default)e.execute(i,n);else{e.debugShowBoundingVolume&&Object(p.default)(e.boundingVolume)&&function(e,t,i,n){var a,s=t._frameState,l=s.context,u=e.boundingVolume;Object(p.default)(t._debugVolume)&&t._debugVolume.destroy();var c=o.default.clone(u.center);if(s.mode!==ue.default.SCENE3D){c=T.default.multiplyByPoint(De,c,c);var f=s.mapProjection,h=f.unproject(c);c=f.ellipsoid.cartographicToCartesian(h)}if(Object(p.default)(u.radius)){var m=u.radius;a=w.a.toWireframe(g.default.createGeometry(new g.default({radii:new o.default(m,m,m),vertexFormat:ae.default.FLAT_VERTEX_FORMAT}))),t._debugVolume=new se.default({geometryInstances:new b.default({geometry:a,modelMatrix:T.default.fromTranslation(c),attributes:{color:new d.default(1,0,0,1)}}),appearance:new ae.default({flat:!0,translucent:!1}),asynchronous:!1})}else{var _=u.halfAxes;a=w.a.toWireframe(r.default.createGeometry(r.default.fromDimensions({dimensions:new o.default(2,2,2),vertexFormat:ae.default.FLAT_VERTEX_FORMAT}))),t._debugVolume=new se.default({geometryInstances:new b.default({geometry:a,modelMatrix:T.default.fromRotationTranslation(_,c,new T.default),attributes:{color:new d.default(1,0,0,1)}}),appearance:new ae.default({flat:!0,translucent:!1}),asynchronous:!1})}var v,y=s.commandList,O=s.commandList=[];t._debugVolume.update(s),e=O[0],s.useLogDepth&&(e=X.a.createLogDepthCommand(e,l).command),Object(p.default)(n)&&(v=i.framebuffer,i.framebuffer=n),e.execute(l,i),Object(p.default)(v)&&(i.framebuffer=v),s.commandList=y}(e,t,n,a),s.useLogDepth&&Object(p.default)(e.derivedCommands.logDepth)&&(e=e.derivedCommands.logDepth.command);var l=s.passes;if(!l.pick&&!l.depth&&t._hdr&&Object(p.default)(e.derivedCommands)&&Object(p.default)(e.derivedCommands.hdr)&&(e=e.derivedCommands.hdr.command),l.pick||l.depth){if(l.pick&&!l.depth&&Object(p.default)(e.derivedCommands.picking))return void(e=e.derivedCommands.picking.pickCommand).execute(i,n);if(Object(p.default)(e.derivedCommands.depth))return void(e=e.derivedCommands.depth.depthOnlyCommand).execute(i,n)}t.debugShowCommands||t.debugShowFrustums?t._debugInspector.executeDebugShowFrustumsCommand(t,e,n):s.shadowState.lightShadowsEnabled&&e.receiveShadows&&Object(p.default)(e.derivedCommands.shadows)?e.derivedCommands.shadows.receiveCommand.execute(i,n):e.execute(i,n)}}function Ie(e,t,i,n){var a=t._frameState,r=e.derivedCommands;Object(p.default)(r)&&(a.useLogDepth&&Object(p.default)(r.logDepth)&&(e=r.logDepth.command),r=e.derivedCommands,Object(p.default)(r.picking)?(e=r.picking.pickCommand).execute(i,n):Object(p.default)(r.depth)&&(e=r.depth.depthOnlyCommand).execute(i,n))}function Le(e,t,i){return t.boundingVolume.distanceSquaredTo(i)-e.boundingVolume.distanceSquaredTo(i)}function je(e,t,i){return e.boundingVolume.distanceSquaredTo(i)-t.boundingVolume.distanceSquaredTo(i)+A.default.EPSILON12}function Re(e,t,i,n,a){var r=e.context;Object(E.a)(n,Le,e.camera.positionWC),Object(p.default)(a)&&t(a.unclassifiedCommand,e,r,i);for(var o=n.length,s=0;s<o;++s)t(n[s],e,r,i)}function Ne(e,t,i,n,a){var r=e.context;Object(E.a)(n,je,e.camera.positionWC),Object(p.default)(a)&&t(a.unclassifiedCommand,e,r,i);for(var o=n.length,s=0;s<o;++s)t(n[s],e,r,i)}De=T.default.inverseTransformation(De,De);var Be=new D.default,Fe=new P.a,ke=new S.a,ze=new M.a;function Ue(e,t){var i,n=e.camera,a=e.context,r=e.frameState,o=a.uniformState;o.updateCamera(n),(i=Object(p.default)(n.frustum.fov)?n.frustum.clone(Be):Object(p.default)(n.frustum.infiniteProjectionMatrix)?n.frustum.clone(Fe):Object(p.default)(n.frustum.width)?n.frustum.clone(ke):n.frustum.clone(ze)).near=n.frustum.near,i.far=n.frustum.far,o.updateFrustum(i),o.updatePass(k.default.ENVIRONMENT);var s,l=r.passes,u=l.pick,d=e._environmentState,c=e._view,f=d.renderTranslucentDepthForPick,h=d.useWebVR;if(!u){var m,_=d.skyBoxCommand;if(Object(p.default)(_)&&Pe(_,e,a,t),d.isSkyAtmosphereVisible&&Pe(d.skyAtmosphereCommand,e,a,t),d.isSunVisible)if(d.sunDrawCommand.execute(a,t),e.sunBloom&&!h)m=d.useGlobeDepthFramebuffer?c.globeDepth.framebuffer:d.usePostProcess?c.sceneFramebuffer.getFramebuffer():d.originalFramebuffer,e._sunPostProcess.execute(a),e._sunPostProcess.copy(a,m),t.framebuffer=m;d.isMoonVisible&&d.moonCommand.execute(a,t)}d.useOIT?(Object(p.default)(e._executeOITFunction)||(e._executeOITFunction=function(e,t,i,n,a){c.oit.executeCommands(e,t,i,n,a)}),s=e._executeOITFunction):s=l.render?Re:Ne;for(var g,v=c.frustumCommandsList,y=v.length,b=d.clearGlobeDepth,w=d.useDepthPlane,O=e._globeTranslucencyState,x=O.translucent,A=e._view.globeTranslucencyFramebuffer,T=d.separatePrimitiveFramebuffer=!1,E=e._depthClearCommand,C=e._stencilClearCommand,S=e._classificationStencilClearCommand,M=e._depthPlane,D=d.usePostProcessSelected,P=n.position.z,I=0;I<y;++I){var L=y-I-1,j=v[L];e.mode===ue.default.SCENE2D?(n.position.z=P-j.near+1,i.far=Math.max(1,j.far-j.near),i.near=1,o.update(r),o.updateFrustum(i)):(i.near=0!==L?j.near*e.opaqueFrustumNearOffset:j.near,i.far=j.far,o.updateFrustum(i));var R=c.globeDepth;T&&(t.framebuffer=R.framebuffer),E.execute(a,t),a.stencilBuffer&&C.execute(a,t),o.updatePass(k.default.GLOBE);var N,B=j.commands[k.default.GLOBE],F=j.indices[k.default.GLOBE];if(x)O.executeGlobeCommands(j,Pe,A,e,t);else for(g=0;g<F;++g)Pe(B[g],e,a,t);if(Object(p.default)(R)&&d.useGlobeDepthFramebuffer&&R.executeCopyDepth(a,t),!d.renderTranslucentDepthForPick)if(o.updatePass(k.default.TERRAIN_CLASSIFICATION),B=j.commands[k.default.TERRAIN_CLASSIFICATION],F=j.indices[k.default.TERRAIN_CLASSIFICATION],x)O.executeGlobeClassificationCommands(j,Pe,A,e,t);else for(g=0;g<F;++g)Pe(B[g],e,a,t);if(b&&(E.execute(a,t),w&&M.execute(a,t)),T&&(t.framebuffer=R.primitiveFramebuffer),!d.useInvertClassification||u||d.renderTranslucentDepthForPick){for(o.updatePass(k.default.CESIUM_3D_TILE),B=j.commands[k.default.CESIUM_3D_TILE],F=j.indices[k.default.CESIUM_3D_TILE],g=0;g<F;++g)Pe(B[g],e,a,t);if(F>0&&(Object(p.default)(R)&&d.useGlobeDepthFramebuffer&&R.executeUpdateDepth(a,t,b),!d.renderTranslucentDepthForPick))for(o.updatePass(k.default.CESIUM_3D_TILE_CLASSIFICATION),B=j.commands[k.default.CESIUM_3D_TILE_CLASSIFICATION],F=j.indices[k.default.CESIUM_3D_TILE_CLASSIFICATION],g=0;g<F;++g)Pe(B[g],e,a,t)}else{e._invertClassification.clear(a,t);var z=t.framebuffer;for(t.framebuffer=e._invertClassification._fbo,o.updatePass(k.default.CESIUM_3D_TILE),B=j.commands[k.default.CESIUM_3D_TILE],F=j.indices[k.default.CESIUM_3D_TILE],g=0;g<F;++g)Pe(B[g],e,a,t);for(Object(p.default)(R)&&d.useGlobeDepthFramebuffer&&R.executeUpdateDepth(a,t,b),o.updatePass(k.default.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW),B=j.commands[k.default.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],F=j.indices[k.default.CESIUM_3D_TILE_CLASSIFICATION_IGNORE_SHOW],g=0;g<F;++g)Pe(B[g],e,a,t);for(t.framebuffer=z,e._invertClassification.executeClassified(a,t),1===r.invertClassificationColor.alpha&&e._invertClassification.executeUnclassified(a,t),F>0&&a.stencilBuffer&&S.execute(a,t),o.updatePass(k.default.CESIUM_3D_TILE_CLASSIFICATION),B=j.commands[k.default.CESIUM_3D_TILE_CLASSIFICATION],F=j.indices[k.default.CESIUM_3D_TILE_CLASSIFICATION],g=0;g<F;++g)Pe(B[g],e,a,t)}for(F>0&&a.stencilBuffer&&C.execute(a,t),o.updatePass(k.default.OPAQUE),B=j.commands[k.default.OPAQUE],F=j.indices[k.default.OPAQUE],g=0;g<F;++g)Pe(B[g],e,a,t);if(0!==L&&e.mode!==ue.default.SCENE2D&&(i.near=j.near,o.updateFrustum(i)),!u&&d.useInvertClassification&&r.invertClassificationColor.alpha<1&&(N=e._invertClassification),o.updatePass(k.default.TRANSLUCENT),(B=j.commands[k.default.TRANSLUCENT]).length=j.indices[k.default.TRANSLUCENT],s(e,Pe,t,B,N),j.indices[k.default.CESIUM_3D_TILE_CLASSIFICATION]>0&&c.translucentTileClassification.isSupported()&&(c.translucentTileClassification.executeTranslucentCommands(e,Pe,t,B,R.framebuffer),c.translucentTileClassification.executeClassificationCommands(e,Pe,t,j)),a.depthTexture&&e.useDepthPicking&&(d.useGlobeDepthFramebuffer||f)){var U=f?t.framebuffer.depthStencilTexture:R.framebuffer.depthStencilTexture,V=e._picking.getPickDepth(e,L);V.update(a,U),V.executeCopyDepth(a,t)}if(T&&(t.framebuffer=R.framebuffer),!u&&D){var H=t.framebuffer;if(t.framebuffer=c.sceneFramebuffer.getIdFramebuffer(),i.near=0!==L?j.near*e.opaqueFrustumNearOffset:j.near,i.far=j.far,o.updateFrustum(i),o.updatePass(k.default.GLOBE),B=j.commands[k.default.GLOBE],F=j.indices[k.default.GLOBE],x)O.executeGlobeCommands(j,Ie,A,e,t);else for(g=0;g<F;++g)Ie(B[g],e,a,t);for(b&&(E.framebuffer=t.framebuffer,E.execute(a,t),E.framebuffer=void 0),b&&w&&M.execute(a,t),o.updatePass(k.default.CESIUM_3D_TILE),B=j.commands[k.default.CESIUM_3D_TILE],F=j.indices[k.default.CESIUM_3D_TILE],g=0;g<F;++g)Ie(B[g],e,a,t);for(o.updatePass(k.default.OPAQUE),B=j.commands[k.default.OPAQUE],F=j.indices[k.default.OPAQUE],g=0;g<F;++g)Ie(B[g],e,a,t);for(o.updatePass(k.default.TRANSLUCENT),B=j.commands[k.default.TRANSLUCENT],F=j.indices[k.default.TRANSLUCENT],g=0;g<F;++g)Ie(B[g],e,a,t);t.framebuffer=H}}}function Ve(e){e.context.uniformState.updatePass(k.default.COMPUTE);var t=e._environmentState.sunComputeCommand;Object(p.default)(t)&&t.execute(e._computeEngine);for(var i=e._computeCommandList,n=i.length,a=0;a<n;++a)i[a].execute(e._computeEngine)}function He(e,t,i){for(var n=i.shadowMapCullingVolume,a=i.isPointLight,r=i.passes,o=r.length,s=t.length,l=0;l<s;++l){var u=t[l];if(e.updateDerivedCommands(u),u.castShadows&&(u.pass===k.default.GLOBE||u.pass===k.default.CESIUM_3D_TILE||u.pass===k.default.OPAQUE||u.pass===k.default.TRANSLUCENT)&&e.isVisible(u,n))if(a)for(var d=0;d<o;++d)r[d].commandList.push(u);else if(1===o)r[0].commandList.push(u);else for(var c=!1,f=o-1;f>=0;--f){var h=r[f].cullingVolume;if(e.isVisible(u,h))r[f].commandList.push(u),c=!0;else if(c)break}}}function Ge(e){var t=e.frameState,i=t.shadowState.shadowMaps,n=i.length;if(t.shadowState.shadowsEnabled)for(var a=e.context,r=a.uniformState,o=0;o<n;++o){var s=i[o];if(!s.outOfView){var l,u=s.passes,d=u.length;for(l=0;l<d;++l)u[l].commandList.length=0;for(He(e,e.frameState.commandList,s),l=0;l<d;++l){var c=s.passes[l];r.updateCamera(c.camera),s.updatePass(a,l);for(var f=c.commandList.length,h=0;h<f;++h){var p=c.commandList[h];r.updatePass(p.pass),Pe(p.derivedCommands.shadows.castCommands[o],e,a,c.passState)}}}}}var Ye=new o.default;we.prototype.updateAndExecuteCommands=function(e,t){var i=this._frameState.mode;this._environmentState.useWebVR?function(e,t,i){var n=e._view,a=n.camera,r=e._environmentState.renderTranslucentDepthForPick;nt(e,t,i),r||it(e);n.createPotentiallyVisibleSet(e),r||(Ve(e),Ge(e));var s=t.viewport;s.x=0,s.y=0,s.width=.5*s.width;var l=V.a.clone(a,e._cameraVR);l.frustum=a.frustum;var u=a.frustum.near,d=u*Object(h.default)(e.focalLength,5),c=Object(h.default)(e.eyeSeparation,d/30),f=o.default.multiplyByScalar(l.right,.5*c,Ye);a.frustum.aspectRatio=s.width/s.height;var p=.5*c*u/d;o.default.add(l.position,f,a.position),a.frustum.xOffset=p,Ue(e,t),s.x=s.width,o.default.subtract(l.position,f,a.position),a.frustum.xOffset=-p,Ue(e,t),V.a.clone(l,a)}(this,e,t):i!==ue.default.SCENE2D||this._mapMode2D===te.default.ROTATE?et(!0,this,e,t):(nt(this,e,t),function(e,t){var i=e.context,a=e.frameState,r=e.camera,s=t.viewport,l=n.a.clone(s,$e);t.viewport=l;var u=We,d=qe;e.mapProjection.project(u,d);var c=o.default.clone(r.position,Xe),f=T.default.clone(r.transform,Je),h=r.frustum.clone();r._setTransform(T.default.IDENTITY);var p=T.default.computeViewportTransformation(l,0,1,Ke),m=r.frustum.projectionMatrix,_=r.positionWC.y,g=o.default.fromElements(A.default.sign(_)*d.x-_,0,-r.positionWC.x,Ze),v=j.default.pointToGLWindowCoordinates(m,p,g,Qe);v.x=Math.floor(v.x);var y=l.x,b=l.width;if(0===_||v.x<=y||v.x>=y+b)et(!0,e,t);else if(Math.abs(y+.5*b-v.x)<1)l.width=v.x-l.x,r.position.x*=A.default.sign(r.position.x),r.frustum.right=0,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!0,e,t),l.x=v.x,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=0,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!1,e,t);else if(v.x>y+.5*b){l.width=v.x-y;var w=r.frustum.right;r.frustum.right=d.x-_,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!0,e,t),l.x=v.x,l.width=y+b-v.x,r.position.x=-r.position.x,r.frustum.left=-r.frustum.right,r.frustum.right=w-2*r.frustum.right,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!1,e,t)}else{l.x=v.x,l.width=y+b-v.x;var O=r.frustum.left;r.frustum.left=-d.x-_,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!0,e,t),l.x=y,l.width=v.x-y,r.position.x=-r.position.x,r.frustum.right=-r.frustum.left,r.frustum.left=O-2*r.frustum.left,a.cullingVolume=r.frustum.computeCullingVolume(r.positionWC,r.directionWC,r.upWC),i.uniformState.update(a),et(!1,e,t)}r._setTransform(f),o.default.clone(c,r.position),r.frustum=h.clone(),t.viewport=s}(this,e))};var We=new s.default(Math.PI,A.default.PI_OVER_TWO),qe=new o.default,Xe=new o.default,Ke=new T.default,Je=new T.default,Ze=new o.default,Qe=new o.default,$e=new n.a;function et(e,t,i,n){var a=t._environmentState,r=t._view,o=a.renderTranslucentDepthForPick;e||o||(t.frameState.commandList.length=0),o||it(t),r.createPotentiallyVisibleSet(t),e&&(Object(p.default)(n)&&nt(t,i,n),o||(Ve(t),Ge(t))),Ue(t,i)}var tt=new f.a;function it(e){var t=e._frameState;e._groundPrimitives.update(t),e._primitives.update(t),function(e){var t=e._frameState;e.debugShowFrustumPlanes!==e._debugShowFrustumPlanes&&(e.debugShowFrustumPlanes?e._debugFrustumPlanes=new W.a({camera:e.camera,updateOnChange:!1,frustumSplits:t.frustumSplits}):e._debugFrustumPlanes=e._debugFrustumPlanes&&e._debugFrustumPlanes.destroy(),e._debugShowFrustumPlanes=e.debugShowFrustumPlanes),Object(p.default)(e._debugFrustumPlanes)&&e._debugFrustumPlanes.update(t)}(e),function(e){var t=e._frameState,i=t.shadowMaps,n=i.length,a=n>0&&!t.passes.pick&&e.mode===ue.default.SCENE3D;if(a!==t.shadowState.shadowsEnabled&&(++t.shadowState.lastDirtyTime,t.shadowState.shadowsEnabled=a),t.shadowState.lightShadowsEnabled=!1,a){for(var r=0;r<n;++r)if(i[r]!==t.shadowState.shadowMaps[r]){++t.shadowState.lastDirtyTime;break}t.shadowState.shadowMaps.length=0,t.shadowState.lightShadowMaps.length=0;for(var o=0;o<n;++o){var s=i[o];s.update(t),t.shadowState.shadowMaps.push(s),s.fromLightSource&&(t.shadowState.lightShadowMaps.push(s),t.shadowState.lightShadowsEnabled=!0),s.dirty&&(++t.shadowState.lastDirtyTime,s.dirty=!1)}}}(e),e._globe&&e._globe.render(t)}function nt(e,t,i){var n=e._context,a=e._frameState,r=e._environmentState,o=e._view,s=e._frameState.passes.pick,l=r.useWebVR;r.originalFramebuffer=t.framebuffer,Object(p.default)(e.sun)&&e.sunBloom!==e._sunBloom?(e.sunBloom&&!l?e._sunPostProcess=new _e.a:Object(p.default)(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy()),e._sunBloom=e.sunBloom):!Object(p.default)(e.sun)&&Object(p.default)(e._sunPostProcess)&&(e._sunPostProcess=e._sunPostProcess.destroy(),e._sunBloom=!1);var d=e._clearColorCommand;u.default.clone(i,d.color),d.execute(n,t);var c=r.useGlobeDepthFramebuffer=Object(p.default)(o.globeDepth);c&&(o.globeDepth.update(n,t,o.viewport,e._hdr,r.clearGlobeDepth),o.globeDepth.clear(n,t,i));var f=o.oit,h=r.useOIT=!s&&Object(p.default)(f)&&f.isSupported();h&&(f.update(n,t,o.globeDepth.framebuffer,e._hdr),f.clear(n,t,i),r.useOIT=f.isSupported());var m,_=e.postProcessStages,g=r.usePostProcess=!s&&(e._hdr||_.length>0||_.ambientOcclusion.enabled||_.fxaa.enabled||_.bloom.enabled);if(r.usePostProcessSelected=!1,g&&(o.sceneFramebuffer.update(n,o.viewport,e._hdr),o.sceneFramebuffer.clear(n,t,i),_.update(n,a.useLogDepth,e._hdr),_.clear(n),g=r.usePostProcess=_.ready,r.usePostProcessSelected=g&&_.hasSelected),r.isSunVisible&&e.sunBloom&&!l?(t.framebuffer=e._sunPostProcess.update(t),e._sunPostProcess.clear(n,t,i)):c?t.framebuffer=o.globeDepth.framebuffer:g&&(t.framebuffer=o.sceneFramebuffer.getFramebuffer()),Object(p.default)(t.framebuffer)&&d.execute(n,t),r.useInvertClassification=!s&&Object(p.default)(t.framebuffer)&&e.invertClassification)if(1===e.frameState.invertClassificationColor.alpha&&r.useGlobeDepthFramebuffer&&(m=o.globeDepth.framebuffer),Object(p.default)(m)||n.depthTexture){if(e._invertClassification.previousFramebuffer=m,e._invertClassification.update(n),e._invertClassification.clear(n,t),e.frameState.invertClassificationColor.alpha<1&&h){var v=e._invertClassification.unclassifiedCommand,y=v.derivedCommands;y.oit=f.createDerivedCommands(v,n,y.oit)}}else r.useInvertClassification=!1;e._globeTranslucencyState.translucent&&o.globeTranslucencyFramebuffer.updateAndClear(e._hdr,o.viewport,n,t)}function at(e){e._jobScheduler.resetBudgets();var t=e._frameState;e.primitives.prePassesUpdate(t),Object(p.default)(e.globe)&&e.globe.update(t),e._picking.update(),t.creditDisplay.update()}function rt(e){var t=e._frameState;e.primitives.postPassesUpdate(t),I.default.update()}we.prototype.updateEnvironment=function(){var e=this._frameState,t=this._view,i=this._environmentState,n=e.passes.render,a=e.passes.offscreen,r=this.skyAtmosphere,o=this.globe,s=this._globeTranslucencyState;if(!n||this._mode!==ue.default.SCENE2D&&t.camera.frustum instanceof S.a||!s.environmentVisible)i.skyAtmosphereCommand=void 0,i.skyBoxCommand=void 0,i.sunDrawCommand=void 0,i.sunComputeCommand=void 0,i.moonCommand=void 0;else{Object(p.default)(r)?(Object(p.default)(o)&&(r.setDynamicAtmosphereColor(o.enableLighting&&o.dynamicAtmosphereLighting,o.dynamicAtmosphereLightingFromSun),i.isReadyForAtmosphere=i.isReadyForAtmosphere||o._surface._tilesToRender.length>0),i.skyAtmosphereCommand=r.update(e,o),Object(p.default)(i.skyAtmosphereCommand)&&this.updateDerivedCommands(i.skyAtmosphereCommand)):i.skyAtmosphereCommand=void 0,i.skyBoxCommand=Object(p.default)(this.skyBox)?this.skyBox.update(e,this._hdr):void 0;var l=Object(p.default)(this.sun)?this.sun.update(e,t.passState,this._hdr):void 0;i.sunDrawCommand=Object(p.default)(l)?l.drawCommand:void 0,i.sunComputeCommand=Object(p.default)(l)?l.computeCommand:void 0,i.moonCommand=Object(p.default)(this.moon)?this.moon.update(e):void 0}var u=i.clearGlobeDepth=Object(p.default)(o)&&o.show&&(!o.depthTestAgainstTerrain||this.mode===ue.default.SCENE2D);(i.useDepthPlane=u&&this.mode===ue.default.SCENE3D&&s.useDepthPlane)&&this._depthPlane.update(e),i.renderTranslucentDepthForPick=!1,i.useWebVR=this._useWebVR&&this.mode!==ue.default.SCENE2D&&!a;for(var d=e.mode!==ue.default.SCENE3D||s.sunVisibleThroughGlobe?void 0:e.occluder,c=e.cullingVolume,f=tt.planes,h=0;h<5;++h)f[h]=c.planes[h];c=tt,i.isSkyAtmosphereVisible=Object(p.default)(i.skyAtmosphereCommand)&&i.isReadyForAtmosphere,i.isSunVisible=this.isVisible(i.sunDrawCommand,c,d),i.isMoonVisible=this.isVisible(i.moonCommand,c,d);var m=this.specularEnvironmentMaps,_=this._specularEnvironmentMapAtlas;!Object(p.default)(m)||Object(p.default)(_)&&_.url===m?!Object(p.default)(m)&&Object(p.default)(_)&&(_.destroy(),this._specularEnvironmentMapAtlas=void 0):(_=_&&_.destroy(),this._specularEnvironmentMapAtlas=new ie.a(m)),Object(p.default)(this._specularEnvironmentMapAtlas)&&this._specularEnvironmentMapAtlas.update(e)},we.prototype.resolveFramebuffers=function(e){var t=this._context,i=this._environmentState,n=this._view,a=n.globeDepth,r=i.useOIT,o=i.useGlobeDepthFramebuffer,s=i.usePostProcess,l=i.originalFramebuffer,u=o?a.framebuffer:void 0,d=n.sceneFramebuffer.getFramebuffer(),c=n.sceneFramebuffer.getIdFramebuffer();i.separatePrimitiveFramebuffer&&a.executeMergeColor(t,e),r&&(e.framebuffer=s?d:l,n.oit.execute(t,e));var f=n.translucentTileClassification;if(f.hasTranslucentDepth&&f.isSupported()&&f.execute(this,e),s){var p=d;o&&!r&&(p=u);var m=this.postProcessStages,_=p.getColorTexture(0),g=c.getColorTexture(0),v=Object(h.default)(u,d).depthStencilTexture;m.execute(t,_,v,g),m.copy(t,l)}r||s||!o||(e.framebuffer=l,a.executeCopyColor(t,e))},we.prototype.initializeFrame=function(){120==this._shaderFrameCount++&&(this._shaderFrameCount=0,this._context.shaderCache.destroyReleasedShaderPrograms(),this._context.textureCache.destroyReleasedTextures()),this._tweens.update(),this._globeHeight=function(e){var t=e._globe,i=e.camera.positionCartographic;if(Object(p.default)(t)&&t.show&&Object(p.default)(i))return t.getHeight(i)}(this),this._cameraUnderground=function(e){var t=e.camera,i=e._mode,n=e.globe,a=e._screenSpaceCameraController,r=t.positionCartographic;if(!Object(p.default)(r))return!1;if(!a.onMap()&&r.height<0)return!0;if(!Object(p.default)(n)||!n.show||i===ue.default.SCENE2D||i===ue.default.MORPHING)return!1;var o=e._globeHeight;return Object(p.default)(o)&&r.height<o}(this),this._globeTranslucencyState.update(this),this._screenSpaceCameraController.update(),Object(p.default)(this._deviceOrientationCameraController)&&this._deviceOrientationCameraController.update(),this.camera.update(this._mode),this.camera._updateCameraChanged()};var ot=new u.default;function st(e){var t=e._frameState,i=e.context,a=i.uniformState,r=e._defaultView;e._view=r,e.updateFrameState(),t.passes.render=!0,t.passes.postProcess=e.postProcessStages.hasSelected,t.tilesetPassState=Ae;var s=Object(h.default)(e.backgroundColor,u.default.BLACK);e._hdr&&((s=u.default.clone(s,ot)).red=Math.pow(s.red,e.gamma),s.green=Math.pow(s.green,e.gamma),s.blue=Math.pow(s.blue,e.gamma)),t.backgroundColor=s,e.fog.update(t),a.update(t);var l=e.shadowMap;Object(p.default)(l)&&l.enabled&&(!Object(p.default)(e.light)||e.light instanceof me.a?o.default.negate(a.sunDirectionWC,e._shadowMapCamera.direction):o.default.clone(e.light.direction,e._shadowMapCamera.direction),t.shadowMaps.push(l)),e._computeCommandList.length=0,e._overlayCommandList.length=0;var d=r.viewport;d.x=0,d.y=0,d.width=i.drawingBufferWidth,d.height=i.drawingBufferHeight;var c=r.passState;c.framebuffer=void 0,c.blendingEnabled=void 0,c.scissorTest=void 0,c.viewport=n.a.clone(d,c.viewport),Object(p.default)(e.globe)&&e.globe.beginFrame(t),e.updateEnvironment(),e.updateAndExecuteCommands(c,s),e.resolveFramebuffers(c),c.framebuffer=void 0,function(e,t){e.context.uniformState.updatePass(k.default.OVERLAY);for(var i=e.context,n=e._overlayCommandList,a=n.length,r=0;r<a;++r)n[r].execute(i,t)}(e,c),Object(p.default)(e.globe)&&(e.globe.endFrame(t),e.globe.tilesLoaded||(e._renderRequested=!0)),i.endFrame()}function lt(e,t){try{t(e)}catch(t){if(e._renderError.raiseEvent(e,t),e.rethrowRenderErrors)throw t}}function ut(e){return e._picking.updateMostDetailedRayPicks(e)}function dt(e){var t=e._frameState;Te.camera=t.camera,Te.cullingVolume=t.cullingVolume,e.primitives.updateForPass(t,Te)}function ct(e){var t=e._frameState;t.camera.canPreloadFlight()&&(Ee.camera=e.preloadFlightCamera,Ee.cullingVolume=e.preloadFlightCullingVolume,e.primitives.updateForPass(t,Ee))}function ft(e){e.primitives.updateForPass(e._frameState,Ce)}we.prototype.render=function(e){this._preUpdate.raiseEvent(this,e);var t=this._frameState;t.newFrame=!1,Object(p.default)(e)||(e=x.default.now());var i=this._view.checkForCameraUpdates(this),n=!this.requestRenderMode||this._renderRequested||i||this._logDepthBufferDirty||this._hdrDirty||this.mode===ue.default.MORPHING;if(!n&&Object(p.default)(this.maximumRenderTimeChange)&&Object(p.default)(this._lastRenderTime)){var a=Math.abs(x.default.secondsDifference(this._lastRenderTime,e));n=n||a>this.maximumRenderTimeChange}n&&(this._lastRenderTime=x.default.clone(e,this._lastRenderTime),this._renderRequested=!1,this._logDepthBufferDirty=!1,this._hdrDirty=!1,Me(this,A.default.incrementWrap(t.frameNumber,15e6,1),e),t.newFrame=!0);lt(this,at),this.primitives.show&&(lt(this,ut),lt(this,dt),lt(this,ct),n||lt(this,ft)),this._postUpdate.raiseEvent(this,e),n&&(this._preRender.raiseEvent(this,e),t.creditDisplay.beginFrame(),lt(this,st)),function(e,t){if(e.debugShowFramesPerSecond){if(!Object(p.default)(e._performanceDisplay)){var i=document.createElement("div");i.className="cesium-performanceDisplay-defaultContainer",e._canvas.parentNode.appendChild(i);var n=new ne.a({container:i});e._performanceDisplay=n,e._performanceContainer=i}e._performanceDisplay.throttled=e.requestRenderMode,e._performanceDisplay.update(t)}else Object(p.default)(e._performanceDisplay)&&(e._performanceDisplay=e._performanceDisplay&&e._performanceDisplay.destroy(),e._performanceContainer.parentNode.removeChild(e._performanceContainer))}(this,n),lt(this,rt),function(e){for(var t=e._frameState.afterRender,i=0,n=t.length;i<n;++i)t[i](),e.requestRender();t.length=0}(this),n&&(this._postRender.raiseEvent(this,e),t.creditDisplay.endFrame())},we.prototype.forceRender=function(e){this._renderRequested=!0,this.render(e)},we.prototype.requestRender=function(){this._renderRequested=!0},we.prototype.clampLineWidth=function(e){return Math.max(F.a.minimumAliasedLineWidth,Math.min(e,F.a.maximumAliasedLineWidth))},we.prototype.pick=function(e,t,i){return this._picking.pick(this,e,t,i)},we.prototype.pickPositionWorldCoordinates=function(e,t){return this._picking.pickPositionWorldCoordinates(this,e,t)},we.prototype.pickPosition=function(e,t){return this._picking.pickPosition(this,e,t)},we.prototype.drillPick=function(e,t,i,n){return this._picking.drillPick(this,e,t,i,n)},we.prototype.pickFromRay=function(e,t,i){return this._picking.pickFromRay(this,e,t,i)},we.prototype.drillPickFromRay=function(e,t,i,n){return this._picking.drillPickFromRay(this,e,t,i,n)},we.prototype.pickFromRayMostDetailed=function(e,t,i){return this._picking.pickFromRayMostDetailed(this,e,t,i)},we.prototype.drillPickFromRayMostDetailed=function(e,t,i,n){return this._picking.drillPickFromRayMostDetailed(this,e,t,i,n)},we.prototype.sampleHeight=function(e,t,i){return this._picking.sampleHeight(this,e,t,i)},we.prototype.clampToHeight=function(e,t,i,n){return this._picking.clampToHeight(this,e,t,i,n)},we.prototype.sampleHeightMostDetailed=function(e,t,i){return this._picking.sampleHeightMostDetailed(this,e,t,i)},we.prototype.clampToHeightMostDetailed=function(e,t,i){return this._picking.clampToHeightMostDetailed(this,e,t,i)},we.prototype.cartesianToCanvasCoordinates=function(e,t){return de.default.wgs84ToWindowCoordinates(this,e,t)},we.prototype.completeMorph=function(){this._transitioner.completeMorph()},we.prototype.morphTo2D=function(e){var t,i=this.globe;t=Object(p.default)(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=Object(h.default)(e,2),this._transitioner.morphTo2D(e,t)},we.prototype.morphToColumbusView=function(e){var t,i=this.globe;t=Object(p.default)(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=Object(h.default)(e,2),this._transitioner.morphToColumbusView(e,t)},we.prototype.morphTo3D=function(e){var t,i=this.globe;t=Object(p.default)(i)?i.ellipsoid:this.mapProjection.ellipsoid,e=Object(h.default)(e,2),this._transitioner.morphTo3D(e,t)},we.prototype.isDestroyed=function(){return!1},we.prototype.destroy=function(){this._tweens.removeAll(),this._computeEngine=this._computeEngine&&this._computeEngine.destroy(),this._screenSpaceCameraController=this._screenSpaceCameraController&&this._screenSpaceCameraController.destroy(),this._deviceOrientationCameraController=this._deviceOrientationCameraController&&!this._deviceOrientationCameraController.isDestroyed()&&this._deviceOrientationCameraController.destroy(),this._primitives=this._primitives&&this._primitives.destroy(),this._groundPrimitives=this._groundPrimitives&&this._groundPrimitives.destroy(),this._globe=this._globe&&this._globe.destroy(),this.skyBox=this.skyBox&&this.skyBox.destroy(),this.skyAtmosphere=this.skyAtmosphere&&this.skyAtmosphere.destroy(),this._debugSphere=this._debugSphere&&this._debugSphere.destroy(),this.sun=this.sun&&this.sun.destroy(),this._sunPostProcess=this._sunPostProcess&&this._sunPostProcess.destroy(),this._depthPlane=this._depthPlane&&this._depthPlane.destroy(),this._transitioner=this._transitioner&&this._transitioner.destroy(),this._debugFrustumPlanes=this._debugFrustumPlanes&&this._debugFrustumPlanes.destroy(),this._brdfLutGenerator=this._brdfLutGenerator&&this._brdfLutGenerator.destroy(),this._picking=this._picking&&this._picking.destroy(),this._defaultView=this._defaultView&&this._defaultView.destroy(),this._view=void 0,this._removeCreditContainer&&this._canvas.parentNode.removeChild(this._creditContainer),this.postProcessStages=this.postProcessStages&&this.postProcessStages.destroy(),this._context=this._context&&this._context.destroy(),this._frameState.creditDisplay=this._frameState.creditDisplay&&this._frameState.creditDisplay.destroy(),Object(p.default)(this._performanceDisplay)&&(this._performanceDisplay=this._performanceDisplay&&this._performanceDisplay.destroy(),this._performanceContainer.parentNode.removeChild(this._performanceContainer)),this._removeRequestListenerCallback(),this._removeTaskProcessorListenerCallback();for(var e=0;e<this._removeGlobeCallbacks.length;++e)this._removeGlobeCallbacks[e]();return this._removeGlobeCallbacks.length=0,Object(m.default)(this)},t.a=we},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(2),o=i(0),s=i(3),l=i(15),u=i(5),d=i(21),c=i(176);function f(e,t){if(!Object(o.default)(e))throw new s.default("occluderBoundingSphere is required.");if(!Object(o.default)(t))throw new s.default("camera position is required.");this._occluderPosition=a.default.clone(e.center),this._occluderRadius=e.radius,this._horizonDistance=0,this._horizonPlaneNormal=void 0,this._horizonPlanePosition=void 0,this._cameraPosition=void 0,this.cameraPosition=t}var h=new a.default;Object.defineProperties(f.prototype,{position:{get:function(){return this._occluderPosition}},radius:{get:function(){return this._occluderRadius}},cameraPosition:{set:function(e){if(!Object(o.default)(e))throw new s.default("cameraPosition is required.");e=a.default.clone(e,this._cameraPosition);var t,i,n,r=a.default.subtract(this._occluderPosition,e,h),l=a.default.magnitudeSquared(r),u=this._occluderRadius*this._occluderRadius;if(l>u){t=Math.sqrt(l-u),l=1/Math.sqrt(l),i=a.default.multiplyByScalar(r,l,h);var d=t*t*l;n=a.default.add(e,a.default.multiplyByScalar(i,d,h),h)}else t=Number.MAX_VALUE;this._horizonDistance=t,this._horizonPlaneNormal=i,this._horizonPlanePosition=n,this._cameraPosition=e}}}),f.fromBoundingSphere=function(e,t,i){if(!Object(o.default)(e))throw new s.default("occluderBoundingSphere is required.");if(!Object(o.default)(t))throw new s.default("camera position is required.");return Object(o.default)(i)?(a.default.clone(e.center,i._occluderPosition),i._occluderRadius=e.radius,i.cameraPosition=t,i):new f(e,t)};var p=new a.default;f.prototype.isPointVisible=function(e){if(this._horizonDistance!==Number.MAX_VALUE){var t=a.default.subtract(e,this._occluderPosition,p),i=this._occluderRadius;if((i=a.default.magnitudeSquared(t)-i*i)>0)return i=Math.sqrt(i)+this._horizonDistance,t=a.default.subtract(e,this._cameraPosition,t),i*i>a.default.magnitudeSquared(t)}return!1};var m=new a.default;f.prototype.isBoundingSphereVisible=function(e){var t=a.default.clone(e.center,m),i=e.radius;if(this._horizonDistance!==Number.MAX_VALUE){var n=a.default.subtract(t,this._occluderPosition,p),r=this._occluderRadius-i;if(r=a.default.magnitudeSquared(n)-r*r,i<this._occluderRadius)return r>0&&(r=Math.sqrt(r)+this._horizonDistance,n=a.default.subtract(t,this._cameraPosition,n),r*r+i*i>a.default.magnitudeSquared(n));if(r>0){n=a.default.subtract(t,this._cameraPosition,n);var o=a.default.magnitudeSquared(n),s=this._occluderRadius*this._occluderRadius,l=i*i;return(this._horizonDistance*this._horizonDistance+s)*l>o*s||(r=Math.sqrt(r)+this._horizonDistance)*r+l>o}return!0}return!1};var _=new a.default;f.prototype.computeVisibility=function(e){if(!Object(o.default)(e))throw new s.default("occludeeBS is required.");var t=a.default.clone(e.center),i=e.radius;if(i>this._occluderRadius)return c.a.FULL;if(this._horizonDistance!==Number.MAX_VALUE){var n=a.default.subtract(t,this._occluderPosition,_),r=this._occluderRadius-i,l=a.default.magnitudeSquared(n);if((r=l-r*r)>0){r=Math.sqrt(r)+this._horizonDistance,n=a.default.subtract(t,this._cameraPosition,n);var u=a.default.magnitudeSquared(n);return r*r+i*i<u?c.a.NONE:(r=l-(r=this._occluderRadius+i)*r)>0?u<(r=Math.sqrt(r)+this._horizonDistance)*r+i*i?c.a.FULL:c.a.PARTIAL:(n=a.default.subtract(t,this._horizonPlanePosition,n),a.default.dot(n,this._horizonPlaneNormal)>-i?c.a.PARTIAL:c.a.FULL)}}return c.a.NONE};var g=new a.default;f.computeOccludeePoint=function(e,t,i){if(!Object(o.default)(e))throw new s.default("occluderBoundingSphere is required.");if(!Object(o.default)(i))throw new s.default("positions is required.");if(0===i.length)throw new s.default("positions must contain at least one element");var n=a.default.clone(t),r=a.default.clone(e.center),l=e.radius,u=i.length;if(a.default.equals(r,t))throw new s.default("occludeePosition must be different than occluderBoundingSphere.center");var d=a.default.normalize(a.default.subtract(n,r,g),g),c=-a.default.dot(d,r),h=f._anyRotationVector(r,d,c),p=f._horizonToPlaneNormalDotProduct(e,d,c,h,i[0]);if(p){for(var m,_=1;_<u;++_){if(!(m=f._horizonToPlaneNormalDotProduct(e,d,c,h,i[_])))return;m<p&&(p=m)}if(!(p<.0017453283658983088)){var v=l/p;return a.default.add(r,a.default.multiplyByScalar(d,v,g),g)}}};var v=[];f.computeOccludeePointFromRectangle=function(e,t){if(!Object(o.default)(e))throw new s.default("rectangle is required.");t=Object(r.default)(t,l.default.WGS84);var i=d.default.subsample(e,t,0,v),u=n.default.fromPoints(i),c=a.default.ZERO;if(!a.default.equals(c,u.center))return f.computeOccludeePoint(new n.default(c,t.minimumRadius),u.center,i)};var y=new a.default;f._anyRotationVector=function(e,t,i){var n=a.default.abs(t,y),r=n.x>n.y?0:1;(0===r&&n.z>n.x||1===r&&n.z>n.y)&&(r=2);var o,s=new a.default;0===r?(n.x=e.x,n.y=e.y+1,n.z=e.z+1,o=a.default.UNIT_X):1===r?(n.x=e.x+1,n.y=e.y,n.z=e.z+1,o=a.default.UNIT_Y):(n.x=e.x+1,n.y=e.y+1,n.z=e.z,o=a.default.UNIT_Z);var l=(a.default.dot(t,n)+i)/-a.default.dot(t,o);return a.default.normalize(a.default.subtract(a.default.add(n,a.default.multiplyByScalar(o,l,s),n),e,n),n)};var b=new a.default;f._rotationVector=function(e,t,i,n,r){var o=a.default.subtract(n,e,b);if(o=a.default.normalize(o,o),a.default.dot(t,o)<.9999999847691291){var s=a.default.cross(t,o,o);if(a.default.magnitude(s)>u.default.EPSILON13)return a.default.normalize(s,new a.default)}return r};var w=new a.default,O=new a.default,x=new a.default,A=new a.default;f._horizonToPlaneNormalDotProduct=function(e,t,i,n,r){var o=a.default.clone(r,w),s=a.default.clone(e.center,O),l=e.radius,u=a.default.subtract(s,o,x),d=a.default.magnitudeSquared(u),c=l*l;if(d<c)return!1;var f=d-c,h=Math.sqrt(f),p=h*(1/Math.sqrt(d))*h;u=a.default.normalize(u,u);var m=a.default.add(o,a.default.multiplyByScalar(u,p,A),A),_=Math.sqrt(f-p*p),g=this._rotationVector(s,t,i,o,n),v=a.default.fromElements(g.x*g.x*u.x+(g.x*g.y-g.z)*u.y+(g.x*g.z+g.y)*u.z,(g.x*g.y+g.z)*u.x+g.y*g.y*u.y+(g.y*g.z-g.x)*u.z,(g.x*g.z-g.y)*u.x+(g.y*g.z+g.x)*u.y+g.z*g.z*u.z,w);v=a.default.normalize(v,v);var y=a.default.multiplyByScalar(v,_,w);g=a.default.normalize(a.default.subtract(a.default.add(m,y,x),s,x),x);var b=a.default.dot(t,g);g=a.default.normalize(a.default.subtract(a.default.subtract(m,y,g),s,g),g);var T=a.default.dot(t,g);return b<T?b:T},t.a=f},function(e,t,i){"use strict";var n,a=i(41),r=i(4),o=i(7),s=i(0),l=i(19),u=i(3),d=i(35),c=i(446),f=i(108),h=i(44),p=i(91),m=i(39),_=i(67);function g(e){this._context=e}var v=new h.default({primitiveType:d.default.TRIANGLES}),y=new f.default({color:new o.default(0,0,0,0)});g.prototype.execute=function(e){if(r.a.defined("computeCommand",e),Object(s.default)(e.preExecute)&&e.preExecute(e),!Object(s.default)(e.fragmentShaderSource)&&!Object(s.default)(e.shaderProgram))throw new u.default("computeCommand.fragmentShaderSource or computeCommand.shaderProgram is required.");r.a.defined("computeCommand.outputTexture",e.outputTexture);var t=e.outputTexture,i=t.width,o=t.height,l=this._context,d=Object(s.default)(e.vertexArray)?e.vertexArray:l.getViewportQuadVertexArray(),f=Object(s.default)(e.shaderProgram)?e.shaderProgram:function(e,t){return _.default.fromCache({context:e,vertexShaderSource:c.a,fragmentShaderSource:t,attributeLocations:{position:0,textureCoordinates:1}})}(l,e.fragmentShaderSource),h=function(e,t){return new p.default({context:e,colorTextures:[t],destroyAttachments:!1})}(l,t),g=function(e,t){return Object(s.default)(n)&&n.viewport.width===e&&n.viewport.height===t||(n=m.default.fromCache({viewport:new a.a(0,0,e,t)})),n}(i,o),b=e.uniformMap,w=y;w.framebuffer=h,w.renderState=g,w.execute(l);var O=v;O.vertexArray=d,O.renderState=g,O.shaderProgram=f,O.uniformMap=b,O.framebuffer=h,O.execute(l),h.destroy(),e.persists||(f.destroy(),Object(s.default)(e.vertexArray)&&d.destroy()),Object(s.default)(e.postExecute)&&e.postExecute(t)},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return Object(l.default)(this)},t.a=g},function(e,t,i){"use strict";var n=i(4),a=i(50),r=i(7),o=i(11),s=i(99),l=i(2),u=i(0),d=i(19),c=i(3),f=i(46),h=i(28),p=i(215),m=i(6),_=i(33),g=i(35),v=i(23),y=i(10),b=i(446),w=i(36),O=i(108),x=i(56),A=i(224),T=i(44),E=i(226),C=i(32),S=i(39),M=i(765),D=i(67),P=i(45),I=i(766),L=i(767),j=i(104);function R(e,t,i){var n=e.getError();if(n!==e.NO_ERROR)throw new v.a(function(e,t,i,n){for(var a=function(e,t){var i="WebGL Error: ";switch(t){case e.INVALID_ENUM:i+="INVALID_ENUM";break;case e.INVALID_VALUE:i+="INVALID_VALUE";break;case e.INVALID_OPERATION:i+="INVALID_OPERATION";break;case e.OUT_OF_MEMORY:i+="OUT_OF_MEMORY";break;case e.CONTEXT_LOST_WEBGL:i+="CONTEXT_LOST_WEBGL lost";break;default:i+="Unknown ("+t+")"}return i}(e,n)+": "+t.name+"(",r=0;r<i.length;++r)0!==r&&(a+=", "),a+=i[r];return a+=");"}(e,t,i,n))}function N(e,t,i){return{get:function(){var n=e[t];return i(e,"get: "+t,n),e[t]},set:function(n){e[t]=n,i(e,"set: "+t,n)}}}function B(e,t){for(var i=t.length,n=0;n<i;++n){var a=e.getExtension(t[n]);if(a)return a}}function F(e,t){if("undefined"==typeof WebGLRenderingContext)throw new v.a("The browser does not support WebGL. Visit http://get.webgl.org.");n.a.defined("canvas",e),this._canvas=e,t=Object(a.default)(t,!0),(t=Object(l.default)(t,{})).allowTextureFilterAnisotropic=Object(l.default)(t.allowTextureFilterAnisotropic,!0);var i=Object(l.default)(t.webgl,{});i.alpha=Object(l.default)(i.alpha,!1),i.stencil=Object(l.default)(i.stencil,!0);var o,d=Object(l.default)(t.requestWebgl2,!1)&&"undefined"!=typeof WebGL2RenderingContext,c=!1,f=t.getWebGLStub;if(Object(u.default)(f))o=f(e,i);else if(d&&(o=e.getContext("webgl2",i)||e.getContext("experimental-webgl2",i)||void 0,Object(u.default)(o)&&(c=!0)),Object(u.default)(o)||(o=e.getContext("webgl",i)||e.getContext("experimental-webgl",i)||void 0),!Object(u.default)(o))throw new v.a("The browser supports WebGL, but initialization failed.");this._originalGLContext=o,this._gl=o,this._webgl2=c,this._id=Object(s.default)(),this.validateFramebuffer=!1,this.validateShaderProgram=!1,this.logShaderCompilation=!1,this._throwOnWebGLError=!1,this._shaderCache=new M.a(this),this._textureCache=new I.a;var h=o;this._stencilBits=h.getParameter(h.STENCIL_BITS),x.a._maximumCombinedTextureImageUnits=h.getParameter(h.MAX_COMBINED_TEXTURE_IMAGE_UNITS),x.a._maximumCubeMapSize=h.getParameter(h.MAX_CUBE_MAP_TEXTURE_SIZE),x.a._maximumFragmentUniformVectors=h.getParameter(h.MAX_FRAGMENT_UNIFORM_VECTORS),x.a._maximumTextureImageUnits=h.getParameter(h.MAX_TEXTURE_IMAGE_UNITS),x.a._maximumRenderbufferSize=h.getParameter(h.MAX_RENDERBUFFER_SIZE),x.a._maximumTextureSize=h.getParameter(h.MAX_TEXTURE_SIZE),x.a._maximumVaryingVectors=h.getParameter(h.MAX_VARYING_VECTORS),x.a._maximumVertexAttributes=h.getParameter(h.MAX_VERTEX_ATTRIBS),x.a._maximumVertexTextureImageUnits=h.getParameter(h.MAX_VERTEX_TEXTURE_IMAGE_UNITS),x.a._maximumVertexUniformVectors=h.getParameter(h.MAX_VERTEX_UNIFORM_VECTORS);var m=h.getParameter(h.ALIASED_LINE_WIDTH_RANGE);x.a._minimumAliasedLineWidth=m[0],x.a._maximumAliasedLineWidth=m[1];var _=h.getParameter(h.ALIASED_POINT_SIZE_RANGE);x.a._minimumAliasedPointSize=_[0],x.a._maximumAliasedPointSize=_[1];var g=h.getParameter(h.MAX_VIEWPORT_DIMS);x.a._maximumViewportWidth=g[0],x.a._maximumViewportHeight=g[1];var b=h.getShaderPrecisionFormat(h.FRAGMENT_SHADER,h.HIGH_FLOAT);x.a._highpFloatSupported=0!==b.precision;var w=h.getShaderPrecisionFormat(h.FRAGMENT_SHADER,h.HIGH_INT);x.a._highpIntSupported=0!==w.rangeMax,this._antialias=h.getContextAttributes().antialias,this._standardDerivatives=!!B(h,["OES_standard_derivatives"]),this._blendMinmax=!!B(h,["EXT_blend_minmax"]),this._elementIndexUint=!!B(h,["OES_element_index_uint"]),this._depthTexture=!!B(h,["WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"]),this._fragDepth=!!B(h,["EXT_frag_depth"]),this._debugShaders=B(h,["WEBGL_debug_shaders"]),this._textureFloat=!!B(h,["OES_texture_float"]),this._textureHalfFloat=!!B(h,["OES_texture_half_float"]),this._textureFloatLinear=!!B(h,["OES_texture_float_linear"]),this._textureHalfFloatLinear=!!B(h,["OES_texture_half_float_linear"]),this._colorBufferFloat=!!B(h,["EXT_color_buffer_float","WEBGL_color_buffer_float"]),this._floatBlend=!!B(h,["EXT_float_blend"]),this._colorBufferHalfFloat=!!B(h,["EXT_color_buffer_half_float"]),this._s3tc=!!B(h,["WEBGL_compressed_texture_s3tc","MOZ_WEBGL_compressed_texture_s3tc","WEBKIT_WEBGL_compressed_texture_s3tc"]),this._pvrtc=!!B(h,["WEBGL_compressed_texture_pvrtc","WEBKIT_WEBGL_compressed_texture_pvrtc"]),this._astc=!!B(h,["WEBGL_compressed_texture_astc"]),this._etc=!!B(h,["WEBG_compressed_texture_etc"]),this._etc1=!!B(h,["WEBGL_compressed_texture_etc1"]),this._bc7=!!B(h,["EXT_texture_compression_bptc"]),p.a.setKTX2SupportedFormats(this._s3tc,this._pvrtc,this._astc,this._etc,this._etc1,this._bc7);var O,A,T,C,D,P,j,R,N,F,k=t.allowTextureFilterAnisotropic?B(h,["EXT_texture_filter_anisotropic","WEBKIT_EXT_texture_filter_anisotropic"]):void 0;if(this._textureFilterAnisotropic=k,x.a._maximumTextureFilterAnisotropy=Object(u.default)(k)?h.getParameter(k.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1,c){var z=this;O=function(){return z._gl.createVertexArray()},A=function(e){z._gl.bindVertexArray(e)},T=function(e){z._gl.deleteVertexArray(e)},C=function(e,t,i,n,a){h.drawElementsInstanced(e,t,i,n,a)},D=function(e,t,i,n){h.drawArraysInstanced(e,t,i,n)},P=function(e,t){h.vertexAttribDivisor(e,t)},j=function(e){h.drawBuffers(e)}}else R=B(h,["OES_vertex_array_object"]),Object(u.default)(R)&&(O=function(){return R.createVertexArrayOES()},A=function(e){R.bindVertexArrayOES(e)},T=function(e){R.deleteVertexArrayOES(e)}),N=B(h,["ANGLE_instanced_arrays"]),Object(u.default)(N)&&(C=function(e,t,i,n,a){N.drawElementsInstancedANGLE(e,t,i,n,a)},D=function(e,t,i,n){N.drawArraysInstancedANGLE(e,t,i,n)},P=function(e,t){N.vertexAttribDivisorANGLE(e,t)}),F=B(h,["WEBGL_draw_buffers"]),Object(u.default)(F)&&(j=function(e){F.drawBuffersWEBGL(e)});this.glCreateVertexArray=O,this.glBindVertexArray=A,this.glDeleteVertexArray=T,this.glDrawElementsInstanced=C,this.glDrawArraysInstanced=D,this.glVertexAttribDivisor=P,this.glDrawBuffers=j,this._vertexArrayObject=!!R,this._instancedArrays=!!N,this._drawBuffers=!!F,x.a._maximumDrawBuffers=this.drawBuffers?h.getParameter(y.a.MAX_DRAW_BUFFERS):1,x.a._maximumColorAttachments=this.drawBuffers?h.getParameter(y.a.MAX_COLOR_ATTACHMENTS):1,this._clearColor=new r.default(0,0,0,0),this._clearDepth=1,this._clearStencil=0;var U=new L.a,V=new E.a(this),H=S.default.fromCache();this._defaultPassState=V,this._defaultRenderState=H,this._defaultTexture=void 0,this._defaultEmissiveTexture=void 0,this._defaultNormalTexture=void 0,this._defaultCubeMap=void 0,this._us=U,this._currentRenderState=H,this._currentPassState=V,this._currentFramebuffer=void 0,this._maxFrameTextureUnitIndex=0,this._vertexAttribDivisors=[],this._previousDrawInstanced=!1;for(var G=0;G<x.a._maximumVertexAttributes;G++)this._vertexAttribDivisors.push(0);this._pickObjects={},this._nextPickColor=new Uint32Array(1),this.options=t,this.cache={},S.default.apply(h,H,V)}var k,z={};function U(e,t,i,n){var a=e._currentRenderState,r=e._currentPassState;e._currentRenderState=t,e._currentPassState=i,S.default.partialApply(e._gl,a,t,r,i,n)}function V(e,t){if(t!==e._currentFramebuffer){e._currentFramebuffer=t;var i=k;if(Object(u.default)(t))t._bind(),function(e){if(e.validateFramebuffer){var t=e._gl,i=t.checkFramebufferStatus(t.FRAMEBUFFER);if(i!==t.FRAMEBUFFER_COMPLETE){var n;switch(i){case t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:n="Framebuffer is not complete. Incomplete attachment: at least one attachment point with a renderbuffer or texture attached has its attached object no longer in existence or has an attached image with a width or height of zero, or the color attachment point has a non-color-renderable image attached, or the depth attachment point has a non-depth-renderable image attached, or the stencil attachment point has a non-stencil-renderable image attached. Color-renderable formats include GL_RGBA4, GL_RGB5_A1, and GL_RGB565. GL_DEPTH_COMPONENT16 is the only depth-renderable format. GL_STENCIL_INDEX8 is the only stencil-renderable format.";break;case t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:n="Framebuffer is not complete. Incomplete dimensions: not all attached images have the same width and height.";break;case t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:n="Framebuffer is not complete. Missing attachment: no images are attached to the framebuffer.";break;case t.FRAMEBUFFER_UNSUPPORTED:n="Framebuffer is not complete. Unsupported: the combination of internal formats of the attached images violates an implementation-dependent set of restrictions."}throw new c.default(n)}}}(e),i=t._getActiveColorAttachments();else{var n=e._gl;n.bindFramebuffer(n.FRAMEBUFFER,null)}e.drawBuffers&&e.glDrawBuffers(i)}}Object.defineProperties(F.prototype,{id:{get:function(){return this._id}},webgl2:{get:function(){return this._webgl2}},canvas:{get:function(){return this._canvas}},shaderCache:{get:function(){return this._shaderCache}},textureCache:{get:function(){return this._textureCache}},uniformState:{get:function(){return this._us}},stencilBits:{get:function(){return this._stencilBits}},stencilBuffer:{get:function(){return this._stencilBits>=8}},antialias:{get:function(){return this._antialias}},standardDerivatives:{get:function(){return this._standardDerivatives||this._webgl2}},floatBlend:{get:function(){return this._floatBlend}},blendMinmax:{get:function(){return this._blendMinmax||this._webgl2}},elementIndexUint:{get:function(){return this._elementIndexUint||this._webgl2}},depthTexture:{get:function(){return this._depthTexture||this._webgl2}},floatingPointTexture:{get:function(){return this._webgl2||this._textureFloat}},halfFloatingPointTexture:{get:function(){return this._webgl2||this._textureHalfFloat}},textureFloatLinear:{get:function(){return this._textureFloatLinear}},textureHalfFloatLinear:{get:function(){return this._webgl2&&this._textureFloatLinear||!this._webgl2&&this._textureHalfFloatLinear}},textureFilterAnisotropic:{get:function(){return!!this._textureFilterAnisotropic}},s3tc:{get:function(){return this._s3tc}},pvrtc:{get:function(){return this._pvrtc}},astc:{get:function(){return this._astc}},etc:{get:function(){return this._etc}},etc1:{get:function(){return this._etc1}},bc7:{get:function(){return this._bc7}},supportsBasis:{get:function(){return this._s3tc||this._pvrtc||this._astc||this._etc||this._etc1||this._bc7}},vertexArrayObject:{get:function(){return this._vertexArrayObject||this._webgl2}},fragmentDepth:{get:function(){return this._fragDepth||this._webgl2}},instancedArrays:{get:function(){return this._instancedArrays||this._webgl2}},colorBufferFloat:{get:function(){return this._colorBufferFloat}},colorBufferHalfFloat:{get:function(){return this._webgl2&&this._colorBufferFloat||!this._webgl2&&this._colorBufferHalfFloat}},drawBuffers:{get:function(){return this._drawBuffers||this._webgl2}},debugShaders:{get:function(){return this._debugShaders}},throwOnWebGLError:{get:function(){return this._throwOnWebGLError},set:function(e){this._throwOnWebGLError=e,this._gl=function(e,t){if(!Object(u.default)(t))return e;function i(i){return function(){var n=i.apply(e,arguments);return t(e,i,arguments),n}}var n={};for(var a in e){var r=e[a];r instanceof Function?n[a]=i(r):Object.defineProperty(n,a,N(e,a,t))}return n}(this._originalGLContext,e?R:void 0)}},defaultTexture:{get:function(){return void 0===this._defaultTexture&&(this._defaultTexture=new P.default({context:this,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1})),this._defaultTexture}},defaultEmissiveTexture:{get:function(){return void 0===this._defaultEmissiveTexture&&(this._defaultEmissiveTexture=new P.default({context:this,pixelFormat:_.default.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([0,0,0])},flipY:!1})),this._defaultEmissiveTexture}},defaultNormalTexture:{get:function(){return void 0===this._defaultNormalTexture&&(this._defaultNormalTexture=new P.default({context:this,pixelFormat:_.default.RGB,source:{width:1,height:1,arrayBufferView:new Uint8Array([128,128,255])},flipY:!1})),this._defaultNormalTexture}},defaultCubeMap:{get:function(){if(void 0===this._defaultCubeMap){var e={width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])};this._defaultCubeMap=new A.a({context:this,source:{positiveX:e,negativeX:e,positiveY:e,negativeY:e,positiveZ:e,negativeZ:e},flipY:!1})}return this._defaultCubeMap}},drawingBufferHeight:{get:function(){return this._gl.drawingBufferHeight}},drawingBufferWidth:{get:function(){return this._gl.drawingBufferWidth}},defaultFramebuffer:{get:function(){return z}}}),"undefined"!=typeof WebGLRenderingContext&&(k=[y.a.BACK]);var H=new O.default;F.prototype.clear=function(e,t){e=Object(l.default)(e,H),t=Object(l.default)(t,this._defaultPassState);var i=this._gl,n=0,a=e.color,o=e.depth,s=e.stencil;Object(u.default)(a)&&(r.default.equals(this._clearColor,a)||(r.default.clone(a,this._clearColor),i.clearColor(a.red,a.green,a.blue,a.alpha)),n|=i.COLOR_BUFFER_BIT),Object(u.default)(o)&&(o!==this._clearDepth&&(this._clearDepth=o,i.clearDepth(o)),n|=i.DEPTH_BUFFER_BIT),Object(u.default)(s)&&(s!==this._clearStencil&&(this._clearStencil=s,i.clearStencil(s)),n|=i.STENCIL_BUFFER_BIT),U(this,Object(l.default)(e.renderState,this._defaultRenderState),t,!0),V(this,Object(l.default)(e.framebuffer,t.framebuffer)),i.clear(n)},F.prototype.draw=function(e,t,i,a){n.a.defined("drawCommand",e),n.a.defined("drawCommand.shaderProgram",e._shaderProgram),t=Object(l.default)(t,this._defaultPassState);var r=Object(l.default)(e._framebuffer,t.framebuffer),o=Object(l.default)(e._renderState,this._defaultRenderState);i=Object(l.default)(i,e._shaderProgram),a=Object(l.default)(a,e._uniformMap),function(e,t,i,n,a){if(Object(u.default)(t)&&a.depthTest&&a.depthTest.enabled&&!t.hasDepthAttachment)throw new c.default("The depth test can not be enabled (drawCommand.renderState.depthTest.enabled) because the framebuffer (drawCommand.framebuffer) does not have a depth or depth-stencil renderbuffer.");V(e,t),U(e,a,i,!1),n._bind(),e._maxFrameTextureUnitIndex=Math.max(e._maxFrameTextureUnitIndex,n.maximumTextureUnitIndex)}(this,r,t,i,o),function(e,t,i,a){var r=t._primitiveType,o=t._vertexArray,s=t._offset,d=t._count,f=t.instanceCount;if(!g.default.validate(r))throw new c.default("drawCommand.primitiveType is required and must be valid.");if(n.a.defined("drawCommand.vertexArray",o),n.a.typeOf.number.greaterThanOrEquals("drawCommand.offset",s,0),Object(u.default)(d)&&n.a.typeOf.number.greaterThanOrEquals("drawCommand.count",d,0),n.a.typeOf.number.greaterThanOrEquals("drawCommand.instanceCount",f,0),f>0&&!e.instancedArrays)throw new c.default("Instanced arrays extension is not supported");e._us.model=Object(l.default)(t._modelMatrix,m.default.IDENTITY),i._setUniforms(a,e._us,e.validateShaderProgram),o._bind();var h=o.indexBuffer;Object(u.default)(h)?(s*=h.bytesPerIndex,d=Object(l.default)(d,h.numberOfIndices),0===f?e._gl.drawElements(r,d,h.indexDatatype,s):e.glDrawElementsInstanced(r,d,h.indexDatatype,s,f)):(d=Object(l.default)(d,o.numberOfVertices),0===f?e._gl.drawArrays(r,s,d):e.glDrawArraysInstanced(r,s,d,f)),o._unBind()}(this,e,i,a)},F.prototype.endFrame=function(){var e=this._gl;e.useProgram(null),this._currentFramebuffer=void 0,e.bindFramebuffer(e.FRAMEBUFFER,null);var t=k;this.drawBuffers&&this.glDrawBuffers(t);var i=this._maxFrameTextureUnitIndex;this._maxFrameTextureUnitIndex=0;for(var n=0;n<i;++n)e.activeTexture(e.TEXTURE0+n),e.bindTexture(e.TEXTURE_2D,null),e.bindTexture(e.TEXTURE_CUBE_MAP,null)},F.prototype.readPixels=function(e){var t=this._gl;e=Object(l.default)(e,l.default.EMPTY_OBJECT);var i=Math.max(Object(l.default)(e.x,0),0),a=Math.max(Object(l.default)(e.y,0),0),r=Object(l.default)(e.width,t.drawingBufferWidth),o=Object(l.default)(e.height,t.drawingBufferHeight),s=e.framebuffer;n.a.typeOf.number.greaterThan("readState.width",r,0),n.a.typeOf.number.greaterThan("readState.height",o,0);var d=C.default.UNSIGNED_BYTE;Object(u.default)(s)&&s.numberOfColorAttachments>0&&(d=s.getColorTexture(0).pixelDatatype);var c=_.default.createTypedArray(_.default.RGBA,d,r,o);return V(this,s),t.readPixels(i,a,r,o,_.default.RGBA,C.default.toWebGLConstant(d,this),c),c};var G={position:0,textureCoordinates:1};function Y(e,t,i){this._pickObjects=e,this.key=t,this.color=i}F.prototype.getViewportQuadVertexArray=function(){var e=this.cache.viewportQuad_vertexArray;if(!Object(u.default)(e)){var t=new f.default({attributes:{position:new h.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:2,values:[-1,-1,1,-1,1,1,-1,1]}),textureCoordinates:new h.default({componentDatatype:o.default.FLOAT,componentsPerAttribute:2,values:[0,0,1,0,1,1,0,1]})},indices:new Uint16Array([0,1,2,0,2,3]),primitiveType:g.default.TRIANGLES});e=j.default.fromGeometry({context:this,geometry:t,attributeLocations:G,bufferUsage:w.default.STATIC_DRAW,interleave:!0}),this.cache.viewportQuad_vertexArray=e}return e},F.prototype.createViewportQuadCommand=function(e,t){return t=Object(l.default)(t,l.default.EMPTY_OBJECT),new T.default({vertexArray:this.getViewportQuadVertexArray(),primitiveType:g.default.TRIANGLES,renderState:t.renderState,shaderProgram:D.default.fromCache({context:this,vertexShaderSource:b.a,fragmentShaderSource:e,attributeLocations:G}),uniformMap:t.uniformMap,owner:t.owner,framebuffer:t.framebuffer,pass:t.pass})},F.prototype.getObjectByPickColor=function(e){return n.a.defined("pickColor",e),this._pickObjects[e.toRgba()]},Object.defineProperties(Y.prototype,{object:{get:function(){return this._pickObjects[this.key]},set:function(e){this._pickObjects[this.key]=e}}}),Y.prototype.destroy=function(){delete this._pickObjects[this.key]},F.prototype.createPickId=function(e){n.a.defined("object",e),++this._nextPickColor[0];var t=this._nextPickColor[0];if(0===t)throw new v.a("Out of unique Pick IDs.");return this._pickObjects[t]=e,new Y(this._pickObjects,t,r.default.fromRgba(t))},F.prototype.isDestroyed=function(){return!1},F.prototype.destroy=function(){var e=this.cache;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];Object(u.default)(i.destroy)&&i.destroy()}return this._shaderCache=this._shaderCache.destroy(),this._textureCache=this._textureCache.destroy(),this._defaultTexture=this._defaultTexture&&this._defaultTexture.destroy(),this._defaultEmissiveTexture=this._defaultEmissiveTexture&&this._defaultEmissiveTexture.destroy(),this._defaultNormalTexture=this._defaultNormalTexture&&this._defaultNormalTexture.destroy(),this._defaultCubeMap=this._defaultCubeMap&&this._defaultCubeMap.destroy(),Object(d.default)(this)},t.a=F},function(e,t,i){"use strict";var n=i(0),a=i(19),r=i(67),o=i(34);function s(e){this._context=e,this._shaders={},this._numberOfShaders=0,this._shadersToRelease={}}function l(e,t){for(var i=t.derivedKeywords,n=i.length,a=0;a<n;++a){var r=i[a]+t.keyword;l(e,e._shaders[r])}delete e._shaders[t.keyword],t.shaderProgram.finalDestroy()}Object.defineProperties(s.prototype,{numberOfShaders:{get:function(){return this._numberOfShaders}}}),s.prototype.replaceShaderProgram=function(e){return Object(n.default)(e.shaderProgram)&&e.shaderProgram.destroy(),this.getShaderProgram(e)},s.prototype.getShaderProgram=function(e){var t=e.vertexShaderSource,i=e.fragmentShaderSource,a=e.attributeLocations;"string"==typeof t&&(t=new o.default({sources:[t]})),"string"==typeof i&&(i=new o.default({sources:[i]}));var s,l=t.createCombinedVertexShader(this._context),u=i.createCombinedFragmentShader(this._context),d=l+u+JSON.stringify(a);if(Object(n.default)(this._shaders[d]))s=this._shaders[d],delete this._shadersToRelease[d];else{var c=this._context,f=new r.default({gl:c._gl,logShaderCompilation:c.logShaderCompilation,debugShaders:c.debugShaders,vertexShaderSource:t,vertexShaderText:l,fragmentShaderSource:i,fragmentShaderText:u,attributeLocations:a});s={cache:this,shaderProgram:f,keyword:d,derivedKeywords:[],count:0},f._cachedShader=s,this._shaders[d]=s,++this._numberOfShaders}return++s.count,s.shaderProgram},s.prototype.replaceDerivedShaderProgram=function(e,t,i){var a=e._cachedShader,r=t+a.keyword,o=this._shaders[r];if(Object(n.default)(o)){l(this,o);var s=a.derivedKeywords.indexOf(t);s>-1&&a.derivedKeywords.splice(s,1)}return this.createDerivedShaderProgram(e,t,i)},s.prototype.getDerivedShaderProgram=function(e,t){var i=t+e._cachedShader.keyword,a=this._shaders[i];if(Object(n.default)(a))return a.shaderProgram},s.prototype.createDerivedShaderProgram=function(e,t,i){var n=e._cachedShader,a=t+n.keyword,s=i.vertexShaderSource,l=i.fragmentShaderSource,u=i.attributeLocations;"string"==typeof s&&(s=new o.default({sources:[s]})),"string"==typeof l&&(l=new o.default({sources:[l]}));var d=this._context,c=s.createCombinedVertexShader(d),f=l.createCombinedFragmentShader(d),h=new r.default({gl:d._gl,logShaderCompilation:d.logShaderCompilation,debugShaders:d.debugShaders,vertexShaderSource:s,vertexShaderText:c,fragmentShaderSource:l,fragmentShaderText:f,attributeLocations:u}),p={cache:this,shaderProgram:h,keyword:a,derivedKeywords:[],count:0};return n.derivedKeywords.push(t),h._cachedShader=p,this._shaders[a]=p,h},s.prototype.destroyReleasedShaderPrograms=function(){var e=this._shadersToRelease;for(var t in e){if(e.hasOwnProperty(t))l(this,e[t]),--this._numberOfShaders}this._shadersToRelease={}},s.prototype.releaseShaderProgram=function(e){if(Object(n.default)(e)){var t=e._cachedShader;t&&0==--t.count&&(this._shadersToRelease[t.keyword]=t)}},s.prototype.isDestroyed=function(){return!1},s.prototype.destroy=function(){var e=this._shaders;for(var t in e)e.hasOwnProperty(t)&&e[t].shaderProgram.finalDestroy();return Object(a.default)(this)},t.a=s},function(e,t,i){"use strict";var n=i(0),a=i(19);function r(){this._textures={},this._numberOfTextures=0,this._texturesToRelease={}}Object.defineProperties(r.prototype,{numberOfTextures:{get:function(){return this._numberOfTextures}}}),r.prototype.getTexture=function(e){var t=this._textures[e];if(Object(n.default)(t))return delete this._texturesToRelease[e],++t.count,t.texture},r.prototype.addTexture=function(e,t){var i={texture:t,count:1};t.finalDestroy=t.destroy;var n=this;t.destroy=function(){0==--i.count&&(n._texturesToRelease[e]=i)},this._textures[e]=i,++this._numberOfTextures},r.prototype.destroyReleasedTextures=function(){var e=this._texturesToRelease;for(var t in e)if(e.hasOwnProperty(t)){var i=e[t];delete this._textures[t],i.texture.finalDestroy(),--this._numberOfTextures}this._texturesToRelease={}},r.prototype.isDestroyed=function(){return!1},r.prototype.destroy=function(){var e=this._textures;for(var t in e)e.hasOwnProperty(t)&&e[t].texture.finalDestroy();return Object(a.default)(this)},t.a=r},function(e,t,i){"use strict";var n=i(41),a=i(8),r=i(1),o=i(16),s=i(22),l=i(7),u=i(2),d=i(0),c=i(15),f=i(100),h=i(5),p=i(12),m=i(6),_=i(79),g=i(403),v=i(52),y=i(13),b=i(376);function w(){this.globeDepthTexture=void 0,this.gamma=void 0,this._viewport=new n.a,this._viewportCartesian4=new o.a,this._viewportDirty=!1,this._viewportOrthographicMatrix=m.default.clone(m.default.IDENTITY),this._viewportTransformation=m.default.clone(m.default.IDENTITY),this._model=m.default.clone(m.default.IDENTITY),this._view=m.default.clone(m.default.IDENTITY),this._inverseView=m.default.clone(m.default.IDENTITY),this._projection=m.default.clone(m.default.IDENTITY),this._infiniteProjection=m.default.clone(m.default.IDENTITY),this._entireFrustum=new a.default,this._currentFrustum=new a.default,this._frustumPlanes=new o.a,this._farDepthFromNearPlusOne=void 0,this._log2FarDepthFromNearPlusOne=void 0,this._oneOverLog2FarDepthFromNearPlusOne=void 0,this._frameState=void 0,this._temeToPseudoFixed=p.default.clone(m.default.IDENTITY),this._view3DDirty=!0,this._view3D=new m.default,this._inverseView3DDirty=!0,this._inverseView3D=new m.default,this._inverseModelDirty=!0,this._inverseModel=new m.default,this._inverseTransposeModelDirty=!0,this._inverseTransposeModel=new p.default,this._viewRotation=new p.default,this._inverseViewRotation=new p.default,this._viewRotation3D=new p.default,this._inverseViewRotation3D=new p.default,this._inverseProjectionDirty=!0,this._inverseProjection=new m.default,this._modelViewDirty=!0,this._modelView=new m.default,this._modelView3DDirty=!0,this._modelView3D=new m.default,this._modelViewRelativeToEyeDirty=!0,this._modelViewRelativeToEye=new m.default,this._inverseModelViewDirty=!0,this._inverseModelView=new m.default,this._inverseModelView3DDirty=!0,this._inverseModelView3D=new m.default,this._viewProjectionDirty=!0,this._viewProjection=new m.default,this._inverseViewProjectionDirty=!0,this._inverseViewProjection=new m.default,this._modelViewProjectionDirty=!0,this._modelViewProjection=new m.default,this._inverseModelViewProjectionDirty=!0,this._inverseModelViewProjection=new m.default,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewProjectionRelativeToEye=new m.default,this._modelViewInfiniteProjectionDirty=!0,this._modelViewInfiniteProjection=new m.default,this._normalDirty=!0,this._normal=new p.default,this._normal3DDirty=!0,this._normal3D=new p.default,this._inverseNormalDirty=!0,this._inverseNormal=new p.default,this._inverseNormal3DDirty=!0,this._inverseNormal3D=new p.default,this._encodedCameraPositionMCDirty=!0,this._encodedCameraPositionMC=new f.a,this._cameraPosition=new r.default,this._sunPositionWC=new r.default,this._sunPositionColumbusView=new r.default,this._sunDirectionWC=new r.default,this._sunDirectionEC=new r.default,this._moonDirectionEC=new r.default,this._lightDirectionWC=new r.default,this._lightDirectionEC=new r.default,this._lightColor=new r.default,this._lightColorHdr=new r.default,this._pass=void 0,this._mode=void 0,this._mapProjection=void 0,this._ellipsoid=void 0,this._cameraDirection=new r.default,this._cameraRight=new r.default,this._cameraUp=new r.default,this._frustum2DWidth=0,this._eyeHeight=0,this._eyeHeight2D=new a.default,this._pixelRatio=1,this._orthographicIn3D=!1,this._backgroundColor=new l.default,this._brdfLut=void 0,this._environmentMap=void 0,this._sphericalHarmonicCoefficients=void 0,this._specularEnvironmentMaps=void 0,this._specularEnvironmentMapsDimensions=new a.default,this._specularEnvironmentMapsMaximumLOD=void 0,this._fogDensity=void 0,this._invertClassificationColor=void 0,this._imagerySplitPosition=0,this._pixelSizePerMeter=void 0,this._geometricToleranceOverMeter=void 0,this._minimumDisableDepthTestDistance=void 0}Object.defineProperties(w.prototype,{frameState:{get:function(){return this._frameState}},viewport:{get:function(){return this._viewport},set:function(e){if(!n.a.equals(e,this._viewport)){n.a.clone(e,this._viewport);var t=this._viewport,i=this._viewportCartesian4;i.x=t.x,i.y=t.y,i.z=t.width,i.w=t.height,this._viewportDirty=!0}}},viewportCartesian4:{get:function(){return this._viewportCartesian4}},viewportOrthographic:{get:function(){return E(this),this._viewportOrthographicMatrix}},viewportTransformation:{get:function(){return E(this),this._viewportTransformation}},model:{get:function(){return this._model},set:function(e){m.default.clone(e,this._model),this._modelView3DDirty=!0,this._inverseModelView3DDirty=!0,this._inverseModelDirty=!0,this._inverseTransposeModelDirty=!0,this._modelViewDirty=!0,this._inverseModelViewDirty=!0,this._modelViewRelativeToEyeDirty=!0,this._inverseModelViewDirty=!0,this._modelViewProjectionDirty=!0,this._inverseModelViewProjectionDirty=!0,this._modelViewProjectionRelativeToEyeDirty=!0,this._modelViewInfiniteProjectionDirty=!0,this._normalDirty=!0,this._inverseNormalDirty=!0,this._normal3DDirty=!0,this._inverseNormal3DDirty=!0,this._encodedCameraPositionMCDirty=!0}},inverseModel:{get:function(){return this._inverseModelDirty&&(this._inverseModelDirty=!1,m.default.inverse(this._model,this._inverseModel)),this._inverseModel}},inverseTransposeModel:{get:function(){var e=this._inverseTransposeModel;return this._inverseTransposeModelDirty&&(this._inverseTransposeModelDirty=!1,m.default.getMatrix3(this.inverseModel,e),p.default.transpose(e,e)),e}},view:{get:function(){return this._view}},view3D:{get:function(){return N(this),this._view3D}},viewRotation:{get:function(){return N(this),this._viewRotation}},viewRotation3D:{get:function(){return N(this),this._viewRotation3D}},inverseView:{get:function(){return this._inverseView}},inverseView3D:{get:function(){return B(this),this._inverseView3D}},inverseViewRotation:{get:function(){return this._inverseViewRotation}},inverseViewRotation3D:{get:function(){return B(this),this._inverseViewRotation3D}},projection:{get:function(){return this._projection}},inverseProjection:{get:function(){var e;return(e=this)._inverseProjectionDirty&&(e._inverseProjectionDirty=!1,e._mode===y.default.SCENE2D||e._mode===y.default.MORPHING||e._orthographicIn3D?m.default.clone(m.default.ZERO,e._inverseProjection):m.default.inverse(e._projection,e._inverseProjection)),this._inverseProjection}},infiniteProjection:{get:function(){return this._infiniteProjection}},modelView:{get:function(){var e;return(e=this)._modelViewDirty&&(e._modelViewDirty=!1,m.default.multiplyTransformation(e._view,e._model,e._modelView)),this._modelView}},modelView3D:{get:function(){var e;return(e=this)._modelView3DDirty&&(e._modelView3DDirty=!1,m.default.multiplyTransformation(e.view3D,e._model,e._modelView3D)),this._modelView3D}},modelViewRelativeToEye:{get:function(){return function(e){if(e._modelViewRelativeToEyeDirty){e._modelViewRelativeToEyeDirty=!1;var t=e.modelView,i=e._modelViewRelativeToEye;i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i[6]=t[6],i[7]=t[7],i[8]=t[8],i[9]=t[9],i[10]=t[10],i[11]=t[11],i[12]=0,i[13]=0,i[14]=0,i[15]=t[15]}}(this),this._modelViewRelativeToEye}},inverseModelView:{get:function(){var e;return(e=this)._inverseModelViewDirty&&(e._inverseModelViewDirty=!1,m.default.inverse(e.modelView,e._inverseModelView)),this._inverseModelView}},inverseModelView3D:{get:function(){var e;return(e=this)._inverseModelView3DDirty&&(e._inverseModelView3DDirty=!1,m.default.inverse(e.modelView3D,e._inverseModelView3D)),this._inverseModelView3D}},viewProjection:{get:function(){var e;return(e=this)._viewProjectionDirty&&(e._viewProjectionDirty=!1,m.default.multiply(e._projection,e._view,e._viewProjection)),this._viewProjection}},inverseViewProjection:{get:function(){var e;return(e=this)._inverseViewProjectionDirty&&(e._inverseViewProjectionDirty=!1,m.default.inverse(e.viewProjection,e._inverseViewProjection)),this._inverseViewProjection}},modelViewProjection:{get:function(){var e;return(e=this)._modelViewProjectionDirty&&(e._modelViewProjectionDirty=!1,m.default.multiply(e._projection,e.modelView,e._modelViewProjection)),this._modelViewProjection}},inverseModelViewProjection:{get:function(){var e;return(e=this)._inverseModelViewProjectionDirty&&(e._inverseModelViewProjectionDirty=!1,m.default.inverse(e.modelViewProjection,e._inverseModelViewProjection)),this._inverseModelViewProjection}},modelViewProjectionRelativeToEye:{get:function(){var e;return(e=this)._modelViewProjectionRelativeToEyeDirty&&(e._modelViewProjectionRelativeToEyeDirty=!1,m.default.multiply(e._projection,e.modelViewRelativeToEye,e._modelViewProjectionRelativeToEye)),this._modelViewProjectionRelativeToEye}},modelViewInfiniteProjection:{get:function(){var e;return(e=this)._modelViewInfiniteProjectionDirty&&(e._modelViewInfiniteProjectionDirty=!1,m.default.multiply(e._infiniteProjection,e.modelView,e._modelViewInfiniteProjection)),this._modelViewInfiniteProjection}},normal:{get:function(){return function(e){if(e._normalDirty){e._normalDirty=!1;var t=e._normal;m.default.getMatrix3(e.inverseModelView,t),p.default.getRotation(t,t),p.default.transpose(t,t)}}(this),this._normal}},normal3D:{get:function(){return function(e){if(e._normal3DDirty){e._normal3DDirty=!1;var t=e._normal3D;m.default.getMatrix3(e.inverseModelView3D,t),p.default.getRotation(t,t),p.default.transpose(t,t)}}(this),this._normal3D}},inverseNormal:{get:function(){var e;return(e=this)._inverseNormalDirty&&(e._inverseNormalDirty=!1,m.default.getMatrix3(e.inverseModelView,e._inverseNormal),p.default.getRotation(e._inverseNormal,e._inverseNormal)),this._inverseNormal}},inverseNormal3D:{get:function(){var e;return(e=this)._inverseNormal3DDirty&&(e._inverseNormal3DDirty=!1,m.default.getMatrix3(e.inverseModelView3D,e._inverseNormal3D),p.default.getRotation(e._inverseNormal3D,e._inverseNormal3D)),this._inverseNormal3D}},entireFrustum:{get:function(){return this._entireFrustum}},currentFrustum:{get:function(){return this._currentFrustum}},frustumPlanes:{get:function(){return this._frustumPlanes}},farDepthFromNearPlusOne:{get:function(){return this._farDepthFromNearPlusOne}},log2FarDepthFromNearPlusOne:{get:function(){return this._log2FarDepthFromNearPlusOne}},oneOverLog2FarDepthFromNearPlusOne:{get:function(){return this._oneOverLog2FarDepthFromNearPlusOne}},eyeHeight:{get:function(){return this._eyeHeight}},eyeHeight2D:{get:function(){return this._eyeHeight2D}},sunPositionWC:{get:function(){return this._sunPositionWC}},sunPositionColumbusView:{get:function(){return this._sunPositionColumbusView}},sunDirectionWC:{get:function(){return this._sunDirectionWC}},sunDirectionEC:{get:function(){return this._sunDirectionEC}},moonDirectionEC:{get:function(){return this._moonDirectionEC}},lightDirectionWC:{get:function(){return this._lightDirectionWC}},lightDirectionEC:{get:function(){return this._lightDirectionEC}},lightColor:{get:function(){return this._lightColor}},lightColorHdr:{get:function(){return this._lightColorHdr}},encodedCameraPositionMCHigh:{get:function(){return S(this),this._encodedCameraPositionMC.high}},encodedCameraPositionMCLow:{get:function(){return S(this),this._encodedCameraPositionMC.low}},temeToPseudoFixedMatrix:{get:function(){return this._temeToPseudoFixed}},pixelRatio:{get:function(){return this._pixelRatio}},fogDensity:{get:function(){return this._fogDensity}},geometricToleranceOverMeter:{get:function(){return this._geometricToleranceOverMeter}},pass:{get:function(){return this._pass}},backgroundColor:{get:function(){return this._backgroundColor}},brdfLut:{get:function(){return this._brdfLut}},environmentMap:{get:function(){return this._environmentMap}},sphericalHarmonicCoefficients:{get:function(){return this._sphericalHarmonicCoefficients}},specularEnvironmentMaps:{get:function(){return this._specularEnvironmentMaps}},specularEnvironmentMapsDimensions:{get:function(){return this._specularEnvironmentMapsDimensions}},specularEnvironmentMapsMaximumLOD:{get:function(){return this._specularEnvironmentMapsMaximumLOD}},imagerySplitPosition:{get:function(){return this._imagerySplitPosition}},minimumDisableDepthTestDistance:{get:function(){return this._minimumDisableDepthTestDistance}},invertClassificationColor:{get:function(){return this._invertClassificationColor}},orthographicIn3D:{get:function(){return this._orthographicIn3D}},ellipsoid:{get:function(){return Object(u.default)(this._ellipsoid,c.default.WGS84)}}});var O=new p.default,x=new s.default;w.prototype.updateCamera=function(e){var t,i;t=this,i=e.viewMatrix,m.default.clone(i,t._view),m.default.getMatrix3(i,t._viewRotation),t._view3DDirty=!0,t._inverseView3DDirty=!0,t._modelViewDirty=!0,t._modelView3DDirty=!0,t._modelViewRelativeToEyeDirty=!0,t._inverseModelViewDirty=!0,t._inverseModelView3DDirty=!0,t._viewProjectionDirty=!0,t._inverseViewProjectionDirty=!0,t._modelViewProjectionDirty=!0,t._modelViewProjectionRelativeToEyeDirty=!0,t._modelViewInfiniteProjectionDirty=!0,t._normalDirty=!0,t._inverseNormalDirty=!0,t._normal3DDirty=!0,t._inverseNormal3DDirty=!0,function(e,t){m.default.clone(t,e._inverseView),m.default.getMatrix3(t,e._inverseViewRotation)}(this,e.inverseViewMatrix),function(e,t){r.default.clone(t.positionWC,e._cameraPosition),r.default.clone(t.directionWC,e._cameraDirection),r.default.clone(t.rightWC,e._cameraRight),r.default.clone(t.upWC,e._cameraUp);var i=t.positionCartographic;Object(d.default)(i)?e._eyeHeight=i.height:e._eyeHeight=-e._ellipsoid.maximumRadius,e._encodedCameraPositionMCDirty=!0}(this,e),this._entireFrustum.x=e.frustum.near,this._entireFrustum.y=e.frustum.far,this.updateFrustum(e.frustum),this._orthographicIn3D=this._mode!==y.default.SCENE2D&&e.frustum instanceof _.a},w.prototype.updateFrustum=function(e){var t,i;t=this,i=e.projectionMatrix,m.default.clone(i,t._projection),t._inverseProjectionDirty=!0,t._viewProjectionDirty=!0,t._inverseViewProjectionDirty=!0,t._modelViewProjectionDirty=!0,t._modelViewProjectionRelativeToEyeDirty=!0,Object(d.default)(e.infiniteProjectionMatrix)&&function(e,t){m.default.clone(t,e._infiniteProjection),e._modelViewInfiniteProjectionDirty=!0}(this,e.infiniteProjectionMatrix),this._currentFrustum.x=e.near,this._currentFrustum.y=e.far,this._farDepthFromNearPlusOne=e.far-e.near+1,this._log2FarDepthFromNearPlusOne=h.default.log2(this._farDepthFromNearPlusOne),this._oneOverLog2FarDepthFromNearPlusOne=1/this._log2FarDepthFromNearPlusOne,Object(d.default)(e._offCenterFrustum)&&(e=e._offCenterFrustum),this._frustumPlanes.x=e.top,this._frustumPlanes.y=e.bottom,this._frustumPlanes.z=e.left,this._frustumPlanes.w=e.right},w.prototype.updatePass=function(e){this._pass=e};var A=[],T=new b.a;function E(e){if(e._viewportDirty){var t=e._viewport;m.default.computeOrthographicOffCenter(t.x,t.x+t.width,t.y,t.y+t.height,0,1,e._viewportOrthographicMatrix),m.default.computeViewportTransformation(t,0,1,e._viewportTransformation),e._viewportDirty=!1}}w.prototype.update=function(e){this._mode=e.mode,this._mapProjection=e.mapProjection,this._ellipsoid=e.mapProjection.ellipsoid,this._pixelRatio=e.pixelRatio;var t=e.camera;this.updateCamera(t),e.mode===y.default.SCENE2D?(this._frustum2DWidth=t.frustum.right-t.frustum.left,this._eyeHeight2D.x=.5*this._frustum2DWidth,this._eyeHeight2D.y=this._eyeHeight2D.x*this._eyeHeight2D.x):(this._frustum2DWidth=0,this._eyeHeight2D.x=0,this._eyeHeight2D.y=0),function(e,t){Object(d.default)(v.default.computeIcrfToFixedMatrix(t.time,O))||(O=v.default.computeTemeToPseudoFixedMatrix(t.time,O));var i=g.a.computeSunPositionInEarthInertialFrame(t.time,e._sunPositionWC);p.default.multiplyByVector(O,i,i),r.default.normalize(i,e._sunDirectionWC),i=p.default.multiplyByVector(e.viewRotation3D,i,e._sunDirectionEC),r.default.normalize(i,i),i=g.a.computeMoonPositionInEarthInertialFrame(t.time,e._moonDirectionEC),p.default.multiplyByVector(O,i,i),p.default.multiplyByVector(e.viewRotation3D,i,i),r.default.normalize(i,i);var n=t.mapProjection,a=n.ellipsoid.cartesianToCartographic(e._sunPositionWC,x);n.project(a,e._sunPositionColumbusView)}(this,e);var i=Object(u.default)(e.light,T);i instanceof b.a?(this._lightDirectionWC=r.default.clone(this._sunDirectionWC,this._lightDirectionWC),this._lightDirectionEC=r.default.clone(this._sunDirectionEC,this._lightDirectionEC)):(this._lightDirectionWC=r.default.normalize(r.default.negate(i.direction,this._lightDirectionWC),this._lightDirectionWC),this._lightDirectionEC=p.default.multiplyByVector(this.viewRotation3D,this._lightDirectionWC,this._lightDirectionEC));var n=i.color,o=r.default.fromElements(n.red,n.green,n.blue,this._lightColorHdr);o=r.default.multiplyByScalar(o,i.intensity,o);var s=r.default.maximumComponent(o);s>1?r.default.divideByScalar(o,s,this._lightColor):r.default.clone(o,this._lightColor);var c=e.brdfLutGenerator,f=Object(d.default)(c)?c.colorTexture:void 0;this._brdfLut=f,this._environmentMap=Object(u.default)(e.environmentMap,e.context.defaultCubeMap),this._sphericalHarmonicCoefficients=Object(u.default)(e.sphericalHarmonicCoefficients,A),this._specularEnvironmentMaps=e.specularEnvironmentMaps,this._specularEnvironmentMapsMaximumLOD=e.specularEnvironmentMapsMaximumLOD,Object(d.default)(this._specularEnvironmentMaps)&&a.default.clone(this._specularEnvironmentMaps.dimensions,this._specularEnvironmentMapsDimensions),this._fogDensity=e.fog.density,this._invertClassificationColor=e.invertClassificationColor,this._frameState=e,this._temeToPseudoFixed=v.default.computeTemeToPseudoFixedMatrix(e.time,this._temeToPseudoFixed),this._imagerySplitPosition=e.imagerySplitPosition*e.context.drawingBufferWidth;var h,m=t.frustum.fov,_=this._viewport;h=Object(d.default)(m)?_.height>_.width?2*Math.tan(.5*m)/_.height:2*Math.tan(.5*m)/_.width:1/Math.max(_.width,_.height),this._geometricToleranceOverMeter=h*e.maximumScreenSpaceError,l.default.clone(e.backgroundColor,this._backgroundColor),this._minimumDisableDepthTestDistance=e.minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance*=this._minimumDisableDepthTestDistance,this._minimumDisableDepthTestDistance===Number.POSITIVE_INFINITY&&(this._minimumDisableDepthTestDistance=-1)};var C=new r.default;function S(e){e._encodedCameraPositionMCDirty&&(e._encodedCameraPositionMCDirty=!1,m.default.multiplyByPoint(e.inverseModel,e._cameraPosition,C),f.a.fromCartesian(C,e._encodedCameraPositionMC))}var M=new r.default,D=new r.default,P=new r.default,I=new r.default,L=new s.default,j=new r.default,R=new m.default;function N(e){e._view3DDirty&&(e._mode===y.default.SCENE3D?m.default.clone(e._view,e._view3D):function(e,t,i,n,a,o,s,l){var u=M;u.x=e.y,u.y=e.z,u.z=e.x;var c=D;c.x=i.y,c.y=i.z,c.z=i.x;var f=P;f.x=n.y,f.y=n.z,f.z=n.x;var p=I;p.x=t.y,p.y=t.z,p.z=t.x,o===y.default.SCENE2D&&(u.z=.5*a);var _=s.unproject(u,L);_.longitude=h.default.clamp(_.longitude,-Math.PI,Math.PI),_.latitude=h.default.clamp(_.latitude,-h.default.PI_OVER_TWO,h.default.PI_OVER_TWO);var g=s.ellipsoid,b=g.cartographicToCartesian(_,j),w=v.default.eastNorthUpToFixedFrame(b,g,R);m.default.multiplyByPointAsVector(w,c,c),m.default.multiplyByPointAsVector(w,f,f),m.default.multiplyByPointAsVector(w,p,p),Object(d.default)(l)||(l=new m.default),l[0]=c.x,l[1]=f.x,l[2]=-p.x,l[3]=0,l[4]=c.y,l[5]=f.y,l[6]=-p.y,l[7]=0,l[8]=c.z,l[9]=f.z,l[10]=-p.z,l[11]=0,l[12]=-r.default.dot(c,b),l[13]=-r.default.dot(f,b),l[14]=r.default.dot(p,b),l[15]=1}(e._cameraPosition,e._cameraDirection,e._cameraRight,e._cameraUp,e._frustum2DWidth,e._mode,e._mapProjection,e._view3D),m.default.getMatrix3(e._view3D,e._viewRotation3D),e._view3DDirty=!1)}function B(e){e._inverseView3DDirty&&(m.default.inverseTransformation(e.view3D,e._inverseView3D),m.default.getMatrix3(e._inverseView3D,e._inverseViewRotation3D),e._inverseView3DDirty=!1)}t.a=w},function(e,t,i){"use strict";var n=i(41),a=i(0),r=i(19),o=i(33),s=i(91),l=i(32),u=i(39),d=i(58),c=i(45),f=i(769);function h(){this._framebuffer=void 0,this._colorTexture=void 0,this._drawCommand=void 0}Object.defineProperties(h.prototype,{colorTexture:{get:function(){return this._colorTexture}}}),h.prototype.update=function(e){if(!Object(a.default)(this._colorTexture)){var t=e.context;!function(e,t){var i=new c.default({context:t,width:256,height:256,pixelFormat:o.default.RGBA,pixelDatatype:l.default.UNSIGNED_BYTE,sampler:d.default.NEAREST});e._colorTexture=i;var n=new s.default({context:t,colorTextures:[i],destroyAttachments:!1});e._framebuffer=n}(this,t),function(e,t){var i=e._framebuffer,a=t.createViewportQuadCommand(f.a,{framebuffer:i,renderState:u.default.fromCache({viewport:new n.a(0,0,256,256)})});e._drawCommand=a}(this,t),this._drawCommand.execute(t),this._framebuffer=this._framebuffer&&this._framebuffer.destroy(),this._drawCommand.shaderProgram=this._drawCommand.shaderProgram&&this._drawCommand.shaderProgram.destroy()}},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){return this._colorTexture=this._colorTexture&&this._colorTexture.destroy(),Object(r.default)(this)},t.a=h},function(e,t,i){"use strict";t.a="varying vec2 v_textureCoordinates;\nconst float M_PI = 3.141592653589793;\n\nfloat vdcRadicalInverse(int i)\n{\n float r;\n float base = 2.0;\n float value = 0.0;\n float invBase = 1.0 / base;\n float invBi = invBase;\n for (int x = 0; x < 100; x++)\n {\n if (i <= 0)\n {\n break;\n }\n r = mod(float(i), base);\n value += r * invBi;\n invBi *= invBase;\n i = int(float(i) * invBase);\n }\n return value;\n}\n\nvec2 hammersley2D(int i, int N)\n{\n return vec2(float(i) / float(N), vdcRadicalInverse(i));\n}\n\nvec3 importanceSampleGGX(vec2 xi, float roughness, vec3 N)\n{\n float a = roughness * roughness;\n float phi = 2.0 * M_PI * xi.x;\n float cosTheta = sqrt((1.0 - xi.y) / (1.0 + (a * a - 1.0) * xi.y));\n float sinTheta = sqrt(1.0 - cosTheta * cosTheta);\n vec3 H = vec3(sinTheta * cos(phi), sinTheta * sin(phi), cosTheta);\n vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);\n vec3 tangentX = normalize(cross(upVector, N));\n vec3 tangentY = cross(N, tangentX);\n return tangentX * H.x + tangentY * H.y + N * H.z;\n}\n\nfloat G1_Smith(float NdotV, float k)\n{\n return NdotV / (NdotV * (1.0 - k) + k);\n}\n\nfloat G_Smith(float roughness, float NdotV, float NdotL)\n{\n float k = roughness * roughness / 2.0;\n return G1_Smith(NdotV, k) * G1_Smith(NdotL, k);\n}\n\nvec2 integrateBrdf(float roughness, float NdotV)\n{\n vec3 V = vec3(sqrt(1.0 - NdotV * NdotV), 0.0, NdotV);\n float A = 0.0;\n float B = 0.0;\n const int NumSamples = 1024;\n for (int i = 0; i < NumSamples; i++)\n {\n vec2 xi = hammersley2D(i, NumSamples);\n vec3 H = importanceSampleGGX(xi, roughness, vec3(0.0, 0.0, 1.0));\n vec3 L = 2.0 * dot(V, H) * H - V;\n float NdotL = clamp(L.z, 0.0, 1.0);\n float NdotH = clamp(H.z, 0.0, 1.0);\n float VdotH = clamp(dot(V, H), 0.0, 1.0);\n if (NdotL > 0.0)\n {\n float G = G_Smith(roughness, NdotV, NdotL);\n float G_Vis = G * VdotH / (NdotH * NdotV);\n float Fc = pow(1.0 - VdotH, 5.0);\n A += (1.0 - Fc) * G_Vis;\n B += Fc * G_Vis;\n }\n }\n return vec2(A, B) / float(NumSamples);\n}\n\nvoid main()\n{\n gl_FragColor = vec4(integrateBrdf(v_textureCoordinates.y, v_textureCoordinates.x), 0.0, 1.0);\n}\n"},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(22),o=i(2),s=i(0),l=i(3),u=i(182),d=i(5),c=i(119),f=i(241),h=i(13),p={};var m=new a.default,_=new a.default;function g(e,t,i,n){if(Object(s.default)(n)&&i(.5)>n){var a=i(0),r=i(1),o=i(.5),l=o-a,u=o-r;return function(n){var o=i(n);if(n<=.5){var s=(o-a)/l;return d.default.lerp(e,-d.default.PI_OVER_TWO,s)}var c=(o-r)/u;return d.default.lerp(-d.default.PI_OVER_TWO,t,1-c)}}return function(i){return d.default.lerp(e,t,i)}}function v(e,t,i,n,r){var o=r,l=Math.max(i,n);if(!Object(s.default)(o)){var u=e.position,h=t,p=e.up,g=e.right,v=e.frustum,y=a.default.subtract(u,h,m),b=a.default.magnitude(a.default.multiplyByScalar(p,a.default.dot(y,p),_)),w=a.default.magnitude(a.default.multiplyByScalar(g,a.default.dot(y,g),_));o=Math.min(.2*function(e,t,i){var n,a,r;if(e instanceof c.default){var o=Math.tan(.5*e.fovy);return n=e.near,a=e.near*o,r=e.aspectRatio*a,Math.max(t*n/r,i*n/a)}return e instanceof f.a?(n=e.near,a=e.top,r=e.right,Math.max(t*n/r,i*n/a)):Math.max(t,i)}(v,b,w),1e9)}if(l<o){var O=-Math.pow(1e6*(o-i),1/8),x=Math.pow(1e6*(o-n),1/8);return function(e){var t=e*(x-O)+O;return-Math.pow(t,8)/1e6+o}}return function(e){return d.default.lerp(i,n,e)}}function y(e,t){return d.default.equalsEpsilon(e,d.default.TWO_PI,d.default.EPSILON11)&&(e=0),t>e+Math.PI?e+=d.default.TWO_PI:t<e-Math.PI&&(e-=d.default.TWO_PI),e}var b=new a.default;function w(e,t,i,r,o,s,l,u){var c=e.camera,f=a.default.clone(c.position,b),h=c.pitch,p=y(c.heading,r),m=y(c.roll,s),_=v(c,i,f.z,i.z,l),w=g(h,o,_,u);return function(e){var a=e.time/t;c.setView({orientation:{heading:d.default.lerp(p,r,a),pitch:w(a),roll:d.default.lerp(m,s,a)}}),n.default.lerp(f,i,a,c.position),c.position.z=_(a)}}var O=new r.default,x=new r.default;function A(e,t,i,n,o,l,u,c,f,h){var p=e.camera,m=e.mapProjection.ellipsoid,_=r.default.clone(p.positionCartographic,O),b=p.pitch,w=y(p.heading,n),A=y(p.roll,l),T=m.cartesianToCartographic(i,x);_.longitude=d.default.zeroToTwoPi(_.longitude),T.longitude=d.default.zeroToTwoPi(T.longitude);var E=!1;if(Object(s.default)(c)){var C=d.default.zeroToTwoPi(c),S=Math.min(_.longitude,T.longitude),M=Math.max(_.longitude,T.longitude),D=C>=S&&C<=M;if(Object(s.default)(f)){var P=Math.abs(_.longitude-T.longitude),I=d.default.TWO_PI-P;(D?P:I)<(D?I:P)*f&&!D&&(E=!0)}else D||(E=!0)}E?function(e,t){e.longitude<t.longitude?e.longitude+=d.default.TWO_PI:t.longitude+=d.default.TWO_PI}(_,T):function(e,t){var i=e.longitude-t.longitude;i<-d.default.PI?e.longitude+=d.default.TWO_PI:i>d.default.PI&&(t.longitude+=d.default.TWO_PI)}(_,T);var L,j,R,N,B=v(p,i,_.height,T.height,u),F=g(b,o,B,h);return L=_.longitude,j=T.longitude,R=_.latitude,N=T.latitude,function(e){var i=e.time/t,r=a.default.fromRadians(d.default.lerp(L,j,i),d.default.lerp(R,N,i),B(i),m);p.setView({destination:r,orientation:{heading:d.default.lerp(w,n,i),pitch:F(i),roll:d.default.lerp(A,l,i)}})}}function T(e,t,i,r,o,s,l){var u=e.camera,c=a.default.clone(u.position,b),f=y(u.heading,r),h=u.frustum.right-u.frustum.left,p=v(u,i,h,i.z,l);return function(e){var a=e.time/t;u.setView({orientation:{heading:d.default.lerp(f,r,a)}}),n.default.lerp(c,i,a,u.position);var o=p(a),s=u.frustum,l=s.top/s.right,h=.5*(o-(s.right-s.left));s.right+=h,s.left-=h,s.top=l*s.right,s.bottom=-s.top}}var E=new r.default,C=new a.default;function S(e,t){return{startObject:{},stopObject:{},duration:0,complete:e,cancel:t}}function M(e,t){return function(){"function"==typeof t&&t(),e.enableInputs=!0}}p.createTween=function(e,t){var i=(t=Object(o.default)(t,o.default.EMPTY_OBJECT)).destination;if(!Object(s.default)(e))throw new l.default("scene is required.");if(!Object(s.default)(i))throw new l.default("destination is required.");var r=e.mode;if(r===h.default.MORPHING)return S();var c=Object(o.default)(t.convert,!0),f=e.mapProjection,p=f.ellipsoid,m=t.maximumHeight,_=t.flyOverLongitude,g=t.flyOverLongitudeWeight,v=t.pitchAdjustHeight,y=t.easingFunction;c&&r!==h.default.SCENE3D&&(p.cartesianToCartographic(i,E),i=f.project(E,C));var b=e.camera,O=t.endTransform;Object(s.default)(O)&&b._setTransform(O);var x=t.duration;Object(s.default)(x)||(x=Math.ceil(a.default.distance(b.position,i)/1e6)+2,x=Math.min(x,3));var D=Object(o.default)(t.heading,0),P=Object(o.default)(t.pitch,-d.default.PI_OVER_TWO),I=Object(o.default)(t.roll,0),L=e.screenSpaceCameraController;L.enableInputs=!1;var j=M(L,t.complete),R=M(L,t.cancel),N=b.frustum,B=e.mode===h.default.SCENE2D;if(B=(B=(B=(B=B&&n.default.equalsEpsilon(b.position,i,d.default.EPSILON6))&&d.default.equalsEpsilon(Math.max(N.right-N.left,N.top-N.bottom),i.z,d.default.EPSILON6))||e.mode!==h.default.SCENE2D&&a.default.equalsEpsilon(i,b.position,d.default.EPSILON10))&&d.default.equalsEpsilon(d.default.negativePiToPi(D),d.default.negativePiToPi(b.heading),d.default.EPSILON10)&&d.default.equalsEpsilon(d.default.negativePiToPi(P),d.default.negativePiToPi(b.pitch),d.default.EPSILON10)&&d.default.equalsEpsilon(d.default.negativePiToPi(I),d.default.negativePiToPi(b.roll),d.default.EPSILON10))return S(j,R);var F=new Array(4);if(F[h.default.SCENE2D]=T,F[h.default.SCENE3D]=A,F[h.default.COLUMBUS_VIEW]=w,x<=0){return S((function(){F[r](e,1,i,D,P,I,m,_,g,v)({time:1}),"function"==typeof j&&j()}),R)}var k=F[r](e,x,i,D,P,I,m,_,g,v);if(!Object(s.default)(y)){var z=b.positionCartographic.height;y=z>(r===h.default.SCENE3D?p.cartesianToCartographic(i).height:i.z)&&z>11500?u.a.CUBIC_OUT:u.a.QUINTIC_IN_OUT}return{duration:x,easingFunction:y,startObject:{time:0},stopObject:{time:x},update:k,complete:j,cancel:R}},t.a=p},function(e,t,i){"use strict";var n=i(47),a=i(77),r=i(4),o=i(75),s=i(2),l=i(0),u=i(19),d=i(115);var c;function f(e){var t=document.createElement("span");return t.textContent=e,t.className="cesium-credit-delimiter",t}function h(e,t){if(Object(l.default)(t)){var i=document.createElement(t);i._creditId=e._creditId,i.appendChild(e),e=i}return e}function p(e,t,i,n){for(var a=e.childNodes,r=-1,o=0;o<t.length;++o){var s=t[o];if(Object(l.default)(s)){if(r=o,Object(l.default)(i)&&(r*=2,o>0)){var u=r-1;if(a.length<=u)e.appendChild(f(i));else{var d=a[u];"cesium-credit-delimiter"!==d.className&&e.replaceChild(f(i),d)}}var c=s.element;if(a.length<=r)e.appendChild(h(c,n));else{var p=a[r];p._creditId!==s._id&&e.replaceChild(h(c,n),p)}}}for(++r;r<a.length;)e.removeChild(a[r])}function m(e,t){var i=e+" {";for(var n in t)t.hasOwnProperty(n)&&(i+=n+": "+t[n]+"; ");return i+=" }\n"}function _(e,t,i){r.a.defined("container",e);var a=this;i=Object(s.default)(i,document.body);var l=document.createElement("div");l.className="cesium-credit-lightbox-overlay",i.appendChild(l);var u=document.createElement("div");function d(e){u.contains(e.target)||a.hideLightbox()}u.className="cesium-credit-lightbox",l.appendChild(u),l.addEventListener("click",d,!1);var c=document.createElement("div");c.className="cesium-credit-lightbox-title",c.textContent="Data provided by:",u.appendChild(c);var f=document.createElement("a");f.onclick=this.hideLightbox.bind(this),f.innerHTML="×",f.className="cesium-credit-lightbox-close",u.appendChild(f);var h=document.createElement("ul");u.appendChild(h);var p=document.createElement("div");p.className="cesium-credit-logoContainer",p.style.display="inline",e.appendChild(p);var g=document.createElement("div");g.className="cesium-credit-textContainer",g.style.display="inline",e.appendChild(g);var v=document.createElement("a");v.className="cesium-credit-expand-link",v.onclick=this.showLightbox.bind(this),v.textContent="Data attribution",e.appendChild(v),function(){var e="";e+=m(".cesium-credit-lightbox-overlay",{display:"none","z-index":"1",position:"absolute",top:"0",left:"0",width:"100%",height:"100%","background-color":"rgba(80, 80, 80, 0.8)"}),e+=m(".cesium-credit-lightbox",{"background-color":"#303336",color:"#ffffff",position:"relative","min-height":"100px",margin:"auto"}),e+=m(".cesium-credit-lightbox > ul > li a, .cesium-credit-lightbox > ul > li a:visited",{color:"#ffffff"}),e+=m(".cesium-credit-lightbox > ul > li a:hover",{color:"#48b"}),e+=m(".cesium-credit-lightbox.cesium-credit-lightbox-expanded",{border:"1px solid #444","border-radius":"5px","max-width":"370px"}),e+=m(".cesium-credit-lightbox.cesium-credit-lightbox-mobile",{height:"100%",width:"100%"}),e+=m(".cesium-credit-lightbox-title",{padding:"20px 20px 0 20px"}),e+=m(".cesium-credit-lightbox-close",{"font-size":"18pt",cursor:"pointer",position:"absolute",top:"0",right:"6px",color:"#ffffff"}),e+=m(".cesium-credit-lightbox-close:hover",{color:"#48b"}),e+=m(".cesium-credit-lightbox > ul",{margin:"0",padding:"12px 20px 12px 40px","font-size":"13px"}),e+=m(".cesium-credit-lightbox > ul > li",{"padding-bottom":"6px"}),e+=m(".cesium-credit-lightbox > ul > li *",{padding:"0",margin:"0"}),e+=m(".cesium-credit-expand-link",{"padding-left":"5px",cursor:"pointer","text-decoration":"underline",color:"#ffffff"}),e+=m(".cesium-credit-expand-link:hover",{color:"#48b"}),e+=m(".cesium-credit-text",{color:"#ffffff"}),e+=m(".cesium-credit-textContainer *, .cesium-credit-logoContainer *",{display:"inline"});var t=document.head,i=document.createElement("style");i.innerHTML=e,t.insertBefore(i,t.firstChild)}();var y=o.a.clone(_.cesiumCredit);this._delimiter=Object(s.default)(t," • "),this._screenContainer=g,this._cesiumCreditContainer=p,this._lastViewportHeight=void 0,this._lastViewportWidth=void 0,this._lightboxCredits=u,this._creditList=h,this._lightbox=l,this._hideLightbox=d,this._expandLink=v,this._expanded=!1,this._defaultCredits=[],this._cesiumCredit=y,this._previousCesiumCredit=void 0,this._currentCesiumCredit=y,this._currentFrameCredits={screenCredits:new n.default,lightboxCredits:new n.default},this._defaultCredit=void 0,this.viewport=i,this.container=e}function g(){if(!Object(l.default)(c)){var e=Object(a.a)("Assets/Images/ion-credit.png");if(0!==e.indexOf("http://")&&0!==e.indexOf("https://")&&0!==e.indexOf("data:"))e=new d.a(e).path();c=new o.a('<a href="https://cesium.com/" target="_blank"><img src="'+e+'" title="Cesium ion"/></a>',!0)}return _._cesiumCreditInitialized||(_._cesiumCredit=c,_._cesiumCreditInitialized=!0),c}_.prototype.addCredit=function(e){if(r.a.defined("credit",e),e._isIon)return Object(l.default)(this._defaultCredit)||(this._defaultCredit=o.a.clone(g())),void(this._currentCesiumCredit=this._defaultCredit);e.showOnScreen?this._currentFrameCredits.screenCredits.set(e.id,e):this._currentFrameCredits.lightboxCredits.set(e.id,e)},_.prototype.addDefaultCredit=function(e){r.a.defined("credit",e);var t=this._defaultCredits;(function(e,t){for(var i=e.length,n=0;n<i;n++){var a=e[n];if(o.a.equals(a,t))return!0}return!1})(t,e)||t.push(e)},_.prototype.removeDefaultCredit=function(e){r.a.defined("credit",e);var t=this._defaultCredits,i=t.indexOf(e);-1!==i&&t.splice(i,1)},_.prototype.showLightbox=function(){this._lightbox.style.display="block",this._expanded=!0},_.prototype.hideLightbox=function(){this._lightbox.style.display="none",this._expanded=!1},_.prototype.update=function(){var e,t,i,n;this._expanded&&(t=(e=this)._lightboxCredits,i=e.viewport.clientWidth,n=e.viewport.clientHeight,i!==e._lastViewportWidth&&(i<576?(t.className="cesium-credit-lightbox cesium-credit-lightbox-mobile",t.style.marginTop="0"):(t.className="cesium-credit-lightbox cesium-credit-lightbox-expanded",t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px"),e._lastViewportWidth=i),i>=576&&n!==e._lastViewportHeight&&(t.style.marginTop=Math.floor(.5*(n-t.clientHeight))+"px",e._lastViewportHeight=n))},_.prototype.beginFrame=function(){var e=this._currentFrameCredits,t=e.screenCredits;t.removeAll();for(var i=this._defaultCredits,n=0;n<i.length;++n){var a=i[n];t.set(a.id,a)}e.lightboxCredits.removeAll(),o.a.equals(_.cesiumCredit,this._cesiumCredit)||(this._cesiumCredit=o.a.clone(_.cesiumCredit)),this._currentCesiumCredit=this._cesiumCredit},_.prototype.endFrame=function(){var e=this._currentFrameCredits.screenCredits.values;p(this._screenContainer,e,this._delimiter,void 0);var t,i,n,a=this._currentFrameCredits.lightboxCredits.values;this._expandLink.style.display=a.length>0?"inline":"none",p(this._creditList,a,void 0,"li"),i=(t=this)._previousCesiumCredit,n=t._currentCesiumCredit,o.a.equals(n,i)||(Object(l.default)(i)&&t._cesiumCreditContainer.removeChild(i.element),Object(l.default)(n)&&t._cesiumCreditContainer.appendChild(n.element),t._previousCesiumCredit=n)},_.prototype.destroy=function(){return this._lightbox.removeEventListener("click",this._hideLightbox,!1),this.container.removeChild(this._cesiumCreditContainer),this.container.removeChild(this._screenContainer),this.container.removeChild(this._expandLink),this.viewport.removeChild(this._lightbox),Object(u.default)(this)},_.prototype.isDestroyed=function(){return!1},_._cesiumCredit=void 0,_._cesiumCreditInitialized=!1,Object.defineProperties(_,{cesiumCredit:{get:function(){return g(),_._cesiumCredit},set:function(e){_._cesiumCredit=e,_._cesiumCreditInitialized=!0}}}),t.a=_},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(4),o=i(11),s=i(2),l=i(0),u=i(447),d=i(46),c=i(28),f=i(82),h=i(79),p=i(119),m=i(35),_=i(27);function g(e){r.a.typeOf.object("options",e),r.a.typeOf.object("options.frustum",e.frustum),r.a.typeOf.object("options.origin",e.origin),r.a.typeOf.object("options.orientation",e.orientation);var t,i,n=e.frustum,o=e.orientation,l=e.origin,u=Object(s.default)(e._drawNearPlane,!0);n instanceof p.default?(t=0,i=p.default.packedLength):n instanceof h.a&&(t=1,i=h.a.packedLength),this._frustumType=t,this._frustum=n.clone(),this._origin=a.default.clone(l),this._orientation=_.default.clone(o),this._drawNearPlane=u,this._workerName="createFrustumOutlineGeometry",this.packedLength=2+i+a.default.packedLength+_.default.packedLength}g.pack=function(e,t,i){r.a.typeOf.object("value",e),r.a.defined("array",t),i=Object(s.default)(i,0);var n=e._frustumType,o=e._frustum;return t[i++]=n,0===n?(p.default.pack(o,t,i),i+=p.default.packedLength):(h.a.pack(o,t,i),i+=h.a.packedLength),a.default.pack(e._origin,t,i),i+=a.default.packedLength,_.default.pack(e._orientation,t,i),t[i+=_.default.packedLength]=e._drawNearPlane?1:0,t};var v=new p.default,y=new h.a,b=new _.default,w=new a.default;g.unpack=function(e,t,i){r.a.defined("array",e),t=Object(s.default)(t,0);var n,o=e[t++];0===o?(n=p.default.unpack(e,t,v),t+=p.default.packedLength):(n=h.a.unpack(e,t,y),t+=h.a.packedLength);var u=a.default.unpack(e,t,w);t+=a.default.packedLength;var d=_.default.unpack(e,t,b),c=1===e[t+=_.default.packedLength];if(!Object(l.default)(i))return new g({frustum:n,origin:u,orientation:d,_drawNearPlane:c});var f=o===i._frustumType?i._frustum:void 0;return i._frustum=n.clone(f),i._frustumType=o,i._origin=a.default.clone(u,i._origin),i._orientation=_.default.clone(d,i._orientation),i._drawNearPlane=c,i},g.createGeometry=function(e){var t=e._frustumType,i=e._frustum,a=e._origin,r=e._orientation,s=e._drawNearPlane,l=new Float64Array(24);u.a._computeNearFarPlanes(a,r,t,i,l);for(var h,p,_=new f.a({position:new c.default({componentDatatype:o.default.DOUBLE,componentsPerAttribute:3,values:l})}),g=s?2:1,v=new Uint16Array(8*(g+1)),y=s?0:1;y<2;++y)p=4*y,v[h=s?8*y:0]=p,v[h+1]=p+1,v[h+2]=p+1,v[h+3]=p+2,v[h+4]=p+2,v[h+5]=p+3,v[h+6]=p+3,v[h+7]=p;for(y=0;y<2;++y)p=4*y,v[h=8*(g+y)]=p,v[h+1]=p+4,v[h+2]=p+1,v[h+3]=p+5,v[h+4]=p+2,v[h+5]=p+6,v[h+6]=p+3,v[h+7]=p+7;return new d.default({attributes:_,indices:v,primitiveType:m.default.LINES,boundingSphere:n.default.fromVertices(l)})},t.a=g},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(11),o=i(0),s=i(59),l=i(46),u=i(28),d=i(79),c=i(35),f=i(36),h=i(44),p=i(26),m=i(39),_=i(67),g=i(34),v=i(104),y=i(774),b=i(775),w=i(13);function O(){this._rs=void 0,this._sp=void 0,this._va=void 0,this._command=void 0,this._mode=void 0,this._useLogDepth=!1}var x=s.a.supportsTypedArrays()?new Float32Array(12):[],A=new a.default,T=new a.default,E=new a.default,C=new a.default,S=new a.default;O.prototype.update=function(e){if(this._mode=e.mode,e.mode===w.default.SCENE3D){var t=e.context,i=e.mapProjection.ellipsoid,s=e.useLogDepth;if(Object(o.default)(this._command)||(this._rs=m.default.fromCache({cull:{enabled:!0},depthTest:{enabled:!0},colorMask:{red:!1,green:!1,blue:!1,alpha:!1}}),this._command=new h.default({renderState:this._rs,boundingVolume:new n.default(a.default.ZERO,i.maximumRadius),pass:p.default.OPAQUE,owner:this})),!Object(o.default)(this._sp)||this._useLogDepth!==s){this._useLogDepth=s;var O=new g.default({sources:[b.a]}),M=new g.default({sources:[y.a]});if(s){M.sources.push("#ifdef GL_EXT_frag_depth \n#extension GL_EXT_frag_depth : enable \n#endif \n\n"),M.defines.push("LOG_DEPTH"),O.defines.push("LOG_DEPTH")}this._sp=_.default.replaceCache({shaderProgram:this._sp,context:t,vertexShaderSource:O,fragmentShaderSource:M,attributeLocations:{position:0}}),this._command.shaderProgram=this._sp}var D=function(e,t){var i,n,r,o=e.radii,s=t.camera;if(s.frustum instanceof d.a)i=a.default.ZERO,n=s.rightWC,r=s.upWC;else{var l=s.positionWC,u=a.default.multiplyComponents(e.oneOverRadii,l,A),c=a.default.normalize(u,T),f=a.default.normalize(a.default.cross(a.default.UNIT_Z,u,E),E),h=a.default.normalize(a.default.cross(c,f,C),C),p=a.default.magnitude(u),m=Math.sqrt(p*p-1);i=a.default.multiplyByScalar(c,1/p,A);var _=m/p;n=a.default.multiplyByScalar(f,_,T),r=a.default.multiplyByScalar(h,_,E)}var g=a.default.add(i,r,S);a.default.subtract(g,n,g),a.default.multiplyComponents(o,g,g),a.default.pack(g,x,0);var v=a.default.subtract(i,r,S);a.default.subtract(v,n,v),a.default.multiplyComponents(o,v,v),a.default.pack(v,x,3);var y=a.default.add(i,r,S);a.default.add(y,n,y),a.default.multiplyComponents(o,y,y),a.default.pack(y,x,6);var b=a.default.subtract(i,r,S);return a.default.add(b,n,b),a.default.multiplyComponents(o,b,b),a.default.pack(b,x,9),x}(i,e);if(Object(o.default)(this._va))this._va.getAttribute(0).vertexBuffer.copyFromArrayView(D);else{var P=new l.default({attributes:{position:new u.default({componentDatatype:r.default.FLOAT,componentsPerAttribute:3,values:D})},indices:[0,1,2,2,1,3],primitiveType:c.default.TRIANGLES});this._va=v.default.fromGeometry({context:t,geometry:P,attributeLocations:{position:0},bufferUsage:f.default.DYNAMIC_DRAW}),this._command.vertexArray=this._va}}},O.prototype.execute=function(e,t){this._mode===w.default.SCENE3D&&this._command.execute(e,t)},O.prototype.isDestroyed=function(){return!1},O.prototype.destroy=function(){this._sp=this._sp&&this._sp.destroy(),this._va=this._va&&this._va.destroy()},t.a=O},function(e,t,i){"use strict";t.a="varying vec4 positionEC;\n\nvoid main()\n{\n vec3 position;\n vec3 direction;\n if (czm_orthographicIn3D == 1.0)\n {\n vec2 uv = (gl_FragCoord.xy - czm_viewport.xy) / czm_viewport.zw;\n vec2 minPlane = vec2(czm_frustumPlanes.z, czm_frustumPlanes.y); // left, bottom\n vec2 maxPlane = vec2(czm_frustumPlanes.w, czm_frustumPlanes.x); // right, top\n position = vec3(mix(minPlane, maxPlane, uv), 0.0);\n direction = vec3(0.0, 0.0, -1.0);\n } \n else \n {\n position = vec3(0.0);\n direction = normalize(positionEC.xyz);\n }\n\n czm_ray ray = czm_ray(position, direction);\n\n vec3 ellipsoid_center = czm_view[3].xyz;\n\n czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n if (!czm_isEmpty(intersection))\n {\n gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n }\n else\n {\n discard;\n }\n\n czm_writeLogDepth();\n}\n"},function(e,t,i){"use strict";t.a="attribute vec4 position;\n\nvarying vec4 positionEC;\n\nvoid main()\n{\n positionEC = czm_modelView * position;\n gl_Position = czm_projection * positionEC;\n\n czm_vertexLogDepth();\n}\n"},function(e,t,i){"use strict";var n=i(0),a=i(19),r=i(3),o=i(5),s=i(12),l=i(27);function u(e){if(!Object(n.default)(e))throw new r.default("scene is required.");this._scene=e,this._lastAlpha=void 0,this._lastBeta=void 0,this._lastGamma=void 0,this._alpha=void 0,this._beta=void 0,this._gamma=void 0;var t=this;function i(e){var i=e.alpha;if(!Object(n.default)(i))return t._alpha=void 0,t._beta=void 0,void(t._gamma=void 0);t._alpha=o.default.toRadians(i),t._beta=o.default.toRadians(e.beta),t._gamma=o.default.toRadians(e.gamma)}window.addEventListener("deviceorientation",i,!1),this._removeListener=function(){window.removeEventListener("deviceorientation",i,!1)}}var d=new l.default,c=new l.default,f=new s.default;u.prototype.update=function(){if(Object(n.default)(this._alpha)){Object(n.default)(this._lastAlpha)||(this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma);var e=this._lastAlpha-this._alpha,t=this._lastBeta-this._beta,i=this._lastGamma-this._gamma;!function(e,t,i,n){var a=e.direction,r=e.right,o=e.up,u=l.default.fromAxisAngle(a,i,c),h=l.default.fromAxisAngle(r,n,d),p=l.default.multiply(h,u,h),m=l.default.fromAxisAngle(o,t,c);l.default.multiply(m,p,p);var _=s.default.fromQuaternion(p,f);s.default.multiplyByVector(_,r,r),s.default.multiplyByVector(_,o,o),s.default.multiplyByVector(_,a,a)}(this._scene.camera,-e,t,i),this._lastAlpha=this._alpha,this._lastBeta=this._beta,this._lastGamma=this._gamma}},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){return this._removeListener(),Object(a.default)(this)},t.a=u},function(e,t,i){"use strict";var n=i(1),a=i(0),r=i(5),o=i(13);function s(){this.enabled=!0,this.density=2e-4,this.screenSpaceErrorFactor=2,this.minimumBrightness=.03}for(var l=[359.393,800.749,1275.6501,2151.1192,3141.7763,4777.5198,6281.2493,12364.307,15900.765,49889.0549,78026.8259,99260.7344,120036.3873,151011.0158,156091.1953,203849.3112,274866.9803,319916.3149,493552.0528,628733.5874],u=[2e-5,2e-4,1e-4,7e-5,5e-5,4e-5,3e-5,19e-6,1e-5,85e-7,62e-7,58e-7,53e-7,52e-7,51e-7,42e-7,4e-6,34e-7,26e-7,22e-7],d=0;d<u.length;++d)u[d]*=1e6;for(var c=u[1],f=u[u.length-1],h=0;h<u.length;++h)u[h]=(u[h]-f)/(c-f);var p=0;var m=new n.default;s.prototype.update=function(e){if(e.fog.enabled=this.enabled){var t=e.camera,i=t.positionCartographic;if(!Object(a.default)(i)||i.height>8e5||e.mode!==o.default.SCENE3D)e.fog.enabled=!1;else{var s=i.height,d=function(e){var t,i=l,n=i.length;if(e<i[0])return p=0;if(e>i[n-1])return p=n-2;if(e>=i[p]){if(p+1<n&&e<i[p+1])return p;if(p+2<n&&e<i[p+2])return++p}else if(p-1>=0&&e>=i[p-1])return--p;for(t=0;t<n-2&&!(e>=i[t]&&e<i[t+1]);++t);return p=t}(s),h=r.default.clamp((s-l[d])/(l[d+1]-l[d]),0,1),_=r.default.lerp(u[d],u[d+1],h),g=1e6*this.density;_=_*(g-g/c*f)*1e-6;var v=n.default.normalize(t.positionWC,m);_*=1-Math.abs(n.default.dot(t.directionWC,v)),e.fog.density=_,e.fog.sse=this.screenSpaceErrorFactor,e.fog.minimumBrightness=this.minimumBrightness}}},t.a=s},function(e,t,i){"use strict";var n=i(13);t.a=function(e,t,i){this.context=e,this.commandList=[],this.shadowMaps=[],this.brdfLutGenerator=void 0,this.environmentMap=void 0,this.sphericalHarmonicCoefficients=void 0,this.specularEnvironmentMaps=void 0,this.specularEnvironmentMapsMaximumLOD=void 0,this.mode=n.default.SCENE3D,this.morphTime=n.default.getMorphTime(n.default.SCENE3D),this.frameNumber=0,this.newFrame=!1,this.time=void 0,this.jobScheduler=i,this.mapProjection=void 0,this.camera=void 0,this.cameraUnderground=!1,this.globeTranslucencyState=void 0,this.cullingVolume=void 0,this.occluder=void 0,this.maximumScreenSpaceError=void 0,this.pixelRatio=1,this.passes={render:!1,pick:!1,depth:!1,postProcess:!1,offscreen:!1},this.creditDisplay=t,this.afterRender=[],this.scene3DOnly=!1,this.fog={enabled:!1,density:void 0,sse:void 0,minimumBrightness:void 0},this.terrainExaggeration=1,this.terrainExaggerationRelativeHeight=0,this.shadowState={shadowsEnabled:!0,shadowMaps:[],lightShadowMaps:[],nearPlane:1,farPlane:5e3,closestObjectSize:1e3,lastDirtyTime:0,outOfView:!0},this.imagerySplitPosition=0,this.frustumSplits=[],this.backgroundColor=void 0,this.light=void 0,this.minimumDisableDepthTestDistance=void 0,this.invertClassification=!1,this.invertClassificationColor=void 0,this.useLogDepth=!1,this.tilesetPassState=void 0,this.minimumTerrainHeight=0}},function(e,t,i){"use strict";var n=i(60),a=i(2),r=i(0),o=i(65),s=i(21),l=i(44),u=i(26),d=i(39),c=i(34),f=i(74),h=i(140),p=i(13),m=0,_=1,g=2,v=3,y=4,b=5,w=6,O=7,x=8,A=9,T=10,E=11,C=["opaqueFrontFaceCommand","opaqueBackFaceCommand","depthOnlyFrontFaceCommand","depthOnlyBackFaceCommand","depthOnlyFrontAndBackFaceCommand","translucentFrontFaceCommand","translucentBackFaceCommand","translucentFrontFaceManualDepthTestCommand","translucentBackFaceManualDepthTestCommand","pickFrontFaceCommand","pickBackFaceCommand"];function S(){this._frontFaceAlphaByDistance=new o.a(0,1,0,1),this._backFaceAlphaByDistance=new o.a(0,1,0,1),this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._requiresManualDepthTest=!1,this._sunVisibleThroughGlobe=!1,this._environmentVisible=!1,this._useDepthPlane=!1,this._numberOfTextureUniforms=0,this._globeTranslucencyFramebuffer=void 0,this._rectangle=s.default.clone(s.default.MAX_VALUE),this._derivedCommandKey=0,this._derivedCommandsDirty=!1,this._derivedCommandPacks=void 0,this._derivedCommandTypes=new Array(E),this._derivedBlendCommandTypes=new Array(E),this._derivedPickCommandTypes=new Array(E),this._derivedCommandTypesToUpdate=new Array(E),this._derivedCommandsLength=0,this._derivedBlendCommandsLength=0,this._derivedPickCommandsLength=0,this._derivedCommandsToUpdateLength=0}function M(e,t,i,n){return e?Object(r.default)(i)?(o.a.clone(i,n),n.nearValue*=t,n.farValue*=t,n):(n.nearValue=t,n.farValue=t,n):(n.nearValue=1,n.farValue=1,n)}function D(e,t,i){return e&&(i.baseColor.alpha<1||t.nearValue<1||t.farValue<1)}function P(e,t,i,n,a){var r=0,o=e._frontFaceTranslucent,s=e._backFaceTranslucent;if(!o)return r;var l=t.cameraUnderground,u=e._requiresManualDepthTest,d=n?A:u?O:b,c=n?T:u?x:w;return t.mode===p.default.SCENE2D?(a[r++]=g,a[r++]=d,r):(s?(i||(a[r++]=y),l?(a[r++]=d,a[r++]=c):(a[r++]=c,a[r++]=d)):l?(i||(a[r++]=v),a[r++]=m,a[r++]=c):(i||(a[r++]=g),a[r++]=_,a[r++]=d),r)}function I(e,t){var i=e.indexOf(t);i>-1&&e.splice(i,1)}function L(e,t){return e.indexOf(t)>-1}function j(e,t){I(e.defines,"TRANSLUCENT"),I(t.defines,"TRANSLUCENT")}function R(e,t){I(e.defines,"GROUND_ATMOSPHERE"),I(t.defines,"GROUND_ATMOSPHERE"),I(e.defines,"FOG"),I(t.defines,"FOG"),I(e.defines,"TRANSLUCENT"),I(t.defines,"TRANSLUCENT")}function N(e,t){if(!L(t.defines,"TILE_LIMIT_RECTANGLE")&&!L(t.defines,"ENABLE_CLIPPING_PLANES")){t.sources=["void main() \n{ \n gl_FragColor = vec4(1.0); \n} \n"]}}function B(e,t){for(var i=t.sources,n=i.length,a=0;a<n;++a)i[a]=c.default.replaceMain(i[a],"czm_globe_translucency_main");i.push("\n\nuniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n#ifdef MANUAL_DEPTH_TEST \n float logDepthOrDepth = czm_unpackDepth(texture2D(czm_globeDepthTexture, st)); \n if (logDepthOrDepth != 0.0) \n { \n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth); \n float depthEC = eyeCoordinate.z / eyeCoordinate.w; \n if (v_positionEC.z < depthEC) \n { \n discard; \n } \n } \n#endif \n czm_globe_translucency_main(); \n vec4 classificationColor = texture2D(u_classificationTexture, st); \n if (classificationColor.a > 0.0) \n { \n // Reverse premultiplication process to get the correct composited result of the classification primitives \n classificationColor.rgb /= classificationColor.a; \n } \n gl_FragColor = classificationColor * vec4(classificationColor.aaa, 1.0) + gl_FragColor * (1.0 - classificationColor.a); \n} \n")}function F(e,t){B(0,t),I(e.defines,"GROUND_ATMOSPHERE"),I(t.defines,"GROUND_ATMOSPHERE"),I(e.defines,"FOG"),I(t.defines,"FOG")}function k(e,t){B(0,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function z(e,t){F(e,t),e.defines.push("GENERATE_POSITION"),t.defines.push("MANUAL_DEPTH_TEST")}function U(e,t){t.sources=["uniform sampler2D u_classificationTexture; \nvoid main() \n{ \n vec2 st = gl_FragCoord.xy / czm_viewport.zw; \n vec4 pickColor = texture2D(u_classificationTexture, st); \n if (pickColor == vec4(0.0)) \n { \n discard; \n } \n gl_FragColor = pickColor; \n} \n"]}function V(e,t,i,n,a,o){if(!Object(r.default)(a))return t;if(!n&&Object(r.default)(i))return i;var s=e.shaderCache.getDerivedShaderProgram(t,o);if(!Object(r.default)(s)){var l=t._attributeLocations,u=t.vertexShaderSource.clone(),d=t.fragmentShaderSource.clone();u.defines=Object(r.default)(u.defines)?u.defines.slice(0):[],d.defines=Object(r.default)(d.defines)?d.defines.slice(0):[],a(u,d),s=e.shaderCache.createDerivedShaderProgram(t,o,{vertexShaderSource:u,fragmentShaderSource:d,attributeLocations:l})}return s}function H(e){e.cull.face=h.default.BACK,e.cull.enabled=!0}function G(e){e.cull.face=h.default.FRONT,e.cull.enabled=!0}function Y(e){e.cull.face=h.default.BACK,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function W(e){e.cull.face=h.default.FRONT,e.cull.enabled=!0,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function q(e){e.cull.enabled=!1,e.colorMask={red:!1,green:!1,blue:!1,alpha:!1}}function X(e){e.cull.face=h.default.BACK,e.cull.enabled=!0,e.depthMask=!1,e.blending=f.default.ALPHA_BLEND}function K(e){e.cull.face=h.default.FRONT,e.cull.enabled=!0,e.depthMask=!1,e.blending=f.default.ALPHA_BLEND}function J(e){e.cull.face=h.default.BACK,e.cull.enabled=!0,e.blending.enabled=!1}function Z(e){e.cull.face=h.default.FRONT,e.cull.enabled=!0,e.blending.enabled=!1}function Q(e,t,i,n,a){if(!Object(r.default)(n))return e;if(!i&&Object(r.default)(t))return t;var o=a[e.id];if(!Object(r.default)(o)){var s=d.default.getState(e);n(s),o=d.default.fromCache(s),a[e.id]=o}return o}function $(e){return{u_classificationTexture:function(){return e._globeTranslucencyFramebuffer.classificationTexture}}}function ee(e,t,i,a,o){return Object(r.default)(o)?!a&&Object(r.default)(i)?i:Object(n.default)(t,o(e),!1):t}function te(e){this.pass=e.pass,this.pickOnly=e.pickOnly,this.getShaderProgramFunction=e.getShaderProgramFunction,this.getRenderStateFunction=e.getRenderStateFunction,this.getUniformMapFunction=e.getUniformMapFunction,this.renderStateCache={}}Object.defineProperties(S.prototype,{frontFaceAlphaByDistance:{get:function(){return this._frontFaceAlphaByDistance}},backFaceAlphaByDistance:{get:function(){return this._backFaceAlphaByDistance}},translucent:{get:function(){return this._frontFaceTranslucent}},sunVisibleThroughGlobe:{get:function(){return this._sunVisibleThroughGlobe}},environmentVisible:{get:function(){return this._environmentVisible}},useDepthPlane:{get:function(){return this._useDepthPlane}},numberOfTextureUniforms:{get:function(){return this._numberOfTextureUniforms}},rectangle:{get:function(){return this._rectangle}}}),S.prototype.update=function(e){var t=e.globe;if(!Object(r.default)(t)||!t.show)return this._frontFaceTranslucent=!1,this._backFaceTranslucent=!1,this._sunVisibleThroughGlobe=!0,this._environmentVisible=!0,void(this._useDepthPlane=!1);this._frontFaceAlphaByDistance=M(t.translucency.enabled,t.translucency.frontFaceAlpha,t.translucency.frontFaceAlphaByDistance,this._frontFaceAlphaByDistance),this._backFaceAlphaByDistance=M(t.translucency.enabled,t.translucency.backFaceAlpha,t.translucency.backFaceAlphaByDistance,this._backFaceAlphaByDistance),this._frontFaceTranslucent=D(t.translucency.enabled,this._frontFaceAlphaByDistance,t),this._backFaceTranslucent=D(t.translucency.enabled,this._backFaceAlphaByDistance,t),this._requiresManualDepthTest=function(e,t,i){return e._frontFaceTranslucent&&!e._backFaceTranslucent&&!i.depthTestAgainstTerrain&&t.mode!==p.default.SCENE2D&&t.context.depthTexture}(this,e,t),this._sunVisibleThroughGlobe=function(e,t){var i=e._frontFaceTranslucent,n=e._backFaceTranslucent;return i&&(t.cameraUnderground||n)}(this,e),this._environmentVisible=function(e,t){return!t.cameraUnderground||e._frontFaceTranslucent}(this,e),this._useDepthPlane=function(e,t){return!t.cameraUnderground&&!e._frontFaceTranslucent}(this,e),this._numberOfTextureUniforms=function(e){var t=0;e._frontFaceTranslucent&&++t;e._requiresManualDepthTest&&++t;return t}(this),this._rectangle=s.default.clone(t.translucency.rectangle,this._rectangle),function(e,t){var i;e._derivedCommandsLength=P(e,t,!1,!1,e._derivedCommandTypes),e._derivedBlendCommandsLength=P(e,t,!0,!1,e._derivedBlendCommandTypes),e._derivedPickCommandsLength=P(e,t,!1,!0,e._derivedPickCommandTypes);var n=0;for(i=0;i<e._derivedCommandsLength;++i)n|=1<<e._derivedCommandTypes[i];for(i=0;i<e._derivedBlendCommandsLength;++i)n|=1<<e._derivedBlendCommandTypes[i];for(i=0;i<e._derivedPickCommandsLength;++i)n|=1<<e._derivedPickCommandTypes[i];var a=0;for(i=0;i<E;++i)(n&1<<i)>0&&(e._derivedCommandTypesToUpdate[a++]=i);e._derivedCommandsToUpdateLength=a;var o=n!==e._derivedCommandKey;e._derivedCommandKey=n,e._derivedCommandsDirty=o,!Object(r.default)(e._derivedCommandPacks)&&e._frontFaceTranslucent&&(e._derivedCommandPacks=[new te({pass:u.default.GLOBE,pickOnly:!1,getShaderProgramFunction:j,getRenderStateFunction:H,getUniformMapFunction:void 0}),new te({pass:u.default.GLOBE,pickOnly:!1,getShaderProgramFunction:R,getRenderStateFunction:G,getUniformMapFunction:void 0}),new te({pass:u.default.GLOBE,pickOnly:!1,getShaderProgramFunction:N,getRenderStateFunction:Y,getUniformMapFunction:void 0}),new te({pass:u.default.GLOBE,pickOnly:!1,getShaderProgramFunction:N,getRenderStateFunction:W,getUniformMapFunction:void 0}),new te({pass:u.default.GLOBE,pickOnly:!1,getShaderProgramFunction:N,getRenderStateFunction:q,getUniformMapFunction:void 0}),new te({pass:u.default.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:B,getRenderStateFunction:X,getUniformMapFunction:$}),new te({pass:u.default.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:F,getRenderStateFunction:K,getUniformMapFunction:$}),new te({pass:u.default.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:k,getRenderStateFunction:X,getUniformMapFunction:$}),new te({pass:u.default.TRANSLUCENT,pickOnly:!1,getShaderProgramFunction:z,getRenderStateFunction:K,getUniformMapFunction:$}),new te({pass:u.default.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:U,getRenderStateFunction:J,getUniformMapFunction:$}),new te({pass:u.default.TRANSLUCENT,pickOnly:!0,getShaderProgramFunction:U,getRenderStateFunction:Z,getUniformMapFunction:$})])}(this,e)};var ie=new Array(E),ne=new Array(E);function ae(e,t,i,n,a,o,s){for(var l=0;l<t;++l){var u=e[l],d=u.derivedCommands.type;(!Object(r.default)(s)||s.indexOf(d)>-1)&&i(u,n,a,o)}}function re(e,t,i,n,a,r){for(var o=0;o<t;++o)i(e[o],n,a,r)}S.prototype.updateDerivedCommands=function(e,t){var i=this._derivedCommandTypesToUpdate,n=this._derivedCommandsToUpdateLength;if(0!==n){for(var o=0;o<n;++o)ne[o]=this._derivedCommandPacks[i[o]],ie[o]=C[i[o]];!function(e,t,i,n,o,s,u){var d=t.derivedCommands.globeTranslucency,c=e._derivedCommandsDirty;if(t.dirty||!Object(r.default)(d)||c){t.dirty=!1,Object(r.default)(d)||(d={},t.derivedCommands.globeTranslucency=d);var f=u.frameNumber,h=Object(a.default)(d.uniformMapDirtyFrame,0),p=Object(a.default)(d.shaderProgramDirtyFrame,0),m=Object(a.default)(d.renderStateDirtyFrame,0),_=d.uniformMap!==t.uniformMap,g=d.shaderProgramId!==t.shaderProgram.id,v=d.renderStateId!==t.renderState.id;_&&(d.uniformMapDirtyFrame=f),g&&(d.shaderProgramDirtyFrame=f),v&&(d.renderStateDirtyFrame=f),d.uniformMap=t.uniformMap,d.shaderProgramId=t.shaderProgram.id,d.renderStateId=t.renderState.id;for(var y=0;y<i;++y){var b,w,O,x=s[y],A=n[y],T=o[y],E=d[T];Object(r.default)(E)?(b=E.uniformMap,w=E.shaderProgram,O=E.renderState):(b=void 0,w=void 0,O=void 0),E=l.default.shallowClone(t,E),d[T]=E;var C=Object(a.default)(E.derivedCommands.uniformMapDirtyFrame,0),S=Object(a.default)(E.derivedCommands.shaderProgramDirtyFrame,0),M=Object(a.default)(E.derivedCommands.renderStateDirtyFrame,0),D=_||C<h,P=g||S<p,I=v||M<m;D&&(E.derivedCommands.uniformMapDirtyFrame=f),P&&(E.derivedCommands.shaderProgramDirtyFrame=f),I&&(E.derivedCommands.renderStateDirtyFrame=f),E.derivedCommands.type=A,E.pass=x.pass,E.pickOnly=x.pickOnly,E.uniformMap=ee(e,t.uniformMap,b,D,x.getUniformMapFunction),E.shaderProgram=V(u.context,t.shaderProgram,w,P,x.getShaderProgramFunction,T),E.renderState=Q(t.renderState,O,I,x.getRenderStateFunction,x.renderStateCache)}}}(this,e,n,i,ie,ne,t)}},S.prototype.pushDerivedCommands=function(e,t,i){var n=i.passes.pick;if(!n||!t){var a=this._derivedCommandTypes,r=this._derivedCommandsLength;if(n?(a=this._derivedPickCommandTypes,r=this._derivedPickCommandsLength):t&&(a=this._derivedBlendCommandTypes,r=this._derivedBlendCommandsLength),0!==r)for(var o=e.derivedCommands.globeTranslucency,s=0;s<r;++s){var l=C[a[s]];i.commandList.push(o[l])}else i.commandList.push(e)}};var oe=[m,_],se=[g,v,y];S.prototype.executeGlobeCommands=function(e,t,i,n,a){var r=n.context,o=e.commands[u.default.GLOBE],s=e.indices[u.default.GLOBE];0!==s&&(this._globeTranslucencyFramebuffer=i,i.clearClassification(r,a),ae(o,s,t,n,r,a,oe))},S.prototype.executeGlobeClassificationCommands=function(e,t,i,n,a){var r=n.context,o=e.commands[u.default.GLOBE],s=e.indices[u.default.GLOBE],l=e.commands[u.default.TERRAIN_CLASSIFICATION],d=e.indices[u.default.TERRAIN_CLASSIFICATION];if(0!==s&&0!==d){var c=this._frontFaceTranslucent,f=this._backFaceTranslucent;if(c&&f||re(l,d,t,n,r,a),c||f){this._globeTranslucencyFramebuffer=i;var h=r.uniformState.globeDepthTexture,p=a.framebuffer;if(a.framebuffer=i.classificationFramebuffer,ae(o,s,t,n,r,a,se),r.depthTexture){var m=i.packDepth(r,a);r.uniformState.globeDepthTexture=m}re(l,d,t,n,r,a),r.uniformState.globeDepthTexture=h,a.framebuffer=p}}},t.a=S},function(e,t,i){"use strict";var n=i(0),a=i(3),r=i(127),o=i(184);function s(e){this._total=e,this.usedThisFrame=0,this.stolenFromMeThisFrame=0,this.starvedThisFrame=!1,this.starvedLastFrame=!1}function l(e){if(Object(n.default)(e)&&e.length!==o.a.NUMBER_OF_JOB_TYPES)throw new a.default("A budget must be specified for each job type; budgets.length should equal JobType.NUMBER_OF_JOB_TYPES.");var t=new Array(o.a.NUMBER_OF_JOB_TYPES);t[o.a.TEXTURE]=new s(Object(n.default)(e)?e[o.a.TEXTURE]:10),t[o.a.PROGRAM]=new s(Object(n.default)(e)?e[o.a.PROGRAM]:10),t[o.a.BUFFER]=new s(Object(n.default)(e)?e[o.a.BUFFER]:30);var i,r=t.length,l=0;for(i=0;i<r;++i)l+=t[i].total;var u=new Array(r);for(i=0;i<r;++i)u[i]=!1;this._totalBudget=l,this._totalUsedThisFrame=0,this._budgets=t,this._executedThisFrame=u}Object.defineProperties(s.prototype,{total:{get:function(){return this._total}}}),l.getTimestamp=r.a,Object.defineProperties(l.prototype,{totalBudget:{get:function(){return this._totalBudget}}}),l.prototype.disableThisFrame=function(){this._totalUsedThisFrame=this._totalBudget},l.prototype.resetBudgets=function(){for(var e=this._budgets,t=e.length,i=0;i<t;++i){var n=e[i];n.starvedLastFrame=n.starvedThisFrame,n.starvedThisFrame=!1,n.usedThisFrame=0,n.stolenFromMeThisFrame=0}this._totalUsedThisFrame=0},l.prototype.execute=function(e,t){var i,n=this._budgets,a=n[t],r=this._executedThisFrame[t];if(this._totalUsedThisFrame>=this._totalBudget&&r)return a.starvedThisFrame=!0,!1;if(a.usedThisFrame+a.stolenFromMeThisFrame>=a.total){var o,s=n.length;for(o=0;o<s&&(!((i=n[o]).usedThisFrame+i.stolenFromMeThisFrame<i.total)||i.starvedLastFrame);++o);if(o===s&&r)return!1;r&&(a.starvedThisFrame=!0)}var u=l.getTimestamp();e.execute();var d=l.getTimestamp()-u;return this._totalUsedThisFrame+=d,i?i.stolenFromMeThisFrame+=d:a.usedThisFrame+=d,this._executedThisFrame[t]=!0,!0},t.a=l},function(e,t,i){"use strict";t.a="varying vec2 v_textureCoordinates;\n\nuniform float originalSize;\nuniform sampler2D texture0;\nuniform sampler2D texture1;\nuniform sampler2D texture2;\nuniform sampler2D texture3;\nuniform sampler2D texture4;\nuniform sampler2D texture5;\n\nconst float yMipLevel1 = 1.0 - (1.0 / pow(2.0, 1.0));\nconst float yMipLevel2 = 1.0 - (1.0 / pow(2.0, 2.0));\nconst float yMipLevel3 = 1.0 - (1.0 / pow(2.0, 3.0));\nconst float yMipLevel4 = 1.0 - (1.0 / pow(2.0, 4.0));\n\nvoid main()\n{\n vec2 uv = v_textureCoordinates;\n vec2 textureSize = vec2(originalSize * 1.5 + 2.0, originalSize);\n vec2 pixel = 1.0 / textureSize;\n\n float mipLevel = 0.0;\n\n if (uv.x - pixel.x > (textureSize.y / textureSize.x))\n {\n mipLevel = 1.0;\n if (uv.y - pixel.y > yMipLevel1)\n {\n mipLevel = 2.0;\n if (uv.y - pixel.y * 3.0 > yMipLevel2)\n {\n mipLevel = 3.0;\n if (uv.y - pixel.y * 5.0 > yMipLevel3)\n {\n mipLevel = 4.0;\n if (uv.y - pixel.y * 7.0 > yMipLevel4)\n {\n mipLevel = 5.0;\n }\n }\n }\n }\n }\n\n if (mipLevel > 0.0)\n {\n float scale = pow(2.0, mipLevel);\n\n uv.y -= (pixel.y * (mipLevel - 1.0) * 2.0);\n uv.x *= ((textureSize.x - 2.0) / textureSize.y);\n\n uv.x -= 1.0 + pixel.x;\n uv.y -= (1.0 - (1.0 / pow(2.0, mipLevel - 1.0)));\n uv *= scale;\n }\n else\n {\n uv.x *= (textureSize.x / textureSize.y);\n }\n\n if(mipLevel == 0.0)\n {\n gl_FragColor = texture2D(texture0, uv);\n }\n else if(mipLevel == 1.0)\n {\n gl_FragColor = texture2D(texture1, uv);\n }\n else if(mipLevel == 2.0)\n {\n gl_FragColor = texture2D(texture2, uv);\n }\n else if(mipLevel == 3.0)\n {\n gl_FragColor = texture2D(texture3, uv);\n }\n else if(mipLevel == 4.0)\n {\n gl_FragColor = texture2D(texture4, uv);\n }\n else if(mipLevel == 5.0)\n {\n gl_FragColor = texture2D(texture5, uv);\n }\n else\n {\n gl_FragColor = vec4(0.0);\n }\n}\n"},function(e,t,i){"use strict";t.a="varying vec3 v_cubeMapCoordinates;\nuniform samplerCube cubeMap;\n\nvoid main()\n{\n vec4 rgba = textureCube(cubeMap, v_cubeMapCoordinates);\n #ifdef RGBA_NORMALIZED\n gl_FragColor = vec4(rgba.rgb, 1.0);\n #else\n float m = rgba.a * 16.0;\n vec3 r = rgba.rgb * m;\n gl_FragColor = vec4(r * r, 1.0);\n #endif\n}\n"},function(e,t,i){"use strict";t.a="attribute vec4 position;\nattribute vec3 cubeMapCoordinates;\n\nvarying vec3 v_cubeMapCoordinates;\n\nvoid main()\n{\n gl_Position = position;\n v_cubeMapCoordinates = cubeMapCoordinates;\n}\n"},function(e,t,i){"use strict";var n=i(116),a=i(41),r=i(8),o=i(1),s=i(22),l=i(4),u=i(7),d=i(2),c=i(0),f=i(3),h=i(6),p=i(79),m=i(166),_=i(119),g=i(241),v=i(85),y=i(87),b=i(18),w=i(145),O=i(173),x=i(171),A=i(293),T=i(785),E=i(190),C=i(13),S=i(177),M=i(448),D=new A.a({pass:x.a.MOST_DETAILED_PRELOAD}),P=new A.a({pass:x.a.MOST_DETAILED_PICK}),I=new A.a({pass:x.a.PICK});function L(e){this._mostDetailedRayPicks=[],this.pickRenderStateCache={},this._pickPositionCache={},this._pickPositionCacheDirty=!1;var t=new a.a(0,0,1,1),i=new w.a(e);i.frustum=new p.a({width:.1,aspectRatio:1,near:.1}),this._pickOffscreenView=new M.a(e,i,t)}L.prototype.update=function(){this._pickPositionCacheDirty=!0},L.prototype.getPickDepth=function(e,t){var i=e.view.pickDepths,n=i[t];return Object(c.default)(n)||(n=new T.a,i[t]=n),n};var j=new m.a,R=new o.default,N=new o.default,B=new r.default,F=new h.default;var k=new g.a,z=new r.default;function U(e,t,i,n,a){var r=e.camera.frustum;return r instanceof p.a||r instanceof m.a?function(e,t,i,n,a){var r=e.camera,s=r.frustum;Object(c.default)(s._offCenterFrustum)&&(s=s._offCenterFrustum);var l=2*(t.x-a.x)/a.width-1;l*=.5*(s.right-s.left);var u=2*(a.height-t.y-a.y)/a.height-1;u*=.5*(s.top-s.bottom);var d=h.default.clone(r.transform,F);r._setTransform(h.default.IDENTITY);var f=o.default.clone(r.position,R);o.default.multiplyByScalar(r.right,l,N),o.default.add(N,f,f),o.default.multiplyByScalar(r.up,u,N),o.default.add(N,f,f),r._setTransform(d),e.mode===C.default.SCENE2D&&o.default.fromElements(f.z,f.x,f.y,f);var p=s.getPixelDimensions(a.width,a.height,1,1,B),m=j;return m.right=.5*p.x,m.left=-m.right,m.top=.5*p.y,m.bottom=-m.top,m.near=s.near,m.far=s.far,m.computeCullingVolume(f,r.directionWC,r.upWC)}(e,t,0,0,a):function(e,t,i,n,a){var r=e.camera,o=r.frustum,s=o.near,l=Math.tan(.5*o.fovy),u=o.aspectRatio*l,d=(2*(t.x-a.x)/a.width-1)*s*u,c=(2*(a.height-t.y-a.y)/a.height-1)*s*l,f=o.getPixelDimensions(a.width,a.height,1,1,z),h=f.x*i*.5,p=f.y*n*.5,m=k;return m.top=c+p,m.bottom=c-p,m.right=d+h,m.left=d-h,m.near=s,m.far=o.far,m.computeCullingVolume(r.positionWC,r.directionWC,r.upWC)}(e,t,i,n,a)}var V=3,H=3,G=new a.a(0,0,V,H),Y=new r.default,W=new u.default(0,0,0,0);L.prototype.pick=function(e,t,i,n){if(!Object(c.default)(t))throw new f.default("windowPosition is undefined.");V=Object(d.default)(i,3),H=Object(d.default)(n,V);var r=e.context,o=r.uniformState,s=e.frameState,l=e.defaultView;e.view=l;var u=l.viewport;u.x=0,u.y=0,u.width=r.drawingBufferWidth,u.height=r.drawingBufferHeight;var h=l.passState;h.viewport=a.a.clone(u,h.viewport);var p=S.default.transformWindowToDrawingBuffer(e,t,Y);e.jobScheduler.disableThisFrame(),e.updateFrameState(),s.cullingVolume=U(e,p,V,H,u),s.invertClassification=!1,s.passes.pick=!0,s.tilesetPassState=I,o.update(s),e.updateEnvironment(),G.x=p.x-.5*(V-1),G.y=e.drawingBufferHeight-p.y-.5*(H-1),G.width=V,G.height=H,h=l.pickFramebuffer.begin(G,l.viewport),e.updateAndExecuteCommands(h,W),e.resolveFramebuffers(h);var m=l.pickFramebuffer.end(G);return r.endFrame(),m};var q=new _.default,X=new g.a,K=new p.a,J=new m.a;L.prototype.pickPositionWorldCoordinates=function(e,t,i){if(e.useDepthPicking){if(!Object(c.default)(t))throw new f.default("windowPosition is undefined.");if(!e.context.depthTexture)throw new f.default("Picking from the depth buffer is not supported. Check pickPositionSupported.");var n=t.toString();if(this._pickPositionCacheDirty)this._pickPositionCache={},this._pickPositionCacheDirty=!1;else if(this._pickPositionCache.hasOwnProperty(n))return o.default.clone(this._pickPositionCache[n],i);var r=e.frameState,s=e.context,l=s.uniformState,u=e.defaultView;e.view=u;var d=S.default.transformWindowToDrawingBuffer(e,t,Y);e.pickTranslucentDepth?function(e,t){var i=e.context,n=e.frameState,r=e.environmentState,o=e.defaultView;e.view=o;var s=o.viewport;s.x=0,s.y=0,s.width=i.drawingBufferWidth,s.height=i.drawingBufferHeight;var l=o.passState;l.viewport=a.a.clone(s,l.viewport),e.clearPasses(n.passes),n.passes.pick=!0,n.passes.depth=!0,n.cullingVolume=U(e,t,1,1,s),n.tilesetPassState=I,e.updateEnvironment(),r.renderTranslucentDepthForPick=!0,l=o.pickDepthFramebuffer.update(i,t,s),e.updateAndExecuteCommands(l,W),e.resolveFramebuffers(l),i.endFrame()}(e,d):(e.updateFrameState(),l.update(r),e.updateEnvironment()),d.y=e.drawingBufferHeight-d.y;var h,p=e.camera;h=Object(c.default)(p.frustum.fov)?p.frustum.clone(q):Object(c.default)(p.frustum.infiniteProjectionMatrix)?p.frustum.clone(X):Object(c.default)(p.frustum.width)?p.frustum.clone(K):p.frustum.clone(J);for(var m=u.frustumCommandsList,_=m.length,g=0;g<_;++g){var v=this.getPickDepth(e,g).getDepth(s,d.x,d.y);if(Object(c.default)(v)&&(v>0&&v<1)){var y,b=m[g];return e.mode===C.default.SCENE2D?(y=p.position.z,p.position.z=y-b.near+1,h.far=Math.max(1,b.far-b.near),h.near=1,l.update(r),l.updateFrustum(h)):(h.near=b.near*(0!==g?e.opaqueFrustumNearOffset:1),h.far=b.far,l.updateFrustum(h)),i=S.default.drawingBufferToWgs84Coordinates(e,d,v,i),e.mode===C.default.SCENE2D&&(p.position.z=y,l.update(r)),this._pickPositionCache[n]=o.default.clone(i),i}}this._pickPositionCache[n]=void 0}};var Z=new s.default;function Q(e,t){var i,n,a=[],r=[],o=[],s=[];Object(c.default)(e)||(e=Number.MAX_VALUE);for(var l=t();Object(c.default)(l);){var u=l.object,d=l.position,f=l.exclude;if(Object(c.default)(d)&&!Object(c.default)(u)){a.push(l);break}if(!Object(c.default)(u)||!Object(c.default)(u.primitive))break;if(!f&&(a.push(l),0>=--e))break;var h=u.primitive,p=!1;"function"==typeof h.getGeometryInstanceAttributes&&Object(c.default)(u.id)&&(n=h.getGeometryInstanceAttributes(u.id),Object(c.default)(n)&&Object(c.default)(n.show)&&(p=!0,n.show=y.default.toValue(!1,n.show),o.push(n))),u instanceof O.a&&(p=!0,u.show=!1,s.push(u)),p||(h.show=!1,r.push(h)),l=t()}for(i=0;i<r.length;++i)r[i].show=!0;for(i=0;i<o.length;++i)(n=o[i]).show=y.default.toValue(!0,n.show);for(i=0;i<s.length;++i)s[i].show=!0;return a}L.prototype.pickPosition=function(e,t,i){if(i=this.pickPositionWorldCoordinates(e,t,i),Object(c.default)(i)&&e.mode!==C.default.SCENE3D){o.default.fromElements(i.y,i.z,i.x,i);var n=e.mapProjection,a=n.ellipsoid,r=n.unproject(i,Z);a.cartographicToCartesian(r,i)}return i},L.prototype.drillPick=function(e,t,i,n,a){var r=this;return Q(i,(function(){var i=r.pick(e,t,n,a);if(Object(c.default)(i))return{object:i,position:void 0,exclude:!1}})).map((function(e){return e.object}))};var $=new o.default,ee=new o.default;function te(e,t,i){this.ray=e,this.width=t,this.tilesets=i,this.ready=!1,this.deferred=b.a.defer(),this.promise=this.deferred.promise}function ie(e,t,i,n){var a=t.direction,r=o.default.mostOrthogonalAxis(a,$),s=o.default.cross(a,r,$),l=o.default.cross(a,s,ee);return n.position=t.origin,n.direction=a,n.up=l,n.right=s,n.frustum.width=Object(d.default)(i,.1),n.frustum.computeCullingVolume(n.positionWC,n.directionWC,n.upWC)}function ne(e,t,i){var n=t.frameState,a=i.ray,r=i.width,o=i.tilesets,s=e._pickOffscreenView.camera,l=ie(0,a,r,s),u=D;u.camera=s,u.cullingVolume=l;for(var d=!0,c=o.length,f=0;f<c;++f){var h=o[f];h.show&&t.primitives.contains(h)&&(h.updateForPass(n,u),d=d&&u.ready)}return d&&i.deferred.resolve(),d}function ae(e,t,i,n,a,r){var o=[];if(function e(t,i,n){for(var a=t.length,r=0;r<a;++r){var o=t.get(r);o.show&&(Object(c.default)(o.isCesium3DTileset)?Object(c.default)(i)&&-1!==i.indexOf(o)||n.push(o):o instanceof E.default&&e(o,i,n))}}(t.primitives,n,o),0===o.length)return b.a.resolve(r());var s=new te(i,a,o);return e._mostDetailedRayPicks.push(s),s.promise.then((function(){return r()}))}function re(e,t){return!(!Object(c.default)(e)||!Object(c.default)(t)||0===t.length)&&(t.indexOf(e)>-1||t.indexOf(e.primitive)>-1||t.indexOf(e.id)>-1)}function oe(e,t,i,n,r,o,s,l){return Q(n,(function(){return function(e,t,i,n,r,o,s){var l=t.context,u=l.uniformState,d=t.frameState,f=e._pickOffscreenView;t.view=f,ie(0,i,r,f.camera),G=a.a.clone(f.viewport,G);var h,p=f.pickFramebuffer.begin(G,f.viewport);t.jobScheduler.disableThisFrame(),t.updateFrameState(),d.invertClassification=!1,d.passes.pick=!0,d.passes.offscreen=!0,d.tilesetPassState=s?P:I,u.update(d),t.updateEnvironment(),t.updateAndExecuteCommands(p,W),t.resolveFramebuffers(p);var m=f.pickFramebuffer.end(G);if(t.context.depthTexture)for(var _=f.frustumCommandsList.length,g=0;g<_;++g){var y=e.getPickDepth(t,g).getDepth(l,0,0);if(Object(c.default)(y)&&(y>0&&y<1)){var b=f.frustumCommandsList[g],w=b.near*(0!==g?t.opaqueFrustumNearOffset:1),O=w+y*(b.far-w);h=v.default.getPoint(i,O);break}}if(t.view=t.defaultView,l.endFrame(),Object(c.default)(m)||Object(c.default)(h))return{object:m,position:h,exclude:!Object(c.default)(h)&&o||re(m,n)}}(e,t,i,r,o,s,l)}))}function se(e,t,i,n,a,r,o){var s=oe(e,t,i,1,n,a,r,o);if(s.length>0)return s[0]}function le(e,t,i,n,a,r,o,s){return oe(e,t,i,n,a,r,o,s)}function ue(e,t){var i=b.a.defer();return t.then((function(t){var n=e.postRender.addEventListener((function(){i.resolve(t),n()}));e.requestRender()})).otherwise((function(e){i.reject(e)})),i.promise}L.prototype.updateMostDetailedRayPicks=function(e){for(var t=this._mostDetailedRayPicks,i=0;i<t.length;++i)ne(this,e,t[i])&&t.splice(i--,1)},L.prototype.pickFromRay=function(e,t,i,n){if(l.a.defined("ray",t),e.mode!==C.default.SCENE3D)throw new f.default("Ray intersections are only supported in 3D mode.");return se(this,e,t,i,n,!1,!1)},L.prototype.drillPickFromRay=function(e,t,i,n,a){if(l.a.defined("ray",t),e.mode!==C.default.SCENE3D)throw new f.default("Ray intersections are only supported in 3D mode.");return le(this,e,t,i,n,a,!1,!1)},L.prototype.pickFromRayMostDetailed=function(e,t,i,n){if(l.a.defined("ray",t),e.mode!==C.default.SCENE3D)throw new f.default("Ray intersections are only supported in 3D mode.");var a=this;return t=v.default.clone(t),i=Object(c.default)(i)?i.slice():i,ue(e,ae(a,e,t,i,n,(function(){return se(a,e,t,i,n,!1,!0)})))},L.prototype.drillPickFromRayMostDetailed=function(e,t,i,n,a){if(l.a.defined("ray",t),e.mode!==C.default.SCENE3D)throw new f.default("Ray intersections are only supported in 3D mode.");var r=this;return t=v.default.clone(t),n=Object(c.default)(n)?n.slice():n,ue(e,ae(r,e,t,n,a,(function(){return le(r,e,t,i,n,a,!1,!0)})))};var de=new o.default,ce=new o.default,fe=new v.default,he=new s.default;function pe(e,t){var i=e.globe,a=Object(c.default)(i)?i.ellipsoid:e.mapProjection.ellipsoid,r=n.a._defaultMaxTerrainHeight,l=a.geodeticSurfaceNormalCartographic(t,ce),u=s.default.toCartesian(t,a,de),d=fe;d.origin=u,d.direction=l;var f=new v.default;return v.default.getPoint(d,r,f.origin),o.default.negate(l,f.direction),f}function me(e,t){var i=e.globe,n=Object(c.default)(i)?i.ellipsoid:e.mapProjection.ellipsoid;return pe(e,s.default.fromCartesian(t,n,he))}function _e(e,t){var i=e.globe,n=Object(c.default)(i)?i.ellipsoid:e.mapProjection.ellipsoid;return s.default.fromCartesian(t,n,he).height}function ge(e,t,i,n,a){var r=pe(t,i);return ae(e,t,r,n,a,(function(){var i=se(e,t,r,n,a,!0,!0);if(Object(c.default)(i))return _e(t,i.position)}))}function ve(e,t,i,n,a,r){var s=me(t,i);return ae(e,t,s,n,a,(function(){var i=se(e,t,s,n,a,!0,!0);if(Object(c.default)(i))return o.default.clone(i.position,r)}))}L.prototype.sampleHeight=function(e,t,i,n){if(l.a.defined("position",t),e.mode!==C.default.SCENE3D)throw new f.default("sampleHeight is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new f.default("sampleHeight requires depth texture support. Check sampleHeightSupported.");var a=se(this,e,pe(e,t),i,n,!0,!1);if(Object(c.default)(a))return _e(e,a.position)},L.prototype.clampToHeight=function(e,t,i,n,a){if(l.a.defined("cartesian",t),e.mode!==C.default.SCENE3D)throw new f.default("clampToHeight is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new f.default("clampToHeight requires depth texture support. Check clampToHeightSupported.");var r=se(this,e,me(e,t),i,n,!0,!1);if(Object(c.default)(r))return o.default.clone(r.position,a)},L.prototype.sampleHeightMostDetailed=function(e,t,i,n){if(l.a.defined("positions",t),e.mode!==C.default.SCENE3D)throw new f.default("sampleHeightMostDetailed is only supported in 3D mode.");if(!e.sampleHeightSupported)throw new f.default("sampleHeightMostDetailed requires depth texture support. Check sampleHeightSupported.");i=Object(c.default)(i)?i.slice():i;for(var a=t.length,r=new Array(a),o=0;o<a;++o)r[o]=ge(this,e,t[o],i,n);return ue(e,b.a.all(r).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n].height=e[n];return t})))},L.prototype.clampToHeightMostDetailed=function(e,t,i,n){if(l.a.defined("cartesians",t),e.mode!==C.default.SCENE3D)throw new f.default("clampToHeightMostDetailed is only supported in 3D mode.");if(!e.clampToHeightSupported)throw new f.default("clampToHeightMostDetailed requires depth texture support. Check clampToHeightSupported.");i=Object(c.default)(i)?i.slice():i;for(var a=t.length,r=new Array(a),o=0;o<a;++o)r[o]=ve(this,e,t[o],i,n,t[o]);return ue(e,b.a.all(r).then((function(e){for(var i=e.length,n=0;n<i;++n)t[n]=e[n];return t})))},L.prototype.destroy=function(){this._pickOffscreenView=this._pickOffscreenView&&this._pickOffscreenView.destroy()},t.a=L},function(e,t,i){"use strict";var n=i(16),a=i(0),r=i(19),o=i(33),s=i(91),l=i(32),u=i(39),d=i(45);function c(){this._framebuffer=void 0,this._depthTexture=void 0,this._textureToCopy=void 0,this._copyDepthCommand=void 0}function f(e){e._depthTexture=e._depthTexture&&!e._depthTexture.isDestroyed()&&e._depthTexture.destroy()}function h(e){e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy()}function p(e,t,i,n){f(e),h(e),function(e,t,i,n){e._depthTexture=new d.default({context:t,width:i,height:n,pixelFormat:o.default.RGBA,pixelDatatype:l.default.UNSIGNED_BYTE})}(e,t,i,n),e._framebuffer=new s.default({context:t,colorTextures:[e._depthTexture],destroyAttachments:!1})}c.prototype.update=function(e,t){!function(e,t,i){var n=i.width,r=i.height,o=e._depthTexture,s=!Object(a.default)(o)||o.width!==n||o.height!==r;Object(a.default)(e._framebuffer)&&!s||p(e,t,n,r)}(this,e,t),function(e,t,i){if(!Object(a.default)(e._copyDepthCommand)){e._copyDepthCommand=t.createViewportQuadCommand("uniform highp sampler2D u_texture;\nvarying vec2 v_textureCoordinates;\nvoid main()\n{\n gl_FragColor = czm_packDepth(texture2D(u_texture, v_textureCoordinates).r);\n}\n",{renderState:u.default.fromCache(),uniformMap:{u_texture:function(){return e._textureToCopy}},owner:e})}e._textureToCopy=i,e._copyDepthCommand.framebuffer=e._framebuffer}(this,e,t)};var m=new n.a,_=new n.a(1,1/255,1/65025,1/16581375);c.prototype.getDepth=function(e,t,i){if(Object(a.default)(this._framebuffer)){var r=e.readPixels({x:t,y:i,width:1,height:1,framebuffer:this._framebuffer}),o=n.a.unpack(r,0,m);return n.a.divideByScalar(o,255,o),n.a.dot(o,_)}},c.prototype.executeCopyDepth=function(e,t){this._copyDepthCommand.execute(e,t)},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return f(this),h(this),Object(a.default)(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=Object(a.default)(this._copyDepthCommand.shaderProgram)&&this._copyDepthCommand.shaderProgram.destroy()),Object(r.default)(this)},t.a=c},function(e,t,i){"use strict";var n=i(2),a=i(26);t.a=function(e,t){this.near=Object(n.default)(e,0),this.far=Object(n.default)(t,0);for(var i=a.default.NUMBER_OF_PASSES,r=new Array(i),o=new Array(i),s=0;s<i;++s)r[s]=[],o[s]=0;this.commands=r,this.indices=o}},function(e,t,i){"use strict";var n=i(41),a=i(7),r=i(0),o=i(19),s=i(33),l=i(108),u=i(91),d=i(32),c=i(39),f=i(58),h=i(45),p=i(244),m=i(405),_=i(74),g=i(81),v=i(122),y=i(66);function b(){this._globeColorTexture=void 0,this._primitiveColorTexture=void 0,this._depthStencilTexture=void 0,this._globeDepthTexture=void 0,this._tempGlobeDepthTexture=void 0,this._tempCopyDepthTexture=void 0,this._globeColorFramebuffer=void 0,this._primitiveColorFramebuffer=void 0,this._copyDepthFramebuffer=void 0,this._tempCopyDepthFramebuffer=void 0,this._updateDepthFramebuffer=void 0,this._clearGlobeColorCommand=void 0,this._clearPrimitiveColorCommand=void 0,this._copyColorCommand=void 0,this._copyDepthCommand=void 0,this._tempCopyDepthCommand=void 0,this._updateDepthCommand=void 0,this._mergeColorCommand=void 0,this._viewport=new n.a,this._rs=void 0,this._rsBlend=void 0,this._rsUpdate=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0,this._clearGlobeDepth=void 0}function w(e){e._globeColorTexture=e._globeColorTexture&&!e._globeColorTexture.isDestroyed()&&e._globeColorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._globeDepthTexture=e._globeDepthTexture&&!e._globeDepthTexture.isDestroyed()&&e._globeDepthTexture.destroy()}function O(e){e._globeColorFramebuffer=e._globeColorFramebuffer&&!e._globeColorFramebuffer.isDestroyed()&&e._globeColorFramebuffer.destroy(),e._copyDepthFramebuffer=e._copyDepthFramebuffer&&!e._copyDepthFramebuffer.isDestroyed()&&e._copyDepthFramebuffer.destroy()}function x(e){e._tempCopyDepthFramebuffer=e._tempCopyDepthFramebuffer&&!e._tempCopyDepthFramebuffer.isDestroyed()&&e._tempCopyDepthFramebuffer.destroy(),e._updateDepthFramebuffer=e._updateDepthFramebuffer&&!e._updateDepthFramebuffer.isDestroyed()&&e._updateDepthFramebuffer.destroy(),e._tempGlobeDepthTexture=e._tempGlobeDepthTexture&&!e._tempGlobeDepthTexture.isDestroyed()&&e._tempGlobeDepthTexture.destroy()}function A(e){e._primitiveColorTexture=e._primitiveColorTexture&&!e._primitiveColorTexture.isDestroyed()&&e._primitiveColorTexture.destroy(),e._primitiveColorFramebuffer=e._primitiveColorFramebuffer&&!e._primitiveColorFramebuffer.isDestroyed()&&e._primitiveColorFramebuffer.destroy()}function T(e,t,i,n,a,o){var l=e._globeColorTexture,c=!Object(r.default)(l)||l.width!==i||l.height!==n||a!==e._useHdr;c&&(w(e),O(e),function(e,t,i,n,a){var r=a?t.halfFloatingPointTexture?d.default.HALF_FLOAT:d.default.FLOAT:d.default.UNSIGNED_BYTE;e._globeColorTexture=new h.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:r,sampler:f.default.NEAREST}),e._depthStencilTexture=new h.default({context:t,width:i,height:n,pixelFormat:s.default.DEPTH_STENCIL,pixelDatatype:d.default.UNSIGNED_INT_24_8}),e._globeDepthTexture=new h.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:d.default.UNSIGNED_BYTE,sampler:f.default.NEAREST})}(e,t,i,n,a),function(e,t){e._globeColorFramebuffer=new u.default({context:t,colorTextures:[e._globeColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._copyDepthFramebuffer=new u.default({context:t,colorTextures:[e._globeDepthTexture],destroyAttachments:!1})}(e,t)),(c||o!==e._clearGlobeDepth)&&(A(e),o&&function(e,t,i,n,a){var r=a?t.halfFloatingPointTexture?d.default.HALF_FLOAT:d.default.FLOAT:d.default.UNSIGNED_BYTE;e._primitiveColorTexture=new h.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:r,sampler:f.default.NEAREST}),e._primitiveColorFramebuffer=new u.default({context:t,colorTextures:[e._primitiveColorTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1})}(e,t,i,n,a))}function E(e,t,i,o,s){e._viewport.width=i,e._viewport.height=o;var u=!n.a.equals(e._viewport,s.viewport),d=u!==e._useScissorTest;e._useScissorTest=u,n.a.equals(e._scissorRectangle,s.viewport)||(e._scissorRectangle=n.a.clone(s.viewport,e._scissorRectangle),d=!0),Object(r.default)(e._rs)&&n.a.equals(e._viewport,e._rs.viewport)&&!d||(e._rs=c.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}}),e._rsBlend=c.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:_.default.ALPHA_BLEND}),e._rsUpdate=c.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:v.a.EQUAL,frontOperation:{fail:y.a.KEEP,zFail:y.a.KEEP,zPass:y.a.KEEP},backFunction:v.a.NEVER,reference:g.a.CESIUM_3D_TILE_MASK,mask:g.a.CESIUM_3D_TILE_MASK}})),Object(r.default)(e._copyDepthCommand)||(e._copyDepthCommand=t.createViewportQuadCommand(m.a,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),e._copyDepthCommand.framebuffer=e._copyDepthFramebuffer,e._copyDepthCommand.renderState=e._rs,Object(r.default)(e._copyColorCommand)||(e._copyColorCommand=t.createViewportQuadCommand(p.a,{uniformMap:{colorTexture:function(){return e._globeColorTexture}},owner:e})),e._copyColorCommand.renderState=e._rs,Object(r.default)(e._tempCopyDepthCommand)||(e._tempCopyDepthCommand=t.createViewportQuadCommand(m.a,{uniformMap:{u_depthTexture:function(){return e._tempCopyDepthTexture}},owner:e})),e._tempCopyDepthCommand.framebuffer=e._tempCopyDepthFramebuffer,e._tempCopyDepthCommand.renderState=e._rs,Object(r.default)(e._updateDepthCommand)||(e._updateDepthCommand=t.createViewportQuadCommand(p.a,{uniformMap:{colorTexture:function(){return e._tempGlobeDepthTexture}},owner:e})),e._updateDepthCommand.framebuffer=e._updateDepthFramebuffer,e._updateDepthCommand.renderState=e._rsUpdate,Object(r.default)(e._clearGlobeColorCommand)||(e._clearGlobeColorCommand=new l.default({color:new a.default(0,0,0,0),stencil:0,owner:e})),e._clearGlobeColorCommand.framebuffer=e._globeColorFramebuffer,Object(r.default)(e._clearPrimitiveColorCommand)||(e._clearPrimitiveColorCommand=new l.default({color:new a.default(0,0,0,0),stencil:0,owner:e})),e._clearPrimitiveColorCommand.framebuffer=e._primitiveColorFramebuffer,Object(r.default)(e._mergeColorCommand)||(e._mergeColorCommand=t.createViewportQuadCommand(p.a,{uniformMap:{colorTexture:function(){return e._primitiveColorTexture}},owner:e})),e._mergeColorCommand.framebuffer=e._globeColorFramebuffer,e._mergeColorCommand.renderState=e._rsBlend}Object.defineProperties(b.prototype,{framebuffer:{get:function(){return this._globeColorFramebuffer}},primitiveFramebuffer:{get:function(){return this._primitiveColorFramebuffer}}}),b.prototype.update=function(e,t,i,n,a){var r=i.width,o=i.height;T(this,e,r,o,n,a),E(this,e,r,o,t),e.uniformState.globeDepthTexture=void 0,this._useHdr=n,this._clearGlobeDepth=a},b.prototype.executeCopyDepth=function(e,t){Object(r.default)(this._copyDepthCommand)&&(this._copyDepthCommand.execute(e,t),e.uniformState.globeDepthTexture=this._globeDepthTexture)},b.prototype.executeUpdateDepth=function(e,t,i){var n=t.framebuffer.depthStencilTexture;if(i||n!==this._depthStencilTexture){if(Object(r.default)(this._updateDepthCommand)){if(!Object(r.default)(this._updateDepthFramebuffer)||this._updateDepthFramebuffer.depthStencilTexture!==n||this._updateDepthFramebuffer.getColorTexture(0)!==this._globeDepthTexture){var a=this._globeDepthTexture.width,o=this._globeDepthTexture.height;x(this),function(e,t,i,n,a){e._tempGlobeDepthTexture=new h.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:d.default.UNSIGNED_BYTE,sampler:f.default.NEAREST}),e._tempCopyDepthFramebuffer=new u.default({context:t,colorTextures:[e._tempGlobeDepthTexture],destroyAttachments:!1}),e._updateDepthFramebuffer=new u.default({context:t,colorTextures:[e._globeDepthTexture],depthStencilTexture:a.framebuffer.depthStencilTexture,destroyAttachments:!1})}(this,e,a,o,t),E(this,e,a,o,t)}this._tempCopyDepthTexture=n,this._tempCopyDepthCommand.execute(e,t),this._updateDepthCommand.execute(e,t)}}else Object(r.default)(this._copyDepthCommand)&&this._copyDepthCommand.execute(e,t)},b.prototype.executeCopyColor=function(e,t){Object(r.default)(this._copyColorCommand)&&this._copyColorCommand.execute(e,t)},b.prototype.executeMergeColor=function(e,t){Object(r.default)(this._mergeColorCommand)&&this._mergeColorCommand.execute(e,t)},b.prototype.clear=function(e,t,i){var n=this._clearGlobeColorCommand;Object(r.default)(n)&&(a.default.clone(i,n.color),n.execute(e,t)),n=this._clearPrimitiveColorCommand,Object(r.default)(n)&&Object(r.default)(this._primitiveColorFramebuffer)&&n.execute(e,t)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return w(this),O(this),A(this),x(this),Object(r.default)(this._copyColorCommand)&&(this._copyColorCommand.shaderProgram=this._copyColorCommand.shaderProgram.destroy()),Object(r.default)(this._copyDepthCommand)&&(this._copyDepthCommand.shaderProgram=this._copyDepthCommand.shaderProgram.destroy()),Object(r.default)(this._tempCopyDepthCommand)&&(this._tempCopyDepthCommand.shaderProgram=this._tempCopyDepthCommand.shaderProgram.destroy()),Object(r.default)(this._updateDepthCommand)&&(this._updateDepthCommand.shaderProgram=this._updateDepthCommand.shaderProgram.destroy()),Object(r.default)(this._mergeColorCommand)&&(this._mergeColorCommand.shaderProgram=this._mergeColorCommand.shaderProgram.destroy()),Object(o.default)(this)},t.a=b},function(e,t,i){"use strict";var n=i(41),a=i(7),r=i(0),o=i(19),s=i(33),l=i(108),u=i(91),d=i(32),c=i(268),f=i(228),h=i(39),p=i(58),m=i(45),_=i(405);function g(){this._colorTexture=void 0,this._depthStencilTexture=void 0,this._depthStencilRenderbuffer=void 0,this._framebuffer=void 0,this._packedDepthTexture=void 0,this._packedDepthFramebuffer=void 0,this._renderState=void 0,this._packedDepthCommand=void 0,this._clearCommand=void 0,this._viewport=new n.a,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHdr=void 0}function v(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._depthStencilTexture=e._depthStencilTexture&&!e._depthStencilTexture.isDestroyed()&&e._depthStencilTexture.destroy(),e._depthStencilRenderbuffer=e._depthStencilRenderbuffer&&!e._depthStencilRenderbuffer.isDestroyed()&&e._depthStencilRenderbuffer.destroy(),e._framebuffer=e._framebuffer&&!e._framebuffer.isDestroyed()&&e._framebuffer.destroy(),e._packedDepthTexture=e._packedDepthTexture&&!e._packedDepthTexture.isDestroyed()&&e._packedDepthTexture.destroy(),e._packedDepthFramebuffer=e._packedDepthFramebuffer&&!e._packedDepthFramebuffer.isDestroyed()&&e._packedDepthFramebuffer.destroy()}function y(e,t,i,n,a){var o=e._colorTexture;(!Object(r.default)(o)||o.width!==i||o.height!==n||a!==e._useHdr)&&(v(e),function(e,t,i,n,a){var r=a?t.halfFloatingPointTexture?d.default.HALF_FLOAT:d.default.FLOAT:d.default.UNSIGNED_BYTE;e._colorTexture=new m.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:r,sampler:p.default.NEAREST}),t.depthTexture?e._depthStencilTexture=new m.default({context:t,width:i,height:n,pixelFormat:s.default.DEPTH_STENCIL,pixelDatatype:d.default.UNSIGNED_INT_24_8}):e._depthStencilRenderbuffer=new c.a({context:t,width:i,height:n,format:f.a.DEPTH_STENCIL}),e._framebuffer=new u.default({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._depthStencilTexture,depthStencilRenderbuffer:e._depthStencilRenderbuffer,destroyAttachments:!1}),e._packedDepthTexture=new m.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:d.default.UNSIGNED_BYTE,sampler:p.default.NEAREST}),e._packedDepthFramebuffer=new u.default({context:t,colorTextures:[e._packedDepthTexture],destroyAttachments:!1})}(e,t,i,n,a))}Object.defineProperties(g.prototype,{classificationTexture:{get:function(){return this._colorTexture}},classificationFramebuffer:{get:function(){return this._framebuffer}}}),g.prototype.updateAndClear=function(e,t,i,o){var s=t.width,u=t.height;y(this,i,s,u,e),function(e,t,i,o,s){e._viewport.width=i,e._viewport.height=o;var u=!n.a.equals(e._viewport,s.viewport),d=u!==e._useScissorTest;e._useScissorTest=u,n.a.equals(e._scissorRectangle,s.viewport)||(e._scissorRectangle=n.a.clone(s.viewport,e._scissorRectangle),d=!0),Object(r.default)(e._renderState)&&n.a.equals(e._viewport,e._renderState.viewport)&&!d||(e._renderState=h.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),Object(r.default)(e._packedDepthCommand)||(e._packedDepthCommand=t.createViewportQuadCommand(_.a,{uniformMap:{u_depthTexture:function(){return e._depthStencilTexture}},owner:e})),Object(r.default)(e._clearCommand)||(e._clearCommand=new l.default({color:new a.default(0,0,0,0),depth:1,stencil:0,owner:e})),e._packedDepthCommand.framebuffer=e._packedDepthFramebuffer,e._packedDepthCommand.renderState=e._renderState,e._clearCommand.framebuffer=e._framebuffer,e._clearCommand.renderState=e._renderState}(this,i,s,u,o),this._useHdr=e},g.prototype.clearClassification=function(e,t){this._clearCommand.execute(e,t)},g.prototype.packDepth=function(e,t){return this._packedDepthCommand.execute(e,t),this._packedDepthTexture},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return v(this),Object(o.default)(this)},t.a=g},function(e,t,i){"use strict";var n=i(41),a=i(7),r=i(0),o=i(19),s=i(33),l=i(10),u=i(108),d=i(44),c=i(91),f=i(32),h=i(39),p=i(34),m=i(45),_=i(515),g=i(790),v=i(220),y=i(155);function b(e){this._translucentMultipassSupport=!1,this._translucentMRTSupport=!1;var t=e.colorBufferFloat&&e.depthTexture;this._translucentMRTSupport=e.drawBuffers&&t,this._translucentMultipassSupport=!this._translucentMRTSupport&&t,this._opaqueFBO=void 0,this._opaqueTexture=void 0,this._depthStencilTexture=void 0,this._accumulationTexture=void 0,this._translucentFBO=void 0,this._alphaFBO=void 0,this._adjustTranslucentFBO=void 0,this._adjustAlphaFBO=void 0,this._opaqueClearCommand=new u.default({color:new a.default(0,0,0,0),owner:this}),this._translucentMRTClearCommand=new u.default({color:new a.default(0,0,0,1),owner:this}),this._translucentMultipassClearCommand=new u.default({color:new a.default(0,0,0,0),owner:this}),this._alphaClearCommand=new u.default({color:new a.default(1,1,1,1),owner:this}),this._translucentRenderStateCache={},this._alphaRenderStateCache={},this._compositeCommand=void 0,this._adjustTranslucentCommand=void 0,this._adjustAlphaCommand=void 0,this._viewport=new n.a,this._rs=void 0,this._useScissorTest=!1,this._scissorRectangle=void 0,this._useHDR=!1}function w(e){e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._revealageTexture=e._revealageTexture&&!e._revealageTexture.isDestroyed()&&e._revealageTexture.destroy()}function O(e){e._translucentFBO=e._translucentFBO&&!e._translucentFBO.isDestroyed()&&e._translucentFBO.destroy(),e._alphaFBO=e._alphaFBO&&!e._alphaFBO.isDestroyed()&&e._alphaFBO.destroy(),e._adjustTranslucentFBO=e._adjustTranslucentFBO&&!e._adjustTranslucentFBO.isDestroyed()&&e._adjustTranslucentFBO.destroy(),e._adjustAlphaFBO=e._adjustAlphaFBO&&!e._adjustAlphaFBO.isDestroyed()&&e._adjustAlphaFBO.destroy()}function x(e){w(e),O(e)}b.prototype.update=function(e,t,i,a){if(this.isSupported()){this._opaqueFBO=i,this._opaqueTexture=i.getColorTexture(0),this._depthStencilTexture=i.depthStencilTexture;var o=this._opaqueTexture.width,u=this._opaqueTexture.height,d=this._accumulationTexture,v=!Object(r.default)(d)||d.width!==o||d.height!==u||a!==this._useHDR;if(v&&function(e,t,i,n){w(e),e._accumulationTexture=new m.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:f.default.FLOAT});var a=new Float32Array(i*n*4);e._revealageTexture=new m.default({context:t,pixelFormat:s.default.RGBA,pixelDatatype:f.default.FLOAT,source:{arrayBufferView:a,width:i,height:n},flipY:!1})}(this,e,o,u),Object(r.default)(this._translucentFBO)&&!v||function(e,t){O(e);var i=l.a.FRAMEBUFFER_COMPLETE,n=!0;if(e._translucentMRTSupport&&(e._translucentFBO=new c.default({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new c.default({context:t,colorTextures:[e._accumulationTexture,e._revealageTexture],destroyAttachments:!1}),e._translucentFBO.status===i&&e._adjustTranslucentFBO.status===i||(O(e),e._translucentMRTSupport=!1)),!e._translucentMRTSupport){e._translucentFBO=new c.default({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._alphaFBO=new c.default({context:t,colorTextures:[e._revealageTexture],depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1}),e._adjustTranslucentFBO=new c.default({context:t,colorTextures:[e._accumulationTexture],destroyAttachments:!1}),e._adjustAlphaFBO=new c.default({context:t,colorTextures:[e._revealageTexture],destroyAttachments:!1});var a=e._translucentFBO.status===i,r=e._alphaFBO.status===i,o=e._adjustTranslucentFBO.status===i,s=e._adjustAlphaFBO.status===i;a&&r&&o&&s||(x(e),e._translucentMultipassSupport=!1,n=!1)}return n}(this,e)){this._useHDR=a;var y,b,A=this;Object(r.default)(this._compositeCommand)||(y=new p.default({sources:[g.a]}),this._translucentMRTSupport&&y.defines.push("MRT"),b={u_opaque:function(){return A._opaqueTexture},u_accumulation:function(){return A._accumulationTexture},u_revealage:function(){return A._revealageTexture}},this._compositeCommand=e.createViewportQuadCommand(y,{uniformMap:b,owner:this})),Object(r.default)(this._adjustTranslucentCommand)||(this._translucentMRTSupport?(y=new p.default({defines:["MRT"],sources:[_.a]}),b={u_bgColor:function(){return A._translucentMRTClearCommand.color},u_depthTexture:function(){return A._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(y,{uniformMap:b,owner:this})):this._translucentMultipassSupport&&(y=new p.default({sources:[_.a]}),b={u_bgColor:function(){return A._translucentMultipassClearCommand.color},u_depthTexture:function(){return A._depthStencilTexture}},this._adjustTranslucentCommand=e.createViewportQuadCommand(y,{uniformMap:b,owner:this}),b={u_bgColor:function(){return A._alphaClearCommand.color},u_depthTexture:function(){return A._depthStencilTexture}},this._adjustAlphaCommand=e.createViewportQuadCommand(y,{uniformMap:b,owner:this}))),this._viewport.width=o,this._viewport.height=u;var T=!n.a.equals(this._viewport,t.viewport),E=T!==this._useScissorTest;this._useScissorTest=T,n.a.equals(this._scissorRectangle,t.viewport)||(this._scissorRectangle=n.a.clone(t.viewport,this._scissorRectangle),E=!0),Object(r.default)(this._rs)&&n.a.equals(this._viewport,this._rs.viewport)&&!E||(this._rs=h.default.fromCache({viewport:this._viewport,scissorTest:{enabled:this._useScissorTest,rectangle:this._scissorRectangle}})),Object(r.default)(this._compositeCommand)&&(this._compositeCommand.renderState=this._rs),this._adjustTranslucentCommand&&(this._adjustTranslucentCommand.renderState=this._rs),Object(r.default)(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.renderState=this._rs)}}};var A={enabled:!0,color:new a.default(0,0,0,0),equationRgb:v.a.ADD,equationAlpha:v.a.ADD,functionSourceRgb:y.a.ONE,functionDestinationRgb:y.a.ONE,functionSourceAlpha:y.a.ZERO,functionDestinationAlpha:y.a.ONE_MINUS_SOURCE_ALPHA},T={enabled:!0,color:new a.default(0,0,0,0),equationRgb:v.a.ADD,equationAlpha:v.a.ADD,functionSourceRgb:y.a.ONE,functionDestinationRgb:y.a.ONE,functionSourceAlpha:y.a.ONE,functionDestinationAlpha:y.a.ONE},E={enabled:!0,color:new a.default(0,0,0,0),equationRgb:v.a.ADD,equationAlpha:v.a.ADD,functionSourceRgb:y.a.ZERO,functionDestinationRgb:y.a.ONE_MINUS_SOURCE_ALPHA,functionSourceAlpha:y.a.ZERO,functionDestinationAlpha:y.a.ONE_MINUS_SOURCE_ALPHA};function C(e,t,i,n){var a=i[n.id];if(!Object(r.default)(a)){var o=h.default.getState(n);o.depthMask=!1,o.blending=t,a=h.default.fromCache(o),i[n.id]=a}return a}function S(e,t,i,n){var a=e.shaderCache.getDerivedShaderProgram(t,i);if(!Object(r.default)(a)){var o=t._attributeLocations,s=t.fragmentShaderSource.clone();s.sources=s.sources.map((function(e){return e=(e=(e=(e=p.default.replaceMain(e,"czm_translucent_main")).replace(/gl_FragColor/g,"czm_gl_FragColor")).replace(/\bdiscard\b/g,"czm_discard = true")).replace(/czm_phong/g,"czm_translucentPhong")})),s.sources.splice(0,0,(-1!==n.indexOf("gl_FragData")?"#extension GL_EXT_draw_buffers : enable \n":"")+"vec4 czm_gl_FragColor;\nbool czm_discard = false;\n"),s.sources.push("void main()\n{\n czm_translucent_main();\n if (czm_discard)\n {\n discard;\n }\n"+n+"}\n"),a=e.shaderCache.createDerivedShaderProgram(t,i,{vertexShaderSource:t.vertexShaderSource,fragmentShaderSource:s,attributeLocations:o})}return a}b.prototype.createDerivedCommands=function(e,t,i){var n,a,o,s,l,u,c,f;(Object(r.default)(i)||(i={}),this._translucentMRTSupport)?(Object(r.default)(i.translucentCommand)&&(n=i.translucentCommand.shaderProgram,a=i.translucentCommand.renderState),i.translucentCommand=d.default.shallowClone(e,i.translucentCommand),Object(r.default)(n)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=n,i.translucentCommand.renderState=a):(i.translucentCommand.shaderProgram=function(e,t){return S(e,t,"translucentMRT"," vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragData[0] = vec4(Ci * wzi, ai);\n gl_FragData[1] = vec4(ai * wzi);\n")}(t,e.shaderProgram),i.translucentCommand.renderState=(c=this,f=e.renderState,C(0,A,c._translucentRenderStateCache,f)),i.shaderProgramId=e.shaderProgram.id)):(Object(r.default)(i.translucentCommand)&&(o=i.translucentCommand.shaderProgram,s=i.translucentCommand.renderState,l=i.alphaCommand.shaderProgram,u=i.alphaCommand.renderState),i.translucentCommand=d.default.shallowClone(e,i.translucentCommand),i.alphaCommand=d.default.shallowClone(e,i.alphaCommand),Object(r.default)(o)&&i.shaderProgramId===e.shaderProgram.id?(i.translucentCommand.shaderProgram=o,i.translucentCommand.renderState=s,i.alphaCommand.shaderProgram=l,i.alphaCommand.renderState=u):(i.translucentCommand.shaderProgram=function(e,t){return S(e,t,"translucentMultipass"," vec3 Ci = czm_gl_FragColor.rgb * czm_gl_FragColor.a;\n float ai = czm_gl_FragColor.a;\n float wzi = czm_alphaWeight(ai);\n gl_FragColor = vec4(Ci, ai) * wzi;\n")}(t,e.shaderProgram),i.translucentCommand.renderState=function(e,t,i){return C(0,T,e._translucentRenderStateCache,i)}(this,0,e.renderState),i.alphaCommand.shaderProgram=function(e,t){return S(e,t,"alphaMultipass"," float ai = czm_gl_FragColor.a;\n gl_FragColor = vec4(ai);\n")}(t,e.shaderProgram),i.alphaCommand.renderState=function(e,t,i){return C(0,E,e._alphaRenderStateCache,i)}(this,0,e.renderState),i.shaderProgramId=e.shaderProgram.id));return i},b.prototype.executeCommands=function(e,t,i,n,a){this._translucentMRTSupport?function(e,t,i,n,a,o){var s=t.context,l=t.frameState.useLogDepth,u=t._hdr,d=n.framebuffer,c=a.length,f=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(s,n);var h,p=e._opaqueFBO;n.framebuffer=e._translucentFBO;for(var m=0;m<c;++m)h=a[m],h=l?h.derivedCommands.logDepth.command:h,h=u?h.derivedCommands.hdr.command:h,i(f&&h.receiveShadows?h.derivedCommands.oit.shadows.translucentCommand:h.derivedCommands.oit.translucentCommand,t,s,n,p);Object(r.default)(o)&&(h=o.unclassifiedCommand,i(f&&h.receiveShadows?h.derivedCommands.oit.shadows.translucentCommand:h.derivedCommands.oit.translucentCommand,t,s,n,p)),n.framebuffer=d}(this,e,t,i,n,a):function(e,t,i,n,a,o){var s,l,u=t.context,d=t.frameState.useLogDepth,c=t._hdr,f=n.framebuffer,h=a.length,p=t.frameState.shadowState.lightShadowsEnabled;n.framebuffer=e._adjustTranslucentFBO,e._adjustTranslucentCommand.execute(u,n),n.framebuffer=e._adjustAlphaFBO,e._adjustAlphaCommand.execute(u,n);var m=e._opaqueFBO;for(n.framebuffer=e._translucentFBO,l=0;l<h;++l)s=a[l],s=d?s.derivedCommands.logDepth.command:s,s=c?s.derivedCommands.hdr.command:s,i(p&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,t,u,n,m);for(Object(r.default)(o)&&(s=o.unclassifiedCommand,i(p&&s.receiveShadows?s.derivedCommands.oit.shadows.translucentCommand:s.derivedCommands.oit.translucentCommand,t,u,n,m)),n.framebuffer=e._alphaFBO,l=0;l<h;++l)s=a[l],s=d?s.derivedCommands.logDepth.command:s,s=c?s.derivedCommands.hdr.command:s,i(p&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,t,u,n,m);Object(r.default)(o)&&(s=o.unclassifiedCommand,i(p&&s.receiveShadows?s.derivedCommands.oit.shadows.alphaCommand:s.derivedCommands.oit.alphaCommand,t,u,n,m)),n.framebuffer=f}(this,e,t,i,n,a)},b.prototype.execute=function(e,t){this._compositeCommand.execute(e,t)},b.prototype.clear=function(e,t,i){var n=t.framebuffer;t.framebuffer=this._opaqueFBO,a.default.clone(i,this._opaqueClearCommand.color),this._opaqueClearCommand.execute(e,t),t.framebuffer=this._translucentFBO,(this._translucentMRTSupport?this._translucentMRTClearCommand:this._translucentMultipassClearCommand).execute(e,t),this._translucentMultipassSupport&&(t.framebuffer=this._alphaFBO,this._alphaClearCommand.execute(e,t)),t.framebuffer=n},b.prototype.isSupported=function(){return this._translucentMRTSupport||this._translucentMultipassSupport},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return x(this),Object(r.default)(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),Object(r.default)(this._adjustTranslucentCommand)&&(this._adjustTranslucentCommand.shaderProgram=this._adjustTranslucentCommand.shaderProgram&&this._adjustTranslucentCommand.shaderProgram.destroy()),Object(r.default)(this._adjustAlphaCommand)&&(this._adjustAlphaCommand.shaderProgram=this._adjustAlphaCommand.shaderProgram&&this._adjustAlphaCommand.shaderProgram.destroy()),Object(o.default)(this)},t.a=b},function(e,t,i){"use strict";t.a="/**\n * Compositing for Weighted Blended Order-Independent Transparency. See:\n * - http://jcgt.org/published/0002/02/09/\n * - http://casual-effects.blogspot.com/2014/03/weighted-blended-order-independent.html\n */\n\nuniform sampler2D u_opaque;\nuniform sampler2D u_accumulation;\nuniform sampler2D u_revealage;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 opaque = texture2D(u_opaque, v_textureCoordinates);\n vec4 accum = texture2D(u_accumulation, v_textureCoordinates);\n float r = texture2D(u_revealage, v_textureCoordinates).r;\n\n#ifdef MRT\n vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);\n#else\n vec4 transparent = vec4(accum.rgb / clamp(accum.a, 1e-4, 5e4), r);\n#endif\n\n gl_FragColor = (1.0 - transparent.a) * transparent + transparent.a * opaque;\n\n if (opaque != czm_backgroundColor)\n {\n gl_FragColor.a = 1.0;\n }\n}\n"},function(e,t,i){"use strict";var n=i(41),a=i(0),r=i(19),o=i(33),s=i(91),l=i(226),u=i(32),d=i(45);function c(){this._depthStencilTexture=void 0,this._framebuffer=void 0,this._passState=void 0}function f(e){e._framebuffer=e._framebuffer&&e._framebuffer.destroy(),e._depthStencilTexture=e._depthStencilTexture&&e._depthStencilTexture.destroy()}c.prototype.update=function(e,t,i){var r=i.width,c=i.height;Object(a.default)(this._framebuffer)&&r===this._depthStencilTexture.width&&c===this._depthStencilTexture.height||(f(this),function(e,t){var i=t.drawingBufferWidth,a=t.drawingBufferHeight;e._depthStencilTexture=new d.default({context:t,width:i,height:a,pixelFormat:o.default.DEPTH_STENCIL,pixelDatatype:u.default.UNSIGNED_INT_24_8}),e._framebuffer=new s.default({context:t,depthStencilTexture:e._depthStencilTexture,destroyAttachments:!1});var r=new l.a(t);r.blendingEnabled=!1,r.scissorTest={enabled:!0,rectangle:new n.a},r.viewport=new n.a,e._passState=r}(this,e));var h=this._framebuffer,p=this._passState;return p.framebuffer=h,p.viewport.width=r,p.viewport.height=c,p.scissorTest.rectangle.x=t.x,p.scissorTest.rectangle.y=c-t.y,p.scissorTest.rectangle.width=1,p.scissorTest.rectangle.height=1,p},c.prototype.isDestroyed=function(){return!1},c.prototype.destroy=function(){return f(this),Object(r.default)(this)},t.a=c},function(e,t,i){"use strict";var n=i(41),a=i(7),r=i(2),o=i(0),s=i(19),l=i(91),u=i(226),d=i(268),c=i(228),f=i(45);function h(e){var t=new u.a(e);t.blendingEnabled=!1,t.scissorTest={enabled:!0,rectangle:new n.a},t.viewport=new n.a,this._context=e,this._fb=void 0,this._passState=t,this._width=0,this._height=0}h.prototype.begin=function(e,t){var i=this._context,a=t.width,r=t.height;return n.a.clone(e,this._passState.scissorTest.rectangle),Object(o.default)(this._fb)&&this._width===a&&this._height===r||(this._width=a,this._height=r,this._fb=this._fb&&this._fb.destroy(),this._fb=new l.default({context:i,colorTextures:[new f.default({context:i,width:a,height:r})],depthStencilRenderbuffer:new d.a({context:i,width:a,height:r,format:c.a.DEPTH_STENCIL})}),this._passState.framebuffer=this._fb),this._passState.viewport.width=a,this._passState.viewport.height=r,this._passState};var p=new a.default;h.prototype.end=function(e){for(var t=Object(r.default)(e.width,1),i=Object(r.default)(e.height,1),n=this._context,s=n.readPixels({x:e.x,y:e.y,width:t,height:i,framebuffer:this._fb}),l=Math.max(t,i),u=l*l,d=Math.floor(.5*t),c=Math.floor(.5*i),f=0,h=0,m=0,_=-1,g=0;g<u;++g){if(-d<=f&&f<=d&&-c<=h&&h<=c){var v=4*((c-h)*t+f+d);p.red=a.default.byteToFloat(s[v]),p.green=a.default.byteToFloat(s[v+1]),p.blue=a.default.byteToFloat(s[v+2]),p.alpha=a.default.byteToFloat(s[v+3]);var y=n.getObjectByPickColor(p);if(Object(o.default)(y))return y}if(f===h||f<0&&-f===h||f>0&&f===1-h){var b=m;m=-_,_=b}f+=m,h+=_}},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){return this._fb=this._fb&&this._fb.destroy(),Object(s.default)(this)},t.a=h},function(e,t,i){"use strict";var n=i(41),a=i(7),r=i(0),o=i(19),s=i(33),l=i(108),u=i(44),d=i(91),c=i(26),f=i(32),h=i(39),p=i(58),m=i(34),_=i(45),g=i(794),v=i(481),y=i(74),b=i(81),w=i(122);function O(e){this._drawClassificationFBO=void 0,this._accumulationFBO=void 0,this._packFBO=void 0,this._opaqueDepthStencilTexture=void 0,this._colorTexture=void 0,this._accumulationTexture=void 0,this._textureToComposite=void 0,this._translucentDepthStencilTexture=void 0,this._packedTranslucentDepth=void 0,this._packDepthCommand=void 0,this._accumulateCommand=void 0,this._compositeCommand=void 0,this._copyCommand=void 0,this._clearColorCommand=new l.default({color:new a.default(0,0,0,0),owner:this}),this._clearDepthStencilCommand=new l.default({depth:1,stencil:0,owner:this}),this._supported=e.depthTexture,this._viewport=new n.a,this._rsDepth=void 0,this._rsAccumulate=void 0,this._rsComp=void 0,this._useScissorTest=void 0,this._scissorRectangle=void 0,this._hasTranslucentDepth=!1,this._frustumsDrawn=0}function x(e){e._colorTexture=e._colorTexture&&!e._colorTexture.isDestroyed()&&e._colorTexture.destroy(),e._accumulationTexture=e._accumulationTexture&&!e._accumulationTexture.isDestroyed()&&e._accumulationTexture.destroy(),e._textureToComposite=void 0,e._translucentDepthStencilTexture=e._translucentDepthStencilTexture&&!e._translucentDepthStencilTexture.isDestroyed()&&e._translucentDepthStencilTexture.destroy(),e._packedTranslucentDepth=e._packedTranslucentDepth&&!e._packedTranslucentDepth.isDestroyed()&&e._packedTranslucentDepth.destroy()}function A(e){e._drawClassificationFBO=e._drawClassificationFBO&&!e._drawClassificationFBO.isDestroyed()&&e._drawClassificationFBO.destroy(),e._accumulationFBO=e._accumulationFBO&&!e._accumulationFBO.isDestroyed()&&e._accumulationFBO.destroy(),e._packFBO=e._packFBO&&!e._packFBO.isDestroyed()&&e._packFBO.destroy()}function T(e,t,i){return new _.default({context:e,width:t,height:i,pixelFormat:s.default.RGBA,pixelDatatype:f.default.UNSIGNED_BYTE,sampler:p.default.NEAREST})}function E(e,t,i,a){if(e.isSupported()){e._opaqueDepthStencilTexture=a.depthStencilTexture;var o,l,c=e._opaqueDepthStencilTexture.width,O=e._opaqueDepthStencilTexture.height,E=e._colorTexture,C=!Object(r.default)(E)||E.width!==c||E.height!==O;if(C&&function(e,t,i,n){x(e),e._colorTexture=T(t,i,n),e._accumulationTexture=T(t,i,n),e._translucentDepthStencilTexture=new _.default({context:t,width:i,height:n,pixelFormat:s.default.DEPTH_STENCIL,pixelDatatype:f.default.UNSIGNED_INT_24_8,sampler:p.default.NEAREST}),e._packedTranslucentDepth=new _.default({context:t,width:i,height:n,pixelFormat:s.default.RGBA,pixelDatatype:f.default.UNSIGNED_BYTE,sampler:p.default.NEAREST})}(e,t,c,O),Object(r.default)(e._drawClassificationFBO)&&!C||function(e,t){A(e),e._drawClassificationFBO=new d.default({context:t,colorTextures:[e._colorTexture],depthStencilTexture:e._translucentDepthStencilTexture,destroyAttachments:!1}),e._accumulationFBO=new d.default({context:t,colorTextures:[e._accumulationTexture],depthStencilTexture:e._translucentDepthStencilTexture,destroyAttachments:!1}),e._packFBO=new d.default({context:t,colorTextures:[e._packedTranslucentDepth],destroyAttachments:!1})}(e,t),Object(r.default)(e._packDepthCommand)||(o=new m.default({sources:[g.a]}),l={u_opaqueDepthTexture:function(){return e._opaqueDepthStencilTexture},u_translucentDepthTexture:function(){return e._translucentDepthStencilTexture}},e._packDepthCommand=t.createViewportQuadCommand(o,{uniformMap:l,owner:e})),!Object(r.default)(e._compositeCommand)){o=new m.default({sources:[v.a]}),l={colorTexture:function(){return e._textureToComposite}},e._compositeCommand=t.createViewportQuadCommand(o,{uniformMap:l,owner:e});var S=e._compositeCommand,M=S.shaderProgram,D=t.shaderCache.createDerivedShaderProgram(M,"pick",{vertexShaderSource:M.vertexShaderSource,fragmentShaderSource:new m.default({sources:o.sources,defines:["PICK"]}),attributeLocations:M._attributeLocations}),P=u.default.shallowClone(S);P.shaderProgram=D,S.derivedCommands.pick=P}Object(r.default)(e._copyCommand)||(o=new m.default({sources:[v.a]}),l={colorTexture:function(){return e._colorTexture}},e._copyCommand=t.createViewportQuadCommand(o,{uniformMap:l,owner:e})),Object(r.default)(e._accumulateCommand)||(o=new m.default({sources:[v.a]}),l={colorTexture:function(){return e._colorTexture}},e._accumulateCommand=t.createViewportQuadCommand(o,{uniformMap:l,owner:e})),e._viewport.width=c,e._viewport.height=O;var I=!n.a.equals(e._viewport,i.viewport),L=I!==e._useScissorTest;e._useScissorTest=I,n.a.equals(e._scissorRectangle,i.viewport)||(e._scissorRectangle=n.a.clone(i.viewport,e._scissorRectangle),L=!0),Object(r.default)(e._rsDepth)&&n.a.equals(e._viewport,e._rsDepth.viewport)&&!L||(e._rsDepth=h.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle}})),Object(r.default)(e._packDepthCommand)&&(e._packDepthCommand.renderState=e._rsDepth),Object(r.default)(e._rsAccumulate)&&n.a.equals(e._viewport,e._rsAccumulate.viewport)&&!L||(e._rsAccumulate=h.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},stencilTest:{enabled:!0,frontFunction:w.a.EQUAL,reference:b.a.CESIUM_3D_TILE_MASK}})),Object(r.default)(e._accumulateCommand)&&(e._accumulateCommand.renderState=e._rsAccumulate),Object(r.default)(e._rsComp)&&n.a.equals(e._viewport,e._rsComp.viewport)&&!L||(e._rsComp=h.default.fromCache({viewport:e._viewport,scissorTest:{enabled:e._useScissorTest,rectangle:e._scissorRectangle},blending:y.default.ALPHA_BLEND})),Object(r.default)(e._compositeCommand)&&(e._compositeCommand.renderState=e._rsComp,e._compositeCommand.derivedCommands.pick.renderState=e._rsComp)}}Object.defineProperties(O.prototype,{hasTranslucentDepth:{get:function(){return this._hasTranslucentDepth}}}),O.prototype.executeTranslucentCommands=function(e,t,i,n,a){var r,o,s=n.length,l=e.frameState.useLogDepth,u=e.context,d=i.framebuffer;for(o=0;o<s;++o)if(r=n[o],(r=l?r.derivedCommands.logDepth.command:r).depthForTranslucentClassification){this._hasTranslucentDepth=!0;break}if(this._hasTranslucentDepth){for(E(this,u,i,a),i.framebuffer=this._drawClassificationFBO,this._clearDepthStencilCommand.execute(u,i),o=0;o<s;++o){if(r=n[o],(r=l?r.derivedCommands.logDepth.command:r).depthForTranslucentClassification)t(r.derivedCommands.depth.depthOnlyCommand,e,u,i)}this._frustumsDrawn+=this._hasTranslucentDepth?1:0,this._hasTranslucentDepth&&(i.framebuffer=this._packFBO,this._packDepthCommand.execute(u,i)),i.framebuffer=d}},O.prototype.executeClassificationCommands=function(e,t,i,n){if(this._hasTranslucentDepth){var a=e.context,r=a.uniformState,o=i.framebuffer;2===this._frustumsDrawn&&(i.framebuffer=this._accumulationFBO,this._copyCommand.execute(a,i)),i.framebuffer=this._drawClassificationFBO,this._frustumsDrawn>1&&this._clearColorCommand.execute(a,i),r.updatePass(c.default.CESIUM_3D_TILE_CLASSIFICATION);var s=r.globeDepthTexture;r.globeDepthTexture=this._packedTranslucentDepth;for(var l=n.commands[c.default.CESIUM_3D_TILE_CLASSIFICATION],u=n.indices[c.default.CESIUM_3D_TILE_CLASSIFICATION],d=0;d<u;++d)t(l[d],e,a,i);r.globeDepthTexture=s,i.framebuffer=o,1!==this._frustumsDrawn&&(i.framebuffer=this._accumulationFBO,this._accumulateCommand.execute(a,i),i.framebuffer=o)}},O.prototype.execute=function(e,t){this._hasTranslucentDepth&&(1===this._frustumsDrawn?this._textureToComposite=this._colorTexture:this._textureToComposite=this._accumulationTexture,(e.frameState.passes.pick?this._compositeCommand.derivedCommands.pick:this._compositeCommand).execute(e.context,t),function(e,t,i){if(!e._hasTranslucentDepth)return;var n=i.framebuffer;i.framebuffer=e._drawClassificationFBO,e._clearColorCommand.execute(t._context,i),i.framebuffer=n,e._frustumsDrawn>1&&(i.framebuffer=e._accumulationFBO,e._clearColorCommand.execute(t._context,i));e._hasTranslucentDepth=!1,e._frustumsDrawn=0}(this,e,t))},O.prototype.isSupported=function(){return this._supported},O.prototype.isDestroyed=function(){return!1},O.prototype.destroy=function(){return x(this),A(this),Object(r.default)(this._compositeCommand)&&(this._compositeCommand.shaderProgram=this._compositeCommand.shaderProgram&&this._compositeCommand.shaderProgram.destroy()),Object(r.default)(this._packDepthCommand)&&(this._packDepthCommand.shaderProgram=this._packDepthCommand.shaderProgram&&this._packDepthCommand.shaderProgram.destroy()),Object(o.default)(this)},t.a=O},function(e,t,i){"use strict";t.a="uniform sampler2D u_opaqueDepthTexture;\nuniform sampler2D u_translucentDepthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n float opaqueDepth = texture2D(u_opaqueDepthTexture, v_textureCoordinates).r;\n float translucentDepth = texture2D(u_translucentDepthTexture, v_textureCoordinates).r;\n translucentDepth = czm_branchFreeTernary(translucentDepth > opaqueDepth, 1.0, translucentDepth);\n gl_FragColor = czm_packDepth(translucentDepth);\n}\n"},function(e,t,i){"use strict";var n=i(113),a=i(4),r=i(0),o=i(19),s=i(3),l=i(33),u=i(32),d=i(58),c=i(45),f=i(118),h=i(62),p=i(83),m=i(244),_=i(298),g=i(450),v=i(385),y=[];function b(){var e=_.a.createFXAAStage(),t=_.a.createAmbientOcclusionStage(),i=_.a.createBloomStage();this._autoExposureEnabled=!1,this._autoExposure=_.a.createAutoExposureStage(),this._tonemapping=void 0,this._tonemapper=void 0,this.tonemapper=v.a.ACES;var n=this._tonemapping;e.enabled=!1,t.enabled=!1,i.enabled=!1,n.enabled=!1;var a=new g.a(this),o={},s=y;for(s.push(e,t,i,n);s.length>0;){var l=s.pop();o[l.name]=l,l._textureCache=a;var u=l.length;if(Object(r.default)(u))for(var d=0;d<u;++d)s.push(l.get(d))}this._stages=[],this._activeStages=[],this._previousActiveStages=[],this._randomTexture=void 0;var c=this;t.uniforms.randomTexture=function(){return c._randomTexture},this._ao=t,this._bloom=i,this._fxaa=e,this._aoEnabled=void 0,this._bloomEnabled=void 0,this._tonemappingEnabled=void 0,this._fxaaEnabled=void 0,this._activeStagesChanged=!1,this._stagesRemoved=!1,this._textureCacheDirty=!1,this._stageNames=o,this._textureCache=a}function w(e){if(e._stagesRemoved){e._stagesRemoved=!1;for(var t=[],i=e._stages,n=i.length,a=0,r=0;a<n;++a){var o=i[a];o&&(o._index=r++,t.push(o))}e._stages=t}}function O(e){for(;Object(r.default)(e.length);)e=e.get(e.length-1);return e.outputTexture}function x(e,t,i,n,a){if(Object(r.default)(e.execute))e.execute(t,i,n,a);else{var o,s=e.length;if(e.inputPreviousStageTexture)for(x(e.get(0),t,i,n,a),o=1;o<s;++o)x(e.get(o),t,O(e.get(o-1)),n,a);else for(o=0;o<s;++o)x(e.get(o),t,i,n,a)}}Object.defineProperties(b.prototype,{ready:{get:function(){for(var e=!1,t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];e=e||n.ready&&n.enabled}var a=this._fxaa,r=this._ao,o=this._bloom,s=this._tonemapping;return e=(e=(e=(e=e||a.ready&&a.enabled)||r.ready&&r.enabled)||o.ready&&o.enabled)||s.ready&&s.enabled}},fxaa:{get:function(){return this._fxaa}},ambientOcclusion:{get:function(){return this._ao}},bloom:{get:function(){return this._bloom}},length:{get:function(){return w(this),this._stages.length}},outputTexture:{get:function(){var e=this._fxaa;if(e.enabled&&e.ready)return this.getOutputTexture(e.name);for(var t=this._stages,i=t.length-1;i>=0;--i){var n=t[i];if(Object(r.default)(n)&&n.ready&&n.enabled)return this.getOutputTexture(n.name)}var a=this._tonemapping;if(a.enabled&&a.ready)return this.getOutputTexture(a.name);var o=this._bloom;if(o.enabled&&o.ready)return this.getOutputTexture(o.name);var s=this._ao;return s.enabled&&s.ready?this.getOutputTexture(s.name):void 0}},hasSelected:{get:function(){for(var e=Object(n.a)(this._stages);e.length>0;){var t=e.pop();if(Object(r.default)(t)){if(Object(r.default)(t.selected))return!0;var i=t.length;if(Object(r.default)(i))for(var a=0;a<i;++a)e.push(t.get(a))}}return!1}},tonemapper:{get:function(){return this._tonemapper},set:function(e){if(this._tonemapper!==e){if(!v.a.validate(e))throw new s.default("tonemapper was set to an invalid value.");Object(r.default)(this._tonemapping)&&(delete this._stageNames[this._tonemapping.name],this._tonemapping.destroy());var t,i=this._autoExposureEnabled;switch(e){case v.a.REINHARD:t=_.a.createReinhardTonemappingStage(i);break;case v.a.MODIFIED_REINHARD:t=_.a.createModifiedReinhardTonemappingStage(i);break;case v.a.FILMIC:t=_.a.createFilmicTonemappingStage(i);break;default:t=_.a.createAcesTonemappingStage(i)}if(i){var n=this._autoExposure;t.uniforms.autoExposure=function(){return n.outputTexture}}this._tonemapper=e,this._tonemapping=t,Object(r.default)(this._stageNames)&&(this._stageNames[t.name]=t,t._textureCache=this._textureCache),this._textureCacheDirty=!0}}}}),b.prototype.add=function(e){a.a.typeOf.object("stage",e);var t=this._stageNames,i=y;for(i.push(e);i.length>0;){var n=i.pop();if(Object(r.default)(t[n.name]))throw new s.default(n.name+" has already been added to the collection or does not have a unique name.");t[n.name]=n,n._textureCache=this._textureCache;var o=n.length;if(Object(r.default)(o))for(var l=0;l<o;++l)i.push(n.get(l))}var u=this._stages;return e._index=u.length,u.push(e),this._textureCacheDirty=!0,e},b.prototype.remove=function(e){if(!this.contains(e))return!1;var t=this._stageNames,i=y;for(i.push(e);i.length>0;){var n=i.pop();delete t[n.name];var a=n.length;if(Object(r.default)(a))for(var o=0;o<a;++o)i.push(n.get(o))}return this._stages[e._index]=void 0,this._stagesRemoved=!0,this._textureCacheDirty=!0,e._index=void 0,e._textureCache=void 0,e.destroy(),!0},b.prototype.contains=function(e){return Object(r.default)(e)&&Object(r.default)(e._index)&&e._textureCache===this._textureCache},b.prototype.get=function(e){w(this);var t=this._stages,i=t.length;return a.a.typeOf.number.greaterThanOrEquals("stages length",i,0),a.a.typeOf.number.greaterThanOrEquals("index",e,0),a.a.typeOf.number.lessThan("index",e,i),t[e]},b.prototype.removeAll=function(){for(var e=this._stages,t=e.length,i=0;i<t;++i)this.remove(e[i]);e.length=0},b.prototype.getStageByName=function(e){return this._stageNames[e]},b.prototype.update=function(e,t,i){w(this);var n=this._activeStages,a=this._activeStages=this._previousActiveStages;this._previousActiveStages=n;var o,s,m=this._stages,_=a.length=m.length,g=0;for(o=0;o<_;++o)(s=m[o]).ready&&s.enabled&&s._isSupported(e)&&(a[g++]=s);a.length=g;var v=g!==n.length;if(!v)for(o=0;o<g;++o)if(a[o]!==n[o]){v=!0;break}var y=this._ao,b=this._bloom,O=this._autoExposure,x=this._tonemapping,A=this._fxaa;x.enabled=i;var T=y.enabled&&y._isSupported(e),E=b.enabled&&b._isSupported(e),C=x.enabled&&x._isSupported(e),S=A.enabled&&A._isSupported(e);if((v||this._textureCacheDirty||T!==this._aoEnabled||E!==this._bloomEnabled||C!==this._tonemappingEnabled||S!==this._fxaaEnabled)&&(this._textureCache.updateDependencies(),this._aoEnabled=T,this._bloomEnabled=E,this._tonemappingEnabled=C,this._fxaaEnabled=S,this._textureCacheDirty=!1),Object(r.default)(this._randomTexture)&&!T&&(this._randomTexture.destroy(),this._randomTexture=void 0),!Object(r.default)(this._randomTexture)&&T){_=196608;var M=new Uint8Array(_);for(o=0;o<_;o+=3)M[o]=Math.floor(255*Math.random());this._randomTexture=new c.default({context:e,pixelFormat:l.default.RGB,pixelDatatype:u.default.UNSIGNED_BYTE,source:{arrayBufferView:M,width:256,height:256},sampler:new d.default({wrapS:p.default.REPEAT,wrapT:p.default.REPEAT,minificationFilter:h.default.NEAREST,magnificationFilter:f.default.NEAREST})})}for(this._textureCache.update(e),A.update(e,t),y.update(e,t),b.update(e,t),x.update(e,t),this._autoExposureEnabled&&O.update(e,t),_=m.length,o=0;o<_;++o)m[o].update(e,t);for(g=0,o=0;o<_;++o)(s=m[o]).ready&&s.enabled&&s._isSupported(e)&&g++;(v=g!==a.length)&&this.update(e,t,i)},b.prototype.clear=function(e){this._textureCache.clear(e),this._autoExposureEnabled&&this._autoExposure.clear(e)},b.prototype.getOutputTexture=function(e){var t=this.getStageByName(e);if(Object(r.default)(t))return O(t)},b.prototype.execute=function(e,t,i,n){var a=this._activeStages,r=a.length,o=this._fxaa,s=this._ao,l=this._bloom,u=this._autoExposure,d=this._tonemapping,c=s.enabled&&s._isSupported(e),f=l.enabled&&l._isSupported(e),h=this._autoExposureEnabled,p=d.enabled&&d._isSupported(e),m=o.enabled&&o._isSupported(e);if(m||c||f||p||0!==r){var _=t;c&&s.ready&&(x(s,e,_,i,n),_=O(s)),f&&l.ready&&(x(l,e,_,i,n),_=O(l)),h&&u.ready&&x(u,e,_,i,n),p&&d.ready&&(x(d,e,_,i,n),_=O(d));var g=_;if(r>0){x(a[0],e,_,i,n);for(var v=1;v<r;++v)x(a[v],e,O(a[v-1]),i,n);g=O(a[r-1])}m&&o.ready&&x(o,e,g,i,n)}},b.prototype.copy=function(e,t){if(!Object(r.default)(this._copyColorCommand)){var i=this;this._copyColorCommand=e.createViewportQuadCommand(m.a,{uniformMap:{colorTexture:function(){return i.outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return this._fxaa.destroy(),this._ao.destroy(),this._bloom.destroy(),this._autoExposure.destroy(),this._tonemapping.destroy(),this.removeAll(),this._textureCache=this._textureCache&&this._textureCache.destroy(),Object(o.default)(this)},t.a=b},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n color /= texture2D(autoExposure, vec2(0.5)).r;\n#endif\n color = czm_acesTonemapping(color);\n color = czm_inverseGamma(color);\n\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D randomTexture;\nuniform sampler2D depthTexture;\nuniform float intensity;\nuniform float bias;\nuniform float lengthCap;\nuniform float stepSize;\nuniform float frustumLength;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 clipToEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posEC = czm_inverseProjection * vec4(xy, depth, 1.0);\n posEC = posEC / posEC.w;\n return posEC;\n}\n\n//Reconstruct Normal Without Edge Removation\nvec3 getNormalXEdge(vec3 posInCamera, float depthU, float depthD, float depthL, float depthR, vec2 pixelSize)\n{\n vec4 posInCameraUp = clipToEye(v_textureCoordinates - vec2(0.0, pixelSize.y), depthU);\n vec4 posInCameraDown = clipToEye(v_textureCoordinates + vec2(0.0, pixelSize.y), depthD);\n vec4 posInCameraLeft = clipToEye(v_textureCoordinates - vec2(pixelSize.x, 0.0), depthL);\n vec4 posInCameraRight = clipToEye(v_textureCoordinates + vec2(pixelSize.x, 0.0), depthR);\n\n vec3 up = posInCamera.xyz - posInCameraUp.xyz;\n vec3 down = posInCameraDown.xyz - posInCamera.xyz;\n vec3 left = posInCamera.xyz - posInCameraLeft.xyz;\n vec3 right = posInCameraRight.xyz - posInCamera.xyz;\n\n vec3 DX = length(left) < length(right) ? left : right;\n vec3 DY = length(up) < length(down) ? up : down;\n\n return normalize(cross(DY, DX));\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = clipToEye(v_textureCoordinates, depth);\n\n if (posInCamera.z > frustumLength)\n {\n gl_FragColor = vec4(1.0);\n return;\n }\n\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n float depthU = czm_readDepth(depthTexture, v_textureCoordinates - vec2(0.0, pixelSize.y));\n float depthD = czm_readDepth(depthTexture, v_textureCoordinates + vec2(0.0, pixelSize.y));\n float depthL = czm_readDepth(depthTexture, v_textureCoordinates - vec2(pixelSize.x, 0.0));\n float depthR = czm_readDepth(depthTexture, v_textureCoordinates + vec2(pixelSize.x, 0.0));\n vec3 normalInCamera = getNormalXEdge(posInCamera.xyz, depthU, depthD, depthL, depthR, pixelSize);\n\n float ao = 0.0;\n vec2 sampleDirection = vec2(1.0, 0.0);\n float gapAngle = 90.0 * czm_radiansPerDegree;\n\n // RandomNoise\n float randomVal = texture2D(randomTexture, v_textureCoordinates).x;\n\n //Loop for each direction\n for (int i = 0; i < 4; i++)\n {\n float newGapAngle = gapAngle * (float(i) + randomVal);\n float cosVal = cos(newGapAngle);\n float sinVal = sin(newGapAngle);\n\n //Rotate Sampling Direction\n vec2 rotatedSampleDirection = vec2(cosVal * sampleDirection.x - sinVal * sampleDirection.y, sinVal * sampleDirection.x + cosVal * sampleDirection.y);\n float localAO = 0.0;\n float localStepSize = stepSize;\n\n //Loop for each step\n for (int j = 0; j < 6; j++)\n {\n vec2 newCoords = v_textureCoordinates + rotatedSampleDirection * localStepSize * pixelSize;\n\n //Exception Handling\n if(newCoords.x > 1.0 || newCoords.y > 1.0 || newCoords.x < 0.0 || newCoords.y < 0.0)\n {\n break;\n }\n\n float stepDepthInfo = czm_readDepth(depthTexture, newCoords);\n vec4 stepPosInCamera = clipToEye(newCoords, stepDepthInfo);\n vec3 diffVec = stepPosInCamera.xyz - posInCamera.xyz;\n float len = length(diffVec);\n\n if (len > lengthCap)\n {\n break;\n }\n\n float dotVal = clamp(dot(normalInCamera, normalize(diffVec)), 0.0, 1.0 );\n float weight = len / lengthCap;\n weight = 1.0 - weight * weight;\n\n if (dotVal < bias)\n {\n dotVal = 0.0;\n }\n\n localAO = max(localAO, dotVal * weight);\n localStepSize += stepSize;\n }\n ao += localAO;\n }\n\n ao /= 4.0;\n ao = 1.0 - clamp(ao, 0.0, 1.0);\n ao = pow(ao, intensity);\n gl_FragColor = vec4(vec3(ao), 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D ambientOcclusionTexture;\nuniform bool ambientOcclusionOnly;\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 color = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 ao = texture2D(ambientOcclusionTexture, v_textureCoordinates).rgb;\n gl_FragColor.rgb = ambientOcclusionOnly ? ao : ao * color;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform float gradations;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = vec4(rgb, 1.0);\n return;\n }\n#endif\n float luminance = czm_luminance(rgb);\n float darkness = luminance * gradations;\n darkness = (darkness - fract(darkness)) / gradations;\n gl_FragColor = vec4(vec3(darkness), 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D bloomTexture;\nuniform bool glowOnly;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n\n#ifdef CZM_SELECTED_FEATURE\n if (czm_selected()) {\n gl_FragColor = color;\n return;\n }\n#endif\n\n vec4 bloom = texture2D(bloomTexture, v_textureCoordinates);\n gl_FragColor = glowOnly ? bloom : bloom + color;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 target = vec3(0.0);\n gl_FragColor = vec4(mix(target, rgb, brightness), 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform float contrast;\nuniform float brightness;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec3 sceneColor = texture2D(colorTexture, v_textureCoordinates).xyz;\n sceneColor = czm_RGBToHSB(sceneColor);\n sceneColor.z += brightness;\n sceneColor = czm_HSBToRGB(sceneColor);\n\n float factor = (259.0 * (contrast + 255.0)) / (255.0 * (259.0 - contrast));\n sceneColor = factor * (sceneColor - vec3(0.5)) + vec3(0.5);\n gl_FragColor = vec4(sceneColor, 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D blurTexture;\nuniform sampler2D depthTexture;\nuniform float focalDistance;\n\nvarying vec2 v_textureCoordinates;\n\nvec4 toEye(vec2 uv, float depth)\n{\n vec2 xy = vec2((uv.x * 2.0 - 1.0), ((1.0 - uv.y) * 2.0 - 1.0));\n vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\n posInCamera = posInCamera / posInCamera.w;\n return posInCamera;\n}\n\nfloat computeDepthBlur(float depth)\n{\n float f;\n if (depth < focalDistance)\n {\n f = (focalDistance - depth) / (focalDistance - czm_currentFrustum.x);\n }\n else\n {\n f = (depth - focalDistance) / (czm_currentFrustum.y - focalDistance);\n f = pow(f, 0.1);\n }\n f *= f;\n f = clamp(f, 0.0, 1.0);\n return pow(f, 0.5);\n}\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n vec4 posInCamera = toEye(v_textureCoordinates, depth);\n float d = computeDepthBlur(-posInCamera.z);\n gl_FragColor = mix(texture2D(colorTexture, v_textureCoordinates), texture2D(blurTexture, v_textureCoordinates), d);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D depthTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float depth = czm_readDepth(depthTexture, v_textureCoordinates);\n gl_FragColor = vec4(vec3(depth), 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D depthTexture;\nuniform float length;\nuniform vec4 color;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n float directions[3];\n directions[0] = -1.0;\n directions[1] = 0.0;\n directions[2] = 1.0;\n\n float scalars[3];\n scalars[0] = 3.0;\n scalars[1] = 10.0;\n scalars[2] = 3.0;\n\n float padx = czm_pixelRatio / czm_viewport.z;\n float pady = czm_pixelRatio / czm_viewport.w;\n\n#ifdef CZM_SELECTED_FEATURE\n bool selected = false;\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n selected = selected || czm_selected(vec2(-padx, dir * pady));\n selected = selected || czm_selected(vec2(padx, dir * pady));\n selected = selected || czm_selected(vec2(dir * padx, -pady));\n selected = selected || czm_selected(vec2(dir * padx, pady));\n if (selected)\n {\n break;\n }\n }\n if (!selected)\n {\n gl_FragColor = vec4(color.rgb, 0.0);\n return;\n }\n#endif\n\n float horizEdge = 0.0;\n float vertEdge = 0.0;\n\n for (int i = 0; i < 3; ++i)\n {\n float dir = directions[i];\n float scale = scalars[i];\n\n horizEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(-padx, dir * pady)).x * scale;\n horizEdge += texture2D(depthTexture, v_textureCoordinates + vec2(padx, dir * pady)).x * scale;\n\n vertEdge -= texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, -pady)).x * scale;\n vertEdge += texture2D(depthTexture, v_textureCoordinates + vec2(dir * padx, pady)).x * scale;\n }\n\n float len = sqrt(horizEdge * horizEdge + vertEdge * vertEdge);\n gl_FragColor = vec4(color.rgb, len > length ? color.a : 0.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See slides 142 and 143:\n// http://www.gdcvault.com/play/1012459/Uncharted_2__HDR_Lighting\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n\n\tconst float A = 0.22; // shoulder strength\n\tconst float B = 0.30; // linear strength\n\tconst float C = 0.10; // linear angle\n\tconst float D = 0.20; // toe strength\n\tconst float E = 0.01; // toe numerator\n\tconst float F = 0.30; // toe denominator\n\n\tconst float white = 11.2; // linear white point value\n\n\tvec3 c = ((color * (A * color + C * B) + D * E) / (color * ( A * color + B) + D * F)) - E / F;\n\tfloat w = ((white * (A * white + C * B) + D * E) / (white * ( A * white + B) + D * F)) - E / F;\n\n\tc = czm_inverseGamma(c / w);\n\tgl_FragColor = vec4(c, fragmentColor.a);\n}\n"},function(e,t,i){"use strict";t.a="varying vec2 v_textureCoordinates;\n\nuniform sampler2D colorTexture;\n\nconst float fxaaQualitySubpix = 0.5;\nconst float fxaaQualityEdgeThreshold = 0.125;\nconst float fxaaQualityEdgeThresholdMin = 0.0833;\n\nvoid main()\n{\n vec2 fxaaQualityRcpFrame = vec2(1.0) / czm_viewport.zw;\n vec4 color = FxaaPixelShader(\n v_textureCoordinates,\n colorTexture,\n fxaaQualityRcpFrame,\n fxaaQualitySubpix,\n fxaaQualityEdgeThreshold,\n fxaaQualityEdgeThresholdMin);\n float alpha = texture2D(colorTexture, v_textureCoordinates).a;\n gl_FragColor = vec4(color.rgb, alpha);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D dirtTexture;\nuniform sampler2D starTexture;\nuniform vec2 dirtTextureDimensions;\nuniform float distortion;\nuniform float ghostDispersal;\nuniform float haloWidth;\nuniform float dirtAmount;\nuniform float earthRadius;\nuniform float intensity;\n\nvarying vec2 v_textureCoordinates;\n\n// whether it is in space or not\n// 6500000.0 is empirical value\n#define DISTANCE_TO_SPACE 6500000.0\n\n// return ndc from world coordinate biased earthRadius\nvec4 getNDCFromWC(vec3 WC, float earthRadius)\n{\n vec4 positionEC = czm_view * vec4(WC, 1.0);\n positionEC = vec4(positionEC.x + earthRadius, positionEC.y, positionEC.z, 1.0);\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n return czm_viewportOrthographic * vec4(positionWC.xy, -positionWC.z, 1.0);\n}\n\n// Check if current pixel is included Earth\n// if then mask it gradually\nfloat isInEarth(vec2 texcoord, vec2 sceneSize)\n{\n vec2 NDC = texcoord * 2.0 - 1.0;\n vec4 earthPosSC = getNDCFromWC(vec3(0.0), 0.0);\n vec4 earthPosSCEdge = getNDCFromWC(vec3(0.0), earthRadius * 1.5);\n NDC.xy -= earthPosSC.xy;\n\n float X = abs(NDC.x) * sceneSize.x;\n float Y = abs(NDC.y) * sceneSize.y;\n\n return clamp(0.0, 1.0, max(sqrt(X * X + Y * Y) / max(abs(earthPosSCEdge.x * sceneSize.x), 1.0) - 0.8 , 0.0));\n}\n\n// For Chromatic effect\nvec4 textureDistorted(sampler2D tex, vec2 texcoord, vec2 direction, vec3 distortion, bool isSpace)\n{\n vec2 sceneSize = czm_viewport.zw;\n vec3 color;\n if(isSpace)\n {\n color.r = isInEarth(texcoord + direction * distortion.r, sceneSize) * texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = isInEarth(texcoord + direction * distortion.g, sceneSize) * texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = isInEarth(texcoord + direction * distortion.b, sceneSize) * texture2D(tex, texcoord + direction * distortion.b).b;\n }\n else\n {\n color.r = texture2D(tex, texcoord + direction * distortion.r).r;\n color.g = texture2D(tex, texcoord + direction * distortion.g).g;\n color.b = texture2D(tex, texcoord + direction * distortion.b).b;\n }\n return vec4(clamp(color, 0.0, 1.0), 0.0);\n}\n\nvoid main(void)\n{\n vec4 originalColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 rgb = originalColor.rgb;\n bool isSpace = length(czm_viewerPositionWC.xyz) > DISTANCE_TO_SPACE;\n\n // Sun position\n vec4 sunPos = czm_morphTime == 1.0 ? vec4(czm_sunPositionWC, 1.0) : vec4(czm_sunPositionColumbusView.zxy, 1.0);\n vec4 sunPositionEC = czm_view * sunPos;\n vec4 sunPositionWC = czm_eyeToWindowCoordinates(sunPositionEC);\n sunPos = czm_viewportOrthographic * vec4(sunPositionWC.xy, -sunPositionWC.z, 1.0);\n\n // If sun is not in the screen space, use original color.\n if(!isSpace || !((sunPos.x >= -1.1 && sunPos.x <= 1.1) && (sunPos.y >= -1.1 && sunPos.y <= 1.1)))\n {\n // Lens flare is disabled when not in space until #5932 is fixed.\n // https://github.com/CesiumGS/cesium/issues/5932\n gl_FragColor = originalColor;\n return;\n }\n\n vec2 texcoord = vec2(1.0) - v_textureCoordinates;\n vec2 pixelSize = czm_pixelRatio / czm_viewport.zw;\n vec2 invPixelSize = 1.0 / pixelSize;\n vec3 distortionVec = pixelSize.x * vec3(-distortion, 0.0, distortion);\n\n // ghost vector to image centre:\n vec2 ghostVec = (vec2(0.5) - texcoord) * ghostDispersal;\n vec3 direction = normalize(vec3(ghostVec, 0.0));\n\n // sample ghosts:\n vec4 result = vec4(0.0);\n vec4 ghost = vec4(0.0);\n for (int i = 0; i < 4; ++i)\n {\n vec2 offset = fract(texcoord + ghostVec * float(i));\n // Only bright spots from the centre of the source image\n ghost += textureDistorted(colorTexture, offset, direction.xy, distortionVec, isSpace);\n }\n result += ghost;\n\n // sample halo\n vec2 haloVec = normalize(ghostVec) * haloWidth;\n float weightForHalo = length(vec2(0.5) - fract(texcoord + haloVec)) / length(vec2(0.5));\n weightForHalo = pow(1.0 - weightForHalo, 5.0);\n\n result += textureDistorted(colorTexture, texcoord + haloVec, direction.xy, distortionVec, isSpace) * weightForHalo * 1.5;\n\n // dirt on lens\n vec2 dirtTexCoords = (v_textureCoordinates * invPixelSize) / dirtTextureDimensions;\n if (dirtTexCoords.x > 1.0)\n {\n dirtTexCoords.x = mod(floor(dirtTexCoords.x), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.x) : fract(dirtTexCoords.x);\n }\n if (dirtTexCoords.y > 1.0)\n {\n dirtTexCoords.y = mod(floor(dirtTexCoords.y), 2.0) == 1.0 ? 1.0 - fract(dirtTexCoords.y) : fract(dirtTexCoords.y);\n }\n result += dirtAmount * texture2D(dirtTexture, dirtTexCoords);\n\n // Rotating starburst texture's coordinate\n // dot(czm_view[0].xyz, vec3(0.0, 0.0, 1.0)) + dot(czm_view[1].xyz, vec3(0.0, 1.0, 0.0))\n float camrot = czm_view[0].z + czm_view[1].y;\n float cosValue = cos(camrot);\n float sinValue = sin(camrot);\n mat3 rotation = mat3(\n cosValue, -sinValue, 0.0,\n sinValue, cosValue, 0.0,\n 0.0, 0.0, 1.0\n );\n\n vec3 st1 = vec3(v_textureCoordinates * 2.0 - vec2(1.0), 1.0);\n vec3 st2 = vec3((rotation * st1).xy, 1.0);\n vec3 st3 = st2 * 0.5 + vec3(0.5);\n vec2 lensStarTexcoord = st3.xy;\n float weightForLensFlare = length(vec3(sunPos.xy, 0.0));\n float oneMinusWeightForLensFlare = max(1.0 - weightForLensFlare, 0.0);\n\n if (!isSpace)\n {\n result *= oneMinusWeightForLensFlare * intensity * 0.2;\n }\n else\n {\n result *= oneMinusWeightForLensFlare * intensity;\n result *= texture2D(starTexture, lensStarTexcoord) * pow(weightForLensFlare, 1.0) * max((1.0 - length(vec3(st1.xy, 0.0))), 0.0) * 2.0;\n }\n\n result += texture2D(colorTexture, v_textureCoordinates);\n\n gl_FragColor = result;\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform vec3 white;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 4:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = (color * (1.0 + color / white)) / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy ,vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main(void)\n{\n float noiseValue = rand(v_textureCoordinates + sin(czm_frameNumber)) * 0.1;\n vec3 rgb = texture2D(colorTexture, v_textureCoordinates).rgb;\n vec3 green = vec3(0.0, 1.0, 0.0);\n gl_FragColor = vec4((noiseValue + rgb) * green, 1.0);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\n\nvarying vec2 v_textureCoordinates;\n\n#ifdef AUTO_EXPOSURE\nuniform sampler2D autoExposure;\n#endif\n\n// See equation 3:\n// http://www.cs.utah.edu/~reinhard/cdrom/tonemap.pdf\n\nvoid main()\n{\n vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n vec3 color = fragmentColor.rgb;\n#ifdef AUTO_EXPOSURE\n float exposure = texture2D(autoExposure, vec2(0.5)).r;\n color /= exposure;\n#endif\n color = color / (1.0 + color);\n color = czm_inverseGamma(color);\n gl_FragColor = vec4(color, fragmentColor.a);\n}\n"},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D silhouetteTexture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main(void)\n{\n vec4 silhouetteColor = texture2D(silhouetteTexture, v_textureCoordinates);\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n gl_FragColor = mix(color, silhouetteColor, silhouetteColor.a);\n}\n"},function(e,t,i){"use strict"; /** * @license * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of NVIDIA CORPORATION nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */t.a="/**\n * @license\n * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA CORPORATION nor the names of its\n * contributors may be used to endorse or promote products derived\n * from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY\n * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n// NVIDIA GameWorks Graphics Samples GitHub link: https://github.com/NVIDIAGameWorks/GraphicsSamples\n// Original FXAA 3.11 shader link: https://github.com/NVIDIAGameWorks/GraphicsSamples/blob/master/samples/es3-kepler/FXAA/FXAA3_11.h\n\n// Steps used to integrate into Cesium:\n// * The following defines are set:\n// #define FXAA_PC 1\n// #define FXAA_WEBGL_1 1\n// #define FXAA_GREEN_AS_LUMA 1\n// #define FXAA_EARLY_EXIT 1\n// #define FXAA_GLSL_120 1\n// * All other preprocessor directives besides the FXAA_QUALITY__P* directives were removed.\n// * Double underscores are invalid for preprocessor directives so replace them with a single underscore. Replace\n// /FXAA_QUALITY__P(.*)/g with /FXAA_QUALITY__P$1/.\n// * There are no implicit conversions from ivec* to vec* so replace:\n// #define FxaaInt2 ivec2\n// with\n// #define FxaaInt2 vec2\n// * The texture2DLod function is only available in vertex shaders so replace:\n// #define FxaaTexTop(t, p) texture2DLod(t, p, 0.0)\n// #define FxaaTexOff(t, p, o, r) texture2DLod(t, p + (o * r), 0.0)\n// with\n// #define FxaaTexTop(t, p) texture2D(t, p)\n// #define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n// * FXAA_QUALITY_PRESET is prepended in the javascript code. We may want to expose that setting in the future.\n// * The following parameters to FxaaPixelShader are unused and can be removed:\n// fxaaConsolePosPos\n// fxaaConsoleRcpFrameOpt\n// fxaaConsoleRcpFrameOpt2\n// fxaaConsole360RcpFrameOpt2\n// fxaaConsoleEdgeSharpness\n// fxaaConsoleEdgeThreshold\n// fxaaConsoleEdgeThresholdMi\n// fxaaConsole360ConstDir\n\n//\n// Choose the quality preset.\n// This needs to be compiled into the shader as it effects code.\n// Best option to include multiple presets is to\n// in each shader define the preset, then include this file.\n//\n// OPTIONS\n// -----------------------------------------------------------------------\n// 10 to 15 - default medium dither (10=fastest, 15=highest quality)\n// 20 to 29 - less dither, more expensive (20=fastest, 29=highest quality)\n// 39 - no dither, very expensive\n//\n// NOTES\n// -----------------------------------------------------------------------\n// 12 = slightly faster then FXAA 3.9 and higher edge quality (default)\n// 13 = about same speed as FXAA 3.9 and better than 12\n// 23 = closest to FXAA 3.9 visually and performance wise\n// _ = the lowest digit is directly related to performance\n// _ = the highest digit is directly related to style\n//\n//#define FXAA_QUALITY_PRESET 12\n\n\n#if (FXAA_QUALITY_PRESET == 10)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 3.0\n #define FXAA_QUALITY_P2 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 11)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 3.0\n #define FXAA_QUALITY_P3 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 12)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 4.0\n #define FXAA_QUALITY_P4 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 13)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 4.0\n #define FXAA_QUALITY_P5 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 14)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 4.0\n #define FXAA_QUALITY_P6 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 15)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 12.0\n#endif\n#if (FXAA_QUALITY_PRESET == 20)\n #define FXAA_QUALITY_PS 3\n #define FXAA_QUALITY_P0 1.5\n #define FXAA_QUALITY_P1 2.0\n #define FXAA_QUALITY_P2 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 21)\n #define FXAA_QUALITY_PS 4\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 22)\n #define FXAA_QUALITY_PS 5\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 23)\n #define FXAA_QUALITY_PS 6\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 24)\n #define FXAA_QUALITY_PS 7\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 3.0\n #define FXAA_QUALITY_P6 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 25)\n #define FXAA_QUALITY_PS 8\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 4.0\n #define FXAA_QUALITY_P7 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 26)\n #define FXAA_QUALITY_PS 9\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 4.0\n #define FXAA_QUALITY_P8 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 27)\n #define FXAA_QUALITY_PS 10\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 4.0\n #define FXAA_QUALITY_P9 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 28)\n #define FXAA_QUALITY_PS 11\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 4.0\n #define FXAA_QUALITY_P10 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 29)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.5\n #define FXAA_QUALITY_P2 2.0\n #define FXAA_QUALITY_P3 2.0\n #define FXAA_QUALITY_P4 2.0\n #define FXAA_QUALITY_P5 2.0\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n#if (FXAA_QUALITY_PRESET == 39)\n #define FXAA_QUALITY_PS 12\n #define FXAA_QUALITY_P0 1.0\n #define FXAA_QUALITY_P1 1.0\n #define FXAA_QUALITY_P2 1.0\n #define FXAA_QUALITY_P3 1.0\n #define FXAA_QUALITY_P4 1.0\n #define FXAA_QUALITY_P5 1.5\n #define FXAA_QUALITY_P6 2.0\n #define FXAA_QUALITY_P7 2.0\n #define FXAA_QUALITY_P8 2.0\n #define FXAA_QUALITY_P9 2.0\n #define FXAA_QUALITY_P10 4.0\n #define FXAA_QUALITY_P11 8.0\n#endif\n\n#define FxaaBool bool\n#define FxaaFloat float\n#define FxaaFloat2 vec2\n#define FxaaFloat3 vec3\n#define FxaaFloat4 vec4\n#define FxaaHalf float\n#define FxaaHalf2 vec2\n#define FxaaHalf3 vec3\n#define FxaaHalf4 vec4\n#define FxaaInt2 vec2\n#define FxaaTex sampler2D\n\n#define FxaaSat(x) clamp(x, 0.0, 1.0)\n#define FxaaTexTop(t, p) texture2D(t, p)\n#define FxaaTexOff(t, p, o, r) texture2D(t, p + (o * r))\n\nFxaaFloat FxaaLuma(FxaaFloat4 rgba) { return rgba.y; }\n\nFxaaFloat4 FxaaPixelShader(\n //\n // Use noperspective interpolation here (turn off perspective interpolation).\n // {xy} = center of pixel\n FxaaFloat2 pos,\n //\n // Input color texture.\n // {rgb_} = color in linear or perceptual color space\n // if (FXAA_GREEN_AS_LUMA == 0)\n // {___a} = luma in perceptual color space (not linear)\n FxaaTex tex,\n //\n // Only used on FXAA Quality.\n // This must be from a constant/uniform.\n // {x_} = 1.0/screenWidthInPixels\n // {_y} = 1.0/screenHeightInPixels\n FxaaFloat2 fxaaQualityRcpFrame,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_SUBPIX define.\n // It is here now to allow easier tuning.\n // Choose the amount of sub-pixel aliasing removal.\n // This can effect sharpness.\n // 1.00 - upper limit (softer)\n // 0.75 - default amount of filtering\n // 0.50 - lower limit (sharper, less sub-pixel aliasing removal)\n // 0.25 - almost off\n // 0.00 - completely off\n FxaaFloat fxaaQualitySubpix,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD define.\n // It is here now to allow easier tuning.\n // The minimum amount of local contrast required to apply algorithm.\n // 0.333 - too little (faster)\n // 0.250 - low quality\n // 0.166 - default\n // 0.125 - high quality\n // 0.063 - overkill (slower)\n FxaaFloat fxaaQualityEdgeThreshold,\n //\n // Only used on FXAA Quality.\n // This used to be the FXAA_QUALITY_EDGE_THRESHOLD_MIN define.\n // It is here now to allow easier tuning.\n // Trims the algorithm from processing darks.\n // 0.0833 - upper limit (default, the start of visible unfiltered edges)\n // 0.0625 - high quality (faster)\n // 0.0312 - visible limit (slower)\n // Special notes when using FXAA_GREEN_AS_LUMA,\n // Likely want to set this to zero.\n // As colors that are mostly not-green\n // will appear very dark in the green channel!\n // Tune by looking at mostly non-green content,\n // then start at zero and increase until aliasing is a problem.\n FxaaFloat fxaaQualityEdgeThresholdMin\n) {\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posM;\n posM.x = pos.x;\n posM.y = pos.y;\n FxaaFloat4 rgbyM = FxaaTexTop(tex, posM);\n #define lumaM rgbyM.y\n FxaaFloat lumaS = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 0), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaN = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 0,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 0), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat maxSM = max(lumaS, lumaM);\n FxaaFloat minSM = min(lumaS, lumaM);\n FxaaFloat maxESM = max(lumaE, maxSM);\n FxaaFloat minESM = min(lumaE, minSM);\n FxaaFloat maxWN = max(lumaN, lumaW);\n FxaaFloat minWN = min(lumaN, lumaW);\n FxaaFloat rangeMax = max(maxWN, maxESM);\n FxaaFloat rangeMin = min(minWN, minESM);\n FxaaFloat rangeMaxScaled = rangeMax * fxaaQualityEdgeThreshold;\n FxaaFloat range = rangeMax - rangeMin;\n FxaaFloat rangeMaxClamped = max(fxaaQualityEdgeThresholdMin, rangeMaxScaled);\n FxaaBool earlyExit = range < rangeMaxClamped;\n/*--------------------------------------------------------------------------*/\n if(earlyExit)\n return rgbyM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1, 1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaNE = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2( 1,-1), fxaaQualityRcpFrame.xy));\n FxaaFloat lumaSW = FxaaLuma(FxaaTexOff(tex, posM, FxaaInt2(-1, 1), fxaaQualityRcpFrame.xy));\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNS = lumaN + lumaS;\n FxaaFloat lumaWE = lumaW + lumaE;\n FxaaFloat subpixRcpRange = 1.0/range;\n FxaaFloat subpixNSWE = lumaNS + lumaWE;\n FxaaFloat edgeHorz1 = (-2.0 * lumaM) + lumaNS;\n FxaaFloat edgeVert1 = (-2.0 * lumaM) + lumaWE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNESE = lumaNE + lumaSE;\n FxaaFloat lumaNWNE = lumaNW + lumaNE;\n FxaaFloat edgeHorz2 = (-2.0 * lumaE) + lumaNESE;\n FxaaFloat edgeVert2 = (-2.0 * lumaN) + lumaNWNE;\n/*--------------------------------------------------------------------------*/\n FxaaFloat lumaNWSW = lumaNW + lumaSW;\n FxaaFloat lumaSWSE = lumaSW + lumaSE;\n FxaaFloat edgeHorz4 = (abs(edgeHorz1) * 2.0) + abs(edgeHorz2);\n FxaaFloat edgeVert4 = (abs(edgeVert1) * 2.0) + abs(edgeVert2);\n FxaaFloat edgeHorz3 = (-2.0 * lumaW) + lumaNWSW;\n FxaaFloat edgeVert3 = (-2.0 * lumaS) + lumaSWSE;\n FxaaFloat edgeHorz = abs(edgeHorz3) + edgeHorz4;\n FxaaFloat edgeVert = abs(edgeVert3) + edgeVert4;\n/*--------------------------------------------------------------------------*/\n FxaaFloat subpixNWSWNESE = lumaNWSW + lumaNESE;\n FxaaFloat lengthSign = fxaaQualityRcpFrame.x;\n FxaaBool horzSpan = edgeHorz >= edgeVert;\n FxaaFloat subpixA = subpixNSWE * 2.0 + subpixNWSWNESE;\n/*--------------------------------------------------------------------------*/\n if(!horzSpan) lumaN = lumaW;\n if(!horzSpan) lumaS = lumaE;\n if(horzSpan) lengthSign = fxaaQualityRcpFrame.y;\n FxaaFloat subpixB = (subpixA * (1.0/12.0)) - lumaM;\n/*--------------------------------------------------------------------------*/\n FxaaFloat gradientN = lumaN - lumaM;\n FxaaFloat gradientS = lumaS - lumaM;\n FxaaFloat lumaNN = lumaN + lumaM;\n FxaaFloat lumaSS = lumaS + lumaM;\n FxaaBool pairN = abs(gradientN) >= abs(gradientS);\n FxaaFloat gradient = max(abs(gradientN), abs(gradientS));\n if(pairN) lengthSign = -lengthSign;\n FxaaFloat subpixC = FxaaSat(abs(subpixB) * subpixRcpRange);\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posB;\n posB.x = posM.x;\n posB.y = posM.y;\n FxaaFloat2 offNP;\n offNP.x = (!horzSpan) ? 0.0 : fxaaQualityRcpFrame.x;\n offNP.y = ( horzSpan) ? 0.0 : fxaaQualityRcpFrame.y;\n if(!horzSpan) posB.x += lengthSign * 0.5;\n if( horzSpan) posB.y += lengthSign * 0.5;\n/*--------------------------------------------------------------------------*/\n FxaaFloat2 posN;\n posN.x = posB.x - offNP.x * FXAA_QUALITY_P0;\n posN.y = posB.y - offNP.y * FXAA_QUALITY_P0;\n FxaaFloat2 posP;\n posP.x = posB.x + offNP.x * FXAA_QUALITY_P0;\n posP.y = posB.y + offNP.y * FXAA_QUALITY_P0;\n FxaaFloat subpixD = ((-2.0)*subpixC) + 3.0;\n FxaaFloat lumaEndN = FxaaLuma(FxaaTexTop(tex, posN));\n FxaaFloat subpixE = subpixC * subpixC;\n FxaaFloat lumaEndP = FxaaLuma(FxaaTexTop(tex, posP));\n/*--------------------------------------------------------------------------*/\n if(!pairN) lumaNN = lumaSS;\n FxaaFloat gradientScaled = gradient * 1.0/4.0;\n FxaaFloat lumaMM = lumaM - lumaNN * 0.5;\n FxaaFloat subpixF = subpixD * subpixE;\n FxaaBool lumaMLTZero = lumaMM < 0.0;\n/*--------------------------------------------------------------------------*/\n lumaEndN -= lumaNN * 0.5;\n lumaEndP -= lumaNN * 0.5;\n FxaaBool doneN = abs(lumaEndN) >= gradientScaled;\n FxaaBool doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P1;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P1;\n FxaaBool doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P1;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P1;\n/*--------------------------------------------------------------------------*/\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P2;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P2;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P2;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P2;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 3)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P3;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P3;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P3;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P3;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 4)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P4;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P4;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P4;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P4;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 5)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P5;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P5;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P5;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P5;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 6)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P6;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P6;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P6;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P6;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 7)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P7;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P7;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P7;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P7;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 8)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P8;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P8;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P8;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P8;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 9)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P9;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P9;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P9;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P9;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 10)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P10;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P10;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P10;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P10;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 11)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P11;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P11;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P11;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P11;\n/*--------------------------------------------------------------------------*/\n #if (FXAA_QUALITY_PS > 12)\n if(doneNP) {\n if(!doneN) lumaEndN = FxaaLuma(FxaaTexTop(tex, posN.xy));\n if(!doneP) lumaEndP = FxaaLuma(FxaaTexTop(tex, posP.xy));\n if(!doneN) lumaEndN = lumaEndN - lumaNN * 0.5;\n if(!doneP) lumaEndP = lumaEndP - lumaNN * 0.5;\n doneN = abs(lumaEndN) >= gradientScaled;\n doneP = abs(lumaEndP) >= gradientScaled;\n if(!doneN) posN.x -= offNP.x * FXAA_QUALITY_P12;\n if(!doneN) posN.y -= offNP.y * FXAA_QUALITY_P12;\n doneNP = (!doneN) || (!doneP);\n if(!doneP) posP.x += offNP.x * FXAA_QUALITY_P12;\n if(!doneP) posP.y += offNP.y * FXAA_QUALITY_P12;\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n #endif\n/*--------------------------------------------------------------------------*/\n }\n/*--------------------------------------------------------------------------*/\n FxaaFloat dstN = posM.x - posN.x;\n FxaaFloat dstP = posP.x - posM.x;\n if(!horzSpan) dstN = posM.y - posN.y;\n if(!horzSpan) dstP = posP.y - posM.y;\n/*--------------------------------------------------------------------------*/\n FxaaBool goodSpanN = (lumaEndN < 0.0) != lumaMLTZero;\n FxaaFloat spanLength = (dstP + dstN);\n FxaaBool goodSpanP = (lumaEndP < 0.0) != lumaMLTZero;\n FxaaFloat spanLengthRcp = 1.0/spanLength;\n/*--------------------------------------------------------------------------*/\n FxaaBool directionN = dstN < dstP;\n FxaaFloat dst = min(dstN, dstP);\n FxaaBool goodSpan = directionN ? goodSpanN : goodSpanP;\n FxaaFloat subpixG = subpixF * subpixF;\n FxaaFloat pixelOffset = (dst * (-spanLengthRcp)) + 0.5;\n FxaaFloat subpixH = subpixG * fxaaQualitySubpix;\n/*--------------------------------------------------------------------------*/\n FxaaFloat pixelOffsetGood = goodSpan ? pixelOffset : 0.0;\n FxaaFloat pixelOffsetSubpix = max(pixelOffsetGood, subpixH);\n if(!horzSpan) posM.x += pixelOffsetSubpix * lengthSign;\n if( horzSpan) posM.y += pixelOffsetSubpix * lengthSign;\n return FxaaFloat4(FxaaTexTop(tex, posM).xyz, lumaM);\n}\n"},function(e,t,i){"use strict";var n=i(8),a=i(7),r=i(0),o=i(19),s=i(33),l=i(108),u=i(91),d=i(32),c=i(58),f=i(45);function h(){this._uniformMap=void 0,this._command=void 0,this._colorTexture=void 0,this._depthTexture=void 0,this._ready=!1,this._name="czm_autoexposure",this._logDepthChanged=void 0,this._useLogDepth=void 0,this._framebuffers=void 0,this._previousLuminance=void 0,this._commands=void 0,this._clearCommand=void 0,this._minMaxLuminance=new n.default,this.enabled=!0,this._enabled=!0,this.minimumLuminance=.1,this.maximumLuminance=10}function p(e){var t=e._framebuffers;if(Object(r.default)(t)){for(var i=t.length,n=0;n<i;++n)t[n].destroy();e._framebuffers=void 0,e._previousLuminance.destroy(),e._previousLuminance=void 0}}function m(e){var t=e._commands;if(Object(r.default)(t)){for(var i=t.length,n=0;n<i;++n)t[n].shaderProgram.destroy();e._commands=void 0}}function _(e,t){var i;if(0===t)i={colorTexture:function(){return e._colorTexture},colorTextureDimensions:function(){return e._colorTexture.dimensions}};else{var n=e._framebuffers[t-1].getColorTexture(0);i={colorTexture:function(){return n},colorTextureDimensions:function(){return n.dimensions}}}return i.minMaxLuminance=function(){return e._minMaxLuminance},i.previousLuminance=function(){return e._previousLuminance.getColorTexture(0)},i}function g(e,t){var i="uniform sampler2D colorTexture; \nvarying vec2 v_textureCoordinates; \nfloat sampleTexture(vec2 offset) { \n";return i+=0===e?" vec4 color = texture2D(colorTexture, v_textureCoordinates + offset); \n return czm_luminance(color.rgb); \n":" return texture2D(colorTexture, v_textureCoordinates + offset).r; \n",i+="}\n\n",i+="uniform vec2 colorTextureDimensions; \nuniform vec2 minMaxLuminance; \nuniform sampler2D previousLuminance; \nvoid main() { \n float color = 0.0; \n float xStep = 1.0 / colorTextureDimensions.x; \n float yStep = 1.0 / colorTextureDimensions.y; \n int count = 0; \n for (int i = 0; i < 3; ++i) { \n for (int j = 0; j < 3; ++j) { \n vec2 offset; \n offset.x = -xStep + float(i) * xStep; \n offset.y = -yStep + float(j) * yStep; \n if (offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0) { \n continue; \n } \n color += sampleTexture(offset); \n ++count; \n } \n } \n if (count > 0) { \n color /= float(count); \n } \n",e===t-1&&(i+=" float previous = texture2D(previousLuminance, vec2(0.5)).r; \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n color = previous + (color - previous) / (60.0 * 1.5); \n color = clamp(color, minMaxLuminance.x, minMaxLuminance.y); \n"),i+=" gl_FragColor = vec4(color); \n} \n"}Object.defineProperties(h.prototype,{ready:{get:function(){return this._ready}},name:{get:function(){return this._name}},outputTexture:{get:function(){var e=this._framebuffers;if(Object(r.default)(e))return e[e.length-1].getColorTexture(0)}}}),h.prototype.clear=function(e){var t=this._framebuffers;if(Object(r.default)(t)){var i=this._clearCommand;Object(r.default)(i)||(i=this._clearCommand=new l.default({color:new a.default(0,0,0,0),framebuffer:void 0}));for(var n=t.length,o=0;o<n;++o)i.framebuffer=t[o],i.execute(e)}},h.prototype.update=function(e){var t=e.drawingBufferWidth,i=e.drawingBufferHeight;t===this._width&&i===this._height||(this._width=t,this._height=i,function(e,t){p(e);for(var i=e._width,n=e._height,a=s.default.RGBA,r=t.halfFloatingPointTexture?d.default.HALF_FLOAT:d.default.FLOAT,o=Math.ceil(Math.log(Math.max(i,n))/Math.log(3)),l=new Array(o),h=0;h<o;++h)i=Math.max(Math.ceil(i/3),1),n=Math.max(Math.ceil(n/3),1),l[h]=new u.default({context:t,colorTextures:[new f.default({context:t,width:i,height:n,pixelFormat:a,pixelDatatype:r,sampler:c.default.NEAREST})]});var m=l[o-1].getColorTexture(0);e._previousLuminance=new u.default({context:t,colorTextures:[new f.default({context:t,width:m.width,height:m.height,pixelFormat:a,pixelDatatype:r,sampler:c.default.NEAREST})]}),e._framebuffers=l}(this,e),function(e,t){m(e);for(var i=e._framebuffers,n=i.length,a=new Array(n),r=0;r<n;++r)a[r]=t.createViewportQuadCommand(g(r,n),{framebuffer:i[r],uniformMap:_(e,r)});e._commands=a}(this,e),this._ready||(this._ready=!0)),this._minMaxLuminance.x=this.minimumLuminance,this._minMaxLuminance.y=this.maximumLuminance;var n=this._framebuffers,a=n[n.length-1];n[n.length-1]=this._previousLuminance,this._commands[this._commands.length-1].framebuffer=this._previousLuminance,this._previousLuminance=a},h.prototype.execute=function(e,t){this._colorTexture=t;var i=this._commands;if(Object(r.default)(i))for(var n=i.length,a=0;a<n;++a)i[a].execute(e)},h.prototype.isDestroyed=function(){return!1},h.prototype.destroy=function(){return p(this),m(this),Object(o.default)(this)},t.a=h},function(e,t,i){"use strict";var n=i(1),a=i(22),r=i(4),o=i(0),s=i(19),l=i(182),u=i(5),d=i(6),c=i(79),f=i(166),h=i(119),p=i(85),m=i(222),_=i(84),g=i(52),v=i(145),y=i(13);function b(e){r.a.typeOf.object("scene",e),this._scene=e,this._currentTweens=[],this._morphHandler=void 0,this._morphCancelled=!1,this._completeMorph=void 0,this._morphToOrthographic=!1}b.prototype.completeMorph=function(){Object(o.default)(this._completeMorph)&&this._completeMorph()},b.prototype.morphTo2D=function(e,t){Object(o.default)(this._completeMorph)&&this._completeMorph();var i=this._scene;this._previousMode=i.mode,this._morphToOrthographic=i.camera.frustum instanceof c.a,this._previousMode!==y.default.SCENE2D&&this._previousMode!==y.default.MORPHING&&(this._scene.morphStart.raiseEvent(this,this._previousMode,y.default.SCENE2D,!0),i._mode=y.default.MORPHING,i.camera._setTransform(d.default.IDENTITY),this._previousMode===y.default.COLUMBUS_VIEW?function(e,t){t*=.5;var i=e._scene,a=i.camera,r=n.default.clone(a.position,ne),s=n.default.clone(a.direction,ae),u=n.default.clone(a.up,re),c=n.default.negate(n.default.UNIT_Z,se),f=n.default.clone(n.default.UNIT_Y,le),h=oe;if(t>0)n.default.clone(n.default.ZERO,oe),h.z=5*i.mapProjection.ellipsoid.maximumRadius;else{n.default.clone(r,oe);var p=de;d.default.multiplyByPoint(v.a.TRANSFORM_2D,r,p.origin),d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,s,p.direction);var m=i.globe;if(Object(o.default)(m)){var _=m.pickWorldCoordinates(p,i,!0,ce);Object(o.default)(_)&&(d.default.multiplyByPoint(v.a.TRANSFORM_2D_INVERSE,_,h),h.z+=n.default.distance(r,h))}}var g=ue;g.right=.5*h.z,g.left=-g.right,g.top=g.right*(i.drawingBufferHeight/i.drawingBufferWidth),g.bottom=-g.top;var y=fe;y.position=h,y.direction=c,y.up=f,y.frustum=g;var b=Ae(y);function w(e,t){e.position.z=t}R(e,b);var O=i.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){te(r,h,e.time,a.position),te(s,c,e.time,a.direction),te(u,f,e.time,a.up),n.default.cross(a.direction,a.up,a.right),n.default.normalize(a.right,a.right),a._adjustOrthographicFrustum(!0)},complete:function(){ie(e,t,y,w,b)}});e._currentTweens.push(O)}(this,e):function(e,t,i){t*=.5;var a=e._scene,r=a.camera,s=pe;if(t>0)n.default.clone(n.default.ZERO,s.position),s.position.z=5*i.maximumRadius,n.default.negate(n.default.UNIT_Z,s.direction),n.default.clone(n.default.UNIT_Y,s.up);else{i.cartesianToCartographic(r.positionWC,he),a.mapProjection.project(he,s.position),n.default.negate(n.default.UNIT_Z,s.direction),n.default.clone(n.default.UNIT_Y,s.up);var l=ge;n.default.clone(s.position2D,l.origin);var u=n.default.clone(r.directionWC,l.direction),c=i.scaleToGeodeticSurface(r.positionWC,ye),f=g.default.eastNorthUpToFixedFrame(c,i,ve);d.default.inverseTransformation(f,f),d.default.multiplyByPointAsVector(f,u,u),d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,u,u);var h=a.globe;if(Object(o.default)(h)){var p=h.pickWorldCoordinates(l,a,!0,_e);if(Object(o.default)(p)){var m=n.default.distance(s.position2D,p);p.x+=m,n.default.clone(p,s.position2D)}}}function _(e,t){e.position.x=t}d.default.multiplyByPoint(v.a.TRANSFORM_2D,s.position,s.position2D),d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,s.direction,s.direction2D),d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,s.up,s.up2D);var y=s.frustum;y.right=.5*s.position.z,y.left=-y.right,y.top=y.right*(a.drawingBufferHeight/a.drawingBufferWidth),y.bottom=-y.top;var b=me;d.default.multiplyByPoint(v.a.TRANSFORM_2D_INVERSE,s.position2D,b.position),n.default.clone(s.direction,b.direction),n.default.clone(s.up,b.up),b.frustum=y;var w=Ae(b);R(e,w),we(e,t,s,(function(){ie(e,t,s,_,w)}))}(this,e,t),0===e&&Object(o.default)(this._completeMorph)&&this._completeMorph())};var w=new n.default,O=new n.default,x=new n.default,A=new n.default,T=new n.default,E=new n.default,C=new n.default,S=new a.default,M=new d.default,D=new h.default,P=new c.a,I={position:void 0,direction:void 0,up:void 0,position2D:void 0,direction2D:void 0,up2D:void 0,frustum:void 0};b.prototype.morphToColumbusView=function(e,t){Object(o.default)(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==y.default.COLUMBUS_VIEW&&this._previousMode!==y.default.MORPHING){this._scene.morphStart.raiseEvent(this,this._previousMode,y.default.COLUMBUS_VIEW,!0),i.camera._setTransform(d.default.IDENTITY);var a,r=w,s=O,c=x;if(e>0)r.x=0,r.y=-1,r.z=1,r=n.default.multiplyByScalar(n.default.normalize(r,r),5*t.maximumRadius,r),n.default.negate(n.default.normalize(r,s),s),n.default.cross(n.default.UNIT_X,s,c);else{var f=i.camera;if(this._previousMode===y.default.SCENE2D)n.default.clone(f.position,r),r.z=f.frustum.right-f.frustum.left,n.default.negate(n.default.UNIT_Z,s),n.default.clone(n.default.UNIT_Y,c);else{n.default.clone(f.positionWC,r),n.default.clone(f.directionWC,s),n.default.clone(f.upWC,c);var h=t.scaleToGeodeticSurface(r,C),p=g.default.eastNorthUpToFixedFrame(h,t,M);d.default.inverseTransformation(p,p),i.mapProjection.project(t.cartesianToCartographic(r,S),r),d.default.multiplyByPointAsVector(p,s,s),d.default.multiplyByPointAsVector(p,c,c)}}this._morphToOrthographic?((a=P).width=i.camera.frustum.right-i.camera.frustum.left,a.aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight):((a=D).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,a.fov=u.default.toRadians(60));var m=I;m.position=r,m.direction=s,m.up=c,m.frustum=a;var _=function(e){return function(t){var i=t._scene;i._mode=y.default.COLUMBUS_VIEW,i.morphTime=y.default.getMorphTime(y.default.COLUMBUS_VIEW),N(t);var a=i.camera;(t._previousModeMode!==y.default.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,n.default.clone(e.position,a.position),n.default.clone(e.direction,a.direction),n.default.clone(e.up,a.up),n.default.cross(a.direction,a.up,a.right),n.default.normalize(a.right,a.right));var r=a.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var s=Object(o.default)(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,y.default.COLUMBUS_VIEW,s)}}(m);R(this,_),this._previousMode===y.default.SCENE2D?function(e,t,i,a){t*=.5;var r=e._scene,o=r.camera,s=n.default.clone(i.position,Q),u=n.default.clone(i.direction,$),d=n.default.clone(i.up,ee);function c(){o.frustum=i.frustum.clone();var c=n.default.clone(o.position,K),f=n.default.clone(o.direction,J),h=n.default.clone(o.up,Z);c.z=s.z;var p=r.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){te(c,s,e.time,o.position),te(f,u,e.time,o.direction),te(h,d,e.time,o.up),n.default.cross(o.direction,o.up,o.right),n.default.normalize(o.right,o.right)},complete:function(){a(e)}});e._currentTweens.push(p)}r._mode=y.default.MORPHING,e._morphToOrthographic?c():be(e,0,i,c)}(this,e,m,_):(m.position2D=d.default.multiplyByPoint(v.a.TRANSFORM_2D,r,A),m.direction2D=d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,s,T),m.up2D=d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D,c,E),i._mode=y.default.MORPHING,we(this,e,m,_)),0===e&&Object(o.default)(this._completeMorph)&&this._completeMorph()}};var L={position:new n.default,direction:new n.default,up:new n.default,frustum:void 0},j=new h.default;function R(e,t){if(e._scene.completeMorphOnUserInput){e._morphHandler=new m.default(e._scene.canvas);var i=function(){e._morphCancelled=!0,e._scene.camera.cancelFlight(),t(e)};e._completeMorph=i,e._morphHandler.setInputAction(i,_.default.LEFT_DOWN),e._morphHandler.setInputAction(i,_.default.MIDDLE_DOWN),e._morphHandler.setInputAction(i,_.default.RIGHT_DOWN),e._morphHandler.setInputAction(i,_.default.WHEEL)}}function N(e){for(var t=e._currentTweens,i=0;i<t.length;++i)t[i].cancelTween();e._currentTweens.length=0,e._morphHandler=e._morphHandler&&e._morphHandler.destroy()}b.prototype.morphTo3D=function(e,t){Object(o.default)(this._completeMorph)&&this._completeMorph();var i=this._scene;if(this._previousMode=i.mode,this._previousMode!==y.default.SCENE3D&&this._previousMode!==y.default.MORPHING){if(this._scene.morphStart.raiseEvent(this,this._previousMode,y.default.SCENE3D,!0),i._mode=y.default.MORPHING,i.camera._setTransform(d.default.IDENTITY),this._previousMode===y.default.SCENE2D)!function(e,t,i){t/=3;var a,r,o=e._scene,s=o.camera;t>0?(a=L,n.default.fromDegrees(0,0,5*i.maximumRadius,i,a.position),n.default.negate(a.position,a.direction),n.default.normalize(a.direction,a.direction),n.default.clone(n.default.UNIT_Z,a.up)):(s.position.z=s.frustum.right-s.frustum.left,a=z(e,i));e._morphToOrthographic?((r=X).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.width=s.frustum.right-s.frustum.left):((r=j).aspectRatio=o.drawingBufferWidth/o.drawingBufferHeight,r.fov=u.default.toRadians(60));a.frustum=r;var l,d=xe(a);R(e,d),l=e._morphToOrthographic?function(){q(e,t,a,d)}:function(){be(e,t,a,(function(){q(e,t,a,d)}))};t>0?(o._mode=y.default.SCENE2D,s.flyTo({duration:t,destination:n.default.fromDegrees(0,0,5*i.maximumRadius,i,Q),complete:function(){o._mode=y.default.MORPHING,l()}})):l()}(this,e,t);else{var a,r;e>0?(a=L,n.default.fromDegrees(0,0,5*t.maximumRadius,t,a.position),n.default.negate(a.position,a.direction),n.default.normalize(a.direction,a.direction),n.default.clone(n.default.UNIT_Z,a.up)):a=z(this,t);var s=i.camera;s.frustum instanceof c.a?r=s.frustum.clone():((r=j).aspectRatio=i.drawingBufferWidth/i.drawingBufferHeight,r.fov=u.default.toRadians(60)),a.frustum=r;var l=xe(a);R(this,l),q(this,e,a,l)}0===e&&Object(o.default)(this._completeMorph)&&this._completeMorph()}},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return N(this),Object(s.default)(this)};var B=new a.default,F=new n.default,k=new d.default;function z(e,t){var i=e._scene,n=i.camera,a=L,r=a.position,o=a.direction,s=a.up,l=i.mapProjection.unproject(n.position,B);t.cartographicToCartesian(l,r);var u=t.scaleToGeodeticSurface(r,F),c=g.default.eastNorthUpToFixedFrame(u,t,k);return d.default.multiplyByPointAsVector(c,n.direction,o),d.default.multiplyByPointAsVector(c,n.up,s),a}var U=new n.default,V=new n.default,H=new n.default,G=new n.default,Y=new n.default,W=new n.default;function q(e,t,i,a){t*=.5;var r=e._scene,o=r.camera,s=n.default.clone(o.position,U),u=n.default.clone(o.direction,V),c=n.default.clone(o.up,H),f=d.default.multiplyByPoint(v.a.TRANSFORM_2D_INVERSE,i.position,G),h=d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D_INVERSE,i.direction,Y),p=d.default.multiplyByPointAsVector(v.a.TRANSFORM_2D_INVERSE,i.up,W);var m=r.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){te(s,f,e.time,o.position),te(u,h,e.time,o.direction),te(c,p,e.time,o.up),n.default.cross(o.direction,o.up,o.right),n.default.normalize(o.right,o.right)},complete:function(){Oe(e,r,0,1,t,a)}});e._currentTweens.push(m)}var X=new c.a,K=new n.default,J=new n.default,Z=new n.default,Q=new n.default,$=new n.default,ee=new n.default;function te(e,t,i,a){return n.default.lerp(e,t,i,a)}function ie(e,t,i,n,a){var r=e._scene,o=r.camera;if(!(o.frustum instanceof c.a)){var s=o.frustum.fov,d=.5*u.default.RADIANS_PER_DEGREE,f=i.position.z*Math.tan(.5*s);o.frustum.far=f/Math.tan(.5*d)+1e7;var h=r.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){o.frustum.fov=u.default.lerp(s,d,e.time);var t=f/Math.tan(.5*o.frustum.fov);n(o,t)},complete:function(){o.frustum=i.frustum.clone(),a(e)}});e._currentTweens.push(h)}}var ne=new n.default,ae=new n.default,re=new n.default,oe=new n.default,se=new n.default,le=new n.default,ue=new f.a,de=new p.default,ce=new n.default,fe={position:void 0,direction:void 0,up:void 0,frustum:void 0};var he=new a.default,pe={position:new n.default,direction:new n.default,up:new n.default,position2D:new n.default,direction2D:new n.default,up2D:new n.default,frustum:new f.a},me={position:new n.default,direction:new n.default,up:new n.default,frustum:void 0},_e=new n.default,ge=new p.default,ve=new d.default,ye=new n.default;function be(e,t,i,n){var a=e._scene,r=a.camera,o=r.frustum.right-r.frustum.left;r.frustum=i.frustum.clone();var s=r.frustum.fov,d=.5*u.default.RADIANS_PER_DEGREE,c=o*Math.tan(.5*s);r.frustum.far=c/Math.tan(.5*d)+1e7,r.frustum.fov=d;var f=a.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){r.frustum.fov=u.default.lerp(d,s,e.time),r.position.z=c/Math.tan(.5*r.frustum.fov)},complete:function(){n(e)}});e._currentTweens.push(f)}function we(e,t,i,a){var r=e._scene,o=r.camera,s=n.default.clone(o.position,K),u=n.default.clone(o.direction,J),d=n.default.clone(o.up,Z),c=n.default.clone(i.position2D,Q),f=n.default.clone(i.direction2D,$),h=n.default.clone(i.up2D,ee);var p=r.tweens.add({duration:t,easingFunction:l.a.QUARTIC_OUT,startObject:{time:0},stopObject:{time:1},update:function(e){te(s,c,e.time,o.position),te(u,f,e.time,o.direction),te(d,h,e.time,o.up),n.default.cross(o.direction,o.up,o.right),n.default.normalize(o.right,o.right),o._adjustOrthographicFrustum(!0)},complete:function(){Oe(e,r,1,0,t,a)}});e._currentTweens.push(p)}function Oe(e,t,i,n,a,r){var s={object:t,property:"morphTime",startValue:i,stopValue:n,duration:a,easingFunction:l.a.QUARTIC_OUT};Object(o.default)(r)&&(s.complete=function(){r(e)});var u=t.tweens.addProperty(s);e._currentTweens.push(u)}function xe(e){return function(t){var i=t._scene;i._mode=y.default.SCENE3D,i.morphTime=y.default.getMorphTime(y.default.SCENE3D),N(t);var a=i.camera;(t._previousMode!==y.default.MORPHING||t._morphCancelled)&&(t._morphCancelled=!1,n.default.clone(e.position,a.position),n.default.clone(e.direction,a.direction),n.default.clone(e.up,a.up),n.default.cross(a.direction,a.up,a.right),n.default.normalize(a.right,a.right),a.frustum=e.frustum.clone());var r=a.frustum;i.frameState.useLogDepth&&(r.near=.1,r.far=1e10);var s=Object(o.default)(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,y.default.SCENE3D,s)}}function Ae(e){return function(t){var i=t._scene;i._mode=y.default.SCENE2D,i.morphTime=y.default.getMorphTime(y.default.SCENE2D),N(t);var a=i.camera;n.default.clone(e.position,a.position),a.position.z=2*i.mapProjection.ellipsoid.maximumRadius,n.default.clone(e.direction,a.direction),n.default.clone(e.up,a.up),n.default.cross(a.direction,a.up,a.right),n.default.normalize(a.right,a.right),a.frustum=e.frustum.clone();var r=Object(o.default)(t._completeMorph);t._completeMorph=void 0,i.camera.update(i.mode),t._scene.morphComplete.raiseEvent(t,t._previousMode,y.default.SCENE2D,r)}}t.a=b},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(16),o=i(22),s=i(2),l=i(0),u=i(19),d=i(3),c=i(15),f=i(198),h=i(124),p=i(199),m=i(5),_=i(12),g=i(6),v=i(79),y=i(80),b=i(27),w=i(85),O=i(242),x=i(52),A=i(817),T=i(133),E=i(243),C=i(13),S=i(177),M=i(451);function D(e){if(!Object(l.default)(e))throw new d.default("scene is required.");this.enableInputs=!0,this.enableTranslate=!0,this.enableZoom=!0,this.enableRotate=!0,this.enableTilt=!0,this.enableLook=!0,this.inertiaSpin=.9,this.inertiaTranslate=.9,this.inertiaZoom=.8,this.maximumMovementRatio=.1,this.bounceAnimationTime=3,this.minimumZoomDistance=1,this.maximumZoomDistance=Number.POSITIVE_INFINITY,this.translateEventTypes=T.a.LEFT_DRAG,this.zoomEventTypes=[T.a.RIGHT_DRAG,T.a.WHEEL,T.a.PINCH],this.rotateEventTypes=T.a.LEFT_DRAG,this.tiltEventTypes=[T.a.MIDDLE_DRAG,T.a.PINCH,{eventType:T.a.LEFT_DRAG,modifier:p.default.CTRL},{eventType:T.a.RIGHT_DRAG,modifier:p.default.CTRL}],this.lookEventTypes={eventType:T.a.LEFT_DRAG,modifier:p.default.SHIFT},this.minimumPickingTerrainHeight=15e4,this._minimumPickingTerrainHeight=this.minimumPickingTerrainHeight,this.minimumCollisionTerrainHeight=15e3,this._minimumCollisionTerrainHeight=this.minimumCollisionTerrainHeight,this.minimumTrackBallHeight=75e5,this._minimumTrackBallHeight=this.minimumTrackBallHeight,this.enableCollisionDetection=!0,this._scene=e,this._globe=void 0,this._ellipsoid=void 0,this._aggregator=new A.a(e.canvas),this._lastInertiaSpinMovement=void 0,this._lastInertiaZoomMovement=void 0,this._lastInertiaTranslateMovement=void 0,this._lastInertiaTiltMovement=void 0,this._inertiaDisablers={_lastInertiaZoomMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement","_lastInertiaTiltMovement"],_lastInertiaTiltMovement:["_lastInertiaSpinMovement","_lastInertiaTranslateMovement"]},this._tweens=new M.a,this._tween=void 0,this._horizontalRotationAxis=void 0,this._tiltCenterMousePosition=new n.default(-1,-1),this._tiltCenter=new a.default,this._rotateMousePosition=new n.default(-1,-1),this._rotateStartPosition=new a.default,this._strafeStartPosition=new a.default,this._strafeMousePosition=new n.default,this._strafeEndMousePosition=new n.default,this._zoomMouseStart=new n.default(-1,-1),this._zoomWorldPosition=new a.default,this._useZoomWorldPosition=!1,this._tiltCVOffMap=!1,this._looking=!1,this._rotating=!1,this._strafing=!1,this._zoomingOnVector=!1,this._zoomingUnderground=!1,this._rotatingZoom=!1,this._adjustedHeightForTerrain=!1,this._cameraUnderground=!1;var t=e.mapProjection;this._maxCoord=t.project(new o.default(Math.PI,m.default.PI_OVER_TWO)),this._zoomFactor=5,this._rotateFactor=void 0,this._rotateRateRangeAdjustment=void 0,this._maximumRotateRate=1.77,this._minimumRotateRate=2e-4,this._minimumZoomRate=20,this._maximumZoomRate=5906376272e3,this._minimumUndergroundPickDistance=2e3,this._maximumUndergroundPickDistance=1e4}function P(e,t,i,a,r,o,s){var u=o[s];Object(l.default)(u)||(u=o[s]={startPosition:new n.default,endPosition:new n.default,motion:new n.default,inertiaEnabled:!0});var d,c=e.getButtonPressTime(t,i),f=e.getButtonReleaseTime(t,i),h=c&&f&&(f.getTime()-c.getTime())/1e3,p=new Date,_=f&&(p.getTime()-f.getTime())/1e3;if(c&&f&&h<.4){var g=function(e,t){if(e<0)return 0;var i=25*(1-t);return Math.exp(-i*e)}(_,a),v=e.getLastMovement(t,i);if(!Object(l.default)(v)||(d=v,n.default.equalsEpsilon(d.startPosition,d.endPosition,m.default.EPSILON14))||!u.inertiaEnabled)return;if(u.motion.x=.5*(v.endPosition.x-v.startPosition.x),u.motion.y=.5*(v.endPosition.y-v.startPosition.y),u.startPosition=n.default.clone(v.startPosition,u.startPosition),u.endPosition=n.default.multiplyByScalar(u.motion,g,u.endPosition),u.endPosition=n.default.add(u.startPosition,u.endPosition,u.endPosition),isNaN(u.endPosition.x)||isNaN(u.endPosition.y)||n.default.distance(u.startPosition,u.endPosition)<.5)return;if(!e.isButtonDown(t,i))r(o,e.getStartMousePosition(t,i),u)}}function I(e,t){if(Object(l.default)(t)){var i=e[t];Object(l.default)(i)&&(i.inertiaEnabled=!0);var n=e._inertiaDisablers[t];if(Object(l.default)(n))for(var a=n.length,r=0;r<a;++r)i=e[n[r]],Object(l.default)(i)&&(i.inertiaEnabled=!1)}}var L=[];function j(e,t,i,n,a,r){if(Object(l.default)(i)){var o=e._aggregator;Array.isArray(i)||(L[0]=i,i=L);for(var s=i.length,u=0;u<s;++u){var d=i[u],c=Object(l.default)(d.eventType)?d.eventType:d,f=d.modifier,h=o.isMoving(c,f)&&o.getMovement(c,f),p=o.getStartMousePosition(c,f);e.enableInputs&&t&&(h?(n(e,p,h),I(e,r)):a<1&&P(o,c,f,a,n,e,r))}}}var R=new w.default,N=new a.default,B=new n.default,F=new a.default,k=new n.default,z=new a.default,U=new a.default,V=new a.default,H=new a.default,G=new a.default,Y=new a.default,W=new a.default,q=new a.default,X=new a.default,K=new a.default,J=new a.default,Z=new a.default,Q=new a.default,$=new a.default,ee=new a.default,te=new a.default,ie=new a.default,ne=new a.default,ae={orientation:new f.default};function re(e,t,i,r,o,s){var u=1;Object(l.default)(s)&&(u=m.default.clamp(Math.abs(s),.25,1));var d=e.minimumZoomDistance*u,c=e.maximumZoomDistance,f=r*(o-d);f=m.default.clamp(f,e._minimumZoomRate,e._maximumZoomRate);var h=(i.endPosition.y-i.startPosition.y)/e._scene.canvas.clientHeight,p=f*(h=Math.min(h,e.maximumMovementRatio));if(e.enableCollisionDetection||0===e.minimumZoomDistance||!Object(l.default)(e._globe)){if(p>0&&Math.abs(o-d)<1)return;if(p<0&&Math.abs(o-c)<1)return;o-p<d?p=o-d-1:o-p>c&&(p=o-c)}var _=e._scene,g=_.camera,y=_.mode,b=ae.orientation;if(b.heading=g.heading,b.pitch=g.pitch,b.roll=g.roll,g.frustum instanceof v.a)Math.abs(p)>0&&(g.zoomIn(p),g._adjustOrthographicFrustum());else{var w,O=n.default.equals(t,e._zoomMouseStart),x=e._zoomingOnVector,A=e._rotatingZoom;if(O||(e._zoomMouseStart=n.default.clone(t,e._zoomMouseStart),Object(l.default)(e._globe)&&(y===C.default.SCENE2D?(w=g.getPickRay(t,R).origin,w=a.default.fromElements(w.y,w.z,w.x)):w=ge(e,t,N)),Object(l.default)(w)?(e._useZoomWorldPosition=!0,e._zoomWorldPosition=a.default.clone(w,e._zoomWorldPosition)):e._useZoomWorldPosition=!1,x=e._zoomingOnVector=!1,A=e._rotatingZoom=!1,e._zoomingUnderground=e._cameraUnderground),e._useZoomWorldPosition){var T=y===C.default.COLUMBUS_VIEW;if(g.positionCartographic.height<2e6&&(A=!0),!O||A){if(y===C.default.SCENE2D){var E=e._zoomWorldPosition,M=g.position;if(!a.default.equals(E,M)&&g.positionCartographic.height<2*e._maxCoord.x){var D=g.position.x,P=a.default.subtract(E,M,F);a.default.normalize(P,P);var I=a.default.distance(E,M)*p/(.5*g.getMagnitude());g.move(P,.5*I),(g.position.x<0&&D>0||g.position.x>0&&D<0)&&(w=g.getPickRay(t,R).origin,w=a.default.fromElements(w.y,w.z,w.x),e._zoomWorldPosition=a.default.clone(w,e._zoomWorldPosition))}}else if(y===C.default.SCENE3D){var L=a.default.normalize(g.position,G);if(e._cameraUnderground||e._zoomingUnderground||g.positionCartographic.height<3e3&&Math.abs(a.default.dot(g.direction,L))<.6)T=!0;else{var j=_.canvas,re=k;re.x=j.clientWidth/2,re.y=j.clientHeight/2;var oe=ge(e,re,z);if(Object(l.default)(oe))if(g.positionCartographic.height<1e6){if(!(a.default.dot(g.direction,L)>=-.5)){var se=W;a.default.clone(g.position,se);var le=e._zoomWorldPosition,ue=Y;if(ue=a.default.normalize(le,ue),a.default.dot(ue,L)<0)return;var de=ee,ce=K;a.default.clone(g.direction,ce),a.default.add(se,a.default.multiplyByScalar(ce,1e3,te),de);var fe=J,he=Z;a.default.subtract(le,se,fe),a.default.normalize(fe,he);var pe=a.default.dot(L,he);if(pe>=0)return void(e._zoomMouseStart.x=-1);var me=Math.acos(-pe),_e=a.default.magnitude(se),ve=a.default.magnitude(le),ye=_e-p,be=a.default.magnitude(fe),we=Math.asin(m.default.clamp(be/ve*Math.sin(me),-1,1))-Math.asin(m.default.clamp(ye/ve*Math.sin(me),-1,1))+me,Oe=q;a.default.normalize(se,Oe);var xe=X;xe=a.default.cross(he,Oe,xe),xe=a.default.normalize(xe,xe),a.default.normalize(a.default.cross(Oe,xe,te),ce),a.default.multiplyByScalar(a.default.normalize(de,te),a.default.magnitude(de)-p,de),a.default.normalize(se,se),a.default.multiplyByScalar(se,ye,se);var Ae=Q;a.default.multiplyByScalar(a.default.add(a.default.multiplyByScalar(Oe,Math.cos(we)-1,ie),a.default.multiplyByScalar(ce,Math.sin(we),ne),te),ye,Ae),a.default.add(se,Ae,se),a.default.normalize(de,Oe),a.default.normalize(a.default.cross(Oe,xe,te),ce);var Te=$;return a.default.multiplyByScalar(a.default.add(a.default.multiplyByScalar(Oe,Math.cos(we)-1,ie),a.default.multiplyByScalar(ce,Math.sin(we),ne),te),a.default.magnitude(de),Te),a.default.add(de,Te,de),a.default.clone(se,g.position),a.default.normalize(a.default.subtract(de,se,te),g.direction),a.default.clone(g.direction,g.direction),a.default.cross(g.direction,g.up,g.right),a.default.cross(g.right,g.direction,g.up),void g.setView(ae)}T=!0}else{var Ee=a.default.normalize(oe,U),Ce=a.default.normalize(e._zoomWorldPosition,V),Se=a.default.dot(Ce,Ee);if(Se>0&&Se<1){var Me=m.default.acosClamped(Se),De=a.default.cross(Ce,Ee,H),Pe=p/(Math.abs(Me)>m.default.toRadians(20)?.75*g.positionCartographic.height:g.positionCartographic.height-p);g.rotate(De,Me*Pe)}}else T=!0}}e._rotatingZoom=!T}if(!O&&T||x){var Ie=S.default.wgs84ToWindowCoordinates(_,e._zoomWorldPosition,B),Le=(y!==C.default.COLUMBUS_VIEW&&n.default.equals(t,e._zoomMouseStart)&&Object(l.default)(Ie)?g.getPickRay(Ie,R):g.getPickRay(t,R)).direction;y!==C.default.COLUMBUS_VIEW&&y!==C.default.SCENE2D||a.default.fromElements(Le.y,Le.z,Le.x,Le),g.move(Le,p),e._zoomingOnVector=!0}else g.zoomIn(p);e._cameraUnderground||g.setView(ae)}else g.zoomIn(p)}}var oe=new w.default,se=new w.default,le=new a.default;function ue(e,t,i){var n=e._scene.camera,r=n.getPickRay(i.startPosition,oe).origin,o=n.getPickRay(i.endPosition,se).origin;r=a.default.fromElements(r.y,r.z,r.x,r),o=a.default.fromElements(o.y,o.z,o.x,o);var s=a.default.subtract(r,o,le),l=a.default.magnitude(s);l>0&&(a.default.normalize(s,s),n.move(s,l))}function de(e,t,i){Object(l.default)(i.distance)&&(i=i.distance);var n=e._scene.camera;re(e,t,i,e._zoomFactor,n.getMagnitude())}var ce=new n.default,fe=new n.default;function he(e,t,i){if(Object(l.default)(i.angleAndHeight))!function(e,t,i){var n=e._rotateFactor*e._rotateRateRangeAdjustment;n>e._maximumRotateRate&&(n=e._maximumRotateRate);n<e._minimumRotateRate&&(n=e._minimumRotateRate);var a=e._scene,r=a.camera,o=a.canvas,s=(i.endPosition.x-i.startPosition.x)/o.clientWidth;s=Math.min(s,e.maximumMovementRatio);var l=n*s*Math.PI*4;r.twistRight(l)}(e,0,i.angleAndHeight);else{var a=e._scene,r=a.camera,o=a.canvas,s=o.clientWidth,u=o.clientHeight,d=ce;d.x=2/s*i.startPosition.x-1,d.y=2/u*(u-i.startPosition.y)-1,d=n.default.normalize(d,d);var c=fe;c.x=2/s*i.endPosition.x-1,c.y=2/u*(u-i.endPosition.y)-1,c=n.default.normalize(c,c);var f=m.default.acosClamped(d.x);d.y<0&&(f=m.default.TWO_PI-f);var h=m.default.acosClamped(c.x);c.y<0&&(h=m.default.TWO_PI-h);var p=h-f;r.twistRight(p)}}var pe=new w.default,me=new a.default,_e=new a.default;function ge(e,t,i){var n=e._scene,r=e._globe,o=n.camera;if(Object(l.default)(r)){var s,u=!e._cameraUnderground;n.pickPositionSupported&&(s=n.pickPositionWorldCoordinates(t,me));var d=o.getPickRay(t,pe),c=r.pickWorldCoordinates(d,n,u,_e);return(Object(l.default)(s)?a.default.distance(s,o.positionWC):Number.POSITIVE_INFINITY)<(Object(l.default)(c)?a.default.distance(c,o.positionWC):Number.POSITIVE_INFINITY)?a.default.clone(s,i):a.default.clone(c,i)}}var ve=new o.default;function ye(e){var t=e._ellipsoid,i=e._scene,n=i.camera,a=0;if(i.mode===C.default.SCENE3D){var r=t.cartesianToCartographic(n.position,ve);Object(l.default)(r)&&(a=r.height)}else a=n.position.z;var o=Object(s.default)(e._scene.globeHeight,0);return Math.abs(o-a)}var be=new a.default;function we(e,t){var i=t.origin,n=t.direction,r=ye(e),o=a.default.normalize(i,be),s=Math.abs(a.default.dot(o,n));return r*(s=2*Math.max(s,.5))}function Oe(e,t,i,n){var r=a.default.distance(t.origin,i),o=ye(e);return r>m.default.clamp(5*o,e._minimumUndergroundPickDistance,e._maximumUndergroundPickDistance)&&(r=Math.min(r,o/5),r=Math.max(r,100)),w.default.getPoint(t,r,n)}function xe(e,t,i,n){var r;return Object(l.default)(i)?(r=a.default.distance(t.origin,i))>e._maximumUndergroundPickDistance&&(r=ye(e)):r=ye(e),w.default.getPoint(t,r,n)}var Ae=new n.default;function Te(e,t){var i=t.endPosition,a=n.default.subtract(t.endPosition,t.startPosition,Ae),r=e._strafeEndMousePosition;n.default.add(r,a,r),t.endPosition=r,ot(e,t,e._strafeStartPosition),t.endPosition=i}var Ee=new w.default,Ce=new w.default,Se=new a.default,Me=new a.default,De=new a.default,Pe=new a.default,Ie=new y.default(a.default.UNIT_X,0),Le=new n.default,je=new n.default;function Re(e,t,i){if(a.default.equals(t,e._translateMousePosition)||(e._looking=!1),a.default.equals(t,e._strafeMousePosition)||(e._strafing=!1),e._looking)Wt(e,t,i);else if(e._strafing)Te(e,i);else{var r,o=e._scene.camera,s=e._cameraUnderground,u=n.default.clone(i.startPosition,Le),d=n.default.clone(i.endPosition,je),c=o.getPickRay(u,Ee),f=a.default.clone(a.default.ZERO,Pe),p=a.default.UNIT_X;if(o.position.z<e._minimumPickingTerrainHeight&&(r=ge(e,u,Se),Object(l.default)(r)&&(f.x=r.x)),s||f.x>o.position.z&&Object(l.default)(r)){var _=r;return s&&(_=xe(e,c,r,Se)),n.default.clone(t,e._strafeMousePosition),n.default.clone(t,e._strafeEndMousePosition),a.default.clone(_,e._strafeStartPosition),e._strafing=!0,void ot(e,i,e._strafeStartPosition)}var g=y.default.fromPointNormal(f,p,Ie);c=o.getPickRay(u,Ee);var v=h.default.rayPlane(c,g,Se),b=o.getPickRay(d,Ce),w=h.default.rayPlane(b,g,Me);if(!Object(l.default)(v)||!Object(l.default)(w))return e._looking=!0,Wt(e,t,i),void n.default.clone(t,e._translateMousePosition);var O=a.default.subtract(v,w,De),x=O.x;O.x=O.y,O.y=O.z,O.z=x;var A=a.default.magnitude(O);A>m.default.EPSILON6&&(a.default.normalize(O,O),o.move(O,A))}}var Ne=new n.default,Be=new w.default,Fe=new a.default,ke=new a.default,ze=new g.default,Ue=new g.default,Ve=new a.default,He=new y.default(a.default.UNIT_X,0),Ge=new a.default,Ye=new o.default,We=new g.default,qe=new b.default,Xe=new _.default,Ke=new a.default;function Je(e,t,i){if(Object(l.default)(i.angleAndHeight)&&(i=i.angleAndHeight),n.default.equals(t,e._tiltCenterMousePosition)||(e._tiltCVOffMap=!1,e._looking=!1),e._looking)Wt(e,t,i);else{var r=e._scene.camera;e._tiltCVOffMap||!e.onMap()||Math.abs(r.position.z)>e._minimumPickingTerrainHeight?(e._tiltCVOffMap=!0,function(e,t,i){var r=e._scene,o=r.camera,s=r.canvas,u=Ne;u.x=s.clientWidth/2,u.y=s.clientHeight/2;var d,f=o.getPickRay(u,Be),h=a.default.UNIT_X,p=f.origin,_=f.direction,v=a.default.dot(h,_);Math.abs(v)>m.default.EPSILON6&&(d=-a.default.dot(h,p)/v);if(!Object(l.default)(d)||d<=0)return e._looking=!0,Wt(e,t,i),void n.default.clone(t,e._tiltCenterMousePosition);var y=a.default.multiplyByScalar(_,d,Fe);a.default.add(p,y,y);var b=r.mapProjection,w=b.ellipsoid;a.default.fromElements(y.y,y.z,y.x,y);var O=b.unproject(y,Ye);w.cartographicToCartesian(O,y);var A=x.default.eastNorthUpToFixedFrame(y,w,ze),T=e._globe,E=e._ellipsoid;e._globe=void 0,e._ellipsoid=c.default.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var C=g.default.clone(o.transform,We);o._setTransform(A),pt(e,t,i,a.default.UNIT_Z),o._setTransform(C),e._globe=T,e._ellipsoid=E;var S=E.maximumRadius;e._rotateFactor=1/S,e._rotateRateRangeAdjustment=S}(e,t,i)):function(e,t,i){var r,o,s=e._scene,u=s.camera,d=e._cameraUnderground,f=a.default.UNIT_X;if(n.default.equals(t,e._tiltCenterMousePosition))r=a.default.clone(e._tiltCenter,Fe);else{if(u.position.z<e._minimumPickingTerrainHeight&&(r=ge(e,t,Fe)),!Object(l.default)(r)){var p,v=(o=u.getPickRay(t,Be)).origin,w=o.direction,O=a.default.dot(f,w);if(Math.abs(O)>m.default.EPSILON6&&(p=-a.default.dot(f,v)/O),!Object(l.default)(p)||p<=0)return e._looking=!0,Wt(e,t,i),void n.default.clone(t,e._tiltCenterMousePosition);r=a.default.multiplyByScalar(w,p,Fe),a.default.add(v,r,r)}d&&(Object(l.default)(o)||(o=u.getPickRay(t,Be)),Oe(e,o,r,r)),n.default.clone(t,e._tiltCenterMousePosition),a.default.clone(r,e._tiltCenter)}var A=s.canvas,T=Ne;T.x=A.clientWidth/2,T.y=e._tiltCenterMousePosition.y,o=u.getPickRay(T,Be);var E=a.default.clone(a.default.ZERO,Ve);E.x=r.x;var C=y.default.fromPointNormal(E,f,He),S=h.default.rayPlane(o,C,ke),M=u._projection,D=M.ellipsoid;a.default.fromElements(r.y,r.z,r.x,r);var P=M.unproject(r,Ye);D.cartographicToCartesian(P,r);var I,L=x.default.eastNorthUpToFixedFrame(r,D,ze);Object(l.default)(S)?(a.default.fromElements(S.y,S.z,S.x,S),P=M.unproject(S,Ye),D.cartographicToCartesian(P,S),I=x.default.eastNorthUpToFixedFrame(S,D,Ue)):I=L;var j=e._globe,R=e._ellipsoid;e._globe=void 0,e._ellipsoid=c.default.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var N=a.default.UNIT_Z,B=g.default.clone(u.transform,We);u._setTransform(L);var F=a.default.cross(a.default.UNIT_Z,a.default.normalize(u.position,Ge),Ge),k=a.default.dot(u.right,F);if(pt(e,t,i,N,!1,!0),u._setTransform(I),k<0){var z=i.startPosition.y-i.endPosition.y;(d&&z<0||!d&&z>0)&&(N=void 0);var U=u.constrainedAxis;u.constrainedAxis=void 0,pt(e,t,i,N,!0,!1),u.constrainedAxis=U}else pt(e,t,i,N,!0,!1);if(Object(l.default)(u.constrainedAxis)){var V=a.default.cross(u.direction,u.constrainedAxis,Ke);a.default.equalsEpsilon(V,a.default.ZERO,m.default.EPSILON6)||(a.default.dot(V,u.right)<0&&a.default.negate(V,V),a.default.cross(V,u.direction,u.up),a.default.cross(u.direction,u.up,u.right),a.default.normalize(u.up,u.up),a.default.normalize(u.right,u.right))}u._setTransform(B),e._globe=j,e._ellipsoid=R;var H=R.maximumRadius;e._rotateFactor=1/H,e._rotateRateRangeAdjustment=H;var G=a.default.clone(u.positionWC,Ge);e.enableCollisionDetection&&Kt(e);if(!a.default.equals(u.positionWC,G)){u._setTransform(I),u.worldToCameraCoordinatesPoint(G,G);var Y=a.default.magnitudeSquared(G);a.default.magnitudeSquared(u.position)>Y&&(a.default.normalize(u.position,u.position),a.default.multiplyByScalar(u.position,Math.sqrt(Y),u.position));var W=a.default.angleBetween(G,u.position),q=a.default.cross(G,u.position,G);a.default.normalize(q,q);var X=b.default.fromAxisAngle(q,W,qe),K=_.default.fromQuaternion(X,Xe);_.default.multiplyByVector(K,u.direction,u.direction),_.default.multiplyByVector(K,u.up,u.up),a.default.cross(u.direction,u.up,u.right),a.default.cross(u.right,u.direction,u.up),u._setTransform(B)}}(e,t,i)}}var Ze=new n.default,Qe=new w.default,$e=new a.default;function et(e,t,i){Object(l.default)(i.distance)&&(i=i.distance);var n,r=e._scene,o=r.camera,s=r.canvas,u=e._cameraUnderground;u?n=t:((n=Ze).x=s.clientWidth/2,n.y=s.clientHeight/2);var d,c,f=o.getPickRay(n,Qe),h=f.origin,p=f.direction,m=o.position.z;if(m<e._minimumPickingTerrainHeight&&(d=ge(e,n,$e)),Object(l.default)(d)&&(c=a.default.distance(h,d)),u){var _=we(e,f);c=Object(l.default)(c)?Math.min(c,_):_}if(!Object(l.default)(c)){var g=a.default.UNIT_X;c=-a.default.dot(g,h)/a.default.dot(g,p)}re(e,t,i,e._zoomFactor,c)}var tt=new w.default,it=new y.default(a.default.UNIT_X,0),nt=new a.default,at=new a.default,rt=new a.default;function ot(e,t,i){var n=e._scene,r=n.camera,o=r.getPickRay(t.endPosition,tt),s=a.default.clone(r.direction,at);n.mode===C.default.COLUMBUS_VIEW&&a.default.fromElements(s.z,s.x,s.y,s);var u=y.default.fromPointNormal(i,s,it),d=h.default.rayPlane(o,u,nt);Object(l.default)(d)&&(s=a.default.subtract(i,d,s),n.mode===C.default.COLUMBUS_VIEW&&a.default.fromElements(s.y,s.z,s.x,s),a.default.add(r.position,s,r.position))}var st=new a.default,lt=new o.default,ut=new a.default,dt=new c.default,ct=new a.default,ft=new a.default;function ht(e,t,i){var r=e._scene.camera,o=e._cameraUnderground,s=e._ellipsoid;if(g.default.equals(r.transform,g.default.IDENTITY)){var u,d,f=s.geodeticSurfaceNormal(r.position,ct);if(n.default.equals(t,e._rotateMousePosition))if(e._looking)Wt(e,t,i,f);else if(e._rotating)pt(e,t,i);else if(e._strafing)Te(e,i);else{if(a.default.magnitude(r.position)<a.default.magnitude(e._rotateStartPosition))return;u=a.default.magnitude(e._rotateStartPosition),(d=ut).x=d.y=d.z=u,xt(e,t,i,s=c.default.fromCartesian3(d,dt))}else{e._looking=!1,e._rotating=!1,e._strafing=!1;var h=s.cartesianToCartographic(r.positionWC,lt).height,p=e._globe;if(Object(l.default)(p)&&h<e._minimumPickingTerrainHeight){var m=ge(e,i.startPosition,rt);if(Object(l.default)(m)){var _=!1,v=r.getPickRay(i.startPosition,pe);if(o)_=!0,xe(e,v,m,m);else{var y=s.geodeticSurfaceNormal(m,ft);_=!!(Math.abs(a.default.dot(v.direction,y))<.05)||a.default.magnitude(r.position)<a.default.magnitude(m)}_?(n.default.clone(t,e._strafeEndMousePosition),a.default.clone(m,e._strafeStartPosition),e._strafing=!0,ot(e,i,e._strafeStartPosition)):(u=a.default.magnitude(m),(d=ut).x=d.y=d.z=u,xt(e,t,i,s=c.default.fromCartesian3(d,dt)),a.default.clone(m,e._rotateStartPosition))}else e._looking=!0,Wt(e,t,i,f)}else Object(l.default)(r.pickEllipsoid(i.startPosition,e._ellipsoid,st))?(xt(e,t,i,e._ellipsoid),a.default.clone(st,e._rotateStartPosition)):h>e._minimumTrackBallHeight?(e._rotating=!0,pt(e,t,i)):(e._looking=!0,Wt(e,t,i,f));n.default.clone(t,e._rotateMousePosition)}}else pt(e,t,i)}function pt(e,t,i,n,r,o){r=Object(s.default)(r,!1),o=Object(s.default)(o,!1);var u=e._scene,d=u.camera,c=u.canvas,f=d.constrainedAxis;Object(l.default)(n)&&(d.constrainedAxis=n);var h=a.default.magnitude(d.position),p=e._rotateFactor*(h-e._rotateRateRangeAdjustment);p>e._maximumRotateRate&&(p=e._maximumRotateRate),p<e._minimumRotateRate&&(p=e._minimumRotateRate);var m=(i.startPosition.x-i.endPosition.x)/c.clientWidth,_=(i.startPosition.y-i.endPosition.y)/c.clientHeight;m=Math.min(m,e.maximumMovementRatio),_=Math.min(_,e.maximumMovementRatio);var g=p*m*Math.PI*2,v=p*_*Math.PI;r||d.rotateRight(g),o||d.rotateUp(v),d.constrainedAxis=f}var mt=r.a.clone(r.a.UNIT_W),_t=r.a.clone(r.a.UNIT_W),gt=new a.default,vt=new a.default,yt=new a.default,bt=new a.default,wt=new n.default,Ot=new n.default;function xt(e,t,i,r){var o=e._scene.camera,s=n.default.clone(i.startPosition,wt),u=n.default.clone(i.endPosition,Ot),d=o.pickEllipsoid(s,r,mt),c=o.pickEllipsoid(u,r,_t);if(!Object(l.default)(d)||!Object(l.default)(c))return e._rotating=!0,void pt(e,0,i);if(d=o.worldToCameraCoordinates(d,d),c=o.worldToCameraCoordinates(c,c),Object(l.default)(o.constrainedAxis)){var f=o.constrainedAxis,h=a.default.mostOrthogonalAxis(f,gt);a.default.cross(h,f,h),a.default.normalize(h,h);var p=a.default.cross(f,h,vt),_=a.default.magnitude(d),g=a.default.dot(f,d),v=Math.acos(g/_),y=a.default.multiplyByScalar(f,g,yt);a.default.subtract(d,y,y),a.default.normalize(y,y);var b=a.default.magnitude(c),w=a.default.dot(f,c),O=Math.acos(w/b),x=a.default.multiplyByScalar(f,w,bt);a.default.subtract(c,x,x),a.default.normalize(x,x);var A=Math.acos(a.default.dot(y,h));a.default.dot(y,p)<0&&(A=m.default.TWO_PI-A);var T=Math.acos(a.default.dot(x,h));a.default.dot(x,p)<0&&(T=m.default.TWO_PI-T);var E,C=A-T;E=a.default.equalsEpsilon(f,o.position,m.default.EPSILON2)?o.right:a.default.cross(f,o.position,gt);var S,M=a.default.cross(f,E,gt),D=a.default.dot(M,a.default.subtract(d,f,vt)),P=a.default.dot(M,a.default.subtract(c,f,vt));S=D>0&&P>0?O-v:D>0&&P<=0?a.default.dot(o.position,f)>0?-v-O:v+O:v-O,o.rotateRight(C),o.rotateUp(S)}else{a.default.normalize(d,d),a.default.normalize(c,c);var I=a.default.dot(d,c),L=a.default.cross(d,c,gt);if(I<1&&!a.default.equalsEpsilon(L,a.default.ZERO,m.default.EPSILON14)){var j=Math.acos(I);o.rotate(L,j)}}}var At=new a.default,Tt=new o.default;function Et(e,t,i){Object(l.default)(i.distance)&&(i=i.distance);var n,r=e._ellipsoid,o=e._scene,s=o.camera,u=o.canvas,d=e._cameraUnderground;d?n=t:((n=Ze).x=u.clientWidth/2,n.y=u.clientHeight/2);var c,f,h=s.getPickRay(n,Qe),p=r.cartesianToCartographic(s.position,Tt).height;if(p<e._minimumPickingTerrainHeight&&(c=ge(e,n,$e)),Object(l.default)(c)&&(f=a.default.distance(h.origin,c)),d){var m=we(e,h);f=Object(l.default)(f)?Math.min(f,m):m}Object(l.default)(f)||(f=p);var _=a.default.normalize(s.position,At);re(e,t,i,e._zoomFactor,f,a.default.dot(_,s.direction))}var Ct=new n.default,St=new w.default,Mt=new a.default,Dt=new a.default,Pt=new g.default,It=new g.default,Lt=new g.default,jt=new b.default,Rt=new _.default,Nt=new o.default,Bt=new a.default;function Ft(e,t,i){var r=e._scene.camera;if(g.default.equals(r.transform,g.default.IDENTITY))if(Object(l.default)(i.angleAndHeight)&&(i=i.angleAndHeight),n.default.equals(t,e._tiltCenterMousePosition)||(e._tiltOnEllipsoid=!1,e._looking=!1),e._looking){var o=e._ellipsoid.geodeticSurfaceNormal(r.position,Bt);Wt(e,t,i,o)}else{var s=e._ellipsoid.cartesianToCartographic(r.position,Nt);e._tiltOnEllipsoid||s.height>e._minimumCollisionTerrainHeight?(e._tiltOnEllipsoid=!0,function(e,t,i){var r=e._ellipsoid,o=e._scene,s=o.camera,u=.25*e.minimumZoomDistance,d=r.cartesianToCartographic(s.positionWC,kt).height;if(d-u-1<m.default.EPSILON3&&i.endPosition.y-i.startPosition.y<0)return;var f=o.canvas,p=Ct;p.x=f.clientWidth/2,p.y=f.clientHeight/2;var _,v=s.getPickRay(p,St),y=h.default.rayEllipsoid(v,r);if(Object(l.default)(y))_=w.default.getPoint(v,y.start,Mt);else{if(!(d>e._minimumTrackBallHeight)){e._looking=!0;var b=e._ellipsoid.geodeticSurfaceNormal(s.position,Bt);return Wt(e,t,i,b),void n.default.clone(t,e._tiltCenterMousePosition)}var O=h.default.grazingAltitudeLocation(v,r);if(!Object(l.default)(O))return;var A=r.cartesianToCartographic(O,Nt);A.height=0,_=r.cartographicToCartesian(A,Mt)}var T=x.default.eastNorthUpToFixedFrame(_,r,Pt),E=e._globe,C=e._ellipsoid;e._globe=void 0,e._ellipsoid=c.default.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var S=g.default.clone(s.transform,Lt);s._setTransform(T),pt(e,0,i,a.default.UNIT_Z),s._setTransform(S),e._globe=E,e._ellipsoid=C;var M=C.maximumRadius;e._rotateFactor=1/M,e._rotateRateRangeAdjustment=M}(e,t,i)):function(e,t,i){var r,o,s,u=e._ellipsoid,d=e._scene,f=d.camera,p=e._cameraUnderground;if(n.default.equals(t,e._tiltCenterMousePosition))r=a.default.clone(e._tiltCenter,Mt);else{if(r=ge(e,t,Mt),!Object(l.default)(r)){if(o=f.getPickRay(t,St),s=h.default.rayEllipsoid(o,u),!Object(l.default)(s)){if(u.cartesianToCartographic(f.position,Nt).height<=e._minimumTrackBallHeight){e._looking=!0;var v=e._ellipsoid.geodeticSurfaceNormal(f.position,Bt);Wt(e,t,i,v),n.default.clone(t,e._tiltCenterMousePosition)}return}r=w.default.getPoint(o,s.start,Mt)}p&&(Object(l.default)(o)||(o=f.getPickRay(t,St)),Oe(e,o,r,r)),n.default.clone(t,e._tiltCenterMousePosition),a.default.clone(r,e._tiltCenter)}var y=d.canvas,O=Ct;O.x=y.clientWidth/2,O.y=e._tiltCenterMousePosition.y,o=f.getPickRay(O,St);var A=a.default.magnitude(r),T=a.default.fromElements(A,A,A,ut),E=c.default.fromCartesian3(T,dt);if(s=h.default.rayEllipsoid(o,E),!Object(l.default)(s))return;var C=a.default.magnitude(o.origin)>A?s.start:s.stop,S=w.default.getPoint(o,C,Dt),M=x.default.eastNorthUpToFixedFrame(r,u,Pt),D=x.default.eastNorthUpToFixedFrame(S,E,It),P=e._globe,I=e._ellipsoid;e._globe=void 0,e._ellipsoid=c.default.UNIT_SPHERE,e._rotateFactor=1,e._rotateRateRangeAdjustment=1;var L=a.default.UNIT_Z,j=g.default.clone(f.transform,Lt);f._setTransform(D);var R=a.default.cross(S,f.positionWC,Ke);if(a.default.dot(f.rightWC,R)<0){var N=i.startPosition.y-i.endPosition.y;(p&&N<0||!p&&N>0)&&(L=void 0);var B=f.constrainedAxis;f.constrainedAxis=void 0,pt(e,0,i,L,!0,!1),f.constrainedAxis=B}else pt(e,0,i,L,!0,!1);if(f._setTransform(M),pt(e,0,i,L,!1,!0),Object(l.default)(f.constrainedAxis)){var F=a.default.cross(f.direction,f.constrainedAxis,Ke);a.default.equalsEpsilon(F,a.default.ZERO,m.default.EPSILON6)||(a.default.dot(F,f.right)<0&&a.default.negate(F,F),a.default.cross(F,f.direction,f.up),a.default.cross(f.direction,f.up,f.right),a.default.normalize(f.up,f.up),a.default.normalize(f.right,f.right))}f._setTransform(j),e._globe=P,e._ellipsoid=I;var k=I.maximumRadius;e._rotateFactor=1/k,e._rotateRateRangeAdjustment=k;var z=a.default.clone(f.positionWC,Ke);e.enableCollisionDetection&&Kt(e);if(!a.default.equals(f.positionWC,z)){f._setTransform(D),f.worldToCameraCoordinatesPoint(z,z);var U=a.default.magnitudeSquared(z);a.default.magnitudeSquared(f.position)>U&&(a.default.normalize(f.position,f.position),a.default.multiplyByScalar(f.position,Math.sqrt(U),f.position));var V=a.default.angleBetween(z,f.position),H=a.default.cross(z,f.position,z);a.default.normalize(H,H);var G=b.default.fromAxisAngle(H,V,jt),Y=_.default.fromQuaternion(G,Rt);_.default.multiplyByVector(Y,f.direction,f.direction),_.default.multiplyByVector(Y,f.up,f.up),a.default.cross(f.direction,f.up,f.right),a.default.cross(f.right,f.direction,f.up),f._setTransform(j)}}(e,t,i)}}var kt=new o.default;var zt=new n.default,Ut=new n.default,Vt=new w.default,Ht=new w.default,Gt=new a.default,Yt=new a.default;function Wt(e,t,i,n){var r=e._scene.camera,o=zt;o.x=i.startPosition.x,o.y=0;var u=Ut;u.x=i.endPosition.x,u.y=0;var d,c,f=r.getPickRay(o,Vt),h=r.getPickRay(u,Ht),p=0;r.frustum instanceof v.a?(d=f.origin,c=h.origin,a.default.add(r.direction,d,d),a.default.add(r.direction,c,c),a.default.subtract(d,r.position,d),a.default.subtract(c,r.position,c),a.default.normalize(d,d),a.default.normalize(c,c)):(d=f.direction,c=h.direction);var _=a.default.dot(d,c);_<1&&(p=Math.acos(_)),p=i.startPosition.x>i.endPosition.x?-p:p;var g=e._horizontalRotationAxis;if(Object(l.default)(n)?r.look(n,-p):Object(l.default)(g)?r.look(g,-p):r.lookLeft(p),o.x=0,o.y=i.startPosition.y,u.x=0,u.y=i.endPosition.y,f=r.getPickRay(o,Vt),h=r.getPickRay(u,Ht),p=0,r.frustum instanceof v.a?(d=f.origin,c=h.origin,a.default.add(r.direction,d,d),a.default.add(r.direction,c,c),a.default.subtract(d,r.position,d),a.default.subtract(c,r.position,c),a.default.normalize(d,d),a.default.normalize(c,c)):(d=f.direction,c=h.direction),(_=a.default.dot(d,c))<1&&(p=Math.acos(_)),p=i.startPosition.y>i.endPosition.y?-p:p,n=Object(s.default)(n,g),Object(l.default)(n)){var y=r.direction,b=a.default.negate(n,Gt),w=a.default.equalsEpsilon(y,n,m.default.EPSILON2),O=a.default.equalsEpsilon(y,b,m.default.EPSILON2);if(w||O)(w&&p<0||O&&p>0)&&r.look(r.right,-p);else{_=a.default.dot(y,n);var x=m.default.acosClamped(_);p>0&&p>x&&(p=x-m.default.EPSILON4),_=a.default.dot(y,b),x=m.default.acosClamped(_),p<0&&-p>x&&(p=-x+m.default.EPSILON4);var A=a.default.cross(n,y,Yt);r.look(A,p)}}else r.lookUp(p)}var qt=new g.default,Xt=new o.default;function Kt(e){e._adjustedHeightForTerrain=!0;var t=e._scene,i=t.mode,n=t.globe;if(Object(l.default)(n)&&i!==C.default.SCENE2D&&i!==C.default.MORPHING){var r,o,s=t.camera,u=n.ellipsoid,d=t.mapProjection;g.default.equals(s.transform,g.default.IDENTITY)||(r=g.default.clone(s.transform,qt),o=a.default.magnitude(s.position),s._setTransform(g.default.IDENTITY));var c=Xt;i===C.default.SCENE3D?u.cartesianToCartographic(s.position,c):d.unproject(s.position,c);var f=!1;if(c.height<e._minimumCollisionTerrainHeight){var h=e._scene.globeHeight;if(Object(l.default)(h)){var p=h+e.minimumZoomDistance;c.height<p&&(c.height=p,i===C.default.SCENE3D?u.cartographicToCartesian(c,s.position):d.project(c,s.position),f=!0)}}Object(l.default)(r)&&(s._setTransform(r),f&&(a.default.normalize(s.position,s.position),a.default.negate(s.position,s.direction),a.default.multiplyByScalar(s.position,Math.max(o,e.minimumZoomDistance),s.position),a.default.normalize(s.direction,s.direction),a.default.cross(s.direction,s.up,s.right),a.default.cross(s.right,s.direction,s.up)))}}D.prototype.onMap=function(){var e=this._scene,t=e.mode,i=e.camera;return t!==C.default.COLUMBUS_VIEW||Math.abs(i.position.x)-this._maxCoord.x<0&&Math.abs(i.position.y)-this._maxCoord.y<0};var Jt=new a.default,Zt=new a.default;D.prototype.update=function(){var e=this._scene,t=e.camera,i=e.globe,n=e.mode;g.default.equals(t.transform,g.default.IDENTITY)?(this._globe=i,this._ellipsoid=Object(l.default)(this._globe)?this._globe.ellipsoid:e.mapProjection.ellipsoid):(this._globe=void 0,this._ellipsoid=c.default.UNIT_SPHERE);var r=Object(l.default)(this._globe)?this._globe.terrainExaggeration:1,o=Object(l.default)(this._globe)?this._globe.terrainExaggerationRelativeHeight:0;this._minimumCollisionTerrainHeight=O.a.getHeight(this.minimumCollisionTerrainHeight,r,o),this._minimumPickingTerrainHeight=O.a.getHeight(this.minimumPickingTerrainHeight,r,o),this._minimumTrackBallHeight=O.a.getHeight(this.minimumTrackBallHeight,r,o),this._cameraUnderground=e.cameraUnderground&&Object(l.default)(this._globe);var s=this._ellipsoid.maximumRadius;this._rotateFactor=1/s,this._rotateRateRangeAdjustment=s,this._adjustedHeightForTerrain=!1;var u,d,f=a.default.clone(t.positionWC,Jt),h=a.default.clone(t.directionWC,Zt);(n===C.default.SCENE2D?(d=(u=this)._scene.mapMode2D===E.default.ROTATE,g.default.equals(g.default.IDENTITY,u._scene.camera.transform)?(j(u,u.enableTranslate,u.translateEventTypes,ue,u.inertiaTranslate,"_lastInertiaTranslateMovement"),j(u,u.enableZoom,u.zoomEventTypes,de,u.inertiaZoom,"_lastInertiaZoomMovement"),d&&j(u,u.enableRotate,u.tiltEventTypes,he,u.inertiaSpin,"_lastInertiaTiltMovement")):(j(u,u.enableZoom,u.zoomEventTypes,de,u.inertiaZoom,"_lastInertiaZoomMovement"),d&&j(u,u.enableRotate,u.translateEventTypes,he,u.inertiaSpin,"_lastInertiaSpinMovement"))):n===C.default.COLUMBUS_VIEW?(this._horizontalRotationAxis=a.default.UNIT_Z,function(e){var t=e._scene.camera;if(g.default.equals(g.default.IDENTITY,t.transform)){var i=e._tweens;if(e._aggregator.anyButtonDown&&i.removeAll(),j(e,e.enableTilt,e.tiltEventTypes,Je,e.inertiaSpin,"_lastInertiaTiltMovement"),j(e,e.enableTranslate,e.translateEventTypes,Re,e.inertiaTranslate,"_lastInertiaTranslateMovement"),j(e,e.enableZoom,e.zoomEventTypes,et,e.inertiaZoom,"_lastInertiaZoomMovement"),j(e,e.enableLook,e.lookEventTypes,Wt),!e._aggregator.anyButtonDown&&!i.contains(e._tween)){var n=t.createCorrectPositionTween(e.bounceAnimationTime);Object(l.default)(n)&&(e._tween=i.add(n))}i.update()}else j(e,e.enableRotate,e.rotateEventTypes,pt,e.inertiaSpin,"_lastInertiaSpinMovement"),j(e,e.enableZoom,e.zoomEventTypes,Et,e.inertiaZoom,"_lastInertiaZoomMovement")}(this)):n===C.default.SCENE3D&&(this._horizontalRotationAxis=void 0,function(e){j(e,e.enableRotate,e.rotateEventTypes,ht,e.inertiaSpin,"_lastInertiaSpinMovement"),j(e,e.enableZoom,e.zoomEventTypes,Et,e.inertiaZoom,"_lastInertiaZoomMovement"),j(e,e.enableTilt,e.tiltEventTypes,Ft,e.inertiaSpin,"_lastInertiaTiltMovement"),j(e,e.enableLook,e.lookEventTypes,Wt)}(this)),this.enableCollisionDetection&&!this._adjustedHeightForTerrain)&&((!a.default.equals(f,t.positionWC)||!a.default.equals(h,t.directionWC))&&Kt(this));this._aggregator.reset()},D.prototype.isDestroyed=function(){return!1},D.prototype.destroy=function(){return this._tweens.removeAll(),this._aggregator=this._aggregator&&this._aggregator.destroy(),Object(u.default)(this)},t.a=D},function(e,t,i){"use strict";var n=i(8),a=i(0),r=i(19),o=i(3),s=i(199),l=i(5),u=i(222),d=i(84),c=i(133);function f(e,t){var i=e;return Object(a.default)(t)&&(i+="+"+t),i}function h(e,t,i){var r=f(c.a.PINCH,t),o=e._update,s=e._isDown,l=e._eventStartPosition,u=e._pressTime,h=e._releaseTime;o[r]=!0,s[r]=!1,l[r]=new n.default;var p=e._movement[r];Object(a.default)(p)||(p=e._movement[r]={}),p.distance={startPosition:new n.default,endPosition:new n.default},p.angleAndHeight={startPosition:new n.default,endPosition:new n.default},p.prevAngle=0,e._eventHandler.setInputAction((function(t){e._buttonsDown++,s[r]=!0,u[r]=new Date,n.default.lerp(t.position1,t.position2,.5,l[r])}),d.default.PINCH_START,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),s[r]=!1,h[r]=new Date}),d.default.PINCH_END,t),e._eventHandler.setInputAction((function(e){if(s[r]){o[r]?(u=e,d=p,n.default.clone(u.distance.startPosition,d.distance.startPosition),n.default.clone(u.distance.endPosition,d.distance.endPosition),n.default.clone(u.angleAndHeight.startPosition,d.angleAndHeight.startPosition),n.default.clone(u.angleAndHeight.endPosition,d.angleAndHeight.endPosition),o[r]=!1,p.prevAngle=p.angleAndHeight.startPosition.x):(n.default.clone(e.distance.endPosition,p.distance.endPosition),n.default.clone(e.angleAndHeight.endPosition,p.angleAndHeight.endPosition));for(var t=p.angleAndHeight.endPosition.x,a=p.prevAngle,l=2*Math.PI;t>=a+Math.PI;)t-=l;for(;t<a-Math.PI;)t+=l;p.angleAndHeight.endPosition.x=-t*i.clientWidth/12,p.angleAndHeight.startPosition.x=-a*i.clientWidth/12}var u,d}),d.default.PINCH_MOVE,t)}function p(e,t){var i=f(c.a.WHEEL,t),r=e._update;r[i]=!0;var o=e._movement[i];Object(a.default)(o)||(o=e._movement[i]={}),o.startPosition=new n.default,o.endPosition=new n.default,e._eventHandler.setInputAction((function(e){var t=15*l.default.toRadians(e);r[i]?(n.default.clone(n.default.ZERO,o.startPosition),o.endPosition.x=0,o.endPosition.y=t,r[i]=!1):o.endPosition.y=o.endPosition.y+t}),d.default.WHEEL,t)}function m(e,t,i){var r=f(i,t),o=e._isDown,s=e._eventStartPosition,l=e._pressTime,u=e._releaseTime;o[r]=!1,s[r]=new n.default;var h,p,m=e._lastMovement[r];Object(a.default)(m)||(m=e._lastMovement[r]={startPosition:new n.default,endPosition:new n.default,valid:!1}),i===c.a.LEFT_DRAG?(h=d.default.LEFT_DOWN,p=d.default.LEFT_UP):i===c.a.RIGHT_DRAG?(h=d.default.RIGHT_DOWN,p=d.default.RIGHT_UP):i===c.a.MIDDLE_DRAG&&(h=d.default.MIDDLE_DOWN,p=d.default.MIDDLE_UP),e._eventHandler.setInputAction((function(t){e._buttonsDown++,m.valid=!1,o[r]=!0,l[r]=new Date,n.default.clone(t.position,s[r])}),h,t),e._eventHandler.setInputAction((function(){e._buttonsDown=Math.max(e._buttonsDown-1,0),o[r]=!1,u[r]=new Date}),p,t)}function _(e,t){n.default.clone(e.startPosition,t.startPosition),n.default.clone(e.endPosition,t.endPosition)}function g(e,t){var i=e._update,r=e._movement,o=e._lastMovement,s=e._isDown;for(var l in c.a)if(c.a.hasOwnProperty(l)){var u=c.a[l];if(Object(a.default)(u)){var h=f(u,t);i[h]=!0,Object(a.default)(e._lastMovement[h])||(e._lastMovement[h]={startPosition:new n.default,endPosition:new n.default,valid:!1}),Object(a.default)(e._movement[h])||(e._movement[h]={startPosition:new n.default,endPosition:new n.default})}}e._eventHandler.setInputAction((function(l){for(var u in c.a)if(c.a.hasOwnProperty(u)){var d=c.a[u];if(Object(a.default)(d)){var h=f(d,t);s[h]&&(i[h]?(_(r[h],o[h]),o[h].valid=!0,_(l,r[h]),i[h]=!1):n.default.clone(l.endPosition,r[h].endPosition))}}n.default.clone(l.endPosition,e._currentMousePosition)}),d.default.MOUSE_MOVE,t)}function v(e){if(!Object(a.default)(e))throw new o.default("canvas is required.");for(var t in this._eventHandler=new u.default(e),this._update={},this._movement={},this._lastMovement={},this._isDown={},this._eventStartPosition={},this._pressTime={},this._releaseTime={},this._buttonsDown=0,this._currentMousePosition=new n.default,p(this,void 0),h(this,void 0,e),m(this,void 0,c.a.LEFT_DRAG),m(this,void 0,c.a.RIGHT_DRAG),m(this,void 0,c.a.MIDDLE_DRAG),g(this,void 0),s.default)if(s.default.hasOwnProperty(t)){var i=s.default[t];Object(a.default)(i)&&(p(this,i),h(this,i,e),m(this,i,c.a.LEFT_DRAG),m(this,i,c.a.RIGHT_DRAG),m(this,i,c.a.MIDDLE_DRAG),g(this,i))}}Object.defineProperties(v.prototype,{currentMousePosition:{get:function(){return this._currentMousePosition}},anyButtonDown:{get:function(){var e=!(this._update[f(c.a.WHEEL)]&&this._update[f(c.a.WHEEL,s.default.SHIFT)]&&this._update[f(c.a.WHEEL,s.default.CTRL)]&&this._update[f(c.a.WHEEL,s.default.ALT)]);return this._buttonsDown>0||e}}}),v.prototype.isMoving=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t);return!this._update[i]},v.prototype.getMovement=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t);return this._movement[i]},v.prototype.getLastMovement=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t),n=this._lastMovement[i];if(n.valid)return n},v.prototype.isButtonDown=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t);return this._isDown[i]},v.prototype.getStartMousePosition=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");if(e===c.a.WHEEL)return this._currentMousePosition;var i=f(e,t);return this._eventStartPosition[i]},v.prototype.getButtonPressTime=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t);return this._pressTime[i]},v.prototype.getButtonReleaseTime=function(e,t){if(!Object(a.default)(e))throw new o.default("type is required.");var i=f(e,t);return this._releaseTime[i]},v.prototype.reset=function(){for(var e in this._update)this._update.hasOwnProperty(e)&&(this._update[e]=!0)},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._eventHandler=this._eventHandler&&this._eventHandler.destroy(),Object(r.default)(this)},t.a=v},function(e,t,i){"use strict";var n=i(41),a=i(8),r=i(16),o=i(0),s=i(19),l=i(5),u=i(6),d=i(52),c=i(819),f=i(820),h=i(406),p=i(244),m=i(148),_=i(247),g=i(274),v=i(450),y=i(449);function b(){this._sceneFramebuffer=new y.a;var e=new Array(6);e[0]=new m.a({fragmentShader:p.a,textureScale:.125,forcePowerOfTwo:!0,sampleMode:g.a.LINEAR});var t=e[1]=new m.a({fragmentShader:f.a,uniforms:{avgLuminance:.5,threshold:.25,offset:.1},textureScale:.125,forcePowerOfTwo:!0}),i=this;this._delta=1,this._sigma=2,this._blurStep=new a.default,e[2]=new m.a({fragmentShader:h.a,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:0},textureScale:.125,forcePowerOfTwo:!0}),e[3]=new m.a({fragmentShader:h.a,uniforms:{step:function(){return i._blurStep.x=i._blurStep.y=1/t.outputTexture.width,i._blurStep},delta:function(){return i._delta},sigma:function(){return i._sigma},direction:1},textureScale:.125,forcePowerOfTwo:!0}),e[4]=new m.a({fragmentShader:p.a,sampleMode:g.a.LINEAR}),this._uCenter=new a.default,this._uRadius=void 0,e[5]=new m.a({fragmentShader:c.a,uniforms:{center:function(){return i._uCenter},radius:function(){return i._uRadius},colorTexture2:function(){return i._sceneFramebuffer.getFramebuffer().getColorTexture(0)}}}),this._stages=new _.a({stages:e});for(var n=new v.a(this),r=e.length,o=0;o<r;++o)e[o]._textureCache=n;this._textureCache=n,this.length=e.length}b.prototype.get=function(e){return this._stages.get(e)},b.prototype.getStageByName=function(e){for(var t=this._stages.length,i=0;i<t;++i){var n=this._stages.get(i);if(n.name===e)return n}};var w=new r.a,O=new a.default,x=new a.default,A=new u.default;b.prototype.clear=function(e,t,i){this._sceneFramebuffer.clear(e,t,i),this._textureCache.clear(e)},b.prototype.update=function(e){var t=e.context,i=e.viewport,r=this._sceneFramebuffer;r.update(t,i);var o=r.getFramebuffer();return this._textureCache.update(t),this._stages.update(t,!1),function(e,t,i){var r=t.uniformState,o=r.sunPositionWC,s=r.view,c=r.viewProjection,f=r.projection,h=u.default.computeViewportTransformation(i,0,1,A),p=u.default.multiplyByPoint(s,o,w),m=d.default.pointToGLWindowCoordinates(c,h,o,O);p.x+=l.default.SOLAR_RADIUS;var _=d.default.pointToGLWindowCoordinates(f,h,p,p),g=30*a.default.magnitude(a.default.subtract(_,m,_))*2,v=x;v.x=g,v.y=g,e._uCenter=a.default.clone(m,e._uCenter),e._uRadius=.15*Math.max(v.x,v.y);var y=t.drawingBufferWidth,b=t.drawingBufferHeight,T=e._stages,E=T.get(0),C=E.outputTexture.width,S=E.outputTexture.height,M=new n.a;M.width=C,M.height=S,h=u.default.computeViewportTransformation(M,0,1,A),m=d.default.pointToGLWindowCoordinates(c,h,o,O),v.x*=C/y,v.y*=S/b;var D=E.scissorRectangle;D.x=Math.max(m.x-.5*v.x,0),D.y=Math.max(m.y-.5*v.y,0),D.width=Math.min(v.x,y),D.height=Math.min(v.y,b);for(var P=1;P<4;++P)n.a.clone(D,T.get(P).scissorRectangle)}(this,t,i),o},b.prototype.execute=function(e){var t=this._sceneFramebuffer.getFramebuffer().getColorTexture(0),i=this._stages,n=i.length;i.get(0).execute(e,t);for(var a=1;a<n;++a)i.get(a).execute(e,i.get(a-1).outputTexture)},b.prototype.copy=function(e,t){if(!Object(o.default)(this._copyColorCommand)){var i=this;this._copyColorCommand=e.createViewportQuadCommand(p.a,{uniformMap:{colorTexture:function(){return i._stages.get(i._stages.length-1).outputTexture}},owner:this})}this._copyColorCommand.framebuffer=t,this._copyColorCommand.execute(e)},b.prototype.isDestroyed=function(){return!1},b.prototype.destroy=function(){return this._textureCache.destroy(),this._stages.destroy(),Object(s.default)(this)},t.a=b},function(e,t,i){"use strict";t.a="uniform sampler2D colorTexture;\nuniform sampler2D colorTexture2;\n\nuniform vec2 center;\nuniform float radius;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color0 = texture2D(colorTexture, v_textureCoordinates);\n vec4 color1 = texture2D(colorTexture2, v_textureCoordinates);\n\n float x = length(gl_FragCoord.xy - center) / radius;\n float t = smoothstep(0.5, 0.8, x);\n gl_FragColor = mix(color0 + color1, color1, t);\n}\n"},function(e,t,i){"use strict";t.a='uniform sampler2D colorTexture;\n\nuniform float avgLuminance;\nuniform float threshold;\nuniform float offset;\n\nvarying vec2 v_textureCoordinates;\n\nfloat key(float avg)\n{\n float guess = 1.5 - (1.5 / (avg * 0.1 + 1.0));\n return max(0.0, guess) + 0.1;\n}\n\n// See section 9. "The bright-pass filter" of Realtime HDR Rendering\n// http://www.cg.tuwien.ac.at/research/publications/2007/Luksch_2007_RHR/Luksch_2007_RHR-RealtimeHDR%20.pdf\n\nvoid main()\n{\n vec4 color = texture2D(colorTexture, v_textureCoordinates);\n vec3 xyz = czm_RGBToXYZ(color.rgb);\n float luminance = xyz.r;\n\n float scaledLum = key(avgLuminance) * luminance / avgLuminance;\n float brightLum = max(scaledLum - threshold, 0.0);\n float brightness = brightLum / (offset + brightLum);\n\n xyz.r = brightness;\n gl_FragColor = vec4(czm_XYZToRGB(xyz), 1.0);\n}\n'},function(e,t,i){"use strict";var n=i(7),a=i(44),r=i(34),o=i(67),s=i(0);function l(){this._cachedShowFrustumsShaders={}}var u=new n.default;var d=new a.default;l.prototype.executeDebugShowFrustumsCommand=function(e,t,i){var l=t.shaderProgram.id,c=this._cachedShowFrustumsShaders[l];Object(s.default)(c)||(c=function(e,t){var i=e.context,n=t,a=n.fragmentShaderSource.clone(),s=[];a.sources=a.sources.map((function(e){e=r.default.replaceMain(e,"czm_Debug_main");for(var t,i=/gl_FragData\[(\d+)\]/g;null!==(t=i.exec(e));)-1===s.indexOf(t[1])&&s.push(t[1]);return e}));var l,u=s.length,d="";if(d+="uniform vec3 debugShowCommandsColor;\n",d+="uniform vec3 debugShowFrustumsColor;\n",d+="void main() \n{ \n czm_Debug_main(); \n",u>0)for(l=0;l<u;++l)d+=" gl_FragData["+s[l]+"].rgb *= debugShowCommandsColor;\n",d+=" gl_FragData["+s[l]+"].rgb *= debugShowFrustumsColor;\n";else d+=" gl_FragColor.rgb *= debugShowCommandsColor;\n",d+=" gl_FragColor.rgb *= debugShowFrustumsColor;\n";d+="}",a.sources.push(d);var c=function(e){var t={},i=e.vertexAttributes;for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n].index);return t}(n);return o.default.fromCache({context:i,vertexShaderSource:n.vertexShaderSource,fragmentShaderSource:a,attributeLocations:c})}(e,t.shaderProgram),this._cachedShowFrustumsShaders[l]=c);var f=a.default.shallowClone(t,d);f.shaderProgram=c,f.uniformMap=function(e,t){var i;return i=Object(s.default)(t.uniformMap)?t.uniformMap:{},Object(s.default)(i.debugShowCommandsColor)||Object(s.default)(i.debugShowFrustumsColor)||(i.debugShowCommandsColor=function(){return e.debugShowCommands?(Object(s.default)(t._debugColor)||(t._debugColor=n.default.fromRandom()),t._debugColor):n.default.WHITE},i.debugShowFrustumsColor=function(){return e.debugShowFrustums?(u.red=1&t.debugOverlappingFrustums?1:0,u.green=2&t.debugOverlappingFrustums?1:0,u.blue=4&t.debugOverlappingFrustums?1:0,u.alpha=1,u):n.default.WHITE}),i}(e,t),f.execute(e.context,i)},t.a=l},function(e,t,i){"use strict";var n=i(1),a=i(2),r=i(0),o=i(19),s=i(15),l=i(196),u=i(95),d=i(5),c=i(6),f=i(29),h=i(36),p=i(44),m=i(39),_=i(67),g=i(34),v=i(104),y=i(414),b=i(516),w=i(517),O=i(90),x=i(74),A=i(140),T=i(13);function E(e){e=Object(a.default)(e,s.default.WGS84),this.show=!0,this.perFragmentAtmosphere=!1,this._ellipsoid=e;var t=n.default.multiplyByScalar(e.radii,1.025,new n.default);this._scaleMatrix=c.default.fromScale(t),this._modelMatrix=new c.default,this._command=new p.default({owner:this,modelMatrix:this._modelMatrix}),this._spSkyFromSpace=void 0,this._spSkyFromAtmosphere=void 0,this._flags=void 0,this.hueShift=0,this.saturationShift=0,this.brightnessShift=0,this._hueSaturationBrightness=new n.default;var i=new n.default;i.x=1.025*e.maximumRadius,i.y=e.maximumRadius,i.z=0,this._radiiAndDynamicAtmosphereColor=i;var r=this;this._command.uniformMap={u_radiiAndDynamicAtmosphereColor:function(){return r._radiiAndDynamicAtmosphereColor},u_hsbShift:function(){return r._hueSaturationBrightness.x=r.hueShift,r._hueSaturationBrightness.y=r.saturationShift,r._hueSaturationBrightness.z=r.brightnessShift,r._hueSaturationBrightness}}}Object.defineProperties(E.prototype,{ellipsoid:{get:function(){return this._ellipsoid}}}),E.prototype.setDynamicAtmosphereColor=function(e,t){var i=e?t?2:1:0;this._radiiAndDynamicAtmosphereColor.z=i};var C=new c.default;E.prototype.update=function(e,t){if(this.show){var i=e.mode;if((i===T.default.SCENE3D||i===T.default.MORPHING)&&e.passes.render){var a=c.default.fromRotationTranslation(e.context.uniformState.inverseViewRotation,n.default.ZERO,C),o=c.default.multiplyTransformation(a,O.a.Y_UP_TO_Z_UP,C),s=c.default.multiply(this._scaleMatrix,o,C);c.default.clone(s,this._modelMatrix);var p,E=e.context,S=(p=this,!(d.default.equalsEpsilon(p.hueShift,0,d.default.EPSILON7)&&d.default.equalsEpsilon(p.saturationShift,0,d.default.EPSILON7)&&d.default.equalsEpsilon(p.brightnessShift,0,d.default.EPSILON7))),M=e.globeTranslucencyState.translucent,D=this.perFragmentAtmosphere||M||!Object(r.default)(t)||!t.show,P=this._command;if(!Object(r.default)(P.vertexArray)){var I=l.default.createGeometry(new l.default({radii:new n.default(1,1,1),slicePartitions:256,stackPartitions:256,vertexFormat:f.a.POSITION_ONLY}));P.vertexArray=v.default.fromGeometry({context:E,geometry:I,attributeLocations:u.a.createAttributeLocations(I),bufferUsage:h.default.STATIC_DRAW}),P.renderState=m.default.fromCache({cull:{enabled:!0,face:A.default.FRONT},blending:x.default.ALPHA_BLEND,depthMask:!1})}var L=S|D<<2|M<<3;if(L!==this._flags){this._flags=L;var j=[];S&&j.push("COLOR_CORRECT"),D&&j.push("PER_FRAGMENT_ATMOSPHERE"),M&&j.push("GLOBE_TRANSLUCENT");var R=new g.default({defines:j.concat("SKY_FROM_SPACE"),sources:[y.a,w.a]}),N=new g.default({defines:j.concat("SKY_FROM_SPACE"),sources:[y.a,b.a]});this._spSkyFromSpace=_.default.fromCache({context:E,vertexShaderSource:R,fragmentShaderSource:N}),R=new g.default({defines:j.concat("SKY_FROM_ATMOSPHERE"),sources:[y.a,w.a]}),N=new g.default({defines:j.concat("SKY_FROM_ATMOSPHERE"),sources:[y.a,b.a]}),this._spSkyFromAtmosphere=_.default.fromCache({context:E,vertexShaderSource:R,fragmentShaderSource:N})}var B=e.camera.positionWC;return n.default.magnitude(B)>this._radiiAndDynamicAtmosphereColor.x?P.shaderProgram=this._spSkyFromSpace:P.shaderProgram=this._spSkyFromAtmosphere,P}}},E.prototype.isDestroyed=function(){return!1},E.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),this._spSkyFromSpace=this._spSkyFromSpace&&this._spSkyFromSpace.destroy(),this._spSkyFromAtmosphere=this._spSkyFromAtmosphere&&this._spSkyFromAtmosphere.destroy(),Object(o.default)(this)},t.a=E},function(e,t,i){"use strict";var n=i(240),a=i(1),r=i(2),o=i(0),s=i(19),l=i(3),u=i(95),d=i(6),c=i(29),f=i(36),h=i(224),p=i(44),m=i(824),_=i(39),g=i(67),v=i(34),y=i(104),b=i(825),w=i(826),O=i(74),x=i(13);function A(e){this.sources=e.sources,this._sources=void 0,this.show=Object(r.default)(e.show,!0),this._command=new p.default({modelMatrix:d.default.clone(d.default.IDENTITY),owner:this}),this._cubeMap=void 0,this._attributeLocations=void 0,this._useHdr=void 0}A.prototype.update=function(e,t){var i=this;if(this.show&&(e.mode===x.default.SCENE3D||e.mode===x.default.MORPHING)&&e.passes.render){var r=e.context;if(this._sources!==this.sources){this._sources=this.sources;var s=this.sources;if(!(Object(o.default)(s.positiveX)&&Object(o.default)(s.negativeX)&&Object(o.default)(s.positiveY)&&Object(o.default)(s.negativeY)&&Object(o.default)(s.positiveZ)&&Object(o.default)(s.negativeZ)))throw new l.default("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof s.positiveX!=typeof s.negativeX||typeof s.positiveX!=typeof s.positiveY||typeof s.positiveX!=typeof s.negativeY||typeof s.positiveX!=typeof s.positiveZ||typeof s.positiveX!=typeof s.negativeZ)throw new l.default("this.sources properties must all be the same type.");"string"==typeof s.positiveX?Object(m.a)(r,this._sources).then((function(e){i._cubeMap=i._cubeMap&&i._cubeMap.destroy(),i._cubeMap=e})):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new h.a({context:r,source:s}))}var d=this._command;if(!Object(o.default)(d.vertexArray)){d.uniformMap={u_cubeMap:function(){return i._cubeMap}};var p=n.default.createGeometry(n.default.fromDimensions({dimensions:new a.default(2,2,2),vertexFormat:c.a.POSITION_ONLY})),A=this._attributeLocations=u.a.createAttributeLocations(p);d.vertexArray=y.default.fromGeometry({context:r,geometry:p,attributeLocations:A,bufferUsage:f.default.STATIC_DRAW}),d.renderState=_.default.fromCache({blending:O.default.ALPHA_BLEND})}if(!Object(o.default)(d.shaderProgram)||this._useHdr!==t){var T=new v.default({defines:[t?"HDR":""],sources:[b.a]});d.shaderProgram=g.default.fromCache({context:r,vertexShaderSource:w.a,fragmentShaderSource:T,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Object(o.default)(this._cubeMap))return d}},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){var e=this._command;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),Object(s.default)(this)},t.a=A},function(e,t,i){"use strict";var n=i(4),a=i(0),r=i(3),o=i(30),s=i(18),l=i(224);t.a=function(e,t,i){if(n.a.defined("context",e),!(Object(a.default)(t)&&Object(a.default)(t.positiveX)&&Object(a.default)(t.negativeX)&&Object(a.default)(t.positiveY)&&Object(a.default)(t.negativeY)&&Object(a.default)(t.positiveZ)&&Object(a.default)(t.negativeZ)))throw new r.default("urls is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");var u={flipY:!0,skipColorSpaceConversion:i,preferImageBitmap:!0},d=[o.default.createIfNeeded(t.positiveX).fetchImage(u),o.default.createIfNeeded(t.negativeX).fetchImage(u),o.default.createIfNeeded(t.positiveY).fetchImage(u),o.default.createIfNeeded(t.negativeY).fetchImage(u),o.default.createIfNeeded(t.positiveZ).fetchImage(u),o.default.createIfNeeded(t.negativeZ).fetchImage(u)];return s.a.all(d,(function(t){return new l.a({context:e,source:{positiveX:t[0],negativeX:t[1],positiveY:t[2],negativeY:t[3],positiveZ:t[4],negativeZ:t[5]}})}))}},function(e,t,i){"use strict";t.a="uniform samplerCube u_cubeMap;\n\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec4 color = textureCube(u_cubeMap, normalize(v_texCoord));\n gl_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);\n}\n"},function(e,t,i){"use strict";t.a="attribute vec3 position;\n\nvarying vec3 v_texCoord;\n\nvoid main()\n{\n vec3 p = czm_viewRotation * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));\n gl_Position = czm_projection * vec4(p, 1.0);\n v_texCoord = position.xyz;\n}\n"},function(e,t,i){"use strict";var n=i(17),a=i(8),r=i(1),o=i(16),s=i(11),l=i(0),u=i(19),d=i(38),c=i(5),f=i(6),h=i(33),p=i(35),m=i(57),_=i(36),g=i(284),v=i(44),y=i(32),b=i(39),w=i(67),O=i(45),x=i(104),A=i(828),T=i(829),E=i(830),C=i(74),S=i(13),M=i(177);function D(){this.show=!0,this._drawCommand=new v.default({primitiveType:p.default.TRIANGLES,boundingVolume:new n.default,owner:this}),this._commands={drawCommand:this._drawCommand,computeCommand:void 0},this._boundingVolume=new n.default,this._boundingVolume2D=new n.default,this._texture=void 0,this._drawingBufferWidth=void 0,this._drawingBufferHeight=void 0,this._radiusTS=void 0,this._size=void 0,this.glowFactor=1,this._glowFactorDirty=!1,this._useHdr=void 0;var e=this;this._uniformMap={u_texture:function(){return e._texture},u_size:function(){return e._size}}}Object.defineProperties(D.prototype,{glowFactor:{get:function(){return this._glowFactor},set:function(e){e=Math.max(e,0),this._glowFactor=e,this._glowFactorDirty=!0}}});var P=new a.default,I=new a.default,L=new o.a,j=new o.a;D.prototype.update=function(e,t,i){if(this.show){var o=e.mode;if(o!==S.default.SCENE2D&&o!==S.default.MORPHING&&e.passes.render){var u=e.context,p=t.viewport.width,v=t.viewport.height;if(!Object(l.default)(this._texture)||p!==this._drawingBufferWidth||v!==this._drawingBufferHeight||this._glowFactorDirty||i!==this._useHdr){this._texture=this._texture&&this._texture.destroy(),this._drawingBufferWidth=p,this._drawingBufferHeight=v,this._glowFactorDirty=!1,this._useHdr=i;var D=Math.max(p,v);D=Math.pow(2,Math.ceil(Math.log(D)/Math.log(2))-2),D=Math.max(1,D);var R=i?u.halfFloatingPointTexture?y.default.HALF_FLOAT:y.default.FLOAT:y.default.UNSIGNED_BYTE;this._texture=new O.default({context:u,width:D,height:D,pixelFormat:h.default.RGBA,pixelDatatype:R}),this._glowLengthTS=5*this._glowFactor,this._radiusTS=1/(1+2*this._glowLengthTS)*.5;var N=this,B={u_radiusTS:function(){return N._radiusTS}};this._commands.computeCommand=new g.a({fragmentShaderSource:T.a,outputTexture:this._texture,uniformMap:B,persists:!1,owner:this,postExecute:function(){N._commands.computeCommand=void 0}})}var F=this._drawCommand;if(!Object(l.default)(F.vertexArray)){var k={direction:0},z=new Uint8Array(8);z[0]=0,z[1]=0,z[2]=255,z[3]=0,z[4]=255,z[5]=255,z[6]=0,z[7]=255;var U=m.default.createVertexBuffer({context:u,typedArray:z,usage:_.default.STATIC_DRAW}),V=[{index:k.direction,vertexBuffer:U,componentsPerAttribute:2,normalize:!0,componentDatatype:s.default.UNSIGNED_BYTE}],H=m.default.createIndexBuffer({context:u,typedArray:new Uint16Array([0,1,2,0,2,3]),usage:_.default.STATIC_DRAW,indexDatatype:d.a.UNSIGNED_SHORT});F.vertexArray=new x.default({context:u,attributes:V,indexBuffer:H}),F.shaderProgram=w.default.fromCache({context:u,vertexShaderSource:E.a,fragmentShaderSource:A.a,attributeLocations:k}),F.renderState=b.default.fromCache({blending:C.default.ALPHA_BLEND}),F.uniformMap=this._uniformMap}var G=u.uniformState.sunPositionWC,Y=u.uniformState.sunPositionColumbusView,W=this._boundingVolume,q=this._boundingVolume2D;r.default.clone(G,W.center),q.center.x=Y.z,q.center.y=Y.x,q.center.z=Y.y,W.radius=c.default.SOLAR_RADIUS+c.default.SOLAR_RADIUS*this._glowLengthTS,q.radius=W.radius,o===S.default.SCENE3D?n.default.clone(W,F.boundingVolume):o===S.default.COLUMBUS_VIEW&&n.default.clone(q,F.boundingVolume);var X=M.default.computeActualWgs84Position(e,G,j),K=r.default.magnitude(r.default.subtract(X,e.camera.position,j)),J=u.uniformState.projection,Z=L;Z.x=0,Z.y=0,Z.z=-K,Z.w=1;var Q=f.default.multiplyByVector(J,Z,j),$=M.default.clipToGLWindowCoordinates(t.viewport,Q,P);Z.x=c.default.SOLAR_RADIUS;var ee=f.default.multiplyByVector(J,Z,j),te=M.default.clipToGLWindowCoordinates(t.viewport,ee,I);return this._size=a.default.magnitude(a.default.subtract(te,$,j)),this._size=2*this._size*(1+2*this._glowLengthTS),this._size=Math.ceil(this._size),this._commands}}},D.prototype.isDestroyed=function(){return!1},D.prototype.destroy=function(){var e=this._drawCommand;return e.vertexArray=e.vertexArray&&e.vertexArray.destroy(),e.shaderProgram=e.shaderProgram&&e.shaderProgram.destroy(),this._texture=this._texture&&this._texture.destroy(),Object(u.default)(this)},t.a=D},function(e,t,i){"use strict";t.a="uniform sampler2D u_texture;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main()\n{\n vec4 color = texture2D(u_texture, v_textureCoordinates);\n gl_FragColor = czm_gammaCorrect(color);\n}\n"},function(e,t,i){"use strict";t.a="uniform float u_radiusTS;\n\nvarying vec2 v_textureCoordinates;\n\nvec2 rotate(vec2 p, vec2 direction)\n{\n return vec2(p.x * direction.x - p.y * direction.y, p.x * direction.y + p.y * direction.x);\n}\n\nvec4 addBurst(vec2 position, vec2 direction, float lengthScalar)\n{\n vec2 rotatedPosition = rotate(position, direction) * vec2(25.0, 0.75);\n float radius = length(rotatedPosition) * lengthScalar;\n float burst = 1.0 - smoothstep(0.0, 0.55, radius);\n return vec4(burst);\n}\n\nvoid main()\n{\n float lengthScalar = 2.0 / sqrt(2.0);\n vec2 position = v_textureCoordinates - vec2(0.5);\n float radius = length(position) * lengthScalar;\n float surface = step(radius, u_radiusTS);\n vec4 color = vec4(vec2(1.0), surface + 0.2, surface);\n\n float glow = 1.0 - smoothstep(0.0, 0.55, radius);\n color.ba += mix(vec2(0.0), vec2(1.0), glow) * 0.75;\n\n vec4 burst = vec4(0.0);\n\n // The following loop has been manually unrolled for speed, to\n // avoid sin() and cos().\n //\n //for (float i = 0.4; i < 3.2; i += 1.047) {\n // vec2 direction = vec2(sin(i), cos(i));\n // burst += 0.4 * addBurst(position, direction, lengthScalar);\n //\n // direction = vec2(sin(i - 0.08), cos(i - 0.08));\n // burst += 0.3 * addBurst(position, direction, lengthScalar);\n //}\n\n burst += 0.4 * addBurst(position, vec2(0.38942, 0.92106), lengthScalar); // angle == 0.4\n burst += 0.4 * addBurst(position, vec2(0.99235, 0.12348), lengthScalar); // angle == 0.4 + 1.047\n burst += 0.4 * addBurst(position, vec2(0.60327, -0.79754), lengthScalar); // angle == 0.4 + 1.047 * 2.0\n\n burst += 0.3 * addBurst(position, vec2(0.31457, 0.94924), lengthScalar); // angle == 0.4 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.97931, 0.20239), lengthScalar); // angle == 0.4 + 1.047 - 0.08\n burst += 0.3 * addBurst(position, vec2(0.66507, -0.74678), lengthScalar); // angle == 0.4 + 1.047 * 2.0 - 0.08\n\n // End of manual loop unrolling.\n\n color += clamp(burst, vec4(0.0), vec4(1.0)) * 0.15;\n\n gl_FragColor = clamp(color, vec4(0.0), vec4(1.0));\n}\n"},function(e,t,i){"use strict";t.a="attribute vec2 direction;\n\nuniform float u_size;\n\nvarying vec2 v_textureCoordinates;\n\nvoid main() \n{\n vec4 position;\n if (czm_morphTime == 1.0)\n {\n position = vec4(czm_sunPositionWC, 1.0);\n }\n else\n {\n position = vec4(czm_sunPositionColumbusView.zxy, 1.0);\n }\n \n vec4 positionEC = czm_view * position;\n vec4 positionWC = czm_eyeToWindowCoordinates(positionEC);\n \n vec2 halfSize = vec2(u_size * 0.5);\n halfSize *= ((direction * 2.0) - 1.0);\n \n gl_Position = czm_viewportOrthographic * vec4(positionWC.xy + halfSize, -positionWC.z, 1.0);\n \n v_textureCoordinates = direction;\n}\n"},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(19),s=i(190);function l(){this._length=0,this._collections={},this._collectionsArray=[],this.show=!0}Object.defineProperties(l.prototype,{length:{get:function(){return this._length}}}),l.prototype.add=function(e,t){n.a.defined("primitive",e),Object(r.default)(t)&&n.a.typeOf.number("zIndex",t),t=Object(a.default)(t,0);var i=this._collections[t];if(!Object(r.default)(i)){(i=new s.default({destroyPrimitives:!1}))._zIndex=t,this._collections[t]=i;for(var o=this._collectionsArray,l=0;l<o.length&&o[l]._zIndex<t;)l++;o.splice(l,0,i)}return i.add(e),this._length++,e._zIndex=t,e},l.prototype.set=function(e,t){return n.a.defined("primitive",e),n.a.typeOf.number("zIndex",t),t===e._zIndex||(this.remove(e,!0),this.add(e,t)),e},l.prototype.remove=function(e,t){if(this.contains(e)){var i,n=e._zIndex,a=this._collections[n];return(i=t?a.remove(e):a.removeAndDestroy(e))&&this._length--,0===a.length&&(this._collectionsArray.splice(this._collectionsArray.indexOf(a),1),this._collections[n]=void 0,a.destroy()),i}return!1},l.prototype.removeAll=function(){for(var e=this._collectionsArray,t=0;t<e.length;t++){var i=e[t];i.destroyPrimitives=!0,i.destroy()}this._collections={},this._collectionsArray=[],this._length=0},l.prototype.contains=function(e){if(!Object(r.default)(e))return!1;var t=this._collections[e._zIndex];return Object(r.default)(t)&&t.contains(e)},l.prototype.update=function(e){if(this.show)for(var t=this._collectionsArray,i=0;i<t.length;i++)t[i].update(e)},l.prototype.isDestroyed=function(){return!1},l.prototype.destroy=function(){return this.removeAll(),Object(o.default)(this)},t.a=l},function(e,t,i){"use strict";var n=i(47),a=i(41),r=i(8),o=i(1),s=i(7),l=i(0),u=i(19),d=i(3),c=i(49),f=i(65),h=i(42),p=i(129),m=i(89),_=i(48),g=i(9),v=s.default.WHITE,y=o.default.ZERO,b=h.a.NONE,w=r.default.ZERO,O=o.default.ZERO,x=p.a.CENTER,A=m.default.CENTER,T=new o.default,E=new s.default,C=new o.default,S=new r.default,M=new f.a,D=new f.a,P=new f.a,I=new a.a,L=new c.default;function j(e){this.entity=e,this.billboard=void 0,this.textureValue=void 0}function R(e,t){if(!Object(l.default)(e))throw new d.default("entityCluster is required.");if(!Object(l.default)(t))throw new d.default("entityCollection is required.");t.collectionChanged.addEventListener(R.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new n.default,this._onCollectionChanged(t,t.values,[],[])}function N(e,t,i){Object(l.default)(e)&&(e.billboard=void 0,i.removeBillboard(t))}R.prototype.update=function(e){if(!Object(l.default)(e))throw new d.default("time is required.");for(var t=this._items.values,i=this._cluster,n=0,a=t.length;n<a;n++){var r,o,s=t[n],u=s.entity,c=u._billboard,f=s.billboard,h=u.isShowing&&u.isAvailable(e)&&g.default.getValueOrDefault(c._show,e,!0);if(h&&(o=g.default.getValueOrUndefined(u._position,e,T),r=g.default.getValueOrUndefined(c._image,e),h=Object(l.default)(o)&&Object(l.default)(r)),h){g.default.isConstant(u._position)||(i._clusterDirty=!0),Object(l.default)(f)||((f=i.getBillboard(u)).id=u,f.image=void 0,s.billboard=f),f.show=h,Object(l.default)(f.image)&&s.textureValue===r||(f.image=r,s.textureValue=r),f.position=o,f.color=g.default.getValueOrDefault(c._color,e,v,E),f.eyeOffset=g.default.getValueOrDefault(c._eyeOffset,e,y,C),f.heightReference=g.default.getValueOrDefault(c._heightReference,e,b),f.pixelOffset=g.default.getValueOrDefault(c._pixelOffset,e,w,S),f.scale=g.default.getValueOrDefault(c._scale,e,1),f.rotation=g.default.getValueOrDefault(c._rotation,e,0),f.alignedAxis=g.default.getValueOrDefault(c._alignedAxis,e,O),f.horizontalOrigin=g.default.getValueOrDefault(c._horizontalOrigin,e,x),f.verticalOrigin=g.default.getValueOrDefault(c._verticalOrigin,e,A),f.width=g.default.getValueOrUndefined(c._width,e),f.height=g.default.getValueOrUndefined(c._height,e),f.scaleByDistance=g.default.getValueOrUndefined(c._scaleByDistance,e,M),f.translucencyByDistance=g.default.getValueOrUndefined(c._translucencyByDistance,e,D),f.pixelOffsetScaleByDistance=g.default.getValueOrUndefined(c._pixelOffsetScaleByDistance,e,P),f.sizeInMeters=g.default.getValueOrDefault(c._sizeInMeters,e,!1),f.distanceDisplayCondition=g.default.getValueOrUndefined(c._distanceDisplayCondition,e,L),f.disableDepthTestDistance=g.default.getValueOrUndefined(c._disableDepthTestDistance,e);var p=g.default.getValueOrUndefined(c._imageSubRegion,e,I);Object(l.default)(p)&&f.setImageSubRegion(f._imageId,p)}else N(s,u,i)}return!0},R.prototype.getBoundingSphere=function(e,t){if(!Object(l.default)(e))throw new d.default("entity is required.");if(!Object(l.default)(t))throw new d.default("result is required.");var i=this._items.get(e.id);if(!Object(l.default)(i)||!Object(l.default)(i.billboard))return _.a.FAILED;var n=i.billboard;if(n.heightReference===h.a.NONE)t.center=o.default.clone(n.position,t.center);else{if(!Object(l.default)(n._clampedPosition))return _.a.PENDING;t.center=o.default.clone(n._clampedPosition,t.center)}return t.radius=0,_.a.DONE},R.prototype.isDestroyed=function(){return!1},R.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(R.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeBillboard(e[t]);return Object(u.default)(this)},R.prototype._onCollectionChanged=function(e,t,i,n){var a,r,o=this._items,s=this._cluster;for(a=t.length-1;a>-1;a--)r=t[a],Object(l.default)(r._billboard)&&Object(l.default)(r._position)&&o.set(r.id,new j(r));for(a=n.length-1;a>-1;a--)r=n[a],Object(l.default)(r._billboard)&&Object(l.default)(r._position)?o.contains(r.id)||o.set(r.id,new j(r)):(N(o.get(r.id),r,s),o.remove(r.id));for(a=i.length-1;a>-1;a--)r=i[a],N(o.get(r.id),r,s),o.remove(r.id)},t.a=R},function(e,t,i){"use strict";var n=i(47),a=i(17),r=i(4),o=i(2),s=i(0),l=i(19),u=i(24),d=i(181),c=i(97),f=i(117),h=i(61),p=i(86),m=i(48),_=i(834),g=i(63),v=i(835),y=i(837),b=i(454),w=i(838),O=i(839),x=i(170),A=i(840),T=i(841),E=i(844),C=i(847),S=i(295),M=i(296),D=i(518),P=i(849),I=i(519),L=i(850),j=[],R=[_.a,y.a,v.a,w.a,O.a,A.a,T.a,E.a,C.a,L.a];function N(e,t){this.entity=e,this.scene=t;var i=new Array(R.length),n=new u.default;function a(e){n.raiseEvent(e)}for(var r=new d.a,o=0;o<i.length;o++){var s=new R[o](e,t);r.add(s.geometryChanged,a),i[o]=s}this.updaters=i,this.geometryChanged=n,this.eventHelper=r,this._removeEntitySubscription=e.definitionChanged.addEventListener(N.prototype._onEntityPropertyChanged,this)}function B(e,t,i,a){r.a.defined("scene",e),r.a.defined("entityCollection",t),i=Object(o.default)(i,e.primitives),a=Object(o.default)(a,e.groundPrimitives),this._scene=e,this._primitives=i,this._groundPrimitives=a,this._entityCollection=void 0,this._addedObjects=new n.default,this._removedObjects=new n.default,this._changedObjects=new n.default;var s=p.a.NUMBER_OF_SHADOW_MODES;this._outlineBatches=new Array(2*s),this._closedColorBatches=new Array(2*s),this._closedMaterialBatches=new Array(2*s),this._openColorBatches=new Array(2*s),this._openMaterialBatches=new Array(2*s);var l,u=x.a.supportsMaterialsforEntitiesOnTerrain(e);for(this._supportsMaterialsforEntitiesOnTerrain=u,l=0;l<s;++l)this._outlineBatches[l]=new I.a(i,e,l,!1),this._outlineBatches[s+l]=new I.a(i,e,l,!0),this._closedColorBatches[l]=new S.a(i,h.default,void 0,!0,l,!0),this._closedColorBatches[s+l]=new S.a(i,h.default,void 0,!0,l,!1),this._closedMaterialBatches[l]=new M.a(i,f.default,void 0,!0,l,!0),this._closedMaterialBatches[s+l]=new M.a(i,f.default,void 0,!0,l,!1),this._openColorBatches[l]=new S.a(i,h.default,void 0,!1,l,!0),this._openColorBatches[s+l]=new S.a(i,h.default,void 0,!1,l,!1),this._openMaterialBatches[l]=new M.a(i,f.default,void 0,!1,l,!0),this._openMaterialBatches[s+l]=new M.a(i,f.default,void 0,!1,l,!1);var d=c.default.NUMBER_OF_CLASSIFICATION_TYPES,m=new Array(d),_=[];if(u)for(l=0;l<d;++l)_.push(new P.a(a,l,f.default)),m[l]=new D.a(a,l);else for(l=0;l<d;++l)m[l]=new D.a(a,l);this._groundColorBatches=m,this._groundMaterialBatches=_,this._dynamicBatch=new b.a(i,a),this._batches=this._outlineBatches.concat(this._closedColorBatches,this._closedMaterialBatches,this._openColorBatches,this._openMaterialBatches,this._groundColorBatches,this._groundMaterialBatches,this._dynamicBatch),this._subscriptions=new n.default,this._updaterSets=new n.default,this._entityCollection=t,t.collectionChanged.addEventListener(B.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,j)}N.prototype._onEntityPropertyChanged=function(e,t,i,n){for(var a=this.updaters,r=0;r<a.length;r++)a[r]._onEntityPropertyChanged(e,t,i,n)},N.prototype.forEach=function(e){for(var t=this.updaters,i=0;i<t.length;i++)e(t[i])},N.prototype.destroy=function(){this.eventHelper.removeAll();for(var e=this.updaters,t=0;t<e.length;t++)e[t].destroy();this._removeEntitySubscription(),Object(l.default)(this)},B.prototype.update=function(e){r.a.defined("time",e);var t,i,n,a,o=this._addedObjects,s=o.values,l=this._removedObjects,u=l.values,d=this._changedObjects,c=d.values,f=this;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(a=this._updaterSets.get(n)).entity===i?a.forEach((function(t){f._removeUpdater(t),f._insertUpdaterIntoBatch(e,t)})):(u.push(i),s.push(i));for(t=u.length-1;t>-1;t--)n=(i=u[t]).id,(a=this._updaterSets.get(n)).forEach(this._removeUpdater.bind(this)),a.destroy(),this._updaterSets.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=s.length-1;t>-1;t--)n=(i=s[t]).id,a=new N(i,this._scene),this._updaterSets.set(n,a),a.forEach((function(t){f._insertUpdaterIntoBatch(e,t)})),this._subscriptions.set(n,a.geometryChanged.addEventListener(B._onGeometryChanged,this));o.removeAll(),l.removeAll(),d.removeAll();var h=!0,p=this._batches,m=p.length;for(t=0;t<m;t++)h=p[t].update(e)&&h;return h};var F=[],k=new a.default;B.prototype.getBoundingSphere=function(e,t){r.a.defined("entity",e),r.a.defined("result",t);for(var i=F,n=k,o=0,s=m.a.DONE,l=this._batches,u=l.length,d=e.id,c=this._updaterSets.get(d).updaters,f=0;f<c.length;f++)for(var h=c[f],p=0;p<u;p++){if((s=l[p].getBoundingSphere(h,n))===m.a.PENDING)return m.a.PENDING;s===m.a.DONE&&(i[o]=a.default.clone(n,i[o]),o++)}return 0===o?m.a.FAILED:(i.length=o,a.default.fromBoundingSpheres(i,t),m.a.DONE)},B.prototype.isDestroyed=function(){return!1},B.prototype.destroy=function(){var e;this._entityCollection.collectionChanged.removeEventListener(B.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();this._subscriptions.removeAll();var a=this._updaterSets.values;for(i=a.length,e=0;e<i;e++)a[e].destroy();return this._updaterSets.removeAll(),Object(l.default)(this)},B.prototype._removeUpdater=function(e){for(var t=this._batches,i=t.length,n=0;n<i;n++)t[n].remove(e)},B.prototype._insertUpdaterIntoBatch=function(e,t){if(t.isDynamic)this._dynamicBatch.add(e,t);else{var i;(t.outlineEnabled||t.fillEnabled)&&(i=t.shadowsProperty.getValue(e));var n=p.a.NUMBER_OF_SHADOW_MODES;if(t.outlineEnabled&&(Object(s.default)(t.terrainOffsetProperty)?this._outlineBatches[n+i].add(e,t):this._outlineBatches[i].add(e,t)),t.fillEnabled)if(t.onTerrain){var a=t.classificationTypeProperty.getValue(e);t.fillMaterialProperty instanceof g.a?this._groundColorBatches[a].add(e,t):this._groundMaterialBatches[a].add(e,t)}else t.isClosed?t.fillMaterialProperty instanceof g.a?Object(s.default)(t.terrainOffsetProperty)?this._closedColorBatches[n+i].add(e,t):this._closedColorBatches[i].add(e,t):Object(s.default)(t.terrainOffsetProperty)?this._closedMaterialBatches[n+i].add(e,t):this._closedMaterialBatches[i].add(e,t):t.fillMaterialProperty instanceof g.a?Object(s.default)(t.terrainOffsetProperty)?this._openColorBatches[n+i].add(e,t):this._openColorBatches[i].add(e,t):Object(s.default)(t.terrainOffsetProperty)?this._openMaterialBatches[n+i].add(e,t):this._openMaterialBatches[i].add(e,t)}},B._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,a=n.id;Object(s.default)(t.get(a))||Object(s.default)(i.get(a))||i.set(a,n)},B.prototype._onCollectionChanged=function(e,t,i){var n,a,r,o=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)a=(r=i[n]).id,o.remove(a)||(s.set(a,r),l.remove(a));for(n=t.length-1;n>-1;n--)a=(r=t[n]).id,s.remove(a)?l.set(a,r):o.set(a,r)},t.a=B},function(e,t,i){"use strict";var n=i(240),a=i(308),r=i(1),o=i(4),s=i(7),l=i(53),u=i(0),d=i(3),c=i(96),f=i(43),h=i(71),p=i(40),m=i(138),_=i(87),g=i(42),v=i(117),y=i(61),b=i(63),w=i(112),O=i(110),x=i(359),A=i(9),T=r.default.ZERO,E=new r.default,C=new r.default,S=new s.default;function M(e){this.id=e,this.vertexFormat=void 0,this.dimensions=void 0,this.offsetAttribute=void 0}function D(e,t){O.a.call(this,{entity:e,scene:t,geometryOptions:new M(e),geometryPropertyName:"box",observedPropertyNames:["availability","position","orientation","box"]}),this._onEntityPropertyChanged(e,"box",e.box,void 0)}function P(e,t,i){w.a.call(this,e,t,i)}Object(u.default)(Object.create)&&(D.prototype=Object.create(O.a.prototype),D.prototype.constructor=D),Object.defineProperties(D.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),D.prototype.createFillGeometryInstance=function(e){if(o.a.defined("time",e),!this._fillEnabled)throw new d.default("This instance does not represent a filled geometry.");var t,i=this._entity,a=i.isAvailable(e),r=new _.default(a&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),h=this._distanceDisplayConditionProperty.getValue(e),p={show:r,distanceDisplayCondition:c.a.fromDistanceDisplayCondition(h),color:void 0,offset:void 0};this._materialProperty instanceof b.a&&(Object(u.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(t=this._materialProperty.color.getValue(e,S)),Object(u.default)(t)||(t=s.default.WHITE),p.color=l.default.fromColor(t));return Object(u.default)(this._options.offsetAttribute)&&(p.offset=m.a.fromCartesian3(A.default.getValueOrDefault(this._terrainOffsetProperty,e,T,E))),new f.default({id:i,geometry:n.default.fromDimensions(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:p})},D.prototype.createOutlineGeometryInstance=function(e){if(o.a.defined("time",e),!this._outlineEnabled)throw new d.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=A.default.getValueOrDefault(this._outlineColorProperty,e,s.default.BLACK,S),r=this._distanceDisplayConditionProperty.getValue(e),h={show:new _.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:l.default.fromColor(n),distanceDisplayCondition:c.a.fromDistanceDisplayCondition(r),offset:void 0};return Object(u.default)(this._options.offsetAttribute)&&(h.offset=m.a.fromCartesian3(A.default.getValueOrDefault(this._terrainOffsetProperty,e,T,E))),new f.default({id:t,geometry:a.a.fromDimensions(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.box.heightReference,.5*this._options.dimensions.z,this._scene.mapProjection.ellipsoid),attributes:h})},D.prototype._computeCenter=function(e,t){return A.default.getValueOrUndefined(this._entity.position,e,t)},D.prototype._isHidden=function(e,t){return!Object(u.default)(t.dimensions)||!Object(u.default)(e.position)||O.a.prototype._isHidden.call(this,e,t)},D.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&A.default.isConstant(e.orientation)&&t.dimensions.isConstant&&A.default.isConstant(t.outlineWidth))},D.prototype._setStaticOptions=function(e,t){var i=A.default.getValueOrDefault(t.heightReference,p.a.MINIMUM_VALUE,g.a.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof b.a?y.default.VERTEX_FORMAT:v.default.MaterialSupport.TEXTURED.vertexFormat,n.dimensions=t.dimensions.getValue(p.a.MINIMUM_VALUE,n.dimensions),n.offsetAttribute=i!==g.a.NONE?h.a.ALL:void 0},D.prototype._onEntityPropertyChanged=x.a,D.DynamicGeometryUpdater=P,Object(u.default)(Object.create)&&(P.prototype=Object.create(w.a.prototype),P.prototype.constructor=P),P.prototype._isHidden=function(e,t,i){var n=A.default.getValueOrUndefined(e.position,i,C),a=this._options.dimensions;return!Object(u.default)(n)||!Object(u.default)(a)||w.a.prototype._isHidden.call(this,e,t,i)},P.prototype._setOptions=function(e,t,i){var n=A.default.getValueOrDefault(t.heightReference,i,g.a.NONE),a=this._options;a.dimensions=A.default.getValueOrUndefined(t.dimensions,i,a.dimensions),a.offsetAttribute=n!==g.a.NONE?h.a.ALL:void 0},t.a=D},function(e,t,i){"use strict";var n=i(116),a=i(1),r=i(4),o=i(7),s=i(53),l=i(482),u=i(836),d=i(0),c=i(3),f=i(96),h=i(43),p=i(40),m=i(138),_=i(21),g=i(87),v=i(42),y=i(117),b=i(61),w=i(63),O=i(112),x=i(110),A=i(101),T=i(9),E=new o.default,C=a.default.ZERO,S=new a.default,M=new _.default;function D(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.cornerType=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.offsetAttribute=void 0}function P(e,t){A.a.call(this,{entity:e,scene:t,geometryOptions:new D(e),geometryPropertyName:"corridor",observedPropertyNames:["availability","corridor"]}),this._onEntityPropertyChanged(e,"corridor",e.corridor,void 0)}function I(e,t,i){O.a.call(this,e,t,i)}Object(d.default)(Object.create)&&(P.prototype=Object.create(A.a.prototype),P.prototype.constructor=P),P.prototype.createFillGeometryInstance=function(e){if(r.a.defined("time",e),!this._fillEnabled)throw new c.default("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),a={show:new g.default(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:f.a.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof w.a&&(Object(d.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,E)),Object(d.default)(t)||(t=o.default.WHITE),a.color=s.default.fromColor(t));return Object(d.default)(this._options.offsetAttribute)&&(a.offset=m.a.fromCartesian3(T.default.getValueOrDefault(this._terrainOffsetProperty,e,C,S))),new h.default({id:i,geometry:new l.a(this._options),attributes:a})},P.prototype.createOutlineGeometryInstance=function(e){if(r.a.defined("time",e),!this._outlineEnabled)throw new c.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=T.default.getValueOrDefault(this._outlineColorProperty,e,o.default.BLACK,E),a={show:new g.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:s.default.fromColor(n),distanceDisplayCondition:f.a.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0};return Object(d.default)(this._options.offsetAttribute)&&(a.offset=m.a.fromCartesian3(T.default.getValueOrDefault(this._terrainOffsetProperty,e,C,S))),new h.default({id:t,geometry:new u.a(this._options),attributes:a})},P.prototype._computeCenter=function(e,t){var i=T.default.getValueOrUndefined(this._entity.corridor.positions,e);if(Object(d.default)(i)&&0!==i.length)return a.default.clone(i[Math.floor(i.length/2)],t)},P.prototype._isHidden=function(e,t){return!Object(d.default)(t.positions)||!Object(d.default)(t.width)||x.a.prototype._isHidden.call(this,e,t)},P.prototype._isDynamic=function(e,t){return!t.positions.isConstant||!T.default.isConstant(t.height)||!T.default.isConstant(t.extrudedHeight)||!T.default.isConstant(t.granularity)||!T.default.isConstant(t.width)||!T.default.isConstant(t.outlineWidth)||!T.default.isConstant(t.cornerType)||!T.default.isConstant(t.zIndex)||this._onTerrain&&!T.default.isConstant(this._materialProperty)&&!(this._materialProperty instanceof w.a)},P.prototype._setStaticOptions=function(e,t){var i=T.default.getValueOrUndefined(t.height,p.a.MINIMUM_VALUE),a=T.default.getValueOrDefault(t.heightReference,p.a.MINIMUM_VALUE,v.a.NONE),r=T.default.getValueOrUndefined(t.extrudedHeight,p.a.MINIMUM_VALUE),o=T.default.getValueOrDefault(t.extrudedHeightReference,p.a.MINIMUM_VALUE,v.a.NONE);Object(d.default)(r)&&!Object(d.default)(i)&&(i=0);var s=this._options;s.vertexFormat=this._materialProperty instanceof w.a?b.default.VERTEX_FORMAT:y.default.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(p.a.MINIMUM_VALUE,s.positions),s.width=t.width.getValue(p.a.MINIMUM_VALUE),s.granularity=T.default.getValueOrUndefined(t.granularity,p.a.MINIMUM_VALUE),s.cornerType=T.default.getValueOrUndefined(t.cornerType,p.a.MINIMUM_VALUE),s.offsetAttribute=A.a.computeGeometryOffsetAttribute(i,a,r,o),s.height=A.a.getGeometryHeight(i,a),(r=A.a.getGeometryExtrudedHeight(r,o))===A.a.CLAMP_TO_GROUND&&(r=n.a.getMinimumMaximumHeights(l.a.computeRectangle(s,M)).minimumTerrainHeight),s.extrudedHeight=r},P.DynamicGeometryUpdater=I,Object(d.default)(Object.create)&&(I.prototype=Object.create(O.a.prototype),I.prototype.constructor=I),I.prototype._isHidden=function(e,t,i){var n=this._options;return!Object(d.default)(n.positions)||!Object(d.default)(n.width)||O.a.prototype._isHidden.call(this,e,t,i)},I.prototype._setOptions=function(e,t,i){var a=this._options,r=T.default.getValueOrUndefined(t.height,i),o=T.default.getValueOrDefault(t.heightReference,i,v.a.NONE),s=T.default.getValueOrUndefined(t.extrudedHeight,i),u=T.default.getValueOrDefault(t.extrudedHeightReference,i,v.a.NONE);Object(d.default)(s)&&!Object(d.default)(r)&&(r=0),a.positions=T.default.getValueOrUndefined(t.positions,i),a.width=T.default.getValueOrUndefined(t.width,i),a.granularity=T.default.getValueOrUndefined(t.granularity,i),a.cornerType=T.default.getValueOrUndefined(t.cornerType,i),a.offsetAttribute=A.a.computeGeometryOffsetAttribute(r,o,s,u),a.height=A.a.getGeometryHeight(r,o),(s=A.a.getGeometryExtrudedHeight(s,u))===A.a.CLAMP_TO_GROUND&&(s=n.a.getMinimumMaximumHeights(l.a.computeRectangle(a,M)).minimumTerrainHeight),a.extrudedHeight=s},t.a=P},function(e,t,i){"use strict";var n=i(68),a=i(149),r=i(17),o=i(1),s=i(4),l=i(11),u=i(131),d=i(134),c=i(2),f=i(0),h=i(15),p=i(46),m=i(28),_=i(82),g=i(71),v=i(38),y=i(5),b=i(111),w=i(35),O=new o.default,x=new o.default,A=new o.default;function T(e,t){var i,n,a,r=[],s=e.positions,c=e.corners,h=e.endPositions,p=new _.a,g=0,y=0,b=0;for(n=0;n<s.length;n+=2)g+=a=s[n].length-3,b+=a/3*4,y+=s[n+1].length-3;for(g+=3,y+=3,n=0;n<c.length;n++){i=c[n];var w=c[n].leftPositions;Object(f.default)(w)?(g+=a=w.length,b+=a/3*2):(y+=a=c[n].rightPositions.length,b+=a/3*2)}var T,E=Object(f.default)(h);E&&(g+=T=h[0].length-3,y+=T,b+=4*(T/=3));var C,S,M,D,P,I,L=g+y,j=new Float64Array(L),R=0,N=L-1,B=T/2,F=v.a.createTypedArray(L/3,b+4),k=0;if(F[k++]=R/3,F[k++]=(N-2)/3,E){r.push(R/3),I=O,P=x;var z=h[0];for(n=0;n<B;n++)I=o.default.fromArray(z,3*(B-1-n),I),P=o.default.fromArray(z,3*(B+n),P),d.a.addAttribute(j,P,R),d.a.addAttribute(j,I,void 0,N),D=(S=R/3)+1,M=(C=(N-2)/3)-1,F[k++]=C,F[k++]=M,F[k++]=S,F[k++]=D,R+=3,N-=3}var U=0,V=s[U++],H=s[U++];for(j.set(V,R),j.set(H,N-H.length+1),a=H.length-3,r.push(R/3,(N-2)/3),n=0;n<a;n+=3)D=(S=R/3)+1,M=(C=(N-2)/3)-1,F[k++]=C,F[k++]=M,F[k++]=S,F[k++]=D,R+=3,N-=3;for(n=0;n<c.length;n++){var G,Y,W=(i=c[n]).leftPositions,q=i.rightPositions,X=A;if(Object(f.default)(W)){for(N-=3,Y=M,r.push(D),G=0;G<W.length/3;G++)X=o.default.fromArray(W,3*G,X),F[k++]=Y-G-1,F[k++]=Y-G,d.a.addAttribute(j,X,void 0,N),N-=3;r.push(Y-Math.floor(W.length/6)),t===u.a.BEVELED&&r.push((N-2)/3+1),R+=3}else{for(R+=3,Y=D,r.push(M),G=0;G<q.length/3;G++)X=o.default.fromArray(q,3*G,X),F[k++]=Y+G,F[k++]=Y+G+1,d.a.addAttribute(j,X,R),R+=3;r.push(Y+Math.floor(q.length/6)),t===u.a.BEVELED&&r.push(R/3-1),N-=3}for(V=s[U++],H=s[U++],V.splice(0,3),H.splice(H.length-3,3),j.set(V,R),j.set(H,N-H.length+1),a=H.length-3,G=0;G<H.length;G+=3)S=(D=R/3)-1,C=(M=(N-2)/3)+1,F[k++]=C,F[k++]=M,F[k++]=S,F[k++]=D,R+=3,N-=3;R-=3,N+=3,r.push(R/3,(N-2)/3)}if(E){R+=3,N-=3,I=O,P=x;var K=h[1];for(n=0;n<B;n++)I=o.default.fromArray(K,3*(T-n-1),I),P=o.default.fromArray(K,3*n,P),d.a.addAttribute(j,I,void 0,N),d.a.addAttribute(j,P,R),S=(D=R/3)-1,C=(M=(N-2)/3)+1,F[k++]=C,F[k++]=M,F[k++]=S,F[k++]=D,R+=3,N-=3;r.push(R/3)}else r.push(R/3,(N-2)/3);return F[k++]=R/3,F[k++]=(N-2)/3,p.position=new m.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:j}),{attributes:p,indices:F,wallIndices:r}}function E(e){var t=(e=Object(c.default)(e,c.default.EMPTY_OBJECT)).positions,i=e.width;s.a.typeOf.object("options.positions",t),s.a.typeOf.number("options.width",i);var n=Object(c.default)(e.height,0),a=Object(c.default)(e.extrudedHeight,n);this._positions=t,this._ellipsoid=h.default.clone(Object(c.default)(e.ellipsoid,h.default.WGS84)),this._width=i,this._height=Math.max(n,a),this._extrudedHeight=Math.min(n,a),this._cornerType=Object(c.default)(e.cornerType,u.a.ROUNDED),this._granularity=Object(c.default)(e.granularity,y.default.RADIANS_PER_DEGREE),this._offsetAttribute=e.offsetAttribute,this._workerName="createCorridorOutlineGeometry",this.packedLength=1+t.length*o.default.packedLength+h.default.packedLength+6}E.pack=function(e,t,i){s.a.typeOf.object("value",e),s.a.typeOf.object("array",t),i=Object(c.default)(i,0);var n=e._positions,a=n.length;t[i++]=a;for(var r=0;r<a;++r,i+=o.default.packedLength)o.default.pack(n[r],t,i);return h.default.pack(e._ellipsoid,t,i),i+=h.default.packedLength,t[i++]=e._width,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._cornerType,t[i++]=e._granularity,t[i]=Object(c.default)(e._offsetAttribute,-1),t};var C=h.default.clone(h.default.UNIT_SPHERE),S={positions:void 0,ellipsoid:C,width:void 0,height:void 0,extrudedHeight:void 0,cornerType:void 0,granularity:void 0,offsetAttribute:void 0};E.unpack=function(e,t,i){s.a.typeOf.object("array",e),t=Object(c.default)(t,0);for(var n=e[t++],a=new Array(n),r=0;r<n;++r,t+=o.default.packedLength)a[r]=o.default.unpack(e,t);var l=h.default.unpack(e,t,C);t+=h.default.packedLength;var u=e[t++],d=e[t++],p=e[t++],m=e[t++],_=e[t++],g=e[t];return Object(f.default)(i)?(i._positions=a,i._ellipsoid=h.default.clone(l,i._ellipsoid),i._width=u,i._height=d,i._extrudedHeight=p,i._cornerType=m,i._granularity=_,i._offsetAttribute=-1===g?void 0:g,i):(S.positions=a,S.width=u,S.height=d,S.extrudedHeight=p,S.cornerType=m,S.granularity=_,S.offsetAttribute=-1===g?void 0:g,new E(S))},E.createGeometry=function(e){var t=e._positions,i=e._width,s=e._ellipsoid;t=function(e,t){for(var i=0;i<e.length;i++)e[i]=t.scaleToGeodeticSurface(e[i],e[i]);return e}(t,s);var u=Object(a.a)(t,o.default.equalsEpsilon);if(!(u.length<2||i<=0)){var c,h=e._height,_=e._extrudedHeight,O=!y.default.equalsEpsilon(h,_,0,y.default.EPSILON2),x={ellipsoid:s,positions:u,width:i,cornerType:e._cornerType,granularity:e._granularity,saveAttributes:!1};if(O)x.height=h,x.extrudedHeight=_,x.offsetAttribute=e._offsetAttribute,c=function(e){var t=e.ellipsoid,i=T(d.a.computePositions(e),e.cornerType),a=i.wallIndices,r=e.height,o=e.extrudedHeight,s=i.attributes,u=i.indices,c=s.position.values,h=c.length,p=new Float64Array(h);p.set(c);var _,y=new Float64Array(2*h);if(c=b.a.scaleToGeodeticHeight(c,r,t),p=b.a.scaleToGeodeticHeight(p,o,t),y.set(c),y.set(p,h),s.position.values=y,h/=3,Object(f.default)(e.offsetAttribute)){var w=new Uint8Array(2*h);if(e.offsetAttribute===g.a.TOP)w=Object(n.a)(w,1,0,h);else{var O=e.offsetAttribute===g.a.NONE?0:1;w=Object(n.a)(w,O)}s.applyOffset=new m.default({componentDatatype:l.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:w})}var x=u.length,A=v.a.createTypedArray(y.length/3,2*(x+a.length));A.set(u);var E,C,S=x;for(_=0;_<x;_+=2){var M=u[_],D=u[_+1];A[S++]=M+h,A[S++]=D+h}for(_=0;_<a.length;_++)C=(E=a[_])+h,A[S++]=E,A[S++]=C;return{attributes:s,indices:A}}(x);else if((c=T(d.a.computePositions(x),x.cornerType)).attributes.position.values=b.a.scaleToGeodeticHeight(c.attributes.position.values,h,s),Object(f.default)(e._offsetAttribute)){var A=c.attributes.position.values.length,E=new Uint8Array(A/3),C=e._offsetAttribute===g.a.NONE?0:1;Object(n.a)(E,C),c.attributes.applyOffset=new m.default({componentDatatype:l.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}var S=c.attributes,M=r.default.fromVertices(S.position.values,void 0,3);return new p.default({attributes:S,indices:c.indices,primitiveType:w.default.LINES,boundingSphere:M,offsetAttribute:e._offsetAttribute})}},t.a=E},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(7),o=i(53),s=i(495),l=i(496),u=i(0),d=i(3),c=i(96),f=i(43),h=i(71),p=i(40),m=i(138),_=i(87),g=i(42),v=i(117),y=i(61),b=i(63),w=i(112),O=i(110),x=i(359),A=i(9),T=n.default.ZERO,E=new n.default,C=new n.default,S=new r.default;function M(e){this.id=e,this.vertexFormat=void 0,this.length=void 0,this.topRadius=void 0,this.bottomRadius=void 0,this.slices=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function D(e,t){O.a.call(this,{entity:e,scene:t,geometryOptions:new M(e),geometryPropertyName:"cylinder",observedPropertyNames:["availability","position","orientation","cylinder"]}),this._onEntityPropertyChanged(e,"cylinder",e.cylinder,void 0)}function P(e,t,i){w.a.call(this,e,t,i)}Object(u.default)(Object.create)&&(D.prototype=Object.create(O.a.prototype),D.prototype.constructor=D),Object.defineProperties(D.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),D.prototype.createFillGeometryInstance=function(e){if(a.a.defined("time",e),!this._fillEnabled)throw new d.default("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),l=new _.default(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),h=this._distanceDisplayConditionProperty.getValue(e),p={show:l,distanceDisplayCondition:c.a.fromDistanceDisplayCondition(h),color:void 0,offset:void 0};this._materialProperty instanceof b.a&&(Object(u.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,S)),Object(u.default)(t)||(t=r.default.WHITE),p.color=o.default.fromColor(t));return Object(u.default)(this._options.offsetAttribute)&&(p.offset=m.a.fromCartesian3(A.default.getValueOrDefault(this._terrainOffsetProperty,e,T,E))),new f.default({id:i,geometry:new s.default(this._options),modelMatrix:i.computeModelMatrixForHeightReference(e,i.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:p})},D.prototype.createOutlineGeometryInstance=function(e){if(a.a.defined("time",e),!this._outlineEnabled)throw new d.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=A.default.getValueOrDefault(this._outlineColorProperty,e,r.default.BLACK,S),s=this._distanceDisplayConditionProperty.getValue(e),h={show:new _.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o.default.fromColor(n),distanceDisplayCondition:c.a.fromDistanceDisplayCondition(s),offset:void 0};return Object(u.default)(this._options.offsetAttribute)&&(h.offset=m.a.fromCartesian3(A.default.getValueOrDefault(this._terrainOffsetProperty,e,T,E))),new f.default({id:t,geometry:new l.default(this._options),modelMatrix:t.computeModelMatrixForHeightReference(e,t.cylinder.heightReference,.5*this._options.length,this._scene.mapProjection.ellipsoid),attributes:h})},D.prototype._computeCenter=function(e,t){return A.default.getValueOrUndefined(this._entity.position,e,t)},D.prototype._isHidden=function(e,t){return!Object(u.default)(e.position)||!Object(u.default)(t.length)||!Object(u.default)(t.topRadius)||!Object(u.default)(t.bottomRadius)||O.a.prototype._isHidden.call(this,e,t)},D.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&A.default.isConstant(e.orientation)&&t.length.isConstant&&t.topRadius.isConstant&&t.bottomRadius.isConstant&&A.default.isConstant(t.slices)&&A.default.isConstant(t.outlineWidth)&&A.default.isConstant(t.numberOfVerticalLines))},D.prototype._setStaticOptions=function(e,t){var i=A.default.getValueOrDefault(t.heightReference,p.a.MINIMUM_VALUE,g.a.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof b.a?y.default.VERTEX_FORMAT:v.default.MaterialSupport.TEXTURED.vertexFormat,n.length=t.length.getValue(p.a.MINIMUM_VALUE),n.topRadius=t.topRadius.getValue(p.a.MINIMUM_VALUE),n.bottomRadius=t.bottomRadius.getValue(p.a.MINIMUM_VALUE),n.slices=A.default.getValueOrUndefined(t.slices,p.a.MINIMUM_VALUE),n.numberOfVerticalLines=A.default.getValueOrUndefined(t.numberOfVerticalLines,p.a.MINIMUM_VALUE),n.offsetAttribute=i!==g.a.NONE?h.a.ALL:void 0},D.prototype._onEntityPropertyChanged=x.a,D.DynamicGeometryUpdater=P,Object(u.default)(Object.create)&&(P.prototype=Object.create(w.a.prototype),P.prototype.constructor=P),P.prototype._isHidden=function(e,t,i){var n=this._options,a=A.default.getValueOrUndefined(e.position,i,C);return!Object(u.default)(a)||!Object(u.default)(n.length)||!Object(u.default)(n.topRadius)||!Object(u.default)(n.bottomRadius)||w.a.prototype._isHidden.call(this,e,t,i)},P.prototype._setOptions=function(e,t,i){var n=A.default.getValueOrDefault(t.heightReference,i,g.a.NONE),a=this._options;a.length=A.default.getValueOrUndefined(t.length,i),a.topRadius=A.default.getValueOrUndefined(t.topRadius,i),a.bottomRadius=A.default.getValueOrUndefined(t.bottomRadius,i),a.slices=A.default.getValueOrUndefined(t.slices,i),a.numberOfVerticalLines=A.default.getValueOrUndefined(t.numberOfVerticalLines,i),a.offsetAttribute=n!==g.a.NONE?h.a.ALL:void 0},t.a=D},function(e,t,i){"use strict";var n=i(116),a=i(1),r=i(4),o=i(7),s=i(53),l=i(0),u=i(3),d=i(96),c=i(230),f=i(258),h=i(43),p=i(40),m=i(138),_=i(21),g=i(87),v=i(42),y=i(117),b=i(61),w=i(63),O=i(112),x=i(110),A=i(101),T=i(9),E=new o.default,C=a.default.ZERO,S=new a.default,M=new _.default;function D(e){this.id=e,this.vertexFormat=void 0,this.center=void 0,this.semiMajorAxis=void 0,this.semiMinorAxis=void 0,this.rotation=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.numberOfVerticalLines=void 0,this.offsetAttribute=void 0}function P(e,t){A.a.call(this,{entity:e,scene:t,geometryOptions:new D(e),geometryPropertyName:"ellipse",observedPropertyNames:["availability","position","ellipse"]}),this._onEntityPropertyChanged(e,"ellipse",e.ellipse,void 0)}function I(e,t,i){O.a.call(this,e,t,i)}Object(l.default)(Object.create)&&(P.prototype=Object.create(A.a.prototype),P.prototype.constructor=P),P.prototype.createFillGeometryInstance=function(e){if(r.a.defined("time",e),!this._fillEnabled)throw new u.default("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),a={show:new g.default(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:d.a.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof w.a&&(Object(l.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,E)),Object(l.default)(t)||(t=o.default.WHITE),a.color=s.default.fromColor(t));return Object(l.default)(this._options.offsetAttribute)&&(a.offset=m.a.fromCartesian3(T.default.getValueOrDefault(this._terrainOffsetProperty,e,C,S))),new h.default({id:i,geometry:new c.default(this._options),attributes:a})},P.prototype.createOutlineGeometryInstance=function(e){if(r.a.defined("time",e),!this._outlineEnabled)throw new u.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=T.default.getValueOrDefault(this._outlineColorProperty,e,o.default.BLACK,E),a=this._distanceDisplayConditionProperty.getValue(e),c={show:new g.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:s.default.fromColor(n),distanceDisplayCondition:d.a.fromDistanceDisplayCondition(a),offset:void 0};return Object(l.default)(this._options.offsetAttribute)&&(c.offset=m.a.fromCartesian3(T.default.getValueOrDefault(this._terrainOffsetProperty,e,C,S))),new h.default({id:t,geometry:new f.default(this._options),attributes:c})},P.prototype._computeCenter=function(e,t){return T.default.getValueOrUndefined(this._entity.position,e,t)},P.prototype._isHidden=function(e,t){var i=e.position;return!Object(l.default)(i)||!Object(l.default)(t.semiMajorAxis)||!Object(l.default)(t.semiMinorAxis)||x.a.prototype._isHidden.call(this,e,t)},P.prototype._isDynamic=function(e,t){return!e.position.isConstant||!t.semiMajorAxis.isConstant||!t.semiMinorAxis.isConstant||!T.default.isConstant(t.rotation)||!T.default.isConstant(t.height)||!T.default.isConstant(t.extrudedHeight)||!T.default.isConstant(t.granularity)||!T.default.isConstant(t.stRotation)||!T.default.isConstant(t.outlineWidth)||!T.default.isConstant(t.numberOfVerticalLines)||!T.default.isConstant(t.zIndex)||this._onTerrain&&!T.default.isConstant(this._materialProperty)&&!(this._materialProperty instanceof w.a)},P.prototype._setStaticOptions=function(e,t){var i=T.default.getValueOrUndefined(t.height,p.a.MINIMUM_VALUE),a=T.default.getValueOrDefault(t.heightReference,p.a.MINIMUM_VALUE,v.a.NONE),r=T.default.getValueOrUndefined(t.extrudedHeight,p.a.MINIMUM_VALUE),o=T.default.getValueOrDefault(t.extrudedHeightReference,p.a.MINIMUM_VALUE,v.a.NONE);Object(l.default)(r)&&!Object(l.default)(i)&&(i=0);var s=this._options;s.vertexFormat=this._materialProperty instanceof w.a?b.default.VERTEX_FORMAT:y.default.MaterialSupport.TEXTURED.vertexFormat,s.center=e.position.getValue(p.a.MINIMUM_VALUE,s.center),s.semiMajorAxis=t.semiMajorAxis.getValue(p.a.MINIMUM_VALUE,s.semiMajorAxis),s.semiMinorAxis=t.semiMinorAxis.getValue(p.a.MINIMUM_VALUE,s.semiMinorAxis),s.rotation=T.default.getValueOrUndefined(t.rotation,p.a.MINIMUM_VALUE),s.granularity=T.default.getValueOrUndefined(t.granularity,p.a.MINIMUM_VALUE),s.stRotation=T.default.getValueOrUndefined(t.stRotation,p.a.MINIMUM_VALUE),s.numberOfVerticalLines=T.default.getValueOrUndefined(t.numberOfVerticalLines,p.a.MINIMUM_VALUE),s.offsetAttribute=A.a.computeGeometryOffsetAttribute(i,a,r,o),s.height=A.a.getGeometryHeight(i,a),(r=A.a.getGeometryExtrudedHeight(r,o))===A.a.CLAMP_TO_GROUND&&(r=n.a.getMinimumMaximumHeights(c.default.computeRectangle(s,M)).minimumTerrainHeight),s.extrudedHeight=r},P.DynamicGeometryUpdater=I,Object(l.default)(Object.create)&&(I.prototype=Object.create(O.a.prototype),I.prototype.constructor=I),I.prototype._isHidden=function(e,t,i){var n=this._options;return!Object(l.default)(n.center)||!Object(l.default)(n.semiMajorAxis)||!Object(l.default)(n.semiMinorAxis)||O.a.prototype._isHidden.call(this,e,t,i)},I.prototype._setOptions=function(e,t,i){var a=this._options,r=T.default.getValueOrUndefined(t.height,i),o=T.default.getValueOrDefault(t.heightReference,i,v.a.NONE),s=T.default.getValueOrUndefined(t.extrudedHeight,i),u=T.default.getValueOrDefault(t.extrudedHeightReference,i,v.a.NONE);Object(l.default)(s)&&!Object(l.default)(r)&&(r=0),a.center=T.default.getValueOrUndefined(e.position,i,a.center),a.semiMajorAxis=T.default.getValueOrUndefined(t.semiMajorAxis,i),a.semiMinorAxis=T.default.getValueOrUndefined(t.semiMinorAxis,i),a.rotation=T.default.getValueOrUndefined(t.rotation,i),a.granularity=T.default.getValueOrUndefined(t.granularity,i),a.stRotation=T.default.getValueOrUndefined(t.stRotation,i),a.numberOfVerticalLines=T.default.getValueOrUndefined(t.numberOfVerticalLines,i),a.offsetAttribute=A.a.computeGeometryOffsetAttribute(r,o,s,u),a.height=A.a.getGeometryHeight(r,o),(s=A.a.getGeometryExtrudedHeight(s,u))===A.a.CLAMP_TO_GROUND&&(s=n.a.getMinimumMaximumHeights(c.default.computeRectangle(a,M)).minimumTerrainHeight),a.extrudedHeight=s},t.a=P},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(7),o=i(53),s=i(2),l=i(0),u=i(49),d=i(96),c=i(196),f=i(257),h=i(43),p=i(71),m=i(40),_=i(6),g=i(138),v=i(87),y=i(42),b=i(117),w=i(61),O=i(64),x=i(13),A=i(63),T=i(112),E=i(110),C=i(359),S=i(158),M=i(9),D=new A.a(r.default.WHITE),P=n.default.ZERO,I=new n.default,L=new n.default,j=new n.default,R=new r.default,N=new n.default(1,1,1);function B(e){this.id=e,this.vertexFormat=void 0,this.radii=void 0,this.innerRadii=void 0,this.minimumClock=void 0,this.maximumClock=void 0,this.minimumCone=void 0,this.maximumCone=void 0,this.stackPartitions=void 0,this.slicePartitions=void 0,this.subdivisions=void 0,this.offsetAttribute=void 0}function F(e,t){E.a.call(this,{entity:e,scene:t,geometryOptions:new B(e),geometryPropertyName:"ellipsoid",observedPropertyNames:["availability","position","orientation","ellipsoid"]}),this._onEntityPropertyChanged(e,"ellipsoid",e.ellipsoid,void 0)}function k(e,t,i){T.a.call(this,e,t,i),this._scene=e._scene,this._modelMatrix=new _.default,this._attributes=void 0,this._outlineAttributes=void 0,this._lastSceneMode=void 0,this._lastShow=void 0,this._lastOutlineShow=void 0,this._lastOutlineWidth=void 0,this._lastOutlineColor=void 0,this._lastOffset=new n.default,this._material={}}Object(l.default)(Object.create)&&(F.prototype=Object.create(E.a.prototype),F.prototype.constructor=F),Object.defineProperties(F.prototype,{terrainOffsetProperty:{get:function(){return this._terrainOffsetProperty}}}),F.prototype.createFillGeometryInstance=function(e,t,i){a.a.defined("time",e);var n,s,u=this._entity,f=u.isAvailable(e),p=new v.default(f&&u.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),m=this._distanceDisplayConditionProperty.getValue(e),_={show:p,distanceDisplayCondition:d.a.fromDistanceDisplayCondition(m),color:void 0,offset:void 0};this._materialProperty instanceof A.a&&(Object(l.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||f)&&(s=this._materialProperty.color.getValue(e,R)),Object(l.default)(s)||(s=r.default.WHITE),n=o.default.fromColor(s),_.color=n);return Object(l.default)(this._options.offsetAttribute)&&(_.offset=g.a.fromCartesian3(M.default.getValueOrDefault(this._terrainOffsetProperty,e,P,I))),new h.default({id:u,geometry:new c.default(this._options),modelMatrix:t?void 0:u.computeModelMatrixForHeightReference(e,u.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:_})},F.prototype.createOutlineGeometryInstance=function(e,t,i){a.a.defined("time",e);var n=this._entity,s=n.isAvailable(e),u=M.default.getValueOrDefault(this._outlineColorProperty,e,r.default.BLACK,R),c=this._distanceDisplayConditionProperty.getValue(e),p={show:new v.default(s&&n.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o.default.fromColor(u),distanceDisplayCondition:d.a.fromDistanceDisplayCondition(c),offset:void 0};return Object(l.default)(this._options.offsetAttribute)&&(p.offset=g.a.fromCartesian3(M.default.getValueOrDefault(this._terrainOffsetProperty,e,P,I))),new h.default({id:n,geometry:new f.default(this._options),modelMatrix:t?void 0:n.computeModelMatrixForHeightReference(e,n.ellipsoid.heightReference,.5*this._options.radii.z,this._scene.mapProjection.ellipsoid,i),attributes:p})},F.prototype._computeCenter=function(e,t){return M.default.getValueOrUndefined(this._entity.position,e,t)},F.prototype._isHidden=function(e,t){return!Object(l.default)(e.position)||!Object(l.default)(t.radii)||E.a.prototype._isHidden.call(this,e,t)},F.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&M.default.isConstant(e.orientation)&&t.radii.isConstant&&M.default.isConstant(t.innerRadii)&&M.default.isConstant(t.stackPartitions)&&M.default.isConstant(t.slicePartitions)&&M.default.isConstant(t.outlineWidth)&&M.default.isConstant(t.minimumClock)&&M.default.isConstant(t.maximumClock)&&M.default.isConstant(t.minimumCone)&&M.default.isConstant(t.maximumCone)&&M.default.isConstant(t.subdivisions))},F.prototype._setStaticOptions=function(e,t){var i=M.default.getValueOrDefault(t.heightReference,m.a.MINIMUM_VALUE,y.a.NONE),n=this._options;n.vertexFormat=this._materialProperty instanceof A.a?w.default.VERTEX_FORMAT:b.default.MaterialSupport.TEXTURED.vertexFormat,n.radii=t.radii.getValue(m.a.MINIMUM_VALUE,n.radii),n.innerRadii=M.default.getValueOrUndefined(t.innerRadii,n.radii),n.minimumClock=M.default.getValueOrUndefined(t.minimumClock,m.a.MINIMUM_VALUE),n.maximumClock=M.default.getValueOrUndefined(t.maximumClock,m.a.MINIMUM_VALUE),n.minimumCone=M.default.getValueOrUndefined(t.minimumCone,m.a.MINIMUM_VALUE),n.maximumCone=M.default.getValueOrUndefined(t.maximumCone,m.a.MINIMUM_VALUE),n.stackPartitions=M.default.getValueOrUndefined(t.stackPartitions,m.a.MINIMUM_VALUE),n.slicePartitions=M.default.getValueOrUndefined(t.slicePartitions,m.a.MINIMUM_VALUE),n.subdivisions=M.default.getValueOrUndefined(t.subdivisions,m.a.MINIMUM_VALUE),n.offsetAttribute=i!==y.a.NONE?p.a.ALL:void 0},F.prototype._onEntityPropertyChanged=C.a,F.DynamicGeometryUpdater=k,Object(l.default)(Object.create)&&(k.prototype=Object.create(T.a.prototype),k.prototype.constructor=k),k.prototype.update=function(e){a.a.defined("time",e);var t=this._entity,i=t.ellipsoid;if(!t.isShowing||!t.isAvailable(e)||!M.default.getValueOrDefault(i.show,e,!0))return Object(l.default)(this._primitive)&&(this._primitive.show=!1),void(Object(l.default)(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var c=M.default.getValueOrUndefined(i.radii,e,L),f=Object(l.default)(c)?t.computeModelMatrixForHeightReference(e,i.heightReference,.5*c.z,this._scene.mapProjection.ellipsoid,this._modelMatrix):void 0;if(!Object(l.default)(f)||!Object(l.default)(c))return Object(l.default)(this._primitive)&&(this._primitive.show=!1),void(Object(l.default)(this._outlinePrimitive)&&(this._outlinePrimitive.show=!1));var h=M.default.getValueOrDefault(i.fill,e,!0),m=M.default.getValueOrDefault(i.outline,e,!1),A=M.default.getValueOrClonedDefault(i.outlineColor,e,r.default.BLACK,R),T=S.default.getValue(e,Object(s.default)(i.material,D),this._material),E=M.default.getValueOrUndefined(i.innerRadii,e,j),C=M.default.getValueOrUndefined(i.minimumClock,e),B=M.default.getValueOrUndefined(i.maximumClock,e),F=M.default.getValueOrUndefined(i.minimumCone,e),k=M.default.getValueOrUndefined(i.maximumCone,e),z=M.default.getValueOrUndefined(i.stackPartitions,e),U=M.default.getValueOrUndefined(i.slicePartitions,e),V=M.default.getValueOrUndefined(i.subdivisions,e),H=M.default.getValueOrDefault(i.outlineWidth,e,1),G=M.default.getValueOrDefault(i.heightReference,e,y.a.NONE),Y=G!==y.a.NONE?p.a.ALL:void 0,W=this._scene.mode,q=W===x.default.SCENE3D&&G===y.a.NONE,X=this._options,K=this._geometryUpdater.shadowsProperty.getValue(e),J=this._geometryUpdater.distanceDisplayConditionProperty.getValue(e),Z=M.default.getValueOrDefault(this._geometryUpdater.terrainOffsetProperty,e,P,I);if(!q||this._lastSceneMode!==W||!Object(l.default)(this._primitive)||X.stackPartitions!==z||X.slicePartitions!==U||Object(l.default)(E)&&!n.default.equals(X.innerRadii!==E)||X.minimumClock!==C||X.maximumClock!==B||X.minimumCone!==F||X.maximumCone!==k||X.subdivisions!==V||this._lastOutlineWidth!==H||X.offsetAttribute!==Y){var Q=this._primitives;if(Q.removeAndDestroy(this._primitive),Q.removeAndDestroy(this._outlinePrimitive),this._primitive=void 0,this._outlinePrimitive=void 0,this._lastSceneMode=W,this._lastOutlineWidth=H,X.stackPartitions=z,X.slicePartitions=U,X.subdivisions=V,X.offsetAttribute=Y,X.radii=n.default.clone(q?N:c,X.radii),Object(l.default)(E))if(q){var $=n.default.magnitude(c);X.innerRadii=n.default.fromElements(E.x/$,E.y/$,E.z/$,X.innerRadii)}else X.innerRadii=n.default.clone(E,X.innerRadii);else X.innerRadii=void 0;X.minimumClock=C,X.maximumClock=B,X.minimumCone=F,X.maximumCone=k;var ee=new b.default({material:T,translucent:T.isTranslucent(),closed:!0});X.vertexFormat=ee.vertexFormat;var te=this._geometryUpdater.createFillGeometryInstance(e,q,this._modelMatrix);this._primitive=Q.add(new O.default({geometryInstances:te,appearance:ee,asynchronous:!1,shadows:K}));var ie=this._geometryUpdater.createOutlineGeometryInstance(e,q,this._modelMatrix);this._outlinePrimitive=Q.add(new O.default({geometryInstances:ie,appearance:new w.default({flat:!0,translucent:255!==ie.attributes.color.value[3],renderState:{lineWidth:this._geometryUpdater._scene.clampLineWidth(H)}}),asynchronous:!1,shadows:K})),this._lastShow=h,this._lastOutlineShow=m,this._lastOutlineColor=r.default.clone(A,this._lastOutlineColor),this._lastDistanceDisplayCondition=J,this._lastOffset=n.default.clone(Z,this._lastOffset)}else if(this._primitive.ready){var ne=this._primitive,ae=this._outlinePrimitive;ne.show=!0,ae.show=!0,ne.appearance.material=T;var re=this._attributes;Object(l.default)(re)||(re=ne.getGeometryInstanceAttributes(t),this._attributes=re),h!==this._lastShow&&(re.show=v.default.toValue(h,re.show),this._lastShow=h);var oe=this._outlineAttributes;Object(l.default)(oe)||(oe=ae.getGeometryInstanceAttributes(t),this._outlineAttributes=oe),m!==this._lastOutlineShow&&(oe.show=v.default.toValue(m,oe.show),this._lastOutlineShow=m),r.default.equals(A,this._lastOutlineColor)||(oe.color=o.default.toValue(A,oe.color),r.default.clone(A,this._lastOutlineColor)),u.default.equals(J,this._lastDistanceDisplayCondition)||(re.distanceDisplayCondition=d.a.toValue(J,re.distanceDisplayCondition),oe.distanceDisplayCondition=d.a.toValue(J,oe.distanceDisplayCondition),u.default.clone(J,this._lastDistanceDisplayCondition)),n.default.equals(Z,this._lastOffset)||(re.offset=g.a.toValue(Z,re.offset),oe.offset=g.a.toValue(Z,re.offset),n.default.clone(Z,this._lastOffset))}q&&(c.x=Math.max(c.x,.001),c.y=Math.max(c.y,.001),c.z=Math.max(c.z,.001),f=_.default.multiplyByScale(f,c,f),this._primitive.modelMatrix=f,this._outlinePrimitive.modelMatrix=f)},t.a=F},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(7),o=i(53),s=i(0),l=i(3),u=i(96),d=i(43),c=i(40),f=i(5),h=i(12),p=i(6),m=i(497),_=i(498),g=i(87),v=i(117),y=i(61),b=i(63),w=i(112),O=i(110),x=i(9),A=new n.default,T=new r.default;function E(e){this.id=e,this.vertexFormat=void 0,this.plane=void 0,this.dimensions=void 0}function C(e,t){O.a.call(this,{entity:e,scene:t,geometryOptions:new E(e),geometryPropertyName:"plane",observedPropertyNames:["availability","position","orientation","plane"]}),this._onEntityPropertyChanged(e,"plane",e.plane,void 0)}function S(e,t,i){w.a.call(this,e,t,i)}Object(s.default)(Object.create)&&(C.prototype=Object.create(O.a.prototype),C.prototype.constructor=C),C.prototype.createFillGeometryInstance=function(e){if(a.a.defined("time",e),!this._fillEnabled)throw new l.default("This instance does not represent a filled geometry.");var t,i,n=this._entity,c=n.isAvailable(e),f=new g.default(c&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),h=this._distanceDisplayConditionProperty.getValue(e),p=u.a.fromDistanceDisplayCondition(h);this._materialProperty instanceof b.a?(Object(s.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||c)&&(i=this._materialProperty.color.getValue(e,T)),Object(s.default)(i)||(i=r.default.WHITE),t={show:f,distanceDisplayCondition:p,color:o.default.fromColor(i)}):t={show:f,distanceDisplayCondition:p};var _=n.plane,v=this._options,y=n.computeModelMatrix(e),w=x.default.getValueOrDefault(_.plane,e,v.plane),O=x.default.getValueOrUndefined(_.dimensions,e,v.dimensions);return v.plane=w,v.dimensions=O,y=N(w,O,y,y),new d.default({id:n,geometry:new m.default(this._options),modelMatrix:y,attributes:t})},C.prototype.createOutlineGeometryInstance=function(e){if(a.a.defined("time",e),!this._outlineEnabled)throw new l.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=x.default.getValueOrDefault(this._outlineColorProperty,e,r.default.BLACK,T),s=this._distanceDisplayConditionProperty.getValue(e),c=t.plane,f=this._options,h=t.computeModelMatrix(e),p=x.default.getValueOrDefault(c.plane,e,f.plane),m=x.default.getValueOrUndefined(c.dimensions,e,f.dimensions);return f.plane=p,f.dimensions=m,h=N(p,m,h,h),new d.default({id:t,geometry:new _.default,modelMatrix:h,attributes:{show:new g.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:o.default.fromColor(n),distanceDisplayCondition:u.a.fromDistanceDisplayCondition(s)}})},C.prototype._isHidden=function(e,t){return!Object(s.default)(t.plane)||!Object(s.default)(t.dimensions)||!Object(s.default)(e.position)||O.a.prototype._isHidden.call(this,e,t)},C.prototype._getIsClosed=function(e){return!1},C.prototype._isDynamic=function(e,t){return!(e.position.isConstant&&x.default.isConstant(e.orientation)&&t.plane.isConstant&&t.dimensions.isConstant&&x.default.isConstant(t.outlineWidth))},C.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof b.a,n=this._options;n.vertexFormat=i?y.default.VERTEX_FORMAT:v.default.MaterialSupport.TEXTURED.vertexFormat,n.plane=t.plane.getValue(c.a.MINIMUM_VALUE,n.plane),n.dimensions=t.dimensions.getValue(c.a.MINIMUM_VALUE,n.dimensions)},C.DynamicGeometryUpdater=S,Object(s.default)(Object.create)&&(S.prototype=Object.create(w.a.prototype),S.prototype.constructor=S),S.prototype._isHidden=function(e,t,i){var n=this._options,a=x.default.getValueOrUndefined(e.position,i,A);return!Object(s.default)(a)||!Object(s.default)(n.plane)||!Object(s.default)(n.dimensions)||w.a.prototype._isHidden.call(this,e,t,i)},S.prototype._setOptions=function(e,t,i){var n=this._options;n.plane=x.default.getValueOrDefault(t.plane,i,n.plane),n.dimensions=x.default.getValueOrUndefined(t.dimensions,i,n.dimensions)};var M=new n.default,D=new n.default,P=new n.default,I=new n.default,L=new h.default,j=new h.default,R=new p.default;function N(e,t,i,a){var r=e.normal,o=e.distance,s=n.default.multiplyByScalar(r,-o,P),l=n.default.clone(n.default.UNIT_Z,D);f.default.equalsEpsilon(Math.abs(n.default.dot(l,r)),1,f.default.EPSILON8)&&(l=n.default.clone(n.default.UNIT_Y,l));var u=n.default.cross(l,r,M);l=n.default.cross(r,u,l),n.default.normalize(u,u),n.default.normalize(l,l);var d=L;h.default.setColumn(d,0,u,d),h.default.setColumn(d,1,l,d),h.default.setColumn(d,2,r,d);var c=n.default.fromElements(t.x,t.y,1,I),m=h.default.multiplyByScale(d,c,j),_=p.default.fromRotationTranslation(m,s,R);return p.default.multiplyTransformation(i,_,a)}C.createPrimitiveMatrix=N,t.a=C},function(e,t,i){"use strict";var n=i(116),a=i(54),r=i(8),o=i(1),s=i(4),l=i(7),u=i(53),d=i(842),c=i(294),f=i(0),h=i(3),p=i(96),m=i(218),_=i(43),g=i(40),v=i(138),y=i(70),b=i(302),w=i(843),O=i(21),x=i(87),A=i(42),T=i(117),E=i(61),C=i(63),S=i(112),M=i(110),D=i(101),P=i(9),I=new l.default,L=o.default.ZERO,j=new o.default,R=new O.default,N=[],B=new r.default;function F(e){this.id=e,this.vertexFormat=void 0,this.polygonHierarchy=void 0,this.perPositionHeight=void 0,this.closeTop=void 0,this.closeBottom=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.offsetAttribute=void 0,this.arcType=void 0}function k(e,t){D.a.call(this,{entity:e,scene:t,geometryOptions:new F(e),geometryPropertyName:"polygon",observedPropertyNames:["availability","polygon"]}),this._onEntityPropertyChanged(e,"polygon",e.polygon,void 0)}function z(e,t,i){S.a.call(this,e,t,i)}Object(f.default)(Object.create)&&(k.prototype=Object.create(D.a.prototype),k.prototype.constructor=k),k.prototype.createFillGeometryInstance=function(e){if(s.a.defined("time",e),!this._fillEnabled)throw new h.default("This instance does not represent a filled geometry.");var t,i,n=this._entity,a=n.isAvailable(e),r=this._options,o={show:new x.default(a&&n.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:p.a.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof C.a&&(Object(f.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||a)&&(t=this._materialProperty.color.getValue(e,I)),Object(f.default)(t)||(t=l.default.WHITE),o.color=u.default.fromColor(t));return Object(f.default)(r.offsetAttribute)&&(o.offset=v.a.fromCartesian3(P.default.getValueOrDefault(this._terrainOffsetProperty,e,L,j))),i=r.perPositionHeight&&!Object(f.default)(r.extrudedHeight)?new d.a(r):new b.default(r),new _.default({id:n,geometry:i,attributes:o})},k.prototype.createOutlineGeometryInstance=function(e){if(s.a.defined("time",e),!this._outlineEnabled)throw new h.default("This instance does not represent an outlined geometry.");var t,i=this._entity,n=i.isAvailable(e),a=this._options,r=P.default.getValueOrDefault(this._outlineColorProperty,e,l.default.BLACK,I),o=this._distanceDisplayConditionProperty.getValue(e),d={show:new x.default(n&&i.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:u.default.fromColor(r),distanceDisplayCondition:p.a.fromDistanceDisplayCondition(o),offset:void 0};return Object(f.default)(a.offsetAttribute)&&(d.offset=v.a.fromCartesian3(P.default.getValueOrDefault(this._terrainOffsetProperty,e,L,j))),t=a.perPositionHeight&&!Object(f.default)(a.extrudedHeight)?new c.a(a):new w.a(a),new _.default({id:i,geometry:t,attributes:d})},k.prototype._computeCenter=function(e,t){var i=P.default.getValueOrUndefined(this._entity.polygon.hierarchy,e);if(Object(f.default)(i)){var n=i.positions;if(0!==n.length){for(var a=this._scene.mapProjection.ellipsoid,o=m.a.fromPoints(n,a),s=o.projectPointsOntoPlane(n,N),l=s.length,u=0,d=l-1,c=new r.default,h=0;h<l;d=h++){var p=s[h],_=s[d],g=p.x*_.y-_.x*p.y,v=r.default.add(p,_,B);v=r.default.multiplyByScalar(v,g,v),c=r.default.add(c,v,c),u+=g}var y=1/(3*u);return c=r.default.multiplyByScalar(c,y,c),o.projectPointOntoEllipsoid(c,t)}}},k.prototype._isHidden=function(e,t){return!Object(f.default)(t.hierarchy)||M.a.prototype._isHidden.call(this,e,t)},k.prototype._isOnTerrain=function(e,t){var i=D.a.prototype._isOnTerrain.call(this,e,t),n=t.perPositionHeight,a=Object(f.default)(n)&&(!n.isConstant||n.getValue(g.a.MINIMUM_VALUE));return i&&!a},k.prototype._isDynamic=function(e,t){return!t.hierarchy.isConstant||!P.default.isConstant(t.height)||!P.default.isConstant(t.extrudedHeight)||!P.default.isConstant(t.granularity)||!P.default.isConstant(t.stRotation)||!P.default.isConstant(t.outlineWidth)||!P.default.isConstant(t.perPositionHeight)||!P.default.isConstant(t.closeTop)||!P.default.isConstant(t.closeBottom)||!P.default.isConstant(t.zIndex)||!P.default.isConstant(t.arcType)||this._onTerrain&&!P.default.isConstant(this._materialProperty)&&!(this._materialProperty instanceof C.a)},k.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof C.a,r=this._options;r.vertexFormat=i?E.default.VERTEX_FORMAT:T.default.MaterialSupport.TEXTURED.vertexFormat;var o,s=t.hierarchy.getValue(g.a.MINIMUM_VALUE),l=P.default.getValueOrUndefined(t.height,g.a.MINIMUM_VALUE),u=P.default.getValueOrDefault(t.heightReference,g.a.MINIMUM_VALUE,A.a.NONE),d=P.default.getValueOrUndefined(t.extrudedHeight,g.a.MINIMUM_VALUE),c=P.default.getValueOrDefault(t.extrudedHeightReference,g.a.MINIMUM_VALUE,A.a.NONE),h=P.default.getValueOrDefault(t.perPositionHeight,g.a.MINIMUM_VALUE,!1);l=D.a.getGeometryHeight(l,u),h?(Object(f.default)(l)&&(l=void 0,Object(y.a)("Entity polygons cannot have both height and perPositionHeight. height will be ignored")),u!==A.a.NONE&&h&&(l=void 0,Object(y.a)("heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored"))):(Object(f.default)(d)&&!Object(f.default)(l)&&(l=0),o=D.a.computeGeometryOffsetAttribute(l,u,d,c)),r.polygonHierarchy=s,r.granularity=P.default.getValueOrUndefined(t.granularity,g.a.MINIMUM_VALUE),r.stRotation=P.default.getValueOrUndefined(t.stRotation,g.a.MINIMUM_VALUE),r.perPositionHeight=h,r.closeTop=P.default.getValueOrDefault(t.closeTop,g.a.MINIMUM_VALUE,!0),r.closeBottom=P.default.getValueOrDefault(t.closeBottom,g.a.MINIMUM_VALUE,!0),r.offsetAttribute=o,r.height=l,r.arcType=P.default.getValueOrDefault(t.arcType,g.a.MINIMUM_VALUE,a.default.GEODESIC),(d=D.a.getGeometryExtrudedHeight(d,c))===D.a.CLAMP_TO_GROUND&&(d=n.a.getMinimumMaximumHeights(b.default.computeRectangle(r,R)).minimumTerrainHeight),r.extrudedHeight=d},k.prototype._getIsClosed=function(e){var t=e.height,i=e.extrudedHeight,n=Object(f.default)(i)&&i!==t;return!e.perPositionHeight&&(!n&&0===t||n&&e.closeTop&&e.closeBottom)},k.DynamicGeometryUpdater=z,Object(f.default)(Object.create)&&(z.prototype=Object.create(S.a.prototype),z.prototype.constructor=z),z.prototype._isHidden=function(e,t,i){return!Object(f.default)(this._options.polygonHierarchy)||S.a.prototype._isHidden.call(this,e,t,i)},z.prototype._setOptions=function(e,t,i){var r=this._options;r.polygonHierarchy=P.default.getValueOrUndefined(t.hierarchy,i);var o,s=P.default.getValueOrUndefined(t.height,i),l=P.default.getValueOrDefault(t.heightReference,i,A.a.NONE),u=P.default.getValueOrDefault(t.extrudedHeightReference,i,A.a.NONE),d=P.default.getValueOrUndefined(t.extrudedHeight,i),c=P.default.getValueOrUndefined(t.perPositionHeight,i);s=D.a.getGeometryHeight(s,u),c?(Object(f.default)(s)&&(s=void 0,Object(y.a)("Entity polygons cannot have both height and perPositionHeight. height will be ignored")),l!==A.a.NONE&&c&&(s=void 0,Object(y.a)("heightReference is not supported for entity polygons with perPositionHeight. heightReference will be ignored"))):(Object(f.default)(d)&&!Object(f.default)(s)&&(s=0),o=D.a.computeGeometryOffsetAttribute(s,l,d,u)),r.granularity=P.default.getValueOrUndefined(t.granularity,i),r.stRotation=P.default.getValueOrUndefined(t.stRotation,i),r.perPositionHeight=P.default.getValueOrUndefined(t.perPositionHeight,i),r.closeTop=P.default.getValueOrDefault(t.closeTop,i,!0),r.closeBottom=P.default.getValueOrDefault(t.closeBottom,i,!0),r.offsetAttribute=o,r.height=s,r.arcType=P.default.getValueOrDefault(t.arcType,i,a.default.GEODESIC),(d=D.a.getGeometryExtrudedHeight(d,u))===D.a.CLAMP_TO_GROUND&&(d=n.a.getMinimumMaximumHeights(b.default.computeRectangle(r,R)).minimumTerrainHeight),r.extrudedHeight=d},t.a=k},function(e,t,i){"use strict";var n=i(149),a=i(41),r=i(17),o=i(8),s=i(1),l=i(4),u=i(11),d=i(378),c=i(2),f=i(0),h=i(15),p=i(46),m=i(28),_=i(82),g=i(43),v=i(95),y=i(38),b=i(5),w=i(12),O=i(121),x=i(111),A=i(35),T=i(27),E=i(29),C=new s.default,S=new a.a,M=new o.default,D=new o.default,P=new s.default,I=new s.default,L=new s.default,j=new s.default,R=new s.default,N=new s.default,B=new T.default,F=new w.default,k=new w.default,z=new s.default;function U(e,t,i,n,a,r,l,d){var c=e.positions,f=x.a.triangulate(e.positions2D,e.holes);f.length<3&&(f=[0,1,2]);var h=y.a.createTypedArray(c.length,f.length);h.set(f);var g=F;if(0!==n){var v=T.default.fromAxisAngle(r,n,B);if(g=w.default.fromQuaternion(v,g),t.tangent||t.bitangent){v=T.default.fromAxisAngle(r,-n,B);var O=w.default.fromQuaternion(v,k);l=s.default.normalize(w.default.multiplyByVector(O,l,l),l),t.bitangent&&(d=s.default.normalize(s.default.cross(r,l,d),d))}}else g=w.default.clone(w.default.IDENTITY,g);var E=D;t.st&&(E.x=i.x,E.y=i.y);for(var S=c.length,P=3*S,I=new Float64Array(P),L=t.normal?new Float32Array(P):void 0,j=t.tangent?new Float32Array(P):void 0,R=t.bitangent?new Float32Array(P):void 0,N=t.st?new Float32Array(2*S):void 0,z=0,U=0,V=0,H=0,G=0,Y=0;Y<S;Y++){var W=c[Y];if(I[z++]=W.x,I[z++]=W.y,I[z++]=W.z,t.st){var q=a(w.default.multiplyByVector(g,W,C),M);o.default.subtract(q,E,q);var X=b.default.clamp(q.x/i.width,0,1),K=b.default.clamp(q.y/i.height,0,1);N[G++]=X,N[G++]=K}t.normal&&(L[U++]=r.x,L[U++]=r.y,L[U++]=r.z),t.tangent&&(j[H++]=l.x,j[H++]=l.y,j[H++]=l.z),t.bitangent&&(R[V++]=d.x,R[V++]=d.y,R[V++]=d.z)}var J=new _.a;return t.position&&(J.position=new m.default({componentDatatype:u.default.DOUBLE,componentsPerAttribute:3,values:I})),t.normal&&(J.normal=new m.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:L})),t.tangent&&(J.tangent=new m.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:j})),t.bitangent&&(J.bitangent=new m.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:3,values:R})),t.st&&(J.st=new m.default({componentDatatype:u.default.FLOAT,componentsPerAttribute:2,values:N})),new p.default({attributes:J,indices:h,primitiveType:A.default.TRIANGLES})}function V(e){var t=(e=Object(c.default)(e,c.default.EMPTY_OBJECT)).polygonHierarchy;l.a.defined("options.polygonHierarchy",t);var i=Object(c.default)(e.vertexFormat,E.a.DEFAULT);this._vertexFormat=E.a.clone(i),this._polygonHierarchy=t,this._stRotation=Object(c.default)(e.stRotation,0),this._ellipsoid=h.default.clone(Object(c.default)(e.ellipsoid,h.default.WGS84)),this._workerName="createCoplanarPolygonGeometry",this.packedLength=O.a.computeHierarchyPackedLength(t)+E.a.packedLength+h.default.packedLength+2}V.fromPositions=function(e){return e=Object(c.default)(e,c.default.EMPTY_OBJECT),l.a.defined("options.positions",e.positions),new V({polygonHierarchy:{positions:e.positions},vertexFormat:e.vertexFormat,stRotation:e.stRotation,ellipsoid:e.ellipsoid})},V.pack=function(e,t,i){return l.a.typeOf.object("value",e),l.a.defined("array",t),i=Object(c.default)(i,0),i=O.a.packPolygonHierarchy(e._polygonHierarchy,t,i),h.default.pack(e._ellipsoid,t,i),i+=h.default.packedLength,E.a.pack(e._vertexFormat,t,i),i+=E.a.packedLength,t[i++]=e._stRotation,t[i]=e.packedLength,t};var H=h.default.clone(h.default.UNIT_SPHERE),G=new E.a,Y={polygonHierarchy:{}};V.unpack=function(e,t,i){l.a.defined("array",e),t=Object(c.default)(t,0);var n=O.a.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var a=h.default.unpack(e,t,H);t+=h.default.packedLength;var r=E.a.unpack(e,t,G);t+=E.a.packedLength;var o=e[t++],s=e[t];return Object(f.default)(i)||(i=new V(Y)),i._polygonHierarchy=n,i._ellipsoid=h.default.clone(a,i._ellipsoid),i._vertexFormat=E.a.clone(r,i._vertexFormat),i._stRotation=o,i.packedLength=s,i},V.createGeometry=function(e){var t=e._vertexFormat,i=e._polygonHierarchy,a=e._stRotation,o=i.positions;if(!((o=Object(n.a)(o,s.default.equalsEpsilon,!0)).length<3)){var l=P,u=I,c=L,f=R,h=N;if(d.a.computeProjectTo2DArguments(o,j,f,h)){if(l=s.default.cross(f,h,l),l=s.default.normalize(l,l),!s.default.equalsEpsilon(j,s.default.ZERO,b.default.EPSILON6)){var m=e._ellipsoid.geodeticSurfaceNormal(j,z);s.default.dot(l,m)<0&&(l=s.default.negate(l,l),f=s.default.negate(f,f))}var _=d.a.createProjectPointsTo2DFunction(j,f,h),w=d.a.createProjectPointTo2DFunction(j,f,h);t.tangent&&(u=s.default.clone(f,u)),t.bitangent&&(c=s.default.clone(h,c));var x=O.a.polygonsFromHierarchy(i,_,!1),A=x.hierarchy,T=x.polygons;if(0!==A.length){o=A[0].outerRing;for(var E=r.default.fromPoints(o),C=O.a.computeBoundingRectangle(l,w,o,a,S),M=[],D=0;D<T.length;D++){var B=new g.default({geometry:U(T[D],t,C,a,w,l,u,c)});M.push(B)}var F=v.a.combineInstances(M)[0];F.attributes.position.values=new Float64Array(F.attributes.position.values),F.indices=y.a.createTypedArray(F.attributes.position.values.length/3,F.indices);var k=F.attributes;return t.position||delete k.position,new p.default({attributes:k,indices:F.indices,primitiveType:F.primitiveType,boundingSphere:E})}}}},t.a=V},function(e,t,i){"use strict";var n=i(54),a=i(68),r=i(17),o=i(4),s=i(11),l=i(2),u=i(0),d=i(3),c=i(15),f=i(218),h=i(46),p=i(28),m=i(82),_=i(43),g=i(71),v=i(95),y=i(38),b=i(5),w=i(121),O=i(111),x=i(35),A=i(187),T=[],E=[];function C(e,t,i,a,r){var o,l,u=f.a.fromPoints(t,e).projectPointsOntoPlane(t,T);O.a.computeWindingOrder2D(u)===A.a.CLOCKWISE&&(u.reverse(),t=t.slice().reverse());var d=t.length,c=0;if(a)for(o=new Float64Array(2*d*3),l=0;l<d;l++){var g=t[l],v=t[(l+1)%d];o[c++]=g.x,o[c++]=g.y,o[c++]=g.z,o[c++]=v.x,o[c++]=v.y,o[c++]=v.z}else{var b=0;if(r===n.default.GEODESIC)for(l=0;l<d;l++)b+=w.a.subdivideLineCount(t[l],t[(l+1)%d],i);else if(r===n.default.RHUMB)for(l=0;l<d;l++)b+=w.a.subdivideRhumbLineCount(e,t[l],t[(l+1)%d],i);for(o=new Float64Array(3*b),l=0;l<d;l++){var C;r===n.default.GEODESIC?C=w.a.subdivideLine(t[l],t[(l+1)%d],i,E):r===n.default.RHUMB&&(C=w.a.subdivideRhumbLine(e,t[l],t[(l+1)%d],i,E));for(var S=C.length,M=0;M<S;++M)o[c++]=C[M]}}var D=2*(d=o.length/3),P=y.a.createTypedArray(d,D);for(c=0,l=0;l<d-1;l++)P[c++]=l,P[c++]=l+1;return P[c++]=d-1,P[c++]=0,new _.default({geometry:new h.default({attributes:new m.a({position:new p.default({componentDatatype:s.default.DOUBLE,componentsPerAttribute:3,values:o})}),indices:P,primitiveType:x.default.LINES})})}function S(e,t,i,a,r){var o,l,u=f.a.fromPoints(t,e).projectPointsOntoPlane(t,T);O.a.computeWindingOrder2D(u)===A.a.CLOCKWISE&&(u.reverse(),t=t.slice().reverse());var d=t.length,c=new Array(d),g=0;if(a)for(o=new Float64Array(2*d*3*2),l=0;l<d;++l){c[l]=g/3;var v=t[l],b=t[(l+1)%d];o[g++]=v.x,o[g++]=v.y,o[g++]=v.z,o[g++]=b.x,o[g++]=b.y,o[g++]=b.z}else{var C=0;if(r===n.default.GEODESIC)for(l=0;l<d;l++)C+=w.a.subdivideLineCount(t[l],t[(l+1)%d],i);else if(r===n.default.RHUMB)for(l=0;l<d;l++)C+=w.a.subdivideRhumbLineCount(e,t[l],t[(l+1)%d],i);for(o=new Float64Array(3*C*2),l=0;l<d;++l){var S;c[l]=g/3,r===n.default.GEODESIC?S=w.a.subdivideLine(t[l],t[(l+1)%d],i,E):r===n.default.RHUMB&&(S=w.a.subdivideRhumbLine(e,t[l],t[(l+1)%d],i,E));for(var M=S.length,D=0;D<M;++D)o[g++]=S[D]}}d=o.length/6;var P=c.length,I=2*(2*d+P),L=y.a.createTypedArray(d+P,I);for(g=0,l=0;l<d;++l)L[g++]=l,L[g++]=(l+1)%d,L[g++]=l+d,L[g++]=(l+1)%d+d;for(l=0;l<P;l++){var j=c[l];L[g++]=j,L[g++]=j+d}return new _.default({geometry:new h.default({attributes:new m.a({position:new p.default({componentDatatype:s.default.DOUBLE,componentsPerAttribute:3,values:o})}),indices:L,primitiveType:x.default.LINES})})}function M(e){if(o.a.typeOf.object("options",e),o.a.typeOf.object("options.polygonHierarchy",e.polygonHierarchy),e.perPositionHeight&&Object(u.default)(e.height))throw new d.default("Cannot use both options.perPositionHeight and options.height");if(Object(u.default)(e.arcType)&&e.arcType!==n.default.GEODESIC&&e.arcType!==n.default.RHUMB)throw new d.default("Invalid arcType. Valid options are ArcType.GEODESIC and ArcType.RHUMB.");var t=e.polygonHierarchy,i=Object(l.default)(e.ellipsoid,c.default.WGS84),a=Object(l.default)(e.granularity,b.default.RADIANS_PER_DEGREE),r=Object(l.default)(e.perPositionHeight,!1),s=r&&Object(u.default)(e.extrudedHeight),f=Object(l.default)(e.arcType,n.default.GEODESIC),h=Object(l.default)(e.height,0),p=Object(l.default)(e.extrudedHeight,h);if(!s){var m=Math.max(h,p);p=Math.min(h,p),h=m}this._ellipsoid=c.default.clone(i),this._granularity=a,this._height=h,this._extrudedHeight=p,this._arcType=f,this._polygonHierarchy=t,this._perPositionHeight=r,this._perPositionHeightExtrude=s,this._offsetAttribute=e.offsetAttribute,this._workerName="createPolygonOutlineGeometry",this.packedLength=w.a.computeHierarchyPackedLength(t)+c.default.packedLength+8}M.pack=function(e,t,i){return o.a.typeOf.object("value",e),o.a.defined("array",t),i=Object(l.default)(i,0),i=w.a.packPolygonHierarchy(e._polygonHierarchy,t,i),c.default.pack(e._ellipsoid,t,i),i+=c.default.packedLength,t[i++]=e._height,t[i++]=e._extrudedHeight,t[i++]=e._granularity,t[i++]=e._perPositionHeightExtrude?1:0,t[i++]=e._perPositionHeight?1:0,t[i++]=e._arcType,t[i++]=Object(l.default)(e._offsetAttribute,-1),t[i]=e.packedLength,t};var D=c.default.clone(c.default.UNIT_SPHERE),P={polygonHierarchy:{}};M.unpack=function(e,t,i){o.a.defined("array",e),t=Object(l.default)(t,0);var n=w.a.unpackPolygonHierarchy(e,t);t=n.startingIndex,delete n.startingIndex;var a=c.default.unpack(e,t,D);t+=c.default.packedLength;var r=e[t++],s=e[t++],d=e[t++],f=1===e[t++],h=1===e[t++],p=e[t++],m=e[t++],_=e[t];return Object(u.default)(i)||(i=new M(P)),i._polygonHierarchy=n,i._ellipsoid=c.default.clone(a,i._ellipsoid),i._height=r,i._extrudedHeight=s,i._granularity=d,i._perPositionHeight=h,i._perPositionHeightExtrude=f,i._arcType=p,i._offsetAttribute=-1===m?void 0:m,i.packedLength=_,i},M.fromPositions=function(e){return e=Object(l.default)(e,l.default.EMPTY_OBJECT),o.a.defined("options.positions",e.positions),new M({polygonHierarchy:{positions:e.positions},height:e.height,extrudedHeight:e.extrudedHeight,ellipsoid:e.ellipsoid,granularity:e.granularity,perPositionHeight:e.perPositionHeight,arcType:e.arcType,offsetAttribute:e.offsetAttribute})},M.createGeometry=function(e){var t=e._ellipsoid,i=e._granularity,n=e._polygonHierarchy,o=e._perPositionHeight,l=e._arcType,d=w.a.polygonOutlinesFromHierarchy(n,!o,t);if(0!==d.length){var c,f,m,_=[],y=b.default.chordLength(i,t.maximumRadius),x=e._height,A=e._extrudedHeight;if(e._perPositionHeightExtrude||!b.default.equalsEpsilon(x,A,0,b.default.EPSILON2))for(m=0;m<d.length;m++){if((c=S(t,d[m],y,o,l)).geometry=w.a.scaleToGeodeticHeightExtruded(c.geometry,x,A,t,o),Object(u.default)(e._offsetAttribute)){var T=c.geometry.attributes.position.values.length/3,E=new Uint8Array(T);e._offsetAttribute===g.a.TOP?E=Object(a.a)(E,1,0,T/2):(f=e._offsetAttribute===g.a.NONE?0:1,E=Object(a.a)(E,f)),c.geometry.attributes.applyOffset=new p.default({componentDatatype:s.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:E})}_.push(c)}else for(m=0;m<d.length;m++){if((c=C(t,d[m],y,o,l)).geometry.attributes.position.values=O.a.scaleToGeodeticHeight(c.geometry.attributes.position.values,x,t,!o),Object(u.default)(e._offsetAttribute)){var M=c.geometry.attributes.position.values.length,D=new Uint8Array(M/3);f=e._offsetAttribute===g.a.NONE?0:1,Object(a.a)(D,f),c.geometry.attributes.applyOffset=new p.default({componentDatatype:s.default.UNSIGNED_BYTE,componentsPerAttribute:1,values:D})}_.push(c)}var P=v.a.combineInstances(_)[0],I=r.default.fromVertices(P.attributes.position.values);return new h.default({attributes:P.attributes,indices:P.indices,primitiveType:P.primitiveType,boundingSphere:I,offsetAttribute:e._offsetAttribute})}},t.a=M},function(e,t,i){"use strict";var n=i(4),a=i(7),r=i(53),o=i(0),s=i(3),l=i(96),u=i(43),d=i(40),c=i(845),f=i(846),h=i(87),p=i(117),m=i(61),_=i(63),g=i(112),v=i(110),y=i(9),b=new a.default;function w(e){this.id=e,this.vertexFormat=void 0,this.polylinePositions=void 0,this.shapePositions=void 0,this.cornerType=void 0,this.granularity=void 0}function O(e,t){v.a.call(this,{entity:e,scene:t,geometryOptions:new w(e),geometryPropertyName:"polylineVolume",observedPropertyNames:["availability","polylineVolume"]}),this._onEntityPropertyChanged(e,"polylineVolume",e.polylineVolume,void 0)}function x(e,t,i){g.a.call(this,e,t,i)}Object(o.default)(Object.create)&&(O.prototype=Object.create(v.a.prototype),O.prototype.constructor=O),O.prototype.createFillGeometryInstance=function(e){if(n.a.defined("time",e),!this._fillEnabled)throw new s.default("This instance does not represent a filled geometry.");var t,i,d=this._entity,f=d.isAvailable(e),p=new h.default(f&&d.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),m=this._distanceDisplayConditionProperty.getValue(e),g=l.a.fromDistanceDisplayCondition(m);this._materialProperty instanceof _.a?(Object(o.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||f)&&(i=this._materialProperty.color.getValue(e,b)),Object(o.default)(i)||(i=a.default.WHITE),t={show:p,distanceDisplayCondition:g,color:r.default.fromColor(i)}):t={show:p,distanceDisplayCondition:g};return new u.default({id:d,geometry:new c.a(this._options),attributes:t})},O.prototype.createOutlineGeometryInstance=function(e){if(n.a.defined("time",e),!this._outlineEnabled)throw new s.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),o=y.default.getValueOrDefault(this._outlineColorProperty,e,a.default.BLACK,b),d=this._distanceDisplayConditionProperty.getValue(e);return new u.default({id:t,geometry:new f.a(this._options),attributes:{show:new h.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r.default.fromColor(o),distanceDisplayCondition:l.a.fromDistanceDisplayCondition(d)}})},O.prototype._isHidden=function(e,t){return!Object(o.default)(t.positions)||!Object(o.default)(t.shape)||v.a.prototype._isHidden.call(this,e,t)},O.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&t.shape.isConstant&&y.default.isConstant(t.granularity)&&y.default.isConstant(t.outlineWidth)&&y.default.isConstant(t.cornerType))},O.prototype._setStaticOptions=function(e,t){var i=t.granularity,n=t.cornerType,a=this._options,r=this._materialProperty instanceof _.a;a.vertexFormat=r?m.default.VERTEX_FORMAT:p.default.MaterialSupport.TEXTURED.vertexFormat,a.polylinePositions=t.positions.getValue(d.a.MINIMUM_VALUE,a.polylinePositions),a.shapePositions=t.shape.getValue(d.a.MINIMUM_VALUE,a.shape),a.granularity=Object(o.default)(i)?i.getValue(d.a.MINIMUM_VALUE):void 0,a.cornerType=Object(o.default)(n)?n.getValue(d.a.MINIMUM_VALUE):void 0},O.DynamicGeometryUpdater=x,Object(o.default)(Object.create)&&(x.prototype=Object.create(g.a.prototype),x.prototype.constructor=x),x.prototype._isHidden=function(e,t,i){var n=this._options;return!Object(o.default)(n.polylinePositions)||!Object(o.default)(n.shapePositions)||g.a.prototype._isHidden.call(this,e,t,i)},x.prototype._setOptions=function(e,t,i){var n=this._options;n.polylinePositions=y.default.getValueOrUndefined(t.positions,i,n.polylinePositions),n.shapePositions=y.default.getValueOrUndefined(t.shape,i),n.granularity=y.default.getValueOrUndefined(t.granularity,i),n.cornerType=y.default.getValueOrUndefined(t.cornerType,i)},t.a=O},function(e,t,i){"use strict";var n=i(149),a=i(41),r=i(17),o=i(8),s=i(1),l=i(11),u=i(131),d=i(2),c=i(0),f=i(3),h=i(15),p=i(46),m=i(28),_=i(82),g=i(95),v=i(38),y=i(5),b=i(70),w=i(111),O=i(316),x=i(35),A=i(29),T=i(187);function E(e){var t=(e=Object(d.default)(e,d.default.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!Object(c.default)(t))throw new f.default("options.polylinePositions is required.");if(!Object(c.default)(i))throw new f.default("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=h.default.clone(Object(d.default)(e.ellipsoid,h.default.WGS84)),this._cornerType=Object(d.default)(e.cornerType,u.a.ROUNDED),this._vertexFormat=A.a.clone(Object(d.default)(e.vertexFormat,A.a.DEFAULT)),this._granularity=Object(d.default)(e.granularity,y.default.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeGeometry";var n=1+t.length*s.default.packedLength;n+=1+i.length*o.default.packedLength,this.packedLength=n+h.default.packedLength+A.a.packedLength+2}E.pack=function(e,t,i){if(!Object(c.default)(e))throw new f.default("value is required");if(!Object(c.default)(t))throw new f.default("array is required");var n;i=Object(d.default)(i,0);var a=e._positions,r=a.length;for(t[i++]=r,n=0;n<r;++n,i+=s.default.packedLength)s.default.pack(a[n],t,i);var l=e._shape;for(r=l.length,t[i++]=r,n=0;n<r;++n,i+=o.default.packedLength)o.default.pack(l[n],t,i);return h.default.pack(e._ellipsoid,t,i),i+=h.default.packedLength,A.a.pack(e._vertexFormat,t,i),i+=A.a.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var C=h.default.clone(h.default.UNIT_SPHERE),S=new A.a,M={polylinePositions:void 0,shapePositions:void 0,ellipsoid:C,vertexFormat:S,cornerType:void 0,granularity:void 0};E.unpack=function(e,t,i){if(!Object(c.default)(e))throw new f.default("array is required");var n;t=Object(d.default)(t,0);var a=e[t++],r=new Array(a);for(n=0;n<a;++n,t+=s.default.packedLength)r[n]=s.default.unpack(e,t);a=e[t++];var l=new Array(a);for(n=0;n<a;++n,t+=o.default.packedLength)l[n]=o.default.unpack(e,t);var u=h.default.unpack(e,t,C);t+=h.default.packedLength;var p=A.a.unpack(e,t,S);t+=A.a.packedLength;var m=e[t++],_=e[t];return Object(c.default)(i)?(i._positions=r,i._shape=l,i._ellipsoid=h.default.clone(u,i._ellipsoid),i._vertexFormat=A.a.clone(p,i._vertexFormat),i._cornerType=m,i._granularity=_,i):(M.polylinePositions=r,M.shapePositions=l,M.cornerType=m,M.granularity=_,new E(M))};var D=new a.a;E.createGeometry=function(e){var t=e._positions,i=Object(n.a)(t,s.default.equalsEpsilon),o=e._shape;if(o=O.a.removeDuplicatesFromShape(o),!(i.length<2||o.length<3)){w.a.computeWindingOrder2D(o)===T.a.CLOCKWISE&&o.reverse();var u=a.a.fromPoints(o,D);return function(e,t,i,n){var a=new _.a;n.position&&(a.position=new m.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:e}));var o,s,u,d,c,f,h=t.length,y=e.length/3,O=(y-2*h)/(2*h),A=w.a.triangulate(t),T=(O-1)*h*6+2*A.length,E=v.a.createTypedArray(y,T),C=2*h,S=0;for(o=0;o<O-1;o++){for(s=0;s<h-1;s++)f=(u=2*s+o*h*2)+C,c=(d=u+1)+C,E[S++]=d,E[S++]=u,E[S++]=c,E[S++]=c,E[S++]=u,E[S++]=f;c=(d=(u=2*h-2+o*h*2)+1)+C,f=u+C,E[S++]=d,E[S++]=u,E[S++]=c,E[S++]=c,E[S++]=u,E[S++]=f}if(n.st||n.tangent||n.bitangent){var M,D,P=new Float32Array(2*y),I=1/(O-1),L=1/i.height,j=i.height/2,R=0;for(o=0;o<O;o++){for(M=o*I,D=L*(t[0].y+j),P[R++]=M,P[R++]=D,s=1;s<h;s++)D=L*(t[s].y+j),P[R++]=M,P[R++]=D,P[R++]=M,P[R++]=D;D=L*(t[0].y+j),P[R++]=M,P[R++]=D}for(s=0;s<h;s++)M=0,D=L*(t[s].y+j),P[R++]=M,P[R++]=D;for(s=0;s<h;s++)M=(O-1)*I,D=L*(t[s].y+j),P[R++]=M,P[R++]=D;a.st=new m.default({componentDatatype:l.default.FLOAT,componentsPerAttribute:2,values:new Float32Array(P)})}var N=y-2*h;for(o=0;o<A.length;o+=3){var B=A[o]+N,F=A[o+1]+N,k=A[o+2]+N;E[S++]=B,E[S++]=F,E[S++]=k,E[S++]=k+h,E[S++]=F+h,E[S++]=B+h}var z=new p.default({attributes:a,indices:E,boundingSphere:r.default.fromVertices(e),primitiveType:x.default.TRIANGLES});if(n.normal&&(z=g.a.computeNormal(z)),n.tangent||n.bitangent){try{z=g.a.computeTangentAndBitangent(z)}catch(e){Object(b.a)("polyline-volume-tangent-bitangent","Unable to compute tangents and bitangents for polyline volume geometry")}n.tangent||(z.attributes.tangent=void 0),n.bitangent||(z.attributes.bitangent=void 0),n.st||(z.attributes.st=void 0)}return z}(O.a.computePositions(i,o,u,e,!0),o,u,e._vertexFormat)}},t.a=E},function(e,t,i){"use strict";var n=i(149),a=i(41),r=i(17),o=i(8),s=i(1),l=i(11),u=i(131),d=i(2),c=i(0),f=i(3),h=i(15),p=i(46),m=i(28),_=i(82),g=i(38),v=i(5),y=i(111),b=i(316),w=i(35),O=i(187);function x(e){var t=(e=Object(d.default)(e,d.default.EMPTY_OBJECT)).polylinePositions,i=e.shapePositions;if(!Object(c.default)(t))throw new f.default("options.polylinePositions is required.");if(!Object(c.default)(i))throw new f.default("options.shapePositions is required.");this._positions=t,this._shape=i,this._ellipsoid=h.default.clone(Object(d.default)(e.ellipsoid,h.default.WGS84)),this._cornerType=Object(d.default)(e.cornerType,u.a.ROUNDED),this._granularity=Object(d.default)(e.granularity,v.default.RADIANS_PER_DEGREE),this._workerName="createPolylineVolumeOutlineGeometry";var n=1+t.length*s.default.packedLength;n+=1+i.length*o.default.packedLength,this.packedLength=n+h.default.packedLength+2}x.pack=function(e,t,i){if(!Object(c.default)(e))throw new f.default("value is required");if(!Object(c.default)(t))throw new f.default("array is required");var n;i=Object(d.default)(i,0);var a=e._positions,r=a.length;for(t[i++]=r,n=0;n<r;++n,i+=s.default.packedLength)s.default.pack(a[n],t,i);var l=e._shape;for(r=l.length,t[i++]=r,n=0;n<r;++n,i+=o.default.packedLength)o.default.pack(l[n],t,i);return h.default.pack(e._ellipsoid,t,i),i+=h.default.packedLength,t[i++]=e._cornerType,t[i]=e._granularity,t};var A=h.default.clone(h.default.UNIT_SPHERE),T={polylinePositions:void 0,shapePositions:void 0,ellipsoid:A,height:void 0,cornerType:void 0,granularity:void 0};x.unpack=function(e,t,i){if(!Object(c.default)(e))throw new f.default("array is required");var n;t=Object(d.default)(t,0);var a=e[t++],r=new Array(a);for(n=0;n<a;++n,t+=s.default.packedLength)r[n]=s.default.unpack(e,t);a=e[t++];var l=new Array(a);for(n=0;n<a;++n,t+=o.default.packedLength)l[n]=o.default.unpack(e,t);var u=h.default.unpack(e,t,A);t+=h.default.packedLength;var p=e[t++],m=e[t];return Object(c.default)(i)?(i._positions=r,i._shape=l,i._ellipsoid=h.default.clone(u,i._ellipsoid),i._cornerType=p,i._granularity=m,i):(T.polylinePositions=r,T.shapePositions=l,T.cornerType=p,T.granularity=m,new x(T))};var E=new a.a;x.createGeometry=function(e){var t=e._positions,i=Object(n.a)(t,s.default.equalsEpsilon),o=e._shape;if(o=b.a.removeDuplicatesFromShape(o),!(i.length<2||o.length<3)){y.a.computeWindingOrder2D(o)===O.a.CLOCKWISE&&o.reverse();var u=a.a.fromPoints(o,E);return function(e,t){var i=new _.a;i.position=new m.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:e});var n,a,o=t.length,s=i.position.values.length/3,u=e.length/3/o,d=g.a.createTypedArray(s,2*o*(u+1)),c=0,f=(n=0)*o;for(a=0;a<o-1;a++)d[c++]=a+f,d[c++]=a+f+1;for(d[c++]=o-1+f,d[c++]=f,f=(n=u-1)*o,a=0;a<o-1;a++)d[c++]=a+f,d[c++]=a+f+1;for(d[c++]=o-1+f,d[c++]=f,n=0;n<u-1;n++){var h=o*n,v=h+o;for(a=0;a<o;a++)d[c++]=a+h,d[c++]=a+v}return new p.default({attributes:i,indices:g.a.createTypedArray(s,d),boundingSphere:r.default.fromVertices(e),primitiveType:w.default.LINES})}(b.a.computePositions(i,o,u,e,!1),o)}},t.a=x},function(e,t,i){"use strict";var n=i(116),a=i(1),r=i(22),o=i(4),s=i(7),l=i(53),u=i(0),d=i(3),c=i(96),f=i(15),h=i(43),p=i(40),m=i(138),_=i(21),g=i(332),v=i(445),y=i(87),b=i(42),w=i(117),O=i(61),x=i(63),A=i(112),T=i(110),E=i(101),C=i(9),S=new s.default,M=a.default.ZERO,D=new a.default,P=new _.default,I=new _.default,L=new r.default;function j(e){this.id=e,this.vertexFormat=void 0,this.rectangle=void 0,this.height=void 0,this.extrudedHeight=void 0,this.granularity=void 0,this.stRotation=void 0,this.rotation=void 0,this.offsetAttribute=void 0}function R(e,t){E.a.call(this,{entity:e,scene:t,geometryOptions:new j(e),geometryPropertyName:"rectangle",observedPropertyNames:["availability","rectangle"]}),this._onEntityPropertyChanged(e,"rectangle",e.rectangle,void 0)}function N(e,t,i){A.a.call(this,e,t,i)}Object(u.default)(Object.create)&&(R.prototype=Object.create(E.a.prototype),R.prototype.constructor=R),R.prototype.createFillGeometryInstance=function(e){if(o.a.defined("time",e),!this._fillEnabled)throw new d.default("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),a={show:new y.default(n&&i.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),distanceDisplayCondition:c.a.fromDistanceDisplayCondition(this._distanceDisplayConditionProperty.getValue(e)),offset:void 0,color:void 0};this._materialProperty instanceof x.a&&(Object(u.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,S)),Object(u.default)(t)||(t=s.default.WHITE),a.color=l.default.fromColor(t));return Object(u.default)(this._options.offsetAttribute)&&(a.offset=m.a.fromCartesian3(C.default.getValueOrDefault(this._terrainOffsetProperty,e,M,D))),new h.default({id:i,geometry:new g.default(this._options),attributes:a})},R.prototype.createOutlineGeometryInstance=function(e){if(o.a.defined("time",e),!this._outlineEnabled)throw new d.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),n=C.default.getValueOrDefault(this._outlineColorProperty,e,s.default.BLACK,S),a=this._distanceDisplayConditionProperty.getValue(e),r={show:new y.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:l.default.fromColor(n),distanceDisplayCondition:c.a.fromDistanceDisplayCondition(a),offset:void 0};return Object(u.default)(this._options.offsetAttribute)&&(r.offset=m.a.fromCartesian3(C.default.getValueOrDefault(this._terrainOffsetProperty,e,M,D))),new h.default({id:t,geometry:new v.a(this._options),attributes:r})},R.prototype._computeCenter=function(e,t){var i=C.default.getValueOrUndefined(this._entity.rectangle.coordinates,e,I);if(Object(u.default)(i)){var n=_.default.center(i,L);return r.default.toCartesian(n,f.default.WGS84,t)}},R.prototype._isHidden=function(e,t){return!Object(u.default)(t.coordinates)||T.a.prototype._isHidden.call(this,e,t)},R.prototype._isDynamic=function(e,t){return!t.coordinates.isConstant||!C.default.isConstant(t.height)||!C.default.isConstant(t.extrudedHeight)||!C.default.isConstant(t.granularity)||!C.default.isConstant(t.stRotation)||!C.default.isConstant(t.rotation)||!C.default.isConstant(t.outlineWidth)||!C.default.isConstant(t.zIndex)||this._onTerrain&&!C.default.isConstant(this._materialProperty)&&!(this._materialProperty instanceof x.a)},R.prototype._setStaticOptions=function(e,t){var i=this._materialProperty instanceof x.a,a=C.default.getValueOrUndefined(t.height,p.a.MINIMUM_VALUE),r=C.default.getValueOrDefault(t.heightReference,p.a.MINIMUM_VALUE,b.a.NONE),o=C.default.getValueOrUndefined(t.extrudedHeight,p.a.MINIMUM_VALUE),s=C.default.getValueOrDefault(t.extrudedHeightReference,p.a.MINIMUM_VALUE,b.a.NONE);Object(u.default)(o)&&!Object(u.default)(a)&&(a=0);var l=this._options;l.vertexFormat=i?O.default.VERTEX_FORMAT:w.default.MaterialSupport.TEXTURED.vertexFormat,l.rectangle=t.coordinates.getValue(p.a.MINIMUM_VALUE,l.rectangle),l.granularity=C.default.getValueOrUndefined(t.granularity,p.a.MINIMUM_VALUE),l.stRotation=C.default.getValueOrUndefined(t.stRotation,p.a.MINIMUM_VALUE),l.rotation=C.default.getValueOrUndefined(t.rotation,p.a.MINIMUM_VALUE),l.offsetAttribute=E.a.computeGeometryOffsetAttribute(a,r,o,s),l.height=E.a.getGeometryHeight(a,r),(o=E.a.getGeometryExtrudedHeight(o,s))===E.a.CLAMP_TO_GROUND&&(o=n.a.getMinimumMaximumHeights(g.default.computeRectangle(l,P)).minimumTerrainHeight),l.extrudedHeight=o},R.DynamicGeometryUpdater=N,Object(u.default)(Object.create)&&(N.prototype=Object.create(A.a.prototype),N.prototype.constructor=N),N.prototype._isHidden=function(e,t,i){return!Object(u.default)(this._options.rectangle)||A.a.prototype._isHidden.call(this,e,t,i)},N.prototype._setOptions=function(e,t,i){var a=this._options,r=C.default.getValueOrUndefined(t.height,i),o=C.default.getValueOrDefault(t.heightReference,i,b.a.NONE),s=C.default.getValueOrUndefined(t.extrudedHeight,i),l=C.default.getValueOrDefault(t.extrudedHeightReference,i,b.a.NONE);Object(u.default)(s)&&!Object(u.default)(r)&&(r=0),a.rectangle=C.default.getValueOrUndefined(t.coordinates,i,a.rectangle),a.granularity=C.default.getValueOrUndefined(t.granularity,i),a.stRotation=C.default.getValueOrUndefined(t.stRotation,i),a.rotation=C.default.getValueOrUndefined(t.rotation,i),a.offsetAttribute=E.a.computeGeometryOffsetAttribute(r,o,s,l),a.height=E.a.getGeometryHeight(r,o),(s=E.a.getGeometryExtrudedHeight(s,l))===E.a.CLAMP_TO_GROUND&&(s=n.a.getMinimumMaximumHeights(g.default.computeRectangle(a,P)).minimumTerrainHeight),a.extrudedHeight=s},t.a=R},function(e,t,i){"use strict";function n(e,t,i,n,o){!function e(t,i,n,r,o){for(;r>n;){if(r-n>600){var s=r-n+1,l=i-n+1,u=Math.log(s),d=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*d*(s-d)/s)*(l-s/2<0?-1:1),f=Math.max(n,Math.floor(i-l*d/s+c)),h=Math.min(r,Math.floor(i+(s-l)*d/s+c));e(t,i,f,h,o)}var p=t[i],m=n,_=r;for(a(t,n,i),o(t[r],p)>0&&a(t,n,r);m<_;){for(a(t,m,_),m++,_--;o(t[m],p)<0;)m++;for(;o(t[_],p)>0;)_--}0===o(t[n],p)?a(t,n,_):(_++,a(t,_,r)),_<=i&&(n=_+1),i<=_&&(r=_-1)}}(e,t,i||0,n||e.length-1,o||r)}function a(e,t,i){var n=e[t];e[t]=e[i],e[i]=n}function r(e,t){return e<t?-1:e>t?1:0}i.d(t,"a",(function(){return o}));class o{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const i=[];if(!g(e,t))return i;const n=this.toBBox,a=[];for(;t;){for(let r=0;r<t.children.length;r++){const o=t.children[r],s=t.leaf?n(o):o;g(e,s)&&(t.leaf?i.push(o):_(e,s)?this._all(o,i):a.push(o))}t=a.pop()}return i}collides(e){let t=this.data;if(!g(e,t))return!1;const i=[];for(;t;){for(let n=0;n<t.children.length;n++){const a=t.children[n],r=t.leaf?this.toBBox(a):a;if(g(e,r)){if(t.leaf||_(e,r))return!0;i.push(a)}}t=i.pop()}return!1}load(e){if(!e||!e.length)return this;if(e.length<this._minEntries){for(let t=0;t<e.length;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=v([]),this}remove(e,t){if(!e)return this;let i=this.data;const n=this.toBBox(e),a=[],r=[];let o,l,u;for(;i||a.length;){if(i||(i=a.pop(),l=a[a.length-1],o=r.pop(),u=!0),i.leaf){const n=s(e,i.children,t);if(-1!==n)return i.children.splice(n,1),a.push(i),this._condense(a),this}u||i.leaf||!_(i,n)?l?(o++,i=l.children[o],u=!1):i=null:(a.push(i),r.push(o),o=0,l=i,i=i.children[0])}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const i=[];for(;e;)e.leaf?t.push(...e.children):i.push(...e.children),e=i.pop();return t}_build(e,t,i,n){const a=i-t+1;let r,o=this._maxEntries;if(a<=o)return r=v(e.slice(t,i+1)),l(r,this.toBBox),r;n||(n=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,n-1))),r=v([]),r.leaf=!1,r.height=n;const s=Math.ceil(a/o),u=s*Math.ceil(Math.sqrt(o));y(e,t,i,u,this.compareMinX);for(let a=t;a<=i;a+=u){const t=Math.min(a+u-1,i);y(e,a,t,s,this.compareMinY);for(let i=a;i<=t;i+=s){const a=Math.min(i+s-1,t);r.children.push(this._build(e,i,a,n-1))}}return l(r,this.toBBox),r}_chooseSubtree(e,t,i,n){for(;n.push(t),!t.leaf&&n.length-1!==i;){let i,n=1/0,o=1/0;for(let s=0;s<t.children.length;s++){const l=t.children[s],u=h(l),d=(a=e,r=l,(Math.max(r.maxX,a.maxX)-Math.min(r.minX,a.minX))*(Math.max(r.maxY,a.maxY)-Math.min(r.minY,a.minY))-u);d<o?(o=d,n=u<n?u:n,i=l):d===o&&u<n&&(n=u,i=l)}t=i||t.children[0]}var a,r;return t}_insert(e,t,i){const n=i?e:this.toBBox(e),a=[],r=this._chooseSubtree(n,this.data,t,a);for(r.children.push(e),d(r,n);t>=0&&a[t].children.length>this._maxEntries;)this._split(a,t),t--;this._adjustParentBBoxes(n,a,t)}_split(e,t){const i=e[t],n=i.children.length,a=this._minEntries;this._chooseSplitAxis(i,a,n);const r=this._chooseSplitIndex(i,a,n),o=v(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,l(i,this.toBBox),l(o,this.toBBox),t?e[t-1].children.push(o):this._splitRoot(i,o)}_splitRoot(e,t){this.data=v([e,t]),this.data.height=e.height+1,this.data.leaf=!1,l(this.data,this.toBBox)}_chooseSplitIndex(e,t,i){let n,a=1/0,r=1/0;for(let o=t;o<=i-t;o++){const t=u(e,0,o,this.toBBox),s=u(e,o,i,this.toBBox),l=m(t,s),d=h(t)+h(s);l<a?(a=l,n=o,r=d<r?d:r):l===a&&d<r&&(r=d,n=o)}return n||i-t}_chooseSplitAxis(e,t,i){const n=e.leaf?this.compareMinX:c,a=e.leaf?this.compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,a)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const a=this.toBBox,r=u(e,0,t,a),o=u(e,i-t,i,a);let s=p(r)+p(o);for(let n=t;n<i-t;n++){const t=e.children[n];d(r,e.leaf?a(t):t),s+=p(r)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];d(o,e.leaf?a(t):t),s+=p(o)}return s}_adjustParentBBoxes(e,t,i){for(let n=i;n>=0;n--)d(t[n],e)}_condense(e){for(let t,i=e.length-1;i>=0;i--)0===e[i].children.length?i>0?(t=e[i-1].children,t.splice(t.indexOf(e[i]),1)):this.clear():l(e[i],this.toBBox)}}function s(e,t,i){if(!i)return t.indexOf(e);for(let n=0;n<t.length;n++)if(i(e,t[n]))return n;return-1}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,i,n,a){a||(a=v(null)),a.minX=1/0,a.minY=1/0,a.maxX=-1/0,a.maxY=-1/0;for(let r=t;r<i;r++){const t=e.children[r];d(a,e.leaf?n(t):t)}return a}function d(e,t){return e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY),e}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function h(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),a=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,a-i)*Math.max(0,r-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function g(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e){return{children:e,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function y(e,t,i,a,r){const o=[t,i];for(;o.length;){if((i=o.pop())-(t=o.pop())<=a)continue;const s=t+Math.ceil((i-t)/a/2)*a;n(e,s,t,i,r),o.push(t,s,s,i)}}},function(e,t,i){"use strict";var n=i(47),a=i(0),r=i(49),o=i(96),s=i(455),l=i(87),u=i(195),d=i(271),c=i(48),f=i(63),h=i(158),p=i(9),m=new r.default,_=new r.default;function g(e,t,i,a,r,o){this.primitives=e,this.classificationType=t,this.appearanceType=i,this.materialProperty=a,this.updaters=new n.default,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new n.default,this.material=void 0,this.updatersWithAttributes=new n.default,this.attributes=new n.default,this.invalidated=!1,this.removeMaterialSubscription=a.definitionChanged.addEventListener(g.prototype.onMaterialChanged,this),this.subscriptions=new n.default,this.showsUpdated=new n.default,this.usingSphericalTextureCoordinates=r,this.zIndex=o,this.rectangleCollisionCheck=new s.a}function v(e,t,i){this._items=[],this._primitives=e,this._classificationType=t,this._appearanceType=i}g.prototype.onMaterialChanged=function(){this.invalidated=!0},g.prototype.overlapping=function(e){return this.rectangleCollisionCheck.collides(e)},g.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof f.a&&t instanceof f.a||Object(a.default)(t)&&t.equals(i)},g.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),this.rectangleCollisionCheck.insert(n,i.geometry.rectangle),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&p.default.isConstant(t.distanceDisplayConditionProperty)){var a=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,r){"isShowing"===i&&a.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},g.prototype.remove=function(e){var t=e.id,i=this.geometry.get(t);if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.rectangleCollisionCheck.remove(t,i.geometry.rectangle),this.updatersWithAttributes.remove(t);var n=this.subscriptions.get(t);return Object(a.default)(n)&&(n(),this.subscriptions.remove(t)),!0}return!1},g.prototype.update=function(e){var t,i=!0,n=this.primitive,s=this.primitives,d=this.geometry.values;if(this.createPrimitive){if(d.length>0)Object(a.default)(n)&&(Object(a.default)(this.oldPrimitive)?s.remove(n):this.oldPrimitive=n),this.material=h.default.getValue(e,this.materialProperty,this.material),n=new u.default({show:!1,asynchronous:!0,geometryInstances:d.slice(),appearance:new this.appearanceType({material:this.material}),classificationType:this.classificationType}),s.add(n,this.zIndex),i=!1;else{Object(a.default)(n)&&(s.remove(n),n=void 0);var c=this.oldPrimitive;Object(a.default)(c)&&(s.remove(c),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(Object(a.default)(n)&&n.ready){n.show=!0,Object(a.default)(this.oldPrimitive)&&(s.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.material=h.default.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material;var f=this.updatersWithAttributes.values,g=f.length;for(t=0;t<g;t++){var v=f[t],y=v.entity,b=this.geometry.get(v.id),w=this.attributes.get(b.id.id);Object(a.default)(w)||(w=n.getGeometryInstanceAttributes(b.id),this.attributes.set(b.id.id,w));var O=y.isShowing&&(v.hasConstantFill||v.isFilled(e));O!==(1===w.show[0])&&(w.show=l.default.toValue(O,w.show));var x=v.distanceDisplayConditionProperty;if(!p.default.isConstant(x)){var A=p.default.getValueOrDefault(x,e,_,m);r.default.equals(A,w._lastDistanceDisplayCondition)||(w._lastDistanceDisplayCondition=r.default.clone(A,w._lastDistanceDisplayCondition),w.distanceDisplayCondition=o.a.toValue(A,w.distanceDisplayCondition))}}this.updateShows(n)}else Object(a.default)(n)&&!n.ready&&(i=!1);return i},g.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var r=t[n],o=r.entity,s=this.geometry.get(r.id),u=this.attributes.get(s.id.id);Object(a.default)(u)||(u=e.getGeometryInstanceAttributes(s.id),this.attributes.set(s.id.id,u));var d=o.isShowing;d!==(1===u.show[0])&&(u.show=l.default.toValue(d,u.show),s.attributes.show.value[0]=u.show[0])}this.showsUpdated.removeAll()},g.prototype.contains=function(e){return this.updaters.contains(e.id)},g.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return c.a.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!Object(a.default)(n)||!Object(a.default)(n.boundingSphere)||Object(a.default)(n.show)&&0===n.show[0]?c.a.FAILED:(n.boundingSphere.clone(t),c.a.DONE)},g.prototype.destroy=function(){var e=this.primitive,t=this.primitives;Object(a.default)(e)&&t.remove(e);var i=this.oldPrimitive;Object(a.default)(i)&&t.remove(i),this.removeMaterialSubscription()},v.prototype.add=function(e,t){for(var i=this._items,n=i.length,a=t.createFillGeometryInstance(e),r=d.a.shouldUseSphericalCoordinates(a.geometry.rectangle),o=p.default.getValueOrDefault(t.zIndex,0),s=0;s<n;++s){var l=i[s];if(l.isMaterial(t)&&l.usingSphericalTextureCoordinates===r&&l.zIndex===o&&!l.overlapping(a.geometry.rectangle))return void l.add(e,t,a)}var u=new g(this._primitives,this._classificationType,this._appearanceType,t.fillMaterialProperty,r,o);u.add(e,t,a),i.push(u)},v.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},v.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var a=n.updaters.values,r=a.length,o=0;o<r;o++)this.add(e,a[o]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},v.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,a=0;a<n;a++){var r=i[a];if(r.contains(e))return r.getBoundingSphere(e,t)}return c.a.FAILED},v.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0},t.a=v},function(e,t,i){"use strict";var n=i(4),a=i(7),r=i(53),o=i(0),s=i(3),l=i(96),u=i(43),d=i(40),c=i(87),f=i(851),h=i(852),p=i(117),m=i(61),_=i(63),g=i(112),v=i(110),y=i(9),b=new a.default;function w(e){this.id=e,this.vertexFormat=void 0,this.positions=void 0,this.minimumHeights=void 0,this.maximumHeights=void 0,this.granularity=void 0}function O(e,t){v.a.call(this,{entity:e,scene:t,geometryOptions:new w(e),geometryPropertyName:"wall",observedPropertyNames:["availability","wall"]}),this._onEntityPropertyChanged(e,"wall",e.wall,void 0)}function x(e,t,i){g.a.call(this,e,t,i)}Object(o.default)(Object.create)&&(O.prototype=Object.create(v.a.prototype),O.prototype.constructor=O),O.prototype.createFillGeometryInstance=function(e){if(n.a.defined("time",e),!this._fillEnabled)throw new s.default("This instance does not represent a filled geometry.");var t,i,d=this._entity,h=d.isAvailable(e),p=new c.default(h&&d.isShowing&&this._showProperty.getValue(e)&&this._fillProperty.getValue(e)),m=this._distanceDisplayConditionProperty.getValue(e),g=l.a.fromDistanceDisplayCondition(m);this._materialProperty instanceof _.a?(Object(o.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||h)&&(i=this._materialProperty.color.getValue(e,b)),Object(o.default)(i)||(i=a.default.WHITE),t={show:p,distanceDisplayCondition:g,color:r.default.fromColor(i)}):t={show:p,distanceDisplayCondition:g};return new u.default({id:d,geometry:new f.a(this._options),attributes:t})},O.prototype.createOutlineGeometryInstance=function(e){if(n.a.defined("time",e),!this._outlineEnabled)throw new s.default("This instance does not represent an outlined geometry.");var t=this._entity,i=t.isAvailable(e),o=y.default.getValueOrDefault(this._outlineColorProperty,e,a.default.BLACK,b),d=this._distanceDisplayConditionProperty.getValue(e);return new u.default({id:t,geometry:new h.a(this._options),attributes:{show:new c.default(i&&t.isShowing&&this._showProperty.getValue(e)&&this._showOutlineProperty.getValue(e)),color:r.default.fromColor(o),distanceDisplayCondition:l.a.fromDistanceDisplayCondition(d)}})},O.prototype._isHidden=function(e,t){return!Object(o.default)(t.positions)||v.a.prototype._isHidden.call(this,e,t)},O.prototype._getIsClosed=function(e){return!1},O.prototype._isDynamic=function(e,t){return!(t.positions.isConstant&&y.default.isConstant(t.minimumHeights)&&y.default.isConstant(t.maximumHeights)&&y.default.isConstant(t.outlineWidth)&&y.default.isConstant(t.granularity))},O.prototype._setStaticOptions=function(e,t){var i=t.minimumHeights,n=t.maximumHeights,a=t.granularity,r=this._materialProperty instanceof _.a,s=this._options;s.vertexFormat=r?m.default.VERTEX_FORMAT:p.default.MaterialSupport.TEXTURED.vertexFormat,s.positions=t.positions.getValue(d.a.MINIMUM_VALUE,s.positions),s.minimumHeights=Object(o.default)(i)?i.getValue(d.a.MINIMUM_VALUE,s.minimumHeights):void 0,s.maximumHeights=Object(o.default)(n)?n.getValue(d.a.MINIMUM_VALUE,s.maximumHeights):void 0,s.granularity=Object(o.default)(a)?a.getValue(d.a.MINIMUM_VALUE):void 0},O.DynamicGeometryUpdater=x,Object(o.default)(Object.create)&&(x.prototype=Object.create(g.a.prototype),x.prototype.constructor=x),x.prototype._isHidden=function(e,t,i){return!Object(o.default)(this._options.positions)||g.a.prototype._isHidden.call(this,e,t,i)},x.prototype._setOptions=function(e,t,i){var n=this._options;n.positions=y.default.getValueOrUndefined(t.positions,i,n.positions),n.minimumHeights=y.default.getValueOrUndefined(t.minimumHeights,i,n.minimumHeights),n.maximumHeights=y.default.getValueOrUndefined(t.maximumHeights,i,n.maximumHeights),n.granularity=y.default.getValueOrUndefined(t.granularity,i)},t.a=O},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(11),o=i(2),s=i(0),l=i(3),u=i(15),d=i(46),c=i(28),f=i(82),h=i(38),p=i(5),m=i(35),_=i(29),g=i(456),v=new a.default,y=new a.default,b=new a.default,w=new a.default,O=new a.default,x=new a.default,A=new a.default;function T(e){var t=(e=Object(o.default)(e,o.default.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!Object(s.default)(t))throw new l.default("options.positions is required.");if(Object(s.default)(i)&&i.length!==t.length)throw new l.default("options.positions and options.maximumHeights must have the same length.");if(Object(s.default)(n)&&n.length!==t.length)throw new l.default("options.positions and options.minimumHeights must have the same length.");var r=Object(o.default)(e.vertexFormat,_.a.DEFAULT),d=Object(o.default)(e.granularity,p.default.RADIANS_PER_DEGREE),c=Object(o.default)(e.ellipsoid,u.default.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._vertexFormat=_.a.clone(r),this._granularity=d,this._ellipsoid=u.default.clone(c),this._workerName="createWallGeometry";var f=1+t.length*a.default.packedLength+2;Object(s.default)(n)&&(f+=n.length),Object(s.default)(i)&&(f+=i.length),this.packedLength=f+u.default.packedLength+_.a.packedLength+1}T.pack=function(e,t,i){if(!Object(s.default)(e))throw new l.default("value is required");if(!Object(s.default)(t))throw new l.default("array is required");var n;i=Object(o.default)(i,0);var r=e._positions,d=r.length;for(t[i++]=d,n=0;n<d;++n,i+=a.default.packedLength)a.default.pack(r[n],t,i);var c=e._minimumHeights;if(d=Object(s.default)(c)?c.length:0,t[i++]=d,Object(s.default)(c))for(n=0;n<d;++n)t[i++]=c[n];var f=e._maximumHeights;if(d=Object(s.default)(f)?f.length:0,t[i++]=d,Object(s.default)(f))for(n=0;n<d;++n)t[i++]=f[n];return u.default.pack(e._ellipsoid,t,i),i+=u.default.packedLength,_.a.pack(e._vertexFormat,t,i),t[i+=_.a.packedLength]=e._granularity,t};var E=u.default.clone(u.default.UNIT_SPHERE),C=new _.a,S={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:E,vertexFormat:C,granularity:void 0};T.unpack=function(e,t,i){if(!Object(s.default)(e))throw new l.default("array is required");var n;t=Object(o.default)(t,0);var r,d,c=e[t++],f=new Array(c);for(n=0;n<c;++n,t+=a.default.packedLength)f[n]=a.default.unpack(e,t);if((c=e[t++])>0)for(r=new Array(c),n=0;n<c;++n)r[n]=e[t++];if((c=e[t++])>0)for(d=new Array(c),n=0;n<c;++n)d[n]=e[t++];var h=u.default.unpack(e,t,E);t+=u.default.packedLength;var p=_.a.unpack(e,t,C),m=e[t+=_.a.packedLength];return Object(s.default)(i)?(i._positions=f,i._minimumHeights=r,i._maximumHeights=d,i._ellipsoid=u.default.clone(h,i._ellipsoid),i._vertexFormat=_.a.clone(p,i._vertexFormat),i._granularity=m,i):(S.positions=f,S.minimumHeights=r,S.maximumHeights=d,S.granularity=m,new T(S))},T.fromConstantHeights=function(e){var t,i,n=(e=Object(o.default)(e,o.default.EMPTY_OBJECT)).positions;if(!Object(s.default)(n))throw new l.default("options.positions is required.");var a=e.minimumHeight,r=e.maximumHeight,u=Object(s.default)(a),d=Object(s.default)(r);if(u||d){var c=n.length;t=u?new Array(c):void 0,i=d?new Array(c):void 0;for(var f=0;f<c;++f)u&&(t[f]=a),d&&(i[f]=r)}return new T({positions:n,maximumHeights:i,minimumHeights:t,ellipsoid:e.ellipsoid,vertexFormat:e.vertexFormat})},T.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,o=e._maximumHeights,l=e._vertexFormat,u=e._granularity,_=e._ellipsoid,T=g.a.computePositions(_,t,o,i,u,!0);if(Object(s.default)(T)){var E,C=T.bottomPositions,S=T.topPositions,M=T.numCorners,D=S.length,P=2*D,I=l.position?new Float64Array(P):void 0,L=l.normal?new Float32Array(P):void 0,j=l.tangent?new Float32Array(P):void 0,R=l.bitangent?new Float32Array(P):void 0,N=l.st?new Float32Array(P/3*2):void 0,B=0,F=0,k=0,z=0,U=0,V=A,H=x,G=O,Y=!0,W=0,q=1/((D/=3)-M-1);for(E=0;E<D;++E){var X=3*E,K=a.default.fromArray(S,X,v),J=a.default.fromArray(C,X,y);if(l.position&&(I[B++]=J.x,I[B++]=J.y,I[B++]=J.z,I[B++]=K.x,I[B++]=K.y,I[B++]=K.z),l.st&&(N[U++]=W,N[U++]=0,N[U++]=W,N[U++]=1),l.normal||l.tangent||l.bitangent){var Z=a.default.clone(a.default.ZERO,w),Q=a.default.subtract(K,_.geodeticSurfaceNormal(K,y),y);if(E+1<D&&(Z=a.default.fromArray(S,X+3,w)),Y){var $=a.default.subtract(Z,K,b),ee=a.default.subtract(Q,K,v);V=a.default.normalize(a.default.cross(ee,$,V),V),Y=!1}a.default.equalsEpsilon(K,Z,p.default.EPSILON10)?Y=!0:(W+=q,l.tangent&&(H=a.default.normalize(a.default.subtract(Z,K,H),H)),l.bitangent&&(G=a.default.normalize(a.default.cross(V,H,G),G))),l.normal&&(L[F++]=V.x,L[F++]=V.y,L[F++]=V.z,L[F++]=V.x,L[F++]=V.y,L[F++]=V.z),l.tangent&&(j[z++]=H.x,j[z++]=H.y,j[z++]=H.z,j[z++]=H.x,j[z++]=H.y,j[z++]=H.z),l.bitangent&&(R[k++]=G.x,R[k++]=G.y,R[k++]=G.z,R[k++]=G.x,R[k++]=G.y,R[k++]=G.z)}}var te=new f.a;l.position&&(te.position=new c.default({componentDatatype:r.default.DOUBLE,componentsPerAttribute:3,values:I})),l.normal&&(te.normal=new c.default({componentDatatype:r.default.FLOAT,componentsPerAttribute:3,values:L})),l.tangent&&(te.tangent=new c.default({componentDatatype:r.default.FLOAT,componentsPerAttribute:3,values:j})),l.bitangent&&(te.bitangent=new c.default({componentDatatype:r.default.FLOAT,componentsPerAttribute:3,values:R})),l.st&&(te.st=new c.default({componentDatatype:r.default.FLOAT,componentsPerAttribute:2,values:N}));var ie=P/3;P-=6*(M+1);var ne=h.a.createTypedArray(ie,P),ae=0;for(E=0;E<ie-2;E+=2){var re=E,oe=E+2,se=a.default.fromArray(I,3*re,v),le=a.default.fromArray(I,3*oe,y);if(!a.default.equalsEpsilon(se,le,p.default.EPSILON10)){var ue=E+1,de=E+3;ne[ae++]=ue,ne[ae++]=re,ne[ae++]=de,ne[ae++]=de,ne[ae++]=re,ne[ae++]=oe}}return new d.default({attributes:te,indices:ne,primitiveType:m.default.TRIANGLES,boundingSphere:new n.default.fromVertices(I)})}},t.a=T},function(e,t,i){"use strict";var n=i(17),a=i(1),r=i(11),o=i(2),s=i(0),l=i(3),u=i(15),d=i(46),c=i(28),f=i(82),h=i(38),p=i(5),m=i(35),_=i(456),g=new a.default,v=new a.default;function y(e){var t=(e=Object(o.default)(e,o.default.EMPTY_OBJECT)).positions,i=e.maximumHeights,n=e.minimumHeights;if(!Object(s.default)(t))throw new l.default("options.positions is required.");if(Object(s.default)(i)&&i.length!==t.length)throw new l.default("options.positions and options.maximumHeights must have the same length.");if(Object(s.default)(n)&&n.length!==t.length)throw new l.default("options.positions and options.minimumHeights must have the same length.");var r=Object(o.default)(e.granularity,p.default.RADIANS_PER_DEGREE),d=Object(o.default)(e.ellipsoid,u.default.WGS84);this._positions=t,this._minimumHeights=n,this._maximumHeights=i,this._granularity=r,this._ellipsoid=u.default.clone(d),this._workerName="createWallOutlineGeometry";var c=1+t.length*a.default.packedLength+2;Object(s.default)(n)&&(c+=n.length),Object(s.default)(i)&&(c+=i.length),this.packedLength=c+u.default.packedLength+1}y.pack=function(e,t,i){if(!Object(s.default)(e))throw new l.default("value is required");if(!Object(s.default)(t))throw new l.default("array is required");var n;i=Object(o.default)(i,0);var r=e._positions,d=r.length;for(t[i++]=d,n=0;n<d;++n,i+=a.default.packedLength)a.default.pack(r[n],t,i);var c=e._minimumHeights;if(d=Object(s.default)(c)?c.length:0,t[i++]=d,Object(s.default)(c))for(n=0;n<d;++n)t[i++]=c[n];var f=e._maximumHeights;if(d=Object(s.default)(f)?f.length:0,t[i++]=d,Object(s.default)(f))for(n=0;n<d;++n)t[i++]=f[n];return u.default.pack(e._ellipsoid,t,i),t[i+=u.default.packedLength]=e._granularity,t};var b=u.default.clone(u.default.UNIT_SPHERE),w={positions:void 0,minimumHeights:void 0,maximumHeights:void 0,ellipsoid:b,granularity:void 0};y.unpack=function(e,t,i){if(!Object(s.default)(e))throw new l.default("array is required");var n;t=Object(o.default)(t,0);var r,d,c=e[t++],f=new Array(c);for(n=0;n<c;++n,t+=a.default.packedLength)f[n]=a.default.unpack(e,t);if((c=e[t++])>0)for(r=new Array(c),n=0;n<c;++n)r[n]=e[t++];if((c=e[t++])>0)for(d=new Array(c),n=0;n<c;++n)d[n]=e[t++];var h=u.default.unpack(e,t,b),p=e[t+=u.default.packedLength];return Object(s.default)(i)?(i._positions=f,i._minimumHeights=r,i._maximumHeights=d,i._ellipsoid=u.default.clone(h,i._ellipsoid),i._granularity=p,i):(w.positions=f,w.minimumHeights=r,w.maximumHeights=d,w.granularity=p,new y(w))},y.fromConstantHeights=function(e){var t,i,n=(e=Object(o.default)(e,o.default.EMPTY_OBJECT)).positions;if(!Object(s.default)(n))throw new l.default("options.positions is required.");var a=e.minimumHeight,r=e.maximumHeight,u=Object(s.default)(a),d=Object(s.default)(r);if(u||d){var c=n.length;t=u?new Array(c):void 0,i=d?new Array(c):void 0;for(var f=0;f<c;++f)u&&(t[f]=a),d&&(i[f]=r)}return new y({positions:n,maximumHeights:i,minimumHeights:t,ellipsoid:e.ellipsoid})},y.createGeometry=function(e){var t=e._positions,i=e._minimumHeights,o=e._maximumHeights,l=e._granularity,u=e._ellipsoid,y=_.a.computePositions(u,t,o,i,l,!1);if(Object(s.default)(y)){var b,w=y.bottomPositions,O=y.topPositions,x=O.length,A=2*x,T=new Float64Array(A),E=0;for(x/=3,b=0;b<x;++b){var C=3*b,S=a.default.fromArray(O,C,g),M=a.default.fromArray(w,C,v);T[E++]=M.x,T[E++]=M.y,T[E++]=M.z,T[E++]=S.x,T[E++]=S.y,T[E++]=S.z}var D=new f.a({position:new c.default({componentDatatype:r.default.DOUBLE,componentsPerAttribute:3,values:T})}),P=A/3;A=2*P-4+P;var I=h.a.createTypedArray(P,A),L=0;for(b=0;b<P-2;b+=2){var j=b,R=b+2,N=a.default.fromArray(T,3*j,g),B=a.default.fromArray(T,3*R,v);if(!a.default.equalsEpsilon(N,B,p.default.EPSILON10)){var F=b+1,k=b+3;I[L++]=F,I[L++]=j,I[L++]=F,I[L++]=k,I[L++]=j,I[L++]=R}}return I[L++]=P-2,I[L++]=P-1,new d.default({attributes:D,indices:I,primitiveType:m.default.LINES,boundingSphere:new n.default.fromVertices(T)})}},t.a=y},function(e,t,i){"use strict";var n=i(47),a=i(8),r=i(1),o=i(7),s=i(2),l=i(0),u=i(19),d=i(3),c=i(49),f=i(65),h=i(42),p=i(129),m=i(174),_=i(89),g=i(48),v=i(9),y=m.a.FILL,b=o.default.WHITE,w=o.default.BLACK,O=new o.default(.165,.165,.165,.8),x=new a.default(7,5),A=a.default.ZERO,T=r.default.ZERO,E=h.a.NONE,C=p.a.CENTER,S=_.default.CENTER,M=new r.default,D=new o.default,P=new o.default,I=new o.default,L=new a.default,j=new r.default,R=new a.default,N=new f.a,B=new f.a,F=new f.a,k=new c.default;function z(e){this.entity=e,this.label=void 0,this.index=void 0}function U(e,t){if(!Object(l.default)(e))throw new d.default("entityCluster is required.");if(!Object(l.default)(t))throw new d.default("entityCollection is required.");t.collectionChanged.addEventListener(U.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new n.default,this._onCollectionChanged(t,t.values,[],[])}function V(e,t,i){Object(l.default)(e)&&(e.label=void 0,i.removeLabel(t))}U.prototype.update=function(e){if(!Object(l.default)(e))throw new d.default("time is required.");for(var t=this._items.values,i=this._cluster,n=0,a=t.length;n<a;n++){var o,s,u=t[n],c=u.entity,f=c._label,h=u.label,p=c.isShowing&&c.isAvailable(e)&&v.default.getValueOrDefault(f._show,e,!0);if(p&&(s=v.default.getValueOrUndefined(c._position,e,M),o=v.default.getValueOrUndefined(f._text,e),p=Object(l.default)(s)&&Object(l.default)(o)),p){v.default.isConstant(c._position)||(i._clusterDirty=!0);var m=!1,_=v.default.getValueOrDefault(f._heightReference,e,E);Object(l.default)(h)||((h=i.getLabel(c)).id=c,u.label=h,m=r.default.equals(h.position,s)&&h.heightReference===_),h.show=!0,h.position=s,h.text=o,h.scale=v.default.getValueOrDefault(f._scale,e,1),h.font=v.default.getValueOrDefault(f._font,e,"30px sans-serif"),h.style=v.default.getValueOrDefault(f._style,e,y),h.fillColor=v.default.getValueOrDefault(f._fillColor,e,b,D),h.outlineColor=v.default.getValueOrDefault(f._outlineColor,e,w,P),h.outlineWidth=v.default.getValueOrDefault(f._outlineWidth,e,1),h.showBackground=v.default.getValueOrDefault(f._showBackground,e,!1),h.backgroundColor=v.default.getValueOrDefault(f._backgroundColor,e,O,I),h.backgroundPadding=v.default.getValueOrDefault(f._backgroundPadding,e,x,L),h.pixelOffset=v.default.getValueOrDefault(f._pixelOffset,e,A,R),h.eyeOffset=v.default.getValueOrDefault(f._eyeOffset,e,T,j),h.heightReference=_,h.horizontalOrigin=v.default.getValueOrDefault(f._horizontalOrigin,e,C),h.verticalOrigin=v.default.getValueOrDefault(f._verticalOrigin,e,S),h.translucencyByDistance=v.default.getValueOrUndefined(f._translucencyByDistance,e,N),h.pixelOffsetScaleByDistance=v.default.getValueOrUndefined(f._pixelOffsetScaleByDistance,e,B),h.scaleByDistance=v.default.getValueOrUndefined(f._scaleByDistance,e,F),h.distanceDisplayCondition=v.default.getValueOrUndefined(f._distanceDisplayCondition,e,k),h.disableDepthTestDistance=v.default.getValueOrUndefined(f._disableDepthTestDistance,e),m&&h._updateClamping()}else V(u,c,i)}return!0},U.prototype.getBoundingSphere=function(e,t){if(!Object(l.default)(e))throw new d.default("entity is required.");if(!Object(l.default)(t))throw new d.default("result is required.");var i=this._items.get(e.id);if(!Object(l.default)(i)||!Object(l.default)(i.label))return g.a.FAILED;var n=i.label;return t.center=r.default.clone(Object(s.default)(n._clampedPosition,n.position),t.center),t.radius=0,g.a.DONE},U.prototype.isDestroyed=function(){return!1},U.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(U.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removeLabel(e[t]);return Object(u.default)(this)},U.prototype._onCollectionChanged=function(e,t,i,n){var a,r,o=this._items,s=this._cluster;for(a=t.length-1;a>-1;a--)r=t[a],Object(l.default)(r._label)&&Object(l.default)(r._position)&&o.set(r.id,new z(r));for(a=n.length-1;a>-1;a--)r=n[a],Object(l.default)(r._label)&&Object(l.default)(r._position)?o.contains(r.id)||o.set(r.id,new z(r)):(V(o.get(r.id),r,s),o.remove(r.id));for(a=i.length-1;a>-1;a--)r=i[a],V(o.get(r.id),r,s),o.remove(r.id)},t.a=U},function(e,t,i){"use strict";var n=i(47),a=i(17),r=i(8),o=i(7),s=i(0),l=i(19),u=i(3),d=i(6),c=i(30),f=i(193),h=i(42),p=i(250),m=i(209),_=i(86),g=i(48),v=i(9),y=_.a.ENABLED,b=h.a.NONE,w=o.default.RED,O=o.default.WHITE,x=f.default.HIGHLIGHT,A=new r.default(1,1),T=new d.default,E=new d.default;function C(e,t){if(!Object(s.default)(e))throw new u.default("scene is required.");if(!Object(s.default)(t))throw new u.default("entityCollection is required.");t.collectionChanged.addEventListener(C.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._modelHash={},this._entitiesToVisualize=new n.default,this._onCollectionChanged(t,t.values,[],[])}function S(e,t,i,n){var a=i[t.id];Object(s.default)(a)&&(n.removeAndDestroy(a.modelPrimitive),delete i[t.id])}function M(e,t){var i=t[e.id];Object(s.default)(i)&&(i.nodeTransformationsScratch={},i.articulationsScratch={})}function D(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}C.prototype.update=function(e){if(!Object(s.default)(e))throw new u.default("time is required.");for(var t=this._entitiesToVisualize.values,i=this._modelHash,n=this._primitives,a=0,r=t.length;a<r;a++){var o,l,f=t[a],h=f._model,_=i[f.id],g=f.isShowing&&f.isAvailable(e)&&v.default.getValueOrDefault(h._show,e,!0);if(g&&(l=f.computeModelMatrix(e,T),o=c.default.createIfNeeded(v.default.getValueOrUndefined(h._uri,e)),g=Object(s.default)(l)&&Object(s.default)(o)),g){var C=Object(s.default)(_)?_.modelPrimitive:void 0;if(Object(s.default)(C)&&o.url===_.url||(Object(s.default)(C)&&(n.removeAndDestroy(C),delete i[f.id]),(C=p.default.fromGltf({url:o,incrementallyLoadTextures:v.default.getValueOrDefault(h._incrementallyLoadTextures,e,!0),scene:this._scene})).id=f,n.add(C),_={modelPrimitive:C,url:o.url,animationsRunning:!1,nodeTransformationsScratch:{},articulationsScratch:{},loadFail:!1},i[f.id]=_,D(C,f,i)),C.show=!0,C.scale=v.default.getValueOrDefault(h._scale,e,1),C.minimumPixelSize=v.default.getValueOrDefault(h._minimumPixelSize,e,0),C.maximumScale=v.default.getValueOrUndefined(h._maximumScale,e),C.modelMatrix=d.default.clone(l,C.modelMatrix),C.shadows=v.default.getValueOrDefault(h._shadows,e,y),C.heightReference=v.default.getValueOrDefault(h._heightReference,e,b),C.distanceDisplayCondition=v.default.getValueOrUndefined(h._distanceDisplayCondition,e),C.silhouetteColor=v.default.getValueOrDefault(h._silhouetteColor,e,w,C._silhouetteColor),C.silhouetteSize=v.default.getValueOrDefault(h._silhouetteSize,e,0),C.color=v.default.getValueOrDefault(h._color,e,O,C._color),C.colorBlendMode=v.default.getValueOrDefault(h._colorBlendMode,e,x),C.colorBlendAmount=v.default.getValueOrDefault(h._colorBlendAmount,e,.5),C.clippingPlanes=v.default.getValueOrUndefined(h._clippingPlanes,e),C.clampAnimations=v.default.getValueOrDefault(h._clampAnimations,e,!0),C.imageBasedLightingFactor=v.default.getValueOrDefault(h._imageBasedLightingFactor,e,A),C.lightColor=v.default.getValueOrUndefined(h._lightColor,e),C.ready){var S=v.default.getValueOrDefault(h._runAnimations,e,!0);_.animationsRunning!==S&&(S?C.activeAnimations.addAll({loop:m.a.REPEAT}):C.activeAnimations.removeAll(),_.animationsRunning=S);var M=v.default.getValueOrUndefined(h._nodeTransformations,e,_.nodeTransformationsScratch);if(Object(s.default)(M))for(var P=Object.keys(M),I=0,L=P.length;I<L;++I){var j=P[I],R=M[j];if(Object(s.default)(R)){var N=C.getNode(j);if(Object(s.default)(N)){var B=d.default.fromTranslationRotationScale(R,E);N.matrix=d.default.multiply(N.originalMatrix,B,B)}}}var F=!1,k=v.default.getValueOrUndefined(h._articulations,e,_.articulationsScratch);if(Object(s.default)(k))for(var z=Object.keys(k),U=0,V=z.length;U<V;++U){var H=z[U],G=k[H];Object(s.default)(G)&&(F=!0,C.setArticulationStage(H,G))}F&&C.applyArticulations()}}else Object(s.default)(_)&&(_.modelPrimitive.show=!1)}return!0},C.prototype.isDestroyed=function(){return!1},C.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(C.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._modelHash,i=this._primitives,n=e.length-1;n>-1;n--)S(this,e[n],t,i);return Object(l.default)(this)},C.prototype.getBoundingSphere=function(e,t){if(!Object(s.default)(e))throw new u.default("entity is required.");if(!Object(s.default)(t))throw new u.default("result is required.");var i=this._modelHash[e.id];if(!Object(s.default)(i)||i.loadFail)return g.a.FAILED;var n=i.modelPrimitive;if(!Object(s.default)(n)||!n.show)return g.a.FAILED;if(!n.ready)return g.a.PENDING;if(n.heightReference===h.a.NONE)a.default.transform(n.boundingSphere,n.modelMatrix,t);else{if(!Object(s.default)(n._clampedModelMatrix))return g.a.PENDING;a.default.transform(n.boundingSphere,n._clampedModelMatrix,t)}return g.a.DONE},C.prototype._onCollectionChanged=function(e,t,i,n){var a,r,o=this._entitiesToVisualize,l=this._modelHash,u=this._primitives;for(a=t.length-1;a>-1;a--)r=t[a],Object(s.default)(r._model)&&Object(s.default)(r._position)&&o.set(r.id,r);for(a=n.length-1;a>-1;a--)r=n[a],Object(s.default)(r._model)&&Object(s.default)(r._position)?(M(r,l),o.set(r.id,r)):(S(this,r,l,u),o.remove(r.id));for(a=i.length-1;a>-1;a--)S(this,r=i[a],l,u),o.remove(r.id)},t.a=C},function(e,t,i){"use strict";var n=i(856),a=i(0);t.a=function(e,t){const i=e.extensionsUsed;if(Object(a.default)(i)){const a=i.indexOf(t);a>=0&&i.splice(a,1),Object(n.a)(e,t),0===i.length&&delete e.extensionsUsed}}},function(e,t,i){"use strict";var n=i(0);t.a=function(e,t){const i=e.extensionsRequired;if(Object(n.default)(i)){const n=i.indexOf(t);n>=0&&i.splice(n,1),0===i.length&&delete e.extensionsRequired}}},function(e,t,i){"use strict";var n=i(310),a=i(25),r=i(2),o=i(0),s=i(10);const l=[s.a.FUNC_ADD,s.a.FUNC_ADD],u=[s.a.ONE,s.a.ZERO,s.a.ONE,s.a.ZERO];function d(e,t){const i=e.enable;return!!Object(o.default)(i)&&i.indexOf(t)>-1}const c=[s.a.ZERO,s.a.ONE,s.a.SRC_COLOR,s.a.ONE_MINUS_SRC_COLOR,s.a.SRC_ALPHA,s.a.ONE_MINUS_SRC_ALPHA,s.a.DST_ALPHA,s.a.ONE_MINUS_DST_ALPHA,s.a.DST_COLOR,s.a.ONE_MINUS_DST_COLOR];function f(e,t){if(!Object(o.default)(e))return t;for(let i=0;i<4;i++)if(-1===c.indexOf(e[i]))return t;return e}t.a=function(e){const t={},i={},c=e.techniques;return Object(o.default)(c)?(a.a.technique(e,(function(e,n){const a=e.states;if(Object(o.default)(a)){const c=i[n]={};if(d(a,s.a.BLEND)){c.alphaMode="BLEND";const e=a.functions;Object(o.default)(e)&&(Object(o.default)(e.blendEquationSeparate)||Object(o.default)(e.blendFuncSeparate))&&(t[n]={blendEquation:Object(r.default)(e.blendEquationSeparate,l),blendFactors:f(e.blendFuncSeparate,u)})}d(a,s.a.CULL_FACE)||(c.doubleSided=!0),delete e.states}})),Object.keys(t).length>0&&(Object(o.default)(e.extensions)||(e.extensions={}),Object(n.a)(e,"KHR_blend")),a.a.material(e,(function(e){if(Object(o.default)(e.technique)){const n=i[e.technique];a.a.objectLegacy(n,(function(t,i){e[i]=t}));const r=t[e.technique];Object(o.default)(r)&&(Object(o.default)(e.extensions)||(e.extensions={}),e.extensions.KHR_blend=r)}})),e):e}},function(e,t,i){"use strict";var n=i(310),a=i(859),r=i(144),o=i(25),s=i(0);t.a=function(e){const t=e.techniques,i={},l={},u={};if(Object(s.default)(t)){const t={programs:[],shaders:[],techniques:[]},d=e.glExtensionsUsed;delete e.glExtensionsUsed,o.a.technique(e,(function(n,a){const c={name:n.name,program:void 0,attributes:{},uniforms:{}};let f;if(o.a.techniqueAttribute(n,(function(e,t){f=n.parameters[e],c.attributes[t]={semantic:f.semantic}})),o.a.techniqueUniform(n,(function(e,t){f=n.parameters[e],c.uniforms[t]={count:f.count,node:f.node,type:f.type,semantic:f.semantic,value:f.value},Object(s.default)(i[a])||(i[a]={}),i[a][e]=t})),Object(s.default)(u[n.program]))c.program=u[n.program];else{const i=e.programs[n.program],a={name:i.name,fragmentShader:void 0,vertexShader:void 0,glExtensions:d},o=e.shaders[i.fragmentShader];a.fragmentShader=Object(r.a)(t.shaders,o,!0);const s=e.shaders[i.vertexShader];a.vertexShader=Object(r.a)(t.shaders,s,!0),c.program=Object(r.a)(t.programs,a),u[n.program]=c.program}l[a]=Object(r.a)(t.techniques,c)})),t.techniques.length>0&&(Object(s.default)(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t,Object(n.a)(e,"KHR_techniques_webgl"),Object(a.a)(e,"KHR_techniques_webgl"))}return o.a.material(e,(function(e){if(Object(s.default)(e.technique)){const t={technique:l[e.technique]};o.a.objectLegacy(e.values,(function(n,a){Object(s.default)(t.values)||(t.values={});const r=i[e.technique][a];t.values[r]=n})),Object(s.default)(e.extensions)||(e.extensions={}),e.extensions.KHR_techniques_webgl=t}delete e.technique,delete e.values})),delete e.techniques,delete e.programs,delete e.shaders,e}},function(e,t,i){"use strict";var n=i(310),a=i(144),r=i(0);t.a=function(e,t){let i=e.extensionsRequired;Object(r.default)(i)||(i=[],e.extensionsRequired=i),Object(a.a)(i,t,!0),Object(n.a)(e,t)}},function(e,t,i){"use strict";var n=i(25),a=i(521),r=i(161),o=i(2),s=i(0);const l=["mesh","node","material","accessor","bufferView","buffer","texture","sampler","image"];const u={accessor:"accessors",buffer:"buffers",bufferView:"bufferViews",image:"images",node:"nodes",material:"materials",mesh:"meshes",sampler:"samplers",texture:"textures"};function d(){}function c(){}d.accessor=function(e,t){e.accessors.splice(t,1),n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){n.a.meshPrimitiveAttribute(e,(function(i,n){i>t&&e.attributes[n]--})),n.a.meshPrimitiveTarget(e,(function(e){n.a.meshPrimitiveTargetAttribute(e,(function(i,n){i>t&&e[n]--}))}));const i=e.indices;Object(s.default)(i)&&i>t&&e.indices--}))})),n.a.skin(e,(function(e){Object(s.default)(e.inverseBindMatrices)&&e.inverseBindMatrices>t&&e.inverseBindMatrices--})),n.a.animation(e,(function(e){n.a.animationSampler(e,(function(e){Object(s.default)(e.input)&&e.input>t&&e.input--,Object(s.default)(e.output)&&e.output>t&&e.output--}))}))},d.buffer=function(e,t){e.buffers.splice(t,1),n.a.bufferView(e,(function(e){Object(s.default)(e.buffer)&&e.buffer>t&&e.buffer--,Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.EXT_meshopt_compression)&&e.extensions.EXT_meshopt_compression.buffer--}))},d.bufferView=function(e,t){if(e.bufferViews.splice(t,1),n.a.accessor(e,(function(e){Object(s.default)(e.bufferView)&&e.bufferView>t&&e.bufferView--})),n.a.shader(e,(function(e){Object(s.default)(e.bufferView)&&e.bufferView>t&&e.bufferView--})),n.a.image(e,(function(e){Object(s.default)(e.bufferView)&&e.bufferView>t&&e.bufferView--})),Object(r.a)(e,"KHR_draco_mesh_compression")&&n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.KHR_draco_mesh_compression)&&e.extensions.KHR_draco_mesh_compression.bufferView>t&&e.extensions.KHR_draco_mesh_compression.bufferView--}))})),Object(r.a)(e,"EXT_feature_metadata")){const i=e.extensions.EXT_feature_metadata.featureTables;for(const e in i)if(i.hasOwnProperty(e)){const n=i[e].properties;if(Object(s.default)(n))for(const e in n)if(n.hasOwnProperty(e)){const i=n[e];Object(s.default)(i.bufferView)&&i.bufferView>t&&i.bufferView--,Object(s.default)(i.arrayOffsetBufferView)&&i.arrayOffsetBufferView>t&&i.arrayOffsetBufferView--,Object(s.default)(i.stringOffsetBufferView)&&i.stringOffsetBufferView>t&&i.stringOffsetBufferView--}}}},d.image=function(e,t){e.images.splice(t,1),n.a.texture(e,(function(e){Object(s.default)(e.source)&&e.source>t&&--e.source;const i=e.extensions;Object(s.default)(i)&&Object(s.default)(i.EXT_texture_webp)&&i.EXT_texture_webp.source>t?--e.extensions.EXT_texture_webp.source:Object(s.default)(i)&&Object(s.default)(i.KHR_texture_basisu)&&i.KHR_texture_basisu.source>t&&--e.extensions.KHR_texture_basisu.source}))},d.mesh=function(e,t){e.meshes.splice(t,1),n.a.node(e,(function(e){Object(s.default)(e.mesh)&&(e.mesh>t?e.mesh--:e.mesh===t&&delete e.mesh)}))},d.node=function(e,t){e.nodes.splice(t,1),n.a.skin(e,(function(e){Object(s.default)(e.skeleton)&&e.skeleton>t&&e.skeleton--,e.joints=e.joints.map((function(e){return e>t?e-1:e}))})),n.a.animation(e,(function(e){n.a.animationChannel(e,(function(e){Object(s.default)(e.target)&&Object(s.default)(e.target.node)&&e.target.node>t&&e.target.node--}))})),n.a.technique(e,(function(e){n.a.techniqueUniform(e,(function(e){Object(s.default)(e.node)&&e.node>t&&e.node--}))})),n.a.node(e,(function(e){Object(s.default)(e.children)&&(e.children=e.children.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e})))})),n.a.scene(e,(function(e){e.nodes=e.nodes.filter((function(e){return e!==t})).map((function(e){return e>t?e-1:e}))}))},d.material=function(e,t){e.materials.splice(t,1),n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){Object(s.default)(e.material)&&e.material>t&&e.material--}))}))},d.sampler=function(e,t){e.samplers.splice(t,1),n.a.texture(e,(function(e){Object(s.default)(e.sampler)&&e.sampler>t&&--e.sampler}))},d.texture=function(e,t){if(e.textures.splice(t,1),n.a.material(e,(function(e){Object(a.a)(e,(function(e,i){i.index>t&&--i.index}))})),Object(r.a)(e,"EXT_feature_metadata")){n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){const i=e.extensions;if(Object(s.default)(i)&&Object(s.default)(i.EXT_feature_metadata)){const e=i.EXT_feature_metadata.featureIdTextures;if(Object(s.default)(e)){const i=e.length;for(let n=0;n<i;++n){const i=e[n].featureIds.texture;i.index>t&&--i.index}}}}))}));const i=e.extensions.EXT_feature_metadata.featureTextures;for(const e in i)if(i.hasOwnProperty(e)){const n=i[e].properties;if(Object(s.default)(n))for(const e in n)if(n.hasOwnProperty(e)){const i=n[e].texture;i.index>t&&--i.index}}}},c.accessor=function(e){const t={};return n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){n.a.meshPrimitiveAttribute(e,(function(e){t[e]=!0})),n.a.meshPrimitiveTarget(e,(function(e){n.a.meshPrimitiveTargetAttribute(e,(function(e){t[e]=!0}))}));const i=e.indices;Object(s.default)(i)&&(t[i]=!0)}))})),n.a.skin(e,(function(e){Object(s.default)(e.inverseBindMatrices)&&(t[e.inverseBindMatrices]=!0)})),n.a.animation(e,(function(e){n.a.animationSampler(e,(function(e){Object(s.default)(e.input)&&(t[e.input]=!0),Object(s.default)(e.output)&&(t[e.output]=!0)}))})),Object(r.a)(e,"EXT_mesh_gpu_instancing")&&n.a.node(e,(function(e){Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.EXT_mesh_gpu_instancing)&&Object.keys(e.extensions.EXT_mesh_gpu_instancing.attributes).forEach((function(i){const n=e.extensions.EXT_mesh_gpu_instancing.attributes[i];t[n]=!0}))})),t},c.buffer=function(e){const t={};return n.a.bufferView(e,(function(e){Object(s.default)(e.buffer)&&(t[e.buffer]=!0),Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.EXT_meshopt_compression)&&(t[e.extensions.EXT_meshopt_compression.buffer]=!0)})),t},c.bufferView=function(e){const t={};if(n.a.accessor(e,(function(e){Object(s.default)(e.bufferView)&&(t[e.bufferView]=!0)})),n.a.shader(e,(function(e){Object(s.default)(e.bufferView)&&(t[e.bufferView]=!0)})),n.a.image(e,(function(e){Object(s.default)(e.bufferView)&&(t[e.bufferView]=!0)})),Object(r.a)(e,"KHR_draco_mesh_compression")&&n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.KHR_draco_mesh_compression)&&(t[e.extensions.KHR_draco_mesh_compression.bufferView]=!0)}))})),Object(r.a)(e,"EXT_feature_metadata")){const i=e.extensions.EXT_feature_metadata.featureTables;for(const e in i)if(i.hasOwnProperty(e)){const n=i[e].properties;if(Object(s.default)(n))for(const e in n)if(n.hasOwnProperty(e)){const i=n[e];Object(s.default)(i.bufferView)&&(t[i.bufferView]=!0),Object(s.default)(i.arrayOffsetBufferView)&&(t[i.arrayOffsetBufferView]=!0),Object(s.default)(i.stringOffsetBufferView)&&(t[i.stringOffsetBufferView]=!0)}}}return t},c.image=function(e){const t={};return n.a.texture(e,(function(e){Object(s.default)(e.source)&&(t[e.source]=!0),Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.EXT_texture_webp)?t[e.extensions.EXT_texture_webp.source]=!0:Object(s.default)(e.extensions)&&Object(s.default)(e.extensions.KHR_texture_basisu)&&(t[e.extensions.KHR_texture_basisu.source]=!0)})),t},c.mesh=function(e){const t={};return n.a.node(e,(function(i){if(Object(s.default)(i.mesh&&Object(s.default)(e.meshes))){const n=e.meshes[i.mesh];Object(s.default)(n)&&Object(s.default)(n.primitives)&&n.primitives.length>0&&(t[i.mesh]=!0)}})),t},c.node=function(e){const t={};return n.a.skin(e,(function(e){Object(s.default)(e.skeleton)&&(t[e.skeleton]=!0),n.a.skinJoint(e,(function(e){t[e]=!0}))})),n.a.animation(e,(function(e){n.a.animationChannel(e,(function(e){Object(s.default)(e.target)&&Object(s.default)(e.target.node)&&(t[e.target.node]=!0)}))})),n.a.technique(e,(function(e){n.a.techniqueUniform(e,(function(e){Object(s.default)(e.node)&&(t[e.node]=!0)}))})),n.a.node(e,(function(i,n){(function e(t,i,n){const a=t.nodes[i];return!(Object(s.default)(a.mesh)||Object(s.default)(a.camera)||Object(s.default)(a.skin)||Object(s.default)(a.weights)||Object(s.default)(a.extras)||Object(s.default)(a.extensions)&&0!==Object.keys(a.extensions).length||Object(s.default)(n[i]))&&(!Object(s.default)(a.children)||0===a.children.filter((function(i){return!e(t,i,n)})).length)})(e,n,t)||(t[n]=!0)})),t},c.material=function(e){const t={};return n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){Object(s.default)(e.material)&&(t[e.material]=!0)}))})),t},c.texture=function(e){const t={};if(n.a.material(e,(function(e){Object(a.a)(e,(function(e){t[e]=!0}))})),Object(r.a)(e,"EXT_feature_metadata")){n.a.mesh(e,(function(e){n.a.meshPrimitive(e,(function(e){const i=e.extensions;if(Object(s.default)(i)&&Object(s.default)(i.EXT_feature_metadata)){const e=i.EXT_feature_metadata.featureIdTextures;if(Object(s.default)(e)){const i=e.length;for(let n=0;n<i;++n){const i=e[n].featureIds.texture;t[i.index]=!0}}}}))}));const i=e.extensions.EXT_feature_metadata.featureTextures;for(const e in i)if(i.hasOwnProperty(e)){const n=i[e].properties;if(Object(s.default)(n))for(const e in n)if(n.hasOwnProperty(e)){const i=n[e].texture;t[i.index]=!0}}}return t},c.sampler=function(e){const t={};return n.a.texture(e,(function(e){Object(s.default)(e.sampler)&&(t[e.sampler]=!0)})),t},t.a=function(e,t){return t=Object(o.default)(t,l),l.forEach((function(i){t.indexOf(i)>-1&&function(e,t){const i=e[u[t]];if(Object(s.default)(i)){let n=0;const a=c[t](e),r=i.length;for(let i=0;i<r;++i)a[i]||(d[t](e,i-n),n++)}}(e,i)})),e}},function(e,t,i){"use strict";var n=i(862),a=i(25),r=i(863),o=i(11),s=i(10);function l(e,t,i){const a=o.default.createTypedArray(i,Object(r.a)(e,t)),s=new Uint8Array(a.buffer);t.bufferView=Object(n.a)(e,s),t.componentType=i,t.byteOffset=0}t.a=function(e){let t;return a.a.accessorWithSemantic(e,"JOINTS_0",(function(i){const n=e.accessors[i];t=n.componentType,t===s.a.BYTE?l(e,n,o.default.UNSIGNED_BYTE):t!==s.a.UNSIGNED_BYTE&&t!==s.a.UNSIGNED_SHORT&&l(e,n,o.default.UNSIGNED_SHORT)})),a.a.accessorWithSemantic(e,"WEIGHTS_0",(function(i){const n=e.accessors[i];t=n.componentType,t===s.a.BYTE?l(e,n,o.default.UNSIGNED_BYTE):t===s.a.SHORT&&l(e,n,o.default.UNSIGNED_SHORT)})),e}},function(e,t,i){"use strict";var n=i(144);t.a=function(e,t){const i={byteLength:t.length,extras:{_pipeline:{source:t}}},a={buffer:Object(n.a)(e.buffers,i),byteOffset:0,byteLength:t.length};return Object(n.a)(e.bufferViews,a)}},function(e,t,i){"use strict";var n=i(191),a=i(363),r=i(192),o=i(68),s=i(11),l=i(0);t.a=function(e,t){const i=Object(n.a)(e,t),u=s.default.getSizeInBytes(t.componentType),d=Object(r.a)(t.type),c=t.count,f=new Array(d*c);if(!Object(l.default)(t.bufferView))return Object(o.a)(f,0),f;const h=e.bufferViews[t.bufferView],p=e.buffers[h.buffer].extras._pipeline.source;let m=t.byteOffset+h.byteOffset+p.byteOffset;const _=new DataView(p.buffer),g=new Array(d),v=Object(a.a)(t.componentType);for(let e=0;e<c;++e){v(_,m,d,u,g);for(let t=0;t<d;++t)f[e*d+t]=g[t];m+=i}return f}},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(27),s=i(175);function l(e){var t=(e=Object(n.default)(e,n.default.EMPTY_OBJECT)).points,i=e.times;if(!Object(a.default)(t)||!Object(a.default)(i))throw new r.default("points and times are required.");if(t.length<2)throw new r.default("points.length must be greater than or equal to 2.");if(i.length!==t.length)throw new r.default("times.length must be equal to points.length.");this._times=i,this._points=t,this._evaluateFunction=function(e){var t=e.points,i=e.times;return function(n,r){Object(a.default)(r)||(r=new o.default);var s=e._lastTimeIndex=e.findTimeInterval(n,e._lastTimeIndex),l=(n-i[s])/(i[s+1]-i[s]),u=t[s],d=t[s+1];return o.default.fastSlerp(u,d,l,r)}}(this),this._lastTimeIndex=0}Object.defineProperties(l.prototype,{times:{get:function(){return this._times}},points:{get:function(){return this._points}}}),l.prototype.findTimeInterval=s.a.prototype.findTimeInterval,l.prototype.wrapTime=s.a.prototype.wrapTime,l.prototype.clampTime=s.a.prototype.clampTime,l.prototype.evaluate=function(e,t){return this._evaluateFunction(e,t)},t.a=l},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(3),s=i(175);function l(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).weights,i=e.times;if(n.a.defined("weights",t),n.a.defined("times",i),n.a.typeOf.number.greaterThanOrEquals("weights.length",t.length,3),t.length%i.length!=0)throw new o.default("times.length must be a factor of weights.length.");this._times=i,this._weights=t,this._count=t.length/i.length,this._lastTimeIndex=0}Object.defineProperties(l.prototype,{times:{get:function(){return this._times}},weights:{get:function(){return this._weights}}}),l.prototype.findTimeInterval=s.a.prototype.findTimeInterval,l.prototype.wrapTime=s.a.prototype.wrapTime,l.prototype.clampTime=s.a.prototype.clampTime,l.prototype.evaluate=function(e,t){var i=this.weights,n=this.times,a=this._lastTimeIndex=this.findTimeInterval(e,this._lastTimeIndex),o=(e-n[a])/(n[a+1]-n[a]);Object(r.default)(t)||(t=new Array(this._count));for(var s=0;s<this._count;s++){var l=a*this._count+s;t[s]=i[l]*(1-o)+i[l+this._count]*o}return t},t.a=l},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(24),s=i(14),l=i(5),u=i(867),d=i(209),c=i(343);function f(e){this.animationAdded=new o.default,this.animationRemoved=new o.default,this._model=e,this._scheduledAnimations=[],this._previousTime=void 0}function h(e,t,i){var n=e._model,a=n._runtime.animations[t],r=new u.a(i,n,a);return e._scheduledAnimations.push(r),e.animationAdded.raiseEvent(n,r),r}function p(e,t){for(var i=e.channelEvaluators,n=i.length,a=0;a<n;++a)i[a](t)}Object.defineProperties(f.prototype,{length:{get:function(){return this._scheduledAnimations.length}}}),f.prototype.add=function(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT);var t,i=this._model._runtime.animations;if(!Object(a.default)(i))throw new r.default("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(!Object(a.default)(e.name)&&!Object(a.default)(e.index))throw new r.default("Either options.name or options.index must be defined.");if(Object(a.default)(e.multiplier)&&e.multiplier<=0)throw new r.default("options.multiplier must be greater than zero.");if(Object(a.default)(e.index)&&(e.index>=i.length||e.index<0))throw new r.default("options.index must be a valid animation index.");if(Object(a.default)(e.index))return h(this,e.index,e);for(var o=i.length,s=0;s<o;++s)if(i[s].name===e.name){t=s;break}if(!Object(a.default)(t))throw new r.default("options.name must be a valid animation name.");return h(this,t,e)},f.prototype.addAll=function(e){if(e=Object(n.default)(e,n.default.EMPTY_OBJECT),!Object(a.default)(this._model._runtime.animations))throw new r.default("Animations are not loaded. Wait for Model.readyPromise to resolve.");if(Object(a.default)(e.multiplier)&&e.multiplier<=0)throw new r.default("options.multiplier must be greater than zero.");for(var t=[],i=this._model._runtime.animations.length,o=0;o<i;++o)t.push(h(this,o,e));return t},f.prototype.remove=function(e){if(Object(a.default)(e)){var t=this._scheduledAnimations,i=t.indexOf(e);if(-1!==i)return t.splice(i,1),this.animationRemoved.raiseEvent(this._model,e),!0}return!1},f.prototype.removeAll=function(){var e=this._model,t=this._scheduledAnimations,i=t.length;this._scheduledAnimations=[];for(var n=0;n<i;++n)this.animationRemoved.raiseEvent(e,t[n])},f.prototype.contains=function(e){return!!Object(a.default)(e)&&-1!==this._scheduledAnimations.indexOf(e)},f.prototype.get=function(e){if(!Object(a.default)(e))throw new r.default("index is required.");return this._scheduledAnimations[e]};var m=[];function _(e,t,i){return function(){e.animationRemoved.raiseEvent(t,i)}}f.prototype.update=function(e){var t=this._scheduledAnimations,i=t.length;if(0===i)return this._previousTime=void 0,!1;if(s.default.equals(e.time,this._previousTime))return!1;this._previousTime=s.default.clone(e.time,this._previousTime);for(var r=!1,o=e.time,u=this._model,f=0;f<i;++f){var h=t[f],g=h._runtimeAnimation;Object(a.default)(h._computedStartTime)||(h._computedStartTime=s.default.addSeconds(Object(n.default)(h.startTime,o),h.delay,new s.default)),Object(a.default)(h._duration)||(h._duration=g.stopTime*(1/h.multiplier));var v=h._computedStartTime,y=h._duration,b=h.stopTime,w=0!==y?s.default.secondsDifference(o,v)/y:0;0!==y&&Object(a.default)(b)&&s.default.greaterThan(o,b)&&(w=s.default.secondsDifference(b,v)/y);var O=w>=0,x=h.loop===d.a.REPEAT||h.loop===d.a.MIRRORED_REPEAT,A=(O||x&&!Object(a.default)(h.startTime))&&(w<=1||x)&&(!Object(a.default)(b)||s.default.lessThanOrEquals(o,b));if(A||h._state===c.a.ANIMATING){if(A&&h._state===c.a.STOPPED&&(h._state=c.a.ANIMATING,h.start.numberOfListeners>0&&e.afterRender.push(h._raiseStartEvent)),h.loop===d.a.REPEAT)w-=Math.floor(w);else if(h.loop===d.a.MIRRORED_REPEAT){var T=Math.floor(w),E=w-T;w=T%2==1?1-E:E}h.reverse&&(w=1-w);var C=w*y*h.multiplier;p(g,C=l.default.clamp(C,g.startTime,g.stopTime)),h.update.numberOfListeners>0&&(h._updateEventTime=C,e.afterRender.push(h._raiseUpdateEvent)),r=!0,A||(h._state=c.a.STOPPED,h.stop.numberOfListeners>0&&e.afterRender.push(h._raiseStopEvent),h.removeOnStop&&m.push(h))}}i=m.length;for(var S=0;S<i;++S){var M=m[S];t.splice(t.indexOf(M),1),e.afterRender.push(_(this,u,M))}return m.length=0,r},t.a=f},function(e,t,i){"use strict";var n=i(2),a=i(24),r=i(14),o=i(209),s=i(343);function l(e,t,i){this._name=i.name,this._startTime=r.default.clone(e.startTime),this._delay=Object(n.default)(e.delay,0),this._stopTime=e.stopTime,this.removeOnStop=Object(n.default)(e.removeOnStop,!1),this._multiplier=Object(n.default)(e.multiplier,1),this._reverse=Object(n.default)(e.reverse,!1),this._loop=Object(n.default)(e.loop,o.a.NONE),this.start=new a.default,this.update=new a.default,this.stop=new a.default,this._state=s.a.STOPPED,this._runtimeAnimation=i,this._computedStartTime=void 0,this._duration=void 0;var l=this;this._raiseStartEvent=function(){l.start.raiseEvent(t,l)},this._updateEventTime=0,this._raiseUpdateEvent=function(){l.update.raiseEvent(t,l,l._updateEventTime)},this._raiseStopEvent=function(){l.stop.raiseEvent(t,l)}}Object.defineProperties(l.prototype,{name:{get:function(){return this._name}},startTime:{get:function(){return this._startTime}},delay:{get:function(){return this._delay}},stopTime:{get:function(){return this._stopTime}},multiplier:{get:function(){return this._multiplier}},reverse:{get:function(){return this._reverse}},loop:{get:function(){return this._loop}}}),t.a=l},function(e,t,i){"use strict";var n=i(0),a=i(3);function r(e,t,i){this._name=t.name,this._id=i,this._uniformMap=e._uniformMaps[i],this._technique=void 0,this._program=void 0,this._values=void 0}Object.defineProperties(r.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}}}),r.prototype.setValue=function(e,t){if(!Object(n.default)(e))throw new a.default("name is required.");var i="u_"+e,r=this._uniformMap.values[i];if(!Object(n.default)(r))throw new a.default("name must match a parameter name in the material's technique that is targetable and not optimized out.");r.value=r.clone(t,r.value)},r.prototype.getValue=function(e){if(!Object(n.default)(e))throw new a.default("name is required.");var t="u_"+e,i=this._uniformMap.values[t];if(Object(n.default)(i))return i.value},t.a=r},function(e,t,i){"use strict";function n(e,t,i){for(var n=[],a=e.primitives,r=a.length,o=0;o<r;++o){var s=a[o];n[o]=t[s.material]}this._name=e.name,this._materials=n,this._id=i}Object.defineProperties(n.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},materials:{get:function(){return this._materials}}}),t.a=n},function(e,t,i){"use strict";var n=i(6);function a(e,t,i,a,r){this._model=e,this._runtimeNode=i,this._name=t.name,this._id=a,this.useMatrix=!1,this._show=!0,this._matrix=n.default.clone(r),this._originalMatrix=n.default.clone(r)}Object.defineProperties(a.prototype,{name:{get:function(){return this._name}},id:{get:function(){return this._id}},show:{get:function(){return this._show},set:function(e){this._show!==e&&(this._show=e,this._model._perNodeShowDirty=!0)}},matrix:{get:function(){return this._matrix},set:function(e){this._matrix=n.default.clone(e,this._matrix),this.useMatrix=!0;var t=this._model;t._cesiumAnimationsDirty=!0,this._runtimeNode.dirtyNumber=t._maxDirtyNumber}},originalMatrix:{get:function(){return this._originalMatrix}}}),a.prototype.setMatrix=function(e){n.default.clone(e,this._matrix)},t.a=a},function(e,t,i){"use strict";var n=i(47),a=i(17),r=i(0),o=i(19),s=i(3),l=i(6),u=i(30),d=i(269),c=i(48),f=i(9),h=new l.default;function p(e,t){if(!Object(r.default)(e))throw new s.default("scene is required.");if(!Object(r.default)(t))throw new s.default("entityCollection is required.");t.collectionChanged.addEventListener(p.prototype._onCollectionChanged,this),this._scene=e,this._primitives=e.primitives,this._entityCollection=t,this._tilesetHash={},this._entitiesToVisualize=new n.default,this._onCollectionChanged(t,t.values,[],[])}function m(e,t,i,n){var a=i[t.id];Object(r.default)(a)&&(n.removeAndDestroy(a.tilesetPrimitive),delete i[t.id])}function _(e,t,i){e.readyPromise.otherwise((function(e){console.error(e),i[t.id].loadFail=!0}))}p.prototype.update=function(e){if(!Object(r.default)(e))throw new s.default("time is required.");for(var t=this._entitiesToVisualize.values,i=this._tilesetHash,n=this._primitives,a=0,o=t.length;a<o;a++){var l,c,p=t[a],m=p._tileset,g=i[p.id],v=p.isShowing&&p.isAvailable(e)&&f.default.getValueOrDefault(m._show,e,!0);if(v&&(c=p.computeModelMatrix(e,h),l=u.default.createIfNeeded(f.default.getValueOrUndefined(m._uri,e))),v){var y=Object(r.default)(g)?g.tilesetPrimitive:void 0;Object(r.default)(y)&&l.url===g.url||(Object(r.default)(y)&&(n.removeAndDestroy(y),delete i[p.id]),(y=new d.a({url:l})).id=p,n.add(y),g={tilesetPrimitive:y,url:l.url,loadFail:!1},i[p.id]=g,_(y,p,i)),y.show=!0,Object(r.default)(c)&&(y.modelMatrix=c),y.maximumScreenSpaceError=f.default.getValueOrDefault(m.maximumScreenSpaceError,e,y.maximumScreenSpaceError)}else Object(r.default)(g)&&(g.tilesetPrimitive.show=!1)}return!0},p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(p.prototype._onCollectionChanged,this);for(var e=this._entitiesToVisualize.values,t=this._tilesetHash,i=this._primitives,n=e.length-1;n>-1;n--)m(this,e[n],t,i);return Object(o.default)(this)},p.prototype.getBoundingSphere=function(e,t){if(!Object(r.default)(e))throw new s.default("entity is required.");if(!Object(r.default)(t))throw new s.default("result is required.");var i=this._tilesetHash[e.id];if(!Object(r.default)(i)||i.loadFail)return c.a.FAILED;var n=i.tilesetPrimitive;return Object(r.default)(n)&&n.show?n.ready?(a.default.clone(n.boundingSphere,t),c.a.DONE):c.a.PENDING:c.a.FAILED},p.prototype._onCollectionChanged=function(e,t,i,n){var a,o,s=this._entitiesToVisualize,l=this._tilesetHash,u=this._primitives;for(a=t.length-1;a>-1;a--)o=t[a],Object(r.default)(o._tileset)&&s.set(o.id,o);for(a=n.length-1;a>-1;a--)o=n[a],Object(r.default)(o._tileset)?s.set(o.id,o):(m(this,o,l,u),s.remove(o.id));for(a=i.length-1;a>-1;a--)m(this,o=i[a],l,u),s.remove(o.id)},t.a=p},function(e,t,i){"use strict";t.a={enableModelExperimental:!1}},function(e,t,i){"use strict";var n=i(1),a=i(7),r=i(11),o=i(0),s=i(214),l=i(19),u=i(3),d=i(6),c=i(157),f=i(26),h=i(90),p=i(462),m=i(237),_=i(173),g=i(266),v=i(874),y=i(250),b=i(209),w=i(73);function O(e,t,i,a,s){this._tileset=e,this._tile=t,this._resource=i,this._model=void 0,this._batchTable=void 0,this._features=void 0,this._classificationType=e.vectorClassificationOnly?void 0:e.classificationType,this._batchIdAttributeName=void 0,this._diffuseAttributeOrUniformName={},this._rtcCenterTransform=void 0,this._contentModelMatrix=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t,i){var a=e._tileset,s=e._tile,l=e._resource,u=p.a.parse(t,i),_=u.batchLength,w=u.featureTableJson,O=u.featureTableBinary,C=new g.a(w,O);_=C.getGlobalProperty("BATCH_LENGTH"),C.featuresLength=_;var S,M=u.batchTableJson,D=u.batchTableBinary;Object(o.default)(e._classificationType)&&(S=function(e){return function(t,i){e._model.updateCommands(t,i)}}(e));var P=new m.a(e,_,M,D,S);e._batchTable=P;var I=u.gltf,L={content:e,primitive:a};e._rtcCenterTransform=d.default.IDENTITY;var j=C.getGlobalProperty("RTC_CENTER",r.default.FLOAT,3);Object(o.default)(j)&&(e._rtcCenterTransform=d.default.fromTranslation(n.default.fromArray(j)));e._contentModelMatrix=d.default.multiply(s.computedTransform,e._rtcCenterTransform,new d.default),Object(o.default)(e._classificationType)?e._model=new v.a({gltf:I,cull:!1,basePath:l,requestType:c.a.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:a._gltfUpAxis,forwardAxis:h.a.X,debugWireframe:a.debugWireframe,vertexShaderLoaded:x(e),classificationShaderLoaded:E(e),uniformMapLoaded:P.getUniformMapCallback(),pickIdLoaded:T(e),classificationType:e._classificationType,batchTable:P}):(e._model=new y.default({gltf:I,cull:!1,releaseGltfJson:!0,opaquePass:f.default.CESIUM_3D_TILE,basePath:l,requestType:c.a.TILES3D,modelMatrix:e._contentModelMatrix,upAxis:a._gltfUpAxis,forwardAxis:h.a.X,shadows:a.shadows,debugWireframe:a.debugWireframe,incrementallyLoadTextures:!1,vertexShaderLoaded:x(e),fragmentShaderLoaded:A(e),uniformMapLoaded:P.getUniformMapCallback(),pickIdLoaded:T(e),addBatchIdToGeneratedShaders:_>0,pickObject:L,imageBasedLightingFactor:a.imageBasedLightingFactor,lightColor:a.lightColor,luminanceAtZenith:a.luminanceAtZenith,sphericalHarmonicCoefficients:a.sphericalHarmonicCoefficients,specularEnvironmentMaps:a.specularEnvironmentMaps,backFaceCulling:a.backFaceCulling,showOutline:a.showOutline}),e._model.readyPromise.then((function(e){e.activeAnimations.addAll({loop:b.a.REPEAT})})))}(this,a,s)}function x(e){return function(t,i){var n=e._batchTable,a=!Object(o.default)(e._classificationType),r=e._model.gltf;Object(o.default)(r)&&(e._batchIdAttributeName=function(e){var t=w.a.getAttributeOrUniformBySemantic(e,"_BATCHID");return Object(o.default)(t)||(t=w.a.getAttributeOrUniformBySemantic(e,"BATCHID"),Object(o.default)(t)&&O._deprecationWarning("b3dm-legacy-batchid","The glTF in this b3dm uses the semantic `BATCHID`. Application-specific semantics should be prefixed with an underscore: `_BATCHID`.")),t}(r),e._diffuseAttributeOrUniformName[i]=w.a.getDiffuseAttributeOrUniform(r,i));var s=n.getVertexShaderCallback(a,e._batchIdAttributeName,e._diffuseAttributeOrUniformName[i]);return Object(o.default)(s)?s(t):t}}function A(e){return function(t,i){var n=e._batchTable,a=!Object(o.default)(e._classificationType),r=e._model.gltf;Object(o.default)(r)&&(e._diffuseAttributeOrUniformName[i]=w.a.getDiffuseAttributeOrUniform(r,i));var s=n.getFragmentShaderCallback(a,e._diffuseAttributeOrUniformName[i],!1);return Object(o.default)(s)?s(t):t}}function T(e){return function(){return e._batchTable.getPickId()}}function E(e){return function(t){var i=e._batchTable.getClassificationFragmentShaderCallback();return Object(o.default)(i)?i(t):t}}O._deprecationWarning=s.a,Object.defineProperties(O.prototype,{featuresLength:{get:function(){return this.batchTable.featuresLength}},pointsLength:{get:function(){return this._model.pointsLength}},trianglesLength:{get:function(){return this._model.trianglesLength}},geometryByteLength:{get:function(){return this._model.geometryByteLength}},texturesByteLength:{get:function(){return this._model.texturesByteLength}},batchTableByteLength:{get:function(){return this.batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._model.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}}),O.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},O.prototype.getFeature=function(e){var t=this.featuresLength;if(!Object(o.default)(e)||e<0||e>=t)throw new u.default("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return function(e){var t=e.featuresLength;if(!Object(o.default)(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new _.a(e,n);e._features=i}}(this),this._features[e]},O.prototype.applyDebugSettings=function(e,t){t=e?t:a.default.WHITE,0===this.featuresLength?this._model.color=t:this._batchTable.setAllColor(t)},O.prototype.applyStyle=function(e){if(0===this.featuresLength){var t=Object(o.default)(e)&&Object(o.default)(e.color),i=Object(o.default)(e)&&Object(o.default)(e.show);this._model.color=t?e.color.evaluateColor(void 0,this._model.color):a.default.clone(a.default.WHITE,this._model.color),this._model.show=!i||e.show.evaluate(void 0)}else this._batchTable.applyStyle(e)},O.prototype.update=function(e,t){var i=t.commandList.length,n=this._model,a=this._tile,r=this._batchTable;r.update(e,t),this._contentModelMatrix=d.default.multiply(a.computedTransform,this._rtcCenterTransform,this._contentModelMatrix),n.modelMatrix=this._contentModelMatrix,n.shadows=e.shadows,n.imageBasedLightingFactor=e.imageBasedLightingFactor,n.lightColor=e.lightColor,n.luminanceAtZenith=e.luminanceAtZenith,n.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,n.specularEnvironmentMaps=e.specularEnvironmentMaps,n.backFaceCulling=e.backFaceCulling,n.debugWireframe=e.debugWireframe;var s=e.clippingPlanes;n.referenceMatrix=e.clippingPlanesOriginMatrix,Object(o.default)(s)&&a.clippingPlanesDirty&&(n._clippingPlanes=s.enabled&&a._isClipped?s:void 0),Object(o.default)(s)&&Object(o.default)(n._clippingPlanes)&&n._clippingPlanes!==s&&(n._clippingPlanes=s),n.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&!Object(o.default)(this._classificationType)&&r.addDerivedCommands(t,i)},O.prototype.isDestroyed=function(){return!1},O.prototype.destroy=function(){return this._model=this._model&&this._model.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(l.default)(this)},t.a=O},function(e,t,i){"use strict";var n=i(113),a=i(17),r=i(1),o=i(16),s=i(7),l=i(60),u=i(11),d=i(2),c=i(0),f=i(19),h=i(3),p=i(59),m=i(38),_=i(6),g=i(35),v=i(23),y=i(52),b=i(10),w=i(361),O=i(25),x=i(191),A=i(192),T=i(335),E=i(362),C=i(18),S=i(90),M=i(458),D=i(73),P=i(459),I=i(460),L=i(13),j=i(270),R=i(364),N=new r.default,B=D.a.ModelState;function F(e){var t=(e=Object(d.default)(e,d.default.EMPTY_OBJECT)).gltf;if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),!(t instanceof Uint8Array))throw new v.a("Only binary glTF is supported as a classifier.");t=Object(T.a)(t),Object(E.a)(t),Object(w.a)(t),Object(P.a)(t),Object(I.a)(t),O.a.buffer(t,(function(e){if(!Object(c.default)(e.extras._pipeline.source))throw new v.a("Buffer data must be embedded in the binary gltf.")}));var i=t.nodes,n=t.meshes,r=i[0].mesh;if(1!==i.length||!Object(c.default)(r))throw new v.a("Only one node is supported for classification and it must have a mesh.");if(1!==n.length)throw new v.a("Only one mesh is supported when using b3dm for classification.");var o=n[0].primitives;if(1!==o.length)throw new v.a("Only one primitive per mesh is supported when using b3dm for classification.");var s=o[0].attributes.POSITION;if(!Object(c.default)(s))throw new v.a("The mesh must have a position attribute.");var l=o[0].attributes._BATCHID;if(!Object(c.default)(l))throw new v.a("The mesh must have a batch id attribute.");this._gltf=t,this.show=Object(d.default)(e.show,!0),this.modelMatrix=_.default.clone(Object(d.default)(e.modelMatrix,_.default.IDENTITY)),this._modelMatrix=_.default.clone(this.modelMatrix),this._ready=!1,this._readyPromise=C.a.defer(),this.debugShowBoundingVolume=Object(d.default)(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=Object(d.default)(e.debugWireframe,!1),this._debugWireframe=!1,this._classificationType=e.classificationType,this._vertexShaderLoaded=e.vertexShaderLoaded,this._classificationShaderLoaded=e.classificationShaderLoaded,this._uniformMapLoaded=e.uniformMapLoaded,this._pickIdLoaded=e.pickIdLoaded,this._ignoreCommands=Object(d.default)(e.ignoreCommands,!1),this._upAxis=Object(d.default)(e.upAxis,S.a.Y),this._batchTable=e.batchTable,this._computedModelMatrix=new _.default,this._initialRadius=void 0,this._boundingSphere=void 0,this._scaledBoundingSphere=new a.default,this._state=B.NEEDS_LOAD,this._loadResources=void 0,this._mode=void 0,this._dirty=!1,this._nodeMatrix=new _.default,this._primitive=void 0,this._extensionsUsed=void 0,this._extensionsRequired=void 0,this._quantizedUniforms=void 0,this._buffers={},this._vertexArray=void 0,this._shaderProgram=void 0,this._uniformMap=void 0,this._geometryByteLength=0,this._trianglesLength=0,this._rtcCenter=void 0,this._rtcCenterEye=void 0,this._rtcCenter3D=void 0,this._rtcCenter2D=void 0}function k(e,t){var i=t._loadResources,n=t.gltf.bufferViews[e],a=i.getBuffer(n);t._buffers[e]=a,t._geometryByteLength+=a.byteLength}function z(e,t,i){var n=i._loadResources,a=i.gltf.bufferViews[e],r={typedArray:n.getBuffer(a),indexDatatype:t};i._buffers[e]=r,i._geometryByteLength+=r.typedArray.byteLength}function U(e,t){return Object(c.default)(t)&&(e=t(e)),e}function V(e){var t=e.gltf,i=D.a.getAttributeOrUniformBySemantic(t,"POSITION"),n=D.a.getAttributeOrUniformBySemantic(t,"_BATCHID"),a={};a[i]=0,a[n]=1;var r,o,s=D.a.getAttributeOrUniformBySemantic(t,"MODELVIEWPROJECTION");if(Object(c.default)(s))r="uniform mat4 "+s+";\n",o=s+" * vec4("+i+", 1.0)";else{var l=D.a.getAttributeOrUniformBySemantic(t,"PROJECTION"),u=D.a.getAttributeOrUniformBySemantic(t,"MODELVIEW");Object(c.default)(u)||(u=D.a.getAttributeOrUniformBySemantic(t,"CESIUM_RTC_MODELVIEW")),r="uniform mat4 "+u+";\nuniform mat4 "+l+";\n",o=l+" * "+u+" * vec4("+i+", 1.0)"}var d="attribute vec3 "+i+";\nattribute float "+n+";\n"+r+"void main() {\n"+(" vec4 positionInClipCoords = "+o+";\n")+" gl_Position = czm_depthClamp(positionInClipCoords);\n}\n";e.extensionsUsed.WEB3D_quantized_attributes&&(d=function(e,t){var i=t.gltf.meshes[0].primitives[0],n=D.a.modifyShaderForQuantizedAttributes(t.gltf,i,e);return t._quantizedUniforms=n.uniforms,n.shader}(d,e));var f=U(d,e._vertexShaderLoaded),h=U("#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\nvoid main() \n{ \n gl_FragColor = vec4(1.0); \n czm_writeDepthClamp();\n}\n",e._classificationShaderLoaded);e._shaderProgram={vertexShaderSource:f,fragmentShaderSource:h,attributeLocations:a}}Object.defineProperties(F.prototype,{gltf:{get:function(){return this._gltf}},boundingSphere:{get:function(){if(this._state!==B.LOADED)throw new h.default("The model is not loaded. Use ClassificationModel.readyPromise or wait for ClassificationModel.ready to be true.");var e=this.modelMatrix,t=_.default.getScale(e,N),i=this._scaledBoundingSphere;return i.center=r.default.multiplyComponents(this._boundingSphere.center,t,i.center),i.radius=r.default.maximumComponent(t)*this._initialRadius,Object(c.default)(this._rtcCenter)&&r.default.add(this._rtcCenter,i.center,i.center),i}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},dirty:{get:function(){return this._dirty}},extensionsUsed:{get:function(){return Object(c.default)(this._extensionsUsed)||(this._extensionsUsed=D.a.getUsedExtensions(this.gltf)),this._extensionsUsed}},extensionsRequired:{get:function(){return Object(c.default)(this._extensionsRequired)||(this._extensionsRequired=D.a.getRequiredExtensions(this.gltf)),this._extensionsRequired}},upAxis:{get:function(){return this._upAxis}},trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},texturesByteLength:{get:function(){return 0}},classificationType:{get:function(){return this._classificationType}}});var H={PROJECTION:function(e,t){return D.a.getGltfSemanticUniforms().PROJECTION(e,t)},MODELVIEW:function(e,t){return D.a.getGltfSemanticUniforms().MODELVIEW(e,t)},CESIUM_RTC_MODELVIEW:function(e,t){return D.a.getGltfSemanticUniforms().CESIUM_RTC_MODELVIEW(e,t)},MODELVIEWPROJECTION:function(e,t){return D.a.getGltfSemanticUniforms().MODELVIEWPROJECTION(e,t)}};function G(e){var t,i,o=e._batchTable,d=e._uniformMap,f=e._vertexArray,h=e.gltf,p=h.accessors,v=h.meshes[0].primitives[0],y=p[v.indices],b=v.attributes.POSITION,w=D.a.getAccessorMinMax(h,b),O=a.default.fromCornerPoints(r.default.fromArray(w.min),r.default.fromArray(w.max));Object(c.default)(y)?(i=y.count,t=y.byteOffset/m.a.getSizeInBytes(y.componentType)):(i=p[v.attributes.POSITION].count,t=0);if(e._trianglesLength+=function(e,t){switch(e.mode){case g.default.TRIANGLES:return t/3;case g.default.TRIANGLE_STRIP:case g.default.TRIANGLE_FAN:return Math.max(t-2,0);default:return 0}}(v,i),Object(c.default)(e._uniformMapLoaded)&&(d=e._uniformMapLoaded(d)),e.extensionsUsed.WEB3D_quantized_attributes){var x=function(e,t){return D.a.createUniformsForQuantizedAttributes(e.gltf,t,e._quantizedUniforms)}(e,v);d=Object(l.default)(d,x)}var A=f.attributes.POSITION,T=A.componentDatatype,E=A.vertexBuffer,C=E.byteOffset,S=E.byteLength/u.default.getSizeInBytes(T),M=u.default.createArrayBufferView(T,E.buffer,C,S);T=(A=f.attributes._BATCHID).componentDatatype,C=(E=A.vertexBuffer).byteOffset,S=E.byteLength/u.default.getSizeInBytes(T);var P,I=u.default.createArrayBufferView(T,E.buffer,C,S),L=f.indexBuffer.typedArray;P=f.indexBuffer.indexDatatype===m.a.UNSIGNED_SHORT?new Uint16Array(L.buffer,L.byteOffset,L.byteLength/Uint16Array.BYTES_PER_ELEMENT):new Uint32Array(L.buffer,L.byteOffset,L.byteLength/Uint32Array.BYTES_PER_ELEMENT),M=Object(n.a)(M);var N,B,F,k=[],z=[],U=[],V=[],H=(I=Object(n.a)(I))[(P=Object(n.a)(P,t,t+i))[0]];k.push(H),U.push(0);for(var G=P.length,Y=1;Y<G;++Y)(N=I[P[Y]])!==H&&(F=Y-(B=U[U.length-1]),k.push(N),z.push(F),U.push(Y),V.push(new j.a({offset:B,count:F,batchIds:[H],color:s.default.WHITE})),H=N);F=G-(B=U[U.length-1]),z.push(F),V.push(new j.a({offset:B,count:F,batchIds:[H],color:s.default.WHITE}));var W=e._shaderProgram,q=W.vertexShaderSource,X=W.fragmentShaderSource,K=W.attributeLocations,J=Object(c.default)(e._pickIdLoaded)?e._pickIdLoaded():void 0;e._primitive=new R.a({classificationType:e._classificationType,positions:M,indices:P,indexOffsets:U,indexCounts:z,batchIds:k,vertexBatchIds:I,batchedIndices:V,batchTable:o,boundingVolume:new a.default,_vertexShaderSource:q,_fragmentShaderSource:X,_attributeLocations:K,_uniformMap:d,_pickId:J,_modelMatrix:new _.default,_boundingSphere:O}),e._buffers=void 0,e._vertexArray=void 0,e._shaderProgram=void 0,e._uniformMap=void 0}function Y(e,t){var i=t.context;D.a.checkSupportedGlExtensions(e.gltf.glExtensionsUsed,i),function(e){var t=e._loadResources;if(0===t.pendingBufferLoads){for(var i=t.vertexBuffersToCreate,n=t.indexBuffersToCreate;i.length>0;)k(i.dequeue(),e);for(;n.length>0;){var a=n.dequeue();z(a.id,a.componentType,e)}}}(e),V(e),function(e){if(e._loadResources.finishedBuffersCreation()&&!Object(c.default)(e._vertexArray)){var t,i=e._buffers,n=e.gltf,a=n.accessors,r=n.meshes[0].primitives[0],o={POSITION:0,_BATCHID:1},s={};if(O.a.meshPrimitiveAttribute(r,(function(e,t){var r=o[t];if(Object(c.default)(r)){var l=a[e];s[t]={index:r,vertexBuffer:i[l.bufferView],componentsPerAttribute:Object(A.a)(l.type),componentDatatype:l.componentType,offsetInBytes:l.byteOffset,strideInBytes:Object(x.a)(n,l)}}})),Object(c.default)(r.indices)){var l=a[r.indices];t=i[l.bufferView]}e._vertexArray={attributes:s,indexBuffer:t}}}(e),function(e,t){if(!Object(c.default)(e._uniformMap)){var i={};O.a.technique(e.gltf,(function(n){O.a.techniqueUniform(n,(function(n,a){Object(c.default)(n.semantic)&&Object(c.default)(H[n.semantic])&&(i[a]=H[n.semantic](t.uniformState,e))}))})),e._uniformMap=i}}(e,i),function(e){if(e._loadResources.finished()&&!Object(c.default)(e._primitive)){var t=e.gltf.nodes[0];e._nodeMatrix=D.a.getTransform(t,e._nodeMatrix),G(e)}}(e)}var W=new o.a,q=new _.default;F.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},F.prototype.update=function(e){if(e.mode!==L.default.MORPHING)if(p.a.supportsWebP.initialized){var t=p.a.supportsWebP();if(this._state===B.NEEDS_LOAD&&Object(c.default)(this.gltf)&&(this._state=B.LOADING,this._state!==B.FAILED)){var i=this.gltf.extensions;if(Object(c.default)(i)&&Object(c.default)(i.CESIUM_RTC)){var n=r.default.fromArray(i.CESIUM_RTC.center);if(!r.default.equals(n,r.default.ZERO)){this._rtcCenter3D=n;var s=e.mapProjection,l=s.ellipsoid.cartesianToCartographic(this._rtcCenter3D),u=s.project(l);r.default.fromElements(u.z,u.x,u.y,u),this._rtcCenter2D=u,this._rtcCenterEye=new r.default,this._rtcCenter=this._rtcCenter3D}}this._loadResources=new M.a,D.a.parseBuffers(this)}var d=this._loadResources,f=!1;this._state===B.LOADING&&(0===d.pendingBufferLoads&&(D.a.checkSupportedExtensions(this.extensionsRequired,t),function(e){var t=e.gltf,i=e._loadResources;O.a.buffer(t,(function(e,t){i.buffers[t]=e.extras._pipeline.source}))}(this),function(e){var t=e.gltf.bufferViews,i=e._loadResources.vertexBuffersToCreate;O.a.bufferView(e.gltf,(function(e,t){e.target===b.a.ARRAY_BUFFER&&i.enqueue(t)}));var n=e._loadResources.indexBuffersToCreate,a={};O.a.accessor(e.gltf,(function(e){var i=e.bufferView;t[i].target!==b.a.ELEMENT_ARRAY_BUFFER||Object(c.default)(a[i])||(a[i]=!0,n.enqueue({id:i,componentType:e.componentType}))}))}(this),this._boundingSphere=D.a.computeBoundingSphere(this),this._initialRadius=this._boundingSphere.radius,Y(this,e)),d.finished()&&(this._state=B.LOADED,f=!0)),Object(c.default)(d)&&this._state===B.LOADED&&(f||Y(this,e),d.finished()&&(this._loadResources=void 0));var h=this.show;if(h&&this._state===B.LOADED||f){this._dirty=!1;var m=this.modelMatrix,g=e.mode!==this._mode;this._mode=e.mode;var v=!_.default.equals(this._modelMatrix,m)||g;if(v||f){_.default.clone(m,this._modelMatrix);var w=this._computedModelMatrix;_.default.clone(m,w),this._upAxis===S.a.Y?_.default.multiplyTransformation(w,S.a.Y_UP_TO_Z_UP,w):this._upAxis===S.a.X&&_.default.multiplyTransformation(w,S.a.X_UP_TO_Z_UP,w)}(v||f)&&(!function(e,t,i,n){var s=e._computedModelMatrix;if(e._mode!==L.default.SCENE3D&&!e._ignoreCommands){var l=_.default.getColumn(s,3,W);if(o.a.equals(l,o.a.UNIT_W)){var u=e.boundingSphere.center,d=y.default.wgs84To2DModelMatrix(n,u,q);s=_.default.multiply(d,s,q),Object(c.default)(e._rtcCenter)&&(_.default.setTranslation(s,o.a.UNIT_W,s),e._rtcCenter=e._rtcCenter2D)}else s=y.default.basisTo2D(n,s,q),e._rtcCenter=e._rtcCenter3D}var f=e._primitive;(t||i)&&(_.default.multiplyTransformation(s,e._nodeMatrix,f._modelMatrix),a.default.transform(f._boundingSphere,f._modelMatrix,f._boundingVolume),Object(c.default)(e._rtcCenter)&&r.default.add(e._rtcCenter,f._boundingVolume.center,f._boundingVolume.center))}(this,v,f,e.mapProjection),this._dirty=!0)}if(f){var x=this;e.afterRender.push((function(){x._ready=!0,x._readyPromise.resolve(x)}))}else h&&!this._ignoreCommands&&(this._primitive.debugShowBoundingVolume=this.debugShowBoundingVolume,this._primitive.debugWireframe=this.debugWireframe,this._primitive.update(e))}else p.a.supportsWebP.initialize()},F.prototype.isDestroyed=function(){return!1},F.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Object(f.default)(this)},t.a=F},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(19),o=i(265),s=i(23),l=i(18);function u(e,t,i,r,u,c){this._tileset=e,this._tile=t,this._resource=i,this._contents=[],this._readyPromise=l.a.defer(),this._groupMetadata=void 0,function(e,t,i,r){i=Object(n.default)(i,0);var u=new Uint8Array(t),c=new DataView(t);i+=d;var f=c.getUint32(i,!0);if(1!==f)throw new s.a("Only Composite Tile version 1 is supported. Version "+f+" is not.");i+=d,i+=d;var h=c.getUint32(i,!0);i+=d;for(var p=[],m=0;m<h;++m){var _=Object(o.a)(u,i),g=c.getUint32(i+2*d,!0),v=r[_];if(!Object(a.default)(v))throw new s.a("Unknown tile content type, "+_+", inside Composite tile");var y=v(e._tileset,e._tile,e._resource,t,i);e._contents.push(y),p.push(y.readyPromise),i+=g}l.a.all(p).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}(this,r,u,c)}Object.defineProperties(u.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e;for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].groupMetadata=e}}});var d=Uint32Array.BYTES_PER_ELEMENT;u.prototype.hasProperty=function(e,t){return!1},u.prototype.getFeature=function(e){},u.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,a=0;a<n;++a)i[a].applyDebugSettings(e,t)},u.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},u.prototype.update=function(e,t){for(var i=this._contents,n=i.length,a=0;a<n;++a)i[a].update(e,t)},u.prototype.isDestroyed=function(){return!1},u.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return Object(r.default)(this)},t.a=u},function(e,t,i){"use strict";var n=i(1),a=i(2),r=i(0),o=i(19),s=i(3),l=i(159),u=i(6),d=i(23),c=i(18),f=i(237),h=i(386);function p(e,t,i,o,s){this._tileset=e,this._tile=t,this._resource=i,this._geometries=void 0,this._contentReadyPromise=void 0,this._readyPromise=c.a.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t,i){i=Object(a.default)(i,0);var o=new Uint8Array(t),s=new DataView(t);i+=m;var c=s.getUint32(i,!0);if(1!==c)throw new d.a("Only Geometry tile version 1 is supported. Version "+c+" is not.");i+=m;var p=s.getUint32(i,!0);if(i+=m,0===p)return void e._readyPromise.resolve(e);var _=s.getUint32(i,!0);if(i+=m,0===_)throw new d.a("Feature table must have a byte length greater than zero");var g=s.getUint32(i,!0);i+=m;var v=s.getUint32(i,!0);i+=m;var y=s.getUint32(i,!0);i+=m;var b=Object(l.a)(o,i,_);i+=_;var w,O,x=new Uint8Array(t,i,g);i+=g,v>0&&(w=Object(l.a)(o,i,v),i+=v,y>0&&(O=new Uint8Array(t,i,y),O=new Uint8Array(O)));var A=Object(a.default)(b.BOXES_LENGTH,0),T=Object(a.default)(b.CYLINDERS_LENGTH,0),E=Object(a.default)(b.ELLIPSOIDS_LENGTH,0),C=Object(a.default)(b.SPHERES_LENGTH,0),S=A+T+E+C,M=new f.a(e,S,w,O,function(e){return function(t,i){Object(r.default)(e._geometries)&&e._geometries.updateCommands(t,i)}}(e));if(e._batchTable=M,0===S)return;var D,P=e.tile.computedTransform;Object(r.default)(b.RTC_CENTER)&&(D=n.default.unpack(b.RTC_CENTER),u.default.multiplyByPoint(P,D,D));var I=function(e,t){var i,n,o,s,l,u=Object(a.default)(e.BOXES_LENGTH,0),c=Object(a.default)(e.CYLINDERS_LENGTH,0),f=Object(a.default)(e.ELLIPSOIDS_LENGTH,0),h=Object(a.default)(e.SPHERES_LENGTH,0);if(u>0&&Object(r.default)(e.BOX_BATCH_IDS)){var p=t.byteOffset+e.BOX_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,p,u)}if(c>0&&Object(r.default)(e.CYLINDER_BATCH_IDS)){var m=t.byteOffset+e.CYLINDER_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,m,c)}if(f>0&&Object(r.default)(e.ELLIPSOID_BATCH_IDS)){var _=t.byteOffset+e.ELLIPSOID_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,_,f)}if(h>0&&Object(r.default)(e.SPHERE_BATCH_IDS)){var g=t.byteOffset+e.SPHERE_BATCH_IDS.byteOffset;s=new Uint16Array(t.buffer,g,h)}var v=Object(r.default)(i)||Object(r.default)(n)||Object(r.default)(o)||Object(r.default)(s),y=u>0&&!Object(r.default)(i)||c>0&&!Object(r.default)(n)||f>0&&!Object(r.default)(o)||h>0&&!Object(r.default)(s);if(v&&y)throw new d.a("If one group of batch ids is defined, then all batch ids must be defined.");if(!(Object(r.default)(i)||Object(r.default)(n)||Object(r.default)(o)||Object(r.default)(s))){var b=0;if(!Object(r.default)(i)&&u>0)for(i=new Uint16Array(u),l=0;l<u;++l)i[l]=b++;if(!Object(r.default)(n)&&c>0)for(n=new Uint16Array(c),l=0;l<c;++l)n[l]=b++;if(!Object(r.default)(o)&&f>0)for(o=new Uint16Array(f),l=0;l<f;++l)o[l]=b++;if(!Object(r.default)(s)&&h>0)for(s=new Uint16Array(h),l=0;l<h;++l)s[l]=b++}return{boxes:i,cylinders:n,ellipsoids:o,spheres:s}}(b,x);if(A>0||T>0||E>0||C>0){var L,j,R,N;if(A>0){var B=x.byteOffset+b.BOXES.byteOffset;L=new Float32Array(x.buffer,B,h.a.packedBoxLength*A)}if(T>0){var F=x.byteOffset+b.CYLINDERS.byteOffset;j=new Float32Array(x.buffer,F,h.a.packedCylinderLength*T)}if(E>0){var k=x.byteOffset+b.ELLIPSOIDS.byteOffset;R=new Float32Array(x.buffer,k,h.a.packedEllipsoidLength*E)}if(C>0){var z=x.byteOffset+b.SPHERES.byteOffset;N=new Float32Array(x.buffer,z,h.a.packedSphereLength*C)}e._geometries=new h.a({boxes:L,boxBatchIds:I.boxes,cylinders:j,cylinderBatchIds:I.cylinders,ellipsoids:R,ellipsoidBatchIds:I.ellipsoids,spheres:N,sphereBatchIds:I.spheres,center:D,modelMatrix:P,batchTable:M,boundingVolume:e.tile.boundingVolume.boundingVolume})}}(this,o,s)}Object.defineProperties(p.prototype,{featuresLength:{get:function(){return Object(r.default)(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return Object(r.default)(this._geometries)?this._geometries.trianglesLength:0}},geometryByteLength:{get:function(){return Object(r.default)(this._geometries)?this._geometries.geometryByteLength:0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return Object(r.default)(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}});var m=Uint32Array.BYTES_PER_ELEMENT;function _(e){var t=e.featuresLength;if(!Object(r.default)(e._features)&&t>0){var i=new Array(t);Object(r.default)(e._geometries)&&e._geometries.createFeatures(e,i),e._features=i}}p.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},p.prototype.getFeature=function(e){var t=this.featuresLength;if(!Object(r.default)(e)||e<0||e>=t)throw new s.default("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return _(this),this._features[e]},p.prototype.applyDebugSettings=function(e,t){Object(r.default)(this._geometries)&&this._geometries.applyDebugSettings(e,t)},p.prototype.applyStyle=function(e){_(this),Object(r.default)(this._geometries)&&this._geometries.applyStyle(e,this._features)},p.prototype.update=function(e,t){if(Object(r.default)(this._geometries)&&(this._geometries.classificationType=this._tileset.classificationType,this._geometries.debugWireframe=this._tileset.debugWireframe,this._geometries.update(t)),Object(r.default)(this._batchTable)&&this._geometries._ready&&this._batchTable.update(e,t),!Object(r.default)(this._contentReadyPromise)){var i=this;this._contentReadyPromise=this._geometries.readyPromise.then((function(){i._readyPromise.resolve(i)}))}},p.prototype.isDestroyed=function(){return!1},p.prototype.destroy=function(){return this._geometries=this._geometries&&this._geometries.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(o.default)(this)},t.a=p},function(e,t,i){"use strict";i.d(t,"a",(function(){return w}));var n=i(1),a=i(4),r=i(50),o=i(60),s=i(2),l=i(0),u=i(19),d=i(5),c=i(526),f=i(12),h=i(21),p=i(380),m=i(18),_=i(878),g=i(885),v=i(160),y=i(886),b=i(887);function w(e,t,i,n,r){a.a.defined("tile.implicitTileset",t.implicitTileset),a.a.defined("tile.implicitCoordinates",t.implicitCoordinates);var o=t.implicitTileset,u=t.implicitCoordinates;this._implicitTileset=o,this._implicitCoordinates=u,this._implicitSubtree=void 0,this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=m.a.defer(),this.featurePropertiesDirty=!1,this._groupMetadata=void 0;var d=u.getTemplateValues(),c=o.subtreeUriTemplate.getDerivedResource({templateValues:d});this._url=c.getUrlComponent(!0),function(e,t,i){i=Object(s.default)(i,0);var n=new Uint8Array(t,i),a=new _.a(e._resource,n,e._implicitTileset,e._implicitCoordinates);e._implicitSubtree=a,a.readyPromise.then((function(){!function(e,t){var i=e._tile,n=e._implicitCoordinates.childIndex,a=function(e,t,i,n){for(var a=x(e,t,i,n,0,!0),r=[a],o=[],s=e._implicitTileset,l=1;l<s.subtreeLevels;l++){for(var u=t.getLevelOffset(l),d=s.branchingFactor*r.length,c=0;c<d;c++){var f=u+c;if(t.tileIsAvailableAtIndex(f)){var h=t.getParentMortonIndex(c),p=r[h],m=c%s.branchingFactor,_=x(e,t,p,m,f);p.children.push(_),o.push(_)}else o.push(void 0)}r=o,o=[]}return{rootTile:a,bottomRow:r}}(e,t,i,n);i.children.push(a.rootTile);for(var r=function(e,t,i){for(var n=[],a=e._implicitTileset.branchingFactor,r=0;r<i.length;r++){var o=i[r];if(Object(l.default)(o))for(var s=0;s<a;s++){var u=r*a+s;t.childSubtreeIsAvailableAtIndex(u)&&n.push({tile:o,childIndex:s})}}return n}(e,t,a.bottomRow),o=0;o<r.length;o++){var s=r[o],u=s.tile,d=N(e,u,s.childIndex);u.children.push(d)}}(e,a),e._readyPromise.resolve()})).otherwise((function(t){e._readyPromise.reject(t)}))}(this,n,r)}function O(e,t,i){var n=y.a.TILE_GEOMETRIC_ERROR;return Object(l.default)(e)&&e.hasPropertyBySemantic(n)?e.getPropertyBySemantic(n):t.geometricError/Math.pow(2,i.level)}function x(e,t,i,n,a,u){var d,c,f,h,p=e._implicitTileset;if(d=Object(s.default)(u,!1)?i.implicitCoordinates:i.implicitCoordinates.getChildCoordinates(n),Object(l.default)(t.metadataExtension)){var m=t.metadataTable;c=new g.a({class:m.class,implicitCoordinates:d,implicitSubtree:t});var _=Object(b.a)(c);f=_.tile,h=_.content}for(var v=function(e,t,i,n,a,r){var o;o=!Object(l.default)(r)||!Object(l.default)(r.boundingVolume)||!A(r.boundingVolume,r)&&A(e.boundingVolume,r)?C(e,t,i,Object(s.default)(n,!1),a):r.boundingVolume;return T(o,r),o}(p,d,n,u,i,f),y=[],w=0;w<p.contentCount;w++)if(t.contentIsAvailableAtIndex(a,w)){var x={uri:p.contentUriTemplates[w].getDerivedResource({templateValues:d.getTemplateValues()}).url},S=E(v,h);Object(l.default)(S)&&(x.boundingVolume=S),y.push(Object(o.default)(x,p.contentHeaders[w]))}var M={boundingVolume:v,geometricError:O(c,p,d),refine:p.refine};1===y.length?M.content=y[0]:y.length>1&&(M.extensions={"3DTILES_multiple_contents":{content:y}});var D=Object(r.default)(p.tileHeader,!0);delete D.boundingVolume,delete D.transform;var P=Object(o.default)(M,D,!0),I=B(e,p.baseResource,P,i);return I.implicitCoordinates=d,I.implicitSubtree=t,I.metadata=c,I}function A(e,t){return Object(l.default)(e)&&Object(l.default)(t)&&(Object(l.default)(t.minimumHeight)||Object(l.default)(t.maximumHeight))&&(Object(v.a)(e,"3DTILES_bounding_volume_S2")||Object(l.default)(e.region))}function T(e,t){Object(v.a)(e,"3DTILES_bounding_volume_S2")&&Object(l.default)(t)?function(e,t,i){Object(l.default)(t)&&(e.minimumHeight=t);Object(l.default)(i)&&(e.maximumHeight=i)}(e.extensions["3DTILES_bounding_volume_S2"],t.minimumHeight,t.maximumHeight):Object(l.default)(e.region)&&Object(l.default)(t)&&function(e,t,i){Object(l.default)(t)&&(e[4]=t);Object(l.default)(i)&&(e[5]=i)}(e.region,t.minimumHeight,t.maximumHeight)}function E(e,t){var i;return Object(l.default)(t)&&(i=t.boundingVolume),A(i,t)?T(i,t):A(e,t)&&T(i=Object(r.default)(e,!0),t),i}function C(e,t,i,n,a){var r=e.boundingVolume;return Object(v.a)(r,"3DTILES_bounding_volume_S2")?S(n,a,i,t.level,t.x,t.y,t.z):Object(l.default)(r.region)?{region:R(r.region,t.level,t.x,t.y,t.z)}:{box:L(r.box,t.level,t.x,t.y,t.z)}}function S(e,t,i,n,r,o,s){a.a.typeOf.bool("parentIsPlaceholderTile",e),a.a.typeOf.object("parentTile",t),a.a.typeOf.number("childIndex",i),a.a.typeOf.number("level",n),a.a.typeOf.number("x",r),a.a.typeOf.number("y",o),Object(l.default)(s)&&a.a.typeOf.number("z",s);var u=t._boundingVolume;if(e)return{extensions:{"3DTILES_bounding_volume_S2":{token:p.a.getTokenFromId(u.s2Cell._cellId),minimumHeight:u.minimumHeight,maximumHeight:u.maximumHeight}}};var d,f,h=Number(t._boundingVolume.s2Cell._cellId>>BigInt(61)),m=h%2==0?c.a.encode2D(n,r,o):c.a.encode2D(n,o,r),_=p.a.fromFacePositionLevel(h,BigInt(m),n);if(Object(l.default)(s)){var g=(u.maximumHeight+u.minimumHeight)/2;d=i<4?u.minimumHeight:g,f=i<4?g:u.maximumHeight}else d=u.minimumHeight,f=u.maximumHeight;return{extensions:{"3DTILES_bounding_volume_S2":{token:p.a.getTokenFromId(_._cellId),minimumHeight:d,maximumHeight:f}}}}Object.defineProperties(w.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._url}},batchTable:{get:function(){}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}});var M=new n.default,D=new n.default,P=new n.default,I=new f.default;function L(e,t,i,r,o){if(a.a.typeOf.object("rootBox",e),a.a.typeOf.number("level",t),a.a.typeOf.number("x",i),a.a.typeOf.number("y",r),Object(l.default)(o)&&a.a.typeOf.number("z",o),0===t)return e;var s=n.default.unpack(e,0,D),u=f.default.unpack(e,3,I),d=Math.pow(2,-t),c=(2*i+1)*d-1,h=(2*r+1)*d-1,p=0,m=n.default.fromElements(d,d,1,M);Object(l.default)(o)&&(p=(2*o+1)*d-1,m.z=d);var _=n.default.fromElements(c,h,p,P);_=f.default.multiplyByVector(u,_,P),_=n.default.add(_,s,P);var g=f.default.clone(u);g=f.default.multiplyByScale(g,m,g);var v=new Array(12);return n.default.pack(_,v),f.default.pack(g,v,3),v}var j=new h.default;function R(e,t,i,n,r){if(a.a.typeOf.object("rootRegion",e),a.a.typeOf.number("level",t),a.a.typeOf.number("x",i),a.a.typeOf.number("y",n),Object(l.default)(r)&&a.a.typeOf.number("z",r),0===t)return e.slice();var o=h.default.unpack(e,0,j),s=e[4],u=e[5],c=Math.pow(2,-t),f=c*o.width,p=d.default.negativePiToPi(o.west+i*f),m=d.default.negativePiToPi(p+f),_=c*o.height,g=d.default.negativePiToPi(o.south+n*_),v=d.default.negativePiToPi(g+_),y=s,b=u;if(Object(l.default)(r)){var w=c*(u-s);b=(y+=r*w)+w}return[p,g,m,v,y,b]}function N(e,t,i){var n=e._implicitTileset,a=t.implicitCoordinates.getChildCoordinates(i),r=C(n,a,i,!1,t),o=O(void 0,n,a),s=n.subtreeUriTemplate.getDerivedResource({templateValues:a.getTemplateValues()}).url,l={boundingVolume:r,geometricError:o,refine:n.refine,content:{uri:s}},u=B(e,n.baseResource,l,t);return u.implicitTileset=n,u.implicitCoordinates=a,u}function B(e,t,i,n){return new(0,e._tile.constructor)(e._tileset,t,i,n)}w.prototype.hasProperty=function(e,t){return!1},w.prototype.getFeature=function(e){},w.prototype.applyDebugSettings=function(e,t){},w.prototype.applyStyle=function(e){},w.prototype.update=function(e,t){},w.prototype.isDestroyed=function(){return!1},w.prototype.destroy=function(){return this._implicitSubtree=this._implicitSubtree&&this._implicitSubtree.destroy(),Object(u.default)(this)},w._deriveBoundingBox=L,w._deriveBoundingRegion=R,w._deriveBoundingVolumeS2=S},function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var n=i(4),a=i(2),r=i(3),o=i(0),s=i(19),l=i(159),u=i(23),d=i(160),c=i(527),f=i(172),h=i(311),p=i(153),m=i(18);function _(e,t,i,r){n.a.typeOf.object("resource",e),n.a.typeOf.object("subtreeView",t),n.a.typeOf.object("implicitTileset",i),n.a.typeOf.object("implicitCoordinates",r),this._resource=e,this._subtreeJson=void 0,this._bufferLoader=void 0,this._tileAvailability=void 0,this._implicitCoordinates=r,this._contentAvailabilityBitstreams=[],this._childSubtreeAvailability=void 0,this._subtreeLevels=i.subtreeLevels,this._subdivisionScheme=i.subdivisionScheme,this._branchingFactor=i.branchingFactor,this._readyPromise=m.a.defer(),this._metadataTable=void 0,this._metadataExtension=void 0,this._jumpBuffer=void 0,function(e,t,i){var n,r=function(e){var t=new DataView(e.buffer,e.byteOffset),i=8,n=t.getUint32(i,!0);i+=8;var a=t.getUint32(i,!0);i+=8;var r=Object(l.a)(e,i,n);i+=n;var o=e.subarray(i,i+a);return{json:r,binary:o}}(t),s=r.json;e._subtreeJson=s,Object(d.a)(s,"3DTILES_metadata")&&(n=s.extensions["3DTILES_metadata"]);e._metadataExtension=n;s.contentAvailabilityHeaders=[],Object(d.a)(s,"3DTILES_multiple_contents")?s.contentAvailabilityHeaders=s.extensions["3DTILES_multiple_contents"].contentAvailability:s.contentAvailabilityHeaders.push(Object(a.default)(s.contentAvailability,{constant:0}));var u=function(e){e=Object(o.default)(e)?e:[];for(var t=0;t<e.length;t++){var i=e[t];i.isExternal=Object(o.default)(i.uri),i.isActive=!1}return e}(s.buffers),c=function(e,t){e=Object(o.default)(e)?e:[];for(var i=0;i<e.length;i++){var n=e[i],a=t[n.buffer];n.bufferHeader=a,n.isActive=!1}return e}(s.bufferViews,u);(function(e,t){var i,n=e.tileAvailability;Object(o.default)(n.bufferView)&&((i=t[n.bufferView]).isActive=!0,i.bufferHeader.isActive=!0);for(var a=e.contentAvailabilityHeaders,r=0;r<a.length;r++)Object(o.default)(a[r].bufferView)&&((i=t[a[r].bufferView]).isActive=!0,i.bufferHeader.isActive=!0);var s=e.childSubtreeAvailability;Object(o.default)(s.bufferView)&&((i=t[s.bufferView]).isActive=!0,i.bufferHeader.isActive=!0)})(s,c),Object(o.default)(n)&&function(e,t){var i,n=e.properties;for(var a in n)if(n.hasOwnProperty(a)){var r=n[a];(i=t[r.bufferView]).isActive=!0,i.bufferHeader.isActive=!0,Object(o.default)(r.stringOffsetBufferView)&&((i=t[r.stringOffsetBufferView]).isActive=!0,i.bufferHeader.isActive=!0),Object(o.default)(r.arrayOffsetBufferView)&&((i=t[r.arrayOffsetBufferView]).isActive=!0,i.bufferHeader.isActive=!0)}}(n,c);(function(e,t,i){for(var n=[],a=0;a<t.length;a++){var r=t[a];if(r.isActive)if(r.isExternal){var s=g(e,r);n.push(s)}else n.push(m.a.resolve(i));else n.push(m.a.resolve(void 0))}return m.a.all(n).then((function(e){for(var t={},i=0;i<e.length;i++){var n=e[i];Object(o.default)(n)&&(t[i]=n)}return t}))})(e,u,r.binary).then((function(t){var a=function(e,t){for(var i={},n=0;n<e.length;n++){var a=e[n];if(a.isActive){var r=a.byteOffset,o=r+a.byteLength,s=t[a.buffer].subarray(r,o);i[n]=s}}return i}(c,t);!function(e,t,i,n){var a=i.branchingFactor,r=i.subtreeLevels,o=(Math.pow(a,r)-1)/(a-1),s=Math.pow(a,r),l=Object(d.a)(t,"3DTILES_metadata");e._tileAvailability=v(t.tileAvailability,n,o,l);for(var u=0;u<t.contentAvailabilityHeaders.length;u++){var c=v(t.contentAvailabilityHeaders[u],n,o);e._contentAvailabilityBitstreams.push(c)}e._childSubtreeAvailability=v(t.childSubtreeAvailability,n,s)}(e,s,i,a),Object(o.default)(n)&&(function(e,t,i){var n=e._metadataExtension,a=e._tileAvailability.availableCount,r=n.class,o=t.metadataSchema.classes[r];e._metadataTable=new h.a({class:o,count:a,properties:n.properties,bufferViews:i})}(e,i,a),function(e){var t,i=e._tileAvailability,n=0,a=i.lengthBits,r=i.availableCount;t=r<256?new Uint8Array(a):r<65536?new Uint16Array(a):new Uint32Array(a);for(var o=0;o<i.lengthBits;o++)i.getBit(o)&&(t[o]=n,n++);e._jumpBuffer=t}(e)),e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}(this,t,i)}function g(e,t){var i=e._resource.getDerivedResource({url:t.uri}),n=p.a.loadExternalBuffer({resource:i});return e._bufferLoader=n,n.promise.then((function(e){return e.typedArray}))}function v(e,t,i,n){if(Object(o.default)(e.constant))return new c.a({constant:Boolean(e.constant),lengthBits:i,availableCount:e.availableCount});var a=t[e.bufferView];return new c.a({bitstream:a,lengthBits:i,availableCount:e.availableCount,computeAvailableCountEnabled:n})}Object.defineProperties(_.prototype,{readyPromise:{get:function(){return this._readyPromise.promise}},metadataTable:{get:function(){return this._metadataTable}},metadataExtension:{get:function(){return this._metadataExtension}},implicitCoordinates:{get:function(){return this._implicitCoordinates}}}),_.prototype.tileIsAvailableAtIndex=function(e){return this._tileAvailability.getBit(e)},_.prototype.tileIsAvailableAtCoordinates=function(e){var t=this.getTileIndex(e);return this.tileIsAvailableAtIndex(t)},_.prototype.contentIsAvailableAtIndex=function(e,t){if((t=Object(a.default)(t,0))<0||t>=this._contentAvailabilityBitstreams.length)throw new r.default("contentIndex out of bounds.");return this._contentAvailabilityBitstreams[t].getBit(e)},_.prototype.contentIsAvailableAtCoordinates=function(e,t){var i=this.getTileIndex(e,t);return this.contentIsAvailableAtIndex(i)},_.prototype.childSubtreeIsAvailableAtIndex=function(e){return this._childSubtreeAvailability.getBit(e)},_.prototype.childSubtreeIsAvailableAtCoordinates=function(e){var t=this.getChildSubtreeIndex(e);return this.childSubtreeIsAvailableAtIndex(t)},_.prototype.getLevelOffset=function(e){var t=this._branchingFactor;return(Math.pow(t,e)-1)/(t-1)},_.prototype.getParentMortonIndex=function(e){var t=2;return this._subdivisionScheme===f.a.OCTREE&&(t=3),e>>t},_.prototype.getTileIndex=function(e){var t=e.level-this._implicitCoordinates.level;if(t<0||this._subtreeLevels<=t)throw new u.a("level is out of bounds for this subtree");return e.getSubtreeCoordinates().getOffsetCoordinates(e).tileIndex},_.prototype.getChildSubtreeIndex=function(e){if(e.level-this._implicitCoordinates.level!==this._implicitCoordinates.subtreeLevels)throw new u.a("level is out of bounds for this subtree");return e.getParentSubtreeCoordinates().getOffsetCoordinates(e).mortonIndex},_.prototype.getEntityId=function(e){if(Object(o.default)(this._metadataTable)){var t=this.getTileIndex(e);return this._tileAvailability.getBit(t)?this._jumpBuffer[t]:void 0}},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){return Object(o.default)(this._bufferLoader)&&p.a.unload(this._bufferLoader),Object(s.default)(this)}},function(e,t,i){"use strict";var n=i(4),a=i(11),r=i(2),o=i(0),s=i(3),l=i(59),u=i(227),d=i(70),c=i(93),f=i(94);function h(e){var t=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).count,i=e.property,a=e.classProperty,s=e.bufferViews;n.a.typeOf.number.greaterThan("options.count",t,0),n.a.typeOf.object("options.property",i),n.a.typeOf.object("options.classProperty",a),n.a.typeOf.object("options.bufferViews",s);var l,d,h,p,m=a.type,_=m===f.a.ARRAY,v=_&&!Object(o.default)(a.componentCount),y=f.a.isVectorType(m)||f.a.isMatrixType(m),b=a.valueType,w=a.enumType,O=b===c.a.STRING,x=b===c.a.BOOLEAN;if(v){var A=Object(r.default)(i.arrayOffsetType,i.offsetType);A=Object(r.default)(c.a[A],c.a.UINT32),l=new g(s[i.arrayOffsetBufferView],A,t+1)}if(d=v?l.get(t)-l.get(0):_||y?t*a.componentCount:t,O){var T=Object(r.default)(i.stringOffsetType,i.offsetType);T=Object(r.default)(c.a[T],c.a.UINT32),h=new g(s[i.stringOffsetBufferView],T,d+1)}(O||x)&&(b=c.a.UINT8),p=O?h.get(d)-h.get(0):x?Math.ceil(d/8):d;var E,C,S=new g(s[i.bufferView],b,p),M=this;O?E=function(e){return function(e,t,i){var n=i.get(e),a=i.get(e+1)-n;return Object(u.a)(t.typedArray,n,a)}(e,M._values,M._stringOffsets)}:x?(E=function(e){return function(e,t){var i=e>>3,n=e%8;return 1==(t.typedArray[i]>>n&1)}(e,M._values)},C=function(e,t){!function(e,t,i){var n=e>>3,a=e%8;i?t.typedArray[n]|=1<<a:t.typedArray[n]&=~(1<<a)}(e,M._values,t)}):Object(o.default)(w)?(E=function(e){var t=M._values.get(e);return w.namesByValue[t]},C=function(e,t){var i=w.valuesByName[t];M._values.set(e,i)}):(E=function(e){return M._values.get(e)},C=function(e,t){M._values.set(e,t)}),this._arrayOffsets=l,this._stringOffsets=h,this._values=S,this._classProperty=a,this._count=t,this._getValue=E,this._setValue=C,this._unpackedValues=void 0,this._extras=i.extras,this._extensions=i.extensions}function p(e,t){var i=e._count;if(!Object(o.default)(t)||t<0||t>=i){var n=i-1;throw new s.default("index is required and between zero and count - 1. Actual value: "+n)}}function m(e){if(Object(o.default)(e._unpackedValues))return!1;var t=e._classProperty.valueType;return t===c.a.STRING||(t===c.a.INT64&&!l.a.supportsBigInt64Array()||t===c.a.UINT64&&!l.a.supportsBigUint64Array())}function _(e){e._unpackedValues=function(e){var t,i,n,a,r=e._count,s=new Array(r),l=e._classProperty;if(l.type!==f.a.ARRAY){for(t=0;t<r;++t)s[t]=e._getValue(t);return s}var u=l.componentCount;if(Object(o.default)(u)){for(t=0;t<r;++t)for(a=new Array(u),s[t]=a,n=t*u,i=0;i<u;++i)a[i]=e._getValue(n+i);return s}for(t=0;t<r;++t){n=e._arrayOffsets.get(t);var d=e._arrayOffsets.get(t+1)-n;for(a=new Array(d),s[t]=a,i=0;i<d;++i)a[i]=e._getValue(n+i)}return s}(e),e._arrayOffsets=void 0,e._stringOffsets=void 0,e._values=void 0}function g(e,t,i){var n,r,s,u=this;if(t===c.a.INT64)l.a.supportsBigInt()?l.a.supportsBigInt64Array()?(n=new BigInt64Array(e.buffer,e.byteOffset,i),s=function(e,t){u.typedArray[e]=BigInt(t)}):(n=new Uint8Array(e.buffer,e.byteOffset,8*i),r=function(e){return function(e,t){for(var i=t.dataView,n=8*e,a=BigInt(0),r=(128&i.getUint8(n+7))>0,o=!0,s=0;s<8;++s){var l=i.getUint8(n+s);r&&(o?0!==l&&(l=255&~(l-1),o=!1):l=255&~l),a+=BigInt(l)*(BigInt(1)<<BigInt(8*s))}return r&&(a=-a),a}(e,u)}):(Object(d.a)("INT64 type is not fully supported on this platform. Values greater than 2^53 - 1 or less than -(2^53 - 1) may lose precision when read."),n=new Uint8Array(e.buffer,e.byteOffset,8*i),r=function(e){return function(e,t){for(var i=t.dataView,n=8*e,a=0,r=(128&i.getUint8(n+7))>0,o=!0,s=0;s<8;++s){var l=i.getUint8(n+s);r&&(o?0!==l&&(l=255&~(l-1),o=!1):l=255&~l),a+=l*Math.pow(256,s)}return r&&(a=-a),a}(e,u)});else if(t===c.a.UINT64)l.a.supportsBigInt()?l.a.supportsBigUint64Array()?(n=new BigUint64Array(e.buffer,e.byteOffset,i),s=function(e,t){u.typedArray[e]=BigInt(t)}):(n=new Uint8Array(e.buffer,e.byteOffset,8*i),r=function(e){return function(e,t){var i=t.dataView,n=8*e,a=BigInt(i.getUint32(n,!0)),r=BigInt(i.getUint32(n+4,!0));return a+BigInt(4294967296)*r}(e,u)}):(Object(d.a)("UINT64 type is not fully supported on this platform. Values greater than 2^53 - 1 may lose precision when read."),n=new Uint8Array(e.buffer,e.byteOffset,8*i),r=function(e){return function(e,t){var i=t.dataView,n=8*e;return i.getUint32(n,!0)+4294967296*i.getUint32(n+4,!0)}(e,u)});else{var f=function(e){switch(e){case c.a.INT8:return a.default.BYTE;case c.a.UINT8:return a.default.UNSIGNED_BYTE;case c.a.INT16:return a.default.SHORT;case c.a.UINT16:return a.default.UNSIGNED_SHORT;case c.a.INT32:return a.default.INT;case c.a.UINT32:return a.default.UNSIGNED_INT;case c.a.FLOAT32:return a.default.FLOAT;case c.a.FLOAT64:return a.default.DOUBLE}}(t);n=a.default.createArrayBufferView(f,e.buffer,e.byteOffset,i),s=function(e,t){u.typedArray[e]=t}}Object(o.default)(r)||(r=function(e){return u.typedArray[e]}),this.typedArray=n,this.dataView=new DataView(n.buffer,n.byteOffset),this.get=r,this.set=s,this._componentType=t}Object.defineProperties(h.prototype,{extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),h.prototype.get=function(e){p(this,e);var t=function(e,t){m(e)&&_(e);var i=e._classProperty;if(Object(o.default)(e._unpackedValues)){var n=e._unpackedValues[t];return i.type===f.a.ARRAY?n.slice():n}var a,r,s=i.type,l=i.type===f.a.ARRAY,u=f.a.isVectorType(s)||f.a.isMatrixType(s);if(!l&&!u)return e._getValue(t);var d=i.componentCount;Object(o.default)(d)?(a=t*d,r=d):(a=e._arrayOffsets.get(t),r=e._arrayOffsets.get(t+1)-a);for(var c=new Array(r),h=0;h<r;++h)c[h]=e._getValue(a+h);return c}(this,e);return t=this._classProperty.normalize(t),this._classProperty.unpackVectorAndMatrixTypes(t)},h.prototype.set=function(e,t){var i=this._classProperty;p(this,e);var n=i.validate(t);if(Object(o.default)(n))throw new s.default(n);t=i.packVectorAndMatrixTypes(t),function(e,t,i){(function(e,t,i){if(m(e))return!0;var n=e._arrayOffsets;if(Object(o.default)(n)){var a=n.get(t+1)-n.get(t),r=i.length;if(a!==r)return!0}return!1})(e,t,i)&&_(e);var n=e._classProperty;if(Object(o.default)(e._unpackedValues))return n.type===f.a.ARRAY&&(i=i.slice()),void(e._unpackedValues[t]=i);var a,r,s=n.type,l=n.type===f.a.ARRAY,u=f.a.isVectorType(s)||f.a.isMatrixType(s);if(!l&&!u)return void e._setValue(t,i);var d=n.componentCount;Object(o.default)(d)?(a=t*d,r=d):(a=e._arrayOffsets.get(t),r=e._arrayOffsets.get(t+1)-a);for(var c=0;c<r;++c)e._setValue(a+c,i[c])}(this,e,t=i.unnormalize(t))},h.prototype.getTypedArray=function(){if(Object(o.default)(this._values))return this._values.typedArray},t.a=h},function(e,t,i){"use strict";i.d(t,"a",(function(){return n})),function(){var e,t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};function i(e){if(!e)throw new Error("Assertion failed")}function n(t,i,n,a,r){var o=e.exports.sbrk,s=o(i),l=o(a*r),u=new Uint8Array(e.exports.memory.buffer);u.set(new Uint8Array(n.buffer,n.byteOffset,n.byteLength),l);var d=t(s,i,l,a,r),c=new Uint8Array(d);return c.set(u.subarray(s,s+d)),o(s-o(0)),c}function a(e){for(var t=0,i=0;i<e.length;++i){var n=e[i];t<n?n:t}return t}function r(e,t){if(i(2==t||4==t),4==t)return new Uint32Array(e.buffer,e.byteOffset,e.byteLength/4);var n=new Uint16Array(e.buffer,e.byteOffset,e.byteLength/2);return new Uint32Array(n)}function o(t,i,n,a,r,o){var s=e.exports.sbrk,l=s(n*a),u=s(n*o),d=new Uint8Array(e.exports.memory.buffer);d.set(new Uint8Array(i.buffer,i.byteOffset,i.byteLength),u),t(l,n,a,r,u);var c=new Uint8Array(n*a);return c.set(d.subarray(l,l+n*a)),s(l-s(0)),c}WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var a=e.charCodeAt(n);i[n]=a>96?a-71:a>64?a-65:a>47?a+4:a>46?63:62}var r=0;for(n=0;n<e.length;++n)i[r++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,r)}("B9h79tEBBBENQ9gEUEU9gEUB9gBB9gVUUUUUEU9gDUUEU9gLUUUUEU9gIUUUEU9gVUUUUUB9gLUUUUB9gD99UE99Ie8aDILEVOLEVLRRRRRWWVBOOBEdddLVE9wEIIVIEBEOWEUEC+Q/KEKR/QIhO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9fw9u9j9v9kw9WwvTw949C919m9mwvBE8f9tw79o9v9wT9fw9u9j9v9kw9WwvTw949C919m9mwv9C9v919u9kBDe9tw79o9v9wT9fw9u9j9v9kw9WwvTw949Wwv79p9v9uBIy9tw79o9v9wT9fw9u9j9v9kw69u9kw949C919m9mwvBL8e9tw79o9v9wT9fw9u9j9v9kw69u9kw949C919m9mwv9C9v919u9kBO8a9tw79o9v9wT9fw9u9j9v9kw69u9kw949Wwv79p9v9uBRe9tw79o9v9wT9fw9u9j9v9kw69u9kw949Twg91w9u9jwBWA9tw79o9v9wT9fw9u9j9v9kw69u9kw949Twg91w9u9jw9C9v919u9kBdl9tw79o9v9wT9fw9u9j9v9kws9p2Twv9P9jTBQk9tw79o9v9wT9fw9u9j9v9kws9p2Twv9R919hTBKl9tw79o9v9wT9fw9u9j9v9kws9p2Twvt949wBXe9tw79o9v9wT9f9v9wT9p9t9p96w9WwvTw94j9h9j9owBSA9tw79o9v9wT9f9v9wT9p9t9p96w9WwvTw94j9h9j9ow9TTv9p9wBZA9tw79o9v9wT9f9v9wT9p9t9p96w9WwvTw94swT9j9o9Sw9t9h9wBhL79iv9rBodWEBCEKDqxQ+f9Q8aDBK/EpE8jU8jJJJJBCJO9rGV8kJJJJBCBHODNALCEFAE0MBABCBrBJ+KJJBC+gEv86BBAVCJDFCBCJDZnJJJB8aDNAItMBAVCJDFADALZ+TJJJB8aKABAEFHRABCEFHEAVALFCBCBCJDAL9rALCfE0eZnJJJB8aAVAVCJDFALZ+TJJJBHWCJ/ABAL9uHODNAItMBAOC/wfBgGOCJDAOCJD6eHdCBHQINAWCJLFCBCJDZnJJJB8aAdAIAQ9rAQAdFAI6eHKADAQAL2FHXDNALtMBAKCSFGOC9wgHMAOCL4CIFCD4HpCBHSAXHZAEHhINDNAKtMBAWASFrBBHoCBHEAZHOINAWCJLFAEFAOrBBGaAo9rGoCETAoCkTCk91CR4786BBAOALFHOAaHoAECEFGEAK9HMBKKDNARAh9rAp6MBAhCBApZnJJJBGcApFHEDNAMtMBCBHxAWCJLFHqINARAE9rCk6MDAWCJLFAxFGlrBDHoCUHODNAlrBEGaAlrBBGkvCfEgMBCBHaAoCfEgMBCBHoDNAlrBIMBAlrBLMBAlrBVMBAlrBOMBAlrBRMBAlrBWMBAlrBdMBAlrBQMBAlrBKMBAlrBXMBAlrBMMBCBHaAlrBpMECBHoCUCBAlrBSeHOKCBHaKDNDNDNDNCLCDCECWAOCZ6GheAkCfEgGkCD0CLvAaCfEgGaCD0FAoCfEgGoCD0FAlrBIGyCD0FAlrBLG8aCD0FAlrBVGeCD0FAlrBOG3CD0FAlrBRG5CD0FAlrBWG8eCD0FAlrBdG8fCD0FAlrBQGACD0FAlrBKGHCD0FAlrBXGGCD0FAlrBMG8jCD0FAlrBpG8kCD0FAlrBSG8lCD0FG8mAOCZAheG8n6GOeAkCp0CWvAaCp0FAoCp0FAyCp0FA8aCp0FAeCp0FA3Cp0FA5Cp0FA8eCp0FA8fCp0FAACp0FAHCp0FAGCp0FA8jCp0FA8kCp0FA8lCp0FA8mA8nAOe6GoeGyCUFpDIEBKAcAxCO4FGaAarBBCDCIAoeAxCI4COgTv86BBAyCW9HMEAEAl8pBB83BBAECWFAlCWF8pBB83BBAECZFHEXDKAcAxCO4FGaAarBBCEAxCI4COgTv86BBKCDCLCWCEAheAOeAoeH8aCUAyTCU7HaCBH5AqHeINAEH3A8aHoAeHECBHOINAErBBGhAaAhAaCfEgGk6eAOCfEgAyTvHOAECEFHEAoCUFGoMBKA3AO86BBAeA8aFHeA3CEFHEA5A8aFG5CZ6MBKDNAlrBBGOAk6MBA3AO86BEA3CDFHEKDNAlrBEGOAk6MBAEAO86BBAECEFHEKDNAlrBDGOAk6MBAEAO86BBAECEFHEKDNAlrBIGOAk6MBAEAO86BBAECEFHEKDNAlrBLGOAk6MBAEAO86BBAECEFHEKDNAlrBVGOAk6MBAEAO86BBAECEFHEKDNAlrBOGOAk6MBAEAO86BBAECEFHEKDNAlrBRGOAk6MBAEAO86BBAECEFHEKDNAlrBWGOAk6MBAEAO86BBAECEFHEKDNAlrBdGOAk6MBAEAO86BBAECEFHEKDNAlrBQGOAk6MBAEAO86BBAECEFHEKDNAlrBKGOAk6MBAEAO86BBAECEFHEKDNAlrBXGOAk6MBAEAO86BBAECEFHEKDNAlrBMGOAk6MBAEAO86BBAECEFHEKDNAlrBpGOAk6MBAEAO86BBAECEFHEKAlrBSGOAk6MBAEAO86BBAECEFHEKAqCZFHqAxCZFGxAM6MBKKAEtMBAZCEFHZAEHhASCEFGSALsMDXEKKCBHOXIKAWAXAKCUFAL2FALZ+TJJJB8aAKAQFGQAI6MBKKCBHOARAE9rCAALALCA6e6MBDNALC8f0MBAECBCAAL9rGOZnJJJBAOFHEKAEAWCJDFALZ+TJJJBALFAB9rHOKAVCJOF8kJJJJBAOK9HEEUAECAAECA0eABCJ/ABAE9uC/wfBgGDCJDADCJD6eGDFCUFAD9uAE2ADCL4CIFCD4ADv2FCEFKMBCBABbDJ+KJJBK/pSEeU8jJJJJBC/AE9rGL8kJJJJBCBHVDNAICI9uGOChFAE0MBABCBYD+E+KJJBGRC/gEv86BBALC/ABFCfECJEZnJJJB8aALCuFGW9CU83IBALC8wFGd9CU83IBALCYFGQ9CU83IBALCAFGK9CU83IBALCkFGX9CU83IBALCZFGM9CU83IBAL9CU83IWAL9CU83IBABAEFC9wFGpABCEFGSAOFGE6HODNAItMBCMCSARCB9KeHZCBHhCBHoCBHaCBHcCBHxINDNAOCEgtMBCBHVXIKCDHqADAaCDTFGOYDBHlAOCWFYDBHkAOCLFYDBHyCBH8aCBHODNDNDNDNDNDNDNDNDNINALC/ABFAOCU7AxFCSgCITFGVYDLHeDNAVYDBGVAl9HMBAeAy9HMBAqC9+FHqXDKDNAVAy9HMBAeAk9HMBAqCUFHqXDKDNAVAk9HMBAeAlsMDKAqCLFHqA8aCZFH8aAOCEFGOCZ9HMBXDKKAqC870MBADAqCIgCX2GVC+E1JJBFYDBAaFCDTFYDBHqADAVCJ1JJBFYDBAaFCDTFYDBHyALADAVC11JJBFYDBAaFCDTFYDBGVAcZ+FJJJBGeCBCSAVAhsGkeAeCB9KAeAZ9IgGleHeAkAlCE7gHkDNARCE9IMBAeCS9HMBAVAVAoAVCEFAosGeeGoCEFsMDCMCSAeeHeKASAeA8av86BBAeCS9HMDAVAo9rGOCETAOC8f917HOINAEAOCfB0CRTAOCfBgv86BBAECEFHEAOCR4GOMBKAVHoXIKADCEAkAhsCETAyAhseCX2GOC11JJBFYDBAaFCDTFYDBHqADAOC+E1JJBFYDBAaFCDTFYDBHeADAOCJ1JJBFYDBAaFCDTFYDBHVCBHlDNARCE9IMBAhtMBAVMBAeCE9HMBAqCD9HMBAW9CU83IBAd9CU83IBAQ9CU83IBAK9CU83IBAX9CU83IBAM9CU83IBAL9CU83IWAL9CU83IBCBHhCEHlKAhAVAhsGOFH8aALAeAcZ+FJJJBHyALAqAcZ+FJJJBHkAyCM0MLAyCEFHyXVKCpHeASAOCLTCpv86BBAVHoKAetMBAeAZ9IMEKALAcCDTFAVbDBAcCEFCSgHcKAhAkFHhALC/ABFAxCITFGOAqbDLAOAVbDBALC/ABFAxCEFCSgGOCITFGeAVbDLAeAybDBAOCEFHVXDKCBCSAeA8asG3eHyA8aA3FH8aKDNDNAkCM0MBAkCEFHkXEKCBCSAqA8asG3eHkA8aA3FH8aKDNDNDNDNDNDNDNDNDNDNDNDNDNDNDNDNDNAkAyCLTvG3CfEgG5C+qUFp9UISSSSSSSSSSSSSSWSLQMSSSSSSSSSSSSESVSSSSSSSSSSSSSRDSdSSSSSSSSSSSSSSKSSSSSSSSSSSSSSSSOBKC/wEH8eA5pDMKpKC/xEH8eXXKC/yEH8eXKKC/zEH8eXQKC/0EH8eXdKC/1EH8eXWKC/2EH8eXRKC/3EH8eXOKC/4EH8eXVKC/5EH8eXLKC/6EH8eXIKC/7EH8eXDKC/8EH8eXEKCPEH8eKAlAVAh9HvMBASA8e86BBXEKASC9+CUAOe86BBAEA386BBAECEFHEKDNAOMBAVAo9rGOCETAOC8f917HOINAEAOCfB0CRTAOCfBgv86BBAECEFHEAOCR4GOMBKAVHoKDNAyCS9HMBAeAo9rGOCETAOC8f917HOINAEAOCfB0CRTAOCfBgv86BBAECEFHEAOCR4GOMBKAeHoKDNAkCS9HMBAqAo9rGOCETAOC8f917HOINAEAOCfB0CRTAOCfBgv86BBAECEFHEAOCR4GOMBKAqHoKALAcCDTFAVbDBAcCEFCSgHODNDNAypZBEEEEEEEEEEEEEEBEKALAOCDTFAebDBAcCDFCSgHOKDNDNAkpZBEEEEEEEEEEEEEEBEKALAOCDTFAqbDBAOCEFCSgHOKALC/ABFAxCITFGyAVbDLAyAebDBALC/ABFAxCEFCSgCITFGyAebDLAyAqbDBALC/ABFAxCDFCSgCITFGeAqbDLAeAVbDBAxCIFHVAOHcA8aHhKApAE6HOASCEFHSAVCSgHxAaCIFGaAI6MBKKCBHVAOMBAE9C/lm+i/D+Z+g8a83BWAE9CJ/s+d+0/1+M/e/U+GU83BBAEAB9rCZFHVKALC/AEF8kJJJJBAVK+mIEEUCBHIDNABADCUFCSgCDTFYDBAEsMBCEHIABADCpFCSgCDTFYDBAEsMBCDHIABADCMFCSgCDTFYDBAEsMBCIHIABADCXFCSgCDTFYDBAEsMBCLHIABADCKFCSgCDTFYDBAEsMBCVHIABADCQFCSgCDTFYDBAEsMBCOHIABADCdFCSgCDTFYDBAEsMBCRHIABADCWFCSgCDTFYDBAEsMBCWHIABADCRFCSgCDTFYDBAEsMBCdHIABADCOFCSgCDTFYDBAEsMBCQHIABADCVFCSgCDTFYDBAEsMBCKHIABADCLFCSgCDTFYDBAEsMBCXHIABADCIFCSgCDTFYDBAEsMBCMHIABADCDFCSgCDTFYDBAEsMBCpHIABADCEFCSgCDTFYDBAEsMBCSCUABADCSgCDTFYDBAEseSKAIKjEIUCRHDDNINADCEFHIADC96FGLC8f0MEAIHDCEALTAE6MBKKAICR9uCI2CDFABCI9u2ChFKMBCBABbD+E+KJJBK+YDERU8jJJJJBCZ9rHLCBHVDNAICVFAE0MBCBHVABCBrB+E+KJJBC/QEv86BBAL9CB83IWABCEFHOABAEFC98FHRDNAItMBCBHWINDNARAO0MBCBSKAVADAWCDTFYDBGdALCWFAVCDTFYDB9rGEAEC8f91GEFAE7C59K7GVAdALCWFAVCDTFGQYDB9rGEC8f91CETAECDT7vHEINAOAECfB0CRTAECfBgv86BBAOCEFHOAECR4GEMBKAQAdbDBAWCEFGWAI9HMBKKCBHVARAO6MBAOCBbBBAOAB9rCLFHVKAVK86EIUCWHDDNINADCEFHIADC95FGLC8f0MEAIHDCEALTAE6MBKKAICR9uAB2CVFK+yWDEUO99DNAEtMBADCLsHVCUADCETCUFTCU7HDDNDNCUAICUFTCU7+yGOjBBBzmGR+LjBBB9P9dtMBAR+oHIXEKCJJJJ94HIKAD+yHWDNAVMBABCOFHDINALCLFiDBGRjBBBBjBBJzALiDBGd+LAR+LmALCWFiDBGQ+LmGR+VARjBBBB9beGRnHKAdARnHRALCXFiDBHdDNDNAQjBBBB9gtMBAKHQXEKjBBJzAR+L+TGQAQ+MAKjBBBB9geHQjBBJzAK+L+TGKAK+MARjBBBB9geHRKADC9+FAI87EBDNDNjBBBzjBBB+/AdjBBBB9geAdjBBJ+/AdjBBJ+/9geGdjBBJzAdjBBJz9feAWnmGd+LjBBB9P9dtMBAd+oHBXEKCJJJJ94HBKADAB87EBDNDNjBBBzjBBB+/AQjBBBB9geAQjBBJ+/AQjBBJ+/9geGdjBBJzAdjBBJz9feAOnmGd+LjBBB9P9dtMBAd+oHBXEKCJJJJ94HBKADC98FAB87EBDNDNjBBBzjBBB+/ARjBBBB9geARjBBJ+/ARjBBJ+/9geGRjBBJzARjBBJz9feAOnmGR+LjBBB9P9dtMBAR+oHBXEKCJJJJ94HBKADC96FAB87EBALCZFHLADCWFHDAECUFGEMBXDKKABCIFHDINALCLFiDBGRjBBBBjBBJzALiDBGd+LAR+LmALCWFiDBGQ+LmGR+VARjBBBB9beGRnHKAdARnHRALCXFiDBHdDNDNAQjBBBB9gtMBAKHQXEKjBBJzAR+L+TGQAQ+MAKjBBBB9geHQjBBJzAK+L+TGKAK+MARjBBBB9geHRKADCUFAI86BBDNDNjBBBzjBBB+/AdjBBBB9geAdjBBJ+/AdjBBJ+/9geGdjBBJzAdjBBJz9feAWnmGd+LjBBB9P9dtMBAd+oHBXEKCJJJJ94HBKADAB86BBDNDNjBBBzjBBB+/AQjBBBB9geAQjBBJ+/AQjBBJ+/9geGdjBBJzAdjBBJz9feAOnmGd+LjBBB9P9dtMBAd+oHBXEKCJJJJ94HBKADC9+FAB86BBDNDNjBBBzjBBB+/ARjBBBB9geARjBBJ+/ARjBBJ+/9geGRjBBJzARjBBJz9feAOnmGR+LjBBB9P9dtMBAR+oHBXEKCJJJJ94HBKADC99FAB86BBALCZFHLADCLFHDAECUFGEMBKKK/KLLD99EUE99EUDNAEtMBDNDNCUAICUFTCU7+yGVjBBBzmGO+LjBBB9P9dtMBAO+oHIXEKCJJJJ94HIKAIC/8fIgHRINABCOFCICDALCLFiDB+LALiDB+L9eGIALCWFiDB+LALAICDTFiDB+L9eeGIALCXFiDB+LALAICDTFiDB+L9eeGIARv87EBDNDNjBBBzjBBB+/ALAICEFCIgCDTFiDBj/zL+1znjBBJ+/jBBJzALAICDTFiDBjBBBB9deGOnGWjBBBB9geAWjBBJ+/AWjBBJ+/9geGWjBBJzAWjBBJz9feAVnmGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKABAd87EBDNDNjBBBzjBBB+/AOALAICDFCIgCDTFiDBj/zL+1znnGWjBBBB9geAWjBBJ+/AWjBBJ+/9geGWjBBJzAWjBBJz9feAVnmGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKABCDFAd87EBDNDNjBBBzjBBB+/AOALAICUFCIgCDTFiDBj/zL+1znnGOjBBBB9geAOjBBJ+/AOjBBJ+/9geGOjBBJzAOjBBJz9feAVnmGO+LjBBB9P9dtMBAO+oHIXEKCJJJJ94HIKABCLFAI87EBABCWFHBALCZFHLAECUFGEMBKKK+tDDWUE998jJJJJBCZ9rGV8kJJJJBDNAEtMBADCD4GOtMBCEAI9rHRAOCDTHWCBHdINC+cUHDALHIAOHQINAIiDBAVCXFZ+YJJJB8aAVYDXGKADADAK9IeHDAICLFHIAQCUFGQMBKARADFGICkTHKCBHDCBAI9rHXAOHIINDNDNALADFiDBGMAXZ+XJJJBjBBBzjBBB+/AMjBBBB9gemGM+LjBBB9P9dtMBAM+oHQXEKCJJJJ94HQKABADFAQCfffRgAKvbDBADCLFHDAICUFGIMBKABAWFHBALAWFHLAdCEFGdAE9HMBKKAVCZF8kJJJJBK+iMDlUI998jJJJJBC+QD9rGV8kJJJJBAVC+oEFCBC/kBZnJJJB8aCBHODNADtMBCBHOAItMBDNABAE9HMBAVCUADCDTGRADCffffI0eCBYD/4+JJJBhJJJJBBGEbD+oEAVCEbD1DAEABARZ+TJJJB8aKAVC+YEFCWFCBbDBAV9CB83I+YEAVC+YEFAEADAIAVC+oEFZ+OJJJBCUAICDTGWAICffffI0eGdCBYD/4+JJJBhJJJJBBHRAVC+oEFAVYD1DGOCDTFARbDBAVAOCEFGQbD1DARAVYD+YEGKAWZ+TJJJBHXAVC+oEFAQCDTFADCI9uGMCBYD/4+JJJBhJJJJBBGRbDBAVAOCDFGWbD1DARCBAMZnJJJBHpAVC+oEFAWCDTFAdCBYD/4+JJJBhJJJJBBGSbDBAVAOCIFGQbD1DAXHRASHWINAWALiDBALARYDBGdCWAdCW6eCDTFC/EBFiDBmuDBARCLFHRAWCLFHWAICUFGIMBKCBHIAVC+oEFAQCDTFCUAMCDTADCffff970eCBYD/4+JJJBhJJJJBBGQbDBAVAOCLFGObD1DDNADCI6MBAEHRAQHWINAWASARYDBCDTFiDBASARCLFYDBCDTFiDBmASARCWFYDBCDTFiDBmuDBARCXFHRAWCLFHWAICEFGIAM6MBKKAVC/MBFHZAVYD+cEHhAVYD+gEHoAVHRCBHdCBHWCBHaCEHcINARHxAEAWCX2FGqCWFGlYDBHDAqYDBHkABAaCX2FGRCLFAqCLFGyYDBG8abDBARAkbDBARCWFADbDBApAWFCE86BBAZADbDWAZA8abDLAZAkbDBAQAWCDTFCBbDBCIHeDNAdtMBAxHRINDNARYDBGIADsMBAIAksMBAIA8asMBAZAeCDTFAIbDBAeCEFHeKARCLFHRAdCUFGdMBKKAXAkCDTFGRARYDBCUFbDBAXA8aCDTFGRARYDBCUFbDBAXADCDTFGRARYDBCUFbDBAoAhAqYDBCDTGIFYDBCDTFGkHRAKAIFGDYDBGdHIDNAdtMBDNINARYDBAWsMEARCLFHRAICUFGItMDXBKKARAdCDTAkFC98FYDBbDBADADYDBCUFbDBKAoAhAyYDBCDTGIFYDBCDTFGkHRAKAIFGDYDBGdHIDNAdtMBDNINARYDBAWsMEARCLFHRAICUFGIMBXDKKARAdCDTAkFC98FYDBbDBADADYDBCUFbDBKDNAKAlYDBCDTGRFGDYDBGdtMBAoAhARFYDBCDTFGkHRAdHIDNINARYDBAWsMEARCLFHRAICUFGIMBXDKKARAdCDTAkFC98FYDBbDBADADYDBCUFbDBKDNDNAetMBCUHWjBBBBH3CBHRINASAZARCDTFYDBCDTGIFGdiDBH5AdALCBARCEFGkARCS0eCDTFiDBALAXAIFYDBGRCWARCW6eCDTFC/EBFiDBmG8euDBDNAKAIFYDBGdtMBA8eA5+TH8eAoAhAIFYDBCDTFHRAdCDTHIINAQARYDBGdCDTFGDA8eADiDBmG5uDBA5A3A3A59dGDeH3AdAWADeHWARCLFHRAIC98FGIMBKKAkHRAkAe9HMBKAWCU9HMEKAcAM9PMDINDNApAcFrBBMBAcHWXDKAMAcCEFGc9HMBXIKKAaCEFHaAeCZAeCZ6eHdAZHRAxHZAWCU9HMBKKAOCDTAVC+oEFFC98FHRDNINAOtMEARYDBCBYD/0+JJJBh+BJJJBBARC98FHRAOCUFHOXBKKAVC+QDF8kJJJJBK/iLEVUCUAICDTGVAICffffI0eGOCBYD/4+JJJBhJJJJBBHRALALYD9gGWCDTFARbDBALAWCEFbD9gABARbDBAOCBYD/4+JJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDLCUADCDTADCffffI0eCBYD/4+JJJBhJJJJBBHRALALYD9gGOCDTFARbDBALAOCEFbD9gABARbDWABYDBCBAVZnJJJB8aADCI9uHdDNADtMBABYDBHOAEHLADHRINAOALYDBCDTFGVAVYDBCEFbDBALCLFHLARCUFGRMBKKDNAItMBABYDBHLABYDLHRCBHVAIHOINARAVbDBARCLFHRALYDBAVFHVALCLFHLAOCUFGOMBKKDNADCI6MBABYDLHRABYDWHVCBHLINAECWFYDBHOAECLFYDBHDARAEYDBCDTFGWAWYDBGWCEFbDBAVAWCDTFALbDBARADCDTFGDADYDBGDCEFbDBAVADCDTFALbDBARAOCDTFGOAOYDBGOCEFbDBAVAOCDTFALbDBAECXFHEALCEFGLAd6MBKKDNAItMBABYDLHEABYDBHLINAEAEYDBALYDB9rbDBALCLFHLAECLFHEAICUFGIMBKKKqBABAEADAIC+k1JJBZ+NJJJBKqBABAEADAIC+M+JJJBZ+NJJJBK9dEEUABCfEAICDTZnJJJBHLCBHIDNADtMBINDNALAEYDBCDTFGBYDBCU9HMBABAIbDBAICEFHIKAECLFHEADCUFGDMBKKAIK9TEIUCBCBYD/8+JJJBGEABCIFC98gFGBbD/8+JJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABK9TEIUCBCBYD/8+JJJBGEABCIFC98gFGBbD/8+JJJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK9+EIUzBHEDNDNCBYD/8+JJJBGDAECZTGI9NMBCUHEADAI9rCffIFCZ4NBCUsMEKADHEKCBABAE9rCIFC98gCBYD/8+JJJBFGDbD/8+JJJBDNADzBCZTGE9NMBADAE9rCffIFCZ4NB8aKKXBABAEZ+ZJJJBK+BEEIUDNAB+8GDCl4GICfEgGLCfEsMBDNALMBDNABjBBBB9cMBAECBbDBABSKABjBBJ9fnAEZ+YJJJBHBAEAEYDBCNFbDBABSKAEAICfEgC+CUFbDBADCfff+D94gCJJJ/4Iv++HBKABK+gEBDNDNAECJE9IMBABjBBBUnHBDNAECfE9OMBAEC+BUFHEXDKABjBBBUnHBAECPDAECPD9IeC+C9+FHEXEKAEC+BU9KMBABjBBJXnHBDNAEC+b9+9MMBAEC/mBFHEXEKABjBBJXnHBAEC+299AEC+2999KeC/MEFHEKABAEClTCJJJ/8IF++nKK+ODDBCJWK/0EBBBBEBBBDBBBEBBBDBBBBBBBDBBBBBBBEBBBBBBB+L29Hz/69+9Kz/n/76z/RG97z/Z/O9Xz8j/b85z/+/U9Yz/B/K9hz+2/z9dz9E+L9Mz59a8kz+R/t3z+a+Zyz79ohz/J4++8++y+d9v8+BBBB9S+49+z8r+Hbz9m9m/m8+l/Z/O8+/8+pg89Q/X+j878r+Hq8++m+b/E87BBBBBBJzBBJzBBJz+e/v/n8++y+dSz9I/h/68+XD/r8+/H0838+/w+nOzBBBB+wv9o8+UF888+9I/h/68+9C9g/l89/N/M9M89/d8kO8+BBBBF+8Tz9M836zs+2azl/Zpzz818ez9E+LXz/u98f8+819e/68+BC/0dKXEBBBDBBBZwBB"),{}).then((function(t){(e=t.instance).exports.__wasm_call_ctors(),e.exports.meshopt_encodeVertexVersion(0),e.exports.meshopt_encodeIndexVersion(1)}))}();var n=function(){var e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if("object"!=typeof WebAssembly)return{supported:!1};var i,n="B9h79tEBBBE8fV9gBB9gVUUUUUEU9gIUUUB9gEUEU9gIUUUEUIKQBEEEDDDILLLVE9wEEEVIEBEOWEUEC+Q/IEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBEy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBDe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBIl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBLk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBOL79iv9rBRQ+x8yQDBK/qMEZU8jJJJJBCJ/EB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rADZ1JJJBHWCJ/ABAD9uC/wfBgGOCJDAOCJD6eHdAICEFHLCBHQDNINAQAE9PMEAdAEAQ9rAQAdFAE6eHKDNDNADtMBAKCSFGOC9wgHXAOCL4CIFCD4HMAWCJDFHpCBHSALHZINDNARAZ9rAM9PMBCBHLXIKAZAMFHLDNAXtMBCBHhCBHIINDNARAL9rCk9PMBCBHLXVKAWCJ/CBFAIFHODNDNDNDNDNAZAICO4FrBBAhCOg4CIgpLBEDIBKAO9CB83IBAOCWF9CB83IBXIKAOALrBLALrBBGoCO4GaAaCIsGae86BBAOCEFALCLFAaFGarBBAoCL4CIgGcAcCIsGce86BBAOCDFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCIFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCLFAaAoFGarBBALrBEGoCO4GcAcCIsGce86BBAOCVFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCOFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCRFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCWFAaAoFGarBBALrBDGoCO4GcAcCIsGce86BBAOCdFAaAcFGarBBAoCL4CIgGcAcCIsGce86BBAOCQFAaAcFGarBBAoCD4CIgGcAcCIsGce86BBAOCKFAaAcFGarBBAoCIgGoAoCIsGoe86BBAOCXFAaAoFGorBBALrBIGLCO4GaAaCIsGae86BBAOCMFAoAaFGorBBALCL4CIgGaAaCIsGae86BBAOCpFAoAaFGorBBALCD4CIgGaAaCIsGae86BBAOCSFAoAaFGOrBBALCIgGLALCIsGLe86BBAOALFHLXDKAOALrBWALrBBGoCL4GaAaCSsGae86BBAOCEFALCWFAaFGarBBAoCSgGoAoCSsGoe86BBAOCDFAaAoFGorBBALrBEGaCL4GcAcCSsGce86BBAOCIFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCLFAoAaFGorBBALrBDGaCL4GcAcCSsGce86BBAOCVFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCOFAoAaFGorBBALrBIGaCL4GcAcCSsGce86BBAOCRFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCWFAoAaFGorBBALrBLGaCL4GcAcCSsGce86BBAOCdFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCQFAoAaFGorBBALrBVGaCL4GcAcCSsGce86BBAOCKFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCXFAoAaFGorBBALrBOGaCL4GcAcCSsGce86BBAOCMFAoAcFGorBBAaCSgGaAaCSsGae86BBAOCpFAoAaFGorBBALrBRGLCL4GaAaCSsGae86BBAOCSFAoAaFGOrBBALCSgGLALCSsGLe86BBAOALFHLXEKAOAL8pBB83BBAOCWFALCWF8pBB83BBALCZFHLKAhCDFHhAICZFGIAX6MBKKDNALMBCBHLXIKDNAKtMBAWASFrBBHhCBHOApHIINAIAWCJ/CBFAOFrBBGZCE4CBAZCEg9r7AhFGh86BBAIADFHIAOCEFGOAK9HMBKKApCEFHpALHZASCEFGSAD9HMBKKABAQAD2FAWCJDFAKAD2Z1JJJB8aAWAWCJDFAKCUFAD2FADZ1JJJB8aKAKCBALeAQFHQALMBKC9+HOXEKCBC99ARAL9rADCAADCA0eseHOKAVCJ/EBF8kJJJJBAOK+OoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJEZ+JJJJB8aAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK+lVOEUE99DUD99EUD99DNDNADCL9HMBAEtMEINDNDNjBBBzjBBB+/ABCDFGD8sBB+yAB8sBBGI+yGL+L+TABCEFGV8sBBGO+yGR+L+TGWjBBBB9gGdeAWjBB/+9CAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI86BBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD86BBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD86BBABCLFHBAECUFGEMBXDKKAEtMBINDNDNjBBBzjBBB+/ABCLFGD8uEB+yAB8uEBGI+yGL+L+TABCDFGV8uEBGO+yGR+L+TGWjBBBB9gGdeAWjB/+fsAWAWnjBBBBAWAdeGQAQ+MGKAICU9KeALmGLALnAQAKAOCU9KeARmGQAQnmm+R+VGRnmGW+LjBBB9P9dtMBAW+oHIXEKCJJJJ94HIKADAI87EBDNDNjBBBzjBBB+/AQjBBBB9geAQARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKAVAD87EBDNDNjBBBzjBBB+/ALjBBBB9geALARnmGW+LjBBB9P9dtMBAW+oHDXEKCJJJJ94HDKABAD87EBABCWFHBAECUFGEMBKKK/SILIUI99IUE99DNAEtMBCBHIABHLINDNDNj/zL81zALCOF8uEBGVCIv+y+VGOAL8uEB+ynGRjB/+fsnjBBBzjBBB+/ARjBBBB9gemGW+LjBBB9P9dtMBAW+oHdXEKCJJJJ94HdKALCLF8uEBHQALCDF8uEBHKABAVCEFCIgAIvCETFAd87EBDNDNAOAK+ynGWjB/+fsnjBBBzjBBB+/AWjBBBB9gemGX+LjBBB9P9dtMBAX+oHKXEKCJJJJ94HKKABAVCDFCIgAIvCETFAK87EBDNDNAOAQ+ynGOjB/+fsnjBBBzjBBB+/AOjBBBB9gemGX+LjBBB9P9dtMBAX+oHQXEKCJJJJ94HQKABAVCUFCIgAIvCETFAQ87EBDNDNjBBJzARARn+TAWAWn+TAOAOn+TGRjBBBBARjBBBB9ge+RjB/+fsnjBBBzmGR+LjBBB9P9dtMBAR+oHQXEKCJJJJ94HQKABAVCIgAIvCETFAQ87EBALCWFHLAICLFHIAECUFGEMBKKK6BDNADCD4AE2GEtMBINABABYDBGDCWTCW91+yADCk91ClTCJJJ/8IF++nuDBABCLFHBAECUFGEMBKKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIK/lEEEUDNDNAEABvCIgtMBABHIXEKDNDNADCZ9PMBABHIXEKABHIINAIAEYDBbDBAICLFAECLFYDBbDBAICWFAECWFYDBbDBAICXFAECXFYDBbDBAICZFHIAECZFHEADC9wFGDCS0MBKKADCL6MBINAIAEYDBbDBAECLFHEAICLFHIADC98FGDCI0MBKKDNADtMBINAIAErBB86BBAICEFHIAECEFHEADCUFGDMBKKABK/AEEDUDNDNABCIgtMBABHIXEKAECfEgC+B+C+EW2HLDNDNADCZ9PMBABHIXEKABHIINAIALbDBAICXFALbDBAICWFALbDBAICLFALbDBAICZFHIADC9wFGDCS0MBKKADCL6MBINAIALbDBAICLFHIADC98FGDCI0MBKKDNADtMBINAIAE86BBAICEFHIADCUFGDMBKKABKKKEBCJWKLZ9kBB";WebAssembly.validate(e)&&(n="B9h79tEBBBE5V9gBB9gVUUUUUEU9gIUUUB9gDUUB9gEUEUIMXBBEBEEDIDIDLLVE9wEEEVIEBEOWEUEC+Q/aEKR/LEdO9tw9t9vv95DBh9f9f939h79t9f9j9h229f9jT9vv7BB8a9tw79o9v9wT9f9kw9j9v9kw9WwvTw949C919m9mwvBDy9tw79o9v9wT9f9kw9j9v9kw69u9kw949C919m9mwvBLe9tw79o9v9wT9f9kw9j9v9kw69u9kw949Twg91w9u9jwBVl9tw79o9v9wT9f9kw9j9v9kws9p2Twv9P9jTBOk9tw79o9v9wT9f9kw9j9v9kws9p2Twv9R919hTBWl9tw79o9v9wT9f9kw9j9v9kws9p2Twvt949wBQL79iv9rBKQ/j6XLBZIK9+EVU8jJJJJBCZ9rHBCBHEINCBHDCBHIINABCWFADFAICJUAEAD4CEgGLe86BBAIALFHIADCEFGDCW9HMBKAEC+Q+YJJBFAI86BBAECITC+Q1JJBFAB8pIW83IBAECEFGECJD9HMBKK1HLSUD97EUO978jJJJJBCJ/KB9rGV8kJJJJBC9+HODNADCEFAL0MBCUHOAIrBBC+gE9HMBAVAIALFGRAD9rAD/8QBBCJ/ABAD9uC/wfBgGOCJDAOCJD6eHWAICEFHOCBHdDNINAdAE9PMEAWAEAd9rAdAWFAE6eHQDNDNADtMBAQCSFGLC9wgGKCI2HXAKCETHMALCL4CIFCD4HpCBHSINAOHZCBHhDNINDNARAZ9rAp9PMBCBHOXVKAVCJ/CBFAhAK2FHoAZApFHOCBHIDNAKC/AB6MBARAO9rC/gB6MBCBHLINAoALFHIDNDNDNDNDNAZALCO4FrBBGaCIgpLBEDIBKAICBPhPKLBXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLBAOCZFHOKDNDNDNDNDNAaCD4CIgpLBEDIBKAICBPhPKLZXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLZAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLZAOCZFHOKDNDNDNDNDNAaCL4CIgpLBEDIBKAICBPhPKLAXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLAAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAIAOPBBBPKLAAOCZFHOKDNDNDNDNDNAaCO4pLBEDIBKAICBPhPKL8wXIKAIAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCLFAlPqBFAaC+Q+YJJBFrBBFHOXDKAIAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBAaC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGaCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKL8wAOCWFAlPqBFAaC+Q+YJJBFrBBFHOXEKAIAOPBBBPKL8wAOCZFHOKALC/ABFHIALCJEFAK0MEAIHLARAO9rC/fB0MBKKDNAIAK9PMBAICI4HLINDNARAO9rCk9PMBCBHOXRKAoAIFHaDNDNDNDNDNAZAICO4FrBBALCOg4CIgpLBEDIBKAaCBPhPKLBXIKAaAOPBBLAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlGcCDP+MEAcPMBZEhDoIaLcVxOqRlC+D+G+MkPhP9OGxCIPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCLFAlPqBFAqC+Q+YJJBFrBBFHOXDKAaAOPBBWAOPBBBGcCLP+MEAcPMBZEhDoIaLcVxOqRlC+P+e+8/4BPhP9OGxCSPSP8jGcP5B9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBAqC+Q+YJJBFPBBBGlAlPMBBBBBBBBBBBBBBBBAcP5E9CJf/8/4/w/g/AB9+9Cu1+nGqCITC+Q1JJBFPBIBP9uPMBEDILVORZhoacxqlPpAxAcP9SPKLBAOCWFAlPqBFAqC+Q+YJJBFrBBFHOXEKAaAOPBBBPKLBAOCZFHOKALCDFHLAICZFGIAK6MBKKDNAOtMBAOHZAhCEFGhCLsMDXEKKCBHOXIKDNAKtMBAVCJDFASFHIAVASFPBDBHlCBHaINAIAVCJ/CBFAaFGLPBLBGxCEP9tAxCEPSGcP9OP9hP9RGxALAKFPBLBGkCEP9tAkAcP9OP9hP9RGkPMBZEhDoIaLcVxOqRlGyALAMFPBLBG8aCEP9tA8aAcP9OP9hP9RG8aALAXFPBLBGeCEP9tAeAcP9OP9hP9RGePMBZEhDoIaLcVxOqRlG3PMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIAlP9uGlPeBbDBAIADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAyA3PMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWkdyQ8aKeX3M5p8eS8fGxA8aAePMWkdyQ8aKeX3M5p8eS8fGkPMBEZhDIoaLVcxORqlGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFGLAlAxAkPMWdkyQK8aeXM35pS8e8fGcAcPMBEDIBEDIBEDIBEDIP9uGlPeBbDBALADFGLAlAcAcPMLVORLVORLVORLVORP9uGlPeBbDBALADFGLAlAcAcPMWdQKWdQKWdQKWdQKP9uGlPeBbDBALADFGLAlAcAcPMXMpSXMpSXMpSXMpSP9uGlPeBbDBALADFHIAaCZFGaAK6MBKKASCLFGSAD6MBKKABAdAD2FAVCJDFAQAD2/8QBBAVAVCJDFAQCUFAD2FAD/8QBBKAQCBAOeAdFHdAOMBKC9+HOXEKCBC99ARAO9rADCAADCA0eseHOKAVCJ/KBF8kJJJJBAOKWBZ+BJJJBK+KoEZU8jJJJJBC/AE9rGV8kJJJJBC9+HODNAECI9uGRChFAL0MBCUHOAIrBBGWC/wEgC/gE9HMBAWCSgGdCE0MBAVC/ABFCfECJE/8KBAVCuF9CU83IBAVC8wF9CU83IBAVCYF9CU83IBAVCAF9CU83IBAVCkF9CU83IBAVCZF9CU83IBAV9CU83IWAV9CU83IBAIALFC9wFHQAICEFGWARFHKDNAEtMBCMCSAdCEseHXABHICBHdCBHMCBHpCBHLCBHOINDNAKAQ9NMBC9+HOXIKDNDNAWrBBGRC/vE0MBAVC/ABFARCL4CU7AOFCSgCITFGSYDLHZASYDBHhDNARCSgGSAX9PMBAVARCU7ALFCSgCDTFYDBAdASeHRAStHSDNDNADCD9HMBABAh87EBABCLFAR87EBABCDFAZ87EBXEKAIAhbDBAICWFARbDBAICLFAZbDBKAdASFHdAVC/ABFAOCITFGoARbDBAoAZbDLAVALCDTFARbDBAVC/ABFAOCEFCSgGOCITFGZAhbDBAZARbDLALASFHLAOCEFHOXDKDNDNASCSsMBAMASFASC987FCEFHMXEKAK8sBBGSCfEgHRDNDNASCU9MMBAKCEFHKXEKAK8sBEGSCfBgCRTARCfBgvHRDNASCU9MMBAKCDFHKXEKAK8sBDGSCfBgCpTARvHRDNASCU9MMBAKCIFHKXEKAK8sBIGSCfBgCxTARvHRDNASCU9MMBAKCLFHKXEKAKrBLC3TARvHRAKCVFHKKARCE4CBARCEg9r7AMFHMKDNDNADCD9HMBABAh87EBABCLFAM87EBABCDFAZ87EBXEKAIAhbDBAICWFAMbDBAICLFAZbDBKAVC/ABFAOCITFGRAMbDBARAZbDLAVALCDTFAMbDBAVC/ABFAOCEFCSgGOCITFGRAhbDBARAMbDLALCEFHLAOCEFHOXEKDNARCPE0MBAVALAQARCSgFrBBGSCL4GZ9rCSgCDTFYDBAdCEFGhAZeHRAVALAS9rCSgCDTFYDBAhAZtGoFGhASCSgGZeHSAZtHZDNDNADCD9HMBABAd87EBABCLFAS87EBABCDFAR87EBXEKAIAdbDBAICWFASbDBAICLFARbDBKAVALCDTFAdbDBAVC/ABFAOCITFGaARbDBAaAdbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALAoFCSgGLCDTFASbDBAVC/ABFAOCDFCSgGOCITFGRAdbDBARASbDLAOCEFHOALAZFHLAhAZFHdXEKAdCBAKrBBGaeGZARC/+EsGcFHRAaCSgHhDNDNAaCL4GoMBARCEFHSXEKARHSAVALAo9rCSgCDTFYDBHRKDNDNAhMBASCEFHdXEKASHdAVALAa9rCSgCDTFYDBHSKDNDNActMBAKCEFHaXEKAK8sBEGaCfEgHZDNDNAaCU9MMBAKCDFHaXEKAK8sBDGaCfBgCRTAZCfBgvHZDNAaCU9MMBAKCIFHaXEKAK8sBIGaCfBgCpTAZvHZDNAaCU9MMBAKCLFHaXEKAK8sBLGaCfBgCxTAZvHZDNAaCU9MMBAKCVFHaXEKAKCOFHaAKrBVC3TAZvHZKAZCE4CBAZCEg9r7AMFGMHZKDNDNAoCSsMBAaHcXEKAa8sBBGKCfEgHRDNDNAKCU9MMBAaCEFHcXEKAa8sBEGKCfBgCRTARCfBgvHRDNAKCU9MMBAaCDFHcXEKAa8sBDGKCfBgCpTARvHRDNAKCU9MMBAaCIFHcXEKAa8sBIGKCfBgCxTARvHRDNAKCU9MMBAaCLFHcXEKAaCVFHcAarBLC3TARvHRKARCE4CBARCEg9r7AMFGMHRKDNDNAhCSsMBAcHKXEKAc8sBBGKCfEgHSDNDNAKCU9MMBAcCEFHKXEKAc8sBEGKCfBgCRTASCfBgvHSDNAKCU9MMBAcCDFHKXEKAc8sBDGKCfBgCpTASvHSDNAKCU9MMBAcCIFHKXEKAc8sBIGKCfBgCxTASvHSDNAKCU9MMBAcCLFHKXEKAcCVFHKAcrBLC3TASvHSKASCE4CBASCEg9r7AMFGMHSKDNDNADCD9HMBABAZ87EBABCLFAS87EBABCDFAR87EBXEKAIAZbDBAICWFASbDBAICLFARbDBKAVC/ABFAOCITFGaARbDBAaAZbDLAVALCDTFAZbDBAVC/ABFAOCEFCSgCITFGaASbDBAaARbDLAVALCEFGLCSgCDTFARbDBAVC/ABFAOCDFCSgCITFGRAZbDBARASbDLAVALAotAoCSsvFGLCSgCDTFASbDBALAhtAhCSsvFHLAOCIFHOKAWCEFHWABCOFHBAICXFHIAOCSgHOALCSgHLApCIFGpAE6MBKKCBC99AKAQseHOKAVC/AEF8kJJJJBAOK/tLEDU8jJJJJBCZ9rHVC9+HODNAECVFAL0MBCUHOAIrBBC/+EgC/QE9HMBAV9CB83IWAICEFHOAIALFC98FHIDNAEtMBDNADCDsMBINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKAVCWFALCEgCDTvGDALCD4CBALCE4CEg9r7ADYDBFGLbDBABALbDBABCLFHBAECUFGEMBXDKKINDNAOAI6MBC9+SKAO8sBBGDCfEgHLDNDNADCU9MMBAOCEFHOXEKAO8sBEGDCfBgCRTALCfBgvHLDNADCU9MMBAOCDFHOXEKAO8sBDGDCfBgCpTALvHLDNADCU9MMBAOCIFHOXEKAO8sBIGDCfBgCxTALvHLDNADCU9MMBAOCLFHOXEKAOrBLC3TALvHLAOCVFHOKABALCD4CBALCE4CEg9r7AVCWFALCEgCDTvGLYDBFGD87EBALADbDBABCDFHBAECUFGEMBKKCBC99AOAIseHOKAOK/xVDIUO978jJJJJBCA9rGI8kJJJJBDNDNADCL9HMBDNAEC98gGLtMBABHDCBHVINADADPBBBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKBBADCZFHDAVCLFGVAL6MBKKALAE9PMEAIAECIgGVCDTGDvCBCZAD9r/8KBAIABALCDTFGLAD/8QBBDNAVtMBAIAIPBLBGOCkP+rECkP+sEP/6EGRAOCWP+rECkP+sEP/6EARP/gEAOCZP+rECkP+sEP/6EGWP/gEP/kEP/lEGdCBPhP+2EGQARCJJJJ94PhGKP9OP9RP/kEGRjBB/+9CPaARARP/mEAdAdP/mEAWAQAWAKP9OP9RP/kEGRARP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGQP/kECfEPhP9OAOCJJJ94PhP9OP9QARAWP/mEAQP/kECWP+rECJ/+IPhP9OP9QAdAWP/mEAQP/kECZP+rECJJ/8RPhP9OP9QPKLBKALAIAD/8QBBXEKABAEC98gGDZ+HJJJBADAE9PMBAIAECIgGLCITGVFCBCAAV9r/8KBAIABADCITFGDAV/8QBBAIALZ+HJJJBADAIAV/8QBBKAICAF8kJJJJBK+yIDDUR97DNAEtMBCBHDINABCZFGIAIPBBBGLCBPhGVCJJ98P3ECJJ98P3IGOP9OABPBBBGRALPMLVORXMpScxql358e8fCffEPhP9OP/6EARALPMBEDIWdQKZhoaky8aeGLCZP+sEP/6EGWP/gEALCZP+rECZP+sEP/6EGdP/gEP/kEP/lEGLjB/+fsPaAdALAVP+2EGVAdCJJJJ94PhGQP9OP9RP/kEGdAdP/mEALALP/mEAWAVAWAQP9OP9RP/kEGLALP/mEP/kEP/kEP/jEP/nEGWP/mEjBBN0PaGVP/kECZP+rEAdAWP/mEAVP/kECffIPhP9OP9QGdALAWP/mEAVP/kECUPSCBPlDCBPlICBPlOCBPlRCBPlQCBPlKCBPlpCBPlSP9OGLPMWdkyQK8aeXM35pS8e8fP9QPKBBABARAOP9OAdALPMBEZhDIoaLVcxORqlP9QPKBBABCAFHBADCLFGDAE6MBKKK94EIU8jJJJJBCA9rGI8kJJJJBABAEC98gGLZ+JJJJBDNALAE9PMBAIAECIgGVCITGEFCBCAAE9r/8KBAIABALCITFGBAE/8QBBAIAVZ+JJJJBABAIAE/8QBBKAICAF8kJJJJBK/hILDUE97EUV978jJJJJBCZ9rHDDNAEtMBCBHIINADABPBBBGLABCZFGVPBBBGOPMLVORXMpScxql358e8fGRCZP+sEGWCLP+rEPKLBABjBBJzPaj/zL81zPaAWCIPhP9QP/6EP/nEGWALAOPMBEDIWdQKZhoaky8aeGLCZP+rECZP+sEP/6EP/mEGOAOP/mEAWALCZP+sEP/6EP/mEGdAdP/mEAWARCZP+rECZP+sEP/6EP/mEGRARP/mEP/kEP/kEP/lECBPhP+4EP/jEjB/+fsPaGWP/mEjBBN0PaGLP/kECffIPhGQP9OAdAWP/mEALP/kECZP+rEP9QGdARAWP/mEALP/kECZP+rEAOAWP/mEALP/kEAQP9OP9QGWPMBEZhDIoaLVcxORqlGLP5BADPBLBPeB+t+J83IBABCWFALP5EADPBLBPeE+t+J83IBAVAdAWPMWdkyQK8aeXM35pS8e8fGWP5BADPBLBPeD+t+J83IBABCkFAWP5EADPBLBPeI+t+J83IBABCAFHBAICLFGIAE6MBKKK/3EDIUE978jJJJJBC/AB9rHIDNADCD4AE2GLC98gGVtMBCBHDABHEINAEAEPBBBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKBBAECZFHEADCLFGDAV6MBKKDNAVAL9PMBAIALCIgGDCDTGEvCBC/ABAE9r/8KBAIABAVCDTFGVAE/8QBBDNADtMBAIAIPBLBGOCWP+rECWP+sEP/6EAOCkP+sEClP+rECJJJ/8IPhP+uEP/mEPKLBKAVAIAE/8QBBKK9TEIUCBCBYDJ1JJBGEABCIFC98gFGBbDJ1JJBDNDNABzBCZTGD9NMBCUHIABAD9rCffIFCZ4NBCUsMEKAEHIKAIKKKEBCJWKLZ9tBB");var a=WebAssembly.instantiate(function(e){for(var i=new Uint8Array(e.length),n=0;n<e.length;++n){var a=e.charCodeAt(n);i[n]=a>96?a-71:a>64?a-65:a>47?a+4:a>46?63:62}var r=0;for(n=0;n<e.length;++n)i[r++]=i[n]<60?t[i[n]]:64*(i[n]-60)+i[++n];return i.buffer.slice(0,r)}(n),{}).then((function(e){(i=e.instance).exports.__wasm_call_ctors()}));function r(e,t,n,a,r,o){var s=i.exports.sbrk,l=n+3&-4,u=s(l*a),d=s(r.length),c=new Uint8Array(i.exports.memory.buffer);c.set(r,d);var f=e(u,n,a,d,r.length);if(0==f&&o&&o(u,l,a),t.set(c.subarray(u,u+n*a)),s(u-s(0)),0!=f)throw new Error("Malformed buffer data: "+f)}var o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},s={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return{ready:a,supported:!0,decodeVertexBuffer:function(e,t,n,a,s){r(i.exports.meshopt_decodeVertexBuffer,e,t,n,a,i.exports[o[s]])},decodeIndexBuffer:function(e,t,n,a){r(i.exports.meshopt_decodeIndexBuffer,e,t,n,a)},decodeIndexSequence:function(e,t,n,a){r(i.exports.meshopt_decodeIndexSequence,e,t,n,a)},decodeGltfBuffer:function(e,t,n,a,l,u){r(i.exports[s[l]],e,t,n,a,i.exports[o[u]])}}}()},function(e,t,i){"use strict";var n=i(25),a=i(0);function r(e){Object(a.default)(e.extras)&&(Object(a.default)(e.extras._pipeline)&&delete e.extras._pipeline,0===Object.keys(e.extras).length&&delete e.extras)}t.a=function(e){return n.a.shader(e,(function(e){r(e)})),n.a.buffer(e,(function(e){r(e)})),n.a.image(e,(function(e){r(e)})),r(e),e}},function(e,t,i){"use strict";var n=i(8),a=i(1),r=i(16),o=i(4),s=i(2),l=i(0),u=i(128),d=i(12),c=i(6),f=i(94),h=i(93);function p(e){var t,i=(e=Object(s.default)(e,s.default.EMPTY_OBJECT)).id,n=e.property;o.a.typeOf.string("options.id",i),o.a.typeOf.object("options.property",n),Object(l.default)(n.enumType)&&(t=e.enums[n.enumType]);var a,r=n.type;h.a.hasOwnProperty(r)?(a=h.a[r],r=f.a.SINGLE):(r=Object(s.default)(f.a[r],f.a.SINGLE),a=h.a[n.componentType]);var u=function(e,t){if(e===h.a.ENUM)return t.valueType;return e}(a,t),d=h.a.isIntegerType(a)&&Object(s.default)(n.normalized,!1),c=r===f.a.ARRAY?n.componentCount:f.a.getComponentCount(r);this._id=i,this._name=n.name,this._description=n.description,this._type=r,this._enumType=t,this._valueType=u,this._componentType=a,this._componentCount=c,this._normalized=d,this._min=n.min,this._max=n.max,this._default=n.default,this._optional=Object(s.default)(n.optional,!1),this._semantic=n.semantic,this._extras=n.extras,this._extensions=n.extensions}function m(e,t){return"value "+e+" does not match type "+t}function _(e,t,i){var n="value "+e+" is out of range for type "+t;return i&&(n+=" (normalized)"),n}function g(e,t,i){if(i){return e<(h.a.isUnsignedIntegerType(t)?0:-1)||e>1?_(e,t,i):void 0}if(e<h.a.getMinimum(t)||e>h.a.getMaximum(t))return _(e,t,i)}function v(e,t){return"value "+e+" of type "+t+" must be finite"}function y(e,t){var i=typeof t,n=e._enumType;if(Object(l.default)(n))return"string"===i&&Object(l.default)(n.valuesByName[t])?void 0:"value "+t+" is not a valid enum name for "+n.id;var a=e._valueType,r=e._normalized;switch(a){case h.a.INT8:case h.a.UINT8:case h.a.INT16:case h.a.UINT16:case h.a.INT32:case h.a.UINT32:return"number"!==i?m(t,a):g(t,a,r);case h.a.INT64:case h.a.UINT64:return"number"!==i&&"bigint"!==i?m(t,a):g(t,a,r);case h.a.FLOAT32:case h.a.FLOAT64:return"number"!==i?m(t,a):isFinite(t)?g(t,a,r):v(t,a);case h.a.BOOLEAN:if("boolean"!==i)return m(t,a);break;case h.a.STRING:if("string"!==i)return m(t,a)}}function b(e,t,i){if(!e._normalized)return t;var n,a,r=e._type,o=e._valueType;if(r===f.a.ARRAY)for(a=t.length,n=0;n<a;++n)t[n]=i(t[n],o);else if(f.a.isVectorType(r)||f.a.isMatrixType(r))for(a=f.a.getComponentCount(r),n=0;n<a;++n)t[n]=i(t[n],o);else t=i(t,o);return t}Object.defineProperties(p.prototype,{id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},type:{get:function(){return this._type}},enumType:{get:function(){return this._enumType}},componentType:{get:function(){return this._componentType}},valueType:{get:function(){return this._valueType}},componentCount:{get:function(){return this._componentCount}},normalized:{get:function(){return this._normalized}},max:{get:function(){return this._max}},min:{get:function(){return this._min}},default:{get:function(){return this._default}},optional:{get:function(){return this._optional}},semantic:{get:function(){return this._semantic}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),p.prototype.normalize=function(e){return b(this,e,h.a.normalize)},p.prototype.unnormalize=function(e){return b(this,e,h.a.unnormalize)},p.prototype.unpackVectorAndMatrixTypes=function(e){switch(this._type){case f.a.VEC2:return n.default.unpack(e);case f.a.VEC3:return a.default.unpack(e);case f.a.VEC4:return r.a.unpack(e);case f.a.MAT2:return u.a.unpack(e);case f.a.MAT3:return d.default.unpack(e);case f.a.MAT4:return c.default.unpack(e);default:return e}},p.prototype.packVectorAndMatrixTypes=function(e){switch(this._type){case f.a.VEC2:return n.default.pack(e,[]);case f.a.VEC3:return a.default.pack(e,[]);case f.a.VEC4:return r.a.pack(e,[]);case f.a.MAT2:return u.a.pack(e,[]);case f.a.MAT3:return d.default.pack(e,[]);case f.a.MAT4:return c.default.pack(e,[]);default:return e}},p.prototype.validate=function(e){var t=this._type,i=this._componentType;return f.a.isVectorType(t)||f.a.isMatrixType(t)?function(e,t,i){if(!h.a.isVectorCompatible(i)){var o="componentType "+i+" is incompatible with ";return f.a.isVectorType(t)?o+"vector type "+t:o+"matrix type "+t}if(t===f.a.VEC2&&!(e instanceof n.default))return"vector value "+e+" must be a Cartesian2";if(t===f.a.VEC3&&!(e instanceof a.default))return"vector value "+e+" must be a Cartesian3";if(t===f.a.VEC4&&!(e instanceof r.a))return"vector value "+e+" must be a Cartesian4";if(t===f.a.MAT2&&!(e instanceof u.a))return"matrix value "+e+" must be a Matrix2";if(t===f.a.MAT3&&!(e instanceof d.default))return"matrix value "+e+" must be a Matrix3";if(t===f.a.MAT4&&!(e instanceof c.default))return"matrix value "+e+" must be a Matrix4"}(e,t,i):t===f.a.ARRAY?function(e,t,i){if(!Array.isArray(t))return m(t,f.a.ARRAY);var n=t.length;if(Object(l.default)(i)&&i!==n)return"Array length does not match componentCount";for(var a=0;a<n;++a){var r=y(e,t[a]);if(Object(l.default)(r))return r}}(this,e,this._componentCount):y(this,e)},t.a=p},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(884),o=i(93);function s(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).id,i=e.enum;n.a.typeOf.string("options.id",t),n.a.typeOf.object("options.enum",i);var s={},l={},u=i.values.map((function(e){return s[e.value]=e.name,l[e.name]=e.value,new r.a(e)})),d=Object(a.default)(o.a[i.valueType],o.a.UINT16);this._values=u,this._namesByValue=s,this._valuesByName=l,this._valueType=d,this._id=t,this._name=i.name,this._description=i.description,this._extras=i.extras,this._extensions=i.extensions}Object.defineProperties(s.prototype,{values:{get:function(){return this._values}},namesByValue:{get:function(){return this._namesByValue}},valuesByName:{get:function(){return this._valuesByName}},valueType:{get:function(){return this._valueType}},id:{get:function(){return this._id}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),t.a=s},function(e,t,i){"use strict";var n=i(4);function a(e){n.a.typeOf.object("value",e),this._value=e.value,this._name=e.name,this._description=e.description,this._extras=e.extras,this._extensions=e.extensions}Object.defineProperties(a.prototype,{value:{get:function(){return this._value}},name:{get:function(){return this._name}},description:{get:function(){return this._description}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),t.a=a},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(4),a=i(2);function r(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.typeOf.object("options.implicitSubtree",e.implicitSubtree),n.a.typeOf.object("options.implicitCoordinates",e.implicitCoordinates),this._class=e.class;var t=e.implicitSubtree;this._metadataTable=t.metadataTable,this._entityId=t.getEntityId(e.implicitCoordinates);var i=t.metadataExtension;this._extensions=i.extensions,this._extras=i.extras}Object.defineProperties(r.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),r.prototype.hasProperty=function(e){return this._metadataTable.hasProperty(e)},r.prototype.hasPropertyBySemantic=function(e){return this._metadataTable.hasPropertyBySemantic(e)},r.prototype.getPropertyIds=function(e){return this._metadataTable.getPropertyIds(e)},r.prototype.getProperty=function(e){return this._metadataTable.getProperty(this._entityId,e)},r.prototype.setProperty=function(e,t){return this._metadataTable.setProperty(this._entityId,e,t)},r.prototype.getPropertyBySemantic=function(e){return this._metadataTable.getPropertyBySemantic(this._entityId,e)},r.prototype.setPropertyBySemantic=function(e,t){return this._metadataTable.setPropertyBySemantic(this._entityId,e,t)}},function(e,t,i){"use strict";t.a=Object.freeze({ID:"ID",NAME:"NAME",DESCRIPTION:"DESCRIPTION",TILE_BOUNDING_BOX:"TILE_BOUNDING_BOX",TILE_BOUNDING_REGION:"TILE_BOUNDING_REGION",TILE_BOUNDING_SPHERE:"TILE_BOUNDING_SPHERE",TILE_MINIMUM_HEIGHT:"TILE_MINIMUM_HEIGHT",TILE_MAXIMUM_HEIGHT:"TILE_MAXIMUM_HEIGHT",TILE_HORIZON_OCCLUSION_POINT:"TILE_HORIZON_OCCLUSION_POINT",TILE_GEOMETRIC_ERROR:"TILE_GEOMETRIC_ERROR",CONTENT_BOUNDING_BOX:"CONTENT_BOUNDING_BOX",CONTENT_BOUNDING_REGION:"CONTENT_BOUNDING_REGION",CONTENT_BOUNDING_SPHERE:"CONTENT_BOUNDING_SPHERE",CONTENT_MINIMUM_HEIGHT:"CONTENT_MINIMUM_HEIGHT",CONTENT_MAXIMUM_HEIGHT:"CONTENT_MAXIMUM_HEIGHT",CONTENT_HORIZON_OCCLUSION_POINT:"CONTENT_HORIZON_OCCLUSION_POINT"})},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(4),a=i(0);function r(e){return n.a.typeOf.object("tileMetadata",e),{tile:{boundingVolume:o("TILE",e),minimumHeight:s("TILE",e),maximumHeight:l("TILE",e)},content:{boundingVolume:o("CONTENT",e),minimumHeight:s("CONTENT",e),maximumHeight:l("CONTENT",e)}}}function o(e,t){var i=e+"_BOUNDING_BOX",n=t.getPropertyBySemantic(i);if(Object(a.default)(n))return{box:n};var r=e+"_BOUNDING_REGION",o=t.getPropertyBySemantic(r);if(Object(a.default)(o))return{region:o};var s=e+"_BOUNDING_SPHERE",l=t.getPropertyBySemantic(s);return Object(a.default)(l)?{sphere:l}:void 0}function s(e,t){var i=e+"_MINIMUM_HEIGHT";return t.getPropertyBySemantic(i)}function l(e,t){var i=e+"_MAXIMUM_HEIGHT";return t.getPropertyBySemantic(i)}},function(e,t,i){"use strict";var n=i(105),a=i(1),r=i(7),o=i(11),s=i(2),l=i(0),u=i(214),d=i(19),c=i(3),f=i(15),h=i(159),p=i(227),m=i(12),_=i(6),g=i(27),v=i(157),y=i(23),b=i(52),w=i(400),O=i(26),x=i(90),A=i(237),T=i(173),E=i(266),C=i(889),S=i(209);function M(e,t,i,r,u){this._tileset=e,this._tile=t,this._resource=i,this._modelInstanceCollection=void 0,this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t,i){var r=Object(s.default)(i,0);i=r;var u=new Uint8Array(t),d=new DataView(t);i+=P;var c=d.getUint32(i,!0);if(1!==c)throw new y.a("Only Instanced 3D Model version 1 is supported. Version "+c+" is not.");i+=P;var T=d.getUint32(i,!0);i+=P;var j=d.getUint32(i,!0);if(0===j)throw new y.a("featureTableJsonByteLength is zero, the feature table must be defined.");i+=P;var R=d.getUint32(i,!0);i+=P;var N=d.getUint32(i,!0);i+=P;var B=d.getUint32(i,!0);i+=P;var F=d.getUint32(i,!0);if(1!==F&&0!==F)throw new y.a("Only glTF format 0 (uri) or 1 (embedded) are supported. Format "+F+" is not.");i+=P;var k=Object(h.a)(u,i,j);i+=j;var z=new Uint8Array(t,i,R);i+=R;var U,V,H=new E.a(k,z),G=H.getGlobalProperty("INSTANCES_LENGTH");if(H.featuresLength=G,!Object(l.default)(G))throw new y.a("Feature table global property: INSTANCES_LENGTH must be defined");N>0&&(U=Object(h.a)(u,i,N),i+=N,B>0&&(V=new Uint8Array(t,i,B),V=new Uint8Array(V),i+=B));e._batchTable=new A.a(e,G,U,V);var Y,W=r+T-i;if(0===W)throw new y.a("glTF byte length is zero, i3dm must have a glTF to instance.");i%4==0?Y=new Uint8Array(t,i,W):(M._deprecationWarning("i3dm-glb-unaligned","The embedded glb is not aligned to a 4-byte boundary."),Y=new Uint8Array(u.subarray(i,i+W)));var q=e._tileset,X={instances:new Array(G),batchTable:e._batchTable,cull:!1,url:void 0,requestType:v.a.TILES3D,gltf:void 0,basePath:void 0,incrementallyLoadTextures:!1,upAxis:q._gltfUpAxis,forwardAxis:x.a.X,opaquePass:O.default.CESIUM_3D_TILE,pickIdLoaded:D(e),imageBasedLightingFactor:q.imageBasedLightingFactor,lightColor:q.lightColor,luminanceAtZenith:q.luminanceAtZenith,sphericalHarmonicCoefficients:q.sphericalHarmonicCoefficients,specularEnvironmentMaps:q.specularEnvironmentMaps,backFaceCulling:q.backFaceCulling,showOutline:q.showOutline};if(0===F){var K=Object(p.a)(Y);K=K.replace(/[\s\0]+$/,""),X.url=e._resource.getDerivedResource({url:K})}else X.gltf=Y,X.basePath=e._resource.clone();var J,Z=H.getGlobalProperty("EAST_NORTH_UP"),Q=H.getGlobalProperty("RTC_CENTER",o.default.FLOAT,3);Object(l.default)(Q)&&(J=a.default.unpack(Q));for(var $=X.instances,ee=new a.default,te=new Array(3),ie=new a.default,ne=new a.default,ae=new a.default,re=new m.default,oe=new g.default,se=new a.default,le=new w.a,ue=new _.default,de=0;de<G;de++){var ce=H.getProperty("POSITION",o.default.FLOAT,3,de,I);if(!Object(l.default)(ce)){ce=te;var fe=H.getProperty("POSITION_QUANTIZED",o.default.UNSIGNED_SHORT,3,de,I);if(!Object(l.default)(fe))throw new y.a("Either POSITION or POSITION_QUANTIZED must be defined for each instance.");var he=H.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",o.default.FLOAT,3);if(!Object(l.default)(he))throw new y.a("Global property: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");var pe=H.getGlobalProperty("QUANTIZED_VOLUME_SCALE",o.default.FLOAT,3);if(!Object(l.default)(pe))throw new y.a("Global property: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");for(var me=0;me<3;me++)ce[me]=fe[me]/65535*pe[me]+he[me]}a.default.unpack(ce,0,ee),Object(l.default)(J)&&a.default.add(ee,J,ee),le.translation=ee;var _e=H.getProperty("NORMAL_UP",o.default.FLOAT,3,de,I),ge=H.getProperty("NORMAL_RIGHT",o.default.FLOAT,3,de,L),ve=!1;if(Object(l.default)(_e)){if(!Object(l.default)(ge))throw new y.a("To define a custom orientation, both NORMAL_UP and NORMAL_RIGHT must be defined.");a.default.unpack(_e,0,ne),a.default.unpack(ge,0,ie),ve=!0}else{var ye=H.getProperty("NORMAL_UP_OCT32P",o.default.UNSIGNED_SHORT,2,de,I),be=H.getProperty("NORMAL_RIGHT_OCT32P",o.default.UNSIGNED_SHORT,2,de,L);if(Object(l.default)(ye)){if(!Object(l.default)(be))throw new y.a("To define a custom orientation with oct-encoded vectors, both NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P must be defined.");n.a.octDecodeInRange(ye[0],ye[1],65535,ne),n.a.octDecodeInRange(be[0],be[1],65535,ie),ve=!0}else Z?(b.default.eastNorthUpToFixedFrame(ee,f.default.WGS84,ue),_.default.getMatrix3(ue,re)):m.default.clone(m.default.IDENTITY,re)}ve&&(a.default.cross(ie,ne,ae),a.default.normalize(ae,ae),m.default.setColumn(re,0,ie,re),m.default.setColumn(re,1,ne,re),m.default.setColumn(re,2,ae,re)),g.default.fromRotationMatrix(re,oe),le.rotation=oe,se=a.default.fromElements(1,1,1,se);var we=H.getProperty("SCALE",o.default.FLOAT,1,de);Object(l.default)(we)&&a.default.multiplyByScalar(se,we,se);var Oe=H.getProperty("SCALE_NON_UNIFORM",o.default.FLOAT,3,de,I);Object(l.default)(Oe)&&(se.x*=Oe[0],se.y*=Oe[1],se.z*=Oe[2]),le.scale=se;var xe=H.getProperty("BATCH_ID",o.default.UNSIGNED_SHORT,1,de);Object(l.default)(xe)||(xe=de),_.default.fromTranslationRotationScale(le,ue);var Ae=ue.clone();$[de]={modelMatrix:Ae,batchId:xe}}e._modelInstanceCollection=new C.a(X),e._modelInstanceCollection.readyPromise.then((function(e){e.activeAnimations.addAll({loop:S.a.REPEAT})}))}(this,r,u)}function D(e){return function(){return e._batchTable.getPickId()}}M._deprecationWarning=u.a,Object.defineProperties(M.prototype,{featuresLength:{get:function(){return this._batchTable.featuresLength}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){var e=this._modelInstanceCollection._model;return Object(l.default)(e)?e.trianglesLength:0}},geometryByteLength:{get:function(){var e=this._modelInstanceCollection._model;return Object(l.default)(e)?e.geometryByteLength:0}},texturesByteLength:{get:function(){var e=this._modelInstanceCollection._model;return Object(l.default)(e)?e.texturesByteLength:0}},batchTableByteLength:{get:function(){return this._batchTable.memorySizeInBytes}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._modelInstanceCollection.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}});var P=Uint32Array.BYTES_PER_ELEMENT,I=new Array(4),L=new Array(4);M.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},M.prototype.getFeature=function(e){var t=this.featuresLength;if(!Object(l.default)(e)||e<0||e>=t)throw new c.default("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return function(e){var t=e.featuresLength;if(!Object(l.default)(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new T.a(e,n);e._features=i}}(this),this._features[e]},M.prototype.applyDebugSettings=function(e,t){t=e?t:r.default.WHITE,this._batchTable.setAllColor(t)},M.prototype.applyStyle=function(e){this._batchTable.applyStyle(e)},M.prototype.update=function(e,t){var i=t.commandList.length;this._batchTable.update(e,t),this._modelInstanceCollection.modelMatrix=this._tile.computedTransform,this._modelInstanceCollection.shadows=this._tileset.shadows,this._modelInstanceCollection.lightColor=this._tileset.lightColor,this._modelInstanceCollection.luminanceAtZenith=this._tileset.luminanceAtZenith,this._modelInstanceCollection.sphericalHarmonicCoefficients=this._tileset.sphericalHarmonicCoefficients,this._modelInstanceCollection.specularEnvironmentMaps=this._tileset.specularEnvironmentMaps,this._modelInstanceCollection.backFaceCulling=this._tileset.backFaceCulling,this._modelInstanceCollection.debugWireframe=this._tileset.debugWireframe;var n=this._modelInstanceCollection._model;if(Object(l.default)(n)){var a=this._tileset.clippingPlanes;n.referenceMatrix=this._tileset.clippingPlanesOriginMatrix,Object(l.default)(a)&&this._tile.clippingPlanesDirty&&(n._clippingPlanes=a.enabled&&this._tile._isClipped?a:void 0),Object(l.default)(a)&&Object(l.default)(n._clippingPlanes)&&n._clippingPlanes!==a&&(n._clippingPlanes=a)}this._modelInstanceCollection.update(t),i<t.commandList.length&&(t.passes.render||t.passes.pick)&&this._batchTable.addDerivedCommands(t,i,!1)},M.prototype.isDestroyed=function(){return!1},M.prototype.destroy=function(){return this._modelInstanceCollection=this._modelInstanceCollection&&this._modelInstanceCollection.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(d.default)(this)},t.a=M},function(e,t,i){"use strict";var n=i(17),a=i(8),r=i(1),o=i(4),s=i(50),l=i(7),u=i(11),d=i(2),c=i(0),f=i(19),h=i(3),p=i(6),m=i(35),_=i(30),g=i(23),v=i(52),y=i(57),b=i(36),w=i(44),O=i(26),x=i(39),A=i(34),T=i(25),E=i(18),C=i(250),S=i(890),M=i(73),D=i(13),P=i(86),I=0,L=1,j=2,R=3;function N(e){if(e=Object(d.default)(e,d.default.EMPTY_OBJECT),!Object(c.default)(e.gltf)&&!Object(c.default)(e.url))throw new h.default("Either options.gltf or options.url is required.");if(Object(c.default)(e.gltf)&&Object(c.default)(e.url))throw new h.default("Cannot pass in both options.gltf and options.url.");this.show=Object(d.default)(e.show,!0),this._instancingSupported=!1,this._dynamic=Object(d.default)(e.dynamic,!1),this._allowPicking=Object(d.default)(e.allowPicking,!0),this._ready=!1,this._readyPromise=E.a.defer(),this._state=I,this._dirty=!1,this._cull=Object(d.default)(e.cull,!0),this._opaquePass=Object(d.default)(e.opaquePass,O.default.OPAQUE),this._instances=function(e,t){for(var i=(t=Object(d.default)(t,[])).length,n=new Array(i),a=0;a<i;++a){var r=t[a],o=r.modelMatrix,s=Object(d.default)(r.batchId,a);n[a]=new S.a(e,o,s)}return n}(this,e.instances),this._batchTable=e.batchTable,this._model=void 0,this._vertexBufferTypedArray=void 0,this._vertexBuffer=void 0,this._batchIdBuffer=void 0,this._instancedUniformsByProgram=void 0,this._drawCommands=[],this._modelCommands=void 0,this._renderStates=void 0,this._disableCullingRenderStates=void 0,this._boundingSphere=function(e){for(var t=e.length,i=new Array(t),a=0;a<t;++a)i[a]=p.default.getTranslation(e._instances[a]._modelMatrix,new r.default);return n.default.fromPoints(i)}(this),this._center=r.default.clone(this._boundingSphere.center),this._rtcTransform=new p.default,this._rtcModelView=new p.default,this._mode=void 0,this.modelMatrix=p.default.clone(p.default.IDENTITY),this._modelMatrix=p.default.clone(this.modelMatrix),this._url=_.default.createIfNeeded(e.url),this._requestType=e.requestType,this._gltf=e.gltf,this._basePath=_.default.createIfNeeded(e.basePath),this._asynchronous=e.asynchronous,this._incrementallyLoadTextures=e.incrementallyLoadTextures,this._upAxis=e.upAxis,this._forwardAxis=e.forwardAxis,this.shadows=Object(d.default)(e.shadows,P.a.ENABLED),this._shadows=this.shadows,this._pickIdLoaded=e.pickIdLoaded,this.debugShowBoundingVolume=Object(d.default)(e.debugShowBoundingVolume,!1),this._debugShowBoundingVolume=!1,this.debugWireframe=Object(d.default)(e.debugWireframe,!1),this._debugWireframe=!1,this._imageBasedLightingFactor=new a.default(1,1),a.default.clone(e.imageBasedLightingFactor,this._imageBasedLightingFactor),this.lightColor=e.lightColor,this.luminanceAtZenith=e.luminanceAtZenith,this.sphericalHarmonicCoefficients=e.sphericalHarmonicCoefficients,this.specularEnvironmentMaps=e.specularEnvironmentMaps,this.backFaceCulling=Object(d.default)(e.backFaceCulling,!0),this._backFaceCulling=this.backFaceCulling}Object.defineProperties(N.prototype,{allowPicking:{get:function(){return this._allowPicking}},length:{get:function(){return this._instances.length}},activeAnimations:{get:function(){return this._model.activeAnimations}},ready:{get:function(){return this._ready}},readyPromise:{get:function(){return this._readyPromise.promise}},imageBasedLightingFactor:{get:function(){return this._imageBasedLightingFactor},set:function(e){o.a.typeOf.object("imageBasedLightingFactor",e),o.a.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.x",e.x,0),o.a.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.x",e.x,1),o.a.typeOf.number.greaterThanOrEquals("imageBasedLightingFactor.y",e.y,0),o.a.typeOf.number.lessThanOrEquals("imageBasedLightingFactor.y",e.y,1),a.default.clone(e,this._imageBasedLightingFactor)}}});var B=new r.default,F=new p.default;function k(e,t,i,n){return function(a,r){var o=a.semantic;if(Object(c.default)(o)&&e.indexOf(o)>-1){if(!(t.indexOf(o)>-1))throw new g.a('Shader program cannot be optimized for instancing. Uniform "'+r+'" in program "'+i+'" uses unsupported semantic "'+o+'"');n[r]=o}}}function z(e,t){if(Object(c.default)(e._instancedUniformsByProgram))return e._instancedUniformsByProgram[t];var i={};e._instancedUniformsByProgram=i;var n=["MODEL","MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELINVERSE","MODELVIEWINVERSE","MODELVIEWPROJECTIONINVERSE","MODELINVERSETRANSPOSE","MODELVIEWINVERSETRANSPOSE"],a=["MODELVIEW","CESIUM_RTC_MODELVIEW","MODELVIEWPROJECTION","MODELVIEWINVERSETRANSPOSE"],r=e._model._sourceTechniques;for(var o in r)if(r.hasOwnProperty(o)){var s=r[o],l=s.program;if(!Object(c.default)(i[l])){var u={};i[l]=u,T.a.techniqueUniform(s,k(n,a,t,u))}}return i[t]}function U(e,t){return function(i,n,a){(i=Object(s.default)(i)).czm_instanced_modifiedModelView=function(e,t){return function(){return p.default.multiply(t.uniformState.view,e._rtcTransform,e._rtcModelView)}}(e,t),i.czm_instanced_nodeTransform=function(e){return function(){return e.computedMatrix}}(a);var r=z(e,n);for(var o in r)r.hasOwnProperty(o)&&delete i[o];return Object(c.default)(e._batchTable)&&(i=e._batchTable.getUniformMapCallback()(i)),i}}function V(e){var t=e._instances,i=e.length,n=e._center,a=e._vertexBufferTypedArray;Object(c.default)(a)||(a=new Float32Array(12*i)),e._dynamic&&(e._vertexBufferTypedArray=a);for(var r=0;r<i;++r){var o=t[r]._modelMatrix,s=p.default.clone(o,F);s[12]-=n.x,s[13]-=n.y,s[14]-=n.z;var l=12*r;a[l+0]=s[0],a[l+1]=s[4],a[l+2]=s[8],a[l+3]=s[12],a[l+4]=s[1],a[l+5]=s[5],a[l+6]=s[9],a[l+7]=s[13],a[l+8]=s[2],a[l+9]=s[6],a[l+10]=s[10],a[l+11]=s[14]}return a}function H(e,t){var i=e._instancingSupported,n=Object(c.default)(e._batchTable),a=e._allowPicking,r={url:e._url,requestType:e._requestType,gltf:e._gltf,basePath:e._basePath,shadows:e._shadows,cacheKey:void 0,asynchronous:e._asynchronous,allowPicking:a,incrementallyLoadTextures:e._incrementallyLoadTextures,upAxis:e._upAxis,forwardAxis:e._forwardAxis,precreatedAttributes:void 0,vertexShaderLoaded:void 0,fragmentShaderLoaded:void 0,uniformMapLoaded:void 0,pickIdLoaded:e._pickIdLoaded,ignoreCommands:!0,opaquePass:e._opaquePass,imageBasedLightingFactor:e.imageBasedLightingFactor,lightColor:e.lightColor,luminanceAtZenith:e.luminanceAtZenith,sphericalHarmonicCoefficients:e.sphericalHarmonicCoefficients,specularEnvironmentMaps:e.specularEnvironmentMaps,showOutline:e.showOutline};if(n||(e._pickIds=function(e,t){for(var i=e._instances,n=i.length,a=new Array(n),r=0;r<n;++r)a[r]=t.createPickId(i[r]);return a}(e,t)),i){!function(e,t){var i,n=e._instances,a=e.length,r=e._dynamic,o=Object(c.default)(e._batchTable);if(o){var s=new Uint16Array(a);for(i=0;i<a;++i)s[i]=n[i]._instanceId;e._batchIdBuffer=y.default.createVertexBuffer({context:t,typedArray:s,usage:b.default.STATIC_DRAW})}if(!o){var u=new Uint8Array(4*a);for(i=0;i<a;++i){var d=e._pickIds[i].color,f=4*i;u[f]=l.default.floatToByte(d.red),u[f+1]=l.default.floatToByte(d.green),u[f+2]=l.default.floatToByte(d.blue),u[f+3]=l.default.floatToByte(d.alpha)}e._pickIdBuffer=y.default.createVertexBuffer({context:t,typedArray:u,usage:b.default.STATIC_DRAW})}var h=V(e);e._vertexBuffer=y.default.createVertexBuffer({context:t,typedArray:h,usage:r?b.default.STREAM_DRAW:b.default.STATIC_DRAW})}(e,t);var o=u.default.getSizeInBytes(u.default.FLOAT),s={czm_modelMatrixRow0:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:u.default.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*o,instanceDivisor:1},czm_modelMatrixRow1:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:u.default.FLOAT,normalize:!1,offsetInBytes:4*o,strideInBytes:12*o,instanceDivisor:1},czm_modelMatrixRow2:{index:0,vertexBuffer:e._vertexBuffer,componentsPerAttribute:4,componentDatatype:u.default.FLOAT,normalize:!1,offsetInBytes:8*o,strideInBytes:12*o,instanceDivisor:1}};n&&(s.a_batchId={index:0,vertexBuffer:e._batchIdBuffer,componentsPerAttribute:1,componentDatatype:u.default.UNSIGNED_SHORT,normalize:!1,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),n||(s.pickColor={index:0,vertexBuffer:e._pickIdBuffer,componentsPerAttribute:4,componentDatatype:u.default.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1}),r.precreatedAttributes=s,r.vertexShaderLoaded=function(e){return function(t,i){var n=z(e,i),a=Object(c.default)(e._batchTable),r=A.default.replaceMain(t,"czm_instancing_main"),o="",s="";for(var l in n)if(n.hasOwnProperty(l)){var u,d=n[l];"MODELVIEW"===d||"CESIUM_RTC_MODELVIEW"===d?u="czm_instanced_modelView":"MODELVIEWPROJECTION"===d?(u="czm_instanced_modelViewProjection",o+="mat4 czm_instanced_modelViewProjection;\n",s+="czm_instanced_modelViewProjection = czm_projection * czm_instanced_modelView;\n"):"MODELVIEWINVERSETRANSPOSE"===d&&(u="czm_instanced_modelViewInverseTranspose",o+="mat3 czm_instanced_modelViewInverseTranspose;\n",s+="czm_instanced_modelViewInverseTranspose = mat3(czm_instanced_modelView);\n");var f=new RegExp("uniform.*"+l+".*");r=r.replace(f,""),f=new RegExp(l+"\\b","g"),r=r.replace(f,u)}var h,p,m;a?(h="attribute float a_batchId;\n",p="",m=""):(h="",p="attribute vec4 pickColor;\nvarying vec4 v_pickColor;\n",m=" v_pickColor = pickColor;\n");var _="uniform mat4 czm_instanced_modifiedModelView;\nuniform mat4 czm_instanced_nodeTransform;\n"+o+"mat4 czm_instanced_modelView;\nattribute vec4 czm_modelMatrixRow0;\nattribute vec4 czm_modelMatrixRow1;\nattribute vec4 czm_modelMatrixRow2;\n"+h+p+r+"void main()\n{\n mat4 czm_instanced_model = mat4(czm_modelMatrixRow0.x, czm_modelMatrixRow1.x, czm_modelMatrixRow2.x, 0.0, czm_modelMatrixRow0.y, czm_modelMatrixRow1.y, czm_modelMatrixRow2.y, 0.0, czm_modelMatrixRow0.z, czm_modelMatrixRow1.z, czm_modelMatrixRow2.z, 0.0, czm_modelMatrixRow0.w, czm_modelMatrixRow1.w, czm_modelMatrixRow2.w, 1.0);\n czm_instanced_modelView = czm_instanced_modifiedModelView * czm_instanced_model * czm_instanced_nodeTransform;\n"+s+" czm_instancing_main();\n"+m+"}\n";if(a){var g=e._model.gltf,v=M.a.getDiffuseAttributeOrUniform(g,i);_=e._batchTable.getVertexShaderCallback(!0,"a_batchId",v)(_)}return _}}(e),r.fragmentShaderLoaded=function(e){return function(t,i){var n=e._batchTable;if(Object(c.default)(n)){var a=e._model.gltf,r=M.a.getDiffuseAttributeOrUniform(a,i);t=n.getFragmentShaderCallback(!0,r,!1)(t)}else t="varying vec4 v_pickColor;\n"+t;return t}}(e),r.uniformMapLoaded=U(e,t),Object(c.default)(e._url)&&(r.cacheKey=e._url.getUrlComponent()+"#instanced")}else r.vertexShaderLoaded=function(e){return function(t,i){if(Object(c.default)(e._batchTable)){var n=e._model.gltf,a=M.a.getDiffuseAttributeOrUniform(n,i);t="uniform float a_batchId\n;"+(t=e._batchTable.getVertexShaderCallback(!0,"a_batchId",a)(t))}return t}}(e),r.fragmentShaderLoaded=function(e){return function(t,i){var n=e._batchTable;if(Object(c.default)(n)){var a=e._model.gltf,r=M.a.getDiffuseAttributeOrUniform(a,i);t=n.getFragmentShaderCallback(!0,r,!1)(t)}else t="uniform vec4 czm_pickColor;\n"+t;return t}}(e),r.uniformMapLoaded=function(e){return function(t){return Object(c.default)(e._batchTable)&&(t=e._batchTable.getUniformMapCallback()(t)),t}}(e);Object(c.default)(e._url)?e._model=C.default.fromGltf(r):e._model=new C.default(r)}function G(e){var t=Object(s.default)(e,!0);return t.cull.enabled=!1,x.default.fromCache(t)}function Y(e){return function(){return e}}function W(e){return function(){return e}}function q(e){for(var t=e._modelCommands,i=t.length,a=e.length,r=e._rtcTransform,o=e._center,s=0;s<i;++s)for(var l=t[s],u=0;u<a;++u){var d=s*a+u,c=e._drawCommands[d],f=p.default.clone(e._instances[u]._modelMatrix,F);f[12]-=o.x,f[13]-=o.y,f[14]-=o.z,f=p.default.multiply(r,f,F);var h=l.modelMatrix,m=c.modelMatrix;p.default.multiply(f,h,m);var _=l.boundingVolume,g=c.boundingVolume;n.default.transform(_,f,g)}}function X(e){for(var t=e._nodeCommands,i=t.length,n=[],a=0;a<i;++a){var r=t[a];r.show&&n.push(r.command)}return n}function K(e,t){e._drawCommands=[];var i=X(e._model);t?function(e,t){for(var i=t.length,n=e.length,a=e._boundingSphere,r=e._cull,o=0;o<i;++o){var s=w.default.shallowClone(t[o]);s.instanceCount=n,s.boundingVolume=a,s.cull=r,Object(c.default)(e._batchTable)?s.pickId=e._batchTable.getPickId():s.pickId="v_pickColor",e._drawCommands.push(s)}}(e,i):(!function(e,t){for(var i=e._instances,a=t.length,r=e.length,o=e._batchTable,l=Object(c.default)(o),u=e._cull,d=0;d<a;++d)for(var f=0;f<r;++f){var h=w.default.shallowClone(t[d]);if(h.modelMatrix=new p.default,h.boundingVolume=new n.default,h.cull=u,h.uniformMap=Object(s.default)(h.uniformMap),l)h.uniformMap.a_batchId=Y(i[f]._instanceId);else{var m=e._pickIds[f];h.uniformMap.czm_pickColor=W(m.color)}e._drawCommands.push(h)}}(e,i),q(e))}N.prototype.expandBoundingSphere=function(e){var t=p.default.getTranslation(e,B);n.default.expand(this._boundingSphere,t,this._boundingSphere)},N.prototype.update=function(e){if(e.mode!==D.default.MORPHING&&this.show&&0!==this.length){var t=e.context;if(this._state===I){this._state=L,this._instancingSupported=t.instancedArrays,H(this,t);var i=this;this._model.readyPromise.otherwise((function(e){i._state=R,i._readyPromise.reject(e)}))}var n=this._instancingSupported,a=this._model;if(a.imageBasedLightingFactor=this.imageBasedLightingFactor,a.lightColor=this.lightColor,a.luminanceAtZenith=this.luminanceAtZenith,a.sphericalHarmonicCoefficients=this.sphericalHarmonicCoefficients,a.specularEnvironmentMaps=this.specularEnvironmentMaps,a.update(e),a.ready&&this._state===L){this._state=j,this._ready=!0;var o=a.boundingSphere.radius+r.default.magnitude(a.boundingSphere.center);return this._boundingSphere.radius+=o,this._modelCommands=X(a),K(this,n),void this._readyPromise.resolve(this)}if(this._state===j){var s,l,u=e.mode!==this._mode,d=this.modelMatrix,f=!p.default.equals(this._modelMatrix,d);if(u||f){this._mode=e.mode,p.default.clone(d,this._modelMatrix);var h=p.default.multiplyByTranslation(this._modelMatrix,this._center,this._rtcTransform);this._mode!==D.default.SCENE3D&&(h=v.default.basisTo2D(e.mapProjection,h,h)),p.default.getTranslation(h,this._boundingSphere.center)}n&&this._dirty&&(this._dynamic=!0,this._dirty=!1,l=V(s=this),s._vertexBuffer.copyFromArrayView(l));var _=function(e){for(var t=e._nodeCommands,i=t.length,n=!1,a=0;a<i;a++){var r=t[a];r.command.dirty&&(r.command.dirty=!1,n=!0)}return n}(a);_&&K(this,n),!n&&(a.dirty||this._dirty||u||f)&&q(this),function(e,t){if(e.shadows!==e._shadows||t){e._shadows=e.shadows;for(var i=P.a.castShadows(e.shadows),n=P.a.receiveShadows(e.shadows),a=e._drawCommands,r=a.length,o=0;o<r;++o){var s=a[o];s.castShadows=i,s.receiveShadows=n}}}(this,_),function(e,t){if(e._debugWireframe!==e.debugWireframe||t){e._debugWireframe=e.debugWireframe;for(var i=e.debugWireframe?m.default.LINES:m.default.TRIANGLES,n=e._drawCommands,a=n.length,r=0;r<a;++r)n[r].primitiveType=i}}(this,_),function(e,t){if(e._backFaceCulling!==e.backFaceCulling||t){e._backFaceCulling=e.backFaceCulling;var i,n=e._drawCommands,a=n.length;if(!Object(c.default)(e._disableCullingRenderStates))for(e._disableCullingRenderStates=new Array(a),e._renderStates=new Array(a),i=0;i<a;++i){var r=n[i].renderState,o=G(r);e._disableCullingRenderStates[i]=o,e._renderStates[i]=r}for(i=0;i<a;++i)n[i].renderState=e._backFaceCulling?e._renderStates[i]:e._disableCullingRenderStates[i]}}(this,_),function(e,t){if(e.debugShowBoundingVolume!==e._debugShowBoundingVolume||t){e._debugShowBoundingVolume=e.debugShowBoundingVolume;for(var i=e._drawCommands,n=i.length,a=0;a<n;++a)i[a].debugShowBoundingVolume=e.debugShowBoundingVolume}}(this,_);var g=e.passes;if(g.render||g.pick)for(var y=e.commandList,b=this._drawCommands,w=b.length,O=0;O<w;++O)y.push(b[O])}}},N.prototype.isDestroyed=function(){return!1},N.prototype.destroy=function(){this._model=this._model&&this._model.destroy();var e=this._pickIds;if(Object(c.default)(e))for(var t=e.length,i=0;i<t;++i)e[i].destroy();return Object(f.default)(this)},t.a=N},function(e,t,i){"use strict";var n=i(6);function a(e,t,i){this.primitive=e,this._modelMatrix=n.default.clone(t),this._instanceId=i}Object.defineProperties(a.prototype,{instanceId:{get:function(){return this._instanceId}},model:{get:function(){return this.primitive._model}},modelMatrix:{get:function(){return n.default.clone(this._modelMatrix)},set:function(e){n.default.clone(e,this._modelMatrix),this.primitive.expandBoundingSphere(this._modelMatrix),this.primitive._dirty=!0}}}),t.a=a},function(e,t,i){"use strict";var n=i(7),a=i(60),r=i(2),o=i(0),s=i(19),l=i(3),u=i(5),d=i(26),c=i(237),f=i(173),h=i(183),p=i(464),m=i(336),_=i(13);function g(e,t,i,n,a){var r;this._tileset=e,this._tile=t,this._resource=i,this._pickId=void 0,this._batchTable=void 0,this._styleDirty=!1,this._features=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,this._pointCloud=new p.a({arrayBuffer:n,byteOffset:a,cull:!1,opaquePass:d.default.CESIUM_3D_TILE,vertexShaderLoaded:(r=this,function(e){return Object(o.default)(r._batchTable)?r._batchTable.getVertexShaderCallback(!1,"a_batchId",void 0)(e):e}),fragmentShaderLoaded:v(this),uniformMapLoaded:y(this),batchTableLoaded:b(this),pickIdLoaded:w(this)})}function v(e){return function(t){return Object(o.default)(e._batchTable)?e._batchTable.getFragmentShaderCallback(!1,void 0,!1)(t):"uniform vec4 czm_pickColor;\n"+t}}function y(e){return function(t){return Object(o.default)(e._batchTable)?e._batchTable.getUniformMapCallback()(t):Object(a.default)(t,{czm_pickColor:function(){return e._pickId.color}})}}function b(e){return function(t,i,n){e._batchTable=new c.a(e,t,i,n)}}function w(e){return function(){return Object(o.default)(e._batchTable)?e._batchTable.getPickId():"czm_pickColor"}}Object.defineProperties(g.prototype,{featuresLength:{get:function(){return Object(o.default)(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return this._pointCloud.pointsLength}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return this._pointCloud.geometryByteLength}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return Object(o.default)(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._pointCloud.readyPromise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}}),g.prototype.hasProperty=function(e,t){return!!Object(o.default)(this._batchTable)&&this._batchTable.hasProperty(e,t)},g.prototype.getFeature=function(e){if(Object(o.default)(this._batchTable)){var t=this.featuresLength;if(!Object(o.default)(e)||e<0||e>=t)throw new l.default("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return function(e){var t=e.featuresLength;if(!Object(o.default)(e._features)&&t>0){for(var i=new Array(t),n=0;n<t;++n)i[n]=new f.a(e,n);e._features=i}}(this),this._features[e]}},g.prototype.applyDebugSettings=function(e,t){this._pointCloud.color=e?t:n.default.WHITE},g.prototype.applyStyle=function(e){Object(o.default)(this._batchTable)?this._batchTable.applyStyle(e):this._styleDirty=!0};var O=new m.a;g.prototype.update=function(e,t){var i,n=this._pointCloud,a=Object(r.default)(e.pointCloudShading,O),s=this._tile,l=this._batchTable,d=t.mode,c=e.clippingPlanes;Object(o.default)(this._pickId)||Object(o.default)(l)||(this._pickId=t.context.createPickId({primitive:e,content:this})),Object(o.default)(l)&&l.update(e,t),i=Object(o.default)(s._contentBoundingVolume)?d===_.default.SCENE3D?s._contentBoundingVolume.boundingSphere:s._contentBoundingVolume2D.boundingSphere:d===_.default.SCENE3D?s._boundingVolume.boundingSphere:s._boundingVolume2D.boundingSphere;var f=this._styleDirty;this._styleDirty=!1,n.clippingPlanesOriginMatrix=e.clippingPlanesOriginMatrix,n.style=Object(o.default)(l)?void 0:e.style,n.styleDirty=f,n.modelMatrix=s.computedTransform,n.time=e.timeSinceLoad,n.shadows=e.shadows,n.boundingSphere=i,n.clippingPlanes=c,n.isClipped=Object(o.default)(c)&&c.enabled&&s._isClipped,n.clippingPlanesDirty=s.clippingPlanesDirty,n.attenuation=a.attenuation,n.backFaceCulling=a.backFaceCulling,n.normalShading=a.normalShading,n.geometricError=function(e){var t=e._tileset.pointCloudShading,i=e._tile.contentBoundingVolume.boundingSphere.volume(),n=u.default.cbrt(i/e.pointsLength),a=e._tile.geometricError;return 0===a&&(a=Object(o.default)(t)&&Object(o.default)(t.baseResolution)?t.baseResolution:n),a}(this),n.geometricErrorScale=a.geometricErrorScale,Object(o.default)(a)&&Object(o.default)(a.maximumAttenuation)?n.maximumAttenuation=a.maximumAttenuation:s.refine===h.a.ADD?n.maximumAttenuation=5:n.maximumAttenuation=e.maximumScreenSpaceError,n.update(t)},g.prototype.isDestroyed=function(){return!1},g.prototype.destroy=function(){return this._pickId=this._pickId&&this._pickId.destroy(),this._pointCloud=this._pointCloud&&this._pointCloud.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(s.default)(this)},t.a=g},function(e,t,i){"use strict";t.a="#extension GL_EXT_frag_depth : enable\n\nuniform sampler2D u_pointCloud_colorGBuffer;\nuniform sampler2D u_pointCloud_depthGBuffer;\nuniform vec2 u_distanceAndEdlStrength;\nvarying vec2 v_textureCoordinates;\n\nvec2 neighborContribution(float log2Depth, vec2 offset)\n{\n float dist = u_distanceAndEdlStrength.x;\n vec2 texCoordOrig = v_textureCoordinates + offset * dist;\n vec2 texCoord0 = v_textureCoordinates + offset * floor(dist);\n vec2 texCoord1 = v_textureCoordinates + offset * ceil(dist);\n\n float depthOrLogDepth0 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord0));\n float depthOrLogDepth1 = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, texCoord1));\n\n // ignore depth values that are the clear depth\n if (depthOrLogDepth0 == 0.0 || depthOrLogDepth1 == 0.0) {\n return vec2(0.0);\n }\n\n // interpolate the two adjacent depth values\n float depthMix = mix(depthOrLogDepth0, depthOrLogDepth1, fract(dist));\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(texCoordOrig, depthMix);\n return vec2(max(0.0, log2Depth - log2(-eyeCoordinate.z / eyeCoordinate.w)), 1.0);\n}\n\nvoid main()\n{\n float depthOrLogDepth = czm_unpackDepth(texture2D(u_pointCloud_depthGBuffer, v_textureCoordinates));\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depthOrLogDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float log2Depth = log2(-eyeCoordinate.z);\n\n if (depthOrLogDepth == 0.0) // 0.0 is the clear value for the gbuffer\n {\n discard;\n }\n\n vec4 color = texture2D(u_pointCloud_colorGBuffer, v_textureCoordinates);\n\n // sample from neighbors left, right, down, up\n vec2 texelSize = 1.0 / czm_viewport.zw;\n\n vec2 responseAndCount = vec2(0.0);\n\n responseAndCount += neighborContribution(log2Depth, vec2(-texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(+texelSize.x, 0.0));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, -texelSize.y));\n responseAndCount += neighborContribution(log2Depth, vec2(0.0, +texelSize.y));\n\n float response = responseAndCount.x / responseAndCount.y;\n float strength = u_distanceAndEdlStrength.y;\n float shade = exp(-response * 300.0 * strength);\n color.rgb *= shade;\n gl_FragColor = vec4(color);\n\n // Input and output depth are the same.\n gl_FragDepthEXT = depthOrLogDepth;\n}\n"},function(e,t,i){"use strict";var n=i(19),a=i(18);function r(e,t,i,n){this._tileset=e,this._tile=t,this._resource=i,this._readyPromise=a.a.defer(),this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t){e._tileset.loadTileset(e._resource,t,e._tile),e._readyPromise.resolve(e)}(this,n)}Object.defineProperties(r.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}}),r.prototype.hasProperty=function(e,t){return!1},r.prototype.getFeature=function(e){},r.prototype.applyDebugSettings=function(e,t){},r.prototype.applyStyle=function(e){},r.prototype.update=function(e,t){},r.prototype.isDestroyed=function(){return!1},r.prototype.destroy=function(){return Object(n.default)(this)},t.a=r},function(e,t,i){"use strict";var n=i(1),a=i(2),r=i(0),o=i(19),s=i(3),l=i(15),u=i(159),d=i(11),c=i(5),f=i(6),h=i(21),p=i(23),m=i(18),_=i(237),g=i(266),v=i(895),y=i(896),b=i(466),w=i(898),O=i(901);function x(e,t,i,o,s){this._tileset=e,this._tile=t,this._resource=i,this._polygons=void 0,this._polylines=void 0,this._points=void 0,this._contentReadyPromise=void 0,this._readyPromise=m.a.defer(),this._batchTable=void 0,this._features=void 0,this.featurePropertiesDirty=!1,this._groupMetadata=void 0,function(e,t,i){i=Object(a.default)(i,0);var o=new Uint8Array(t),s=new DataView(t);i+=A;var m=s.getUint32(i,!0);if(1!==m)throw new p.a("Only Vector tile version 1 is supported. Version "+m+" is not.");i+=A;var b=s.getUint32(i,!0);if(i+=A,0===b)return void e._readyPromise.resolve(e);var w=s.getUint32(i,!0);if(i+=A,0===w)throw new p.a("Feature table must have a byte length greater than zero");var x=s.getUint32(i,!0);i+=A;var C=s.getUint32(i,!0);i+=A;var S=s.getUint32(i,!0);i+=A;var M=s.getUint32(i,!0);i+=A;var D=s.getUint32(i,!0);i+=A;var P=s.getUint32(i,!0);i+=A;var I=s.getUint32(i,!0);i+=A;var L=Object(u.a)(o,i,w);i+=w;var j,R,N=new Uint8Array(t,i,x);i+=x,C>0&&(j=Object(u.a)(o,i,C),i+=C,S>0&&(R=new Uint8Array(t,i,S),R=new Uint8Array(R),i+=S));var B=Object(a.default)(L.POLYGONS_LENGTH,0),F=Object(a.default)(L.POLYLINES_LENGTH,0),k=Object(a.default)(L.POINTS_LENGTH,0),z=B+F+k,U=new _.a(e,z,j,R,function(e){return function(t,i){Object(r.default)(e._polygons)&&e._polygons.updateCommands(t,i)}}(e));if(e._batchTable=U,0===z)return;var V=new g.a(L,N),H=V.getGlobalProperty("REGION");if(!Object(r.default)(H))throw new p.a("Feature table global property: REGION must be defined");var G=h.default.unpack(H),Y=H[4],W=H[5],q=e._tile.computedTransform,X=V.getGlobalProperty("RTC_CENTER",d.default.FLOAT,3);Object(r.default)(X)?(X=n.default.unpack(X),f.default.multiplyByPoint(q,X,X)):((X=h.default.center(G)).height=c.default.lerp(Y,W,.5),X=l.default.WGS84.cartographicToCartesian(X));var K=function(e,t){var i,n,o,s,l=Object(a.default)(e.POLYGONS_LENGTH,0),u=Object(a.default)(e.POLYLINES_LENGTH,0),d=Object(a.default)(e.POINTS_LENGTH,0);if(l>0&&Object(r.default)(e.POLYGON_BATCH_IDS)){var c=t.byteOffset+e.POLYGON_BATCH_IDS.byteOffset;i=new Uint16Array(t.buffer,c,l)}if(u>0&&Object(r.default)(e.POLYLINE_BATCH_IDS)){var f=t.byteOffset+e.POLYLINE_BATCH_IDS.byteOffset;n=new Uint16Array(t.buffer,f,u)}if(d>0&&Object(r.default)(e.POINT_BATCH_IDS)){var h=t.byteOffset+e.POINT_BATCH_IDS.byteOffset;o=new Uint16Array(t.buffer,h,d)}var m=Object(r.default)(i)||Object(r.default)(n)||Object(r.default)(o),_=l>0&&!Object(r.default)(i)||u>0&&!Object(r.default)(n)||d>0&&!Object(r.default)(o);if(m&&_)throw new p.a("If one group of batch ids is defined, then all batch ids must be defined.");if(!Object(r.default)(i)&&!Object(r.default)(n)&&!Object(r.default)(o)){var g=0;if(!Object(r.default)(i)&&l>0)for(i=new Uint16Array(l),s=0;s<l;++s)i[s]=g++;if(!Object(r.default)(n)&&u>0)for(n=new Uint16Array(u),s=0;s<u;++s)n[s]=g++;if(!Object(r.default)(o)&&d>0)for(o=new Uint16Array(d),s=0;s<d;++s)o[s]=g++}return{polygons:i,polylines:n,points:o}}(L,N);if(i+=(4-i%4)%4,B>0){V.featuresLength=B;var J=Object(a.default)(V.getPropertyArray("POLYGON_COUNTS",d.default.UNSIGNED_INT,1),V.getPropertyArray("POLYGON_COUNT",d.default.UNSIGNED_INT,1));if(!Object(r.default)(J))throw new p.a("Feature table property: POLYGON_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");var Z=Object(a.default)(V.getPropertyArray("POLYGON_INDEX_COUNTS",d.default.UNSIGNED_INT,1),V.getPropertyArray("POLYGON_INDEX_COUNT",d.default.UNSIGNED_INT,1));if(!Object(r.default)(Z))throw new p.a("Feature table property: POLYGON_INDEX_COUNTS must be defined when POLYGONS_LENGTH is greater than 0");var Q=J.reduce((function(e,t){return e+2*t}),0),$=Z.reduce((function(e,t){return e+t}),0),ee=new Uint32Array(t,i,$);i+=M;var te,ie,ne=new Uint16Array(t,i,Q);i+=D,Object(r.default)(L.POLYGON_MINIMUM_HEIGHTS)&&Object(r.default)(L.POLYGON_MAXIMUM_HEIGHTS)&&(te=V.getPropertyArray("POLYGON_MINIMUM_HEIGHTS",d.default.FLOAT,1),ie=V.getPropertyArray("POLYGON_MAXIMUM_HEIGHTS",d.default.FLOAT,1)),e._polygons=new y.a({positions:ne,counts:J,indexCounts:Z,indices:ee,minimumHeight:Y,maximumHeight:W,polygonMinimumHeights:te,polygonMaximumHeights:ie,center:X,rectangle:G,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:U,batchIds:K.polygons,modelMatrix:q})}if(F>0){V.featuresLength=F;var ae=Object(a.default)(V.getPropertyArray("POLYLINE_COUNTS",d.default.UNSIGNED_INT,1),V.getPropertyArray("POLYLINE_COUNT",d.default.UNSIGNED_INT,1));if(!Object(r.default)(ae))throw new p.a("Feature table property: POLYLINE_COUNTS must be defined when POLYLINES_LENGTH is greater than 0");var re=V.getPropertyArray("POLYLINE_WIDTHS",d.default.UNSIGNED_SHORT,1);if(!Object(r.default)(re)){re=new Uint16Array(F);for(var oe=0;oe<F;++oe)re[oe]=2}var se=ae.reduce((function(e,t){return e+3*t}),0),le=new Uint16Array(t,i,se);i+=P;var ue=e._tileset,de=ue.examineVectorLinesFunction;if(Object(r.default)(de))!function(e,t,i,n,a,r){for(var o=t.length,s=0,l=0;l<o;l++){var u=3*t[l],d=e.slice(s,s+u);s+=u,r(d,i[l],a,n)}}(Object(O.a)(new Uint16Array(le),G,Y,W,l.default.WGS84),ae,K.polylines,U,e.url,de);var ce=T;Object(r.default)(ue.classificationType)&&(ce=E),e._polylines=ce({positions:le,widths:re,counts:ae,batchIds:K.polylines,minimumHeight:Y,maximumHeight:W,center:X,rectangle:G,boundingVolume:e.tile.boundingVolume.boundingVolume,batchTable:U,classificationType:ue.classificationType,keepDecodedPositions:ue.vectorKeepDecodedPositions})}if(k>0){var fe=new Uint16Array(t,i,3*k);i+=I,e._points=new v.a({positions:fe,batchIds:K.points,minimumHeight:Y,maximumHeight:W,rectangle:G,batchTable:U})}}(this,o,s)}Object.defineProperties(x.prototype,{featuresLength:{get:function(){return Object(r.default)(this._batchTable)?this._batchTable.featuresLength:0}},pointsLength:{get:function(){return Object(r.default)(this._points)?this._points.pointsLength:0}},trianglesLength:{get:function(){var e=0;return Object(r.default)(this._polygons)&&(e+=this._polygons.trianglesLength),Object(r.default)(this._polylines)&&(e+=this._polylines.trianglesLength),e}},geometryByteLength:{get:function(){var e=0;return Object(r.default)(this._polygons)&&(e+=this._polygons.geometryByteLength),Object(r.default)(this._polylines)&&(e+=this._polylines.geometryByteLength),e}},texturesByteLength:{get:function(){return Object(r.default)(this._points)?this._points.texturesByteLength:0}},batchTableByteLength:{get:function(){return Object(r.default)(this._batchTable)?this._batchTable.memorySizeInBytes:0}},innerContents:{get:function(){}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){return this._resource.getUrlComponent(!0)}},batchTable:{get:function(){return this._batchTable}},groupMetadata:{get:function(){return this._groupMetadata},set:function(e){this._groupMetadata=e}}});var A=Uint32Array.BYTES_PER_ELEMENT;function T(e){return new b.a(e)}function E(e){return new w.a(e)}function C(e){var t=e.featuresLength;if(!Object(r.default)(e._features)&&t>0){var i=new Array(t);Object(r.default)(e._polygons)&&e._polygons.createFeatures(e,i),Object(r.default)(e._polylines)&&e._polylines.createFeatures(e,i),Object(r.default)(e._points)&&e._points.createFeatures(e,i),e._features=i}}x.prototype.hasProperty=function(e,t){return this._batchTable.hasProperty(e,t)},x.prototype.getFeature=function(e){var t=this.featuresLength;if(!Object(r.default)(e)||e<0||e>=t)throw new s.default("batchId is required and between zero and featuresLength - 1 ("+(t-1)+").");return C(this),this._features[e]},x.prototype.applyDebugSettings=function(e,t){Object(r.default)(this._polygons)&&this._polygons.applyDebugSettings(e,t),Object(r.default)(this._polylines)&&this._polylines.applyDebugSettings(e,t),Object(r.default)(this._points)&&this._points.applyDebugSettings(e,t)},x.prototype.applyStyle=function(e){C(this),Object(r.default)(this._polygons)&&this._polygons.applyStyle(e,this._features),Object(r.default)(this._polylines)&&this._polylines.applyStyle(e,this._features),Object(r.default)(this._points)&&this._points.applyStyle(e,this._features)},x.prototype.update=function(e,t){var i=!0;if(Object(r.default)(this._polygons)&&(this._polygons.classificationType=this._tileset.classificationType,this._polygons.debugWireframe=this._tileset.debugWireframe,this._polygons.update(t),i=i&&this._polygons._ready),Object(r.default)(this._polylines)&&(this._polylines.update(t),i=i&&this._polylines._ready),Object(r.default)(this._points)&&(this._points.update(t),i=i&&this._points._ready),Object(r.default)(this._batchTable)&&i&&this._batchTable.update(e,t),!Object(r.default)(this._contentReadyPromise)){var n=Object(r.default)(this._points)?this._points.readyPromise:void 0,a=Object(r.default)(this._polygons)?this._polygons.readyPromise:void 0,o=Object(r.default)(this._polylines)?this._polylines.readyPromise:void 0,s=this;this._contentReadyPromise=m.a.all([n,a,o]).then((function(){s._readyPromise.resolve(s)})).otherwise((function(e){s._readyPromise.reject(e)}))}},x.prototype.getPolylinePositions=function(e){var t=this._polylines;if(Object(r.default)(t))return t.getPositions(e)},x.prototype.isDestroyed=function(){return!1},x.prototype.destroy=function(){return this._polygons=this._polygons&&this._polygons.destroy(),this._polylines=this._polylines&&this._polylines.destroy(),this._points=this._points&&this._points.destroy(),this._batchTable=this._batchTable&&this._batchTable.destroy(),Object(o.default)(this)},t.a=x},function(e,t,i){"use strict";var n=i(113),a=i(8),r=i(1),o=i(7),s=i(0),l=i(19),u=i(49),d=i(15),c=i(65),f=i(21),h=i(126),p=i(18),m=i(251),_=i(387),g=i(129),v=i(235),y=i(174),b=i(330),w=i(89);function O(e){this._positions=e.positions,this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._rectangle=e.rectangle,this._minHeight=e.minimumHeight,this._maxHeight=e.maximumHeight,this._billboardCollection=void 0,this._labelCollection=void 0,this._polylineCollection=void 0,this._verticesPromise=void 0,this._packedBuffer=void 0,this._ready=!1,this._readyPromise=p.a.defer(),this._resolvedPromise=!1}Object.defineProperties(O.prototype,{pointsLength:{get:function(){return this._billboardCollection.length}},texturesByteLength:{get:function(){return this._billboardCollection.textureAtlas.texture.sizeInBytes+this._labelCollection._textureAtlas.texture.sizeInBytes}},readyPromise:{get:function(){return this._readyPromise.promise}}});var x=new h.a("createVectorTilePoints",5),A=new r.default;function T(e,t){if(!Object(s.default)(e._billboardCollection)){var i;if(!Object(s.default)(e._verticesPromise)){i=e._positions;var a=e._packedBuffer;Object(s.default)(a)||(i=e._positions=Object(n.a)(i),e._batchIds=Object(n.a)(e._batchIds),a=e._packedBuffer=function(e,t){var i=e._rectangle,n=e._minHeight,a=e._maxHeight,r=2+f.default.packedLength+d.default.packedLength,o=new Float64Array(r),s=0;return o[s++]=n,o[s++]=a,f.default.pack(i,o,s),s+=f.default.packedLength,d.default.pack(t,o,s),o}(e,t));var o=[i.buffer,a.buffer],l={positions:i.buffer,packedBuffer:a.buffer},u=e._verticesPromise=x.scheduleTask(l,o);if(!Object(s.default)(u))return;u.then((function(t){e._positions=new Float64Array(t.positions),e._ready=!0}))}if(e._ready&&!Object(s.default)(e._billboardCollection)){i=e._positions;var c=e._batchTable,h=e._batchIds,p=e._billboardCollection=new m.default({batchTable:c}),_=e._labelCollection=new v.default({batchTable:c}),g=e._polylineCollection=new b.default;g._useHighlightColor=!0;for(var y=i.length/3,w=0;w<y;++w){var O=h[w],T=r.default.unpack(i,3*w,A),E=p.add();E.position=T,E._batchIndex=O;var C=_.add();C.text=" ",C.position=T,C._batchIndex=O,g.add().positions=[r.default.clone(T),r.default.clone(T)]}e._positions=void 0,e._packedBuffer=void 0}}}O.prototype.createFeatures=function(e,t){for(var i=this._billboardCollection,n=this._labelCollection,a=this._polylineCollection,r=this._batchIds,o=r.length,s=0;s<o;++s){var l=r[s],u=i.get(s),d=n.get(s),c=a.get(s);t[l]=new _.a(e,l,u,d,c)}},O.prototype.applyDebugSettings=function(e,t){e?(o.default.clone(t,this._billboardCollection._highlightColor),o.default.clone(t,this._labelCollection._highlightColor),o.default.clone(t,this._polylineCollection._highlightColor)):(o.default.clone(o.default.WHITE,this._billboardCollection._highlightColor),o.default.clone(o.default.WHITE,this._labelCollection._highlightColor),o.default.clone(o.default.WHITE,this._polylineCollection._highlightColor))};var E=new o.default,C=new o.default,S=new o.default,M=new o.default,D=new o.default,P=new o.default,I=new c.a,L=new c.a,j=new u.default;O.prototype.applyStyle=function(e,t){if(Object(s.default)(e))for(var i=this._batchIds,n=i.length,r=0;r<n;++r){var l=t[i[r]];if(Object(s.default)(e.show)&&(l.show=e.show.evaluate(l)),Object(s.default)(e.pointSize)&&(l.pointSize=e.pointSize.evaluate(l)),Object(s.default)(e.color)&&(l.color=e.color.evaluateColor(l,E)),Object(s.default)(e.pointOutlineColor)&&(l.pointOutlineColor=e.pointOutlineColor.evaluateColor(l,C)),Object(s.default)(e.pointOutlineWidth)&&(l.pointOutlineWidth=e.pointOutlineWidth.evaluate(l)),Object(s.default)(e.labelColor)&&(l.labelColor=e.labelColor.evaluateColor(l,S)),Object(s.default)(e.labelOutlineColor)&&(l.labelOutlineColor=e.labelOutlineColor.evaluateColor(l,M)),Object(s.default)(e.labelOutlineWidth)&&(l.labelOutlineWidth=e.labelOutlineWidth.evaluate(l)),Object(s.default)(e.font)&&(l.font=e.font.evaluate(l)),Object(s.default)(e.labelStyle)&&(l.labelStyle=e.labelStyle.evaluate(l)),Object(s.default)(e.labelText)?l.labelText=e.labelText.evaluate(l):l.labelText=void 0,Object(s.default)(e.backgroundColor)&&(l.backgroundColor=e.backgroundColor.evaluateColor(l,D)),Object(s.default)(e.backgroundPadding)&&(l.backgroundPadding=e.backgroundPadding.evaluate(l)),Object(s.default)(e.backgroundEnabled)&&(l.backgroundEnabled=e.backgroundEnabled.evaluate(l)),Object(s.default)(e.scaleByDistance)){var u=e.scaleByDistance.evaluate(l);I.near=u.x,I.nearValue=u.y,I.far=u.z,I.farValue=u.w,l.scaleByDistance=I}else l.scaleByDistance=void 0;if(Object(s.default)(e.translucencyByDistance)){var d=e.translucencyByDistance.evaluate(l);L.near=d.x,L.nearValue=d.y,L.far=d.z,L.farValue=d.w,l.translucencyByDistance=L}else l.translucencyByDistance=void 0;if(Object(s.default)(e.distanceDisplayCondition)){var c=e.distanceDisplayCondition.evaluate(l);j.near=c.x,j.far=c.y,l.distanceDisplayCondition=j}else l.distanceDisplayCondition=void 0;Object(s.default)(e.heightOffset)&&(l.heightOffset=e.heightOffset.evaluate(l)),Object(s.default)(e.anchorLineEnabled)&&(l.anchorLineEnabled=e.anchorLineEnabled.evaluate(l)),Object(s.default)(e.anchorLineColor)&&(l.anchorLineColor=e.anchorLineColor.evaluateColor(l,P)),Object(s.default)(e.image)?l.image=e.image.evaluate(l):l.image=void 0,Object(s.default)(e.disableDepthTestDistance)&&(l.disableDepthTestDistance=e.disableDepthTestDistance.evaluate(l)),Object(s.default)(e.horizontalOrigin)&&(l.horizontalOrigin=e.horizontalOrigin.evaluate(l)),Object(s.default)(e.verticalOrigin)&&(l.verticalOrigin=e.verticalOrigin.evaluate(l)),Object(s.default)(e.labelHorizontalOrigin)&&(l.labelHorizontalOrigin=e.labelHorizontalOrigin.evaluate(l)),Object(s.default)(e.labelVerticalOrigin)&&(l.labelVerticalOrigin=e.labelVerticalOrigin.evaluate(l))}else!function(e,t){for(var i=e._batchIds,n=i.length,r=0;r<n;++r){var s=t[i[r]];s.show=!0,s.pointSize=_.a.defaultPointSize,s.color=_.a.defaultColor,s.pointOutlineColor=_.a.defaultPointOutlineColor,s.pointOutlineWidth=_.a.defaultPointOutlineWidth,s.labelColor=o.default.WHITE,s.labelOutlineColor=o.default.WHITE,s.labelOutlineWidth=1,s.font="30px sans-serif",s.labelStyle=y.a.FILL,s.labelText=void 0,s.backgroundColor=new o.default(.165,.165,.165,.8),s.backgroundPadding=new a.default(7,5),s.backgroundEnabled=!1,s.scaleByDistance=void 0,s.translucencyByDistance=void 0,s.distanceDisplayCondition=void 0,s.heightOffset=0,s.anchorLineEnabled=!1,s.anchorLineColor=o.default.WHITE,s.image=void 0,s.disableDepthTestDistance=0,s.horizontalOrigin=g.a.CENTER,s.verticalOrigin=w.default.CENTER,s.labelHorizontalOrigin=g.a.RIGHT,s.labelVerticalOrigin=w.default.BASELINE}}(this,t)},O.prototype.update=function(e){T(this,e.mapProjection.ellipsoid),this._ready&&(this._polylineCollection.update(e),this._billboardCollection.update(e),this._labelCollection.update(e),this._resolvedPromise||(this._readyPromise.resolve(),this._resolvedPromise=!0))},O.prototype.isDestroyed=function(){return!1},O.prototype.destroy=function(){return this._billboardCollection=this._billboardCollection&&this._billboardCollection.destroy(),this._labelCollection=this._labelCollection&&this._labelCollection.destroy(),this._polylineCollection=this._polylineCollection&&this._polylineCollection.destroy(),Object(l.default)(this)},t.a=O},function(e,t,i){"use strict";var n=i(113),a=i(1),r=i(7),o=i(2),s=i(0),l=i(19),u=i(15),d=i(38),c=i(123),f=i(21),h=i(126),p=i(18),m=i(97),_=i(270),g=i(364);function v(e){this._batchTable=e.batchTable,this._batchIds=e.batchIds,this._positions=e.positions,this._counts=e.counts,this._indices=e.indices,this._indexCounts=e.indexCounts,this._indexOffsets=void 0,this._batchTableColors=void 0,this._packedBuffer=void 0,this._batchedPositions=void 0,this._transferrableBatchIds=void 0,this._vertexBatchIds=void 0,this._ellipsoid=Object(o.default)(e.ellipsoid,u.default.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._polygonMinimumHeights=e.polygonMinimumHeights,this._polygonMaximumHeights=e.polygonMaximumHeights,this._center=Object(o.default)(e.center,a.default.ZERO),this._rectangle=e.rectangle,this._center=void 0,this._boundingVolume=e.boundingVolume,this._boundingVolumes=void 0,this._batchedIndices=void 0,this._ready=!1,this._readyPromise=p.a.defer(),this._verticesPromise=void 0,this._primitive=void 0,this.debugWireframe=!1,this.forceRebatch=!1,this.classificationType=m.default.BOTH}Object.defineProperties(v.prototype,{trianglesLength:{get:function(){return Object(s.default)(this._primitive)?this._primitive.trianglesLength:0}},geometryByteLength:{get:function(){return Object(s.default)(this._primitive)?this._primitive.geometryByteLength:0}},readyPromise:{get:function(){return this._readyPromise.promise}}});var y=new h.a("createVectorTilePolygons",5),b=new r.default;function w(e){if(!Object(s.default)(e._primitive)){if(!Object(s.default)(e._verticesPromise)){var t=e._positions,i=e._counts,o=e._indexCounts,l=e._indices,h=e._transferrableBatchIds,m=e._batchTableColors,v=e._packedBuffer;if(!Object(s.default)(m)){t=e._positions=Object(n.a)(e._positions),i=e._counts=Object(n.a)(e._counts),o=e._indexCounts=Object(n.a)(e._indexCounts),l=e._indices=Object(n.a)(e._indices),e._center=e._ellipsoid.cartographicToCartesian(f.default.center(e._rectangle)),h=e._transferrableBatchIds=new Uint32Array(e._batchIds),m=e._batchTableColors=new Uint32Array(h.length);for(var w=e._batchTable,O=m.length,x=0;x<O;++x){var A=w.getColor(x,b);m[x]=A.toRgba()}v=e._packedBuffer=function(e){var t=new Float64Array(3+a.default.packedLength+u.default.packedLength+f.default.packedLength),i=0;return t[i++]=e._indices.BYTES_PER_ELEMENT,t[i++]=e._minimumHeight,t[i++]=e._maximumHeight,a.default.pack(e._center,t,i),i+=a.default.packedLength,u.default.pack(e._ellipsoid,t,i),i+=u.default.packedLength,f.default.pack(e._rectangle,t,i),t}(e)}var T=[t.buffer,i.buffer,o.buffer,l.buffer,h.buffer,m.buffer,v.buffer],E={packedBuffer:v.buffer,positions:t.buffer,counts:i.buffer,indexCounts:o.buffer,indices:l.buffer,batchIds:h.buffer,batchTableColors:m.buffer},C=e._polygonMinimumHeights,S=e._polygonMaximumHeights;Object(s.default)(C)&&Object(s.default)(S)&&(C=Object(n.a)(C),S=Object(n.a)(S),T.push(C.buffer,S.buffer),E.minimumHeights=C,E.maximumHeights=S);var M=e._verticesPromise=y.scheduleTask(E,T);if(!Object(s.default)(M))return;Object(p.a)(M,(function(t){e._positions=void 0,e._counts=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0;var i=new Float64Array(t.packedBuffer),n=i[0];!function(e,t){for(var i=1,n=t[i++],a=e._boundingVolumes=new Array(n),o=0;o<n;++o)a[o]=c.a.unpack(t,i),i+=c.a.packedLength;for(var s=t[i++],l=e._batchedIndices=new Array(s),u=0;u<s;++u){var d=r.default.unpack(t,i);i+=r.default.packedLength;for(var f=t[i++],h=t[i++],p=t[i++],m=new Array(p),g=0;g<p;++g)m[g]=t[i++];l[u]=new _.a({color:d,offset:f,count:h,batchIds:m})}}(e,i),e._indices=2===d.a.getSizeInBytes(n)?new Uint16Array(t.indices):new Uint32Array(t.indices),e._indexOffsets=new Uint32Array(t.indexOffsets),e._indexCounts=new Uint32Array(t.indexCounts),e._batchedPositions=new Float32Array(t.positions),e._vertexBatchIds=new Uint16Array(t.batchIds),e._ready=!0}))}e._ready&&!Object(s.default)(e._primitive)&&(e._primitive=new g.a({batchTable:e._batchTable,positions:e._batchedPositions,batchIds:e._batchIds,vertexBatchIds:e._vertexBatchIds,indices:e._indices,indexOffsets:e._indexOffsets,indexCounts:e._indexCounts,batchedIndices:e._batchedIndices,boundingVolume:e._boundingVolume,boundingVolumes:e._boundingVolumes,center:e._center}),e._batchTable=void 0,e._batchIds=void 0,e._positions=void 0,e._counts=void 0,e._indices=void 0,e._indexCounts=void 0,e._indexOffsets=void 0,e._batchTableColors=void 0,e._packedBuffer=void 0,e._batchedPositions=void 0,e._transferrableBatchIds=void 0,e._vertexBatchIds=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._polygonMinimumHeights=void 0,e._polygonMaximumHeights=void 0,e._center=void 0,e._rectangle=void 0,e._boundingVolume=void 0,e._boundingVolumes=void 0,e._batchedIndices=void 0,e._verticesPromise=void 0,e._readyPromise.resolve())}}v.prototype.createFeatures=function(e,t){this._primitive.createFeatures(e,t)},v.prototype.applyDebugSettings=function(e,t){this._primitive.applyDebugSettings(e,t)},v.prototype.applyStyle=function(e,t){this._primitive.applyStyle(e,t)},v.prototype.updateCommands=function(e,t){this._primitive.updateCommands(e,t)},v.prototype.update=function(e){w(this),this._ready&&(this._primitive.debugWireframe=this.debugWireframe,this._primitive.forceRebatch=this.forceRebatch,this._primitive.classificationType=this.classificationType,this._primitive.update(e))},v.prototype.isDestroyed=function(){return!1},v.prototype.destroy=function(){return this._primitive=this._primitive&&this._primitive.destroy(),Object(l.default)(this)},t.a=v},function(e,t,i){"use strict";t.a="attribute vec4 currentPosition;\nattribute vec4 previousPosition;\nattribute vec4 nextPosition;\nattribute vec2 expandAndWidth;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelView;\n\nvoid main()\n{\n float expandDir = expandAndWidth.x;\n float width = abs(expandAndWidth.y) + 0.5;\n bool usePrev = expandAndWidth.y < 0.0;\n\n vec4 p = u_modifiedModelView * currentPosition;\n vec4 prev = u_modifiedModelView * previousPosition;\n vec4 next = u_modifiedModelView * nextPosition;\n\n float angle;\n vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n gl_Position = czm_viewportOrthographic * positionWC;\n}\n"},function(e,t,i){"use strict";var n=i(116),a=i(113),r=i(8),o=i(1),s=i(7),l=i(11),u=i(2),d=i(0),c=i(19),f=i(15),h=i(59),p=i(38),m=i(123),_=i(6),g=i(21),v=i(126),y=i(57),b=i(36),w=i(44),O=i(26),x=i(39),A=i(67),T=i(34),E=i(104),C=i(264),S=i(899),M=i(900),D=i(18),P=i(74),I=i(173),L=i(97),j=i(140),R=i(81),N=i(122),B=i(66),F=i(466);function k(e){this._positions=e.positions,this._widths=e.widths,this._counts=e.counts,this._batchIds=e.batchIds,this._ellipsoid=Object(u.default)(e.ellipsoid,f.default.WGS84),this._minimumHeight=e.minimumHeight,this._maximumHeight=e.maximumHeight,this._center=e.center,this._rectangle=e.rectangle,this._batchTable=e.batchTable,this._va=void 0,this._sp=void 0,this._rs=void 0,this._uniformMap=void 0,this._command=void 0,this._transferrableBatchIds=void 0,this._packedBuffer=void 0,this._minimumMaximumVectorHeights=new r.default(n.a._defaultMinTerrainHeight,n.a._defaultMaxTerrainHeight),this._boundingVolume=m.a.fromRectangle(e.rectangle,n.a._defaultMinTerrainHeight,n.a._defaultMaxTerrainHeight,this._ellipsoid),this._classificationType=e.classificationType,this._keepDecodedPositions=e.keepDecodedPositions,this._decodedPositions=void 0,this._decodedPositionOffsets=void 0,this._startEllipsoidNormals=void 0,this._endEllipsoidNormals=void 0,this._startPositionAndHeights=void 0,this._startFaceNormalAndVertexCornerIds=void 0,this._endPositionAndHeights=void 0,this._endFaceNormalAndHalfWidths=void 0,this._vertexBatchIds=void 0,this._indices=void 0,this._constantColor=s.default.clone(s.default.WHITE),this._highlightColor=this._constantColor,this._trianglesLength=0,this._geometryByteLength=0,this._ready=!1,this._readyPromise=D.a.defer(),this._verticesPromise=void 0;var t=this;n.a.initialize().then((function(){!function(e,t,i){var a=n.a.getMinimumMaximumHeights(t,i),r=a.minimumTerrainHeight,o=a.maximumTerrainHeight,s=e._minimumMaximumVectorHeights;s.x=r,s.y=o;var l=e._boundingVolume,u=e._rectangle;m.a.fromRectangle(u,r,o,i,l)}(t,t._rectangle,t._ellipsoid)})).otherwise((function(e){this._readyPromise.reject(e)}))}Object.defineProperties(k.prototype,{trianglesLength:{get:function(){return this._trianglesLength}},geometryByteLength:{get:function(){return this._geometryByteLength}},readyPromise:{get:function(){return this._readyPromise.promise}}});var z=new v.a("createVectorTileClampedPolylines"),U={startEllipsoidNormal:0,endEllipsoidNormal:1,startPositionAndHeight:2,endPositionAndHeight:3,startFaceNormalAndVertexCorner:4,endFaceNormalAndHalfWidth:5,a_batchId:6};function V(e,t){if(!Object(d.default)(e._va)){if(!Object(d.default)(e._verticesPromise)){var i=e._positions,n=e._widths,r=e._counts,s=e._transferrableBatchIds,u=e._packedBuffer;Object(d.default)(u)||(i=e._positions=Object(a.a)(i),n=e._widths=Object(a.a)(n),r=e._counts=Object(a.a)(r),s=e._transferrableBatchIds=Object(a.a)(e._batchIds),u=e._packedBuffer=function(e){var t=e._rectangle,i=e._minimumHeight,n=e._maximumHeight,a=e._ellipsoid,r=e._center,s=2+g.default.packedLength+f.default.packedLength+o.default.packedLength,l=new Float64Array(s),u=0;return l[u++]=i,l[u++]=n,g.default.pack(t,l,u),u+=g.default.packedLength,f.default.pack(a,l,u),u+=f.default.packedLength,o.default.pack(r,l,u),l}(e));var c=[i.buffer,n.buffer,r.buffer,s.buffer,u.buffer],h={positions:i.buffer,widths:n.buffer,counts:r.buffer,batchIds:s.buffer,packedBuffer:u.buffer,keepDecodedPositions:e._keepDecodedPositions},m=e._verticesPromise=z.scheduleTask(h,c);if(!Object(d.default)(m))return;Object(D.a)(m,(function(t){e._keepDecodedPositions&&(e._decodedPositions=new Float64Array(t.decodedPositions),e._decodedPositionOffsets=new Uint32Array(t.decodedPositionOffsets)),e._startEllipsoidNormals=new Float32Array(t.startEllipsoidNormals),e._endEllipsoidNormals=new Float32Array(t.endEllipsoidNormals),e._startPositionAndHeights=new Float32Array(t.startPositionAndHeights),e._startFaceNormalAndVertexCornerIds=new Float32Array(t.startFaceNormalAndVertexCornerIds),e._endPositionAndHeights=new Float32Array(t.endPositionAndHeights),e._endFaceNormalAndHalfWidths=new Float32Array(t.endFaceNormalAndHalfWidths),e._vertexBatchIds=new Uint16Array(t.vertexBatchIds);var i=t.indexDatatype;e._indices=i===p.a.UNSIGNED_SHORT?new Uint16Array(t.indices):new Uint32Array(t.indices),e._ready=!0})).otherwise((function(t){e._readyPromise.reject(t)}))}if(e._ready&&!Object(d.default)(e._va)){var _=e._startEllipsoidNormals,v=e._endEllipsoidNormals,w=e._startPositionAndHeights,O=e._endPositionAndHeights,x=e._startFaceNormalAndVertexCornerIds,A=e._endFaceNormalAndHalfWidths,T=e._vertexBatchIds,C=e._indices,S=_.byteLength+v.byteLength;S+=w.byteLength+O.byteLength,S+=x.byteLength+A.byteLength,S+=T.byteLength+C.byteLength,e._trianglesLength=C.length/3,e._geometryByteLength=S;var M=y.default.createVertexBuffer({context:t,typedArray:_,usage:b.default.STATIC_DRAW}),P=y.default.createVertexBuffer({context:t,typedArray:v,usage:b.default.STATIC_DRAW}),I=y.default.createVertexBuffer({context:t,typedArray:w,usage:b.default.STATIC_DRAW}),L=y.default.createVertexBuffer({context:t,typedArray:O,usage:b.default.STATIC_DRAW}),j=y.default.createVertexBuffer({context:t,typedArray:x,usage:b.default.STATIC_DRAW}),R=y.default.createVertexBuffer({context:t,typedArray:A,usage:b.default.STATIC_DRAW}),N=y.default.createVertexBuffer({context:t,typedArray:T,usage:b.default.STATIC_DRAW}),B=y.default.createIndexBuffer({context:t,typedArray:C,usage:b.default.STATIC_DRAW,indexDatatype:2===C.BYTES_PER_ELEMENT?p.a.UNSIGNED_SHORT:p.a.UNSIGNED_INT}),F=[{index:U.startEllipsoidNormal,vertexBuffer:M,componentDatatype:l.default.FLOAT,componentsPerAttribute:3},{index:U.endEllipsoidNormal,vertexBuffer:P,componentDatatype:l.default.FLOAT,componentsPerAttribute:3},{index:U.startPositionAndHeight,vertexBuffer:I,componentDatatype:l.default.FLOAT,componentsPerAttribute:4},{index:U.endPositionAndHeight,vertexBuffer:L,componentDatatype:l.default.FLOAT,componentsPerAttribute:4},{index:U.startFaceNormalAndVertexCorner,vertexBuffer:j,componentDatatype:l.default.FLOAT,componentsPerAttribute:4},{index:U.endFaceNormalAndHalfWidth,vertexBuffer:R,componentDatatype:l.default.FLOAT,componentsPerAttribute:4},{index:U.a_batchId,vertexBuffer:N,componentDatatype:l.default.UNSIGNED_SHORT,componentsPerAttribute:1}];e._va=new E.default({context:t,attributes:F,indexBuffer:B}),e._positions=void 0,e._widths=void 0,e._counts=void 0,e._ellipsoid=void 0,e._minimumHeight=void 0,e._maximumHeight=void 0,e._rectangle=void 0,e._transferrableBatchIds=void 0,e._packedBuffer=void 0,e._startEllipsoidNormals=void 0,e._endEllipsoidNormals=void 0,e._startPositionAndHeights=void 0,e._startFaceNormalAndVertexCornerIds=void 0,e._endPositionAndHeights=void 0,e._endFaceNormalAndHalfWidths=void 0,e._vertexBatchIds=void 0,e._indices=void 0,e._readyPromise.resolve()}}}var H=new _.default,G=new o.default;function Y(e){return x.default.fromCache({cull:{enabled:!0,face:j.default.FRONT},blending:P.default.PRE_MULTIPLIED_ALPHA_BLEND,depthMask:!1,stencilTest:{enabled:e,frontFunction:N.a.EQUAL,frontOperation:{fail:B.a.KEEP,zFail:B.a.KEEP,zPass:B.a.KEEP},backFunction:N.a.EQUAL,backOperation:{fail:B.a.KEEP,zFail:B.a.KEEP,zPass:B.a.KEEP},reference:R.a.CESIUM_3D_TILE_MASK,mask:R.a.CESIUM_3D_TILE_MASK}})}k.prototype.getPositions=function(e){return F.a.getPolylinePositions(this,e)},k.prototype.createFeatures=function(e,t){for(var i=this._batchIds,n=i.length,a=0;a<n;++a){var r=i[a];t[r]=new I.a(e,r)}},k.prototype.applyDebugSettings=function(e,t){this._highlightColor=e?t:this._constantColor};var W=new s.default,q=s.default.WHITE;k.prototype.applyStyle=function(e,t){if(Object(d.default)(e))for(var i=this._batchIds,n=i.length,a=0;a<n;++a){var r=t[i[a]];r.color=Object(d.default)(e.color)?e.color.evaluateColor(r,W):q,r.show=!Object(d.default)(e.show)||e.show.evaluate(r)}else!function(e,t){for(var i=e._batchIds,n=i.length,a=0;a<n;++a){var r=t[i[a]];r.show=!0,r.color=s.default.WHITE}}(this,t)},k.prototype.update=function(e){var t,i=e.context;if(V(this,i),function(e,t){Object(d.default)(e._uniformMap)||(e._uniformMap={u_modifiedModelView:function(){var i=t.uniformState.view;return _.default.clone(i,H),_.default.multiplyByPoint(H,e._center,G),_.default.setTranslation(H,G,H),H},u_highlightColor:function(){return e._highlightColor},u_minimumMaximumVectorHeights:function(){return e._minimumMaximumVectorHeights}})}(this,i),function(e,t){if(!Object(d.default)(e._sp)){var i=e._batchTable,n=i.getVertexShaderCallback(!1,"a_batchId",void 0)(S.a),a=i.getFragmentShaderCallback(!1,void 0,!0)(M.a),r=new T.default({defines:["VECTOR_TILE",h.a.isInternetExplorer()?"":"CLIP_POLYLINE"],sources:[C.a,n]}),o=new T.default({defines:["VECTOR_TILE"],sources:[a]});e._sp=A.default.fromCache({context:t,vertexShaderSource:r,fragmentShaderSource:o,attributeLocations:U})}}(this,i),t=this,Object(d.default)(t._rs)||(t._rs=Y(!1),t._rs3DTiles=Y(!0)),this._ready){var n=e.passes;(n.render||n.pick)&&function(e,t){var i=e._command;if(!Object(d.default)(e._command)){var n=e._batchTable.getUniformMapCallback()(e._uniformMap);i=e._command=new w.default({owner:e,vertexArray:e._va,renderState:e._rs,shaderProgram:e._sp,uniformMap:n,boundingVolume:e._boundingVolume,pass:O.default.TERRAIN_CLASSIFICATION,pickId:e._batchTable.getPickId()});var a=w.default.shallowClone(i,i.derivedCommands.tileset);a.renderState=e._rs3DTiles,a.pass=O.default.CESIUM_3D_TILE_CLASSIFICATION,i.derivedCommands.tileset=a}var r=e._classificationType;r!==L.default.TERRAIN&&r!==L.default.BOTH||t.commandList.push(i),r!==L.default.CESIUM_3D_TILE&&r!==L.default.BOTH||t.commandList.push(i.derivedCommands.tileset)}(this,e)}},k.prototype.isDestroyed=function(){return!1},k.prototype.destroy=function(){return this._va=this._va&&this._va.destroy(),this._sp=this._sp&&this._sp.destroy(),Object(c.default)(this)},t.a=k},function(e,t,i){"use strict";t.a='attribute vec3 startEllipsoidNormal;\nattribute vec3 endEllipsoidNormal;\nattribute vec4 startPositionAndHeight;\nattribute vec4 endPositionAndHeight;\nattribute vec4 startFaceNormalAndVertexCorner;\nattribute vec4 endFaceNormalAndHalfWidth;\nattribute float a_batchId;\n\nuniform mat4 u_modifiedModelView;\nuniform vec2 u_minimumMaximumVectorHeights;\n\nvarying vec4 v_startPlaneEC;\nvarying vec4 v_endPlaneEC;\nvarying vec4 v_rightPlaneEC;\nvarying float v_halfWidth;\nvarying vec3 v_volumeUpEC;\n\nvoid main()\n{\n // vertex corner IDs\n // 3-----------7\n // /| left /|\n // / | 1 / |\n // 2-----------6 5 end\n // | / | /\n // start |/ right |/\n // 0-----------4\n //\n float isEnd = floor(startFaceNormalAndVertexCorner.w * 0.251); // 0 for front, 1 for end\n float isTop = floor(startFaceNormalAndVertexCorner.w * mix(0.51, 0.19, isEnd)); // 0 for bottom, 1 for top\n\n vec3 forward = endPositionAndHeight.xyz - startPositionAndHeight.xyz;\n vec3 right = normalize(cross(forward, startEllipsoidNormal));\n\n vec4 position = vec4(startPositionAndHeight.xyz, 1.0);\n position.xyz += forward * isEnd;\n\n v_volumeUpEC = czm_normal * normalize(cross(right, forward));\n\n // Push for volume height\n float offset;\n vec3 ellipsoidNormal = mix(startEllipsoidNormal, endEllipsoidNormal, isEnd);\n\n // offset height to create volume\n offset = mix(startPositionAndHeight.w, endPositionAndHeight.w, isEnd);\n offset = mix(u_minimumMaximumVectorHeights.y, u_minimumMaximumVectorHeights.x, isTop) - offset;\n position.xyz += offset * ellipsoidNormal;\n\n // move from RTC to EC\n position = u_modifiedModelView * position;\n right = czm_normal * right;\n\n // Push for width in a direction that is in the start or end plane and in a plane with right\n // N = normalEC ("right-facing" direction for push)\n // R = right\n // p = angle between N and R\n // w = distance to push along R if R == N\n // d = distance to push along N\n //\n // N R\n // { p| } * cos(p) = dot(N, R) = w / d\n // d | |w * d = w / dot(N, R)\n // { | }\n // o---------- polyline segment ----\x3e\n //\n vec3 scratchNormal = mix(-startFaceNormalAndVertexCorner.xyz, endFaceNormalAndHalfWidth.xyz, isEnd);\n scratchNormal = cross(scratchNormal, mix(startEllipsoidNormal, endEllipsoidNormal, isEnd));\n vec3 miterPushNormal = czm_normal * normalize(scratchNormal);\n\n offset = 2.0 * endFaceNormalAndHalfWidth.w * max(0.0, czm_metersPerPixel(position)); // offset = widthEC\n offset = offset / dot(miterPushNormal, right);\n position.xyz += miterPushNormal * (offset * sign(0.5 - mod(startFaceNormalAndVertexCorner.w, 2.0)));\n\n gl_Position = czm_depthClamp(czm_projection * position);\n\n position = u_modifiedModelView * vec4(startPositionAndHeight.xyz, 1.0);\n vec3 startNormalEC = czm_normal * startFaceNormalAndVertexCorner.xyz;\n v_startPlaneEC = vec4(startNormalEC, -dot(startNormalEC, position.xyz));\n v_rightPlaneEC = vec4(right, -dot(right, position.xyz));\n\n position = u_modifiedModelView * vec4(endPositionAndHeight.xyz, 1.0);\n vec3 endNormalEC = czm_normal * endFaceNormalAndHalfWidth.xyz;\n v_endPlaneEC = vec4(endNormalEC, -dot(endNormalEC, position.xyz));\n v_halfWidth = endFaceNormalAndHalfWidth.w;\n}\n'},function(e,t,i){"use strict";t.a="#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n#endif\n\nvarying vec4 v_startPlaneEC;\nvarying vec4 v_endPlaneEC;\nvarying vec4 v_rightPlaneEC;\nvarying float v_halfWidth;\nvarying vec3 v_volumeUpEC;\n\nuniform vec4 u_highlightColor;\nvoid main()\n{\n float logDepthOrDepth = czm_branchFreeTernary(czm_sceneMode == czm_sceneMode2D, gl_FragCoord.z, czm_unpackDepth(texture2D(czm_globeDepthTexture, gl_FragCoord.xy / czm_viewport.zw)));\n\n // Discard for sky\n if (logDepthOrDepth == 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(0.0, 0.0, 1.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n\n vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, logDepthOrDepth);\n eyeCoordinate /= eyeCoordinate.w;\n\n float halfMaxWidth = v_halfWidth * czm_metersPerPixel(eyeCoordinate);\n\n // Expand halfMaxWidth if direction to camera is almost perpendicular with the volume's up direction\n halfMaxWidth += halfMaxWidth * (1.0 - dot(-normalize(eyeCoordinate.xyz), v_volumeUpEC));\n\n // Check distance of the eye coordinate against the right-facing plane\n float widthwiseDistance = czm_planeDistance(v_rightPlaneEC, eyeCoordinate.xyz);\n\n // Check eye coordinate against the mitering planes\n float distanceFromStart = czm_planeDistance(v_startPlaneEC, eyeCoordinate.xyz);\n float distanceFromEnd = czm_planeDistance(v_endPlaneEC, eyeCoordinate.xyz);\n\n if (abs(widthwiseDistance) > halfMaxWidth || distanceFromStart < 0.0 || distanceFromEnd < 0.0) {\n#ifdef DEBUG_SHOW_VOLUME\n gl_FragColor = vec4(logDepthOrDepth, 0.0, 0.0, 0.5);\n return;\n#else // DEBUG_SHOW_VOLUME\n discard;\n#endif // DEBUG_SHOW_VOLUME\n }\n gl_FragColor = u_highlightColor;\n\n czm_writeDepthClamp();\n}\n"},function(e,t,i){"use strict";var n=i(105),a=i(1),r=i(22),o=i(5),s=new r.default,l=new a.default;t.a=function(e,t,i,u,d){var c=e.length/3,f=e.subarray(0,c),h=e.subarray(c,2*c),p=e.subarray(2*c,3*c);n.a.zigZagDeltaDecode(f,h,p);for(var m=new Float64Array(e.length),_=0;_<c;++_){var g=f[_],v=h[_],y=p[_],b=o.default.lerp(t.west,t.east,g/32767),w=o.default.lerp(t.south,t.north,v/32767),O=o.default.lerp(i,u,y/32767),x=r.default.fromRadians(b,w,O,s),A=d.cartographicToCartesian(x,l);a.default.pack(A,m,3*_)}return m}},function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var n=i(4),a=i(2),r=i(0),o=i(3),s=i(18),l=i(903),u=i(905),d=i(153),c=i(165),f=i(72);function h(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).gltf,i=e.extension,l=e.extensionLegacy,u=e.gltfResource,d=e.baseResource,c=e.supportedImageFormats,h=e.cacheKey,p=Object(a.default)(e.asynchronous,!0);if(n.a.typeOf.object("options.gltf",t),n.a.typeOf.object("options.gltfResource",u),n.a.typeOf.object("options.baseResource",d),n.a.typeOf.object("options.supportedImageFormats",c),!Object(r.default)(e.extension)&&!Object(r.default)(e.extensionLegacy))throw new o.default("One of options.extension or options.extensionLegacy must be specified");this._gltfResource=u,this._baseResource=d,this._gltf=t,this._extension=i,this._extensionLegacy=l,this._supportedImageFormats=c,this._cacheKey=h,this._asynchronous=p,this._bufferViewLoaders=[],this._textureLoaders=[],this._schemaLoader=void 0,this._featureMetadata=void 0,this._state=f.a.UNLOADED,this._promise=s.a.defer()}function p(e,t){for(var i in e)if(e.hasOwnProperty(i)){var n=e[i],a=n.bufferView,o=n.arrayOffsetBufferView,s=n.stringOffsetBufferView;Object(r.default)(a)&&(t[a]=!0),Object(r.default)(o)&&(t[o]=!0),Object(r.default)(s)&&(t[s]=!0)}}function m(e,t){for(var i in e)if(e.hasOwnProperty(i)){var n=e[i].texture;t[n.index]=n}}function _(e){for(var t=e._bufferViewLoaders,i=t.length,n=0;n<i;++n)d.a.unload(t[n]);e._bufferViewLoaders.length=0}Object(r.default)(Object.create)&&(h.prototype=Object.create(c.a.prototype),h.prototype.constructor=h),Object.defineProperties(h.prototype,{promise:{get:function(){return this._promise.promise}},cacheKey:{get:function(){return this._cacheKey}},featureMetadata:{get:function(){return this._featureMetadata}}}),h.prototype.load=function(){var e=function(e){var t;t=Object(r.default)(e._extension)?function(e){var t=e.propertyTables,i={};if(Object(r.default)(t))for(var n=0;n<t.length;n++){p(t[n].properties,i)}return i}(e._extension):function(e){var t=e.featureTables,i={};if(Object(r.default)(t))for(var n in t)if(t.hasOwnProperty(n)){var a=t[n].properties;Object(r.default)(a)&&p(a,i)}return i}(e._extensionLegacy);var i=[],n={};for(var a in t)if(t.hasOwnProperty(a)){var o=d.a.loadBufferView({gltf:e._gltf,bufferViewId:parseInt(a),gltfResource:e._gltfResource,baseResource:e._baseResource});i.push(o.promise),e._bufferViewLoaders.push(o),n[a]=o}return s.a.all(i).then((function(){var t={};for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],r=new Uint8Array(a.typedArray);t[i]=r}return _(e),t}))}(this),t=function(e){var t;t=Object(r.default)(e._extension)?function(e){var t={},i=e.propertyTextures;if(Object(r.default)(i))for(var n=0;n<i.length;n++){var a=i[n];Object(r.default)(a.properties)&&(t[a.index]=a)}return t}(e._extension):function(e){var t={},i=e.featureTextures;if(Object(r.default)(i))for(var n in i)if(i.hasOwnProperty(n)){var a=i[n].properties;Object(r.default)(a)&&m(a,t)}return t}(e._extensionLegacy);var i=e._gltf,n=e._gltfResource,a=e._baseResource,o=e._supportedImageFormats,l=e._asynchronous,u=[],c={};for(var f in t)if(t.hasOwnProperty(f)){var h=d.a.loadTexture({gltf:i,textureInfo:t[f],gltfResource:n,baseResource:a,supportedImageFormats:o,asynchronous:l});u.push(h.promise),e._textureLoaders.push(h),c[f]=h}return s.a.all(u).then((function(){var e={};for(var t in c)if(c.hasOwnProperty(t)){var i=c[t];e[t]=i.texture}return e}))}(this),i=function(e){var t,i=Object(a.default)(e._extension,e._extensionLegacy);if(Object(r.default)(i.schemaUri)){var n=e._baseResource.getDerivedResource({url:i.schemaUri});t=d.a.loadSchema({resource:n})}else t=d.a.loadSchema({schema:i.schema});return e._schemaLoader=t,t.promise.then((function(e){return e.schema}))}(this);this._gltf=void 0,this._state=f.a.LOADING;var n=this;s.a.all([e,t,i]).then((function(e){if(!n.isDestroyed()){var t=e[0],i=e[1],a=e[2];Object(r.default)(n._extension)?n._featureMetadata=Object(l.a)({extension:n._extension,schema:a,bufferViews:t,textures:i}):n._featureMetadata=Object(u.a)({extension:n._extensionLegacy,schema:a,bufferViews:t,textures:i}),n._state=f.a.READY,n._promise.resolve(n)}})).otherwise((function(e){if(!n.isDestroyed()){n.unload(),n._state=f.a.FAILED;n._promise.reject(n.getError("Failed to load feature metadata",e))}}))},h.prototype.process=function(e){if(n.a.typeOf.object("frameState",e),this._state===f.a.LOADING)for(var t=this._textureLoaders,i=t.length,a=0;a<i;++a){t[a].process(e)}},h.prototype.unload=function(){_(this),function(e){for(var t=e._textureLoaders,i=t.length,n=0;n<i;++n)d.a.unload(t[n]);e._textureLoaders.length=0}(this),Object(r.default)(this._schemaLoader)&&d.a.unload(this._schemaLoader),this._schemaLoader=void 0,this._featureMetadata=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var n=i(4),a=i(50),r=i(2),o=i(0),s=i(312),l=i(468),u=i(313),d=i(311);function c(e){var t,i=(e=Object(r.default)(e,r.default.EMPTY_OBJECT)).extension,a=e.schema;n.a.typeOf.object("options.extension",i),n.a.typeOf.object("options.schema",a);var c=[];if(Object(o.default)(i.propertyTables))for(t=0;t<i.propertyTables.length;t++){var h=i.propertyTables[t],p=a.classes[h.class],m=new d.a({count:h.count,properties:h.properties,class:p,bufferViews:e.bufferViews});c.push(new s.a({id:t,name:h.name,count:h.count,metadataTable:m,extras:h.extras,extensions:h.extensions}))}var _=[];if(Object(o.default)(i.propertyTextures))for(t=0;t<i.propertyTextures.length;t++){var g=i.propertyTextures[t];_.push(new l.a({id:t,name:g.name,featureTexture:f(g),class:a.classes[g.class],textures:e.textures}))}return new u.a({schema:a,propertyTables:c,propertyTextures:_,statistics:i.statistics,extras:i.extras,extensions:i.extensions})}function f(e){var t=Object(a.default)(e),i=Object(a.default)(e);i.properties={};var n=e.properties;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];i.properties[r]={texture:t,channels:h(o)}}return i}function h(e){return e.map((function(e){return"rgba".charAt(e)})).join("")}},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(255);function o(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).property,i=e.classProperty,o=e.textures;n.a.typeOf.object("options.property",t),n.a.typeOf.object("options.classProperty",i),n.a.typeOf.object("options.textures",o);var s=t.texture,l=r.a.createModelTextureReader({textureInfo:s,channels:t.channels,texture:o[s.index]});this._textureReader=l,this._classProperty=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(o.prototype,{textureReader:{get:function(){return this._textureReader}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),t.a=o},function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var n=i(4),a=i(2),r=i(0),o=i(312),s=i(468),l=i(313),u=i(311);function d(e){var t,i=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).extension,d=e.schema;n.a.typeOf.object("options.extension",i),n.a.typeOf.object("options.schema",d);var c,f=[];if(Object(r.default)(i.featureTables))for(c=Object.keys(i.featureTables).sort(),t=0;t<c.length;t++){var h=c[t],p=i.featureTables[h],m=d.classes[p.class],_=new u.a({count:p.count,properties:p.properties,class:m,bufferViews:e.bufferViews});f.push(new o.a({id:h,count:p.count,metadataTable:_,extras:p.extras,extensions:p.extensions}))}var g=[];if(Object(r.default)(i.featureTextures))for(c=Object.keys(i.featureTextures).sort(),t=0;t<c.length;t++){var v=c[t],y=i.featureTextures[v];g.push(new s.a({id:v,featureTexture:y,class:d.classes[y.class],textures:e.textures}))}return new l.a({schema:d,propertyTables:f,propertyTextures:g,statistics:i.statistics,extras:i.extras,extensions:i.extensions})}},function(e,t,i){"use strict";i.d(t,"a",(function(){return a}));var n=i(2);function a(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this.webp=Object(n.default)(e.webp,!1),this.basis=Object(n.default)(e.basis,!1)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return v}));var n=i(908),a=i(17),r=i(4),o=i(2),s=i(0),l=i(6),u=i(911),d=i(469),c=i(409),f=i(916),h=i(931),p=i(141),m=i(934),_=i(939),g=i(940);function v(e){e=Object(o.default)(e,o.default.EMPTY_OBJECT),r.a.typeOf.object("options.model",e.model),r.a.typeOf.object("options.modelComponents",e.modelComponents),this._model=e.model,this._modelComponents=e.modelComponents,this._pipelineStages=[],this._runtimeNodes=[],this._drawCommands=[],this._boundingSphere=void 0,this._boundingSpheres=[],function(e){var t=l.default.clone(e._model.modelMatrix),i=e._modelComponents.scene;p.a.correctModelMatrix(t,i.upAxis,i.forwardAxis);for(var n=e._modelComponents.scene.nodes,a=0;a<n.length;a++){var r=e._modelComponents.scene.nodes[a],o=l.default.multiply(t,p.a.getNodeTransform(r),new l.default);y(e,r,o)}}(this)}function y(e,t,i){if(Object(s.default)(t.children)||Object(s.default)(t.primitives)){var n;if(Object(s.default)(t.children))for(n=0;n<t.children.length;n++){var a=t.children[n];y(e,a,l.default.multiply(i,p.a.getNodeTransform(a),new l.default))}var r=new h.a({node:t,modelMatrix:i});if(Object(s.default)(t.primitives))for(n=0;n<t.primitives.length;n++)r.runtimePrimitives.push(new f.a({primitive:t.primitives[n],node:t,model:e._model}));e._runtimeNodes.push(r)}}v.prototype.buildDrawCommands=function(e){var t,i,r,o=new m.a(this._model),l=[],f=this._model;for(Object(s.default)(f.color)&&l.push(c.a),t=0;t<l.length;t++){l[t].process(o,f,e)}for(t=0;t<this._runtimeNodes.length;t++){var h=this._runtimeNodes[t],p=new _.a(o,h);for(i=0;i<h.pipelineStages.length;i++){h.pipelineStages[i].process(p,h.node,e)}for(i=0;i<h.runtimePrimitives.length;i++){var v=h.runtimePrimitives[i],y=v.pipelineStages.slice();if(Object(s.default)(f.customShader)){var b=y.indexOf(d.a);y.splice(b,0,u.a)}var w=new g.a(p,v);for(r=0;r<y.length;r++){y[r].process(w,v.primitive,e)}this._boundingSpheres.push(w.boundingSphere);var O=Object(n.a)(w,e);this._drawCommands.push.apply(this._drawCommands,O)}}this._boundingSphere=a.default.fromBoundingSpheres(this._boundingSpheres)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return p}));var n=i(74),a=i(50),r=i(0),o=i(44),s=i(909),l=i(910),u=i(26),d=i(39),c=i(23),f=i(276),h=i(104);function p(e,t){var i=e.shaderBuilder;i.addVertexLines([l.a]),i.addFragmentLines([s.a]);var p=Object(r.default)(e.indices)?e.indices.buffer:void 0,m=new h.default({context:t.context,indexBuffer:p,attributes:e.attributes}),_=e.model;_._resources.push(m);var g=d.default.fromCache(e.renderStateOptions),v=i.buildShaderProgram(t.context);_._resources.push(v);var y=e.alphaOptions.pass,b=new o.default({boundingVolume:e.boundingSphere,modelMatrix:e.modelMatrix,uniformMap:e.uniformMap,renderState:g,vertexArray:m,shaderProgram:v,cull:_.cull,pass:y,count:e.count,pickId:e.pickId,instanceCount:e.instanceCount,primitiveType:e.primitiveType,debugShowBoundingVolume:_.debugShowBoundingVolume}),w=e.styleCommandsNeeded,O=[];if(Object(r.default)(w)){var x=function(e){var t={};return t.translucent=function(e){var t=o.default.shallowClone(e);t.pass=u.default.TRANSLUCENT;var i=Object(a.default)(e.renderState,!0);return i.cull.enabled=!1,i.depthTest.enabled=!0,i.depthMask=!1,i.blending=n.default.ALPHA_BLEND,t.renderState=d.default.fromCache(i),t}(e),t}(b);if(y!==u.default.TRANSLUCENT)switch(w){case f.a.ALL_OPAQUE:O.push(b);break;case f.a.ALL_TRANSLUCENT:O.push(x.translucent);break;case f.a.OPAQUE_AND_TRANSLUCENT:O.push(b,x.translucent);break;default:throw new c.a("styleCommandsNeeded is not a valid value.")}else O.push(b)}else O.push(b);return O}},function(e,t,i){"use strict";t.a="#if defined(HAS_NORMALS) && !defined(HAS_TANGENTS) && !defined(LIGHTING_UNLIT)\n #ifdef GL_OES_standard_derivatives\n #extension GL_OES_standard_derivatives : enable\n #endif\n#endif\n\nczm_modelMaterial defaultModelMaterial()\n{\n czm_modelMaterial material;\n material.diffuse = vec3(1.0);\n material.specular = vec3(0.04); // dielectric (non-metal)\n material.roughness = 0.0;\n material.occlusion = 1.0;\n material.normalEC = vec3(0.0, 0.0, 1.0);\n material.emissive = vec3(0.0);\n material.alpha = 1.0;\n return material;\n}\n\nvec4 handleAlpha(vec3 color, float alpha)\n{\n #ifdef ALPHA_MODE_MASK\n if (alpha < u_alphaCutoff) {\n discard;\n }\n return vec4(color, 1.0);\n #elif defined(ALPHA_MODE_BLEND)\n return vec4(color, alpha);\n #else // OPAQUE\n return vec4(color, 1.0);\n #endif\n}\n\nFeature feature;\n\nvoid main() \n{\n czm_modelMaterial material = defaultModelMaterial();\n\n ProcessedAttributes attributes;\n geometryStage(attributes);\n\n #ifdef HAS_FEATURES\n featureStage(feature);\n #endif\n\n\n #ifndef CUSTOM_SHADER_REPLACE_MATERIAL\n materialStage(material, attributes, feature);\n #endif\n\n #ifdef HAS_CUSTOM_FRAGMENT_SHADER\n customShaderStage(material, attributes);\n #endif\n\n lightingStage(material);\n\n #ifdef HAS_FEATURES\n cpuStylingStage(material, feature);\n #endif\n \n #ifdef HAS_MODEL_COLOR\n modelColorStage(material);\n #endif \n\n vec4 color = handleAlpha(material.diffuse, material.alpha);\n\n gl_FragColor = color;\n}\n"},function(e,t,i){"use strict";t.a="precision highp float;\n\nczm_modelVertexOutput defaultVertexOutput(vec3 positionMC) {\n czm_modelVertexOutput vsOutput;\n vsOutput.positionMC = positionMC;\n vsOutput.pointSize = 1.0;\n return vsOutput;\n}\n\nvoid main() \n{\n // Initialize the attributes struct with all\n // attributes except quantized ones.\n ProcessedAttributes attributes;\n initializeAttributes(attributes);\n\n // Dequantize the quantized ones and add them to the\n // attributes struct.\n #ifdef USE_DEQUANTIZATION\n dequantizationStage(attributes);\n #endif\n\n // Update the position for this instance in place\n #ifdef HAS_INSTANCING\n instancingStage(attributes.positionMC);\n #ifdef USE_PICKING\n v_pickColor = a_pickColor;\n #endif\n #endif\n\n #if defined(HAS_FEATURES) && defined(FEATURE_ID_ATTRIBUTE)\n Feature feature;\n featureStage(feature);\n cpuStylingStage(attributes.positionMC, feature);\n updateFeatureStruct(feature);\n #endif\n \n #ifdef HAS_CUSTOM_VERTEX_SHADER\n czm_modelVertexOutput vsOutput = defaultVertexOutput(attributes.positionMC);\n customShaderStage(vsOutput, attributes);\n #endif\n\n // Compute the final position in each coordinate system needed.\n // This also sets gl_Position.\n geometryStage(attributes); \n\n #ifdef PRIMITIVE_TYPE_POINTS\n #ifdef HAS_CUSTOM_VERTEX_SHADER\n gl_PointSize = vsOutput.pointSize;\n #else\n gl_PointSize = 1.0;\n #endif\n #endif\n}\n"},function(e,t,i){"use strict";var n=i(60),a=i(0),r=i(70),o=i(55),s=i(26),l=i(912),u=i(913),d=i(210),c=i(367),f=i(141),h={};h.name="CustomShaderPipelineStage",h.STRUCT_ID_ATTRIBUTES_VS="AttributesVS",h.STRUCT_ID_ATTRIBUTES_FS="AttributesFS",h.STRUCT_NAME_ATTRIBUTES="Attributes",h.STRUCT_ID_VERTEX_INPUT="VertexInput",h.STRUCT_NAME_VERTEX_INPUT="VertexInput",h.STRUCT_ID_FRAGMENT_INPUT="FragmentInput",h.STRUCT_NAME_FRAGMENT_INPUT="FragmentInput",h.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS="initializeInputStructVS",h.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS="void initializeInputStruct(out VertexInput vsInput, ProcessedAttributes attributes)",h.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS="initializeInputStructFS",h.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS="void initializeInputStruct(out FragmentInput fsInput, ProcessedAttributes attributes)",h.process=function(e,t,i){var r=e.shaderBuilder,p=e.model.customShader,m=function(e,t){var i={enabled:!1},n={enabled:!1},r=function(e){for(var t={},i=0;i<e.length;i++){var n=e[i],a=f.a.getAttributeInfo(n);t[a.variableName]=a}return t}(t.attributes);Object(a.default)(e.vertexShaderText)&&function(e,t,i){var n,r,o=v(t,e.usedVariablesVertex.attributeSet,!1),s=o.addToShader,l=o.missingAttributes,u=[],d=[];for(n in s)if(s.hasOwnProperty(n)){var c=[s[n].glslType,n];u.push(c),r="vsInput.attributes."+n+" = attributes."+n+";",d.push(r)}for(var f=0;f<l.length;f++){var p=_(n=l[f]);if(!Object(a.default)(p))return void h._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveVS","Primitive is missing attribute "+n+", disabling custom vertex shader");u.push(p.attributeField),r="vsInput.attributes."+n+" = "+p.value+";",d.push(r)}i.enabled=!0,i.attributeFields=u,i.initializationLines=d}(e,r,i);Object(a.default)(e.fragmentShaderText)&&function(e,t,i){var n,r,o=v(t,e.usedVariablesFragment.attributeSet,!0),s=o.addToShader,l=o.missingAttributes,u=[],d=[];for(n in s)if(s.hasOwnProperty(n)){var c=[s[n].glslType,n];u.push(c),r="fsInput.attributes."+n+" = attributes."+n+";",d.push(r)}for(var f=0;f<l.length;f++){var p=_(n=l[f]);if(!Object(a.default)(p))return void h._oneTimeWarning("CustomShaderPipelineStage.incompatiblePrimitiveFS","Primitive is missing attribute "+n+", disabling custom fragment shader.");u.push(p.attributeField),r="fsInput.attributes."+n+" = "+p.value+";",d.push(r)}var m=function(e){var t=[],i=[],n=e.usedVariablesFragment.attributeSet;n.hasOwnProperty("positionWC")&&(t.push(["vec3","positionWC"]),i.push("fsInput.attributes.positionWC = attributes.positionWC;"));n.hasOwnProperty("positionEC")&&(t.push(["vec3","positionEC"]),i.push("fsInput.attributes.positionEC = attributes.positionEC;"));return{attributeFields:t,initializationLines:i}}(e);i.enabled=!0,i.attributeFields=u.concat(m.attributeFields),i.initializationLines=m.initializationLines.concat(d)}(e,r,n);var o=e.usedVariablesFragment.attributeSet.hasOwnProperty("positionWC")&&n.enabled;return{vertexLines:i,fragmentLines:n,vertexLinesEnabled:i.enabled,fragmentLinesEnabled:n.enabled,customShaderEnabled:i.enabled||n.enabled,shouldComputePositionWC:o}}(p,t);if(m.customShaderEnabled){if(function(e,t,i){var n=i.vertexLines;n.enabled&&(!function(e,t){var i,n=h.STRUCT_ID_ATTRIBUTES_VS;e.addStruct(n,h.STRUCT_NAME_ATTRIBUTES,o.a.VERTEX);var a=t.attributeFields;for(i=0;i<a.length;i++){var r=a[i],s=r[0],l=r[1];e.addStructField(n,s,l)}n=h.STRUCT_ID_VERTEX_INPUT,e.addStruct(n,h.STRUCT_NAME_VERTEX_INPUT,o.a.VERTEX),e.addStructField(n,h.STRUCT_NAME_ATTRIBUTES,"attributes");var u=h.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_VS;e.addFunction(u,h.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_VS,o.a.VERTEX);var d=t.initializationLines;e.addFunctionLines(u,d)}(e,n),e.addVertexLines(["#line 0",t.vertexShaderText,l.a]));var a=i.fragmentLines;a.enabled&&(!function(e,t){var i,n,a,r,s=h.STRUCT_ID_ATTRIBUTES_FS;e.addStruct(s,h.STRUCT_NAME_ATTRIBUTES,o.a.FRAGMENT);var l=t.attributeFields;for(i=0;i<l.length;i++)n=l[i],a=n[0],r=n[1],e.addStructField(s,a,r);s=h.STRUCT_ID_FRAGMENT_INPUT,e.addStruct(s,h.STRUCT_NAME_FRAGMENT_INPUT,o.a.FRAGMENT),e.addStructField(s,h.STRUCT_NAME_ATTRIBUTES,"attributes");var u=h.FUNCTION_ID_INITIALIZE_INPUT_STRUCT_FS;e.addFunction(u,h.FUNCTION_SIGNATURE_INITIALIZE_INPUT_STRUCT_FS,o.a.FRAGMENT);var d=t.initializationLines;e.addFunctionLines(u,d)}(e,a),e.addFragmentLines(["#line 0",t.fragmentShaderText,u.a]))}(r,p,m),m.shouldComputePositionWC&&r.addDefine("COMPUTE_POSITION_WC",void 0,o.a.BOTH),Object(a.default)(p.vertexShaderText)&&r.addDefine("HAS_CUSTOM_VERTEX_SHADER",void 0,o.a.VERTEX),Object(a.default)(p.fragmentShaderText)){r.addDefine("HAS_CUSTOM_FRAGMENT_SHADER",void 0,o.a.FRAGMENT);var g=c.a.getDefineName(p.mode);r.addDefine(g,void 0,o.a.FRAGMENT)}var y=p.uniforms;for(var b in y)if(y.hasOwnProperty(b)){var w=y[b];r.addUniform(w.type,b)}var O=p.varyings;for(var x in O)if(O.hasOwnProperty(x)){var A=O[x];r.addVarying(A,x)}Object(a.default)(p.lightingModel)&&(e.lightingOptions.lightingModel=p.lightingModel);var T=e.alphaOptions;p.isTranslucent?(T.pass=s.default.TRANSLUCENT,T.alphaMode=d.a.BLEND):(T.pass=void 0,T.alphaMode=d.a.OPAQUE),e.uniformMap=Object(n.default)(e.uniformMap,p.uniformMap)}};var p={position:"vec3",normal:"vec3",tangent:"vec3",bitangent:"vec3",texCoord:"vec2",color:"vec4",joints:"ivec4",weights:"vec4"},m={position:"vec3(0.0)",normal:"vec3(0.0, 0.0, 1.0)",tangent:"vec3(1.0, 0.0, 0.0)",bitangent:"vec3(0.0, 1.0, 0.0)",texCoord:"vec2(0.0)",color:"vec4(1.0)",joints:"ivec4(0)",weights:"vec4(0.0)"};function _(e){var t=e.replace(/_[0-9]+$/,"");t=t.replace(/(MC|EC)$/,"");var i=p[t],n=m[t];if(Object(a.default)(i))return{attributeField:[i,e],value:n}}var g={positionWC:!0,positionEC:!0};function v(e,t,i){var n,a,r={};for(a in e)if(e.hasOwnProperty(a)){var o=e[a];n=a,i&&"normalMC"===a?n="normalEC":i&&"tangentMC"===a&&(n="tangentEC"),t.hasOwnProperty(n)&&(r[n]=o)}var s=[];for(a in t)if(t.hasOwnProperty(a)){if(g.hasOwnProperty(a))continue;n=a,i&&"normalEC"===a?n="normalMC":i&&"tangentEC"===a&&(n="tangentMC"),e.hasOwnProperty(n)||s.push(a)}return{addToShader:r,missingAttributes:s}}h._oneTimeWarning=r.a,t.a=h},function(e,t,i){"use strict";t.a="void customShaderStage(inout czm_modelVertexOutput vsOutput, inout ProcessedAttributes attributes)\n{\n // VertexInput and initializeInputStruct() are dynamically generated in JS, \n // see CustomShaderPipelineStage.js\n VertexInput vsInput;\n initializeInputStruct(vsInput, attributes);\n vertexMain(vsInput, vsOutput);\n attributes.positionMC = vsOutput.positionMC;\n}\n"},function(e,t,i){"use strict";t.a="void customShaderStage(inout czm_modelMaterial material, ProcessedAttributes attributes) \n{\n // FragmentInput and initializeInputStruct() are dynamically generated in JS, \n // see CustomShaderPipelineStage.js\n FragmentInput fsInput;\n initializeInputStruct(fsInput, attributes);\n fragmentMain(fsInput, material);\n}\n"},function(e,t,i){"use strict";t.a="vec3 LINEARtoSRGB(vec3 linearIn) \n{\n #ifndef HDR \n return pow(linearIn, vec3(1.0/2.2));\n #else \n return linearIn;\n #endif \n}\n\n#ifdef LIGHTING_PBR\nvec3 applyTonemapping(vec3 linearIn) \n{\n #ifndef HDR \n return czm_acesTonemapping(linearIn);\n #else \n return linearIn;\n #endif \n}\n\nvec3 computePbrLighting(czm_modelMaterial inputMaterial)\n{\n czm_pbrParameters pbrParameters;\n pbrParameters.diffuseColor = inputMaterial.diffuse;\n pbrParameters.f0 = inputMaterial.specular;\n pbrParameters.roughness = inputMaterial.roughness;\n \n vec3 lightColorHdr = czm_lightColorHdr;\n\n vec3 color = inputMaterial.diffuse;\n #ifdef HAS_NORMALS\n color = czm_pbrLighting(\n v_positionEC,\n inputMaterial.normalEC,\n czm_lightDirectionEC,\n lightColorHdr,\n pbrParameters\n );\n #endif\n\n color *= inputMaterial.occlusion;\n color += inputMaterial.emissive;\n\n // Convert high-dynamic range to low-dynamic range in HDR mode\n color = applyTonemapping(color);\n return color;\n}\n#endif\n\nvoid lightingStage(inout czm_modelMaterial material)\n{\n // Even though the lighting will only set the diffuse color,\n // pass all other properties so further stages have access to them.\n vec3 color = vec3(0.0);\n\n #ifdef LIGHTING_PBR\n color = computePbrLighting(material);\n #else // unlit\n color = material.diffuse;\n #endif\n\n color = LINEARtoSRGB(color);\n\n material.diffuse = color;\n}\n"},function(e,t,i){"use strict";t.a="void modelColorStage(inout czm_modelMaterial material)\n{\n material.diffuse = mix(material.diffuse, model_color.rgb, model_colorBlend);\n float highlight = ceil(model_colorBlend);\n material.diffuse *= mix(model_color.rgb, vec3(1.0), highlight);\n material.alpha *= model_color.a;\n}"},function(e,t,i){"use strict";i.d(t,"a",(function(){return v}));var n=i(917),a=i(918),r=i(4),o=i(367),s=i(2),l=i(0),u=i(410),d=i(921),c=i(924),f=i(925),h=i(469),p=i(928),m=i(141),_=i(930),g=i(178);function v(e){e=Object(s.default)(e,s.default.EMPTY_OBJECT),r.a.typeOf.object("options.primitive",e.primitive),r.a.typeOf.object("options.node",e.node),r.a.typeOf.object("options.model",e.model),this.primitive=e.primitive,this.node=e.node,this.model=e.model,this.pipelineStages=[],function(e){var t=e.pipelineStages,i=e.primitive,r=e.node,s=e.model,v=s.customShader,y=!(Object(l.default)(v)&&Object(l.default)(v.fragmentShaderText))||v.mode!==o.a.REPLACE_MATERIAL,b=m.a.hasQuantizedAttributes(i.attributes);t.push(f.a),b&&t.push(c.a);y&&t.push(p.a);t.push(h.a);var w,O=s.featureIdAttributeIndex,x=s.featureIdTextureIndex;if(Object(l.default)(r.instances)&&r.instances.featureIdAttributes.length>0){var A=r.instances.featureIdAttributes;Object(l.default)(A[O])&&(w=!0)}var T=Object(l.default)(m.a.getAttributeBySemantic(i,g.a.FEATURE_ID)),E=Object(l.default)(i.featureIdTextures[x]),C=w||T||E;(w||C)&&(t.push(u.a),t.push(a.a),t.push(d.a));s.allowPicking&&t.push(_.a);t.push(n.a)}(this)}},function(e,t,i){"use strict";var n=i(2),a=i(55),r=i(210),o=i(74),s=i(26),l={name:"AlphaPipelineStage",process:function(e,t,i){var l=e.alphaOptions,u=e.model;l.pass=Object(n.default)(l.pass,u.opaquePass);var d=e.renderStateOptions;l.pass===s.default.TRANSLUCENT?d.blending=o.default.ALPHA_BLEND:d.blending=o.default.DISABLED;var c=e.shaderBuilder,f=e.uniformMap,h=l.alphaMode;h===r.a.MASK?(c.addDefine("ALPHA_MODE_MASK",void 0,a.a.FRAGMENT),c.addUniform("float","u_alphaCutoff",a.a.FRAGMENT),f.u_alphaCutoff=function(){return l.alphaCutoff}):h===r.a.BLEND?c.addDefine("ALPHA_MODE_BLEND",void 0,a.a.FRAGMENT):c.addDefine("ALPHA_MODE_OPAQUE",void 0,a.a.FRAGMENT)}};t.a=l},function(e,t,i){"use strict";var n=i(60),a=i(2),r={name:"BatchTexturePipelineStage",process:function(e,t,i){var r=e.shaderBuilder,o={},s=e.model,l=s.featureTables[s.featureTableId],u=l.featuresLength;r.addUniform("float","model_featuresLength"),o.model_featuresLength=function(){return u};var d=l.batchTexture;r.addUniform("sampler2D","model_batchTexture"),o.model_batchTexture=function(){return Object(a.default)(d.batchTexture,d.defaultTexture)},r.addUniform("vec4","model_textureStep"),o.model_textureStep=function(){return d.textureStep},d.textureDimensions.y>1&&(r.addDefine("MULTILINE_BATCH_TEXTURE"),r.addUniform("vec2","model_textureDimensions"),o.model_textureDimensions=function(){return d.textureDimensions}),e.uniformMap=Object(n.default)(o,e.uniformMap)}};t.a=r},function(e,t,i){"use strict";t.a="void featureStage(inout Feature feature)\n{ \n #ifdef FEATURE_ID_TEXTURE\n \n float featureId = floor(texture2D(FEATURE_ID_TEXTURE, FEATURE_ID_TEXCOORD).FEATURE_ID_CHANNEL * 255.0 + 0.5);\n vec2 featureSt;\n if (featureId < model_featuresLength)\n {\n featureSt = computeSt(featureId);\n\n feature.id = int(featureId);\n feature.st = featureSt;\n feature.color = texture2D(model_batchTexture, featureSt);\n }\n // Floating point comparisons can be unreliable in GLSL, so we\n // increment the feature ID to make sure it's always greater\n // then the model_featuresLength - a condition we check for in the\n // pick ID, to avoid sampling the pick texture if the feature ID is\n // greater than the number of features.\n else\n {\n feature.id = int(model_featuresLength) + 1;\n feature.st = vec2(0.0);\n feature.color = vec4(1.0);\n }\n #else\n // For feature ID vertex attributes, the function generated in FeatureIdPipelineStage \n // is used to update the Feature struct from the varyings passed in.\n updateFeatureStruct(feature);\n #endif\n}\n"},function(e,t,i){"use strict";t.a="// This stage is only applied for Feature ID vertex attributes.\n// If Feature ID textures are present, those are used in the fragment shader.\nvoid featureStage(inout Feature feature)\n{\n float featureId = FEATURE_ID_ATTRIBUTE;\n\n if (featureId < model_featuresLength)\n {\n vec2 featureSt = computeSt(featureId);\n\n feature.id = int(featureId);\n feature.st = featureSt;\n feature.color = texture2D(model_batchTexture, featureSt);\n }\n // Floating point comparisons can be unreliable in GLSL, so we\n // increment the feature ID to make sure it's always greater\n // then the model_featuresLength - a condition we check for in the\n // pick ID, to avoid sampling the pick texture if the feature ID is\n // greater than the number of features.\n else\n {\n feature.id = int(model_featuresLength) + 1;\n feature.st = vec2(0.0);\n feature.color = vec4(1.0);\n }\n}\n"},function(e,t,i){"use strict";var n=i(922),a=i(923),r=i(26),o=i(193),s=i(55),l=i(276),u=i(409),d=i(210),c=i(0),f={name:"CPUStylingPipelineStage",process:function(e,t,i){var f=e.model,h=e.shaderBuilder;h.addVertexLines([n.a]),h.addFragmentLines([a.a]),h.addDefine("USE_CPU_STYLING",void 0,s.a.BOTH),Object(c.default)(f.color)||(h.addUniform("float",u.a.COLOR_BLEND_UNIFORM_NAME,s.a.FRAGMENT),e.uniformMap[u.a.COLOR_BLEND_UNIFORM_NAME]=function(){return o.default.getColorBlend(f.colorBlendMode,f.colorBlendAmount)});var p=e.alphaOptions.pass===r.default.TRANSLUCENT;h.addUniform("bool","model_commandTranslucent",s.a.BOTH),e.uniformMap.model_commandTranslucent=function(){return p};var m=f.featureTables[f.featureTableId],_=l.a.getStyleCommandsNeeded(m.featuresLength,m.batchTexture.translucentFeaturesLength);_!==l.a.ALL_OPAQUE&&(e.alphaOptions.alphaMode=d.a.BLEND),e.styleCommandsNeeded=_}};t.a=f},function(e,t,i){"use strict";t.a="void filterByPassType(inout vec3 positionMC, vec4 featureColor)\n{\n bool styleTranslucent = (featureColor.a != 1.0);\n // Only render translucent features in the translucent pass (if the style or the original command has translucency).\n if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)\n {\n positionMC *= 0.0;\n }\n // If the current pass is not the transluceny pass and the style is not translucent, don't rendeer the feature.\n else if (czm_pass != czm_passTranslucent && styleTranslucent)\n {\n positionMC *= 0.0;\n }\n}\n\nvoid cpuStylingStage(inout vec3 positionMC, inout Feature feature)\n{\n float show = ceil(feature.color.a);\n positionMC *= show;\n\n filterByPassType(positionMC, feature.color);\n}"},function(e,t,i){"use strict";t.a="void filterByPassType(vec4 featureColor)\n{\n bool styleTranslucent = (featureColor.a != 1.0);\n // Only render translucent features in the translucent pass (if the style or the original command has translucency).\n if (czm_pass == czm_passTranslucent && !styleTranslucent && !model_commandTranslucent)\n {\n discard;\n }\n // If the current pass is not the translucent pass and the style is not translucent, don't render the feature.\n else if (czm_pass != czm_passTranslucent && styleTranslucent)\n {\n discard;\n }\n}\n\nvoid cpuStylingStage(inout czm_modelMaterial material, Feature feature)\n{\n vec4 featureColor = feature.color;\n\n if (featureColor.a == 0.0)\n {\n discard;\n }\n\n // If a feature ID vertex attribute is used, the pass type filter is applied in the vertex shader.\n // So, we only apply in in the fragment shader if the feature ID texture is used.\n #ifdef FEATURE_ID_TEXTURE\n filterByPassType(featureColor);\n #endif\n\n featureColor = czm_gammaCorrect(featureColor);\n\n float highlight = ceil(model_colorBlend);\n material.diffuse *= mix(featureColor.rgb, vec3(1.0), highlight);\n material.alpha *= featureColor.a;\n}\n"},function(e,t,i){"use strict";var n=i(0),a=i(16),r=i(55),o=i(141),s={};function l(e,t){var i=e.shaderBuilder,n=e.uniformMap,a=t.variableName,o=t.attribute.quantization;if(o.octEncoded){var s="model_normalizationRange_"+a;i.addUniform("float",s,r.a.VERTEX),n[s]=function(){return o.normalizationRange}}else{var l="model_quantizedVolumeOffset_"+a,d="model_quantizedVolumeStepSize_"+a,c=t.glslType;i.addUniform(c,l,r.a.VERTEX),i.addUniform(c,d,r.a.VERTEX);var f=o.quantizedVolumeOffset,h=o.quantizedVolumeStepSize;/^color_\d+$/.test(a)&&(f=u(f,0),h=u(h,1)),n[l]=function(){return f},n[d]=function(){return h}}}function u(e,t){return e instanceof a.a?e:new a.a(e.x,e.y,e.z,t)}function d(e,t){var i,n=t.variableName,a=t.attribute.quantization;i=a.octEncoded?function(e,t){var i="attributes."+e,n="a_quantized_"+e,a="model_normalizationRange_"+e,r=t.octEncodedZXY?".zxy":".xyz";return i+" = czm_octDecode("+n+", "+a+")"+r+";"}(n,a):function(e){return"attributes."+e+" = model_quantizedVolumeOffset_"+e+" + a_quantized_"+e+" * model_quantizedVolumeStepSize_"+e+";"}(n),e.addFunctionLines(s.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,[i])}s.name="DequantizationPipelineStage",s.FUNCTION_ID_DEQUANTIZATION_STAGE_VS="dequantizationStage",s.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS="void dequantizationStage(inout ProcessedAttributes attributes)",s.process=function(e,t){var i=e.shaderBuilder;i.addFunction(s.FUNCTION_ID_DEQUANTIZATION_STAGE_VS,s.FUNCTION_SIGNATURE_DEQUANTIZATION_STAGE_VS,r.a.VERTEX),i.addDefine("USE_DEQUANTIZATION",void 0,r.a.VERTEX);for(var a=t.attributes,u=0;u<a.length;u++){var c=a[u],f=c.quantization;if(Object(n.default)(f)){var h=o.a.getAttributeInfo(c);d(i,h),l(e,h)}}},t.a=s},function(e,t,i){"use strict";var n=i(0),a=i(35),r=i(150),o=i(178),s=i(926),l=i(927),u=i(410),d=i(55),c=i(141),f={};function h(e,t,i){var a=e.shaderBuilder,s=c.a.getAttributeInfo(t);!function(e,t,i){var a,s,l=t.quantization;Object(n.default)(l)?(a=l.type,s=l.componentDatatype):(a=t.type,s=t.componentDatatype);var u=t.semantic,d=t.setIndex;u===o.a.FEATURE_ID&&d>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=d+1);var c={index:i,value:Object(n.default)(t.buffer)?void 0:t.constant,vertexBuffer:t.buffer,componentsPerAttribute:r.a.getNumberOfComponents(a),componentDatatype:s,offsetInBytes:t.byteOffset,strideInBytes:t.byteStride,normalize:t.normalized};e.attributes.push(c)}(e,t,i),function(e,t){var i,n,a=t.attribute.semantic,r=t.variableName;t.isQuantized?(i="a_quantized_"+r,n=t.quantizedGlslType):(i="a_"+r,n=t.glslType);a===o.a.POSITION?e.setPositionAttribute(n,i):e.addAttribute(n,i)}(a,s),function(e,t){var i,n=t.variableName,a="v_"+n;"normalMC"===n?(a="v_normalEC",i=t.glslType):"tangentMC"===n?(i="vec3",a="v_tangentEC"):i=t.glslType;e.addVarying(i,a)}(a,s),Object(n.default)(t.semantic)&&function(e,t){var i=t.semantic,n=t.setIndex;switch(i){case o.a.NORMAL:e.addDefine("HAS_NORMALS");break;case o.a.TANGENT:e.addDefine("HAS_TANGENTS");break;case o.a.FEATURE_ID:case o.a.TEXCOORD:case o.a.COLOR:e.addDefine("HAS_"+i+"_"+n)}}(a,t),function(e,t){var i=f.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,n=f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,a=t.variableName;"tangentMC"===a?(e.addStructField(i,"vec3","tangentMC"),e.addStructField(n,"vec3","tangentEC")):"normalMC"===a?(e.addStructField(i,"vec3","normalMC"),e.addStructField(n,"vec3","normalEC")):(e.addStructField(i,t.glslType,a),e.addStructField(n,t.glslType,a))}(a,s),function(e,t){if(t.isQuantized)return;var i,n=f.FUNCTION_ID_INITIALIZE_ATTRIBUTES,a=t.variableName;i="tangentMC"===a?"attributes.tangentMC = a_tangentMC.xyz;":"attributes."+a+" = a_"+a+";";e.addFunctionLines(n,[i])}(a,s),function(e,t){var i=t.attribute.semantic,a=t.attribute.setIndex;if(Object(n.default)(i)&&!Object(n.default)(a))return;var r=f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,o=t.variableName,s="v_"+o+" = attributes."+o+";";e.addFunctionLines(r,[s]),r=f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,s="attributes."+o+" = v_"+o+";",e.addFunctionLines(r,[s])}(a,s)}f.name="GeometryPipelineStage",f.STRUCT_ID_PROCESSED_ATTRIBUTES_VS="ProcessedAttributesVS",f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS="ProcessedAttributesFS",f.STRUCT_NAME_PROCESSED_ATTRIBUTES="ProcessedAttributes",f.FUNCTION_ID_INITIALIZE_ATTRIBUTES="initializeAttributes",f.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES="void initializeAttributes(out ProcessedAttributes attributes)",f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS="setDynamicVaryingsVS",f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS="setDynamicVaryingsFS",f.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS="void setDynamicVaryings(inout ProcessedAttributes attributes)",f.process=function(e,t){var i,n=e.shaderBuilder;n.addStruct(f.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"ProcessedAttributes",d.a.VERTEX),n.addStruct(f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"ProcessedAttributes",d.a.FRAGMENT),n.addStruct(u.a.STRUCT_ID_FEATURE,u.a.STRUCT_NAME_FEATURE,d.a.BOTH),n.addFunction(f.FUNCTION_ID_INITIALIZE_ATTRIBUTES,f.FUNCTION_SIGNATURE_INITIALIZE_ATTRIBUTES,d.a.VERTEX),n.addVarying("vec3","v_positionWC"),n.addVarying("vec3","v_positionEC"),n.addStructField(f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionWC"),n.addStructField(f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","positionEC"),n.addFunction(f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_VS,f.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,d.a.VERTEX),n.addFunction(f.FUNCTION_ID_SET_DYNAMIC_VARYINGS_FS,f.FUNCTION_SIGNATURE_SET_DYNAMIC_VARYINGS,d.a.FRAGMENT);for(var r=0;r<t.attributes.length;r++){var c=t.attributes[r];i=c.semantic===o.a.POSITION?0:e.attributeIndex++,h(e,c,i)}!function(e,t){for(var i=!1,n=!1,a=0;a<t.length;a++){var r=t[a];r.semantic===o.a.NORMAL?i=!0:r.semantic===o.a.TANGENT&&(n=!0)}if(!i||!n)return;e.addDefine("HAS_BITANGENTS"),e.addFunctionLines(f.FUNCTION_ID_INITIALIZE_ATTRIBUTES,["attributes.bitangentMC = normalize(cross(a_normalMC, a_tangentMC.xyz) * a_tangentMC.w);"]),e.addVarying("vec3","v_bitangentEC"),e.addStructField(f.STRUCT_ID_PROCESSED_ATTRIBUTES_VS,"vec3","bitangentMC"),e.addStructField(f.STRUCT_ID_PROCESSED_ATTRIBUTES_FS,"vec3","bitangentEC")}(n,t.attributes),t.primitiveType===a.default.POINTS&&n.addDefine("PRIMITIVE_TYPE_POINTS"),n.addVertexLines([l.a]),n.addFragmentLines([s.a])},t.a=f},function(e,t,i){"use strict";t.a="void geometryStage(out ProcessedAttributes attributes)\n{\n attributes.positionMC = v_positionMC;\n attributes.positionEC = v_positionEC;\n\n #ifdef COMPUTE_POSITION_WC\n attributes.positionWC = v_positionWC;\n #endif\n\n #ifdef HAS_NORMALS\n // renormalize after interpolation\n attributes.normalEC = normalize(v_normalEC);\n #endif\n\n #ifdef HAS_TANGENTS\n attributes.tangentEC = normalize(v_tangentEC);\n #endif\n\n #ifdef HAS_BITANGENTS\n attributes.bitangentEC = normalize(v_bitangentEC);\n #endif\n\n // Everything else is dynamically generated in GeometryPipelineStage\n setDynamicVaryings(attributes);\n}\n"},function(e,t,i){"use strict";t.a="void geometryStage(inout ProcessedAttributes attributes) \n{\n // Compute positions in different coordinate systems\n vec3 positionMC = attributes.positionMC;\n v_positionMC = positionMC;\n v_positionEC = (czm_modelView * vec4(positionMC, 1.0)).xyz;\n gl_Position = czm_modelViewProjection * vec4(positionMC, 1.0);\n\n // Sometimes the fragment shader needs this (e.g. custom shaders)\n #ifdef COMPUTE_POSITION_WC\n // Note that this is a 32-bit position which may result in jitter on small\n // scales.\n v_positionWC = (czm_model * vec4(positionMC, 1.0)).xyz;\n #endif\n\n #ifdef HAS_NORMALS\n v_normalEC = czm_normal * attributes.normalMC;\n #endif\n\n #ifdef HAS_TANGENTS\n v_tangentEC = normalize(czm_normal * attributes.tangentMC); \n #endif\n\n #ifdef HAS_BITANGENTS\n v_bitangentEC = normalize(czm_normal * attributes.bitangentMC);\n #endif\n\n // All other varyings need to be dynamically generated in\n // GeometryPipelineStage\n setDynamicVaryings(attributes);\n}\n"},function(e,t,i){"use strict";var n=i(0),a=i(2),r=i(55),o=i(210),s=i(337),l=i(929),u=i(26),d=i(12),c=i(1),f=i(16),h=i(162),p=h.a.Material,m=h.a.MetallicRoughness,_=h.a.SpecularGlossiness,g={};function v(e,t,i,n,a){var o="HAS_"+a+"_TEXTURE_TRANSFORM";e.addDefine(o,void 0,r.a.FRAGMENT);var s=n+"Transform";e.addUniform("mat3",s,r.a.FRAGMENT),t[s]=function(){return i.transform}}function y(e,t,i,o,s,l){e.addUniform("sampler2D",o,r.a.FRAGMENT),t[o]=function(){return Object(a.default)(i.texture,l)};var u="HAS_"+s+"_TEXTURE";e.addDefine(u,void 0,r.a.FRAGMENT);var c="v_texCoord_"+i.texCoord,f="TEXCOORD_"+s;e.addDefine(f,c,r.a.FRAGMENT);var h=i.transform;Object(n.default)(h)&&!d.default.equals(h,d.default.IDENTITY)&&v(e,t,i,o,s)}g.name="MaterialPipelineStage",g.process=function(e,t,i){var a=t.material,d=e.uniformMap,h=e.shaderBuilder,g=i.context.defaultTexture;!function(e,t,i,a,o,s){var l=e.emissiveTexture;Object(n.default)(l)&&y(i,t,l,"u_emissiveTexture","EMISSIVE",s);var u=e.emissiveFactor;Object(n.default)(u)&&!c.default.equals(u,p.DEFAULT_EMISSIVE_FACTOR)&&(i.addUniform("vec3","u_emissiveFactor",r.a.FRAGMENT),t.u_emissiveFactor=function(){return e.emissiveFactor},i.addDefine("HAS_EMISSIVE_FACTOR",void 0,r.a.FRAGMENT));var d=e.normalTexture;Object(n.default)(d)&&y(i,t,d,"u_normalTexture","NORMAL",o);var f=e.occlusionTexture;Object(n.default)(f)&&y(i,t,f,"u_occlusionTexture","OCCLUSION",a)}(a,d,h,g,i.context.defaultNormalTexture,i.context.defaultEmissiveTexture),Object(n.default)(a.specularGlossiness)?function(e,t,i,a){var o=e.specularGlossiness;i.addDefine("USE_SPECULAR_GLOSSINESS",void 0,r.a.FRAGMENT);var s=o.diffuseTexture;Object(n.default)(s)&&y(i,t,s,"u_diffuseTexture","DIFFUSE",a);var l=o.diffuseFactor;Object(n.default)(l)&&!f.a.equals(l,_.DEFAULT_DIFFUSE_FACTOR)&&(i.addUniform("vec4","u_diffuseFactor",r.a.FRAGMENT),t.u_diffuseFactor=function(){return o.diffuseFactor},i.addDefine("HAS_DIFFUSE_FACTOR",void 0,r.a.FRAGMENT));var u=o.specularGlossinessTexture;Object(n.default)(u)&&y(i,t,u,"u_specularGlossinessTexture","SPECULAR_GLOSSINESS",a);var d=o.specularFactor;Object(n.default)(d)&&!c.default.equals(d,_.DEFAULT_SPECULAR_FACTOR)&&(i.addUniform("vec3","u_specularFactor",r.a.FRAGMENT),t.u_specularFactor=function(){return o.specularFactor},i.addDefine("HAS_SPECULAR_FACTOR",void 0,r.a.FRAGMENT));var h=o.glossinessFactor;Object(n.default)(h)&&h!==_.DEFAULT_GLOSSINESS_FACTOR&&(i.addUniform("float","u_glossinessFactor",r.a.FRAGMENT),t.u_glossinessFactor=function(){return o.glossinessFactor},i.addDefine("HAS_GLOSSINESS_FACTOR",void 0,r.a.FRAGMENT))}(a,d,h,g):function(e,t,i,a){var o=e.metallicRoughness;i.addDefine("USE_METALLIC_ROUGHNESS",void 0,r.a.FRAGMENT);var s=o.baseColorTexture;Object(n.default)(s)&&y(i,t,s,"u_baseColorTexture","BASE_COLOR",a);var l=o.baseColorFactor;Object(n.default)(l)&&!f.a.equals(l,m.DEFAULT_BASE_COLOR_FACTOR)&&(i.addUniform("vec4","u_baseColorFactor",r.a.FRAGMENT),t.u_baseColorFactor=function(){return o.baseColorFactor},i.addDefine("HAS_BASE_COLOR_FACTOR",void 0,r.a.FRAGMENT));var u=o.metallicRoughnessTexture;Object(n.default)(u)&&y(i,t,u,"u_metallicRoughnessTexture","METALLIC_ROUGHNESS",a);var d=o.metallicFactor;Object(n.default)(d)&&d!==m.DEFAULT_METALLIC_FACTOR&&(i.addUniform("float","u_metallicFactor",r.a.FRAGMENT),t.u_metallicFactor=function(){return o.metallicFactor},i.addDefine("HAS_METALLIC_FACTOR",void 0,r.a.FRAGMENT));var c=o.roughnessFactor;Object(n.default)(c)&&c!==m.DEFAULT_ROUGHNESS_FACTOR&&(i.addUniform("float","u_roughnessFactor",r.a.FRAGMENT),t.u_roughnessFactor=function(){return o.roughnessFactor},i.addDefine("HAS_ROUGHNESS_FACTOR",void 0,r.a.FRAGMENT))}(a,d,h,g);var v=e.lightingOptions;a.unlit?v.lightingModel=s.a.UNLIT:v.lightingModel=s.a.PBR;var b=!a.doubleSided;e.renderStateOptions.cull={enabled:b};var w=e.alphaOptions;Object(n.default)(w.alphaMode)||(w.alphaMode=a.alphaMode,a.alphaMode===o.a.BLEND?w.pass=u.default.TRANSLUCENT:a.alphaMode===o.a.MASK&&(w.alphaCutoff=a.alphaCutoff)),h.addFragmentLines([l.a])},g._processTexture=y,g._processTextureTransform=v,t.a=g},function(e,t,i){"use strict";t.a="// If the style color is white, it implies the feature has not been styled.\nbool isDefaultStyleColor(vec3 color)\n{\n return all(greaterThan(color, vec3(1.0 - czm_epsilon3)));\n}\n\nvec3 blend(vec3 sourceColor, vec3 styleColor, float styleColorBlend)\n{\n vec3 blendColor = mix(sourceColor, styleColor, styleColorBlend);\n vec3 color = isDefaultStyleColor(styleColor.rgb) ? sourceColor : blendColor;\n return color;\n}\n\nvec3 SRGBtoLINEAR3(vec3 srgbIn) \n{\n return pow(srgbIn, vec3(2.2));\n}\n\nvec4 SRGBtoLINEAR4(vec4 srgbIn) \n{\n vec3 linearOut = pow(srgbIn.rgb, vec3(2.2));\n return vec4(linearOut, srgbIn.a);\n}\n\nvec2 computeTextureTransform(vec2 texCoord, mat3 textureTransform)\n{\n return vec2(textureTransform * vec3(texCoord, 1.0));\n}\n\n#ifdef HAS_NORMALS\nvec3 computeNormal(ProcessedAttributes attributes)\n{\n // Geometry normal. This is already normalized \n vec3 ng = attributes.normalEC;\n\n vec3 normal = ng;\n #ifdef HAS_NORMAL_TEXTURE\n vec2 normalTexCoords = TEXCOORD_NORMAL;\n #ifdef HAS_NORMAL_TEXTURE_TRANSFORM\n normalTexCoords = computeTextureTransform(normalTexCoords, u_normalTextureTransform);\n #endif\n\n // If HAS_BITANGENTS is set, then HAS_TANGENTS is also set\n #ifdef HAS_BITANGENTS\n vec3 t = attributes.tangentEC;\n vec3 b = attributes.bitangentEC;\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, normalTexCoords).rgb;\n normal = normalize(tbn * (2.0 * n - 1.0));\n #elif defined(GL_OES_standard_derivatives)\n // Compute tangents\n vec3 positionEC = attributes.positionEC;\n vec3 pos_dx = dFdx(positionEC);\n vec3 pos_dy = dFdy(positionEC);\n vec3 tex_dx = dFdx(vec3(normalTexCoords,0.0));\n vec3 tex_dy = dFdy(vec3(normalTexCoords,0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n vec3 n = texture2D(u_normalTexture, normalTexCoords).rgb;\n normal = normalize(tbn * (2.0 * n - 1.0));\n #endif\n #endif\n\n return normal;\n}\n#endif\n\nvoid materialStage(inout czm_modelMaterial material, ProcessedAttributes attributes, Feature feature)\n{\n\n #ifdef HAS_NORMALS\n material.normalEC = computeNormal(attributes);\n #endif\n\n vec4 baseColorWithAlpha = vec4(1.0);\n // Regardless of whether we use PBR, set a base color\n #ifdef HAS_BASE_COLOR_TEXTURE\n vec2 baseColorTexCoords = TEXCOORD_BASE_COLOR;\n\n #ifdef HAS_BASE_COLOR_TEXTURE_TRANSFORM\n baseColorTexCoords = computeTextureTransform(baseColorTexCoords, u_baseColorTextureTransform);\n #endif\n\n baseColorWithAlpha = SRGBtoLINEAR4(texture2D(u_baseColorTexture, baseColorTexCoords));\n\n #ifdef HAS_BASE_COLOR_FACTOR\n baseColorWithAlpha *= u_baseColorFactor;\n #endif\n #elif defined(HAS_BASE_COLOR_FACTOR)\n baseColorWithAlpha = u_baseColorFactor;\n #endif\n\n #ifdef HAS_COLOR_0\n baseColorWithAlpha *= attributes.color_0;\n #endif\n\n material.diffuse = baseColorWithAlpha.rgb;\n material.alpha = baseColorWithAlpha.a;\n\n #ifdef USE_CPU_STYLING\n material.diffuse = blend(material.diffuse, feature.color.rgb, model_colorBlend);\n #endif\n\n #ifdef HAS_OCCLUSION_TEXTURE\n vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;\n #ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM\n occlusionTexCoords = computeTextureTransform(occlusionTexCoords, u_occlusionTextureTransform);\n #endif\n material.occlusion = texture2D(u_occlusionTexture, occlusionTexCoords).r;\n #endif\n\n #ifdef HAS_EMISSIVE_TEXTURE\n vec2 emissiveTexCoords = TEXCOORD_EMISSIVE;\n #ifdef HAS_EMISSIVE_TEXTURE_TRANSFORM\n emissiveTexCoords = computeTextureTransform(emissiveTexCoords, u_emissiveTextureTransform);\n #endif\n\n vec3 emissive = SRGBtoLINEAR3(texture2D(u_emissiveTexture, emissiveTexCoords).rgb);\n #ifdef HAS_EMISSIVE_FACTOR\n emissive *= u_emissiveFactor;\n #endif\n material.emissive = emissive;\n #elif defined(HAS_EMISSIVE_FACTOR)\n material.emissive = u_emissiveFactor;\n #endif\n\n #if defined(LIGHTING_PBR) && defined(USE_SPECULAR_GLOSSINESS)\n #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE\n vec2 specularGlossinessTexCoords = TEXCOORD_SPECULAR_GLOSSINESS;\n #ifdef HAS_SPECULAR_GLOSSINESS_TEXTURE_TRANSFORM\n specularGlossinessTexCoords = computeTextureTransform(specularGlossinessTexCoords, u_specularGlossinessTextureTransform);\n #endif\n\n vec4 specularGlossiness = SRGBtoLINEAR4(texture2D(u_specularGlossinessTexture, specularGlossinessTexCoords));\n vec3 specular = specularGlossiness.rgb;\n float glossiness = specularGlossiness.a;\n #ifdef HAS_SPECULAR_FACTOR\n specular *= u_specularFactor;\n #endif\n\n #ifdef HAS_GLOSSINESS_FACTOR\n glossiness *= u_glossinessFactor;\n #endif\n #else\n #ifdef HAS_SPECULAR_FACTOR\n vec3 specular = clamp(u_specularFactor, vec3(0.0), vec3(1.0));\n #else\n vec3 specular = vec3(1.0);\n #endif\n\n #ifdef HAS_GLOSSINESS_FACTOR\n float glossiness = clamp(u_glossinessFactor, 0.0, 1.0);\n #else\n float glossiness = 1.0;\n #endif\n #endif\n\n #ifdef HAS_DIFFUSE_TEXTURE\n vec2 diffuseTexCoords = TEXCOORD_DIFFUSE;\n #ifdef HAS_DIFFUSE_TEXTURE_TRANSFORM\n diffuseTexCoords = computeTextureTransform(diffuseTexCoords, u_diffuseTextureTransform);\n #endif\n\n vec4 diffuse = SRGBtoLINEAR4(texture2D(u_diffuseTexture, diffuseTexCoords));\n #ifdef HAS_DIFFUSE_FACTOR\n diffuse *= u_diffuseFactor;\n #endif\n #elif defined(HAS_DIFFUSE_FACTOR)\n vec4 diffuse = clamp(u_diffuseFactor, vec4(0.0), vec4(1.0));\n #else\n vec4 diffuse = vec4(1.0);\n #endif\n czm_pbrParameters parameters = czm_pbrSpecularGlossinessMaterial(\n diffuse.rgb,\n specular,\n glossiness\n );\n material.diffuse = parameters.diffuseColor;\n // the specular glossiness extension's alpha overrides anything set\n // by the base material.\n material.alpha = diffuse.a;\n material.specular = parameters.f0;\n material.roughness = parameters.roughness;\n #elif defined(LIGHTING_PBR)\n #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE\n vec2 metallicRoughnessTexCoords = TEXCOORD_METALLIC_ROUGHNESS;\n #ifdef HAS_METALLIC_ROUGHNESS_TEXTURE_TRANSFORM\n metallicRoughnessTexCoords = computeTextureTransform(metallicRoughnessTexCoords, u_metallicRoughnessTextureTransform);\n #endif\n\n vec3 metallicRoughness = texture2D(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;\n float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n float roughness = clamp(metallicRoughness.g, 0.04, 1.0);\n #ifdef HAS_METALLIC_FACTOR\n metalness *= u_metallicFactor;\n #endif\n\n #ifdef HAS_ROUGHNESS_FACTOR\n roughness *= u_roughnessFactor;\n #endif\n #else\n #ifdef HAS_METALLIC_FACTOR\n float metalness = clamp(u_metallicFactor, 0.0, 1.0);\n #else\n float metalness = 1.0;\n #endif\n\n #ifdef HAS_ROUGHNESS_FACTOR\n float roughness = clamp(u_roughnessFactor, 0.04, 1.0);\n #else\n float roughness = 1.0;\n #endif\n #endif\n czm_pbrParameters parameters = czm_pbrMetallicRoughnessMaterial(\n material.diffuse,\n metalness,\n roughness\n );\n material.diffuse = parameters.diffuseColor;\n material.specular = parameters.f0;\n material.roughness = parameters.roughness;\n #endif\n}\n"},function(e,t,i){"use strict";var n=i(57),a=i(36),r=i(7),o=i(60),s=i(11),l=i(2),u=i(0),d=i(55),c={};function f(e,t){var i,n=e.model,a={model:n,node:e.runtimeNode,primitive:e.runtimePrimitive},r=n.content;return i=Object(u.default)(r)?{content:r,primitive:r.tileset,detail:a}:{primitive:n,detail:a},Object(u.default)(t)&&(i.instanceId=t),i}c.name="PickingPipelineStage",c.process=function(e,t,i){var c=i.context,h=e.runtimeNode,p=e.shaderBuilder,m=e.model,_=h.node.instances;if(e.hasFeatureIds)!function(e,t,i){var n,a,r=e.model,s=r.featureIdAttributeIndex;if(Object(u.default)(r.featureTableId))n=r.featureTableId;else if(Object(u.default)(i))a=i.featureIdAttributes[s],n=a.propertyTableId;else if(t.featureIdTextures.length>0){var c=r.featureIdTextureIndex,f=t.featureIdTextures[c];n=f.propertyTableId}else a=t.featureIdAttributes[s],n=a.propertyTableId;var h=r.featureTables[n];e.shaderBuilder.addUniform("sampler2D","model_pickTexture",d.a.FRAGMENT);var p=h.batchTexture,m={model_pickTexture:function(){return Object(l.default)(p.pickTexture,p.defaultTexture)}};e.uniformMap=Object(o.default)(m,e.uniformMap),e.pickId="((feature.id < int(model_featuresLength)) ? texture2D(model_pickTexture, feature.st) : vec4(0.0))"}(e,t,_);else if(Object(u.default)(_))!function(e,t,i){for(var o=e.instanceCount,l=new Array(o),u=new Uint8Array(4*o),c=e.model._resources,h=0;h<o;h++){var p=f(e,h),m=i.createPickId(p);c.push(m),l[h]=m;var _=m.color;u[4*h+0]=r.default.floatToByte(_.red),u[4*h+1]=r.default.floatToByte(_.green),u[4*h+2]=r.default.floatToByte(_.blue),u[4*h+3]=r.default.floatToByte(_.alpha)}var g=n.default.createVertexBuffer({context:i,typedArray:u,usage:a.default.STATIC_DRAW});g.vertexArrayDestroyable=!1,c.push(g);var v={index:e.attributeIndex++,vertexBuffer:g,componentsPerAttribute:4,componentDatatype:s.default.UNSIGNED_BYTE,normalize:!0,offsetInBytes:0,strideInBytes:0,instanceDivisor:1};e.attributes.push(v);var y=e.shaderBuilder;y.addDefine("USE_PICKING",void 0,d.a.BOTH),y.addAttribute("vec4","a_pickColor"),y.addVarying("vec4","v_pickColor"),e.pickId="v_pickColor"}(e,0,c);else{var g=f(e),v=c.createPickId(g);m._resources.push(v),p.addUniform("vec4","czm_pickColor",d.a.FRAGMENT),e.uniformMap.czm_pickColor=function(){return v.color},e.pickId="czm_pickColor"}},t.a=c},function(e,t,i){"use strict";i.d(t,"a",(function(){return s}));var n=i(4),a=i(2),r=i(0),o=i(932);function s(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.typeOf.object("options.node",e.node),n.a.typeOf.object("options.modelMatrix",e.modelMatrix),this.node=e.node,this.modelMatrix=e.modelMatrix,this.pipelineStages=[],this.runtimePrimitives=[],function(e){var t=e.node,i=e.pipelineStages;Object(r.default)(t.instances)&&i.push(o.a)}(this)}},function(e,t,i){"use strict";var n=i(1),a=i(11),r=i(0),o=i(6),s=i(150),l=i(27),u=i(57),d=i(36),c=i(221),f=i(141),h=i(933),p={name:"InstancingPipelineStage"};p.process=function(e,t,i){var n=t.instances,o=n.attributes[0].count,l=[],p=e.shaderBuilder;p.addDefine("HAS_INSTANCING"),p.addVertexLines([h.a]);var m,_,g=f.a.getAttributeBySemantic(n,c.a.TRANSLATION);Object(r.default)(g)&&(m=g.max,_=g.min);var v=f.a.getAttributeBySemantic(n,c.a.ROTATION);if(!Object(r.default)(v)&&Object(r.default)(m)&&Object(r.default)(_)){Object(r.default)(g)&&(l.push({index:e.attributeIndex++,vertexBuffer:g.buffer,componentsPerAttribute:s.a.getNumberOfComponents(g.type),componentDatatype:g.componentDatatype,normalize:!1,offsetInBytes:g.byteOffset,strideInBytes:g.byteStride,instanceDivisor:1}),e.instancingTranslationMax=m,e.instancingTranslationMin=_,p.addDefine("HAS_INSTANCE_TRANSLATION"),p.addAttribute("vec3","a_instanceTranslation"));var b=f.a.getAttributeBySemantic(n,c.a.SCALE);Object(r.default)(b)&&(l.push({index:e.attributeIndex++,vertexBuffer:b.buffer,componentsPerAttribute:s.a.getNumberOfComponents(b.type),componentDatatype:b.componentDatatype,normalize:!1,offsetInBytes:b.byteOffset,strideInBytes:b.byteStride,instanceDivisor:1}),p.addDefine("HAS_INSTANCE_SCALE"),p.addAttribute("vec3","a_instanceScale"))}else l=function(e,t,i,n){var r=y(e.instances,t,i),o=u.default.createVertexBuffer({context:n.context,typedArray:r,usage:d.default.STATIC_DRAW});o.vertexArrayDestroyable=!1,i.model._resources.push(o);var s=a.default.getSizeInBytes(a.default.FLOAT),l=[{index:i.attributeIndex++,vertexBuffer:o,componentsPerAttribute:4,componentDatatype:a.default.FLOAT,normalize:!1,offsetInBytes:0,strideInBytes:12*s,instanceDivisor:1},{index:i.attributeIndex++,vertexBuffer:o,componentsPerAttribute:4,componentDatatype:a.default.FLOAT,normalize:!1,offsetInBytes:4*s,strideInBytes:12*s,instanceDivisor:1},{index:i.attributeIndex++,vertexBuffer:o,componentsPerAttribute:4,componentDatatype:a.default.FLOAT,normalize:!1,offsetInBytes:8*s,strideInBytes:12*s,instanceDivisor:1}],c=i.shaderBuilder;return c.addDefine("HAS_INSTANCE_MATRICES"),c.addAttribute("vec4","a_instancingTransformRow0"),c.addAttribute("vec4","a_instancingTransformRow1"),c.addAttribute("vec4","a_instancingTransformRow2"),l}(t,o,e,i);!function(e,t,i,n){for(var a=i.attributes,r=e.model,o=e.shaderBuilder,l=0;l<a.length;l++){var f=a[l];if(f.semantic===c.a.FEATURE_ID){f.setIndex>=e.featureIdVertexAttributeSetIndex&&(e.featureIdVertexAttributeSetIndex=f.setIndex+1);var h=u.default.createVertexBuffer({context:t.context,typedArray:f.packedTypedArray,usage:d.default.STATIC_DRAW});h.vertexArrayDestroyable=!1,r._resources.push(h),n.push({index:e.attributeIndex++,vertexBuffer:h,componentsPerAttribute:s.a.getNumberOfComponents(f.type),componentDatatype:f.componentDatatype,normalize:!1,offsetInBytes:f.byteOffset,strideInBytes:f.byteStride,instanceDivisor:1}),o.addAttribute("float","a_instanceFeatureId_"+f.setIndex)}}}(e,i,n,l),e.instanceCount=o,e.attributes.push.apply(e.attributes,l)};var m=new n.default,_=new l.default,g=new n.default,v=new o.default;function y(e,t,i){var a,s=new Float32Array(12*t),u=f.a.getAttributeBySemantic(e,c.a.TRANSLATION),d=f.a.getAttributeBySemantic(e,c.a.ROTATION),h=f.a.getAttributeBySemantic(e,c.a.SCALE),p=new n.default(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),y=new n.default(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),b=Object(r.default)(u),w=Object(r.default)(d),O=Object(r.default)(h),x=b?u.packedTypedArray:new Float32Array(3*t),A=w?d.packedTypedArray:new Float32Array(4*t);O?a=h.packedTypedArray:(a=new Float32Array(3*t)).fill(1);for(var T=0;T<t;T++){var E=new n.default(x[3*T],x[3*T+1],x[3*T+2],m);n.default.maximumByComponent(p,E,p),n.default.minimumByComponent(y,E,y);var C=new l.default(A[4*T],A[4*T+1],A[4*T+2],w?A[4*T+3]:1,_),S=new n.default(a[3*T],a[3*T+1],a[3*T+2],g),M=o.default.fromTranslationQuaternionRotationScale(E,C,S,v),D=12*T;s[D+0]=M[0],s[D+1]=M[4],s[D+2]=M[8],s[D+3]=M[12],s[D+4]=M[1],s[D+5]=M[5],s[D+6]=M[9],s[D+7]=M[13],s[D+8]=M[2],s[D+9]=M[6],s[D+10]=M[10],s[D+11]=M[14],i.instancingTranslationMax=p,i.instancingTranslationMin=y}return s}p._getInstanceTransformsTypedArray=y,t.a=p},function(e,t,i){"use strict";t.a="void instancingStage(inout vec3 positionMC) \n{\n mat4 instancingTransform;\n\n #ifdef HAS_INSTANCE_MATRICES\n instancingTransform = mat4(\n a_instancingTransformRow0.x, a_instancingTransformRow1.x, a_instancingTransformRow2.x, 0.0, // Column 1\n a_instancingTransformRow0.y, a_instancingTransformRow1.y, a_instancingTransformRow2.y, 0.0, // Column 2\n a_instancingTransformRow0.z, a_instancingTransformRow1.z, a_instancingTransformRow2.z, 0.0, // Column 3\n a_instancingTransformRow0.w, a_instancingTransformRow1.w, a_instancingTransformRow2.w, 1.0 // Column 4\n );\n #else\n vec3 translation = vec3(0.0, 0.0, 0.0);\n vec3 scale = vec3(1.0, 1.0, 1.0);\n \n #ifdef HAS_INSTANCE_TRANSLATION\n translation = a_instanceTranslation;\n #endif\n #ifdef HAS_INSTANCE_SCALE\n scale = a_instanceScale;\n #endif\n\n instancingTransform = mat4(\n scale.x, 0.0, 0.0, 0.0,\n 0.0, scale.y, 0.0, 0.0,\n 0.0, 0.0, scale.z, 0.0,\n translation.x, translation.y, translation.z, 1.0\n ); \n #endif\n\n positionMC = (instancingTransform * vec4(positionMC, 1.0)).xyz;\n}\n"},function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i(4),a=i(935),r=i(936);function o(e){n.a.typeOf.object("model",e),this.shaderBuilder=new r.a,this.model=e,this.uniformMap={},this.alphaOptions=new a.a}},function(e,t,i){"use strict";function n(){this.pass=void 0,this.alphaMode=void 0,this.alphaCutoff=void 0}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";i.d(t,"a",(function(){return h}));var n=i(4),a=i(50),r=i(0),o=i(2),s=i(3),l=i(55),u=i(67),d=i(34),c=i(937),f=i(938);function h(){this._positionAttributeLine=void 0,this._nextAttributeLocation=1,this._attributeLocations={},this._attributeLines=[],this._structs={},this._functions={},this._vertexShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]},this._fragmentShaderParts={defineLines:[],uniformLines:[],shaderLines:[],varyingLines:[],structIds:[],functionIds:[]}}Object.defineProperties(h.prototype,{attributeLocations:{get:function(){return this._attributeLocations}}}),h.prototype.addDefine=function(e,t,i){n.a.typeOf.string("identifier",e),i=Object(o.default)(i,l.a.BOTH);var a=e;Object(r.default)(t)&&(a+=" "+t.toString()),l.a.includesVertexShader(i)&&this._vertexShaderParts.defineLines.push(a),l.a.includesFragmentShader(i)&&this._fragmentShaderParts.defineLines.push(a)},h.prototype.addStruct=function(e,t,i){n.a.typeOf.string("structId",e),n.a.typeOf.string("structName",t),n.a.typeOf.number("destination",i),this._structs[e]=new c.a(t),l.a.includesVertexShader(i)&&this._vertexShaderParts.structIds.push(e),l.a.includesFragmentShader(i)&&this._fragmentShaderParts.structIds.push(e)},h.prototype.addStructField=function(e,t,i){n.a.typeOf.string("structId",e),n.a.typeOf.string("type",t),n.a.typeOf.string("identifier",i),this._structs[e].addField(t,i)},h.prototype.addFunction=function(e,t,i){n.a.typeOf.string("functionName",e),n.a.typeOf.string("signature",t),n.a.typeOf.number("destination",i),this._functions[e]=new f.a(t),l.a.includesVertexShader(i)&&this._vertexShaderParts.functionIds.push(e),l.a.includesFragmentShader(i)&&this._fragmentShaderParts.functionIds.push(e)},h.prototype.addFunctionLines=function(e,t){n.a.typeOf.string("functionName",e),n.a.typeOf.object("lines",t),this._functions[e].addLines(t)},h.prototype.addUniform=function(e,t,i){n.a.typeOf.string("type",e),n.a.typeOf.string("identifier",t),i=Object(o.default)(i,l.a.BOTH);var a="uniform "+e+" "+t+";";l.a.includesVertexShader(i)&&this._vertexShaderParts.uniformLines.push(a),l.a.includesFragmentShader(i)&&this._fragmentShaderParts.uniformLines.push(a)},h.prototype.setPositionAttribute=function(e,t){if(n.a.typeOf.string("type",e),n.a.typeOf.string("identifier",t),Object(r.default)(this._positionAttributeLine))throw new s.default("setPositionAttribute() must be called exactly once for the attribute used for gl_Position. For other attributes, use addAttribute()");return this._positionAttributeLine="attribute "+e+" "+t+";",this._attributeLocations[t]=0,0},h.prototype.addAttribute=function(e,t){n.a.typeOf.string("type",e),n.a.typeOf.string("identifier",t);var i="attribute "+e+" "+t+";";this._attributeLines.push(i);var a=this._nextAttributeLocation;return this._attributeLocations[t]=a,this._nextAttributeLocation++,a},h.prototype.addVarying=function(e,t){n.a.typeOf.string("type",e),n.a.typeOf.string("identifier",t);var i="varying "+e+" "+t+";";this._vertexShaderParts.varyingLines.push(i),this._fragmentShaderParts.varyingLines.push(i)},h.prototype.addVertexLines=function(e){n.a.typeOf.object("lines",e),Array.prototype.push.apply(this._vertexShaderParts.shaderLines,e)},h.prototype.addFragmentLines=function(e){n.a.typeOf.object("lines",e),Array.prototype.push.apply(this._fragmentShaderParts.shaderLines,e)},h.prototype.buildShaderProgram=function(e){n.a.typeOf.object("context",e);var t=Object(r.default)(this._positionAttributeLine)?[this._positionAttributeLine]:[],i=function(e){var t,i,n,a,r=[],o=[],s=e._vertexShaderParts.structIds;for(t=0;t<s.length;t++)i=s[t],n=e._structs[i],a=n.generateGlslLines(),r.push.apply(r,a);for(s=e._fragmentShaderParts.structIds,t=0;t<s.length;t++)i=s[t],n=e._structs[i],a=n.generateGlslLines(),o.push.apply(o,a);return{vertexLines:r,fragmentLines:o}}(this),a=function(e){var t,i,n,a,r=[],o=[],s=e._vertexShaderParts.functionIds;for(t=0;t<s.length;t++)i=s[t],n=e._functions[i],a=n.generateGlslLines(),r.push.apply(r,a);for(s=e._fragmentShaderParts.functionIds,t=0;t<s.length;t++)i=s[t],n=e._functions[i],a=n.generateGlslLines(),o.push.apply(o,a);return{vertexLines:r,fragmentLines:o}}(this),o=t.concat(this._attributeLines,this._vertexShaderParts.uniformLines,this._vertexShaderParts.varyingLines,i.vertexLines,a.vertexLines,this._vertexShaderParts.shaderLines).join("\n"),s=new d.default({defines:this._vertexShaderParts.defineLines,sources:[o]}),l=this._fragmentShaderParts.uniformLines.concat(this._fragmentShaderParts.varyingLines,i.fragmentLines,a.fragmentLines,this._fragmentShaderParts.shaderLines).join("\n"),c=new d.default({defines:this._fragmentShaderParts.defineLines,sources:[l]});return u.default.fromCache({context:e,vertexShaderSource:s,fragmentShaderSource:c,attributeLocations:this._attributeLocations})},h.prototype.clone=function(){return Object(a.default)(this,!0)}},function(e,t,i){"use strict";function n(e){this.name=e,this.fields=[]}i.d(t,"a",(function(){return n})),n.prototype.addField=function(e,t){var i=" "+e+" "+t+";";this.fields.push(i)},n.prototype.generateGlslLines=function(){var e=this.fields;return 0===e.length&&(e=[" float _empty;"]),[].concat("struct "+this.name,"{",e,"};")}},function(e,t,i){"use strict";function n(e){this.signature=e,this.body=[]}i.d(t,"a",(function(){return n})),n.prototype.addLines=function(e){var t=e.map((function(e){return" "+e}));Array.prototype.push.apply(this.body,t)},n.prototype.generateGlslLines=function(){return[].concat(this.signature,"{",this.body,"}")}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(4),a=i(50);function r(e,t){n.a.typeOf.object("modelRenderResources",e),n.a.typeOf.object("runtimeNode",t),this.model=e.model,this.shaderBuilder=e.shaderBuilder.clone(),this.uniformMap=Object(a.default)(e.uniformMap),this.alphaOptions=Object(a.default)(e.alphaOptions),this.runtimeNode=t,this.modelMatrix=t.modelMatrix,this.attributes=[],this.attributeIndex=1,this.featureIdVertexAttributeSetIndex=0,this.instanceCount=0,this.instancingTranslationMax=void 0,this.instancingTranslationMin=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var n=i(4),a=i(50),r=i(0),o=i(74),s=i(223),l=i(141),u=i(941);function d(e,t){n.a.typeOf.object("nodeRenderResources",e),n.a.typeOf.object("runtimePrimitive",t),this.model=e.model,this.runtimeNode=e.runtimeNode,this.attributes=e.attributes.slice(),this.attributeIndex=e.attributeIndex,this.featureIdVertexAttributeSetIndex=e.featureIdVertexAttributeSetIndex,this.hasFeatureIds=!1,this.uniformMap=Object(a.default)(e.uniformMap),this.alphaOptions=Object(a.default)(e.alphaOptions),this.modelMatrix=e.modelMatrix.clone(),this.shaderBuilder=e.shaderBuilder.clone(),this.instanceCount=e.instanceCount,this.runtimePrimitive=t;var i=t.primitive;this.count=Object(r.default)(i.indices)?i.indices.count:l.a.getAttributeBySemantic(i,"POSITION").count,this.indices=i.indices,this.primitiveType=i.primitiveType,this.boundingSphere=l.a.createBoundingSphere(i,this.modelMatrix,e.instancingTranslationMax,e.instancingTranslationMin),this.lightingOptions=new u.a,this.pickId=void 0,this.renderStateOptions={depthTest:{enabled:!0,func:s.a.LESS_OR_EQUAL},blending:o.default.DISABLED},this.styleCommandsNeeded=void 0}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(2),a=i(337);function r(e){e=Object(n.default)(e,n.default.EMPTY_OBJECT),this.lightingModel=Object(n.default)(e.lightingModel,a.a.UNLIT)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return f}));var n=i(248),a=i(173),r=i(4),o=i(7),s=i(0),l=i(19),u=i(943),d=i(2),c=i(276);function f(e){var t=e.model,i=e.propertyTable;r.a.typeOf.object("propertyTable",i),r.a.typeOf.object("model",t),this._propertyTable=i,this._model=t,this._features=void 0,this._featuresLength=0,this._batchTexture=void 0,this._styleCommandsNeededDirty=!1,this._styleCommandsNeeded=c.a.ALL_OPAQUE,function(e){var t=e._model.content,i=Object(s.default)(t),r=e._propertyTable.count;if(0===r)return;for(var o=new Array(r),l=0;l<r;l++)o[l]=i?new a.a(t,l):new u.a({model:e._model,featureId:l,featureTable:e});e._features=o,e._featuresLength=r,e._batchTexture=new n.a({featuresLength:r,owner:e,statistics:i?t.tileset.statistics:e._statistics})}(this)}Object.defineProperties(f.prototype,{batchTexture:{get:function(){return this._batchTexture}},featuresLength:{get:function(){return this._featuresLength}},styleCommandsNeededDirty:{get:function(){return this._styleCommandsNeededDirty}}}),f.prototype.update=function(e){this._styleCommandsNeededDirty=!1,this._batchTexture.update(void 0,e);var t=c.a.getStyleCommandsNeeded(this._featuresLength,this._batchTexture.translucentFeaturesLength);this._styleCommandsNeeded!==t&&(this._styleCommandsNeededDirty=!0,this._styleCommandsNeeded=t)},f.prototype.setShow=function(e,t){this._batchTexture.setShow(e,t)},f.prototype.setAllShow=function(e){this._batchTexture.setAllShow(e)},f.prototype.getShow=function(e){return this._batchTexture.getShow(e)},f.prototype.setColor=function(e,t){this._batchTexture.setColor(e,t)},f.prototype.setAllColor=function(e){this._batchTexture.setAllColor(e)},f.prototype.getColor=function(e,t){return this._batchTexture.getColor(e,t)},f.prototype.getPickColor=function(e){return this._batchTexture.getPickColor(e)},f.prototype.getFeature=function(e){return this._features[e]},f.prototype.hasProperty=function(e,t){return this._propertyTable.hasProperty(e,t)},f.prototype.getProperty=function(e,t){return this._propertyTable.getProperty(e,t)},f.prototype.getPropertyBySemantic=function(e,t){return this._propertyTable.getPropertyBySemantic(e,t)},f.prototype.getPropertyNames=function(e){return this._propertyTable.getPropertyIds(e)},f.prototype.setProperty=function(e,t,i){return this._propertyTable.setProperty(e,t,i)};var h=new o.default;f.prototype.applyStyle=function(e){if(!Object(s.default)(e))return this.setAllColor(n.a.DEFAULT_COLOR_VALUE),void this.setAllShow(n.a.DEFAULT_SHOW_VALUE);for(var t=0;t<this._featuresLength;t++){var i=this.getFeature(t),a=Object(s.default)(e.color)?Object(d.default)(e.color.evaluateColor(i,h),n.a.DEFAULT_COLOR_VALUE):n.a.DEFAULT_COLOR_VALUE,r=Object(s.default)(e.show)?Object(d.default)(e.show.evaluate(i),n.a.DEFAULT_SHOW_VALUE):n.a.DEFAULT_SHOW_VALUE;this.setColor(t,a),this.setShow(t,r)}},f.prototype.isDestroyed=function(){return!1},f.prototype.destroy=function(e){this._batchTexture.destroy(),Object(l.default)(this)}},function(e,t,i){"use strict";i.d(t,"a",(function(){return r}));var n=i(7),a=i(0);function r(e){this._model=e.model,this._featureTable=e.featureTable,this._featureId=e.featureId,this._color=void 0}Object.defineProperties(r.prototype,{show:{get:function(){return this._featureTable.getShow(this._featureId)},set:function(e){this._featureTable.setShow(this._featureId,e)}},color:{get:function(){return Object(a.default)(this._color)||(this._color=new n.default),this._featureTable.getColor(this._featureId,this._color)},set:function(e){this._featureTable.setColor(this._featureId,e)}},primitive:{get:function(){return this._model}},featureTable:{get:function(){return this._featureTable}}}),r.prototype.hasProperty=function(e){return this._featureTable.hasProperty(this._featureId,e)},r.prototype.getProperty=function(e){return this._featureTable.getProperty(this._featureId,e)},r.prototype.getPropertyInherited=function(e){var t=this._featureTable.getPropertyBySemantic(this._featureId,e);return Object(a.default)(t)?t:this._featureTable.getProperty(this._featureId,e)},r.prototype.getPropertyNames=function(e){return this._featureTable.getPropertyNames(e)},r.prototype.setProperty=function(e,t){return this._featureTable.setProperty(this._featureId,e,t)}},function(e,t,i){"use strict";var n=i(90),a=i(462),r=i(1),o=i(266),s=i(4),l=i(11),u=i(2),d=i(0),c=i(313),f=i(467),h=i(6),p=i(365),m=i(162),_=i(141),g=i(945),v=i(312),y=i(165),b=i(18),w=i(178),O=0,x=1,A=2,T=3,E=4,C=m.a.FeatureIdAttribute;function S(e){var t=(e=Object(u.default)(e,u.default.EMPTY_OBJECT)).b3dmResource,i=e.baseResource,a=e.arrayBuffer,r=Object(u.default)(e.byteOffset,0),o=Object(u.default)(e.releaseGltfJson,!1),l=Object(u.default)(e.asynchronous,!0),c=Object(u.default)(e.incrementallyLoadTextures,!0),f=Object(u.default)(e.upAxis,n.a.Y),p=Object(u.default)(e.forwardAxis,n.a.X),m=Object(u.default)(e.loadAsTypedArray,!1);s.a.typeOf.object("options.b3dmResource",t),s.a.typeOf.object("options.arrayBuffer",a),i=Object(d.default)(i)?i:t.clone(),this._b3dmResource=t,this._baseResource=i,this._arrayBuffer=a,this._byteOffset=r,this._releaseGltfJson=o,this._asynchronous=l,this._incrementallyLoadTextures=c,this._upAxis=f,this._forwardAxis=p,this._loadAsTypedArray=m,this._state=O,this._promise=b.a.defer(),this._gltfLoader=void 0,this._batchLength=0,this._propertyTable=void 0,this._batchTable=void 0,this._components=void 0,this._transform=h.default.IDENTITY}function M(e){if(Object(d.default)(e.children)||Object(d.default)(e.primitives)){var t;if(Object(d.default)(e.children))for(t=0;t<e.children.length;t++)M(e.children[t]);if(Object(d.default)(e.primitives))for(t=0;t<e.primitives.length;t++){var i=e.primitives[t],n=_.a.getAttributeBySemantic(i,w.a.FEATURE_ID);if(Object(d.default)(n)){n.setIndex=0;var a=new C;a.propertyTableId=0,a.setIndex=0,i.featureIdAttributes.push(a)}}}}Object(d.default)(Object.create)&&(S.prototype=Object.create(y.a.prototype),S.prototype.constructor=S),Object.defineProperties(S.prototype,{promise:{get:function(){return this._promise.promise}},texturesLoadedPromise:{get:function(){return this._gltfLoader.texturesLoadedPromise}},cacheKey:{get:function(){}},components:{get:function(){return this._components}},transform:{get:function(){return this._transform}}}),S.prototype.load=function(){var e=a.a.parse(this._arrayBuffer,this._byteOffset),t=e.batchLength,i=e.featureTableJson,n=e.featureTableBinary,s=e.batchTableJson,u=e.batchTableBinary,m=new o.a(i,n);t=m.getGlobalProperty("BATCH_LENGTH"),this._batchLength=t;var _=m.getGlobalProperty("RTC_CENTER",l.default.FLOAT,3);Object(d.default)(_)&&(this._transform=h.default.fromTranslation(r.default.fromArray(_))),this._batchTable={json:s,binary:u};var y=new f.a({upAxis:this._upAxis,typedArray:e.gltf,forwardAxis:this._forwardAxis,gltfResource:this._b3dmResource,baseResource:this._baseResource,releaseGltfJson:this._releaseGltfJson,incrementallyLoadTextures:this._incrementallyLoadTextures,loadAsTypedArray:this._loadAsTypedArray});this._gltfLoader=y,this._state=x;var b=this;y.load(),y.promise.then((function(){if(!b.isDestroyed()){var e=y.components;!function(e,t){var i,n=e._batchTable,a=e._batchLength;if(0===a)return;if(Object(d.default)(n.json))i=Object(g.a)({count:a,batchTable:n.json,binaryBody:n.binary});else{var r=new v.a({name:p.a.BATCH_TABLE_CLASS_NAME,count:a});i=new c.a({schema:{},propertyTables:[r]})}for(var o=t.scene.nodes,s=0;s<o.length;s++)M(o[s]);t.featureMetadata=i}(b,e),b._components=e,b._state=T,b._promise.resolve(b)}})).otherwise((function(e){b.isDestroyed()||function(e,t){e.unload(),e._state=E;t=e.getError("Failed to load B3DM",t),e._promise.reject(t)}(b,e)}))},S.prototype.process=function(e){s.a.typeOf.object("frameState",e),this._state===x&&(this._state=A),this._state===A&&this._gltfLoader.process(e)},S.prototype.unload=function(){Object(d.default)(this._gltfLoader)&&this._gltfLoader.unload(),this._components=void 0},t.a=S},function(e,t,i){"use strict";i.d(t,"a",(function(){return m}));var n=i(4),a=i(0),r=i(214),o=i(23),s=i(463),l=i(313),u=i(312),d=i(289),c=i(946),f=i(365),h=i(408),p=i(311);function m(e){n.a.typeOf.number("options.count",e.count),n.a.typeOf.object("options.batchTable",e.batchTable);var t=e.count,i=e.batchTable,r=e.binaryBody,g=function(e){var t,i=e.HIERARCHY,n=e.extras,r=e.extensions;Object(a.default)(i)?(m._deprecationWarning("batchTableHierarchyExtension","The batch table HIERARCHY property has been moved to an extension. Use extensions.3DTILES_batch_table_hierarchy instead."),t=i):Object(a.default)(r)&&(t=r["3DTILES_batch_table_hierarchy"]);var o={},s={};for(var l in e)if(e.hasOwnProperty(l)&&"HIERARCHY"!==l&&"extensions"!==l&&"extras"!==l){var u=e[l];Array.isArray(u)?o[l]=u:s[l]=u}return{binaryProperties:s,jsonProperties:o,hierarchy:t,extras:n,extensions:r}}(i),v=new c.a({count:t,properties:g.jsonProperties}),y=function(e,t){if(Object(a.default)(e))return new s.a({extension:e,binaryBody:t});return}(g.hierarchy,r),b=function(e,t,i,n){var r={},s={},l={},u=0;for(var c in i)if(i.hasOwnProperty(c)){if(!Object(a.default)(n))throw new o.a("Property "+c+" requires a batch table binary.");var f=i[c],p=Object(d.a)(f);s[c]={bufferView:u},r[c]=_(f),l[u]=p.createArrayBufferView(n.buffer,n.byteOffset+f.byteOffset,e),u++}var m={classes:{}};m.classes[t]={properties:r};var g=new h.a(m);return{featureTableJson:{class:t,count:e,properties:s},bufferViewsU8:l,transcodedSchema:g,transcodedClass:g.classes[t]}}(t,f.a.BATCH_TABLE_CLASS_NAME,g.binaryProperties,r),w=b.featureTableJson,O=new p.a({count:w.count,properties:w.properties,class:b.transcodedClass,bufferViews:b.bufferViewsU8}),x=new u.a({id:0,name:"Batch Table",count:w.count,metadataTable:O,jsonMetadataTable:v,batchTableHierarchy:y});return new l.a({schema:b.transcodedSchema,propertyTables:[x],extensions:g.extensions,extras:g.extras})}function _(e){var t=function(e){switch(e){case"BYTE":return"INT8";case"UNSIGNED_BYTE":return"UINT8";case"SHORT":return"INT16";case"UNSIGNED_SHORT":return"UINT16";case"INT":return"INT32";case"UNSIGNED_INT":return"UINT32";case"FLOAT":return"FLOAT32";case"DOUBLE":return"FLOAT64"}}(e.componentType),i=e.type;return"SCALAR"===i?{type:"SINGLE",componentType:t}:{type:i,componentType:t}}m._deprecationWarning=r.a},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(4),a=i(50),r=i(0),o=i(3),s=i(139);function l(e){n.a.typeOf.number.greaterThan("options.count",e.count,0),n.a.typeOf.object("options.properties",e.properties),this._count=e.count,this._properties=Object(a.default)(e.properties,!0)}l.prototype.hasProperty=function(e){return s.a.hasProperty(e,this._properties)},l.prototype.getPropertyIds=function(e){return s.a.getPropertyIds(this._properties,void 0,e)},l.prototype.getProperty=function(e,t){if(n.a.typeOf.number("index",e),n.a.typeOf.string("propertyId",t),e<0||e>=this._count)throw new o.default("index must be in the range [0, "+this._count+")");var i=this._properties[t];if(Object(r.default)(i))return Object(a.default)(i[e],!0)},l.prototype.setProperty=function(e,t,i){if(n.a.typeOf.number("index",e),n.a.typeOf.string("propertyId",t),e<0||e>=this._count)throw new o.default("index must be in the range [0, "+this._count+")");var s=this._properties[t];return!!Object(r.default)(s)&&(s[e]=Object(a.default)(i,!0),!0)}},function(e,t,i){"use strict";var n=i(19),a=i(3);function r(e,t){this._tileset=e,this._tile=t,this.featurePropertiesDirty=!1}Object.defineProperties(r.prototype,{featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){}},readyPromise:{get:function(){}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}},groupMetadata:{get:function(){},set:function(e){throw new a.default("Empty3DTileContent cannot have group metadata")}}}),r.prototype.hasProperty=function(e,t){return!1},r.prototype.getFeature=function(e){},r.prototype.applyDebugSettings=function(e,t){},r.prototype.applyStyle=function(e){},r.prototype.update=function(e,t){},r.prototype.isDestroyed=function(){return!1},r.prototype.destroy=function(){return Object(n.default)(this)},t.a=r},function(e,t,i){"use strict";i.d(t,"a",(function(){return _}));var n=i(0),a=i(19),r=i(3),o=i(164),s=i(217),l=i(120),u=i(157),d=i(23),c=i(18),f=i(231),h=i(461),p=i(470),m=i(471);function _(e,t,i,n){this._tileset=e,this._tile=t,this._tilesetResource=i,this._contents=[];var a=n.content;this._innerContentHeaders=a,this._requestsInFlight=0,this._cancelCount=0;var r=this._innerContentHeaders.length;this._arrayFetchPromises=new Array(r),this._requests=new Array(r),this._innerContentResources=new Array(r),this._serverKeys=new Array(r);for(var o=0;o<r;o++){var l=i.getDerivedResource({url:a[o].uri}),u=s.default.getServerKey(l.getUrlComponent());this._innerContentResources[o]=l,this._serverKeys[o]=u}this._contentsFetchedPromise=void 0,this._readyPromise=c.a.defer()}function g(e,t){e._requestsInFlight+=t,e.tileset.statistics.numberOfPendingRequests+=t}function v(e,t,i,n){var a=e._innerContentResources[t].clone(),r=e.tile,s=e._serverKeys[t],d=new o.default({throttle:!0,throttleByServer:!0,type:u.a.TILES3D,priorityFunction:function(){return r._priority},serverKey:s});return a.request=d,e._requests[t]=d,a.fetchArrayBuffer().then((function(t){if(!(i<e._cancelCount))return g(e,-1),t})).otherwise((function(r){i<e._cancelCount||(a.request.state!==l.a.CANCELLED?(g(e,-1),y(e,t,r)):function(e,t){e._cancelCount++,e._tile._contentState=t,e.tileset.statistics.numberOfPendingRequests-=e._requestsInFlight,e._requestsInFlight=0;var i=e._innerContentHeaders.length;e._arrayFetchPromises=new Array(i)}(e,n))}))}function y(e,t,i){var a=e._tileset,r=e._innerContentResources[t].url,o=Object(n.default)(i.message)?i.message:i.toString();a.tileFailed.numberOfListeners>0?a.tileFailed.raiseEvent({url:r,message:o}):(console.log("A content failed to load: "+r),console.log("Error: "+o))}Object.defineProperties(_.prototype,{featurePropertiesDirty:{get:function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)if(e[i].featurePropertiesDirty)return!0;return!1},set:function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].featurePropertiesDirty=e}},featuresLength:{get:function(){return 0}},pointsLength:{get:function(){return 0}},trianglesLength:{get:function(){return 0}},geometryByteLength:{get:function(){return 0}},texturesByteLength:{get:function(){return 0}},batchTableByteLength:{get:function(){return 0}},innerContents:{get:function(){return this._contents}},readyPromise:{get:function(){return this._readyPromise.promise}},tileset:{get:function(){return this._tileset}},tile:{get:function(){return this._tile}},url:{get:function(){}},batchTable:{get:function(){}},groupMetadata:{get:function(){},set:function(){throw new r.default("Multiple3DTileContent cannot have group metadata")}},innerContentUrls:{get:function(){return this._innerContentHeaders.map((function(e){return e.uri}))}},contentsFetchedPromise:{get:function(){if(Object(n.default)(this._contentsFetchedPromise))return this._contentsFetchedPromise.promise}}}),_.prototype.requestInnerContents=function(){if(!function(e){for(var t={},i=0;i<e.length;i++){var a=e[i];Object(n.default)(t[a])?t[a]++:t[a]=1}for(var r in t)if(t.hasOwnProperty(r)&&!s.default.serverHasOpenSlots(r,t[r]))return!1;return s.default.heapHasOpenSlots(e.length)}(this._serverKeys))return this._serverKeys.length;var e,t,i=this._innerContentHeaders;g(this,i.length);for(var a=0;a<i.length;a++)this._arrayFetchPromises[a]=v(this,a,this._cancelCount,this._tile._contentState);return Object(n.default)(this._contentsFetchedPromise)||(this._contentsFetchedPromise=c.a.defer()),t=(e=this)._cancelCount,c.a.all(e._arrayFetchPromises).then((function(i){if(!(t<e._cancelCount))return i.map((function(t,i){if(Object(n.default)(t))try{return function(e,t,i){var a=Object(m.a)(t);if(a.contentType===f.a.EXTERNAL_TILESET)throw new d.a("External tilesets are disallowed inside the 3DTILES_multiple_contents extension");e._disableSkipLevelOfDetail=e._disableSkipLevelOfDetail||a.contentType===f.a.GEOMETRY||a.contentType===f.a.VECTOR;var r,o=e._tileset,s=e._innerContentResources[i],l=h.a[a.contentType];r=Object(n.default)(a.binaryPayload)?l(o,e._tile,s,a.binaryPayload.buffer,0):l(o,e._tile,s,a.jsonPayload);var u=e._innerContentHeaders[i];return r.groupMetadata=Object(p.a)(o,u),r}(e,t,i)}catch(t){return void y(e,i,t)}}))})).then((function(t){Object(n.default)(t)?(e._contents=t.filter(n.default),function(e){var t=e._contents.map((function(e){return e.readyPromise}));c.a.all(t).then((function(){e._readyPromise.resolve(e)})).otherwise((function(t){e._readyPromise.reject(t)}))}(e),Object(n.default)(e._contentsFetchedPromise)&&e._contentsFetchedPromise.resolve()):Object(n.default)(e._contentsFetchedPromise)&&(e._contentsFetchedPromise.resolve(),e._contentsFetchedPromise=void 0)})).otherwise((function(t){Object(n.default)(e._contentsFetchedPromise)&&e._contentsFetchedPromise.reject(t)})),0},_.prototype.cancelRequests=function(){for(var e=0;e<this._requests.length;e++){var t=this._requests[e];Object(n.default)(t)&&t.cancel()}},_.prototype.hasProperty=function(e,t){return!1},_.prototype.getFeature=function(e){},_.prototype.applyDebugSettings=function(e,t){for(var i=this._contents,n=i.length,a=0;a<n;++a)i[a].applyDebugSettings(e,t)},_.prototype.applyStyle=function(e){for(var t=this._contents,i=t.length,n=0;n<i;++n)t[n].applyStyle(e)},_.prototype.update=function(e,t){for(var i=this._contents,n=i.length,a=0;a<n;++a)i[a].update(e,t)},_.prototype.isDestroyed=function(){return!1},_.prototype.destroy=function(){for(var e=this._contents,t=e.length,i=0;i<t;++i)e[i].destroy();return Object(a.default)(this)}},function(e,t,i){"use strict";var n=i(1),a=i(0),r=i(22),o=i(15),s=i(78),l=i(12),u=i(80),d=i(294),c=i(17),f=i(4),h=i(53),p=i(2),m=i(43),_=i(6),g=i(61),v=i(64),y=i(380),b=new r.default;function w(e){f.a.typeOf.object("options",e),f.a.typeOf.string("options.token",e.token);var t=y.a.fromToken(e.token),i=Object(p.default)(e.minimumHeight,0),a=Object(p.default)(e.maximumHeight,0),r=Object(p.default)(e.ellipsoid,o.default.WGS84);this.s2Cell=t,this.minimumHeight=i,this.maximumHeight=a,this.ellipsoid=r;var s=function(e,t,i,a){var r=new Array(6),o=e.getCenter(),s=a.geodeticSurfaceNormal(o,O),l=a.cartesianToCartographic(o,x);l.height=i;var d=a.cartographicToCartesian(l,A),c=u.default.fromPointNormal(d,s);r[0]=c;var f,h,p,m=0,_=[];for(f=0;f<4;f++){h=e.getVertex(f),_[f]=h,(p=a.cartesianToCartographic(h,T)).height=t;var g=u.default.getPointDistance(c,a.cartographicToCartesian(p,E));g<m&&(m=g)}var v=u.default.clone(c);for(v.normal=n.default.negate(v.normal,v.normal),v.distance=-1*v.distance+m,r[1]=v,f=0;f<4;f++){h=_[f];var y=_[(f+1)%4],b=a.geodeticSurfaceNormal(h,C),w=n.default.subtract(y,h,M),D=n.default.cross(w,b,S);D=n.default.normalize(D,D),r[2+f]=u.default.fromPointNormal(h,D)}return r}(t,i,a,r);this._boundingPlanes=s;var l,d=function(e){for(var t=new Array(8),i=0;i<4;i++)t[i]=G(e[0],e[2+(i+3)%4],e[2+i%4]),t[i+4]=G(e[1],e[2+(i+3)%4],e[2+i%4]);return t}(s);for(this._vertices=d,this._edgeNormals=new Array(6),this._edgeNormals[0]=q(s[0],d.slice(0,4)),l=0;l<4;l++)this._edgeNormals[0][l]=n.default.negate(this._edgeNormals[0][l],this._edgeNormals[0][l]);for(this._edgeNormals[1]=q(s[1],d.slice(4,8)),l=0;l<4;l++)this._edgeNormals[2+l]=q(s[2+l],[d[l%4],d[(l+1)%4],d[4+(l+1)%4],d[4+l]]);for(this._planeVertices=[this._vertices.slice(0,4),this._vertices.slice(4,8)],l=0;l<4;l++)this._planeVertices.push([this._vertices[l%4],this._vertices[(l+1)%4],this._vertices[4+(l+1)%4],this._vertices[4+l]]);var h=t.getCenter();(b=r.cartesianToCartographic(h,b)).height=(a+i)/2,this.center=r.cartographicToCartesian(b,h),this._boundingSphere=c.default.fromPoints(d)}var O=new n.default,x=new r.default,A=new n.default,T=new r.default,E=new n.default,C=new n.default,S=new n.default,M=new n.default;var D=new n.default,P=new n.default,I=new n.default,L=new n.default,j=new n.default,R=new n.default,N=new n.default,B=new n.default,F=new n.default,k=new n.default,z=new n.default,U=new n.default,V=new n.default,H=new l.default;function G(e,t,i){D=e.normal,P=t.normal,I=i.normal,L=n.default.multiplyByScalar(e.normal,-e.distance,L),j=n.default.multiplyByScalar(t.normal,-t.distance,j),R=n.default.multiplyByScalar(i.normal,-i.distance,R),k=n.default.multiplyByScalar(n.default.cross(P,I,N),n.default.dot(L,D),k),z=n.default.multiplyByScalar(n.default.cross(I,D,B),n.default.dot(j,P),z),U=n.default.multiplyByScalar(n.default.cross(D,P,F),n.default.dot(R,I),U),H[0]=D.x,H[1]=P.x,H[2]=I.x,H[3]=D.y,H[4]=P.y,H[5]=I.y,H[6]=D.z,H[7]=P.z,H[8]=I.z;var a=l.default.determinant(H);return V=n.default.add(k,z,V),V=n.default.add(V,U,V),new n.default(V.x/a,V.y/a,V.z/a)}var Y=new n.default,W=new n.default;function q(e,t){for(var i=[],a=0;a<4;a++)Y=n.default.subtract(t[(a+1)%4],t[a],Y),W=n.default.cross(e.normal,Y,W),W=n.default.normalize(W,W),i[a]=n.default.clone(W);return i}Object.defineProperties(w.prototype,{boundingVolume:{get:function(){return this}},boundingSphere:{get:function(){return this._boundingSphere}}});var X=new n.default;w.prototype.distanceToCamera=function(e){f.a.defined("frameState",e);var t,i,a,r,o,s,l=e.camera.positionWC,d=[],c=[];for(u.default.getPointDistance(this._boundingPlanes[0],l)>0?(d.push(0),c.push(this._planeVertices[0]),t=this._edgeNormals[0]):u.default.getPointDistance(this._boundingPlanes[1],l)>0&&(d.push(1),c.push(this._planeVertices[1]),t=this._edgeNormals[1]),i=0;i<4;i++)a=2+i,u.default.getPointDistance(this._boundingPlanes[a],l)>0&&(d.push(a),c.push(this._planeVertices[a]),t=this._edgeNormals[a]);if(0===d.length)return 0;if(1===d.length)return s=this._boundingPlanes[d[0]],o=$(u.default.projectPointOntoPlane(s,l,X),c[0],s,t),n.default.distance(o,l);if(2===d.length){if(0===d[0]){var h=[this._vertices[4*d[0]+(d[1]-2)],this._vertices[4*d[0]+(d[1]-2+1)%4]];return o=Z(l,h[0],h[1]),n.default.distance(o,l)}var p,m=Number.MAX_VALUE;for(i=0;i<2;i++)s=this._boundingPlanes[d[i]],o=$(u.default.projectPointOntoPlane(s,l,X),c[i],s,this._edgeNormals[d[i]]),(p=n.default.distanceSquared(o,l))<m&&(m=p);return Math.sqrt(m)}return d.length>3?(o=$(u.default.projectPointOntoPlane(this._boundingPlanes[1],l,X),this._planeVertices[1],this._boundingPlanes[1],this._edgeNormals[1]),n.default.distance(o,l)):(r=2===d[1]&&5===d[2]?0:1,0===d[0]?n.default.distance(l,this._vertices[(d[1]-2+r)%4]):n.default.distance(l,this._vertices[4+(d[1]-2+r)%4]))};var K=new n.default,J=new n.default;function Z(e,t,i){var a=n.default.subtract(i,t,K),r=n.default.subtract(e,t,J),o=n.default.dot(a,r);if(o<=0)return t;var s=n.default.dot(a,a);return o>=s?i:(o/=s,new n.default((1-o)*t.x+o*i.x,(1-o)*t.y+o*i.y,(1-o)*t.z+o*i.z))}var Q=new u.default(n.default.UNIT_X,0);function $(e,t,i,r){for(var o,s,l,d=Number.MAX_VALUE,c=0;c<t.length;c++){var f=u.default.fromPointNormal(t[c],r[c],Q);u.default.getPointDistance(f,e)<0||(l=Z(e,t[c],t[(c+1)%4]),(o=n.default.distance(e,l))<d&&(d=o,s=l))}return Object(a.default)(s)?s:e}w.prototype.intersectPlane=function(e){f.a.defined("plane",e);for(var t=0,i=0,a=0;a<this._vertices.length;a++){n.default.dot(e.normal,this._vertices[a])+e.distance<0?i++:t++}return t===this._vertices.length?s.a.INSIDE:i===this._vertices.length?s.a.OUTSIDE:s.a.INTERSECTING},w.prototype.createDebugVolume=function(e){f.a.defined("color",e);for(var t=new _.default.clone(_.default.IDENTITY),i=new d.a({polygonHierarchy:{positions:this._planeVertices[0]}}),n=d.a.createGeometry(i),a=new m.default({geometry:n,id:"outline",modelMatrix:t,attributes:{color:h.default.fromColor(e)}}),r=new d.a({polygonHierarchy:{positions:this._planeVertices[1]}}),o=d.a.createGeometry(r),s=new m.default({geometry:o,id:"outline",modelMatrix:t,attributes:{color:h.default.fromColor(e)}}),l=[],u=0;u<4;u++){var c=new d.a({polygonHierarchy:{positions:this._planeVertices[2+u]}}),p=d.a.createGeometry(c);l[u]=new m.default({geometry:p,id:"outline",modelMatrix:t,attributes:{color:h.default.fromColor(e)}})}return new v.default({geometryInstances:[l[0],l[1],l[2],l[3],s,a],appearance:new g.default({translucent:!1,flat:!0}),asynchronous:!1})},t.a=w},function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var n=i(4),a=i(2),r=i(139);function o(e){e=Object(a.default)(e,a.default.EMPTY_OBJECT),n.a.typeOf.object("options.tile",e.tile),this._class=e.class;var t=e.tile;this._properties=t.properties,this._extensions=t.extensions,this._extras=t.extras}Object.defineProperties(o.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),o.prototype.hasProperty=function(e){return r.a.hasProperty(e,this._properties,this._class)},o.prototype.hasPropertyBySemantic=function(e){return r.a.hasPropertyBySemantic(e,this._properties,this._class)},o.prototype.getPropertyIds=function(e){return r.a.getPropertyIds(this._properties,this._class,e)},o.prototype.getProperty=function(e){return r.a.getProperty(e,this._properties,this._class)},o.prototype.setProperty=function(e,t){return r.a.setProperty(e,t,this._properties,this._class)},o.prototype.getPropertyBySemantic=function(e){return r.a.getPropertyBySemantic(e,this._properties,this._class)},o.prototype.setPropertyBySemantic=function(e,t){return r.a.setPropertyBySemantic(e,t,this._properties,this._class)}},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(952),s=i(953);function l(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).extension,i=e.schema;n.a.typeOf.object("options.extension",t),n.a.typeOf.object("options.schema",i);var l,u={};if(Object(r.default)(t.groups))for(var d in t.groups)if(t.groups.hasOwnProperty(d)){var c=t.groups[d];u[d]=new o.a({id:d,group:t.groups[d],class:i.classes[c.class]})}Object(r.default)(t.tileset)&&(l=new s.a({tileset:t.tileset,class:i.classes[t.tileset.class]})),this._schema=i,this._groups=u,this._tileset=l,this._statistics=t.statistics,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(l.prototype,{schema:{get:function(){return this._schema}},groups:{get:function(){return this._groups}},tileset:{get:function(){return this._tileset}},statistics:{get:function(){return this._statistics}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),t.a=l},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(139);function s(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).id,i=e.group;n.a.typeOf.string("options.id",t),n.a.typeOf.object("options.group",i);var o=Object(r.default)(i.properties)?i.properties:{};this._class=e.class,this._properties=o,this._id=t,this._extras=i.extras,this._extensions=i.extensions}Object.defineProperties(s.prototype,{class:{get:function(){return this._class}},id:{get:function(){return this._id}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),s.prototype.hasProperty=function(e){return o.a.hasProperty(e,this._properties,this._class)},s.prototype.hasPropertyBySemantic=function(e){return o.a.hasPropertyBySemantic(e,this._properties,this._class)},s.prototype.getPropertyIds=function(e){return o.a.getPropertyIds(this._properties,this._class,e)},s.prototype.getProperty=function(e){return o.a.getProperty(e,this._properties,this._class)},s.prototype.setProperty=function(e,t){return o.a.setProperty(e,t,this._properties,this._class)},s.prototype.getPropertyBySemantic=function(e){return o.a.getPropertyBySemantic(e,this._properties,this._class)},s.prototype.setPropertyBySemantic=function(e,t){return o.a.setPropertyBySemantic(e,t,this._properties,this._class)},t.a=s},function(e,t,i){"use strict";var n=i(4),a=i(2),r=i(0),o=i(139);function s(e){var t=(e=Object(a.default)(e,a.default.EMPTY_OBJECT)).tileset;n.a.typeOf.object("options.tileset",t);var i=Object(r.default)(t.properties)?t.properties:{};this._class=e.class,this._properties=i,this._extras=t.extras,this._extensions=t.extensions}Object.defineProperties(s.prototype,{class:{get:function(){return this._class}},extras:{get:function(){return this._extras}},extensions:{get:function(){return this._extensions}}}),s.prototype.hasProperty=function(e){return o.a.hasProperty(e,this._properties,this._class)},s.prototype.hasPropertyBySemantic=function(e){return o.a.hasPropertyBySemantic(e,this._properties,this._class)},s.prototype.getPropertyIds=function(e){return o.a.getPropertyIds(this._properties,this._class,e)},s.prototype.getProperty=function(e){return o.a.getProperty(e,this._properties,this._class)},s.prototype.setProperty=function(e,t){return o.a.setProperty(e,t,this._properties,this._class)},s.prototype.getPropertyBySemantic=function(e){return o.a.getPropertyBySemantic(e,this._properties,this._class)},s.prototype.setPropertyBySemantic=function(e,t){return o.a.setPropertyBySemantic(e,t,this._properties,this._class)},t.a=s},function(e,t,i){"use strict";var n=i(1),a=i(4),r=i(288),o=i(285),s=i(291),l={},u=new n.default;l.checkChildrenWithinParent=function(e){a.a.typeOf.object("tile",e);var t=e.children,i=t.length,l=e.boundingVolume;if(l instanceof s.a||l instanceof o.a){var d=l._orientedBoundingBox;e._optimChildrenWithinParent=r.a.USE_OPTIMIZATION;for(var c=0;c<i;++c){var f=t[c].boundingVolume;if(!(f instanceof s.a||f instanceof o.a)){e._optimChildrenWithinParent=r.a.SKIP_OPTIMIZATION;break}var h=f._orientedBoundingBox,p=n.default.subtract(h.center,d.center,u),m=n.default.magnitude(p);if(n.default.divideByScalar(p,m,p),Math.abs(d.halfAxes[0]*p.x)+Math.abs(d.halfAxes[1]*p.y)+Math.abs(d.halfAxes[2]*p.z)+Math.abs(d.halfAxes[3]*p.x)+Math.abs(d.halfAxes[4]*p.y)+Math.abs(d.halfAxes[5]*p.z)+Math.abs(d.halfAxes[6]*p.x)+Math.abs(d.halfAxes[7]*p.y)+Math.abs(d.halfAxes[8]*p.z)<=Math.abs(h.halfAxes[0]*p.x)+Math.abs(h.halfAxes[1]*p.y)+Math.abs(h.halfAxes[2]*p.z)+Math.abs(h.halfAxes[3]*p.x)+Math.abs(h.halfAxes[4]*p.y)+Math.abs(h.halfAxes[5]*p.z)+Math.abs(h.halfAxes[6]*p.x)+Math.abs(h.halfAxes[7]*p.y)+Math.abs(h.halfAxes[8]*p.z)+m){e._optimChildrenWithinParent=r.a.SKIP_OPTIMIZATION;break}}}return e._optimChildrenWithinParent===r.a.USE_OPTIMIZATION},t.a=l},function(e,t,i){"use strict";var n=i(0),a=i(956);function r(){this._list=new a.a,this._sentinel=this._list.add(),this._trimTiles=!1}r.prototype.reset=function(){this._list.splice(this._list.tail,this._sentinel)},r.prototype.touch=function(e){var t=e.cacheNode;Object(n.default)(t)&&this._list.splice(this._sentinel,t)},r.prototype.add=function(e){Object(n.default)(e.cacheNode)||(e.cacheNode=this._list.add(e))},r.prototype.unloadTile=function(e,t,i){var a=t.cacheNode;Object(n.default)(a)&&(this._list.remove(a),t.cacheNode=void 0,i(e,t))},r.prototype.unloadTiles=function(e,t){var i=this._trimTiles;this._trimTiles=!1;for(var n=this._list,a=1024*e.maximumMemoryUsage*1024,r=this._sentinel,o=n.head;o!==r&&(e.totalMemoryUsageInBytes>a||i);){var s=o.item;o=o.next,this.unloadTile(e,s,t)}},r.prototype.trim=function(){this._trimTiles=!0},t.a=r},function(e,t,i){"use strict";var n=i(0);function a(){this.head=void 0,this.tail=void 0,this._length=0}function r(e,t,i){this.item=e,this.previous=t,this.next=i}function o(e,t){Object(n.default)(t.previous)&&Object(n.default)(t.next)?(t.previous.next=t.next,t.next.previous=t.previous):Object(n.default)(t.previous)?(t.previous.next=void 0,e.tail=t.previous):Object(n.default)(t.next)?(t.next.previous=void 0,e.head=t.next):(e.head=void 0,e.tail=void 0),t.next=void 0,t.previous=void 0}Object.defineProperties(a.prototype,{length:{get:function(){return this._length}}}),a.prototype.add=function(e){var t=new r(e,this.tail,void 0);return Object(n.default)(this.tail)?(this.tail.next=t,this.tail=t):(this.head=t,this.tail=t),++this._length,t},a.prototype.remove=function(e){Object(n.default)(e)&&(o(this,e),--this._length)},a.prototype.splice=function(e,t){if(e!==t){o(this,t);var i=e.next;e.next=t,this.tail===e?this.tail=t:i.previous=t,t.next=i,t.previous=e}},t.a=a},function(e,t,i){"use strict";var n=i(7),a=i(0),r=i(14),o=i(5);function s(e){this.tilePropertyName=e,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE,this._previousMinimum=Number.MAX_VALUE,this._previousMaximum=-Number.MAX_VALUE,this._referenceMinimum={},this._referenceMaximum={}}function l(e,t){return"_loadTimestamp"===t?r.default.toDate(e).getTime():e}s.prototype.setReferenceMinimumMaximum=function(e,t,i){this._referenceMinimum[i]=l(e,i),this._referenceMaximum[i]=l(t,i)};var u=[new n.default(.1,.1,.1,1),new n.default(.153,.278,.878,1),new n.default(.827,.231,.49,1),new n.default(.827,.188,.22,1),new n.default(1,.592,.259,1),new n.default(1,.843,0,1)];s.prototype.colorize=function(e,t){var i=this.tilePropertyName;if(Object(a.default)(i)&&e.contentAvailable&&e._selectedFrame===t.frameNumber){var r=function(e,t){var i=e.tilePropertyName;if(Object(a.default)(i)){var n=l(t[i],i);return Object(a.default)(n)?(e._maximum=Math.max(n,e._maximum),e._minimum=Math.min(n,e._minimum),n):(e.tilePropertyName=void 0,n)}}(this,e),s=this._previousMinimum,d=this._previousMaximum;if(s!==Number.MAX_VALUE&&d!==-Number.MAX_VALUE){var c=d-s+o.default.EPSILON7,f=o.default.clamp(r-s,0,c)/c*(u.length-1),h=Math.floor(f),p=Math.ceil(f),m=f-h,_=u[h],g=u[p],v=n.default.clone(n.default.WHITE);v.red=o.default.lerp(_.red,g.red,m),v.green=o.default.lerp(_.green,g.green,m),v.blue=o.default.lerp(_.blue,g.blue,m),e._debugColor=v}}},s.prototype.resetMinimumMaximum=function(){var e=this.tilePropertyName;if(Object(a.default)(e)){var t=this._referenceMinimum[e],i=this._referenceMaximum[e],n=Object(a.default)(t)&&Object(a.default)(i);this._previousMinimum=n?t:this._minimum,this._previousMaximum=n?i:this._maximum,this._minimum=Number.MAX_VALUE,this._maximum=-Number.MAX_VALUE}},t.a=s},function(e,t,i){"use strict";var n=i(0);function a(){this._style=void 0,this._styleDirty=!1,this._lastStyleTime=0}Object.defineProperties(a.prototype,{style:{get:function(){return this._style},set:function(e){e!==this._style&&(this._style=e,this._styleDirty=!0)}}}),a.prototype.makeDirty=function(){this._styleDirty=!0},a.prototype.resetDirty=function(){this._styleDirty=!1},a.prototype.applyStyle=function(e){if(e.ready&&(!Object(n.default)(this._style)||this._style.ready)){var t=this._styleDirty;t&&++this._lastStyleTime;for(var i=this._lastStyleTime,a=e._statistics,r=t?e._selectedTiles:e._selectedTilesToStyle,o=r.length,s=0;s<o;++s){var l=r[s];if(l.lastStyleTime!==i){var u=l.content;l.lastStyleTime=i,u.applyStyle(this._style),a.numberOfFeaturesStyled+=u.featuresLength,++a.numberOfTilesStyled}}}},t.a=a},function(e,t,i){"use strict";i.d(t,"a",(function(){return d}));var n=i(4),a=i(50),r=i(0),o=i(30),s=i(23),l=i(160),u=i(172);function d(e,t,i){var d=t.extensions["3DTILES_implicit_tiling"];if(n.a.typeOf.object('tileJson.extensions["3DTILES_implicit_tiling"]',d),this.baseResource=e,this.geometricError=t.geometricError,this.metadataSchema=i,!Object(r.default)(t.boundingVolume.box)&&!Object(r.default)(t.boundingVolume.region)&&!Object(l.a)(t.boundingVolume,"3DTILES_bounding_volume_S2"))throw new s.a("Only box, region and 3DTILES_bounding_volume_S2 are supported for implicit tiling");this.boundingVolume=t.boundingVolume,this.refine=t.refine,this.subtreeUriTemplate=new o.default({url:d.subtrees.uri}),this.contentUriTemplates=[],this.contentHeaders=[];for(var c=function(e){if(Object(l.a)(e,"3DTILES_multiple_contents"))return e.extensions["3DTILES_multiple_contents"].content;if(Object(r.default)(e.content))return[e.content];return[]}(t),f=0;f<c.length;f++){var h=c[f];this.contentHeaders.push(Object(a.default)(h,!0));var p=new o.default({url:h.uri});this.contentUriTemplates.push(p)}this.contentCount=this.contentHeaders.length,this.tileHeader=function(e){var t=Object(a.default)(e,!0);delete t.extensions["3DTILES_implicit_tiling"],delete t.content,delete t.extensions["3DTILES_multiple_contents"],0===Object.keys(t.extensions).length&&delete t.extensions;return t}(t),this.subdivisionScheme=u.a[d.subdivisionScheme],this.branchingFactor=u.a.getBranchingFactor(this.subdivisionScheme),this.subtreeLevels=d.subtreeLevels,this.maximumLevel=d.maximumLevel}},function(e,t,i){"use strict";i.d(t,"a",(function(){return l}));var n=i(5),a=i(4),r=i(3),o=i(416),s=i(172);function l(e){if(a.a.typeOf.string("options.subdivisionScheme",e.subdivisionScheme),a.a.typeOf.number("options.subtreeLevels",e.subtreeLevels),a.a.typeOf.number("options.level",e.level),a.a.typeOf.number("options.x",e.x),a.a.typeOf.number("options.y",e.y),e.subdivisionScheme===s.a.OCTREE&&a.a.typeOf.number("options.z",e.z),e.level<0)throw new r.default("level must be non-negative");if(e.x<0)throw new r.default("x must be non-negative");if(e.y<0)throw new r.default("y must be non-negative");if(e.subdivisionScheme===s.a.OCTREE&&e.z<0)throw new r.default("z must be non-negative");var t=1<<e.level;if(e.x>=t)throw new r.default("x is out of range");if(e.y>=t)throw new r.default("y is out of range");if(e.subdivisionScheme===s.a.OCTREE&&e.z>=t)throw new r.default("z is out of range");this.subdivisionScheme=e.subdivisionScheme,this.subtreeLevels=e.subtreeLevels,this.level=e.level,this.x=e.x,this.y=e.y,this.z=void 0,e.subdivisionScheme===s.a.OCTREE&&(this.z=e.z)}function u(e,t){if(e.subdivisionScheme!==t.subdivisionScheme)throw new r.default("coordinates must have same subdivisionScheme");if(e.subtreeLevels!==t.subtreeLevels)throw new r.default("coordinates must have same subtreeLevels")}Object.defineProperties(l.prototype,{childIndex:{get:function(){var e=0;return e|=1&this.x,e|=(1&this.y)<<1,this.subdivisionScheme===s.a.OCTREE&&(e|=(1&this.z)<<2),e}},mortonIndex:{get:function(){return this.subdivisionScheme===s.a.OCTREE?o.a.encode3D(this.x,this.y,this.z):o.a.encode2D(this.x,this.y)}},tileIndex:{get:function(){return(this.subdivisionScheme===s.a.OCTREE?((1<<3*this.level)-1)/7:((1<<2*this.level)-1)/3)+this.mortonIndex}}}),l.prototype.getDescendantCoordinates=function(e){a.a.typeOf.object("offsetCoordinates",e),u(this,e);var t=this.level+e.level,i=(this.x<<e.level)+e.x,n=(this.y<<e.level)+e.y;if(this.subdivisionScheme===s.a.OCTREE){var r=(this.z<<e.level)+e.z;return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:n,z:r})}return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:i,y:n})},l.prototype.getAncestorCoordinates=function(e){if(a.a.typeOf.number("offsetLevels",e),e<0)throw new r.default("offsetLevels must be non-negative");if(e>this.level)throw new r.default("ancestor cannot be above the tileset root");var t=1<<e,i=this.level-e,n=Math.floor(this.x/t),o=Math.floor(this.y/t);if(this.subdivisionScheme===s.a.OCTREE){var u=Math.floor(this.z/t);return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:i,x:n,y:o,z:u})}return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:i,x:n,y:o})},l.prototype.getOffsetCoordinates=function(e){if(a.a.typeOf.object("descendantCoordinates",e),!this.isEqual(e)&&!this.isAncestor(e))throw new r.default("this is not an ancestor of descendant");u(this,e);var t=e.level-this.level,i=1<<t,n=e.x%i,o=e.y%i;if(this.subdivisionScheme===s.a.OCTREE){var d=e.z%i;return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:o,z:d})}return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:t,x:n,y:o})},l.prototype.getChildCoordinates=function(e){a.a.typeOf.number("childIndex",e);var t=s.a.getBranchingFactor(this.subdivisionScheme);if(e<0||t<=e)throw new r.default("childIndex must be at least 0 and less than "+t);var i=this.level+1,n=2*this.x+e%2,o=2*this.y+Math.floor(e/2)%2;if(this.subdivisionScheme===s.a.OCTREE){var u=2*this.z+Math.floor(e/4)%2;return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:i,x:n,y:o,z:u})}return new l({subdivisionScheme:this.subdivisionScheme,subtreeLevels:this.subtreeLevels,level:i,x:n,y:o})},l.prototype.getSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels)},l.prototype.getParentSubtreeCoordinates=function(){return this.getAncestorCoordinates(this.level%this.subtreeLevels+this.subtreeLevels)},l.prototype.isAncestor=function(e){a.a.typeOf.object("descendantCoordinates",e),u(this,e);var t=e.level-this.level;if(t<=0)return!1;var i=e.x>>t,n=e.y>>t,r=this.x===i,o=this.y===n;if(this.subdivisionScheme===s.a.OCTREE){var l=e.z>>t,d=this.z===l;return r&&o&&d}return r&&o},l.prototype.isEqual=function(e){return a.a.typeOf.object("otherCoordinates",e),this.subdivisionScheme===e.subdivisionScheme&&this.subtreeLevels===e.subtreeLevels&&this.level===e.level&&this.x===e.x&&this.y===e.y&&(this.subdivisionScheme!==s.a.OCTREE||this.z===e.z)},l.prototype.isImplicitTilesetRoot=function(){return 0===this.level},l.prototype.isSubtreeRoot=function(){return this.level%this.subtreeLevels==0},l.prototype.isBottomOfSubtree=function(){return this.level%this.subtreeLevels==this.subtreeLevels-1},l.prototype.getTemplateValues=function(){var e={level:this.level,x:this.x,y:this.y};return this.subdivisionScheme===s.a.OCTREE&&(e.z=this.z),e};var d=[0,0,0];l.fromMortonIndex=function(e,t,i,n){var a;return e===s.a.OCTREE?new l({subdivisionScheme:e,subtreeLevels:t,level:i,x:(a=o.a.decode3D(n,d))[0],y:a[1],z:a[2]}):new l({subdivisionScheme:e,subtreeLevels:t,level:i,x:(a=o.a.decode2D(n,d))[0],y:a[1]})},l.fromTileIndex=function(e,t,i){var a,r;return r=e===s.a.OCTREE?i-((1<<3*(a=Math.floor(n.default.log2(7*i+1)/3)))-1)/7:i-((1<<2*(a=Math.floor(n.default.log2(3*i+1)/2)))-1)/3,l.fromMortonIndex(e,t,a,r)}},function(e,t,i){"use strict";var n=i(47),a=i(1),r=i(0),o=i(19),s=i(3),l=i(14),u=i(12),d=i(6),c=i(98),f=i(76),h=i(52),p=i(330),m=i(13),_=i(212),g=i(238),v=i(158),y=i(9),b=i(368),w=i(208),O=i(338),x=i(382),A=new f.default,T=new f.default,E=new f.default;function C(e){this.entity=e,this.polyline=void 0,this.index=void 0,this.updater=void 0}function S(e,t,i,n,a,o,s,u){for(;e instanceof b.a;)e=e.resolvedProperty;e instanceof w.default?s=function(e,t,i,n,a,o,s,u,d){var c,f=u;c=e.getValueInReferenceFrame(t,o,d[f]),Object(r.default)(c)&&(d[f++]=c);for(var h,p,m,_=!Object(r.default)(a)||l.default.lessThanOrEquals(a,t)||l.default.greaterThanOrEquals(a,i),g=0,v=n.length,y=n[g],b=i,w=!1;g<v;){if(!_&&l.default.greaterThanOrEquals(y,a)&&(c=e.getValueInReferenceFrame(a,o,d[f]),Object(r.default)(c)&&(d[f++]=c),_=!0),l.default.greaterThan(y,t)&&l.default.lessThan(y,b)&&!y.equals(a)&&(c=e.getValueInReferenceFrame(y,o,d[f]),Object(r.default)(c)&&(d[f++]=c)),g<v-1){if(s>0&&!w){var O=n[g+1],x=l.default.secondsDifference(O,y);(w=x>s)&&(h=Math.ceil(x/s),p=0,m=x/Math.max(h,2),h=Math.max(h-1,1))}if(w&&p<h){y=l.default.addSeconds(y,m,new l.default),p++;continue}}w=!1,y=n[++g]}return c=e.getValueInReferenceFrame(i,o,d[f]),Object(r.default)(c)&&(d[f++]=c),f}(e,t,i,e._property._times,n,a,o,s,u):s=e instanceof _.a?function(e,t,i,n,a,r,o,s){T.start=t,T.stop=i;for(var u=o,d=e.intervals,c=0;c<d.length;c++){var h=d.get(c);if(!f.default.intersect(h,T,A).isEmpty){var p=h.start,m=h.stop,_=t;l.default.greaterThan(p,_)&&(_=p);var g=i;l.default.lessThan(m,g)&&(g=m),u=S(h.data,_,g,n,a,r,u,s)}}return u}(e,t,i,n,a,o,s,u):e instanceof x.a?function(e,t,i,n,a,o,s,u){E.start=t,E.stop=i;for(var d=s,c=e.intervals,h=0;h<c.length;h++){var p=c.get(h);if(!f.default.intersect(p,E,A).isEmpty){var m=p.start;p.isStartIncluded||(m=p.isStopIncluded?p.stop:l.default.addSeconds(p.start,l.default.secondsDifference(p.stop,p.start)/2,new l.default));var _=e.getValueInReferenceFrame(m,a,u[d]);Object(r.default)(_)&&(u[d]=_,d++)}}return d}(e,t,i,0,a,0,s,u):e instanceof g.a||e instanceof O.a&&y.default.isConstant(e)?function(e,t,i,n,a,o,s,l){var u=e.getValueInReferenceFrame(t,a,l[s]);return Object(r.default)(u)&&(l[s++]=u),s}(e,t,0,0,a,0,s,u):function(e,t,i,n,a,o,s,u){for(var d,c=0,f=s,h=t,p=Math.max(o,60),m=!Object(r.default)(n)||l.default.lessThanOrEquals(n,t)||l.default.greaterThanOrEquals(n,i);l.default.lessThan(h,i);)!m&&l.default.greaterThanOrEquals(h,n)&&(m=!0,d=e.getValueInReferenceFrame(n,a,u[f]),Object(r.default)(d)&&(u[f]=d,f++)),d=e.getValueInReferenceFrame(h,a,u[f]),Object(r.default)(d)&&(u[f]=d,f++),c++,h=l.default.addSeconds(t,p*c,new l.default);return d=e.getValueInReferenceFrame(i,a,u[f]),Object(r.default)(d)&&(u[f]=d,f++),f}(e,t,i,n,a,o,s,u);return s}function M(e,t,i,n,a,o,s){Object(r.default)(s)||(s=[]);var l=S(e,t,i,n,a,o,0,s);return s.length=l,s}var D=new u.default;function P(e,t){this._unusedIndexes=[],this._polylineCollection=new p.default,this._scene=e,this._referenceFrame=t,e.primitives.add(this._polylineCollection)}function I(e,t){if(!Object(r.default)(e))throw new s.default("scene is required.");if(!Object(r.default)(t))throw new s.default("entityCollection is required.");t.collectionChanged.addEventListener(I.prototype._onCollectionChanged,this),this._scene=e,this._updaters={},this._entityCollection=t,this._items=new n.default,this._onCollectionChanged(t,t.values,[],[])}P.prototype.update=function(e){if(this._referenceFrame===c.default.INERTIAL){var t=h.default.computeIcrfToFixedMatrix(e,D);Object(r.default)(t)||(t=h.default.computeTemeToPseudoFixedMatrix(e,D)),d.default.fromRotationTranslation(t,a.default.ZERO,this._polylineCollection.modelMatrix)}},P.prototype.updateObject=function(e,t){var i,n,a=t.entity,o=a._path,s=a._position,u=o._show,d=t.polyline,c=a.isShowing&&(!Object(r.default)(u)||u.getValue(e));if(c){var f=y.default.getValueOrUndefined(o._leadTime,e),h=y.default.getValueOrUndefined(o._trailTime,e),p=a._availability,m=Object(r.default)(p),_=Object(r.default)(f),g=Object(r.default)(h);if(c=m||_&&g){if(g&&(i=l.default.addSeconds(e,-h,new l.default)),_&&(n=l.default.addSeconds(e,f,new l.default)),m){var b=p.start,w=p.stop;g&&!l.default.greaterThan(b,i)||(i=b),_&&!l.default.lessThan(w,n)||(n=w)}c=l.default.lessThan(i,n)}}if(c){if(!Object(r.default)(d)){var O=this._unusedIndexes;if(O.length>0){var x=O.pop();d=this._polylineCollection.get(x),t.index=x}else t.index=this._polylineCollection.length,d=this._polylineCollection.add();d.id=a,t.polyline=d}var A=y.default.getValueOrDefault(o._resolution,e,60);d.show=!0,d.positions=M(s,i,n,e,this._referenceFrame,A,d.positions.slice()),d.material=v.default.getValue(e,o._material,d.material),d.width=y.default.getValueOrDefault(o._width,e,1),d.distanceDisplayCondition=y.default.getValueOrUndefined(o._distanceDisplayCondition,e,d.distanceDisplayCondition)}else Object(r.default)(d)&&(this._unusedIndexes.push(t.index),t.polyline=void 0,d.show=!1,t.index=void 0)},P.prototype.removeObject=function(e){var t=e.polyline;Object(r.default)(t)&&(this._unusedIndexes.push(e.index),e.polyline=void 0,t.show=!1,t.id=void 0,e.index=void 0)},P.prototype.destroy=function(){return this._scene.primitives.remove(this._polylineCollection),Object(o.default)(this)},I.prototype.update=function(e){if(!Object(r.default)(e))throw new s.default("time is required.");var t=this._updaters;for(var i in t)t.hasOwnProperty(i)&&t[i].update(e);var n=this._items.values;if(0===n.length&&Object(r.default)(this._updaters)&&Object.keys(this._updaters).length>0){for(var a in t)t.hasOwnProperty(a)&&t[a].destroy();this._updaters={}}for(var o=0,l=n.length;o<l;o++){var u=n[o],d=u.entity._position,f=u.updater,h=c.default.FIXED;this._scene.mode===m.default.SCENE3D&&(h=d.referenceFrame);var p=this._updaters[h];f===p&&Object(r.default)(p)?p.updateObject(e,u):(Object(r.default)(f)&&f.removeObject(u),Object(r.default)(p)||((p=new P(this._scene,h)).update(e),this._updaters[h]=p),u.updater=p,Object(r.default)(p)&&p.updateObject(e,u))}return!0},I.prototype.isDestroyed=function(){return!1},I.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(I.prototype._onCollectionChanged,this);var e=this._updaters;for(var t in e)e.hasOwnProperty(t)&&e[t].destroy();return Object(o.default)(this)},I.prototype._onCollectionChanged=function(e,t,i,n){var a,o,s,l=this._items;for(a=t.length-1;a>-1;a--)o=t[a],Object(r.default)(o._path)&&Object(r.default)(o._position)&&l.set(o.id,new C(o));for(a=n.length-1;a>-1;a--)o=n[a],Object(r.default)(o._path)&&Object(r.default)(o._position)?l.contains(o.id)||l.set(o.id,new C(o)):(s=l.get(o.id),Object(r.default)(s)&&(Object(r.default)(s.updater)&&s.updater.removeObject(s),l.remove(o.id)));for(a=i.length-1;a>-1;a--)o=i[a],s=l.get(o.id),Object(r.default)(s)&&(Object(r.default)(s.updater)&&s.updater.removeObject(s),l.remove(o.id))},I._subSample=M,t.a=I},function(e,t,i){"use strict";var n=i(47),a=i(1),r=i(7),o=i(0),s=i(19),l=i(3),u=i(49),d=i(65),c=i(465),f=i(42),h=i(48),p=i(9),m=r.default.WHITE,_=r.default.BLACK,g=new r.default,v=new a.default,y=new r.default,b=new d.a,w=new d.a,O=new u.default;function x(e){this.entity=e,this.pointPrimitive=void 0,this.billboard=void 0,this.color=void 0,this.outlineColor=void 0,this.pixelSize=void 0,this.outlineWidth=void 0}function A(e,t){if(!Object(o.default)(e))throw new l.default("entityCluster is required.");if(!Object(o.default)(t))throw new l.default("entityCollection is required.");t.collectionChanged.addEventListener(A.prototype._onCollectionChanged,this),this._cluster=e,this._entityCollection=t,this._items=new n.default,this._onCollectionChanged(t,t.values,[],[])}function T(e,t,i){if(Object(o.default)(e)){var n=e.pointPrimitive;if(Object(o.default)(n))return e.pointPrimitive=void 0,void i.removePoint(t);var a=e.billboard;Object(o.default)(a)&&(e.billboard=void 0,i.removeBillboard(t))}}A.prototype.update=function(e){if(!Object(o.default)(e))throw new l.default("time is required.");for(var t=this._items.values,i=this._cluster,n=0,s=t.length;n<s;n++){var u,d=t[n],h=d.entity,x=h._point,A=d.pointPrimitive,E=d.billboard,C=p.default.getValueOrDefault(x._heightReference,e,f.a.NONE),S=h.isShowing&&h.isAvailable(e)&&p.default.getValueOrDefault(x._show,e,!0);if(S&&(u=p.default.getValueOrUndefined(h._position,e,v),S=Object(o.default)(u)),S){p.default.isConstant(h._position)||(i._clusterDirty=!0);var M=!1,D=!1;if(C===f.a.NONE||Object(o.default)(E)?C!==f.a.NONE||Object(o.default)(A)||(Object(o.default)(E)&&(T(d,h,i),E=void 0),(A=i.getPoint(h)).id=h,d.pointPrimitive=A):(Object(o.default)(A)&&(T(d,h,i),A=void 0),(E=i.getBillboard(h)).id=h,E.image=void 0,d.billboard=E,M=!0,D=a.default.equals(E.position,u)&&E.heightReference===C),Object(o.default)(A))A.show=!0,A.position=u,A.scaleByDistance=p.default.getValueOrUndefined(x._scaleByDistance,e,b),A.translucencyByDistance=p.default.getValueOrUndefined(x._translucencyByDistance,e,w),A.color=p.default.getValueOrDefault(x._color,e,m,g),A.outlineColor=p.default.getValueOrDefault(x._outlineColor,e,_,y),A.outlineWidth=p.default.getValueOrDefault(x._outlineWidth,e,0),A.pixelSize=p.default.getValueOrDefault(x._pixelSize,e,1),A.distanceDisplayCondition=p.default.getValueOrUndefined(x._distanceDisplayCondition,e,O),A.disableDepthTestDistance=p.default.getValueOrDefault(x._disableDepthTestDistance,e,0);else if(Object(o.default)(E)){E.show=!0,E.position=u,E.scaleByDistance=p.default.getValueOrUndefined(x._scaleByDistance,e,b),E.translucencyByDistance=p.default.getValueOrUndefined(x._translucencyByDistance,e,w),E.distanceDisplayCondition=p.default.getValueOrUndefined(x._distanceDisplayCondition,e,O),E.disableDepthTestDistance=p.default.getValueOrDefault(x._disableDepthTestDistance,e,0),E.heightReference=C;var P=p.default.getValueOrDefault(x._color,e,m,g),I=p.default.getValueOrDefault(x._outlineColor,e,_,y),L=Math.round(p.default.getValueOrDefault(x._outlineWidth,e,0)),j=Math.max(1,Math.round(p.default.getValueOrDefault(x._pixelSize,e,1)));if(L>0?(E.scale=1,M=M||L!==d.outlineWidth||j!==d.pixelSize||!r.default.equals(P,d.color)||!r.default.equals(I,d.outlineColor)):(E.scale=j/50,j=50,M=M||L!==d.outlineWidth||!r.default.equals(P,d.color)||!r.default.equals(I,d.outlineColor)),M){d.color=r.default.clone(P,d.color),d.outlineColor=r.default.clone(I,d.outlineColor),d.pixelSize=j,d.outlineWidth=L;var R=P.alpha,N=P.toCssColorString(),B=I.toCssColorString(),F=JSON.stringify([N,j,B,L]);E.setImage(F,Object(c.a)(R,N,B,L,j))}D&&E._updateClamping()}}else T(d,h,i)}return!0},A.prototype.getBoundingSphere=function(e,t){if(!Object(o.default)(e))throw new l.default("entity is required.");if(!Object(o.default)(t))throw new l.default("result is required.");var i=this._items.get(e.id);if(!Object(o.default)(i)||!Object(o.default)(i.pointPrimitive)&&!Object(o.default)(i.billboard))return h.a.FAILED;if(Object(o.default)(i.pointPrimitive))t.center=a.default.clone(i.pointPrimitive.position,t.center);else{var n=i.billboard;if(!Object(o.default)(n._clampedPosition))return h.a.PENDING;t.center=a.default.clone(n._clampedPosition,t.center)}return t.radius=0,h.a.DONE},A.prototype.isDestroyed=function(){return!1},A.prototype.destroy=function(){this._entityCollection.collectionChanged.removeEventListener(A.prototype._onCollectionChanged,this);for(var e=this._entityCollection.values,t=0;t<e.length;t++)this._cluster.removePoint(e[t]);return Object(s.default)(this)},A.prototype._onCollectionChanged=function(e,t,i,n){var a,r,s=this._items,l=this._cluster;for(a=t.length-1;a>-1;a--)r=t[a],Object(o.default)(r._point)&&Object(o.default)(r._position)&&s.set(r.id,new x(r));for(a=n.length-1;a>-1;a--)r=n[a],Object(o.default)(r._point)&&Object(o.default)(r._position)?s.contains(r.id)||s.set(r.id,new x(r)):(T(s.get(r.id),r,l),s.remove(r.id));for(a=i.length-1;a>-1;a--)r=i[a],T(s.get(r.id),r,l),s.remove(r.id)},t.a=A},function(e,t,i){"use strict";var n=i(47),a=i(17),r=i(4),o=i(2),s=i(0),l=i(19),u=i(97),d=i(143),c=i(156),f=i(86),h=i(48),p=i(63),m=i(454),_=i(964),g=i(295),v=i(296),y=i(965),b=[];function w(e,t){for(var i=e._batches,n=i.length,a=0;a<n;a++)i[a].remove(t)}function O(e,t,i){if(i.isDynamic)e._dynamicBatch.add(t,i);else if(i.clampToGround&&i.fillEnabled){var n=i.classificationTypeProperty.getValue(t);e._groundBatches[n].add(t,i)}else{var a;i.fillEnabled&&(a=i.shadowsProperty.getValue(t));var r,o=0;Object(s.default)(i.depthFailMaterialProperty)&&(o=i.depthFailMaterialProperty instanceof p.a?1:2),Object(s.default)(a)&&(r=a+o*f.a.NUMBER_OF_SHADOW_MODES),i.fillEnabled&&(i.fillMaterialProperty instanceof p.a?e._colorBatches[r].add(t,i):e._materialBatches[r].add(t,i))}}function x(e,t,i,a){var s;r.a.defined("scene",e),r.a.defined("entityCollection",t),a=Object(o.default)(a,e.groundPrimitives),i=Object(o.default)(i,e.primitives),this._scene=e,this._primitives=i,this._entityCollection=void 0,this._addedObjects=new n.default,this._removedObjects=new n.default,this._changedObjects=new n.default;var l=f.a.NUMBER_OF_SHADOW_MODES;for(this._colorBatches=new Array(3*l),this._materialBatches=new Array(3*l),s=0;s<l;++s)this._colorBatches[s]=new g.a(i,d.default,void 0,!1,s),this._materialBatches[s]=new v.a(i,c.default,void 0,!1,s),this._colorBatches[s+l]=new g.a(i,d.default,d.default,!1,s),this._materialBatches[s+l]=new v.a(i,c.default,d.default,!1,s),this._colorBatches[s+2*l]=new g.a(i,d.default,c.default,!1,s),this._materialBatches[s+2*l]=new v.a(i,c.default,c.default,!1,s);this._dynamicBatch=new m.a(i,a);var h=u.default.NUMBER_OF_CLASSIFICATION_TYPES;for(this._groundBatches=new Array(h),s=0;s<h;++s)this._groundBatches[s]=new y.a(a,s);this._batches=this._colorBatches.concat(this._materialBatches,this._dynamicBatch,this._groundBatches),this._subscriptions=new n.default,this._updaters=new n.default,this._entityCollection=t,t.collectionChanged.addEventListener(x.prototype._onCollectionChanged,this),this._onCollectionChanged(t,t.values,b)}x.prototype.update=function(e){r.a.defined("time",e);var t,i,n,a,o=this._addedObjects,s=o.values,l=this._removedObjects,u=l.values,d=this._changedObjects,c=d.values;for(t=c.length-1;t>-1;t--)n=(i=c[t]).id,(a=this._updaters.get(n)).entity===i?(w(this,a),O(this,e,a)):(u.push(i),s.push(i));for(t=u.length-1;t>-1;t--)n=(i=u[t]).id,w(this,a=this._updaters.get(n)),a.destroy(),this._updaters.remove(n),this._subscriptions.get(n)(),this._subscriptions.remove(n);for(t=s.length-1;t>-1;t--)n=(i=s[t]).id,a=new _.a(i,this._scene),this._updaters.set(n,a),O(this,e,a),this._subscriptions.set(n,a.geometryChanged.addEventListener(x._onGeometryChanged,this));o.removeAll(),l.removeAll(),d.removeAll();var f=!0,h=this._batches,p=h.length;for(t=0;t<p;t++)f=h[t].update(e)&&f;return f};var A=[],T=new a.default;x.prototype.getBoundingSphere=function(e,t){r.a.defined("entity",e),r.a.defined("result",t);for(var i=A,n=T,o=0,s=h.a.DONE,l=this._batches,u=l.length,d=this._updaters.get(e.id),c=0;c<u;c++){if((s=l[c].getBoundingSphere(d,n))===h.a.PENDING)return h.a.PENDING;s===h.a.DONE&&(i[o]=a.default.clone(n,i[o]),o++)}return 0===o?h.a.FAILED:(i.length=o,a.default.fromBoundingSpheres(i,t),h.a.DONE)},x.prototype.isDestroyed=function(){return!1},x.prototype.destroy=function(){var e;this._entityCollection.collectionChanged.removeEventListener(x.prototype._onCollectionChanged,this),this._addedObjects.removeAll(),this._removedObjects.removeAll();var t=this._batches,i=t.length;for(e=0;e<i;e++)t[e].removeAllPrimitives();var n=this._subscriptions.values;for(i=n.length,e=0;e<i;e++)n[e]();return this._subscriptions.removeAll(),Object(l.default)(this)},x._onGeometryChanged=function(e){var t=this._removedObjects,i=this._changedObjects,n=e.entity,a=n.id;Object(s.default)(t.get(a))||Object(s.default)(i.get(a))||i.set(a,n)},x.prototype._onCollectionChanged=function(e,t,i){var n,a,r,o=this._addedObjects,s=this._removedObjects,l=this._changedObjects;for(n=i.length-1;n>-1;n--)a=(r=i[n]).id,o.remove(a)||(s.set(a,r),l.remove(a));for(n=t.length-1;n>-1;n--)a=(r=t[n]).id,s.remove(a)?l.set(a,r):o.set(a,r)},t.a=x},function(e,t,i){"use strict";var n=i(54),a=i(17),r=i(4),o=i(7),s=i(53),l=i(2),u=i(0),d=i(19),c=i(3),f=i(49),h=i(96),p=i(24),m=i(43),_=i(349),g=i(40),v=i(70),y=i(185),b=i(130),w=i(87),O=i(170),x=i(97),A=i(263),T=i(330),E=i(143),C=i(156),S=i(86),M=i(48),D=i(63),P=i(109),I=i(158),L=i(9),j=new P.default(0),R={},N=new o.default,B=new D.a(o.default.WHITE),F=new P.default(!0),k=new P.default(S.a.DISABLED),z=new P.default(new f.default),U=new P.default(x.default.BOTH);function V(){this.vertexFormat=void 0,this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function H(){this.positions=void 0,this.width=void 0,this.arcType=void 0,this.granularity=void 0}function G(e,t){if(!Object(u.default)(e))throw new c.default("entity is required");if(!Object(u.default)(t))throw new c.default("scene is required");this._entity=e,this._scene=t,this._entitySubscription=e.definitionChanged.addEventListener(G.prototype._onEntityPropertyChanged,this),this._fillEnabled=!1,this._dynamic=!1,this._geometryChanged=new p.default,this._showProperty=void 0,this._materialProperty=void 0,this._shadowsProperty=void 0,this._distanceDisplayConditionProperty=void 0,this._classificationTypeProperty=void 0,this._depthFailMaterialProperty=void 0,this._geometryOptions=new V,this._groundGeometryOptions=new H,this._id="polyline-"+e.id,this._clampToGround=!1,this._supportsPolylinesOnTerrain=O.a.supportsPolylinesOnTerrain(t),this._zIndex=0,this._onEntityPropertyChanged(e,"polyline",e.polyline,void 0)}Object.defineProperties(G.prototype,{id:{get:function(){return this._id}},entity:{get:function(){return this._entity}},fillEnabled:{get:function(){return this._fillEnabled}},hasConstantFill:{get:function(){return!this._fillEnabled||!Object(u.default)(this._entity.availability)&&L.default.isConstant(this._showProperty)}},fillMaterialProperty:{get:function(){return this._materialProperty}},depthFailMaterialProperty:{get:function(){return this._depthFailMaterialProperty}},outlineEnabled:{value:!1},hasConstantOutline:{value:!0},outlineColorProperty:{value:void 0},shadowsProperty:{get:function(){return this._shadowsProperty}},distanceDisplayConditionProperty:{get:function(){return this._distanceDisplayConditionProperty}},classificationTypeProperty:{get:function(){return this._classificationTypeProperty}},isDynamic:{get:function(){return this._dynamic}},isClosed:{value:!1},geometryChanged:{get:function(){return this._geometryChanged}},arcType:{get:function(){return this._arcType}},clampToGround:{get:function(){return this._clampToGround&&this._supportsPolylinesOnTerrain}},zIndex:{get:function(){return this._zIndex}}}),G.prototype.isOutlineVisible=function(e){return!1},G.prototype.isFilled=function(e){var t=this._entity,i=this._fillEnabled&&t.isAvailable(e)&&this._showProperty.getValue(e);return Object(l.default)(i,!1)},G.prototype.createFillGeometryInstance=function(e){if(!Object(u.default)(e))throw new c.default("time is required.");if(!this._fillEnabled)throw new c.default("This instance does not represent a filled geometry.");var t,i=this._entity,n=i.isAvailable(e),a=new w.default(n&&i.isShowing&&this._showProperty.getValue(e)),r=this._distanceDisplayConditionProperty.getValue(e),l={show:a,distanceDisplayCondition:h.a.fromDistanceDisplayCondition(r)};return this._materialProperty instanceof D.a&&(Object(u.default)(this._materialProperty.color)&&(this._materialProperty.color.isConstant||n)&&(t=this._materialProperty.color.getValue(e,N)),Object(u.default)(t)||(t=o.default.WHITE),l.color=s.default.fromColor(t)),this.clampToGround?new m.default({id:i,geometry:new _.default(this._groundGeometryOptions),attributes:l}):(Object(u.default)(this._depthFailMaterialProperty)&&this._depthFailMaterialProperty instanceof D.a&&(Object(u.default)(this._depthFailMaterialProperty.color)&&(this._depthFailMaterialProperty.color.isConstant||n)&&(t=this._depthFailMaterialProperty.color.getValue(e,N)),Object(u.default)(t)||(t=o.default.WHITE),l.depthFailColor=s.default.fromColor(t)),new m.default({id:i,geometry:new y.default(this._geometryOptions),attributes:l}))},G.prototype.createOutlineGeometryInstance=function(e){throw new c.default("This instance does not represent an outlined geometry.")},G.prototype.isDestroyed=function(){return!1},G.prototype.destroy=function(){this._entitySubscription(),Object(d.default)(this)},G.prototype._onEntityPropertyChanged=function(e,t,i,n){if("availability"===t||"polyline"===t){var a=this._entity.polyline;if(Object(u.default)(a)){var r=a.positions,o=a.show;if(Object(u.default)(o)&&o.isConstant&&!o.getValue(g.a.MINIMUM_VALUE)||!Object(u.default)(r))this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this));else{var s=a.zIndex,d=Object(l.default)(a.material,B),c=d instanceof D.a;this._materialProperty=d,this._depthFailMaterialProperty=a.depthFailMaterial,this._showProperty=Object(l.default)(o,F),this._shadowsProperty=Object(l.default)(a.shadows,k),this._distanceDisplayConditionProperty=Object(l.default)(a.distanceDisplayCondition,z),this._classificationTypeProperty=Object(l.default)(a.classificationType,U),this._fillEnabled=!0,this._zIndex=Object(l.default)(s,j);var f=a.width,h=a.arcType,p=a.clampToGround,m=a.granularity;if(r.isConstant&&L.default.isConstant(f)&&L.default.isConstant(h)&&L.default.isConstant(m)&&L.default.isConstant(p)&&L.default.isConstant(s)){var _,y=this._geometryOptions,b=r.getValue(g.a.MINIMUM_VALUE,y.positions);if(!Object(u.default)(b)||b.length<2)return void(this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this)));_=c&&(!Object(u.default)(this._depthFailMaterialProperty)||this._depthFailMaterialProperty instanceof D.a)?E.default.VERTEX_FORMAT:C.default.VERTEX_FORMAT,y.vertexFormat=_,y.positions=b,y.width=Object(u.default)(f)?f.getValue(g.a.MINIMUM_VALUE):void 0,y.arcType=Object(u.default)(h)?h.getValue(g.a.MINIMUM_VALUE):void 0,y.granularity=Object(u.default)(m)?m.getValue(g.a.MINIMUM_VALUE):void 0;var w=this._groundGeometryOptions;w.positions=b,w.width=y.width,w.arcType=y.arcType,w.granularity=y.granularity,this._clampToGround=!!Object(u.default)(p)&&p.getValue(g.a.MINIMUM_VALUE),!this._clampToGround&&Object(u.default)(s)&&Object(v.a)("Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored."),this._dynamic=!1,this._geometryChanged.raiseEvent(this)}else this._dynamic||(this._dynamic=!0,this._geometryChanged.raiseEvent(this))}}else this._fillEnabled&&(this._fillEnabled=!1,this._geometryChanged.raiseEvent(this))}},G.prototype.createDynamicUpdater=function(e,t){if(r.a.defined("primitives",e),r.a.defined("groundPrimitives",t),!this._dynamic)throw new c.default("This instance does not represent dynamic geometry.");return new W(e,t,this)};var Y={positions:void 0,granularity:void 0,height:void 0,ellipsoid:void 0};function W(e,t,i){this._line=void 0,this._primitives=e,this._groundPrimitives=t,this._groundPolylinePrimitive=void 0,this._material=void 0,this._geometryUpdater=i,this._positions=[]}function q(e){if(Object(u.default)(e._line))return e._line;var t=e._geometryUpdater._scene.id,i=R[t],n=e._primitives;!Object(u.default)(i)||i.isDestroyed()?(i=new T.default,R[t]=i,n.add(i)):n.contains(i)||n.add(i);var a=i.add();return a.id=e._geometryUpdater._entity,e._line=a,a}W.prototype.update=function(e){var t=this._geometryUpdater,i=t._entity,a=i.polyline,r=a.positions,o=L.default.getValueOrUndefined(r,e,this._positions);t._clampToGround=L.default.getValueOrDefault(a._clampToGround,e,!1),t._groundGeometryOptions.positions=o,t._groundGeometryOptions.width=L.default.getValueOrDefault(a._width,e,1),t._groundGeometryOptions.arcType=L.default.getValueOrDefault(a._arcType,e,n.default.GEODESIC),t._groundGeometryOptions.granularity=L.default.getValueOrDefault(a._granularity,e,9999);var s=this._groundPrimitives;if(Object(u.default)(this._groundPolylinePrimitive)&&(s.remove(this._groundPolylinePrimitive),this._groundPolylinePrimitive=void 0),t.clampToGround){if(!i.isShowing||!i.isAvailable(e)||!L.default.getValueOrDefault(a._show,e,!0))return;if(!Object(u.default)(o)||o.length<2)return;var l,d=t.fillMaterialProperty;if(d instanceof D.a)l=new E.default;else{var c=I.default.getValue(e,d,this._material);l=new C.default({material:c,translucent:c.isTranslucent()}),this._material=c}return this._groundPolylinePrimitive=s.add(new A.default({geometryInstances:t.createFillGeometryInstance(e),appearance:l,classificationType:t.classificationTypeProperty.getValue(e),asynchronous:!1}),L.default.getValueOrUndefined(t.zIndex,e)),void(Object(u.default)(this._line)&&(this._line.show=!1))}var f=q(this);if(i.isShowing&&i.isAvailable(e)&&L.default.getValueOrDefault(a._show,e,!0))if(!Object(u.default)(o)||o.length<2)f.show=!1;else{var h=n.default.GEODESIC;h=L.default.getValueOrDefault(a._arcType,e,h);var p=t._scene.globe;h!==n.default.NONE&&Object(u.default)(p)&&(Y.ellipsoid=p.ellipsoid,Y.positions=o,Y.granularity=L.default.getValueOrUndefined(a._granularity,e),Y.height=b.a.extractHeights(o,p.ellipsoid),o=h===n.default.GEODESIC?b.a.generateCartesianArc(Y):b.a.generateCartesianRhumbArc(Y)),f.show=!0,f.positions=o.slice(),f.material=I.default.getValue(e,t.fillMaterialProperty,f.material),f.width=L.default.getValueOrDefault(a._width,e,1),f.distanceDisplayCondition=L.default.getValueOrUndefined(a._distanceDisplayCondition,e,f.distanceDisplayCondition)}else f.show=!1},W.prototype.getBoundingSphere=function(e){if(r.a.defined("result",e),this._geometryUpdater.clampToGround){var t=this._groundPolylinePrimitive;if(Object(u.default)(t)&&t.show&&t.ready){var i=t.getGeometryInstanceAttributes(this._geometryUpdater._entity);if(Object(u.default)(i)&&Object(u.default)(i.boundingSphere))return a.default.clone(i.boundingSphere,e),M.a.DONE}return Object(u.default)(t)&&!t.ready?M.a.PENDING:M.a.DONE}var n=q(this);return n.show&&n.positions.length>0?(a.default.fromPoints(n.positions,e),M.a.DONE):M.a.FAILED},W.prototype.isDestroyed=function(){return!1},W.prototype.destroy=function(){var e=this._geometryUpdater._scene.id,t=R[e];Object(u.default)(t)&&(t.remove(this._line),0===t.length&&(this._primitives.removeAndDestroy(t),delete R[e])),Object(u.default)(this._groundPolylinePrimitive)&&this._groundPrimitives.remove(this._groundPolylinePrimitive),Object(d.default)(this)},t.a=G},function(e,t,i){"use strict";var n=i(47),a=i(7),r=i(53),o=i(2),s=i(0),l=i(49),u=i(96),d=i(87),c=i(263),f=i(143),h=i(156),p=i(48),m=i(63),_=i(158),g=i(9),v=new a.default,y=new l.default,b=new l.default;function w(e,t,i,a,r){var o;o=i instanceof m.a?f.default:h.default,this.orderedGroundPrimitives=e,this.classificationType=t,this.appearanceType=o,this.materialProperty=i,this.updaters=new n.default,this.createPrimitive=!0,this.primitive=void 0,this.oldPrimitive=void 0,this.geometry=new n.default,this.material=void 0,this.updatersWithAttributes=new n.default,this.attributes=new n.default,this.invalidated=!1,this.removeMaterialSubscription=i.definitionChanged.addEventListener(w.prototype.onMaterialChanged,this),this.subscriptions=new n.default,this.showsUpdated=new n.default,this.zIndex=a,this._asynchronous=r}function O(e,t,i){this._items=[],this._orderedGroundPrimitives=e,this._classificationType=t,this._asynchronous=Object(o.default)(i,!0)}w.prototype.onMaterialChanged=function(){this.invalidated=!0},w.prototype.isMaterial=function(e){var t=this.materialProperty,i=e.fillMaterialProperty;return i===t||i instanceof m.a&&t instanceof m.a||Object(s.default)(t)&&t.equals(i)},w.prototype.add=function(e,t,i){var n=t.id;if(this.updaters.set(n,t),this.geometry.set(n,i),t.hasConstantFill&&t.fillMaterialProperty.isConstant&&g.default.isConstant(t.distanceDisplayConditionProperty)){var a=this;this.subscriptions.set(n,t.entity.definitionChanged.addEventListener((function(e,i,n,r){"isShowing"===i&&a.showsUpdated.set(t.id,t)})))}else this.updatersWithAttributes.set(n,t);this.createPrimitive=!0},w.prototype.remove=function(e){var t=e.id;if(this.createPrimitive=this.geometry.remove(t)||this.createPrimitive,this.updaters.remove(t)){this.updatersWithAttributes.remove(t);var i=this.subscriptions.get(t);return Object(s.default)(i)&&(i(),this.subscriptions.remove(t)),!0}return!1},w.prototype.update=function(e){var t,i=!0,n=this.primitive,o=this.orderedGroundPrimitives,f=this.geometry.values;if(this.createPrimitive){if(f.length>0)Object(s.default)(n)&&(Object(s.default)(this.oldPrimitive)?o.remove(n):this.oldPrimitive=n),n=new c.default({show:!1,asynchronous:this._asynchronous,geometryInstances:f.slice(),appearance:new this.appearanceType,classificationType:this.classificationType}),this.appearanceType===h.default&&(this.material=_.default.getValue(e,this.materialProperty,this.material),n.appearance.material=this.material),o.add(n,this.zIndex),i=!1;else{Object(s.default)(n)&&(o.remove(n),n=void 0);var p=this.oldPrimitive;Object(s.default)(p)&&(o.remove(p),this.oldPrimitive=void 0)}this.attributes.removeAll(),this.primitive=n,this.createPrimitive=!1}else if(Object(s.default)(n)&&n.ready){n.show=!0,Object(s.default)(this.oldPrimitive)&&(o.remove(this.oldPrimitive),this.oldPrimitive=void 0),this.appearanceType===h.default&&(this.material=_.default.getValue(e,this.materialProperty,this.material),this.primitive.appearance.material=this.material);var m=this.updatersWithAttributes.values,w=m.length;for(t=0;t<w;t++){var O=m[t],x=O.entity,A=this.geometry.get(O.id),T=this.attributes.get(A.id.id);if(Object(s.default)(T)||(T=n.getGeometryInstanceAttributes(A.id),this.attributes.set(A.id.id,T)),!O.fillMaterialProperty.isConstant){var E=O.fillMaterialProperty.color,C=g.default.getValueOrDefault(E,e,a.default.WHITE,v);a.default.equals(T._lastColor,C)||(T._lastColor=a.default.clone(C,T._lastColor),T.color=r.default.toValue(C,T.color))}var S=x.isShowing&&(O.hasConstantFill||O.isFilled(e));S!==(1===T.show[0])&&(T.show=d.default.toValue(S,T.show));var M=O.distanceDisplayConditionProperty;if(!g.default.isConstant(M)){var D=g.default.getValueOrDefault(M,e,b,y);l.default.equals(D,T._lastDistanceDisplayCondition)||(T._lastDistanceDisplayCondition=l.default.clone(D,T._lastDistanceDisplayCondition),T.distanceDisplayCondition=u.a.toValue(D,T.distanceDisplayCondition))}}this.updateShows(n)}else Object(s.default)(n)&&!n.ready&&(i=!1);return i},w.prototype.updateShows=function(e){for(var t=this.showsUpdated.values,i=t.length,n=0;n<i;n++){var a=t[n],r=a.entity,o=this.geometry.get(a.id),l=this.attributes.get(o.id.id);Object(s.default)(l)||(l=e.getGeometryInstanceAttributes(o.id),this.attributes.set(o.id.id,l));var u=r.isShowing;u!==(1===l.show[0])&&(l.show=d.default.toValue(u,l.show),o.attributes.show.value[0]=l.show[0])}this.showsUpdated.removeAll()},w.prototype.contains=function(e){return this.updaters.contains(e.id)},w.prototype.getBoundingSphere=function(e,t){var i=this.primitive;if(!i.ready)return p.a.PENDING;var n=i.getGeometryInstanceAttributes(e.entity);return!Object(s.default)(n)||!Object(s.default)(n.boundingSphere)||Object(s.default)(n.show)&&0===n.show[0]?p.a.FAILED:(n.boundingSphere.clone(t),p.a.DONE)},w.prototype.destroy=function(){var e=this.primitive,t=this.orderedGroundPrimitives;Object(s.default)(e)&&t.remove(e);var i=this.oldPrimitive;Object(s.default)(i)&&t.remove(i),this.removeMaterialSubscription()},O.prototype.add=function(e,t){for(var i=this._items,n=i.length,a=t.createFillGeometryInstance(e),r=g.default.getValueOrDefault(t.zIndex,0),o=0;o<n;++o){var s=i[o];if(s.isMaterial(t)&&s.zIndex===r)return void s.add(e,t,a)}var l=new w(this._orderedGroundPrimitives,this._classificationType,t.fillMaterialProperty,r,this._asynchronous);l.add(e,t,a),i.push(l)},O.prototype.remove=function(e){for(var t=this._items,i=t.length-1;i>=0;i--){var n=t[i];if(n.remove(e)){0===n.updaters.length&&(t.splice(i,1),n.destroy());break}}},O.prototype.update=function(e){var t,i=this._items;for(t=i.length-1;t>=0;t--){var n=i[t];if(n.invalidated){i.splice(t,1);for(var a=n.updaters.values,r=a.length,o=0;o<r;o++)this.add(e,a[o]);n.destroy()}}var s=!0;for(t=0;t<i.length;t++)s=i[t].update(e)&&s;return s},O.prototype.getBoundingSphere=function(e,t){for(var i=this._items,n=i.length,a=0;a<n;a++){var r=i[a];if(r.contains(e))return r.getBoundingSphere(e,t)}return p.a.FAILED},O.prototype.removeAllPrimitives=function(){for(var e=this._items,t=e.length,i=0;i<t;i++)e[i].destroy();this._items.length=0},t.a=O},function(e,t,i){"use strict";var n=i(2),a=i(0),r=i(3),o=i(5),s=o.default.factorial;function l(e,t,i,n,a,r){var o,s,u,d=0;if(n>0){for(s=0;s<a;s++){for(o=!1,u=0;u<r.length&&!o;u++)s===r[u]&&(o=!0);o||(r.push(s),d+=l(e,t,i,n-1,a,r),r.splice(r.length-1,1))}return d}for(d=1,s=0;s<a;s++){for(o=!1,u=0;u<r.length&&!o;u++)s===r[u]&&(o=!0);o||(d*=e-i[t[s]])}return d}var u={type:"Hermite",getRequiredDataPoints:function(e,t){if(t=Object(n.default)(t,0),!Object(a.default)(e))throw new r.default("degree is required.");if(e<0)throw new r.default("degree must be 0 or greater.");if(t<0)throw new r.default("inputOrder must be 0 or greater.");return Math.max(Math.floor((e+1)/(t+1)),2)},interpolateOrderZero:function(e,t,i,n,r){var o,u,d,c,f;Object(a.default)(r)||(r=new Array(n));var h=t.length,p=new Array(n);for(o=0;o<n;o++){r[o]=0;var m=new Array(h);for(p[o]=m,u=0;u<h;u++)m[u]=[]}var _=h,g=new Array(_);for(o=0;o<_;o++)g[o]=o;var v=h-1;for(c=0;c<n;c++){for(u=0;u<_;u++)f=g[u]*n+c,p[c][0].push(i[f]);for(o=1;o<_;o++){var y=!1;for(u=0;u<_-o;u++){var b,w=t[g[u]],O=t[g[u+o]];O-w<=0?(b=i[f=g[u]*n+n*o+c],p[c][o].push(b/s(o))):(b=p[c][o-1][u+1]-p[c][o-1][u],p[c][o].push(b/(O-w))),y=y||0!==b}y||(v=o-1)}}for(d=0,0;d<=0;d++)for(o=d;o<=v;o++){var x=l(e,g,t,d,o,[]);for(c=0;c<n;c++){var A=p[c][o][0];r[c+d*n]+=A*x}}return r}},d=[];u.interpolate=function(e,t,i,n,r,s,u){var c=n*(s+1);Object(a.default)(u)||(u=new Array(c));for(var f=0;f<c;f++)u[f]=0;var h,p=t.length,m=new Array(p*(r+1));for(h=0;h<p;h++)for(var _=0;_<r+1;_++)m[h*(r+1)+_]=h;for(var g=m.length,v=d,y=function(e,t,i,n,a,r){for(var s,l,u=-1,d=t.length,c=d*(d+1)/2,f=0;f<a;f++){var h=Math.floor(f*c);for(s=0;s<d;s++)l=t[s]*a*(r+1)+f,e[h+s]=n[l];for(var p=1;p<d;p++){var m=0,_=Math.floor(p*(1-p)/2)+d*p,g=!1;for(s=0;s<d-p;s++){var v,y,b=i[t[s]],w=i[t[s+p]];if(w-b<=0)l=t[s]*a*(r+1)+a*p+f,v=n[l],y=v/o.default.factorial(p),e[h+_+m]=y,m++;else{var O=Math.floor((p-1)*(2-p)/2)+d*(p-1);v=e[h+O+s+1]-e[h+O+s],y=v/(w-b),e[h+_+m]=y,m++}g=g||0!==v}g&&(u=Math.max(u,p))}}return u}(v,m,t,i,n,r),b=[],w=g*(g+1)/2,O=Math.min(y,s),x=0;x<=O;x++)for(h=x;h<=y;h++){b.length=0;for(var A=l(e,m,t,x,h,b),T=Math.floor(h*(1-h)/2)+g*h,E=0;E<n;E++){var C=v[Math.floor(E*w)+T];u[E+x*n]+=C*A}}return u},t.a=u},function(e,t,i){"use strict";function n(e,t){return function(){return e.apply(t,arguments)}}i.d(t,"a",(function(){return n}))},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var o=i(17),s=i(1),l=i(11),u=i(46),d=i(28),c=i(43),f=i(205),h=i(5),p=i(6),m=i(35),_=i(85),g=i(61),v=i(64),y=i(13),b=i(321),w=(new p.default,new s.default,new s.default,new f.default,new _.default,function(e){function t(t){var i=e.call(this,t)||this;return i._topRadius=1,i._bottomRadius=1,i._length=1e3,i._topRadius=t.topRadius,i._bottomRadius=t.bottomRadius,i._length=t.length,i.topPositions=[],i.bottomPositions=[],i.edgeVertices=[],i.offsetMatrix=p.default.fromTranslation(new s.default(0,0,-i.length/2),new p.default),i.calculateBottomPositions(),i.createGeometry(),i}return a(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topRadius",{get:function(){return this._topRadius},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomRadius",{get:function(){return this._bottomRadius},enumerable:!1,configurable:!0}),t.prototype.createGeometry=function(){for(var e=[],t=[],i=[],n=[],a=[],c=1/this.topPositions.length,f=0;f<this.topPositions.length;f++){var h=void 0,p=void 0;f===this.topPositions.length-1?(h=this.topPositions[0],p=this.bottomPositions[0]):(h=this.topPositions[f+1],p=this.bottomPositions[f+1]);var _=this.topPositions[f],g=this.bottomPositions[f],v=s.default.subtract(h,_,new s.default),y=s.default.subtract(g,_,new s.default),b=new s.default;s.default.normalize(s.default.cross(v,y,b),b),e.push.apply(e,r(r(r(r([],s.default.pack(_,new Array(3))),s.default.pack(h,new Array(3))),s.default.pack(p,new Array(3))),s.default.pack(g,new Array(3)))),t.push.apply(t,r(r(r(r([],s.default.pack(b,new Array(3))),s.default.pack(b,new Array(3))),s.default.pack(b,new Array(3))),s.default.pack(b,new Array(3)))),i.push(f*c,0,(f+1)*c,0,(f+1)*c,1,f*c,1),n.push(4*f,4*f+1,4*f+2,4*f,4*f+2,4*f+3),a.push(4*f,4*f+1,4*f+2,4*f+3)}var w=new Float64Array(e),O=new Float64Array(t),x=new Float32Array(i),A=new Uint16Array(n);if(this.geometry=new u.default({attributes:{position:new d.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:w}),normal:new d.default({componentDatatype:l.default.FLOAT,componentsPerAttribute:3,values:O}),st:new d.default({componentDatatype:l.default.FLOAT,componentsPerAttribute:2,values:x})},indices:A,primitiveType:m.default.TRIANGLES,boundingSphere:o.default.fromPoints(r(r([],this.topPositions),this.bottomPositions))}),this.showOutline){var T=new Uint16Array(a);this.outlineGeometry=new u.default({attributes:{position:new d.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:w})},indices:T,primitiveType:m.default.LINES,boundingSphere:o.default.fromPoints(r(r([],this.topPositions),this.bottomPositions))})}},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=y.default.SCENE3D;t&&(i=t.sceneMode),p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),i!==y.default.SCENE2D&&(this.geometrInstance=new c.default({geometry:this.geometry,modelMatrix:i!==y.default.SCENE3D?p.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new v.default({geometryInstances:this.geometrInstance,modelMatrix:i===y.default.SCENE3D?p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:this.getAppearance(),asynchronous:!1,show:this.show}),this.showOutline&&(this.outlineGeometrInstance=new c.default({geometry:this.outlineGeometry,modelMatrix:i!==y.default.SCENE3D?p.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new v.default({geometryInstances:this.outlineGeometrInstance,modelMatrix:i===y.default.SCENE3D?p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:new g.default({flat:!0}),show:this.showOutline&&this.show,asynchronous:i===y.default.SCENE3D})))},t.prototype.updateMatrix=function(t){p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),e.prototype.updateMatrix.call(this,t)},t.prototype.calculateBottomPositions=function(e){void 0===e&&(e=64);for(var t=h.default.TWO_PI/e,i=0;i<h.default.TWO_PI;)this.topPositions.push(new s.default(Math.sin(i)*this._topRadius,Math.cos(i)*this._topRadius,this.length/2)),i+=t;for(i=0;i<h.default.TWO_PI;)this.bottomPositions.push(new s.default(Math.sin(i)*this._bottomRadius,Math.cos(i)*this._bottomRadius,-this.length/2)),i+=t},t}(b.default));t.default=w},function(e,t){},function(e,t){function i(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}i.keys=function(){return[]},i.resolve=i,e.exports=i,i.id=970},function(e,t){var i,n,a=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(i===setTimeout)return setTimeout(e,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(e,0);try{return i(e,0)}catch(t){try{return i.call(null,e,0)}catch(t){return i.call(this,e,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(e){i=r}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l,u=[],d=!1,c=-1;function f(){d&&l&&(d=!1,l.length?u=l.concat(u):c=-1,u.length&&h())}function h(){if(!d){var e=s(f);d=!0;for(var t=u.length;t;){for(l=u,u=[];++c<t;)l&&l[c].run();c=-1,t=u.length}l=null,d=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)t[i-1]=arguments[i];u.push(new p(e,t)),1!==u.length||d||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=m,a.addListener=m,a.once=m,a.off=m,a.removeListener=m,a.removeAllListeners=m,a.emit=m,a.prependListener=m,a.prependOnceListener=m,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(17),a=i(7),r=i(2),o=i(0),s=i(3),l=i(6),u=i(35),d=i(44),c=i(39),f=i(26),h=i(34),p=i(67),m=i(57),_=i(36),g=i(104),v=i(74),y=i(140),b=i(69),w=i(13),O=i(60),x=i(19),A=i(1),T=i(11),E=i(1197),C=i(1198),S=i(1199),M={position:0,normal:1},D=5906376272e3,P=function(){function e(e){e=r.default(e,r.default.EMPTY_OBJECT),this._pickId=void 0,this._pickPrimitive=r.default(e._pickPrimitive,this),this._frontFaceColorCommand=new d.default,this._backFaceColorCommand=new d.default,this._pickCommand=new d.default,this._boundingSphere=new n.default,this._boundingSphereWC=new n.default,this._frontFaceColorCommand.primitiveType=u.default.TRIANGLES,this._frontFaceColorCommand.boundingVolume=this._boundingSphereWC,this._frontFaceColorCommand.owner=this,this._backFaceColorCommand.primitiveType=this._frontFaceColorCommand.primitiveType,this._backFaceColorCommand.boundingVolume=this._frontFaceColorCommand.boundingVolume,this._backFaceColorCommand.owner=this,this._pickCommand.primitiveType=this._frontFaceColorCommand.primitiveType,this._pickCommand.boundingVolume=this._frontFaceColorCommand.boundingVolume,this._pickCommand.owner=this,this.show=r.default(e.show,!0),this.showIntersection=r.default(e.showIntersection,!0),this.showThroughEllipsoid=r.default(e.showThroughEllipsoid,!1),this._showThroughEllipsoid=this.showThroughEllipsoid,this.modelMatrix=l.default.clone(r.default(e.modelMatrix,l.default.IDENTITY)),this._modelMatrix=new l.default,this.radius=r.default(e.radius,Number.POSITIVE_INFINITY),this._directions=void 0,this._directionsDirty=!1,this.directions=o.default(e.directions)?e.directions:[],this.lateralSurfaceMaterial=o.default(e.lateralSurfaceMaterial)?e.lateralSurfaceMaterial:b.default.fromType(b.default.ColorType),this._lateralSurfaceMaterial=void 0,this._translucent=void 0,this.intersectionColor=a.default.clone(r.default(e.intersectionColor,a.default.WHITE)),this.intersectionWidth=r.default(e.intersectionWidth,5),this.id=e.id,this._id=void 0;var t=this;this._uniforms={u_showThroughEllipsoid:function(){return t.showThroughEllipsoid},u_showIntersection:function(){return t.showIntersection},u_sensorRadius:function(){return isFinite(t.radius)?t.radius:D},u_intersectionColor:function(){return t.intersectionColor},u_intersectionWidth:function(){return t.intersectionWidth},u_normalDirection:function(){return 1}},this._mode=w.default.SCENE3D}return Object.defineProperty(e.prototype,"directions",{get:function(){return this._directions},set:function(e){this._directions=e,this._directionsDirty=!0},enumerable:!1,configurable:!0}),e.prototype.update=function(e){if(this._mode=e.mode,this.show&&this._mode===w.default.SCENE3D){var t=e.context,i=e.commandList;if(this.radius<0)throw new s.default("this.radius must be greater than or equal to zero.");if(!o.default(this.lateralSurfaceMaterial))throw new s.default("this.lateralSurfaceMaterial must be defined.");var a=this.lateralSurfaceMaterial.isTranslucent();if(this._showThroughEllipsoid!==this.showThroughEllipsoid||!o.default(this._frontFaceColorCommand.renderState)||this._translucent!==a){this._showThroughEllipsoid=this.showThroughEllipsoid,this._translucent=a;var r=void 0;a?(r=c.default.fromCache({depthTest:{enabled:!this.showThroughEllipsoid},depthMask:!1,blending:v.default.ALPHA_BLEND,cull:{enabled:!0,face:y.default.BACK}}),this._frontFaceColorCommand.renderState=r,this._frontFaceColorCommand.pass=f.default.TRANSLUCENT,r=c.default.fromCache({depthTest:{enabled:!this.showThroughEllipsoid},depthMask:!1,blending:v.default.ALPHA_BLEND,cull:{enabled:!0,face:y.default.FRONT}}),this._backFaceColorCommand.renderState=r,this._backFaceColorCommand.pass=f.default.TRANSLUCENT,r=c.default.fromCache({depthTest:{enabled:!this.showThroughEllipsoid},depthMask:!1,blending:v.default.ALPHA_BLEND}),this._pickCommand.renderState=r):(r=c.default.fromCache({depthTest:{enabled:!0},depthMask:!0}),this._frontFaceColorCommand.renderState=r,this._frontFaceColorCommand.pass=f.default.OPAQUE,r=c.default.fromCache({depthTest:{enabled:!0},depthMask:!0}),this._pickCommand.renderState=r)}var u=this._directionsDirty;if(u){this._directionsDirty=!1,this._va=this._va&&this._va.destroy();var d=this._directions;d&&d.length>=3&&(this._frontFaceColorCommand.vertexArray=function(e,t){for(var i=function(e){for(var t=e._directions,i=t.length,a=new Float32Array(3*i),r=isFinite(e.radius)?e.radius:D,o=[A.default.ZERO],s=i-2,l=i-1,u=0;u<i;s=l++,l=u++){var d=A.default.fromSpherical(t[s],I),c=A.default.fromSpherical(t[l],L),f=A.default.fromSpherical(t[u],j),h=Math.max(A.default.angleBetween(d,c),A.default.angleBetween(c,f)),p=r/Math.cos(.5*h),m=A.default.multiplyByScalar(c,p,new A.default);a[3*l]=m.x,a[3*l+1]=m.y,a[3*l+2]=m.z,o.push(m)}return n.default.fromPoints(o,e._boundingSphere),a}(e),a=e._directions.length,r=new Float32Array(18*a),o=0,s=a-1,l=0;l<a;s=l++){var u=new A.default(i[3*s],i[3*s+1],i[3*s+2]),d=new A.default(i[3*l],i[3*l+1],i[3*l+2]),c=A.default.normalize(A.default.cross(d,u,R),R);r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=c.x,r[o++]=c.y,r[o++]=c.z,r[o++]=d.x,r[o++]=d.y,r[o++]=d.z,r[o++]=c.x,r[o++]=c.y,r[o++]=c.z,r[o++]=u.x,r[o++]=u.y,r[o++]=u.z,r[o++]=c.x,r[o++]=c.y,r[o++]=c.z}var f=m.default.createVertexBuffer({context:t,typedArray:new Float32Array(r),usage:_.default.STATIC_DRAW}),h=6*Float32Array.BYTES_PER_ELEMENT,p=[{index:M.position,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:T.default.FLOAT,offsetInBytes:0,strideInBytes:h},{index:M.normal,vertexBuffer:f,componentsPerAttribute:3,componentDatatype:T.default.FLOAT,offsetInBytes:3*Float32Array.BYTES_PER_ELEMENT,strideInBytes:h}];return new g.default({context:t,attributes:p})}(this,t),this._backFaceColorCommand.vertexArray=this._frontFaceColorCommand.vertexArray,this._pickCommand.vertexArray=this._frontFaceColorCommand.vertexArray)}if(o.default(this._frontFaceColorCommand.vertexArray)){var b=e.passes,x=!l.default.equals(this.modelMatrix,this._modelMatrix);x&&l.default.clone(this.modelMatrix,this._modelMatrix),(u||x)&&n.default.transform(this._boundingSphere,this.modelMatrix,this._boundingSphereWC),this._frontFaceColorCommand.modelMatrix=this.modelMatrix,this._backFaceColorCommand.modelMatrix=this._frontFaceColorCommand.modelMatrix,this._pickCommand.modelMatrix=this._frontFaceColorCommand.modelMatrix;var P=this._lateralSurfaceMaterial!==this.lateralSurfaceMaterial;if(this._lateralSurfaceMaterial=this.lateralSurfaceMaterial,this._lateralSurfaceMaterial.update(t),b.render){var N=this._frontFaceColorCommand,B=this._backFaceColorCommand;if(P||!o.default(N.shaderProgram)){var F=new h.default({sources:[S,this._lateralSurfaceMaterial.shaderSource,E]});F.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),N.shaderProgram=p.default.replaceCache({context:t,shaderProgram:N.shaderProgram,vertexShaderSource:C,fragmentShaderSource:F,attributeLocations:M}),N.uniformMap=O.default(this._uniforms,this._lateralSurfaceMaterial._uniforms),B.shaderProgram=N.shaderProgram,B.uniformMap=O.default(this._uniforms,this._lateralSurfaceMaterial._uniforms),B.uniformMap.u_normalDirection=function(){return-1}}a?i.push(this._backFaceColorCommand,this._frontFaceColorCommand):i.push(this._frontFaceColorCommand)}if(b.pick){var k=this._pickCommand;if(o.default(this._pickId)&&this._id===this.id||(this._id=this.id,this._pickId=this._pickId&&this._pickId.destroy(),this._pickId=t.createPickId({primitive:this._pickPrimitive,id:this.id})),P||!o.default(k.shaderProgram)){var z=new h.default({sources:[S,this._lateralSurfaceMaterial.shaderSource,E],pickColorQualifier:"uniform"});z.sources.unshift("#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n#endif\n"),k.shaderProgram=p.default.replaceCache({context:t,shaderProgram:k.shaderProgram,vertexShaderSource:C,fragmentShaderSource:z,attributeLocations:M});var U=this,V={czm_pickColor:function(){return U._pickId.color}};k.uniformMap=O.default(O.default(this._uniforms,this._lateralSurfaceMaterial._uniforms),V)}k.pass=a?f.default.TRANSLUCENT:f.default.OPAQUE,i.push(k)}}}},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){return this._frontFaceColorCommand.vertexArray=this._frontFaceColorCommand.vertexArray&&this._frontFaceColorCommand.vertexArray.destroy(),this._frontFaceColorCommand.shaderProgram=this._frontFaceColorCommand.shaderProgram&&this._frontFaceColorCommand.shaderProgram.destroy(),this._pickCommand.shaderProgram=this._pickCommand.shaderProgram&&this._pickCommand.shaderProgram.destroy(),this._pickId=this._pickId&&this._pickId.destroy(),x.default(this)},e}();t.default=P;var I=new A.default,L=new A.default,j=new A.default;var R=new A.default},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0);t.default=function(e,t,i){var a=t[e.id];if(n.default(a)){var r=a.primitive;i.remove(r),r.isDestroyed()||r.destroy(),delete t[e.id]}}},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.REVOLUTIONPERIODDIVIDER=void 0;var o=i(7),s=i(0),l=i(14),u=i(975),d=i(997),c=i(24),f=i(2),h=i(389),p=i(1001),m={modelConfig:{url:"data/satellite/scene.gltf"},billboardConfig:{image:"data/billboard64.gif"},pointConfig:{color:o.default.WHITE},labelConfig:{text:"Satellite"}};t.REVOLUTIONPERIODDIVIDER=3/4;var _=function(e){function i(t,i){void 0===t&&(t=m),void 0===i&&(i=!0);var n=e.call(this,r(r({},m),t))||this;return n.options=t,n.timeToUpdateEvent=new c.default,n.pathPositions=[],n.performanceMode=!0,n.pathOptions=t.pathOptions,n.revolutionPeriod=t.revolutionPeriod,n.pathOptions&&(n.pathPositions=n.pathOptions.pathPositions,n.pathOptions.show=f.default(t.pathOptions.show,!0),n.pathOptions.staticTrajectory=f.default(t.pathOptions.staticTrajectory,!1),n.revolutionPeriod&&(n.pathOptions.leadTime=f.default(t.pathOptions.leadTime,n.revolutionPeriod/2),n.pathOptions.trailTime=f.default(t.pathOptions.trailTime,n.revolutionPeriod/2),n.pathOptions.resolution=f.default(n.pathOptions.resolution,n.revolutionPeriod/60))),t.htmlLabelConfig&&t.htmlLabelConfig.element&&(n._htmlLabel=new h.default(t.htmlLabelConfig),n.add(n._htmlLabel)),n.performanceMode=i,n._trajectoryReference=f.default(t.trajectoryReference,n.referenceFrame),n}return a(i,e),Object.defineProperty(i.prototype,"tracked",{get:function(){return this._tracked},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"modelBoundingSphere",{get:function(){return this.model.boundingSphere},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"htmlLabel",{get:function(){return this._htmlLabel},set:function(e){this._htmlLabel&&this.remove(this._htmlLabel),this._htmlLabel=e,this.add(this._htmlLabel)},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"trajectoryReference",{get:function(){return this._trajectoryReference},set:function(e){this._trajectoryReference!==e&&(this._trajectoryReference=e,this.trajectory&&(this.trajectory.referenceFrame=e))},enumerable:!1,configurable:!0}),i.prototype.afterSetVisible=function(e){this.polylinePath&&(this.polylinePath.show=e),this.entityPath&&(this.entityPath.show=e),this._htmlLabel&&(this._htmlLabel.show=e),this.trajectory&&(this.trajectory.show=e)},i.prototype.initPeriodParams=function(){var e=this.getViewer();e&&(this.startTime=e.cesiumViewer.clock.currentTime.clone())},i.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this.pathOptions&&this.performanceMode?(this.trajectory=new p.default({reference:this.trajectoryReference,autoUpdate:f.default(this.pathOptions.autoUpdate,!1)}),this.add(this.trajectory),this.model?this.readyPromise=Promise.all([this.model.readyPromise,this.trajectory.readyPromise]):this.readyPromise=Promise.all([this.trajectory.readyPromise])):!this.performanceMode&&this.pathOptions&&(this.entityPath=new u.default(this.pathOptions),this.add(this.entityPath)),this.initPeriodParams()},i.prototype.beforeSwitchMode=function(t){e.prototype.beforeSwitchMode.call(this,t),this.trajectory&&this.updateTrajectory()},i.prototype.afterTracked=function(){e.prototype.afterTracked.call(this),this._tracked=!0,this._htmlLabel&&this._htmlLabel.afterTracked(),this.trajectory&&this.trajectory.afterTracked()},i.prototype.afterUnTracked=function(){e.prototype.afterUnTracked.call(this),this._tracked=!1,this._htmlLabel&&this._htmlLabel.afterUnTracked(),this.trajectory&&this.trajectory.afterUnTracked()},i.prototype.destroyForward=function(){e.prototype.destroyForward.call(this)},i.prototype.updateForward=function(i){if(e.prototype.updateForward.call(this,i),this.show&&s.default(this.revolutionPeriod)&&s.default(this.startTime)){var n=l.default.secondsDifference(i,this.startTime);(n>this.revolutionPeriod*t.REVOLUTIONPERIODDIVIDER||n<0)&&(this.timeToUpdateEvent.raiseEvent(i.clone(),this.id),l.default.clone(i,this.startTime))}},i.prototype.updateTrajectory=function(e){e||(e=this.getViewer().cesiumViewer.clock.currentTime.clone()),this.trajectory.updateTrajectory(e)},i}(d.default);t.default=_},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(472),l=i(473),u=i(69),d=i(279),c=i(151),f=i(109),h=i(208),p=i(327),m=i(1),_=function(e){function t(t){var i=e.call(this,{id:t.id})||this;return i.pathOptions=t,i.pathOptions=t,i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.entity&&(this.entity.show=e,this.entity.path.show=new f.default(e))},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t);var n=this.getNearestPointLikeEntity();this.availability=n.availability;var a=this.getLODSceneLayer();if(a){var l,d=this.pathOptions.dash,c=n.sampledPositionProperty;if(n.referenceFrame!==this.parent.referenceFrame)(l=new h.default(this.parent.referenceFrame)).setInterpolationOptions({interpolationAlgorithm:p.default,interpolationDegree:5}),c._property._times.forEach((function(e){var t=c.getValueInReferenceFrame(e,i.parent.referenceFrame,new m.default);t&&l.addSample(e,t)}));else l=c;this.entity=a.customDataSource.entities.add({id:this.id,position:l,path:r(r({},this.pathOptions),{material:d?new s.default({color:this.pathOptions.material instanceof o.default?this.pathOptions.material:void 0,dashLength:8}):this.pathOptions.material instanceof u.default?g(this.pathOptions.material):this.pathOptions.material})})}},t.prototype.updateForward=function(t){return e.prototype.updateForward.call(this,t),!1},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();t instanceof d.default&&t.customDataSource.entities.remove(this.entity)},t}(c.default);function g(e){switch(e.type){case u.default.PolylineGlowType:return new l.default({color:e.uniforms.color,glowPower:e.uniforms.glowPower,taperPower:e.uniforms.taperPower});default:return o.default.WHITE}}t.default=_},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a,r=i(325),o=i(977),s=i(978),l=i(983),u=i(204),d={EntityLoaders:o.default,PayloadLoaders:s.default,TaskLoaders:l.default};!function(e){e[e.PENDING=0]="PENDING",e[e.SUCCESS=1]="SUCCESS",e[e.FAILED=3]="FAILED"}(a||(a={}));var c=function(){function e(e,t,i){this.viewer=e,this.layer=t;var n=i.url;this.initWebsocket(n)}return e.prototype.initWebsocket=function(e){var t=this;this.readyPromise=new Promise((function(i,n){t.ws=new WebSocket(e),t.ws.onclose=function(i){t.initWebsocket(e)},t.ws.onopen=function(e){i(e)},t.ws.onerror=function(e){console.log(e,"WebSocket failed"),n(e)},t.ws.onmessage=function(e){var i=(e=JSON.parse(e.data)).data;t.onMessage&&t.onMessage(i),t.subscribeTopic(i)}}))},e.prototype.send=function(e){this.ws.send(e)},e.prototype.subscribeTopic=function(e){var t=this;e.forEach((function(e){switch(u.toCamelCase(e.type.split("/")[0])){case"Entity":t.updateEntity(e)}}))},e.prototype.updateEntity=function(e){var t,i=e.id,n=e.type.split("/").map((function(e){return u.toCamelCase(e)})),a=n[0],o=n[1],s=this.layer.getEntityById(i);if(s){for(var l in e)if(r.default[l])try{r.default[l](s,e[l])}catch(e){console.log(e)}}else null===(t=d[a+"Loaders"][o+"Loader"])||void 0===t||t.load(this.layer,e)},e.prototype.updatePayload=function(e){var t,i=e.id,a=e.type,r=e.parent,o=a.split("/").map((function(e){return u.toCamelCase(e)})),s=o[0],l=o[1],c=this.layer.getEntityById(r),f=c.getEntityById(i);f&&(e=n(n({},f.rawOption),e),c.remove(f)),null===(t=d[s+"Loaders"][l+"Loader"])||void 0===t||t.load(this.layer,e)},e.prototype.updateTask=function(e){var t,i=e.id,a=e.type,r=(e.parent,a.split("/").map((function(e){return u.toCamelCase(e)}))),o=r[0],s=r[1],l=this.layer.getEntityById(i);l&&(e=n(n({},l.rawOption),e),this.layer.remove(l)),null===(t=d[o+"Loaders"][s+"Loader"])||void 0===t||t.load(this.layer,e)},e.prototype.destroy=function(){},e}();t.default=c},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1148),a=i(1149),r=i(1150),o=i(1151),s=i(1152),l=i(1153),u=i(1154);t.default={SatelliteLoader:s.default,StationLoader:u.default,ShipLoader:l.default,MissileLoader:r.default,PlaneLoader:o.default,CarLoader:n.default,CommandCenterLoader:a.default}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1155),a=i(1157),r=i(1158);t.default={SimpleConeLoader:n.default,RectangularConeLoader:a.default,ParLoader:r.default}},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(12),l=i(6),u=i(27),d=i(1156),c=i(392),f=new l.default,h=new o.default,p=(new l.default,new s.default,function(e){function t(t){var i=e.call(this,r(r({},t),{shouldUpdateIn2D:!1}))||this;return i.options=t,i.pointing=new c.default(i),i}return a(t,e),t.prototype.addHeadingPitchRollSample=function(e,t){this.addRotationSample(e,c.default.headingPitchRollToQuaternion(t,new u.default))},t.prototype.updateForward=function(t,i){this.pointing.trackedEntity&&this.pointing.trackedEntity.position?(this.pointing.calculateMatrixByTrackedEntity(i,f),l.default.multiplyByPoint(this.parent.matrix,this.position,h),this.scale=new o.default(1,1,o.default.distance(this.pointing.trackedEntity.position,h)/this.length+.1)):l.default.clone(i,f),e.prototype.updateForward.call(this,t,f)},t.prototype.clone=function(){return new t(this.options)},t}(d.default));t.default=p},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,baseColor:o.default.CYAN.withAlpha(.1),repeat:30,thickness:.3,speed:-1},u=function(e){function t(t,i){void 0===t&&(t=l),void 0===i&&(i=!0);var n=this,a=r(r({},l),t);return(n=e.call(this,{fabric:{type:"Wave",uniforms:a,source:"\nuniform vec4 color;\nuniform vec4 baseColor;\nuniform float repeat;\nuniform float thickness;\nuniform float speed;\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = 1.0/repeat;\n vec2 st = materialInput.st;\n float dis = "+(i?"distance(st, vec2(0.5));":"distance(st.s, 0.5);")+"\n float offset = mod(0.001*speed*czm_frameNumber,1.0);\n float m = mod(dis + offset, sp);\n float a = step(sp*(1.0-thickness), m);\n\n material.diffuse = a>0.5?color.rgb:baseColor.rgb;\n material.alpha = a>0.5?color.a:baseColor.a;\n\n return material;\n}\n "},translucent:!0})||this)._color=a.color,n._baseColor=a.baseColor,n._repeat=a.repeat,n._thickness=a.thickness,n._speed=a.speed,n}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseColor",{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this.uniforms.baseColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.uniforms.thickness=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(27),s=i(982),l=i(392),u=i(6),d=i(1),c=new u.default,f=new d.default,h=function(e){function t(t){var i=e.call(this,r(r({},t),{shouldUpdateIn2D:!1}))||this;return i.options=t,i.pointing=new l.default(i),i}return a(t,e),t.prototype.addHeadingPitchRollSample=function(e,t){this.addRotationSample(e,l.default.headingPitchRollToQuaternion(t,new o.default))},t.prototype.updateForward=function(t,i){this.pointing.trackedEntity&&this.pointing.trackedEntity.position?(this.pointing.calculateMatrixByTrackedEntity(i,c),u.default.multiplyByPoint(this.parent.matrix,this.position,f),this.scale=new d.default(1,1,d.default.distance(this.pointing.trackedEntity.position,f)/this.length+.1)):u.default.clone(i,c),e.prototype.updateForward.call(this,t,c)},t.prototype.clone=function(){return new t(this.options)},t}(s.default);t.default=h},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var o=i(17),s=i(1),l=i(11),u=i(46),d=i(28),c=i(43),f=i(14),h=i(5),p=i(6),m=i(35),_=i(61),g=i(64),v=i(13),y=i(547),b=i(321),w=i(2),O=i(27),x=i(301),A=i(301),T=function(e){function t(t){var i=e.call(this,t)||this;return i._horizontalHalfAngle=h.default.toRadians(45),i._verticalHalfAngle=h.default.toRadians(45),i._length=1e3,i.circleRotation=0,i.coneRotation=0,i.crossSingleRotation=0,i.crossSingleRotationMax=h.default.toRadians(49.5),i.coneUpdate=!1,i.backTime=0,i._horizontalHalfAngle=t.horizontalHalfAngle,i._verticalHalfAngle=t.verticalHalfAngle,i._length=t.length,i._horizontalLength=Math.tan(i._horizontalHalfAngle)*i.length*2,i._verticalLength=Math.tan(i._verticalHalfAngle)*i.length*2,i.circleSpeed=w.default(t.circleSpeed,1.5),i.crossSpeed=w.default(t.crossSpeed,5.6),i.crossBackSpeed=w.default(t.crossBackSpeed,.8),i.coneSpeed=w.default(t.coneSpeed,1.8),i.crossScanAngle=w.default(t.crossScanAngle,h.default.PI/4),i.coneScanAngle=w.default(t.coneScanAngle,h.default.PI/4),i.crossOffsetAngle=w.default(t.crossOffsetAngle,0),i._scanMode=w.default(t.scanMode,1),i.backTime=i.crossSpeed/2,i.isCover=5!==i._scanMode,i._topPosition=new s.default(0,0,-i.length/2),i._bottomCenterPosition=new s.default(0,0,i.length/2),i.edgeSlice=w.default(t.edgeSlice,64),i.bottomPositions=[],i.moreBottomPositions=[],i.edgeVertices=[],i.offsetMatrix=p.default.fromTranslation(new s.default(0,0,t.length/2),new p.default),i.calculateBottomPositions(i.edgeSlice),i.createGeometry(),i}return a(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scanMode",{get:function(){return this._scanMode},set:function(e){this._scanMode!==e&&(this.rotation=O.default.IDENTITY.clone(),5===this._scanMode?this.isCover=!1:this.isCover=!0,this.prevTime=null,this.statTime=null,this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this._scanMode=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,5===this._scanMode?this.isCover=!1:this.isCover=e,this.prevTime=null,this.statTime=null,1!==this._scanMode&&(this.rotation=O.default.IDENTITY.clone()),this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this.primitive&&(this.primitive.show=e),this.outlinePrimitive&&(this.outlinePrimitive.show=e),this.surfaceEdge&&(this.surfaceEdge.show=e),this.surfaceEdgeOutline&&(this.surfaceEdgeOutline.show=e)},enumerable:!1,configurable:!0}),t.prototype.changeWaveAngel=function(e,t){var i=this.getLODSceneLayer();if(i){var n=i.models;this.removePrimitive(n),this.removeSurfaceEdge()}this._horizontalHalfAngle=e,this._verticalHalfAngle=t,this._horizontalLength=Math.tan(this._horizontalHalfAngle)*this.length*2,this._verticalLength=Math.tan(this._verticalHalfAngle)*this.length*2,this.calculateBottomPositions(this.edgeSlice),this.createGeometry(),this.createPrimitive(this.parent.modelMatrix),this.addPrimitive()},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=v.default.SCENE3D;t&&(i=t.sceneMode),p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),(this._shouldUpdateIn2D||i!==v.default.SCENE2D)&&(this.geometrInstance=new c.default({geometry:this.geometry,modelMatrix:i!==v.default.SCENE3D?p.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new g.default({geometryInstances:this.geometrInstance,modelMatrix:i===v.default.SCENE3D?p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:this.getAppearance(),asynchronous:!1,show:this.show}),this.showOutline&&(this.outlineGeometrInstance=new c.default({geometry:this.outlineGeometry,modelMatrix:i!==v.default.SCENE3D?p.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new g.default({geometryInstances:this.outlineGeometrInstance,modelMatrix:i===v.default.SCENE3D?p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:new _.default({flat:!0}),asynchronous:!1,show:this.showOutline&&this.show})))},t.prototype.updateMatrix=function(t){p.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),e.prototype.updateMatrix.call(this,t)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&1!==this._scanMode){if(!this.prevTime)return this.prevTime=f.default.clone(t),void(this.statTime=f.default.clone(t));5===this._scanMode&&!this.isCover&&this.coneUpdate&&(this.isCover=!0);var n=f.default.secondsDifference(t,this.prevTime),a=f.default.secondsDifference(t,this.statTime);this.backTime+=n,this.backTime>this.crossSpeed+this.crossBackSpeed&&(this.backTime=0),this.prevTime=f.default.clone(t);var r=void 0,o=void 0;switch(this._scanMode){case x.default.STATIC:break;case A.default.CIRCLE:r=2*Math.PI/this.circleSpeed,this.circleRotation+=n*r,this.rotation=O.default.fromAxisAngle(s.default.UNIT_X,this.circleRotation);break;case A.default.CROSS_SINGLE:this.backTime<this.crossSpeed?(this.isCover=!0,o=this.crossScanAngle*Math.sin((this.backTime+this.crossSpeed/2)*Math.PI/this.crossSpeed)):(this.isCover=!1,o=this.crossScanAngle*Math.sin((this.backTime-this.crossSpeed-this.crossBackSpeed/2)*Math.PI/this.crossBackSpeed)),this.crossSingleRotation=o,this.rotation=O.default.fromAxisAngle(s.default.UNIT_X,this.crossSingleRotation);break;case A.default.CROSS_DOUBLE:o=this.crossScanAngle*Math.sin(a*Math.PI*2/this.crossSpeed),this.crossSingleRotation=o+this.crossOffsetAngle;var l=new O.default,u=new O.default;l=O.default.fromAxisAngle(s.default.UNIT_X,this.crossSingleRotation),O.default.multiply(l,this.relativeRotation,u),this.rotation=u;break;case A.default.CONE:var d=O.default.fromAxisAngle(s.default.UNIT_X,this.coneScanAngle);r=2*Math.PI/this.coneSpeed,this.coneRotation+=n*r;var c=O.default.fromAxisAngle(s.default.UNIT_Z,this.coneRotation),h=O.default.IDENTITY.clone();O.default.multiply(c,d,h),this.rotation=h,this.coneUpdate=!0}}},t.prototype.calculateBottomPositions=function(e){void 0===e&&(e=1);var t=this._horizontalLength,i=this._verticalLength,n=this.length,a=[new s.default(-t/2,-i/2,n/2),new s.default(-t/2,i/2,n/2),new s.default(t/2,i/2,n/2),new s.default(t/2,-i/2,n/2),new s.default(-t/2,-i/2,n/2)],r=e/4;this.moreBottomPositions.length=0,this.moreBottomPositions.push(a[0]);for(var o=0;o<4;o++){for(var l=1;l<r;l++)this.moreBottomPositions.push(s.default.lerp(a[o],a[o+1],l/r,new s.default));this.moreBottomPositions.push(a[o+1])}this.bottomPositions=[new s.default(-t/2,-i/2,n/2),new s.default(-t/2,i/2,n/2),new s.default(t/2,i/2,n/2),new s.default(t/2,-i/2,n/2)]},t.prototype.createGeometry=function(){var e=this._topPosition,t=this.bottomPositions[0],i=this.bottomPositions[1],n=this.bottomPositions[2],a=this.bottomPositions[3],c=s.default.subtract(t,e,new s.default),f=s.default.subtract(i,e,new s.default),h=s.default.subtract(n,e,new s.default),p=s.default.subtract(a,e,new s.default),_=r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r([],s.default.pack(e,new Array(3))),s.default.pack(t,new Array(3))),s.default.pack(i,new Array(3))),s.default.pack(e,new Array(3))),s.default.pack(i,new Array(3))),s.default.pack(n,new Array(3))),s.default.pack(e,new Array(3))),s.default.pack(n,new Array(3))),s.default.pack(a,new Array(3))),s.default.pack(e,new Array(3))),s.default.pack(a,new Array(3))),s.default.pack(t,new Array(3))),s.default.pack(t,new Array(3))),s.default.pack(i,new Array(3))),s.default.pack(n,new Array(3))),s.default.pack(a,new Array(3))),g=new Float64Array(_),v=new s.default;s.default.normalize(s.default.cross(c,f,v),v);var y=new s.default;s.default.normalize(s.default.cross(f,h,y),y);var b=new s.default;s.default.normalize(s.default.cross(h,p,b),b);var w=new s.default;s.default.normalize(s.default.cross(p,c,w),w);var O=[0,0,-1],x=new Float32Array(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r(r([],s.default.pack(v,new Array(3))),s.default.pack(v,new Array(3))),s.default.pack(v,new Array(3))),s.default.pack(y,new Array(3))),s.default.pack(y,new Array(3))),s.default.pack(y,new Array(3))),s.default.pack(b,new Array(3))),s.default.pack(b,new Array(3))),s.default.pack(b,new Array(3))),s.default.pack(w,new Array(3))),s.default.pack(w,new Array(3))),s.default.pack(w,new Array(3))),O),O),O),O)),A=new Float32Array([.5,.5,1,0,1,1,.5,.5,1,0,1,1,.5,.5,1,0,1,1,.5,.5,1,0,1,1,0,0,1,0,1,1,0,1]),T=new Uint16Array([0,1,2,3,4,5,6,7,8,9,10,11,12,14,13,12,15,14]);if(this.geometry=new u.default({attributes:{position:new d.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:g}),normal:new d.default({componentDatatype:l.default.FLOAT,componentsPerAttribute:3,values:x}),st:new d.default({componentDatatype:l.default.FLOAT,componentsPerAttribute:2,values:A})},indices:T,primitiveType:m.default.TRIANGLES,boundingSphere:o.default.fromPoints(r([this._topPosition],this.bottomPositions))}),this.showOutline){var E=new Uint16Array([0,1,2,3,4,5,6,7,8,9,10,11,12,15,14,13]);this.outlineGeometry=new u.default({attributes:{position:new d.default({componentDatatype:l.default.DOUBLE,componentsPerAttribute:3,values:g})},indices:E,primitiveType:m.default.LINES,boundingSphere:o.default.fromPoints(r([this._topPosition],this.bottomPositions))})}},t.prototype.getEdgeVertices=function(e){void 0===e&&(e=1);var t=[];return y.default.calcuateIntersectionPointsFromConeAndWGS84Ellipsoid(this.moreBottomPositions,this.worldMatrix,this._topPosition,this._bottomCenterPosition,t),t},t.prototype.updateEllipsoidSurfaceEdge=function(){var e=this.edgeVertices;y.default.calcuateIntersectionPointsFromConeAndWGS84Ellipsoid(this.moreBottomPositions,this.worldMatrix,this._topPosition,this._bottomCenterPosition,e),this.removeSurfaceEdge(),this.createSurfaceEdge(),this.addSurfaceEdge()},t}(b.default);t.default=T},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1161),a=i(1162),r=i(1164),o=i(1165);t.default={LinkLoader:n.default,StripeLoader:a.default,ExplosionLoader:r.default,PayloadLoader:o.default}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateTransferFunction=void 0;var n=i(2),a=i(6),r=i(26),o=i(39),s=i(45),l=i(58),u=i(83),d=i(74),c=i(0),f=i(19),h=i(1),p=i(62),m=i(118),_=i(8),g=function(){function e(e){e=n.default(e,n.default.EMPTY_OBJECT),this._samples=n.default(e.samples,256),this._width=n.default(e.width,1e3),this._height=n.default(e.height,1e3),this._depth=n.default(e.depth,1e3),this._bbMin=new h.default(-this._width/2,-this._height/2,0),this._bbMax=new h.default(this._width/2,this._height/2,this._depth),this._range=n.default(e.range,new _.default(0,1)),this._isoSmooth=n.default(e.isoSmooth,1),this._isoValue=n.default(e.isoValue,.45),this._density=n.default(e.density,5),this._slices=n.default(e.slices,16),this._saturation=n.default(e.saturation,1),this._contrast=n.default(e.contrast,1),this._brightness=n.default(e.brightness,-.11780890196982163),this._power=n.default(e.power,1),this._useColorRamp=n.default(e.useColorRamp,!0),this.tricubicfilter=n.default(e.tricubicfilter,!1),this._decodedData=n.default(e.decodedData,!1),this._resolution=n.default(e.resolution,new h.default(256,256,256)),this._colorScheme=n.default(e.colorScheme,[{stop:0,color:"rgba(0,0,0,0)"},{stop:1,color:"white"}]),this._divideFactor=new h.default(this._width,this._height,this._depth),this._volumeTexture=void 0,this._modelMatrix=n.default(e.modelMatrix,a.default.IDENTITY.clone()),this._mvMatrix=new a.default,this._fragmentShaderSource="const vec2 slices = vec2("+this._slices+".0,"+this._slices+'.0);\nuniform mat4 uMVMatrix;\nuniform int uSamples;\nuniform int uFilter;\nuniform bool uEnableColour;\nuniform bool uDecoded;\n\nuniform vec3 divideFactor;\nuniform vec3 uBBMin;\nuniform vec3 uBBMax;\nuniform vec3 uResolution;\nuniform vec2 uRange;\n\nuniform float uIsoSmooth;\nuniform float uDensityFactor;\nuniform float uBrightness;\nuniform float uIsoValue;\nuniform float uSaturation;\nuniform float uContrast;\nuniform float uPower;\n\nuniform sampler2D volumeTexture;\nuniform sampler2D uTransferFunction;\n\nconst int maxSamples = 256;\n\n// const float GRID_NUMBER_X = 16.0;\n// const float GRID_NUMBER_Y = 16.0;\nvec2 islices = vec2(1.0 / slices.x, 1.0 / slices.y);\n\nmat4 transpose(in mat4 m)\n{\nreturn mat4(\n vec4(m[0].x, m[1].x, m[2].x, m[3].x),\n vec4(m[0].y, m[1].y, m[2].y, m[3].y),\n vec4(m[0].z, m[1].z, m[2].z, m[3].z),\n vec4(m[0].w, m[1].w, m[2].w, m[3].w)\n );\n}\nvec2 rayIntersectBox(vec3 rayDirection, vec3 rayOrigin)\n{\n //Intersect ray with bounding box\n vec3 rayInvDirection = 1.0 / rayDirection;\n vec3 bbMinDiff = (uBBMin - rayOrigin) * rayInvDirection;\n vec3 bbMaxDiff = (uBBMax - rayOrigin) * rayInvDirection;\n vec3 imax = max(bbMaxDiff, bbMinDiff);\n vec3 imin = min(bbMaxDiff, bbMinDiff);\n float back = min(imax.x, min(imax.y, imax.z));\n float front = max(max(imin.x, 0.0), max(imin.y, imin.z));\n return vec2(back, front);\n}\nfloat decodeValue(vec3 cv) {\n return (cv.r + cv.g + cv.b) / 3.0;\n}\nvec4 texture3Dfrom2D(vec3 pos)\n{\n // vec2 islices = vec2(1.0 /GRID_NUMBER_X, 1.0 /GRID_NUMBER_Y);\n //Get z slice index and position between two slices\n float Z = pos.z * slices.x * slices.y;\n int slice = int(Z); //Index of first slice\n\n //X & Y coords of sample scaled to slice size\n vec2 sampleOffset = pos.xy * islices;\n sampleOffset.x = islices.x-sampleOffset.x;\n //Offsets in 2D texture of given slice indices\n //(add offsets to scaled position within slice to get sample positions)\n float A = float(slice) * islices.x;\n float B = float(slice+1) * islices.x;\n vec2 z1offset = vec2(fract(A), floor(A) / slices.y) + sampleOffset;\n vec2 z2offset = vec2(fract(B), floor(B) / slices.y) + sampleOffset;\n\n z1offset.x = 1.0 - z1offset.x;\n z2offset.x = 1.0 - z2offset.x;\n if(uDecoded){\n float z1 = decodeValue(texture2D(volumeTexture, z1offset).rgb);\n float z2 = decodeValue(texture2D(volumeTexture, z2offset).rgb);\n // vec4 color1 = texture2D( transferTex, vec2( z1, 1.0) );\n // vec4 color2 = texture2D( transferTex, vec2( z2, 1.0) );\n return mix(vec4(z1), vec4(z2), fract(Z));\n }\n return mix(texture2D(volumeTexture, z1offset), texture2D(volumeTexture, z2offset), fract(Z));\n}\n// vec4 texture3Dfrom2D(vec3 pos)\n// {\n// vec2 islices = vec2(1.0 /GRID_NUMBER_X, 1.0 /GRID_NUMBER_Y);\n// //Get z slice index and position between two slices\n// float Z = pos.z * GRID_NUMBER_X * GRID_NUMBER_Y;\n// int slice = int(Z); //Index of first slice\n\n// //X & Y coords of sample scaled to slice size\n// vec2 sampleOffset = pos.xy * islices;\n// //Offsets in 2D texture of given slice indices\n// //(add offsets to scaled position within slice to get sample positions)\n// float A = float(slice) * islices.x;\n// float B = float(slice+1) * islices.x;\n// vec2 z1offset = vec2(fract(A), floor(A) / GRID_NUMBER_Y) + sampleOffset;\n// vec2 z2offset = vec2(fract(B), floor(B) / GRID_NUMBER_Y) + sampleOffset;\n \n// //Interpolate the final value by position between slices [0,1]\n// return mix(texture2D(volumeTexture, z1offset), texture2D(volumeTexture, z2offset), fract(Z));\n// }\nfloat interpolate_tricubic_fast(vec3 coord)\n{\n/* License applicable to this function:\nCopyright (c) 2008-2013, Danny Ruijters. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n* Neither the name of the copyright holders nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are\nthose of the authors and should not be interpreted as representing official\npolicies, either expressed or implied.\n\nWhen using this code in a scientific project, please cite one or all of the\nfollowing papers:\n* Daniel Ruijters and Philippe Thévenaz,\n GPU Prefilter for Accurate Cubic B-Spline Interpolation, \n The Computer Journal, vol. 55, no. 1, pp. 15-20, January 2012.\n* Daniel Ruijters, Bart M. ter Haar Romeny, and Paul Suetens,\n Efficient GPU-Based Texture Interpolation using Uniform B-Splines,\n Journal of Graphics Tools, vol. 13, no. 4, pp. 61-69, 2008.\n*/\n // shift the coordinate from [0,1] to [-0.5, nrOfVoxels-0.5]\n vec3 nrOfVoxels = uResolution; //textureSize3D(tex, 0));\n vec3 coord_grid = coord * nrOfVoxels - 0.5;\n vec3 index = floor(coord_grid);\n vec3 fraction = coord_grid - index;\n vec3 one_frac = 1.0 - fraction;\n\n vec3 w0 = 1.0/6.0 * one_frac*one_frac*one_frac;\n vec3 w1 = 2.0/3.0 - 0.5 * fraction*fraction*(2.0-fraction);\n vec3 w2 = 2.0/3.0 - 0.5 * one_frac*one_frac*(2.0-one_frac);\n vec3 w3 = 1.0/6.0 * fraction*fraction*fraction;\n\n vec3 g0 = w0 + w1;\n vec3 g1 = w2 + w3;\n vec3 mult = 1.0 / nrOfVoxels;\n vec3 h0 = mult * ((w1 / g0) - 0.5 + index); //h0 = w1/g0 - 1, move from [-0.5, nrOfVoxels-0.5] to [0,1]\n vec3 h1 = mult * ((w3 / g1) + 1.5 + index); //h1 = w3/g1 + 1, move from [-0.5, nrOfVoxels-0.5] to [0,1]\n\n // fetch the eight linear interpolations\n // weighting and fetching is interleaved for performance and stability reasons\n float tex000 = texture3Dfrom2D(h0).r;\n float tex100 = texture3Dfrom2D(vec3(h1.x, h0.y, h0.z)).r;\n tex000 = mix(tex100, tex000, g0.x); //weigh along the x-direction\n float tex010 = texture3Dfrom2D(vec3(h0.x, h1.y, h0.z)).r;\n float tex110 = texture3Dfrom2D(vec3(h1.x, h1.y, h0.z)).r;\n tex010 = mix(tex110, tex010, g0.x); //weigh along the x-direction\n tex000 = mix(tex010, tex000, g0.y); //weigh along the y-direction\n float tex001 = texture3Dfrom2D(vec3(h0.x, h0.y, h1.z)).r;\n float tex101 = texture3Dfrom2D(vec3(h1.x, h0.y, h1.z)).r;\n tex001 = mix(tex101, tex001, g0.x); //weigh along the x-direction\n float tex011 = texture3Dfrom2D(vec3(h0.x, h1.y, h1.z)).r;\n float tex111 = texture3Dfrom2D(h1).r;\n tex011 = mix(tex111, tex011, g0.x); //weigh along the x-direction\n tex001 = mix(tex011, tex001, g0.y); //weigh along the y-direction\n\n return mix(tex001, tex000, g0.z); //weigh along the z-direction\n}\nfloat tex3D(vec3 pos) \n{\n if (uFilter > 0)\n return interpolate_tricubic_fast(pos);\n return texture3Dfrom2D(pos).x;\n}\nvoid main(){\n // vec4 clipCoords = czm_viewportOrthographic * vec4(gl_FragCoord.xy, 0.0, 1.0);\n vec4 eyeCoords = czm_windowToEyeCoordinates(gl_FragCoord);\n mat4 invMVMatrix = transpose(uMVMatrix);\n // vec4 worldCoords = u_invView * eyeCoords;\n // if(worldCoords.x>1.0 || worldCoords.x<-1.0){\n // discard;\n // }\n // if(worldCoords.y>1.0 || worldCoords.y<-1.0){\n // discard;\n // }\n // if(worldCoords.z>1.0 || worldCoords.z<-1.0){\n // discard;\n // }\n // gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n\n vec3 rayDirection = normalize((invMVMatrix * eyeCoords).xyz);\n\n //Ray origin from the camera position\n vec4 camPos = -vec4(uMVMatrix[3]); //4th column of modelview\n vec3 rayOrigin = (invMVMatrix * camPos).xyz;\n\n //Calc step\n float stepSize = 1.732 / float(uSamples); //diagonal of [0,1] normalised coord cube = sqrt(3)\n\n //Intersect ray with bounding box\n vec2 intersection = rayIntersectBox(rayDirection, rayOrigin);\n //Subtract small increment to avoid errors on front boundary\n intersection.y -= 0.000001;\n //Discard points outside the box (no intersection)\n if (intersection.x <= intersection.y) discard;\n \n vec3 rayStart = rayOrigin + rayDirection * intersection.y;\n vec3 rayStop = rayOrigin + rayDirection * intersection.x;\n\n rayStart/=divideFactor;\n rayStart+=vec3(0.5,0.5,0);\n rayStop/=divideFactor;\n rayStop+=vec3(0.5,0.5,0);\n \n\n vec3 step = normalize(rayStop-rayStart) * stepSize;\n vec3 pos = rayStart;\n\n float T = 1.0;\n vec3 colour = vec3(0.0);\n bool inside = false;\n vec3 shift = uIsoSmooth / uResolution;\n\n float travel = distance(rayStop, rayStart) / stepSize;\n int samples = int(ceil(travel));\n float range = uRange.y - uRange.x;\n if (range <= 0.0) range = 1.0;\n //Scale isoValue\n float isoValue = uRange.x + uIsoValue * range;\n for (int i=0; i < maxSamples; ++i)\n {\n //Render samples until we pass out back of cube or fully opaque\n#ifndef IE11\n if (i == samples || T < 0.01) break;\n#else\n //This is slower but allows IE 11 to render, break on non-uniform condition causes it to fail\n if (i == uSamples) break;\n if (all(greaterThanEqual(pos, uBBMin)) && all(lessThanEqual(pos, uBBMax)))\n#endif\n {\n //Get density \n float density = tex3D(pos);\n if (uDensityFactor > 0.0)\n {\n //Normalise the density over provided range\n density = (density - uRange.x) / range;\n density = clamp(density, 0.0, 1.0);\n if (density < 0.0 || density > 1.0)\n {\n //Skip to next sample...\n pos += step;\n continue;\n }\n\n density = pow(density, uPower); //Apply power\n\n vec4 value;\n if (uEnableColour)\n value = texture2D(uTransferFunction, vec2(density, 0.5));\n else\n value = vec4(density);\n\n value *= uDensityFactor * stepSize;\n\n //Color\n colour += T * value.rgb;\n //Alpha\n T *= 1.0 - value.a;\n }\n }\n //Next sample...\n pos += step;\n }\n //Apply brightness, saturation & contrast\n colour += uBrightness;\n const vec3 LumCoeff = vec3(0.2125, 0.7154, 0.0721);\n vec3 AvgLumin = vec3(0.5, 0.5, 0.5);\n vec3 intensity = vec3(dot(colour, LumCoeff));\n colour = mix(intensity, colour, uSaturation);\n colour = mix(AvgLumin, colour, uContrast);\n\n if (T > 0.95) discard;\n gl_FragColor = vec4(colour, 1.0 - T);\n // gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);\n}',this._video=e.video,this._image=e.image}return e.prototype.createTextureAndCommand=function(e){var t=this;this._context=e,this._transferTexture=v(e,this._colorScheme);var i=this;c.default(this._video)?(this._type="video",this._video.addEventListener("canplaythrough",(function(){i._volumeTexture=new s.default({context:e,width:t._video.videoWidth,height:t._video.videoHeight,sampler:new l.default({wrapS:u.default.CLAMP_TO_EDGE,wrapT:u.default.CLAMP_TO_EDGE,minificationFilter:p.default.LINEAR,magnificationFilter:m.default.LINEAR})})}))):c.default(this._image)&&(this._type="image",i._volumeTexture=new s.default({context:e,width:this._image.width,height:this._image.height,source:this._image,sampler:new l.default({wrapS:u.default.CLAMP_TO_EDGE,wrapT:u.default.CLAMP_TO_EDGE,minificationFilter:p.default.LINEAR,magnificationFilter:m.default.LINEAR})}));var n=o.default.fromCache({depthTest:{enabled:!1},depthMask:!1,blending:d.default.ALPHA_BLEND});this.viewportQuadCommand=e.createViewportQuadCommand(i._fragmentShaderSource,{uniformMap:{uMVMatrix:function(){return i._mvMatrix},uSamples:function(){return i._samples},uBBMin:function(){return i._bbMin},uBBMax:function(){return i._bbMax},volumeTexture:function(){return i._volumeTexture},uIsoSmooth:function(){return i._isoSmooth},uResolution:function(){return i._resolution},uRange:function(){return i._range},uIsoValue:function(){return i._isoValue},uDensityFactor:function(){return i._density},uBrightness:function(){return i._brightness},uSaturation:function(){return i._saturation},uContrast:function(){return i._contrast},uEnableColour:function(){return i._useColorRamp},uTransferFunction:function(){return i._transferTexture},uFilter:function(){return i.tricubicfilter},uDecoded:function(){return i._decodedData},divideFactor:function(){return i._divideFactor},uPower:function(){return i._power}},renderState:n}),this.viewportQuadCommand.pass=r.default.OPAQUE},Object.defineProperty(e.prototype,"depth",{get:function(){return this._depth},set:function(e){this._depth=e,this._bbMax.z=e,this._divideFactor.z=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"density",{get:function(){return this._density},set:function(e){this._density=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"colorScheme",{get:function(){return this._colorScheme},set:function(e){this._colorScheme=e,this._transferTexture=v(this._context,e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){return this._range},set:function(e){this._range=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"brightness",{get:function(){return this._brightness},set:function(e){this._brightness=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"saturation",{get:function(){return this._saturation},set:function(e){this._saturation=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"contrast",{get:function(){return this._contrast},set:function(e){this._contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"video",{get:function(){return this._video},set:function(e){var t=this;this._video=e,this._video.addEventListener("canplay",(function(){t._volumeTexture&&(t._volumeTexture.destroy(),t._volumeTexture=void 0),t._volumeTexture=new s.default({context:t._context,width:e.videoWidth,height:e.videoHeight,sampler:new l.default({wrapS:u.default.CLAMP_TO_EDGE,wrapT:u.default.CLAMP_TO_EDGE,minificationFilter:p.default.LINEAR,magnificationFilter:m.default.LINEAR})})}))},enumerable:!1,configurable:!0}),e.prototype.clipXYZ=function(e,t){void 0===e&&(e=new h.default(0,0,0)),void 0===t&&(t=new h.default(1,1,1)),this._bbMin=new h.default(-this._width/2+this._width*e.x,-this._height/2+this._height*e.y,0+this._depth*e.z),this._bbMax=new h.default(-this._width/2+this._width*t.x,-this._height/2+this._height*t.y,0+this._depth*t.z)},e.prototype.update=function(e){this.viewportQuadCommand||this.createTextureAndCommand(e.context),a.default.multiply(e.camera.viewMatrix,this._modelMatrix,this._mvMatrix),c.default(this._volumeTexture)&&("video"===this._type&&4===this._video.readyState&&this._volumeTexture.copyFrom({source:this._video}),e.commandList.push(this.viewportQuadCommand))},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){return f.default(this)},e}();function v(e,t){var i=document.createElement("canvas");i.height=20,i.width=256;var n=i.getContext("2d"),a=n.createLinearGradient(0,0,i.width-1,i.height-1);return t.forEach((function(e){a.addColorStop(e.stop,e.color)})),n.fillStyle=a,n.fillRect(0,0,i.width-1,i.height-1),new s.default({context:e,width:i.width,height:i.height,source:i,sampler:new l.default({wrapS:u.default.CLAMP_TO_EDGE,wrapT:u.default.CLAMP_TO_EDGE,minificationFilter:p.default.LINEAR,magnificationFilter:m.default.LINEAR})})}t.updateTransferFunction=v,t.default=g},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(0),s=i(15),l=i(14),u=i(12),d=i(27),c=i(98),f=i(5),h=i(303),p=i(9),m=i(419),_=i(2),g=i(3),v=new r.default,y=new r.default,b=new u.default,w=new r.default,O=new r.default,x=new l.default,A=new r.default,T=new r.default,E=new r.default,C=new r.default,S=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.getValue=function(e,t){var i;if(i=this.position.referenceFrame===c.default.FIXED?this._velocityVectorProperty._getValue(e,v,y):this.getVelocity(e,v,y),o.default(i))return this.rotationMatrixFromPositionVelocity(y,i,this._ellipsoid,b),d.default.fromRotationMatrix(b,t)},t.prototype.rotationMatrixFromPositionVelocity=function(e,t,i,n){if(!o.default(e))throw new g.default("position is required.");if(!o.default(t))throw new g.default("velocity is required.");var a=_.default(i,s.default.WGS84).geodeticSurfaceNormal(e,T),l=r.default.cross(t,a,A);r.default.normalize(l,l),r.default.equalsEpsilon(l,r.default.ZERO,f.default.EPSILON6)&&(l=r.default.clone(r.default.UNIT_X,l));var d=r.default.negate(a,E);r.default.normalize(d,d);var c=r.default.cross(l,d,C);return u.default.fromColumnMajorArray([c.x,c.y,c.z,l.x,l.y,l.z,d.x,d.y,d.z],n),n},t.prototype.getVelocity=function(e,t,i){o.default(t)||(t=new r.default);var n=this.position;if(!p.default.isConstant(n)){var a,s=n.getValue(e,w);if(a=n.getValueInReferenceFrame(l.default.addSeconds(e,1/60,x),n.referenceFrame,O),a=h.default.convertToReferenceFrame(e,O,n.referenceFrame,c.default.FIXED,O),o.default(s)&&(o.default(a)||(a=s,s=n.getValueInReferenceFrame(l.default.addSeconds(e,-1/60,x),n.referenceFrame,O),o.default(s)))&&!r.default.equals(s,a)){o.default(i)&&s.clone(i);var u=r.default.subtract(a,s,t);return r.default.normalize(u,t)}}},t}(m.default);t.default=S},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))((function(a,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function s(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var i,n,a,r,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,n&&(a=2&r[0]?n.return:r[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,r[1])).done)return a;switch(n=0,a&&(r=[2&r[0],a.value]),r[0]){case 0:case 1:a=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,n=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!(a=o.trys,(a=a.length>0&&a[a.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!a||r[1]>a[0]&&r[1]<a[3])){o.label=r[1];break}if(6===r[0]&&o.label<a[1]){o.label=a[1],a=r;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(r);break}a[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],n=0}finally{i=a=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}};Object.defineProperty(t,"__esModule",{value:!0});var o=i(494);i(1191);var s=i(13),l=i(420),u=i(499),d=i(24),c=i(222),f=i(393),h=i(8),p=i(84),m=i(1),_=i(6),g=i(988),v=i(243),y=i(331),b=i(190),w=i(52),O=i(9),x=i(199),A=i(2);g.default();var T=new m.default,E=new _.default,C={mapMode2D:v.default.ROTATE},S=new y.default,M=function(){function e(e,t){var i=this;this.primitives=new b.default,this.layers=[],this.effects=[],this.tools=[],this._sceneMode=s.default.SCENE3D,this.preUpdate=new d.default,this.postUpdate=new d.default,this.cameraOrbitSpeed=3,this.cesiumViewer=new o.default(e,t?n(n({},C),t):C),this.cesiumViewer.scene.globe.depthTestAgainstTerrain=!0,this.cesiumViewer.scene.logarithmicDepthBuffer=!1,this.cesiumViewer.scene.postProcessStages.fxaa.enabled=!0,this.frameRate=60,this.prevTime=void 0,this.dataSourceDisplay=new l.default({scene:this.cesiumViewer.scene,dataSourceCollection:new u.default}),this.entities=this.dataSourceDisplay.defaultDataSource.entities,this.cesiumViewer.scene.primitives.add(this.primitives),this.removeTicker=this.cesiumViewer.scene.preRender.addEventListener((function(){var e=i.cesiumViewer.clock,t=Date.now();if(i.prevTime){var n=(t-i.prevTime)/1e3;Math.abs(n)>=1/i.frameRate&&(i.update(e.currentTime),i.prevTime=t)}else i.update(e.currentTime),i.prevTime=t;if(void 0!==i.trackedEntity){i.sceneMode===s.default.SCENE2D?(T.x=0,T.y=0,T.z=i.spherical.magnitude):m.default.fromSpherical(i.spherical,T);var a=void 0;if(a=i.trackedEntity.afterTracked?i.trackedEntity.position:O.default.getValueOrUndefined(i.trackedEntity.position,i.cesiumViewer.clock.currentTime)){w.default.eastNorthUpToFixedFrame(a,void 0,E);var r=i.cesiumViewer.camera;r.lookAtTransform(E,T),r.lookLeft(i.lookingLeftAngle),r.lookUp(i.lookingUpAngle)}}})),this.trackMouseEventHandler=new c.default(this.cesiumViewer.scene.canvas)}return Object.defineProperty(e.prototype,"sceneMode",{get:function(){return this._sceneMode},set:function(e){var t=this;this._sceneMode=e,this.layers.forEach((function(i){i.beforeSwitchMode(e);var n=t.cesiumViewer.scene.morphComplete.addEventListener((function(){i.afterSwitchMode(e),n()}))})),this.cesiumViewer.scene.mode=e,e===s.default.SCENE2D||e===s.default.COLUMBUS_VIEW?(this._prevTerrainProvider=this.cesiumViewer.terrainProvider,this.cesiumViewer.terrainProvider=S,this.cesiumViewer.scene.screenSpaceCameraController.enableRotate=!1):(this.cesiumViewer.terrainProvider=this._prevTerrainProvider,this.cesiumViewer.scene.screenSpaceCameraController.enableRotate=!0)},enumerable:!1,configurable:!0}),e.prototype.addLayer=function(e){this.layers.push(e),e.afterAdded(this)},e.prototype.removeLayer=function(e){var t=this.layers.indexOf(e);t>-1&&(this.layers.splice(t,1),e.destroy())},e.prototype.addEffect=function(e){this.effects.push(e),e.afterAdded(this)},e.prototype.update=function(e){this.preUpdate.raiseEvent(e),this.dataSourceDisplay.update(e),this.layers.forEach((function(t){t.update(e)})),this.tools.forEach((function(t){t.update(e)})),this.effects.forEach((function(t){t.update(e)})),this.postUpdate.raiseEvent(e)},e.prototype.track=function(e,t,i,n,o,l,u,d){return void 0===i&&(i=Math.PI/4),void 0===n&&(n=-3*Math.PI/4),void 0===o&&(o=Math.PI/100),void 0===l&&(l=99*Math.PI/100),a(this,void 0,void 0,(function(){var a,c,m,_,g,v,y,b,w,O,T,E,C=this;return r(this,(function(r){switch(r.label){case 0:return(a=e.model)?(c=e.model.ready)?[3,2]:[4,e.model.readyPromise]:[3,3];case 1:c=r.sent(),r.label=2;case 2:a=c,r.label=3;case 3:return a&&(m=e.model.boundingSphere.radius,u=A.default(u,1.5*m),d=A.default(d,100*m)),this.trackedEntity===e?[2]:(_=!1,g=!1,v=0,y=0,T=this.cesiumViewer.scene,E=this.trackMouseEventHandler,void 0===t&&(t=e.model&&e.modelBoundingSphere?8*e.modelBoundingSphere.radius:500),this.spherical=new f.default(n,i,t),this.lookingLeftAngle=0,this.lookingUpAngle=0,this.trackedEntity=e,E.setInputAction((function(e){C.sceneMode!==s.default.SCENE2D&&(_=!0,w=O=h.default.clone(e.position),b=C.spherical.clone())}),p.default.LEFT_DOWN),E.setInputAction((function(e){if(C.sceneMode!==s.default.SCENE2D&&_){var t=(w=e.endPosition).x-O.x,i=w.y-O.y;C.spherical.clock=b.clock-C.cameraOrbitSpeed*t/T.canvas.clientWidth;var n=b.cone-C.cameraOrbitSpeed*i/T.canvas.clientHeight;n>l?n=l:n<o&&(n=o),C.spherical.cone=n}}),p.default.MOUSE_MOVE),E.setInputAction((function(e){var t=Math.max(C.spherical.magnitude-e/1e3*C.spherical.magnitude,.5);u&&d&&t>u&&t<d&&(C.spherical.magnitude=t)}),p.default.WHEEL),E.setInputAction((function(){C.sceneMode!==s.default.SCENE2D&&(_=!1)}),p.default.LEFT_UP),E.setInputAction((function(e){C.sceneMode!==s.default.SCENE2D&&(w=O=h.default.clone(e.position),v=C.lookingLeftAngle,y=C.lookingUpAngle,g=!0)}),p.default.LEFT_DOWN,x.default.SHIFT),E.setInputAction((function(e){if(C.sceneMode!==s.default.SCENE2D&&g){var t=C.cesiumViewer.scene.drawingBufferWidth,i=C.cesiumViewer.scene.drawingBufferHeight,n=e.endPosition,a=n.x-O.x,r=n.y-O.y,o=C.cesiumViewer.camera,l=o.frustum.fov,u=o.frustum.aspectRatio;C.lookingLeftAngle=v+l*a/t,C.lookingUpAngle=y+l/u*r/i}}),p.default.MOUSE_MOVE,x.default.SHIFT),E.setInputAction((function(){C.sceneMode!==s.default.SCENE2D&&(g=!1)}),p.default.LEFT_UP,x.default.SHIFT),this.trackedEntity.afterTracked&&this.trackedEntity.afterTracked(),[2])}}))}))},e.prototype.untrack=function(){this.trackedEntity&&(this.trackedEntity.afterUnTracked&&this.trackedEntity.afterUnTracked(),this.trackedEntity=void 0,this.cesiumViewer.camera.lookAtTransform(_.default.IDENTITY),this.trackMouseEventHandler.removeInputAction(p.default.LEFT_DOWN),this.trackMouseEventHandler.removeInputAction(p.default.MOUSE_MOVE),this.trackMouseEventHandler.removeInputAction(p.default.LEFT_UP))},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){this.removeTicker(),this.layers.forEach((function(e){e.destroy()})),this.effects.forEach((function(e){e.destroy()})),this.layers.length=0,this.entities.removeAll(),this.entities=null,this.primitives.removeAll(),this.primitives=null,this.effects.length=0,this.cesiumViewer.destroy()},e.prototype.addTool=function(e){this.tools.push(e),e.afterAdded(this)},e.prototype.removeTool=function(e){var t=this.tools.indexOf(e);t>-1&&(this.tools.splice(t,1),e.destroy())},e}();t.default=M},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),a=i(0),r=i(76),o=i(500),s=i(420),l=i(989),u=i(990),d=i(992),c=i(993),f=o.default.processPacketData,h=o.default.processMaterialPacketData;function p(e,t,i,a,r){f(Boolean,e,"show",t.show,i,a,r),f(Number,e,"radius",t.radius,i,a,r),f(Boolean,e,"showIntersection",t.showIntersection,i,a,r),f(n.default,e,"intersectionColor",t.intersectionColor,i,a,r),f(Number,e,"intersectionWidth",t.intersectionWidth,i,a,r),h(e,"lateralSurfaceMaterial",t.lateralSurfaceMaterial,i,a,r)}var m={iso8601:void 0};function _(e,t,i,n){var o=t.agi_conicSensor;if(a.default(o)){var s,l=o.interval;a.default(l)&&(m.iso8601=l,s=r.default.fromIso8601(m));var u=e.conicSensor;a.default(u)||(e.addProperty("conicSensor"),u=new c.default,e.conicSensor=u),p(u,o,s,n,i),f(Number,u,"innerHalfAngle",o.innerHalfAngle,s,n,i),f(Number,u,"outerHalfAngle",o.outerHalfAngle,s,n,i),f(Number,u,"minimumClockAngle",o.minimumClockAngle,s,n,i),f(Number,u,"maximumClockAngle",o.maximumClockAngle,s,n,i)}}function g(e,t,i,n){var o=t.agi_rectangularSensor;if(a.default(o)){var s,u=o.interval;a.default(u)&&(m.iso8601=u,s=r.default.fromIso8601(m));var d=e.rectangularSensor;a.default(d)||(e.addProperty("rectangularSensor"),d=new l.default,e.rectangularSensor=d),p(d,o,s,n,i),f(Number,d,"xHalfAngle",o.xHalfAngle,s,n,i),f(Number,d,"yHalfAngle",o.yHalfAngle,s,n,i)}}var v=!1;t.default=function(){if(!v){o.default.updaters.push(_,g);var e=s.default.defaultVisualizersCallback;s.default.defaultVisualizersCallback=function(t,i,n){var a=n.entities;return e(t,i,n).concat([new d.default(t,a),new u.default(t,a)])},v=!0}}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(20),a=i(2),r=i(0),o=i(3),s=i(24),l=function(){function e(){this._definitionChanged=new s.default}return Object.defineProperty(e.prototype,"definitionChanged",{get:function(){return this._definitionChanged},enumerable:!1,configurable:!0}),e.prototype.clone=function(t){return r.default(t)||(t=new e),t.xHalfAngle=this.xHalfAngle,t.yHalfAngle=this.yHalfAngle,t.radius=this.radius,t.show=this.show,t.showIntersection=this.showIntersection,t.intersectionColor=this.intersectionColor,t.intersectionWidth=this.intersectionWidth,t.lateralSurfaceMaterial=this.lateralSurfaceMaterial,t},e.prototype.merge=function(e){if(!r.default(e))throw new o.default("source is required.");this.xHalfAngle=a.default(this.xHalfAngle,e.xHalfAngle),this.yHalfAngle=a.default(this.yHalfAngle,e.yHalfAngle),this.radius=a.default(this.radius,e.radius),this.show=a.default(this.show,e.show),this.showIntersection=a.default(this.showIntersection,e.showIntersection),this.intersectionColor=a.default(this.intersectionColor,e.intersectionColor),this.intersectionWidth=a.default(this.intersectionWidth,e.intersectionWidth),this.lateralSurfaceMaterial=a.default(this.lateralSurfaceMaterial,e.lateralSurfaceMaterial)},e}();Object.defineProperties(l.prototype,{xHalfAngle:n.default("xHalfAngle"),yHalfAngle:n.default("yHalfAngle"),lateralSurfaceMaterial:n.default("lateralSurfaceMaterial"),intersectionColor:n.default("intersectionColor"),intersectionWidth:n.default("intersectionWidth"),showIntersection:n.default("showIntersection"),radius:n.default("radius"),show:n.default("show")}),t.default=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(47),a=i(1),r=i(5),o=i(7),s=i(0),l=i(3),u=i(12),d=i(27),c=i(9),f=i(6),h=i(19),p=i(991),m=i(973),_=i(158),g=o.default.WHITE,v=Number.POSITIVE_INFINITY,y=new u.default,b=new a.default,w=new d.default,O=function(){function e(t,i){if(!s.default(t))throw new l.default("scene is required.");if(!s.default(i))throw new l.default("entityCollection is required.");i.collectionChanged.addEventListener(e.prototype._onCollectionChanged,this),this._scene=t,this._primitives=t.primitives,this._entityCollection=i,this._hash={},this._entitiesToVisualize=new n.default,this._onCollectionChanged(i,i.values,[],[])}return e.prototype.update=function(e){if(!s.default(e))throw new l.default("time is required.");for(var t=this._entitiesToVisualize.values,i=this._hash,n=this._primitives,o=0,h=t.length;o<h;o++){var m=t[o],O=m._rectangularSensor,x=void 0,A=void 0,T=i[m.id],E=m.isShowing&&m.isAvailable(e)&&c.default.getValueOrDefault(O._show,e,!0);if(E&&(x=c.default.getValueOrUndefined(m._position,e,b),A=c.default.getValueOrUndefined(m._orientation,e,w),E=s.default(x)&&s.default(A)),E){var C=s.default(T)?T.primitive:void 0;s.default(C)||((C=new p.default).id=m,n.add(C),T={primitive:C,position:void 0,orientation:void 0},i[m.id]=T),a.default.equals(x,T.position)&&d.default.equals(A,T.orientation)||(f.default.fromRotationTranslation(u.default.fromQuaternion(A,y),x,C.modelMatrix),T.position=a.default.clone(x,T.position),T.orientation=d.default.clone(A,T.orientation)),C.show=!0,C.xHalfAngle=c.default.getValueOrDefault(O._xHalfAngle,e,r.default.PI_OVER_TWO),C.yHalfAngle=c.default.getValueOrDefault(O._yHalfAngle,e,r.default.PI_OVER_TWO),C.radius=c.default.getValueOrDefault(O._radius,e,v),C.lateralSurfaceMaterial=_.default.getValue(e,O._lateralSurfaceMaterial,C.lateralSurfaceMaterial),C.intersectionColor=c.default.getValueOrClonedDefault(O._intersectionColor,e,g,C.intersectionColor),C.intersectionWidth=c.default.getValueOrDefault(O._intersectionWidth,e,1)}else s.default(T)&&(T.primitive.show=!1)}return!0},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){for(var e=this._entitiesToVisualize.values,t=this._hash,i=this._primitives,n=e.length-1;n>-1;n--)m.default(e[n],t,i);return h.default(this)},e.prototype._onCollectionChanged=function(e,t,i,n){var a,r,o=this._entitiesToVisualize,l=this._hash,u=this._primitives;for(a=t.length-1;a>-1;a--)r=t[a],s.default(r._rectangularSensor)&&s.default(r._position)&&s.default(r._orientation)&&o.set(r.id,r);for(a=n.length-1;a>-1;a--)r=n[a],s.default(r._rectangularSensor)&&s.default(r._position)&&s.default(r._orientation)?o.set(r.id,r):(m.default(r,l,u),o.remove(r.id));for(a=i.length-1;a>-1;a--)r=i[a],m.default(r,l,u),o.remove(r.id)},e}();t.default=O},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(393),r=i(5),o=i(2),s=i(50),l=i(3),u=i(19),d=i(972);function c(e,t,i,r){var o=t[e];n.default(o)||(o=new a.default,t[e]=o),o.clock=i,o.cone=r,o.magnitude=1}function f(e){var t=e._customSensor.directions,i=Math.tan(Math.min(e._xHalfAngle,r.default.toRadians(89))),n=Math.tan(Math.min(e._yHalfAngle,r.default.toRadians(89))),a=Math.atan(i/n),o=Math.atan(Math.sqrt(i*i+n*n));c(0,t,a,o),c(1,t,r.default.toRadians(180)-a,o),c(2,t,r.default.toRadians(180)+a,o),c(3,t,-a,o),t.length=4,e._customSensor.directions=t}var h=function(){function e(e){e=o.default(e,o.default.EMPTY_OBJECT);var t=s.default(e);t._pickPrimitive=o.default(e._pickPrimitive,this),t.directions=void 0,this._customSensor=new d.default(t),this._xHalfAngle=o.default(e.xHalfAngle,r.default.PI_OVER_TWO),this._yHalfAngle=o.default(e.yHalfAngle,r.default.PI_OVER_TWO),f(this)}return Object.defineProperty(e.prototype,"xHalfAngle",{get:function(){return this._xHalfAngle},set:function(e){if(e>r.default.PI_OVER_TWO)throw new l.default("xHalfAngle must be less than or equal to 90 degrees.");this._xHalfAngle!==e&&(this._xHalfAngle=e,f(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yHalfAngle",{get:function(){return this._yHalfAngle},set:function(e){if(e>r.default.PI_OVER_TWO)throw new l.default("yHalfAngle must be less than or equal to 90 degrees.");this._yHalfAngle!==e&&(this._yHalfAngle=e,f(this))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"show",{get:function(){return this._customSensor.show},set:function(e){this._customSensor.show=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showIntersection",{get:function(){return this._customSensor.showIntersection},set:function(e){this._customSensor.showIntersection=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showThroughEllipsoid",{get:function(){return this._customSensor.showThroughEllipsoid},set:function(e){this._customSensor.showThroughEllipsoid=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modelMatrix",{get:function(){return this._customSensor.modelMatrix},set:function(e){this._customSensor.modelMatrix=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"radius",{get:function(){return this._customSensor.radius},set:function(e){this._customSensor.radius=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lateralSurfaceMaterial",{get:function(){return this._customSensor.lateralSurfaceMaterial},set:function(e){this._customSensor.lateralSurfaceMaterial=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"intersectionColor",{get:function(){return this._customSensor.intersectionColor},set:function(e){this._customSensor.intersectionColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"intersectionWidth",{get:function(){return this._customSensor.intersectionWidth},set:function(e){this._customSensor.intersectionWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._customSensor.id},set:function(e){this._customSensor.id=e},enumerable:!1,configurable:!0}),e.prototype.update=function(e){this._customSensor.update(e)},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){return this._customSensor&&this._customSensor.destroy(),u.default(this)},e}();t.default=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1),a=i(7),r=i(0),o=i(12),s=i(27),l=i(393),u=i(5),d=i(3),c=i(47),f=i(973),h=i(19),p=i(9),m=i(158),_=i(6),g=i(972),v=a.default.WHITE,y=Number.POSITIVE_INFINITY,b=new o.default,w=new n.default,O=new s.default;function x(e,t,i,n){var a=t[e];r.default(a)||(a=new l.default,t[e]=a),a.clock=i,a.cone=n,a.magnitude=1}function A(e,t,i,n,a){var r,o=e.directions,s=0,l=u.default.toRadians(2);if(0===t&&i===u.default.TWO_PI)for(r=0;r<u.default.TWO_PI;r+=l)x(s++,o,r,a);else{for(r=t;r<i;r+=l)x(s++,o,r,a);if(x(s++,o,i,a),n){for(r=i;r>t;r-=l)x(s++,o,r,n);x(s++,o,t,n)}else x(s++,o,i,0)}o.length=s,e.directions=o}var T=function(){function e(t,i){if(!r.default(t))throw new d.default("scene is required.");if(!r.default(i))throw new d.default("entityCollection is required.");i.collectionChanged.addEventListener(e.prototype._onCollectionChanged,this),this._scene=t,this._primitives=t.primitives,this._entityCollection=i,this._hash={},this._entitiesToVisualize=new c.default,this._onCollectionChanged(i,i.values,[],[])}return e.prototype.update=function(e){if(!r.default(e))throw new d.default("time is required.");for(var t=this._entitiesToVisualize.values,i=this._hash,a=this._primitives,l=0,c=t.length;l<c;l++){var f=t[l],h=f._conicSensor,x=void 0,T=void 0,E=i[f.id],C=f.isShowing&&f.isAvailable(e)&&p.default.getValueOrDefault(h._show,e,!0);if(C&&(x=p.default.getValueOrUndefined(f._position,e,w),T=p.default.getValueOrUndefined(f._orientation,e,O),C=r.default(x)&&r.default(T)),C){var S=r.default(E)?E.primitive:void 0;r.default(S)||((S=new g.default).id=f,a.add(S),E={primitive:S,position:void 0,orientation:void 0,minimumClockAngle:void 0,maximumClockAngle:void 0,innerHalfAngle:void 0,outerHalfAngle:void 0},i[f.id]=E),n.default.equals(x,E.position)&&s.default.equals(T,E.orientation)||(_.default.fromRotationTranslation(o.default.fromQuaternion(T,b),x,S.modelMatrix),E.position=n.default.clone(x,E.position),E.orientation=s.default.clone(T,E.orientation)),S.show=!0;var M=p.default.getValueOrDefault(h._minimumClockAngle,e,0),D=p.default.getValueOrDefault(h._maximumClockAngle,e,u.default.TWO_PI),P=p.default.getValueOrDefault(h._innerHalfAngle,e,0),I=p.default.getValueOrDefault(h._outerHalfAngle,e,Math.PI);M===E.minimumClockAngle&&D===E.maximumClockAngle&&P===E.innerHalfAngle&&I===E.outerHalfAngle||(A(S,M,D,P,I),E.innerHalfAngle=P,E.maximumClockAngle=D,E.outerHalfAngle=I,E.minimumClockAngle=M),S.radius=p.default.getValueOrDefault(h._radius,e,y),S.lateralSurfaceMaterial=m.default.getValue(e,h._lateralSurfaceMaterial,S.lateralSurfaceMaterial),S.intersectionColor=p.default.getValueOrClonedDefault(h._intersectionColor,e,v,S.intersectionColor),S.intersectionWidth=p.default.getValueOrDefault(h._intersectionWidth,e,1)}else r.default(E)&&(E.primitive.show=!1)}return!0},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){for(var e=this._entitiesToVisualize.values,t=this._hash,i=this._primitives,n=e.length-1;n>-1;n--)f.default(e[n],t,i);return h.default(this)},e.prototype._onCollectionChanged=function(e,t,i,n){var a,o,s=this._entitiesToVisualize,l=this._hash,u=this._primitives;for(a=t.length-1;a>-1;a--)o=t[a],r.default(o._conicSensor)&&r.default(o._position)&&r.default(o._orientation)&&s.set(o.id,o);for(a=n.length-1;a>-1;a--)o=n[a],r.default(o._conicSensor)&&r.default(o._position)&&r.default(o._orientation)?s.set(o.id,o):(f.default(o,l,u),s.remove(o.id));for(a=i.length-1;a>-1;a--)o=i[a],f.default(o,l,u),s.remove(o.id)},e}();t.default=T},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(20),a=i(152),r=i(2),o=i(0),s=i(3),l=i(24),u=function(){function e(e){this._definitionChanged=new l.default,this.merge(r.default(e,r.default.EMPTY_OBJECT))}return Object.defineProperty(e.prototype,"definitionChanged",{get:function(){return this._definitionChanged},enumerable:!1,configurable:!0}),e.prototype.clone=function(t){return o.default(t)||(t=new e),t.show=this.show,t.innerHalfAngle=this.innerHalfAngle,t.outerHalfAngle=this.outerHalfAngle,t.minimumClockAngle=this.minimumClockAngle,t.maximumClockAngle=this.maximumClockAngle,t.radius=this.radius,t.showIntersection=this.showIntersection,t.intersectionColor=this.intersectionColor,t.intersectionWidth=this.intersectionWidth,t.lateralSurfaceMaterial=this.lateralSurfaceMaterial,t},e.prototype.merge=function(e){if(!o.default(e))throw new s.default("source is required.");this.show=r.default(this.show,e.show),this.innerHalfAngle=r.default(this.innerHalfAngle,e.innerHalfAngle),this.outerHalfAngle=r.default(this.outerHalfAngle,e.outerHalfAngle),this.minimumClockAngle=r.default(this.minimumClockAngle,e.minimumClockAngle),this.maximumClockAngle=r.default(this.maximumClockAngle,e.maximumClockAngle),this.radius=r.default(this.radius,e.radius),this.showIntersection=r.default(this.showIntersection,e.showIntersection),this.intersectionColor=r.default(this.intersectionColor,e.intersectionColor),this.intersectionWidth=r.default(this.intersectionWidth,e.intersectionWidth),this.lateralSurfaceMaterial=r.default(this.lateralSurfaceMaterial,e.lateralSurfaceMaterial)},e}();Object.defineProperties(u.prototype,{minimumClockAngle:n.default("minimumClockAngle"),maximumClockAngle:n.default("maximumClockAngle"),innerHalfAngle:n.default("innerHalfAngle"),outerHalfAngle:n.default("outerHalfAngle"),lateralSurfaceMaterial:a.default("lateralSurfaceMaterial"),intersectionColor:n.default("intersectionColor"),intersectionWidth:n.default("intersectionWidth"),showIntersection:n.default("showIntersection"),radius:n.default("radius"),show:n.default("show")}),t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(0),s=i(14),l=i(12),u=i(27),d=i(98),c=i(52),f=i(303),h=i(9),p=i(419),m=new r.default,_=new r.default,g=new l.default,v=new r.default,y=new r.default,b=new s.default,w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.getValue=function(e,t){var i;if(i=this.position.referenceFrame===d.default.FIXED?this._velocityVectorProperty._getValue(e,m,_):this.getVelocity(e,m,_),o.default(i))return c.default.rotationMatrixFromPositionVelocity(_,i,this._ellipsoid,g),u.default.fromRotationMatrix(g,t)},t.prototype.getVelocity=function(e,t,i){o.default(t)||(t=new r.default);var n=this.position;if(!h.default.isConstant(n)){var a,l=n.getValue(e,v);if(n.referenceFrame===d.default.FIXED?a=n.getValue(e,y):(a=n.getValueInReferenceFrame(s.default.addSeconds(e,1/60,b),n.referenceFrame,y),a=f.default.convertToReferenceFrame(e,y,n.referenceFrame,d.default.FIXED,y)),o.default(l)&&(o.default(a)||(a=l,l=n.getValueInReferenceFrame(s.default.addSeconds(e,-1/60,b),n.referenceFrame,y),o.default(l)))&&!r.default.equals(l,a)){o.default(i)&&l.clone(i);var u=r.default.subtract(a,l,t);return r.default.normalize(u,t)}}},t}(p.default);t.default=w},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={speed:1,color1:o.default.WHITE,color2:o.default.GRAY,isShow:!0,intermittent:!1,frequency:1},u=function(e){function t(t){void 0===t&&(t=l);var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"Blowout",uniforms:r({},n),source:"\nvec2 hash( vec2 p )\n{\n p = vec2( dot(p,vec2(127.1,311.7)),\n dot(p,vec2(269.5,183.3)) );\n return -1.0 + 2.0*fract(sin(p)*43758.5453123);\n}\n\nfloat noise( in vec2 p )\n{\n const float K1 = 0.366025404; // (sqrt(3)-1)/2;\n const float K2 = 0.211324865; // (3-sqrt(3))/6;\n \n vec2 i = floor( p + (p.x+p.y)*K1 );\n \n vec2 a = p - i + (i.x+i.y)*K2;\n vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);\n vec2 b = a - o + K2;\n vec2 c = a - 1.0 + 2.0*K2;\n \n vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );\n \n vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));\n \n return dot( n, vec3(70.0) );\n}\n\nfloat fbm(vec2 uv)\n{\n float f;\n mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );\n f = 0.5000*noise( uv ); uv = m*uv;\n f += 0.2500*noise( uv ); uv = m*uv;\n f += 0.1250*noise( uv ); uv = m*uv;\n f += 0.0625*noise( uv ); uv = m*uv;\n f = 0.5 + 0.5*f;\n return f;\n}\n\nczm_material czm_getMaterial(czm_materialInput materialInput) { \n czm_material material = czm_getDefaultMaterial(materialInput); \n if(!isShow){\n discard;\n };\n vec2 uv = materialInput.st;\n float time = czm_frameNumber/60.0*speed;\n //间歇喷射\n // float gradient = (sin(time)+1.0)/2.0 - uv.y;\n \n //0时没有效果\n // float gradient = 0.0;\n \n float gradient = intermittent ? (sin(time * frequency) + 1.0)/2.0 - uv.y:1.0 - uv.y;\n \n float gradientStep = 0.2;\n //fbm噪波函数\n float noiseTexel = fbm(uv * vec2(10.0,5.0) - vec2(0, czm_frameNumber/60.0 * speed));\n \n //y轴渐变\n float intensity = mix(noiseTexel,0.0,uv.y);\n \n vec4 brighterColor = vec4(color1.rgb, 0.25);\n vec4 darkerColor = vec4(color2.rgb, 0.0625);\n vec4 middleColor = mix(brighterColor, darkerColor, 0.5);\n \n \n float firstStep = smoothstep(0.0, noiseTexel, gradient);\n float darkerColorStep = smoothstep(0.0, noiseTexel, gradient - gradientStep);\n float darkerColorPath = firstStep - darkerColorStep;\n vec4 color = mix(brighterColor, darkerColor, darkerColorPath);\n \n \n //中间颜色\n float middleColorStep = smoothstep(0.0, noiseTexel, gradient - 0.2 * 2.0);\n color = mix(color, middleColor, darkerColorStep - middleColorStep);\n color = mix(vec4(0.0), color, firstStep);\n \n material.diffuse = color.rgb; \n material.emission = color.rgb * 0.3; \n material.alpha = middleColorStep;\n \n return material; \n}\n "},translucent:!0})||this)._speed=n.speed,i._color1=n.color1,i._color2=n.color2,i._isShow=n.isShow,i._intermittent=n.intermittent,i._frequency=n.frequency,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color1",{get:function(){return this._color1},set:function(e){this._color1=e,this.uniforms.color1=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color2",{get:function(){return this._color2},set:function(e){this._color2=e,this.uniforms.color2=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isShow",{get:function(){return this._isShow},set:function(e){this._isShow=e,this.uniforms.isShow=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"intermittent",{get:function(){return this._intermittent},set:function(e){this._intermittent=e,this.uniforms.intermittent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"frequency",{get:function(){return this._frequency},set:function(e){this._frequency=e,this.uniforms.frequency=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(1);function r(e,t,i){var n=t.x,a=t.y,r=t.z,o=i.x-n,s=i.y-a,l=i.z-r;if(0!==o||0!==s||0!==l){var u=((e.x-n)*o+(e.y-a)*s+(e.z-r)*l)/(o*o+s*s+l*l);u>1?(n=i.x,a=i.y,r=i.z):u>0&&(n+=o*u,a+=s*u,r+=l*u)}return(o=e.x-n)*o+(s=e.y-a)*s+(l=e.z-r)*l}function o(e){for(var t=[],i=0;i<e.length;i+=3)t.push(new a.default(e[i],e[i+1],e[i+2]));return t}t.default=function(e,t,i){void 0===t&&(t=1),void 0===i&&(i=!1);var a=void 0!==t?t*t:1;return e=function(e,t){var i,a,s,l,u=e._property._times.length,d=n([],e._property._times),c=o(e._property._values),f=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(u),h=[],p=0,m=u-1;for(f[p]=f[m]=1;m;){for(a=0,i=p+1;i<m;i++)(s=r(c[i],c[p],c[m]))>a&&(l=i,a=s);a>t&&(f[l]=1,h.push(p,l,l,m)),m=h.pop(),p=h.pop()}for(i=0;i<u;i++)f[i]||e.removeSample(d[i]);return e}(e=i?e:function(e,t){for(var i,a,r,s,l,u,d=n([],e._property._times),c=o(e._property._values),f=c[0],h=1,p=c.length;h<p;h++)i=c[h],r=f,s=void 0,l=void 0,u=void 0,s=(a=i).x-r.x,l=a.y-r.y,u=a.z-r.z,s*s+l*l+u*u>t?f=i:e.removeSample(d[h]);return f!==i||e.removeSample(d[d.length-1]),e}(e,a),a)}},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(2),u=i(49),d=i(198),c=i(327),f=i(5),h=i(6),p=i(119),m=i(27),_=i(30),g=i(76),v=i(52),y=i(193),b=i(250),w=i(13),O=i(998),x=i(347),A=i(999),T=i(1e3),E=i(280),C=i(15),S=i(546),M=i(12),D=h.default.IDENTITY.clone(),P=h.default.IDENTITY.clone(),I=new d.default,L={mode:O.default.NORMAL,interval:500,color:s.default.CHARTREUSE,colorBlendAmount:.2,silhouetteColor:s.default.CHARTREUSE,silhouetteSize:5},j=function(e){function t(t){var i=e.call(this,t)||this;return i.pointToBillBoardDistance=1e6,i._enableBillboardRotation=!1,i._show2DBillboard=!0,i._lazyLoadModel=!1,i.imageWidth=10,i.highlightTimeInterval=[],i.lastChangeMode=w.default.SCENE3D,i.useENURotation=l.default(t.useENURotation,!0),t.modelConfig.initialMatrix=l.default(t.modelConfig.initialMatrix,i.referenceType===S.default.ENU?h.default.IDENTITY:h.default.fromRotationTranslation(M.default.fromRotationX(f.default.toRadians(180)))),i.modelConfig=t.modelConfig,i._show2DBillboard=l.default(t.show2DBillboard,!0),i.billboardConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY,rotationOffset:0},l.default(t.billboardConfig,{})),i.labelConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},l.default(t.labelConfig,{})),i.pointConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},l.default(t.pointConfig,{})),t.position&&(i.position=t.position),i.pointToBillBoardDistance=l.default(t.pointToBillBoardDistance,1e6),t.modelDisplayDistance&&(i.modelDisplayDistance=t.modelDisplayDistance),i._alwaysShowModel=l.default(t.alwaysShowModel,!1),i._lazyLoadModel=l.default(t.lazyLoadModel,!1),i.lazyLoadModel||(i.model=b.default.fromGltf(i.modelConfig),i.readyPromise=i.model.readyPromise),i.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:c.default,interpolationDegree:5}),i.highlightConfig=r(r({},L),t.highlightConfig),i}return a(t,e),Object.defineProperty(t.prototype,"lazyLoadModel",{get:function(){return this._lazyLoadModel},set:function(e){this._lazyLoadModel!==e&&(this._lazyLoadModel=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alwaysShowModel",{get:function(){return this._alwaysShowModel},set:function(e){this._alwaysShowModel=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){o.default.clone(e,this._position),this.setMatrix(e,this.rotation),this.model&&h.default.multiply(this.matrix,this.modelConfig.initialMatrix,this.model.modelMatrix),this.billboard&&(this.billboard.position=e),this.billboardConfig.position=e,this.point&&(this.point.position=e),this.pointConfig.position=e,this.label&&(this.label.position=e),this.labelConfig.position=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){m.default.clone(e,this._rotation),this._rotation=e,this.setMatrix(this.position,e),this.model&&h.default.multiply(this.matrix,this.modelConfig.initialMatrix,this.model.modelMatrix)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t;this._show=e,this.label&&(this.label.show=e);var i=null===(t=this.getViewer())||void 0===t?void 0:t.sceneMode;i===w.default.SCENE2D?(this.model&&(this.model.show=!1),this.billboard&&(this.billboard.show=e&&this._show2DBillboard),this.point&&(this.point.show=e&&!this._show2DBillboard)):(this.model&&(this.model.show=e),this.billboard&&(this.billboard.show=!this._alwaysShowModel&&e),this.point&&(this.point.show=!this._alwaysShowModel&&e)),e&&this.lastChangeMode!==i&&this.beforeSwitchMode(i),this.afterSetVisible(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show2DBillboard",{get:function(){return this._show2DBillboard},set:function(e){this._show2DBillboard=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlight",{get:function(){return this._highlight},set:function(e){this._highlight=e,e?this.addHighlight():this.removeHighlight()},enumerable:!1,configurable:!0}),t.prototype.afterTracked=function(){this.children.values.length>0&&this.children.values.forEach((function(e){(e instanceof A.default||e instanceof T.default)&&(e.show=!0)}))},t.prototype.afterUnTracked=function(){this.children.values.length>0&&this.children.values.forEach((function(e){e instanceof A.default&&(e.show=!1)}))},t.prototype.loadModel=function(){var e=this;this.model||(this.model=b.default.fromGltf(this.modelConfig),this.readyPromise=this.model.readyPromise,this.parent.models.add(this.model),this.readyPromise.then((function(t){var i=e.getViewer(),n=i.sceneMode===w.default.SCENE2D;e.model.show=e.show&&!n,e._highlight&&e.addHighlight(),h.default.multiply(e.matrix,e.modelConfig.initialMatrix,e.model.modelMatrix);var a=i.cesiumViewer.camera,r=e.imageWidth/i.cesiumViewer.canvas.width,o=2*e.model.boundingSphere.radius/r,s=0;s=a.frustum instanceof p.default?o/Math.tan(a.frustum.fov/2):o/.577350269;var l=e.modelDisplayDistance?e.modelDisplayDistance:s;e.model.distanceDisplayCondition=e._alwaysShowModel?void 0:new u.default(0,l),n?e._tempBillboardDisplayCondition=new u.default(l,e.pointToBillBoardDistance):e.billboard.distanceDisplayCondition=new u.default(l,e.pointToBillBoardDistance),e.model.entityId=e.id})))},t.prototype.setMatrix=function(e,t){if(e){if(this.isVelocityOriented&&!this.sampledPositionProperty.isConstant||!this.useENURotation)h.default.fromTranslation(e,this.matrix);else switch(this.referenceType){case S.default.ENU:v.default.eastNorthUpToFixedFrame(e,void 0,this.matrix);break;case S.default.VVLH:v.default.headingPitchRollToFixedFrame(e,new d.default,C.default.WGS84,v.default.localFrameToFixedFrameGenerator("east","south"),this.matrix)}this.matrixVelocity=this.matrix.clone()}if(t)if(h.default.fromTranslationQuaternionRotationScale(o.default.ZERO,t,x.UNIT_SCALE,D),h.default.multiply(this.matrix,D,this.matrix),this._enableBillboardRotation&&t&&(v.default.fixedFrameToHeadingPitchRoll(this.matrix,void 0,void 0,I),this.billboard&&(this.billboard.rotation=-I.heading-this.billboardConfig.rotationOffset)),m.default.equals(this.relativeRotation,m.default.IDENTITY))h.default.multiply(this.matrixVelocity,D,this.matrixVelocity);else{var i=new m.default,n=new m.default;m.default.inverse(this.relativeRotation,i),m.default.multiply(t,i,n),h.default.fromTranslationQuaternionRotationScale(o.default.ZERO,n,x.UNIT_SCALE,P),h.default.multiply(this.matrixVelocity,P,this.matrixVelocity)}return this.matrix},t.prototype.afterAdded=function(t){var i=this;if(e.prototype.afterAdded.call(this,t),this.point=t.points.add(r(r({},this.pointConfig),{show:!1})),this.label=t.labels.add(Object.assign({distanceDisplayCondition:new u.default(0,2e8)},this.labelConfig)),this.label.show=l.default(this.labelConfig.show,!0)&&this.show,this.lazyLoadModel||(this.model.show=this.show,this._highlight&&this.addHighlight(),t.models.add(this.model)),this.parent._imageCache.has(this.billboardConfig.image)){var n=this.parent._imageCache.get(this.billboardConfig.image);this.imageWidth=n.width,this.initBillboard(n)}else _.default.fetchImage({url:this.billboardConfig.image}).then((function(e){i.parent._imageCache.set(i.billboardConfig.image,e),i.imageWidth=e.width,i.initBillboard(e)}));this.point.entityId=this.id,this.label.entityId=this.id,this.isAdded=!0,this.lazyLoadModel||this.readyPromise.then((function(e){h.default.multiply(i.matrix,i.modelConfig.initialMatrix,i.model.modelMatrix)}))},t.prototype.addHighlight=function(){var e=this;switch(this.highlightConfig.mode){case O.default.NORMAL:this.setModelColorAndSilhouette();break;case O.default.TWINKLE:var t=!0;if(this._highlightTimer)return;this._highlightTimer=window.setInterval((function(){e.model.ready&&(t?e.setModelColorAndSilhouette():e.resetModelColorAndSilhouette(),t=!t)}),this.highlightConfig.interval)}},t.prototype.removeHighlight=function(){switch(this.highlightConfig.mode){case O.default.NORMAL:break;case O.default.TWINKLE:window.clearInterval(this._highlightTimer),this._highlightTimer=void 0}this.resetModelColorAndSilhouette()},t.prototype.setModelColorAndSilhouette=function(){var e=this.highlightConfig,t=e.color,i=e.colorBlendAmount,n=e.silhouetteColor,a=e.silhouetteSize;this.model.color=t,this.model.colorBlendMode=y.default.MIX,this.model.colorBlendAmount=i,this.model.silhouetteColor=n,this.model.silhouetteSize=a},t.prototype.resetModelColorAndSilhouette=function(){this.model.color=s.default.WHITE,this.model.colorBlendMode=y.default.HIGHLIGHT,this.model.colorBlendAmount=.5,this.model.silhouetteColor=s.default.WHITE,this.model.silhouetteSize=0},t.prototype.initBillboard=function(e){var t=this;this.point.distanceDisplayCondition=new u.default(this.pointToBillBoardDistance,Number.POSITIVE_INFINITY),this.billboard=this.parent.billboards.add(r(r({},this.billboardConfig),{image:e,show:!1})),this.billboard.entityId=this.id;var i=this.getViewer();this.lazyLoadModel?(this.billboard.distanceDisplayCondition=new u.default(0,this.pointToBillBoardDistance),this.billboard.show=this.show,this.billboard.position=this.position,this.point.show=this.show,i.sceneMode===w.default.SCENE2D&&(this.beforeSwitchMode(i.sceneMode),this.afterSwitchMode(i.sceneMode))):(this.model.readyPromise.then((function(n){if(i){var a=i.cesiumViewer.camera,r=e.width/i.cesiumViewer.canvas.width,o=2*n.boundingSphere.radius/r,s=0;s=a.frustum instanceof p.default?o/Math.tan(a.frustum.fov/2):o/.577350269;var l=t.modelDisplayDistance?t.modelDisplayDistance:s;n.distanceDisplayCondition=t._alwaysShowModel?void 0:new u.default(0,l),t.billboard.distanceDisplayCondition=new u.default(l,t.pointToBillBoardDistance),t.billboard.show=!t._alwaysShowModel&&t.show,t.billboard.position=t.position,t.point.show=!t._alwaysShowModel&&t.show,i.sceneMode===w.default.SCENE2D&&(t.beforeSwitchMode(i.sceneMode),t.afterSwitchMode(i.sceneMode))}})),this.model.entityId=this.id)},t.prototype.updateLabel=function(){var e,t;this.isAdded&&this.label&&this.labelConfig.dynamicDepthTest&&((null===(t=null===(e=this.getViewer())||void 0===e?void 0:e.cesiumViewer.scene.frameState.occluder)||void 0===t?void 0:t.isPointVisible(this.position))?this.label.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.label.disableDepthTestDistance=0)},t.prototype.updatePoint=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.point&&this.pointConfig.dynamicDepthTest&&n===w.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.point.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.point.disableDepthTestDistance=0)},t.prototype.updateBillboard=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.billboard&&this.billboardConfig.dynamicDepthTest&&n===w.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.billboard.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.billboard.disableDepthTestDistance=0)},t.prototype.updateForward=function(t){(e.prototype.updateForward.call(this,t),this.show)&&(this.updateLabel(),this.updatePoint(),this.updateBillboard(),this.highlight&&0!==this.highlightTimeInterval.length&&(this.highlightTimeInterval.some((function(e){return g.default.contains(e,t)}))?this.addHighlight():this.removeHighlight()))},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.parent;t.points.remove(this.point),t.billboards.remove(this.billboard),this.model&&t.models.remove(this.model),t.labels.remove(this.label)},t.prototype.beforeSwitchMode=function(t){this.show&&(this.lastChangeMode=t,e.prototype.beforeSwitchMode.call(this,t),t===w.default.SCENE2D?(this.model&&(this.model.show=!1),this.billboard&&(this.billboard.show=this._show2DBillboard,this.billboard.distanceDisplayCondition&&this.billboard.show&&(this._tempBillboardDisplayCondition=this.billboard.distanceDisplayCondition.clone(),this.billboard.distanceDisplayCondition=void 0)),this.point&&(this.point.show=!this._show2DBillboard,this.point.show&&this.point.distanceDisplayCondition&&(this._tempPointDisplayCondition=this.point.distanceDisplayCondition.clone(),this.point.distanceDisplayCondition=void 0)),this.billboardConfig.enableRotation&&(this._enableBillboardRotation=!0)):(this.model&&!this.model.show&&(this.model.show=!0),this.billboard&&(this.billboard.show=!0),this.billboard&&this._tempBillboardDisplayCondition&&(this._alwaysShowModel||(this.billboard.distanceDisplayCondition=this._tempBillboardDisplayCondition),this._tempBillboardDisplayCondition=void 0),this.point&&this._tempPointDisplayCondition&&(this._alwaysShowModel||(this.point.distanceDisplayCondition=this._tempPointDisplayCondition),this._tempPointDisplayCondition=void 0),this.billboard&&this.billboard.show&&this._alwaysShowModel&&(this.billboard.show=!1),this.point&&!this._alwaysShowModel?this.point.show=!0:this.point&&this.point.show&&this._alwaysShowModel&&(this.point.show=!1),this._enableBillboardRotation=!1))},t}(E.default);t.default=j},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.NORMAL=0]="NORMAL",e[e.TWINKLE=1]="TWINKLE"}(n||(n={})),t.default=n},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(54),s=i(1),l=i(7),u=i(43),d=i(12),c=i(6),f=i(185),h=i(27),p=i(235),m=i(69),_=i(156),g=i(64),v=i(190),y=i(324),b=i(323),w=i(347),O=i(151),x=i(5),A=i(47),T=i(24),E=i(13),C={xAxisConfig:{show:!0,name:"X",color:l.default.RED,width:4,font:"16px",length:10},yAxisConfig:{show:!0,name:"Y",color:l.default.GREEN,width:4,font:"16px",length:10},zAxisConfig:{show:!0,name:"Z",color:l.default.BLUE,width:4,font:"16px",length:10},sunAngleConfig:{show:!1,color:l.default.BLUE,width:4,length:10,font:"16px",angleColor:l.default.WHITE}},S=function(e){function t(t){var i=e.call(this,t)||this;return i.rotationFrame=b.default.LOCAL,i.parentMatrix=c.default.IDENTITY.clone(),i.axisCollection=new A.default,i.axisLabelCollection=new A.default,i.sunCollection=new A.default,i.sunAngleEvent=new T.default,i._axes=new v.default,i._sunAxes=new v.default,i._labels=new p.default,i.xAxisConfig=r(r({},C.xAxisConfig),null==t?void 0:t.xAxisConfig),i.yAxisConfig=r(r({},C.yAxisConfig),null==t?void 0:t.yAxisConfig),i.zAxisConfig=r(r({},C.zAxisConfig),null==t?void 0:t.zAxisConfig),i.sunAngleConfig=r(r({},C.sunAngleConfig),null==t?void 0:t.sunAngleConfig),i._showXAxis=i.xAxisConfig.show,i._showYAxis=i.yAxisConfig.show,i._showZAxis=i.zAxisConfig.show,i._showSunAxis=i.sunAngleConfig.show,i._axes.add(i._labels),i}return a(t,e),Object.defineProperty(t.prototype,"showXAxis",{get:function(){return this._showXAxis},set:function(e){this._showXAxis=e;var t=this.axisCollection.get("x"),i=this.axisLabelCollection.get("xLabel");t.show=this._showXAxis&&this.show,i.show=this._showXAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showYAxis",{get:function(){return this._showYAxis},set:function(e){this._showYAxis=e;var t=this.axisCollection.get("y"),i=this.axisLabelCollection.get("yLabel");t.show=this._showYAxis&&this.show,i.show=this._showYAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showZAxis",{get:function(){return this._showZAxis},set:function(e){this._showZAxis=e;var t=this.axisCollection.get("z"),i=this.axisLabelCollection.get("zLabel");t.show=this._showZAxis&&this.show,i.show=this._showZAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSunAxis",{get:function(){return this._showSunAxis},set:function(e){this._showSunAxis=e;var t=this.sunCollection.get("sunDirection"),i=this.sunCollection.get("sunReference"),n=this.sunCollection.get("arcAxis"),a=this.sunCollection.get("sunAngleLabel"),r=this.sunCollection.get("sunDirectionLabel");t.show=this._showSunAxis&&this.show,i.show=this._showSunAxis&&this.show,a.show=this._showSunAxis&&this.show,r.show=this._showSunAxis&&this.show,n&&(n.show=this._showSunAxis&&this.show)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){if(this._show=e,this.showXAxis){var t=this.axisCollection.get("x"),i=this.axisLabelCollection.get("xLabel");t.show=e,i.show=e}if(this.showYAxis){var n=this.axisCollection.get("y"),a=this.axisLabelCollection.get("yLabel");n.show=e,a.show=e}if(this.showZAxis){var r=this.axisCollection.get("z"),o=this.axisLabelCollection.get("zLabel");r.show=e,o.show=e}if(this.showSunAxis){var s=this.sunCollection.get("sunDirection"),l=this.sunCollection.get("sunReference"),u=this.sunCollection.get("arcAxis"),d=this.sunCollection.get("sunAngleLabel"),c=this.sunCollection.get("sunDirectionLabel");s.show=e,l.show=e,d.show=e,c.show=e,u&&(u.show=e)}},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(){var e=new u.default({geometry:new f.default({positions:[s.default.multiplyByScalar(s.default.UNIT_X,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_X,this.xAxisConfig.length,new s.default)],width:this.xAxisConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),t=new g.default({geometryInstances:e,appearance:new _.default({material:m.default.fromType(m.default.PolylineArrowType,{color:this.xAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showXAxis&&this.show}),i=s.default.multiplyByScalar(s.default.UNIT_X,this.xAxisConfig.length,new s.default),n={show:this._showXAxis&&this.show,position:i,text:this.xAxisConfig.name,font:this.xAxisConfig.font,fillColor:this.xAxisConfig.color},a=new u.default({geometry:new f.default({positions:[s.default.multiplyByScalar(s.default.UNIT_Y,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_Y,this.yAxisConfig.length,new s.default)],width:this.yAxisConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),r=new g.default({geometryInstances:a,appearance:new _.default({material:m.default.fromType(m.default.PolylineArrowType,{color:this.yAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showYAxis&&this.show}),l=s.default.multiplyByScalar(s.default.UNIT_Y,this.yAxisConfig.length,new s.default),d={show:this._showYAxis&&this.show,position:l,text:this.yAxisConfig.name,font:this.yAxisConfig.font,fillColor:this.yAxisConfig.color},c=new u.default({geometry:new f.default({positions:[s.default.multiplyByScalar(s.default.UNIT_Z,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_Z,this.zAxisConfig.length,new s.default)],width:this.zAxisConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),h=s.default.multiplyByScalar(s.default.UNIT_Z,this.zAxisConfig.length,new s.default),p={show:this._showZAxis&&this.show,position:h,text:this.zAxisConfig.name,font:this.zAxisConfig.font,fillColor:this.zAxisConfig.color},v=new g.default({geometryInstances:c,appearance:new _.default({material:m.default.fromType(m.default.PolylineArrowType,{color:this.zAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showZAxis&&this.show});this._axes.add(t);var y=this._labels.add(n);this.axisCollection.set("x",t),this.axisLabelCollection.set("xLabel",y),this._axes.add(r);var b=this._labels.add(d);this.axisCollection.set("y",r),this.axisLabelCollection.set("yLabel",b),this._axes.add(v);var w=this._labels.add(p);this.axisCollection.set("z",v),this.axisLabelCollection.set("zLabel",w)},t.prototype.createSunAngle=function(){var e=this.parent.getViewer().cesiumViewer.scene.context.uniformState.sunPositionWC,t=new s.default,i=new d.default,n=new s.default,a=new h.default;c.default.getMatrix3(this.parentMatrix,i),c.default.getTranslation(this.parentMatrix,n),a=h.default.fromRotationMatrix(i),s.default.subtract(e,n,t),t.equals(s.default.ZERO)&&(t=s.default.UNIT_Z.clone()),s.default.normalize(t,t);var r=new h.default,l=new c.default;y.default.calculateQuaternionFromV1ToV2(s.default.UNIT_X,t,r),c.default.fromTranslationQuaternionRotationScale(n,r,n,l);var p=new s.default(0,0,0),v=new s.default(this.sunAngleConfig.length,0,0),b=new u.default({geometry:new f.default({positions:[p,v],width:this.sunAngleConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),O=new g.default({geometryInstances:b,appearance:new _.default({material:m.default.fromType(m.default.PolylineArrowType,{color:this.sunAngleConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:l,show:this._showSunAxis&&this.show});this._sunAxes.add(O),this.sunCollection.set("sunDirection",O);var A=new c.default;c.default.fromTranslationQuaternionRotationScale(s.default.ZERO,a,w.UNIT_SCALE,A);var T=c.default.multiplyByPoint(A,s.default.UNIT_Y,new s.default),E=new s.default,C=new s.default,S=s.default.angleBetween(T,t);C=s.default.multiplyByScalar(T,Math.cos(S),C),E=s.default.subtract(t,C,E);var M=new c.default,D=new h.default;y.default.calculateQuaternionFromV1ToV2(s.default.UNIT_X,E,D),c.default.fromTranslationQuaternionRotationScale(n,D,n,M);var P=new s.default(this.sunAngleConfig.length,0,0),I=new u.default({geometry:new f.default({positions:[p,P],width:this.sunAngleConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),L=new g.default({geometryInstances:I,appearance:new _.default({material:m.default.fromType(m.default.PolylineArrowType,{color:this.sunAngleConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:M,show:this._showSunAxis&&this.show});this._sunAxes.add(L),this.sunCollection.set("sunReference",L);var j=new s.default;s.default.cross(t,E,j);for(var R=s.default.angleBetween(t,E),N=[],B=new h.default,F=new d.default,k=new s.default,z=0;z<=30;z++){h.default.fromAxisAngle(j,R*z/30,B),F=d.default.fromQuaternion(B,F),d.default.multiplyByVector(F,t,k);var U=s.default.clone(k);s.default.multiplyByScalar(U,this.sunAngleConfig.length/5,U),N.push(U)}var V=new u.default({geometry:new f.default({positions:N,width:this.sunAngleConfig.width,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),H=new c.default;c.default.fromTranslation(n,H);var G=new g.default({geometryInstances:V,appearance:new _.default({material:m.default.fromType("Color",{color:this.sunAngleConfig.angleColor}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:H,show:this._showSunAxis&&this.show});this._sunAxes.add(G),this.sunCollection.set("arcAxis",G);var Y=new c.default;c.default.fromTranslationQuaternionRotationScale(s.default.ZERO,a,w.UNIT_SCALE,Y);var W=c.default.multiplyByPoint(Y,s.default.UNIT_Y,new s.default),q=x.default.PI_OVER_TWO-s.default.angleBetween(W,t),X=x.default.toDegrees(Math.abs(q)).toFixed(5),K=c.default.multiplyByPoint(H,N[12],new s.default),J={show:this._showSunAxis&&this.show,position:K,text:"光照角("+X+")°",font:this.sunAngleConfig.font,fillColor:this.sunAngleConfig.color},Z=this._labels.add(J);this.sunCollection.set("sunAngleLabel",Z);var Q=c.default.multiplyByPoint(H,v,new s.default),$={show:this._showSunAxis&&this.show,position:Q,text:"太阳方向",font:this.sunAngleConfig.font,fillColor:this.sunAngleConfig.color},ee=this._labels.add($);this.sunCollection.set("sunDirectionLabel",ee)},t.prototype.afterAdded=function(e){this.parent=e,this.parentMatrix=e.matrix.clone();var t=e.getViewer();t.primitives.add(this._axes),t.primitives.add(this._sunAxes),this.createPrimitive(),this.createSunAngle()},t.prototype.destroyForward=function(){if(e.prototype.destroyForward.call(this),this._axes){var t=this.parent.getViewer();t.primitives.remove(this._axes),t.primitives.remove(this._sunAxes)}},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&(this.updateMatrix(i),this.showSunAxis&&this.updateAxis(i))},t.prototype.updateAxis=function(e){var t=this.sunCollection.get("sunDirection"),i=this.sunCollection.get("sunReference"),n=this.sunCollection.get("arcAxis"),a=this.sunCollection.get("sunAngleLabel"),r=this.sunCollection.get("sunDirectionLabel"),l=new d.default,p=new s.default,v=new h.default;c.default.getMatrix3(e,l),c.default.getTranslation(e,p),v=h.default.fromRotationMatrix(l);var b=this.parent.getViewer().cesiumViewer.scene.context.uniformState.sunPositionWC,O=new s.default;s.default.subtract(b,p,O),O.equals(s.default.ZERO)&&(O=s.default.UNIT_Z.clone()),s.default.normalize(O,O);var A=new h.default,T=new c.default;y.default.calculateQuaternionFromV1ToV2(s.default.UNIT_X,O,A),c.default.fromTranslationQuaternionRotationScale(p,A,w.UNIT_SCALE,T),t.modelMatrix=T;var E=new c.default;c.default.fromTranslationQuaternionRotationScale(s.default.ZERO,v,w.UNIT_SCALE,E);var C=c.default.multiplyByPoint(E,s.default.UNIT_Y,new s.default),S=new s.default,M=new s.default,D=s.default.angleBetween(C,O);M=s.default.multiplyByScalar(C,Math.cos(D),M),S=s.default.subtract(O,M,S);var P=new c.default,I=new h.default;y.default.calculateQuaternionFromV1ToV2(s.default.UNIT_X,S,I),c.default.fromTranslationQuaternionRotationScale(p,I,w.UNIT_SCALE,P),i.modelMatrix=P;var L=new s.default;s.default.cross(O,S,L);for(var j=s.default.angleBetween(O,S),R=[],N=new h.default,B=new d.default,F=new s.default,k=0;k<=30;k++){h.default.fromAxisAngle(L,j*k/30,N),B=d.default.fromQuaternion(N,B),d.default.multiplyByVector(B,O,F);var z=s.default.clone(F);s.default.multiplyByScalar(z,this.sunAngleConfig.length/5,z),R.push(z)}var U=new u.default({geometry:new f.default({positions:R,width:1,vertexFormat:_.default.VERTEX_FORMAT,arcType:o.default.NONE})}),V=new c.default;c.default.fromTranslation(p,V),this._sunAxes.remove(n);var H=new g.default({geometryInstances:U,appearance:new _.default({material:m.default.fromType("Color",{color:this.sunAngleConfig.angleColor}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:V,asynchronous:!1,show:this._showSunAxis});this._sunAxes.add(H),this.sunCollection.set("arcAxis",H);var G=c.default.multiplyByPoint(E,s.default.UNIT_Y,new s.default),Y=x.default.PI_OVER_TWO-s.default.angleBetween(G,O),W=x.default.toDegrees(Math.abs(Y)).toFixed(5);this.sunAngleEvent.raiseEvent(W);var q=new s.default(this.sunAngleConfig.length,0,0),X=c.default.multiplyByPoint(V,R[12],new s.default);a.text="光照角("+W+"°)",a.position=X;var K=c.default.multiplyByPoint(T,q,new s.default);r.position=K},t.prototype.updateLabel=function(e){if(this.showXAxis){var t=this.axisLabelCollection.get("xLabel"),i=new s.default(this.xAxisConfig.length,0,0),n=c.default.multiplyByPoint(e,i,new s.default);t.position=n}if(this.showYAxis){var a=this.axisLabelCollection.get("yLabel"),r=new s.default(0,this.yAxisConfig.length,0),o=c.default.multiplyByPoint(e,r,new s.default);a.position=o}if(this.showZAxis){var l=this.axisLabelCollection.get("zLabel"),u=new s.default(0,0,this.zAxisConfig.length),d=c.default.multiplyByPoint(e,u,new s.default);l.position=d}},t.prototype.updateMatrix=function(e){this.updateLabel(e),this.axisCollection.values.forEach((function(t){t.modelMatrix=e}))},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(this.show=![E.default.SCENE2D,E.default.COLUMBUS_VIEW].includes(e))},t}(O.default);t.default=S},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(326),s=i(54),l=i(1),u=i(7),d=i(43),c=i(12),f=i(6),h=i(185),p=i(27),m=i(235),_=i(69),g=i(156),v=i(64),y=i(190),b=i(324),w=i(323),O=i(347),x=i(151),A=i(5),T=i(47),E=i(3),C=i(13),S=new f.default,M=new f.default,D={faceVector:l.default.UNIT_Z,rotateAxis:l.default.UNIT_X,relativePosition:l.default.ZERO,xAxisConfig:{show:!0,name:"X",color:u.default.RED,width:4,font:"16px",length:10},yAxisConfig:{show:!0,name:"Y",color:u.default.GREEN,width:4,font:"16px",length:10},zAxisConfig:{show:!0,name:"Z",color:u.default.BLUE,width:4,font:"16px",length:10},sunAngleConfig:{show:!1,color:u.default.BLUE,width:4,length:50,font:"16px",angleColor:u.default.WHITE,sunDirectionMultiple:1}},P=function(e){function t(t){var i=e.call(this,t)||this;return i.rotationFrame=w.default.LOCAL,i.parentMatrix=f.default.IDENTITY.clone(),i.axisCollection=new T.default,i.axisLabelCollection=new T.default,i.sunCollection=new T.default,i._axes=new y.default,i._sunAxes=new y.default,i._labels=new m.default,i._xAxisVec=new l.default,i._yAxisVec=new l.default,i._zAxisVec=new l.default,i.solarPanelMatrix=new f.default,i.faceVector=o.defaultValue(null==t?void 0:t.faceVector,D.faceVector),i.rotateAxis=o.defaultValue(null==t?void 0:t.rotateAxis,D.rotateAxis),i.relativePosition=o.defaultValue(null==t?void 0:t.relativePosition,D.relativePosition),i.xAxisConfig=r(r({},D.xAxisConfig),null==t?void 0:t.xAxisConfig),i.yAxisConfig=r(r({},D.yAxisConfig),null==t?void 0:t.yAxisConfig),i.zAxisConfig=r(r({},D.zAxisConfig),null==t?void 0:t.zAxisConfig),i.sunAngleConfig=r(r({},D.sunAngleConfig),null==t?void 0:t.sunAngleConfig),i._showXAxis=i.xAxisConfig.show,i._showYAxis=i.yAxisConfig.show,i._showZAxis=i.zAxisConfig.show,i._showSunAxis=i.sunAngleConfig.show,i._axes.add(i._labels),i}return a(t,e),Object.defineProperty(t.prototype,"showXAxis",{get:function(){return this._showXAxis},set:function(e){this._showXAxis=e;var t=this.axisCollection.get("x"),i=this.axisLabelCollection.get("xLabel");t.show=this._showXAxis&&this.show,i.show=this._showXAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showYAxis",{get:function(){return this._showYAxis},set:function(e){this._showYAxis=e;var t=this.axisCollection.get("y"),i=this.axisLabelCollection.get("yLabel");t.show=this._showYAxis&&this.show,i.show=this._showYAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showZAxis",{get:function(){return this._showZAxis},set:function(e){this._showZAxis=e;var t=this.axisCollection.get("z"),i=this.axisLabelCollection.get("zLabel");t.show=this._showZAxis&&this.show,i.show=this._showZAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showSunAxis",{get:function(){return this._showSunAxis},set:function(e){this._showSunAxis=e;var t=this.sunCollection.get("sunDirection"),i=this.sunCollection.get("sunReference"),n=this.sunCollection.get("arcAxis"),a=this.sunCollection.get("sunAngleLabel"),r=this.sunCollection.get("sunDirectionLabel");t.show=this._showSunAxis&&this.show,i.show=this._showSunAxis&&this.show,a.show=this._showSunAxis&&this.show,r.show=this._showSunAxis&&this.show,n&&(n.show=this._showSunAxis&&this.show)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){if(this._show=e,this.showXAxis){var t=this.axisCollection.get("x"),i=this.axisLabelCollection.get("xLabel");t.show=e,i.show=e}if(this.showYAxis){var n=this.axisCollection.get("y"),a=this.axisLabelCollection.get("yLabel");n.show=e,a.show=e}if(this.showZAxis){var r=this.axisCollection.get("z"),o=this.axisLabelCollection.get("zLabel");r.show=e,o.show=e}if(this.showSunAxis){var s=this.sunCollection.get("sunDirection"),l=this.sunCollection.get("sunReference"),u=this.sunCollection.get("arcAxis"),d=this.sunCollection.get("sunAngleLabel"),c=this.sunCollection.get("sunDirectionLabel");s.show=e,l.show=e,d.show=e,c.show=e,u&&(u.show=e)}},enumerable:!1,configurable:!0}),t.prototype.initAxisMatrix=function(e,t,i){var n=l.default.normalize(e,new l.default),a=l.default.normalize(t,new l.default),r=l.default.dot(n,a);if(Math.abs(r)>.999999)throw new E.default("卫星帆板旋转轴向量与帆板朝向向量不可平行");var o=l.default.cross(a,n,new l.default),s=l.default.cross(o,a,new l.default);return this._xAxisVec=s,this._yAxisVec=o,this._zAxisVec=a,new f.default(s.x,o.x,a.x,i.x,s.y,o.y,a.y,i.y,s.z,o.z,a.z,i.z,0,0,0,1)},t.prototype.createPrimitive=function(){var e=new d.default({geometry:new h.default({positions:[l.default.multiplyByScalar(l.default.UNIT_X,.1,new l.default),l.default.multiplyByScalar(l.default.UNIT_X,this.xAxisConfig.length,new l.default)],width:this.xAxisConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),t=new v.default({geometryInstances:e,appearance:new g.default({material:_.default.fromType(_.default.PolylineArrowType,{color:this.xAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showXAxis&&this.show}),i=l.default.multiplyByScalar(l.default.UNIT_X,this.xAxisConfig.length,new l.default),n={show:this._showXAxis&&this.show,position:i,text:this.xAxisConfig.name,font:this.xAxisConfig.font,fillColor:this.xAxisConfig.color},a=new d.default({geometry:new h.default({positions:[l.default.multiplyByScalar(l.default.UNIT_Y,.1,new l.default),l.default.multiplyByScalar(l.default.UNIT_Y,this.yAxisConfig.length,new l.default)],width:this.yAxisConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),r=new v.default({geometryInstances:a,appearance:new g.default({material:_.default.fromType(_.default.PolylineArrowType,{color:this.yAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showYAxis&&this.show}),o=l.default.multiplyByScalar(l.default.UNIT_Y,this.yAxisConfig.length,new l.default),u={show:this._showYAxis&&this.show,position:o,text:this.yAxisConfig.name,font:this.yAxisConfig.font,fillColor:this.yAxisConfig.color},c=new d.default({geometry:new h.default({positions:[l.default.multiplyByScalar(l.default.UNIT_Z,.1,new l.default),l.default.multiplyByScalar(l.default.UNIT_Z,this.zAxisConfig.length,new l.default)],width:this.zAxisConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),f=l.default.multiplyByScalar(l.default.UNIT_Z,this.zAxisConfig.length,new l.default),p={show:this._showZAxis&&this.show,position:f,text:this.zAxisConfig.name,font:this.zAxisConfig.font,fillColor:this.zAxisConfig.color},m=new v.default({geometryInstances:c,appearance:new g.default({material:_.default.fromType(_.default.PolylineArrowType,{color:this.zAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showZAxis&&this.show});this._axes.add(t);var y=this._labels.add(n);this.axisCollection.set("x",t),this.axisLabelCollection.set("xLabel",y),this._axes.add(r);var b=this._labels.add(u);this.axisCollection.set("y",r),this.axisLabelCollection.set("yLabel",b),this._axes.add(m);var w=this._labels.add(p);this.axisCollection.set("z",m),this.axisLabelCollection.set("zLabel",w)},t.prototype.createSunAngle=function(){var e=new l.default(1,1,1),t=new l.default,i=new c.default,n=new l.default;new p.default;f.default.getMatrix3(this.parentMatrix,i),f.default.getTranslation(this.parentMatrix,n),p.default.fromRotationMatrix(i),l.default.subtract(e,n,t),t.equals(l.default.ZERO)&&(t=l.default.UNIT_Z.clone()),l.default.normalize(t,t);var a=new p.default,r=new f.default;b.default.calculateQuaternionFromV1ToV2(l.default.UNIT_X,t,a),f.default.fromTranslationQuaternionRotationScale(n,a,n,r);var o=new l.default(0,0,0),u=new l.default(this.sunAngleConfig.length*this.sunAngleConfig.sunDirectionMultiple,0,0),m=new d.default({geometry:new h.default({positions:[o,u],width:this.sunAngleConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),y=new v.default({geometryInstances:m,appearance:new g.default({material:_.default.fromType(_.default.PolylineArrowType,{color:this.sunAngleConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:r,show:this._showSunAxis&&this.show});this._sunAxes.add(y),this.sunCollection.set("sunDirection",y);var w=new l.default(0,0,this.sunAngleConfig.length),O=new d.default({geometry:new h.default({positions:[o,w],width:this.sunAngleConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),x=new v.default({geometryInstances:O,appearance:new g.default({material:_.default.fromType(_.default.PolylineArrowType,{color:this.sunAngleConfig.color}),renderState:{depthTest:{enabled:!1}}}),show:this._showSunAxis&&this.show});this._sunAxes.add(x),this.sunCollection.set("sunReference",x);var T=new l.default;l.default.cross(t,l.default.UNIT_Z,T);for(var E=l.default.angleBetween(t,l.default.UNIT_Z),C=[],S=new p.default,M=new c.default,D=new l.default,P=0;P<=30;P++){p.default.fromAxisAngle(T,E*P/30,S),M=c.default.fromQuaternion(S,M),c.default.multiplyByVector(M,l.default.UNIT_Z,D);var I=l.default.clone(D);l.default.multiplyByScalar(I,.5*this.sunAngleConfig.length,I),C.push(I)}var L=new d.default({geometry:new h.default({positions:C,width:this.sunAngleConfig.width,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),j=new f.default;f.default.fromTranslation(n,j);var R=new v.default({geometryInstances:L,appearance:new g.default({material:_.default.fromType("Color",{color:this.sunAngleConfig.angleColor}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:j,show:this._showSunAxis&&this.show});this._sunAxes.add(R),this.sunCollection.set("arcAxis",R);var N=l.default.angleBetween(t,l.default.UNIT_Z),B=A.default.toDegrees(Math.abs(N)).toFixed(5),F=f.default.multiplyByPoint(j,C[12],new l.default),k={show:this._showSunAxis&&this.show,position:F,text:"光照角("+B+")°",font:this.sunAngleConfig.font,fillColor:this.sunAngleConfig.color},z=this._labels.add(k);this.sunCollection.set("sunAngleLabel",z);var U=l.default.multiplyByScalar(t,1.1*this.sunAngleConfig.length,new l.default),V={show:this._showSunAxis&&this.show,position:U,text:"太阳方向",font:this.sunAngleConfig.font,fillColor:this.sunAngleConfig.color},H=this._labels.add(V);this.sunCollection.set("sunDirectionLabel",H)},t.prototype.projectedVector=function(e){return new c.default(1-e.x*e.x,-e.x*e.y,-e.x*e.z,-e.x*e.y,1-e.y*e.y,-e.y*e.z,-e.x*e.z,-e.y*e.z,1-e.z*e.z)},t.prototype.afterAdded=function(e){this.parent=e,this.parentMatrix=e.matrix.clone(),this._labels.modelMatrix=this.parentMatrix;var t=e.getViewer();t.primitives.add(this._axes),t.primitives.add(this._sunAxes),this.solarPanelMatrix=this.initAxisMatrix(this.rotateAxis,this.faceVector,this.relativePosition),this.createPrimitive(),this.createSunAngle()},t.prototype.destroyForward=function(){if(e.prototype.destroyForward.call(this),this._axes){var t=this.parent.getViewer();t.primitives.remove(this._axes),t.primitives.remove(this._sunAxes)}},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&(this.updateMatrix(i),this.updateCoordinateAxis(i),this.showSunAxis)){var n=new f.default;f.default.multiply(i,this.solarPanelMatrix,n),this.updateAxis(n)}},t.prototype.updateCoordinateAxis=function(e){var t=this.axisCollection.get("x"),i=this.axisCollection.get("y"),n=this.axisCollection.get("z"),a=new f.default;f.default.multiply(t.modelMatrix,this.solarPanelMatrix,a),t.modelMatrix=a,f.default.multiply(i.modelMatrix,this.solarPanelMatrix,a),i.modelMatrix=a,f.default.multiply(n.modelMatrix,this.solarPanelMatrix,a),n.modelMatrix=a},t.prototype.updateAxis=function(e){var t=this.sunCollection.get("sunDirection"),i=this.sunCollection.get("sunReference"),n=this.sunCollection.get("arcAxis"),a=this.sunCollection.get("sunAngleLabel"),r=this.sunCollection.get("sunDirectionLabel"),o=new c.default,u=new l.default,m=new p.default;f.default.getMatrix3(e,o),f.default.getTranslation(e,u),m=p.default.fromRotationMatrix(o);var y=this.parent.getViewer().cesiumViewer.scene.context.uniformState.sunPositionWC,w=new l.default;l.default.subtract(y,u,w),w.equals(l.default.ZERO)&&(w=l.default.UNIT_Z.clone()),l.default.normalize(w,w);var x=new p.default,T=new f.default;b.default.calculateQuaternionFromV1ToV2(l.default.UNIT_X,w,x),f.default.fromTranslationQuaternionRotationScale(u,x,O.UNIT_SCALE,T),t.modelMatrix=T;var E=f.default.inverse(e,M),C=f.default.multiplyByPoint(E,y,new l.default),S=new l.default;l.default.normalize(C,S);var D=this.projectedVector(l.default.UNIT_X),P=c.default.multiplyByVector(D,S,new l.default),I=new p.default,L=new f.default;b.default.calculateQuaternionFromV1ToV2(l.default.UNIT_Z,P,I);var j=p.default.multiply(m,I,new p.default);f.default.fromTranslationQuaternionRotationScale(u,j,O.UNIT_SCALE,L),i.modelMatrix=e;var R=new l.default;l.default.cross(l.default.UNIT_Z,S,R);for(var N=l.default.angleBetween(S,l.default.UNIT_Z),B=[],F=new p.default,k=new c.default,z=new l.default,U=0;U<=30;U++){p.default.fromAxisAngle(R,N*U/30,F),k=c.default.fromQuaternion(F,k),c.default.multiplyByVector(k,l.default.UNIT_Z,z);var V=l.default.clone(z);l.default.multiplyByScalar(V,.5*this.sunAngleConfig.length,V),B.push(V)}var H=new d.default({geometry:new h.default({positions:B,width:1,vertexFormat:g.default.VERTEX_FORMAT,arcType:s.default.NONE})}),G=new f.default;f.default.fromTranslation(u,G),this._sunAxes.remove(n);var Y=new v.default({geometryInstances:H,appearance:new g.default({material:_.default.fromType("Color",{color:this.sunAngleConfig.angleColor}),renderState:{depthTest:{enabled:!0}}}),modelMatrix:e,asynchronous:!1,show:this._showSunAxis});this._sunAxes.add(Y),this.sunCollection.set("arcAxis",Y);var W=l.default.angleBetween(S,l.default.UNIT_Z),q=A.default.toDegrees(Math.abs(W)).toFixed(5),X=l.default.multiplyByScalar(B[15],1.1,new l.default),K=f.default.multiplyByPoint(e,X,new l.default);a.text="光照角("+q+"°)",a.position=K;var J=l.default.multiplyByScalar(S,1.1*this.sunAngleConfig.length,new l.default);r.position=f.default.multiplyByPoint(e,J,new l.default)},t.prototype.updateLabel=function(e){if(this.showXAxis){var t=this.axisLabelCollection.get("xLabel"),i=l.default.multiplyByScalar(l.default.UNIT_X,this.xAxisConfig.length,new l.default),n=f.default.multiply(e,this.solarPanelMatrix,S),a=f.default.multiplyByPoint(n,i,new l.default);t.position=a}if(this.showYAxis){var r=this.axisLabelCollection.get("yLabel"),o=l.default.multiplyByScalar(l.default.UNIT_Y,this.yAxisConfig.length,new l.default),s=(n=f.default.multiply(e,this.solarPanelMatrix,S),f.default.multiplyByPoint(n,o,new l.default));r.position=s}if(this.showZAxis){var u=this.axisLabelCollection.get("zLabel"),d=l.default.multiplyByScalar(l.default.UNIT_Z,this.zAxisConfig.length,new l.default),c=(n=f.default.multiply(e,this.solarPanelMatrix,S),f.default.multiplyByPoint(n,d,new l.default));u.position=c}},t.prototype.updateMatrix=function(e){f.default.multiplyByTranslation(e,this.relativePosition,e),this.updateLabel(e),this.axisCollection.values.forEach((function(t){t.modelMatrix=e}))},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(this.show=![C.default.SCENE2D,C.default.COLUMBUS_VIEW].includes(e))},t}(x.default);t.default=P},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(1),l=i(7),u=i(2),d=i(14),c=i(69),f=i(151),h=i(1002),p=i(975),m=i(390),_=i(348);!function(e){e[e.TRAIL=0]="TRAIL",e[e.LEAD=1]="LEAD",e[e.FULL=2]="FULL"}(o||(o={}));var g=function(e){function t(t){var i=e.call(this,t)||this;return i._mode=_.default.SOLID,i.autoUpdate=u.default(t.autoUpdate,!1),i}return a(t,e),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polyline&&(this.polyline.show=e),this.trailPolyline&&(this.trailPolyline.show=e),this.leadPolyline&&(this.leadPolyline.show=e),this.path&&(this.path.show=e),this.trailPath&&(this.trailPath.show=e),this.leadPath&&(this.leadPath.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"referenceFrame",{get:function(){return this._referenceFrame},set:function(e){if(this.referenceFrame!==e){this._referenceFrame=e;var t=this.parent,i=t.tracked;t.pathOptions;i||this.updateTrajectory(this.getViewer().cesiumViewer.clock.currentTime)}},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this._mode=u.default(t.pathOptions.mode,_.default.PAST_FUTURE_TRACKED),this.show=u.default(this.parent.pathOptions.show&&this.parent.show,!0),this.updateTrajectory(this.getViewer().cesiumViewer.clock.currentTime),this.readyPromise=Promise.resolve()},t.prototype.getPositionColor=function(e){var t=this.parent,i=t.pathOptions,n=t.sampledColorProperty,a=this.parent.sampledPositionProperty,r=this.referenceFrame,o=a.getValueInReferenceFrame(e,r,new s.default);if(o){var u=n.getValue(e);return u||(u=i.material?i.material:l.default.WHITE),{position:o,color:u}}},t.prototype.getPositionsAndTimes=function(e){var t=this.parent,i=t.pathOptions,n=t.revolutionPeriod,a=[[],[]],r=[[],[]],o=this.parent.sampledPositionProperty,l=this.referenceFrame,u=!1;if(i.staticTrajectory)o._property._times.forEach((function(t){if(d.default.greaterThan(t,e)&&!u){var i=o.getValueInReferenceFrame(e,l,new s.default);i&&(r[0].push(t),r[1].push(t),a[0].push(i),a[1].push(i)),u=!0}var n=o.getValueInReferenceFrame(t,l,new s.default);n&&(r[u?1:0].push(t),a[u?1:0].push(n))}));else for(var c=i.resolution?i.resolution:n/60,f=i.leadTime||n/2,h=-(i.trailTime||n/2);h<f;h+=c){var p=d.default.addSeconds(e,h,new d.default);if(h>=0&&!u){var m=o.getValueInReferenceFrame(e,l,new s.default);m&&(r[0].push(p),r[1].push(p),a[0].push(m),a[1].push(m)),u=!0}var _=o.getValueInReferenceFrame(p,l,new s.default);_&&(r[u?1:0].push(p),a[u?1:0].push(_))}return{positions:a,times:r}},t.prototype.getPositionsColorsAndTimes=function(e){var t=this,i=this.parent,n=i.pathOptions,a=i.sampledPositionProperty,r=i.revolutionPeriod,o=[[],[]],s=[[],[]],l=[[],[]],u=!1;if(n.staticTrajectory)a._property._times.forEach((function(i){if(d.default.greaterThan(i,e)&&!u){var n=t.getPositionColor(e);if(n){var a=n.position,r=n.color;o[0].push(i),o[1].push(i),s[0].push(a),s[1].push(a),l[0].push(r),l[1].push(r)}u=!0}var c=t.getPositionColor(i);if(c){a=c.position,r=c.color;o[u?1:0].push(i),s[u?1:0].push(a),l[u?1:0].push(r)}}));else for(var c=n.resolution?n.resolution:r/60,f=n.leadTime||r/2,h=-(n.trailTime||r/2);h<f;h+=c){var p=d.default.addSeconds(e,h,new d.default);if(h>=0&&!u){var m=this.getPositionColor(e);if(m){var _=m.position,g=m.color;o[0].push(p),o[1].push(p),s[0].push(_),s[1].push(_),l[0].push(g),l[1].push(g)}u=!0}var v=this.getPositionColor(p);if(v){_=v.position,g=v.color;o[u?1:0].push(p),s[u?1:0].push(_),l[u?1:0].push(g)}}return{positions:s,colors:l,times:o}},t.prototype.updateTrajectory=function(e){this.clearTrajectory();var t=this.parent,i=t.tracked,n=t.pathOptions,a=[];if(this.parent.sampledColorProperty&&!this.parent.sampledColorProperty.isConstant)switch(this.mode){case _.default.SOLID:var r=this.getPositionsColorsAndTimes(e),s=r.positions,l=r.times,u=r.colors;a=l[0].concat(l[1]);var d=this.drawPolyline(s[0].concat(s[1]),l[0].concat(l[1]),u[0].concat(u[1]));this.polyline=d;break;case _.default.PAST_FUTURE:var c=this.getPositionsColorsAndTimes(e);s=c.positions,l=c.times,u=c.colors;a=l[0].concat(l[1]);var f=this.drawPolyline(s[0],l[0],u[0]),h=this.drawPolyline(s[1],l[1],u[1],!0);this.trailPolyline=f,this.leadPolyline=h;break;case _.default.PAST_FUTURE_TRACKED:var p=this.getPositionsColorsAndTimes(e);s=p.positions,l=p.times,u=p.colors;if(a=l[0].concat(l[1]),i){f=this.drawPolyline(s[0],l[0],u[0]),h=this.drawPolyline(s[1],l[1],u[1],!0);this.trailPolyline=f,this.leadPolyline=h}else{d=this.drawPolyline(s[0].concat(s[1]),l[0].concat(l[1]),u[0].concat(u[1]));this.polyline=d}}else switch(this.mode){case _.default.SOLID:var m=this.getPositionsAndTimes(e);s=m.positions;if(a=(l=m.times)[0].concat(l[1]),i){var g=this.drawPath(n);this.path=g}else{d=this.drawPolyline(s[0].concat(s[1]),l[0].concat(l[1]));this.polyline=d}break;case _.default.PAST_FUTURE:var v=this.getPositionsAndTimes(e);s=v.positions;a=(l=v.times)[0].concat(l[1]);f=this.drawPath(n,o.TRAIL),h=this.drawPath(n,o.LEAD);this.trailPath=f,this.leadPath=h;break;case _.default.PAST_FUTURE_TRACKED:var y=this.getPositionsAndTimes(e);s=y.positions;if(a=(l=y.times)[0].concat(l[1]),i){f=this.drawPath(n,o.TRAIL),h=this.drawPath(n,o.LEAD);this.trailPath=f,this.leadPath=h}else{d=this.drawPolyline(s[0].concat(s[1]),l[0].concat(l[1]));this.polyline=d}}a.length>1&&(this.startTime=a[0].clone(),this.endTime=a[a.length-1].clone())},t.prototype.drawPolyline=function(e,t,i,n){void 0===n&&(n=!1);var a=this.parent.pathOptions,r=this.referenceFrame;if(e.length>2){var o=void 0,s=!(!this.show&&!this.parent.tracked);return o=this.parent.sampledColorProperty?new m.default({enabled:s,reference:r,positions:e,times:t,width:a.width,material:n?c.default.fromType(c.default.PolylineDashType,{color:a.material instanceof l.default?a.material:l.default.WHITE}):i&&i.length>0?i:a.material,asynchronous:!1}):new h.default({enabled:s,reference:r,positions:e,width:a.width,material:n?c.default.fromType(c.default.PolylineDashType,{color:a.material instanceof l.default?a.material:l.default.WHITE}):a.material}),this.add(o),o}},t.prototype.clearTrajectory=function(){this.polyline&&(this.remove(this.polyline),this.polyline=null),this.trailPolyline&&(this.remove(this.trailPolyline),this.trailPolyline=null),this.leadPolyline&&(this.remove(this.leadPolyline),this.leadPolyline=null),this.path&&(this.remove(this.path),this.path=null),this.trailPath&&(this.remove(this.trailPath),this.trailPath=null),this.leadPath&&(this.remove(this.leadPath),this.leadPath=null)},t.prototype.drawPath=function(e,t){var i;void 0===t&&(t=o.FULL);var n=!(!this.show&&!this.parent.tracked);switch(t){case o.FULL:i=new p.default(r(r({},e),{show:n}));break;case o.TRAIL:i=new p.default(r(r({},e),{show:n,leadTime:0,dash:!1}));break;case o.LEAD:i=new p.default(r(r({},e),{show:n,trailTime:0,dash:!0}))}return this.add(i),i},t.prototype.updateForward=function(t){(e.prototype.updateForward.call(this,t),this.lastUpdateTime&&d.default.equals(this.lastUpdateTime,t))||this.show&&(this.lastUpdateTime=t.clone(),this.children.values.forEach((function(e){e.updateForward(t)})),(this.autoUpdate&&this.startTime&&this.endTime&&(d.default.lessThan(t,this.startTime)||d.default.greaterThan(t,this.endTime))||this.parent.sampledColorProperty&&!this.parent.sampledColorProperty.isConstant&&(this.parent.tracked||this.mode===_.default.PAST_FUTURE))&&this.updateTrajectory(t))},t.prototype.afterTracked=function(){this.updateTrajectory(this.getViewer().cesiumViewer.clock.currentTime)},t.prototype.afterUnTracked=function(){this.updateTrajectory(this.getViewer().cesiumViewer.clock.currentTime)},t}(f.default);t.default=g},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(7),o=i(53),s=i(43),l=i(349),u=i(263),d=i(69),c=i(143),f=i(156),h=function(e){function t(t){var i=e.call(this,t)||this;return i._asynchronous=!0,i._positions=t.positions,i._material=t.material,i._width=t.width,i._asynchronous=t.asynchronous,i.createPrimitive(i._positions,i._material,i._width),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polyline&&(this.polyline.show=e)},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(e,t,i){void 0===t&&(t=r.default.YELLOW),void 0===i&&(i=1);var n=new s.default({geometry:new l.default({positions:e,width:i}),attributes:t instanceof r.default?{color:o.default.fromColor(t)}:void 0}),a=!1;a=!(t instanceof r.default)||t.alpha<1,this.polyline=new u.default({geometryInstances:n,asynchronous:this._asynchronous,appearance:this.getAppearance(t,a),show:this.enabled&&this._show}),this.readyPromise=this.polyline.readyPromise},t.prototype.getAppearance=function(e,t){return void 0===t&&(t=!1),e instanceof d.default?new f.default({material:e,translucent:t}):new c.default({translucent:t})},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);var i=this.getLODSceneLayer();i&&(this._polylines=i.groundPrimitives),this.polyline&&this._polylines&&this._polylines.add(this.polyline),this.show=t.show,this.afterSwitchMode(this.getViewer().sceneMode)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polylines&&this._polylines.remove(this.polyline)},t}(i(151).default);t.default=h},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(280),l=i(49),u=i(327),d=i(27),c=i(13),f=i(2),h=i(30),p=i(389),m=function(e){function t(t){var i=e.call(this,t)||this;return i.labelConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},f.default(t.labelConfig,{})),i.billboardConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},f.default(t.billboardConfig,{})),t.position&&(i.position=t.position),i.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:u.default,interpolationDegree:5}),t.htmlLabelConfig&&t.htmlLabelConfig.element&&(i._htmlLabel=new p.default(t.htmlLabelConfig),i.add(i._htmlLabel)),i}return a(t,e),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){o.default.clone(e,this._position),this.billboard&&(this.billboard.position=e),this.billboardConfig.position=e,this.label&&(this.label.position=e),this.labelConfig.position=e,this.setMatrix(this.position,this.rotation,this._scale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){d.default.clone(e,this._rotation),this._rotation=e,this.setMatrix(this.position,this.rotation,this._scale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.label&&(this.label.show=e),this.billboard&&(this.billboard.show=e),this._htmlLabel&&(e?this._htmlLabel.visibleFollowParent&&(this._htmlLabel.show=!0):this._htmlLabel.show=!1),this.afterSetVisible(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlLabel",{get:function(){return this._htmlLabel},set:function(e){this._htmlLabel&&this._htmlLabel.destroy(),this._htmlLabel=e,this.add(this._htmlLabel)},enumerable:!1,configurable:!0}),t.prototype.afterTracked=function(){},t.prototype.afterUnTracked=function(){},t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t);var n=this.getLODSceneLayer();if(this.label=n.labels.add(Object.assign({distanceDisplayCondition:new l.default(0,2e8)},this.labelConfig)),this.label.show=f.default(this.labelConfig.show,this.show),n._imageCache.has(this.billboardConfig.image)){var a=n._imageCache.get(this.billboardConfig.image);this.initBillboard(a)}else h.default.fetchImage({url:this.billboardConfig.image}).then((function(e){n._imageCache.set(i.billboardConfig.image,e),i.initBillboard(e)}));this.label.entityId=this.id,this.isAdded=!0},t.prototype.initBillboard=function(e){var t=this.getLODSceneLayer();this.billboard=t.billboards.add(r(r({},this.billboardConfig),{image:e,show:!1})),this.billboard.entityId=this.id,this.billboard.show=this.show,this.billboard.position=this.position},t.prototype.updateLabel=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.label&&this.labelConfig.dynamicDepthTest&&n===c.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.label.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.label.disableDepthTestDistance=0)},t.prototype.updateBillboard=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.billboard&&this.billboardConfig.dynamicDepthTest&&n===c.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.billboard.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.billboard.disableDepthTestDistance=0)},t.prototype.updateForward=function(t){e.prototype.updateForward.call(this,t),this.show&&(this.updateLabel(),this.updateBillboard())},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);this.parent;var t=this.getLODSceneLayer();t.labels.remove(this.label),t.billboards.remove(this.billboard)},t.prototype.beforeSwitchMode=function(){},t}(s.default);t.default=m},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(12),l=i(6),u=i(1005),d=i(280),c=i(279),f=i(1006),h=new o.default,p=new s.default,m=new l.default,_=s.default.fromRotationX(Math.PI/2,new s.default),g=(l.default.fromRotationTranslation(_),new l.default),v={material:new f.default,width:5,height:10},y=function(e){function t(t){var i=e.call(this,r(r(r({},v),t),{useENURotation:!0}))||this;i.orientationAxis=new o.default(0,0,1),i.frontAxis=new o.default(0,1,0),i.baseMatrix=l.default.IDENTITY.clone();var n=r(r({},v),t);return i.width=n.width,i.height=n.height,i.add(new u.default({id:i.id+"_vertical",material:n.material})),i.add(new u.default({id:i.id+"_horizontal",material:n.material})),i.keyframe=0,i}return a(t,e),t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i);var n=this.children.values[0],a=this.children.values[1];if(!this.show)return this.keyframe=0,n.material.keyframe=this.keyframe,void(a.material.keyframe=this.keyframe);for(var r=this.parent;!(r instanceof c.default);){if(!r)return;r=r.parent}if(r instanceof c.default){var u=r.parent.cesiumViewer.camera;l.default.inverse(this.matrix,g),l.default.getTranslation(this.matrix,this.position),l.default.multiplyByPoint(g,u.positionWC,h),o.default.normalize(h,h),l.default.getMatrix3(u.inverseViewMatrix,p),s.default.getRotation(p,p),l.default.fromRotationTranslation(p,this.position,n.matrix),l.default.fromScale(new o.default(this.width,this.height,1),m),l.default.multiply(n.matrix,m,n.matrix),l.default.multiply(g,n.matrix,n.matrix),l.default.fromScale(new o.default(-this.width,-this.height,1),m),l.default.clone(m,a.matrix),o.default.multiplyByScalar(h,3,h),n.material.cameraPosition=h,a.material.cameraPosition=h,n.material.keyframe=this.keyframe,a.material.keyframe=this.keyframe,this.keyframe++}},t}(d.default);t.default=y},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(43),s=i(6),l=i(497),u=i(498),d=i(61),c=i(64),f=i(13),h=function(e){function t(t){var i=e.call(this,t)||this;return i.geometry=new l.default(r(r({},t),{vertexFormat:i.getVertexFormat()})),i.showOutline&&(i.outlineGeometry=new u.default),i}return a(t,e),t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=f.default.SCENE3D;t&&(i=t.sceneMode),(this._shouldUpdateIn2D||i!==f.default.SCENE2D)&&(this.geometrInstance=new o.default({geometry:this.geometry,modelMatrix:i!==f.default.SCENE3D?s.default.multiply(e,this.matrix,this.worldMatrix):void 0,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new c.default({asynchronous:i===f.default.SCENE3D,geometryInstances:this.geometrInstance,modelMatrix:i===f.default.SCENE3D?this.matrix:void 0,appearance:this.getAppearance(),show:this.show}),this.showOutline&&(this.outlineGeometrInstance=new o.default({geometry:this.outlineGeometry,modelMatrix:i!==f.default.SCENE3D?s.default.multiply(e,this.matrix,this.worldMatrix):void 0,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new c.default({asynchronous:i===f.default.SCENE3D,geometryInstances:this.outlineGeometrInstance,modelMatrix:i===f.default.SCENE3D?this.matrix:void 0,appearance:new d.default({flat:!0}),show:this.showOutline&&this.show})))},t.prototype.updateMatrix=function(t){s.default.clone(this.matrix,this.worldMatrix),e.prototype.updateMatrix.call(this,t)},t}(i(321).default);t.default=h},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=function(e){function t(){return e.call(this,{fabric:{type:"Explosion",uniforms:{cameraPosition:new r.default,u_keyframe:0},source:"\n #define LOW_Q 1\n // #define NOISE_LUT\n\n #define CAM_ROTATION_SPEED 11.7\n #define CAM_TILT .15\t\t\t\t// put 0. if you do not want to animate camera vertically\n #define CAM_DIST 3.8\n \n #define MAX_MULT_EXPLOSIONS 3\n \n // the bounding sphere of the explosion. this is less general but means that\n // ray cast is only performed for nearby pixels, and raycast can begin from the sphere\n // (instead of walking out from the camera)\n float expRadius = 1.25;\n float explosion_seed = 0.0;\t\t\t// keep this constant for a whole explosion, but when differing from explosion to the next one, you get non-identical looking ones\n float downscale = 1.25;\t\t\t\t// how much smaller (than expRadius) one explosion ball should be. bigger value = smaller. 1.0 = no scale down.\n \n const int steps = 5;\t\t\t\t// iterations when marching through cloud noise. default = 64. 40 might still suffice. When putting higher, explosion becomes too dense, so make colBottom and colTop more transparent.\n \n float grain = 2.0;\t\t\t\t\t// increase for more detailed explosions, but then you should also increase iterations (and decrease step, which is done automatically)\n float speed = 0.3;\t\t\t\t\t// total animation speed (time stretch). nice = 0.5, default = 0.4\n float ballness = 2.0;\t\t\t\t// lower values makes explosion look more like a cloud. higher values more like a ball.\n float growth = 2.2;\t\t\t\t\t// initial growth to explosion ball. lower values makes explosion grow faster\n float fade = 1.6;\t\t\t\t\t// greater values make fade go faster but later. Thus greater values leave more smoke at the end.\n float thinout_smooth = 0.7;\t\t\t// smoothed thinning out of the outer bounding sphere. 1.0 = no smoothening, 0.0 = heavy thinning, nice = 0.65 to 0.75\n float density = 1.35;\t\t\t\t// higher values make sharper difference between dark and bright colors. low values make more blurry, less color spread and more transparent. default = 1.25 or 1.35\n vec2 brightness = vec2(3.0, 2.2);\t// x = constant offset, y = time-dependent factor\n vec2 brightrad = vec2(1.3, 1.0);\t// adds some variation to the radius of the brightness falloff. x = constant offset, y = density-dependent factor\n vec4 colBottom = vec4(1.2,0.94,0.42,0.7);\n vec4 colTop = vec4(0.15,0.15,0.15,0.1);\n float color_low = 0.25;\t\t\t\t// the lower the value, the more black spots appear in the explosion. the higher, the more even the explosion looks like.\n float contrast = 1.0;\t\t\t\t// final color contrast. higher values make ligher contrast. default = 1.0\n float rolling_init_damp = 0.3;\t\t// rolling animation initial damping. 0.0 = no damping. nice = 0.2, default = 0.15\n float rolling_speed = 2.0;\t\t\t// rolling animation speed (static over time). default = 1.0\n const int mult_explosions = MAX_MULT_EXPLOSIONS;\t// how many explosion balls to draw\n float variation_seed = 0.0;\t\t\t// influences position variation of the different explosion balls\n float delay_seed = 0.0;\t\t\t\t// influences the start delay variation of the different explosion balls\n const float delay_range = 0.25;\t\t\t// describes the maximum delay for explosion balls to start up. Notice, this delay is relative to one explosion ball duration, so actually before speed is applied.\n float ball_spread = 1.0;\t\t\t// how much to spread ball starting positions from the up vector. 0.0 = all on up vector, 1.0 = any direction between up and down vector.\n \n /* for up-moving explosion similar to explosion mushroom, put\n downscale = 1.75;\n grain = 2.7;\n rolling_init_damp = 0.2;\n ball_spread = 0.4;\n */\n \n /* for mobile device, for faster rendering but with less quality, put\n LOW_Q 1\n turn off FOG\n MAX_MULT_EXPLOSIONS 3\n steps = 25;\n */\n \n struct Ball\n {\n vec3 offset;\n vec3 dir;\n float delay;\n };\n \n Ball balls[MAX_MULT_EXPLOSIONS];\n \n float tmax = 1.0 + delay_range;\n float getTime(){\n return fract(u_keyframe/60.0 * speed / tmax) * tmax;\n }\n \n const float pi=3.14159265;\n \n float hash( float n )\n {\n return fract(cos(n)*41415.92653);\t//https://www.shadertoy.com/view/4sXGRM\n //return fract(sin(n)*753.5453123);\t//https://www.shadertoy.com/view/4sfGzS\n }\n \n vec2 hash2( float n )\n {\n //return fract(cos(n)*vec2(10003.579, 37049.7));\t//https://www.shadertoy.com/view/XtsSWs\n return fract(sin(vec2(n,n+1.0))*vec2(13.5453123,31.1459123));\n }\n \n vec3 hash3( float n )\n {\n return fract(sin(vec3(n,n+1.0,n+2.0))*vec3(13.5453123,31.1459123,37.3490423));\n }\n \n float hash13(vec3 p3)\n {\n p3 = fract(p3 * vec3(.1031,.11369,.13787));\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n #ifdef NOISE_LUT\n //iq's LUT 3D noise\n float noise( in vec3 x )\n {\n vec3 f = fract(x);\n vec3 p = x - f; // this avoids the floor() but doesnt affect performance for me.\n #ifndef LOW_Q\t\t// in low quality setting, for speed, we try to live without that. we compensate with growth and fade.\n f = f*f*(3.0-2.0*f);\n #endif\n \n vec2 uv = (p.xy+vec2(37.0,17.0)*p.z) + f.xy;\n vec2 rg = texture2D( image, mod((uv+ 0.5)/256.0, vec2(1.0)) ).yx;\n return mix( rg.x, rg.y, f.z );\n }\n #else\n\n float noise( in vec3 x )\n {\n vec3 f = fract(x);\n vec3 p = x - f; // this avoids the floor() but doesnt affect performance for me.\n #ifndef LOW_Q\t\t// in low quality setting, for speed, we try to live without that. we compensate with growth and fade.\n f = f*f*(3.0-2.0*f);\n #endif\n \n float n = p.x + p.y*157.0 + 113.0*p.z;\n return mix(mix(mix( hash(n+ 0.0), hash(n+ 1.0),f.x),\n mix( hash(n+157.0), hash(n+158.0),f.x),f.y),\n mix(mix( hash(n+113.0), hash(n+114.0),f.x),\n mix( hash(n+270.0), hash(n+271.0),f.x),f.y),f.z);\n }\n #endif\n \n float fbm( vec3 p, vec3 dir )\n {\n float f;\n #ifndef LOW_Q\n vec3 q = p - dir; f = 0.50000*noise( q );\n q = q*2.02 - dir; f += 0.25000*noise( q );\n q = q*2.03 - dir; f += 0.12500*noise( q );\n q = q*2.01 - dir; f += 0.06250*noise( q );\n q = q*2.02 - dir; f += 0.03125*noise( q );\n #elif LOW_Q == 1\n // in low quality setting, for speed, we try to live with a lower-quality fbm. we compensate with higher grain.\n vec3 q = p - dir; f = 0.50000*noise( q );\n q = q*2.02 - dir; f += 0.25000*noise( q );\n q = q*2.03 - dir; f += 0.12500*noise( q );\n q = q*2.04 - dir; f += 0.08250*noise( q );\n #elif LOW_Q == 2\n vec3 q = p - dir; f = 0.50000*noise( q );\n q = q*2.14 - dir; f += 0.29000*noise( q );\n q = q*2.25 - dir; f += 0.16500*noise( q );\n #endif\n return f;\n }\n \n // assign colour to the media\n vec4 computeColour( float density, float radius, float bright )\n {\n // colour based on density alone. gives impression of occlusion within\n // the media\n //vec4 result = vec4( mix( vec3(1.0,0.9,0.8), vec3(.7,0.3,0.2), density ), density );\n //vec4 result = vec4( mix( vec3(1.0,0.9,0.8), vec3(0.4,0.15,0.1), density ), density );\n vec4 result = vec4( vec3(mix( 1.0, color_low, density )), density );\n //vec4 result = vec4( mix( 1.1*vec3(1.0,0.9,0.8), 0.9*vec3(0.4,0.15,0.1), density ), density );\n //vec4 result = vec4(1.,1.,1.,density);\n \n \n // colour added for explosion\n //result *= mix( colBottom * bright, colTop * bright, min( (radius+0.5)*0.588, 1.0 ) );\n result *= mix( colBottom, colTop, min( (radius+0.5)*0.588, 1.0 ) ) * bright;\n //result *= mix( colBottom, colTop, radius ) * bright;\n //result.rgb *= mix( colBottom * bright, colTop, smoothstep( 0., 1., (radius-0.5)*0.6+0.5 ) );\n //result *= mix( colBottom * bright, colTop, clamp( radius * 1.7-.2, 0.0, 1.0 ) );\n //result.a*=density*1.5;\n //result.a *= mix( 1.0, 0.0, min( (radius / expRadius + 0.2)*0.5, 1.0 ) );\n //result.a *= mix( 1.0, 0.2, min( (radius+0.5)/1.7, 1.0 ) );\n //result.a *= mix( 0.0, 1.0, 1.0-radius*0.25 );\n //if(radius<1.0-mouseY) result.a=0.0;\n // make central hole\n //result.a *= clamp((radius/expRadius-0.5*mouseIn)*15.0, 0.0, 1.0);\n //result.xyz *= mix( 3.1*vec3(1.0,0.5,0.05), vec3(0.48,0.53,0.5), min( radius*.76, 1.0 ) );\n \n //result = mix( colBottom * bright * vec4(1.0,0.9,0.8,1.0), colTop*vec4(0.4,0.15,0.1,1.0), min( (radius+0.5)/1.7, 1.0 ) );\n //result.a *= density;\n \n return result;\n }\n \n // maps 3d position to density\n float densityFn( in vec3 p, in float r, float t, in vec3 dir, float seed )\n {\n //const float pi = 3.1415926;\n float den = ballness + (growth+ballness)*log(t)*r;\n den -= (2.5+ballness)*pow(t,fade)/r;\n //den = -1.7 - p.y;\n //den *= 1.+smoothstep(0.75,1.,r);\n \n //if ( den <= -4. || den > -1. ) return -1.;\n //if ( den <= -2.8 ) return -1.;\n if ( den <= -3. ) return -1.;\n //if ( den > -1. ) return -1.;\n \n #ifdef SHOW_BOUNDS\n p = 0.5 * normalize(p);\n return abs(p.y);\n //return 0.8;\n #endif\n \n // offset noise based on seed\n // plus a time based offset for the rolling effect (together with the space inversion below)\n //float s = seed-(rolling_speed/(t+rolling_init_damp));\n float s = seed-(rolling_speed/(sin(min(t*3.,1.57))+rolling_init_damp));\n //if( iMouse.z > 0.0 ) t += iMouse.y * 0.02;\n //vec3 dir = vec3(0.,1.,0.);\n //vec3 dir = -0.5*(p - expCenter);\n //vec3 dir = normalize( vec3( noise(p.xyz), noise(p.yxz), noise(p.zyx) ) );\n dir *= s;\n \n // invert space\n p = -grain*p/(dot(p,p)*downscale);\n \n // participating media\n float f = fbm( p, dir );\n //f=clamp(f,.1,.7);\n \n // add in noise with scale factor\n den += 4.0*f;\n //den -= r*r;\n \n //den *= density;\t// we do that outside\n //den *= 1.25;\n //den *= .8;\n \n return den;\n }\n \n // rad = radius of complete mult explosion (range 0 to 1)\n // r = radius of the explosion ball that contributes the highest density\n // rawDens = non-clamped density at the current maching location on the current ray\n // foffset = factor for offset how much the offsetting should be applied. best to pass a time-based value.\n void calcDens( in vec3 pos, out float rad, out float r, out float rawDens, in float t, in float foffset, out vec4 col, in float bright )\n {\n float radiusFromExpCenter = length(pos);\n rad = radiusFromExpCenter / expRadius;\n \n r = 0.0;\n rawDens = 0.0;\n col = vec4(0.0);\n \n for ( int k = 0; k < mult_explosions; ++k )\n {\n float t0 = t - balls[k].delay;\n if ( t0 < 0.0 || t0 > 1.0 ) continue;\n \n vec3 p = pos - balls[k].offset * foffset;\n float radiusFromExpCenter0 = length(p);\n \n float r0 = downscale* radiusFromExpCenter0 / expRadius;\n if( r0 > 1.0 ) continue;\n // BUG: Skipping for r0 > 1.0 gives some artefacts on later smoke where the inside of sphere\n // is more transparent than the outside (for the parts where other expl balls contribute density in).\n // I can't figure yet what the problem is. Inside the sphere near border, densities should be\n // practically 0.0 which also does not contribute (almost) anything to sum in contributeDens.\n // So what's the problem then?\n // Notice, the same bug happens with skipping for t0 > 1.0, just there slight jumps can be seen near\n // end of animation for certain angle views.\n // Reason for the bug: Below, we pass r0 as r. If a density is not skipped but becomes in final color\n // actually transparent, r0 is still passed as r. Outside the r0, the r gains a value from another\n // explosion ball and thus gains also its rawDens0. Inside our r0, the other's ball's density gets\n // skipped, which is producing the jump.\n // Fix would be to intermengle all densities altogether without\n // skipping any. But how? Especially how to intermengle all the r0's?\n // Actually the problem comes from color calculation which makes the final color near transparent the\n // higher the density value.\n // So maybe the fix would be to put the transparency information into the density somehow before\n // selecting one radius. Actually we could add up all the densities, but the one which was the\n // highest could be that one who's r0 we will use as r. Maybe.\n // FIX: The bug is only with OLD_COLORING. New coloring should not have this bug anymore.\n \n float rawDens0 = densityFn( p, r0, t0, balls[k].dir, explosion_seed + 33.7*float(k) ) * density;\n \n #ifndef SHOW_BOUNDS\n // thin out the volume at the far extends of the bounding sphere to avoid\n // clipping with the bounding sphere\n rawDens0 *= 1.-smoothstep(thinout_smooth,1.,r0);\n #endif\n \n #ifndef OLD_COLORING\n float dens = clamp( rawDens0, 0.0, 1.0 );\n \n //vec4 col0 = computeColour(dens, r0*(.9+.5*dens)/1.75, bright);\t// also adds some variation to the radius\n //vec4 col0 = computeColour(dens, r0*(1.4+rawDens0), bright);\t\t// also adds some variation to the radius\n vec4 col0 = computeColour(dens, r0*(brightrad.x+brightrad.y*rawDens0), bright);\t// also adds some variation to the radius\n \n #ifndef SHOW_BOUNDS\n // uniform scale density\n //col0.a *= 0.8;\n //col0.a *= col0.a + .4;\n col0.a *= (col0.a + .4) * (1. - r0*r0);\n \n // colour by alpha\n col0.rgb *= col0.a;\n #else\n col0.a *= 5.;\n #endif\n \n col += col0;\n \n rawDens = max(rawDens, rawDens0);\n //rawDens+=max(rawDens0,0.);\n \n /*if ( rawDens0 > rawDens )\n {\n rawDens = rawDens0;\n r = r0;\n col = col0;\n }*/\n #else\n if ( rawDens0 > rawDens )\n {\n rawDens = rawDens0;\n r = r0;\n }\n #endif\n }\n \n #ifdef SHOW_BOUNDS\n col /= float(mult_explosions);\n #endif\n \n //rawDens *= density;\n }\n \n #ifdef OLD_COLORING\n // rad = radius of complete mult explosion (range 0 to 1)\n // r = radius of the explosion ball that contributes the highest density\n // rawDens = non-clamped density at the current maching location on the current ray\n void contributeDens( in float rad, in float r, in float rawDens, in float bright, out vec4 col, inout vec4 sum )\n {\n //float dens = clamp( rawDens, 0.0, 1.0 );\n float dens = min( rawDens, 1.0 );\t// we expect already rawDens to be positive\n \n //col = computeColour(dens, r*(.9+.5*dens)/1.75, bright);\t// also adds some variation to the radius\n //col = computeColour(dens, r*(1.4+rawDens), bright);\t// also adds some variation to the radius\n col = computeColour(dens, r*(brightrad.x+brightrad.y*rawDens), bright);\t// also adds some variation to the radius\n \n #ifndef SHOW_BOUNDS\n // uniform scale density\n //col.a *= 0.8;\n //col.a *= col.a + .4;\n col.a *= (col.a + .4) * (1. - r*r);\n \n // colour by alpha\n col.rgb *= col.a;\n \n // alpha blend in contribution\n sum = sum + col*(1.0 - sum.a);\n sum.a+=0.15*col.a;\n #else\n col.a *= 5.;\n sum = max(sum, col);\n #endif\n }\n #endif\n \n #ifndef OLD_COLORING\n void contributeColor( in vec4 col, inout vec4 sum )\n {\n #ifndef SHOW_BOUNDS\n // alpha blend in contribution\n sum = sum + col*(1.0 - sum.a);\n sum.a+=0.15*col.a;\n #else\n sum = max(sum, col);\n #endif\n }\n #endif\n \n vec4 raymarch( in vec3 rayo, in vec3 rayd, in vec2 expInter, in float t, out float d )\n {\n vec4 sum = vec4( 0.0 );\n \n float step = 1.5 / float(steps);\n \n // start iterating on the ray at the intersection point with the near half of the bounding sphere\n //vec3 pos = rayo + rayd * (expInter.x + step*texture( iChannel2, gl_FragCoord.xy/iChannelResolution[0].x ).x);\t\t// dither start pos to break up aliasing\n //vec3 pos = rayo + rayd * (expInter.x + 1.0*step*fract(0.5*(gl_FragCoord.x+gl_FragCoord.y)));\t// regular dither\n vec3 pos = rayo + rayd * (expInter.x);\t// no dither\n \n float march_pos = expInter.x;\n d = 4000.0;\n \n // t goes from 0 to 1 + mult delay. that is 0 to 1 is for one explosion ball. the delay for time distribution of the multiple explosion balls.\n // t_norm is 0 to 1 for the whole animation (incl mult delay).\n float t_norm = t / tmax;\n float smooth_t = sin(t_norm*2.1);\t//sin(t*2.);\n \n //float bright = 6.1;\n float t1 = 1.0 - t_norm;\t// we use t_norm instead of t so that final color is reached at end of whole animation and not already at end of first explosion ball.\n //float bright = 3.1 + 18.0 * t1*t1;\n //float bright = 3.1 + 1.4 * t1*t1;\n //float bright = 3.1 + 4.4 * t1*t1;\n float bright = brightness.x + brightness.y * t1*t1;\n //float bright = smoothstep(0.0, 30.1, 1.0);\n //float bright = smoothstep(20.0, 3.1, 1.0);\n //float bright = 10.;\n \n for( int i=0; i<steps; i++ )\n {\n if( sum.a >= 0.98 ) { d = march_pos; break; }\n if ( march_pos >= expInter.y ) break;\n \n float rad, r, rawDens;\n vec4 col;\n calcDens( pos, rad, r, rawDens, t, smooth_t, col, bright );\n \n if ( rawDens <= 0.0 )\n {\n float s = step * 2.0;\n pos += rayd * s;\n march_pos += s;\n continue;\n }\n \n #ifdef OLD_COLORING\n contributeDens( rad, r, rawDens, bright, col, sum );\n #else\n contributeColor( col, sum );\n #endif\n \n // take larger steps through low densities.\n // something like using the density function as a SDF.\n float stepMult = 1.0 + (1.-clamp(rawDens+col.a,0.,1.));\n // step along ray\n pos += rayd * step * stepMult;\n march_pos += step * stepMult;\n \n //pos += rayd * step;\n }\n \n #ifdef SHOW_BOUNDS\n if ( sum.a < 0.1 )\n sum = vec4(0.,0.,.5,0.1);\n #endif\n \n return clamp( sum, 0.0, 1.0 );\n }\n \n // iq's sphere intersection, but here fixed for a sphere at (0,0,0)\n vec2 iSphere(in vec3 ro, in vec3 rd, in float rad)\n {\n //sphere at origin has equation |xyz| = r\n //sp |xyz|^2 = r^2.\n //Since |xyz| = ro + t*rd (where t is the parameter to move along the ray),\n //we have ro^2 + 2*ro*rd*t + t^2 - r2. This is a quadratic equation, so:\n //vec3 oc = ro - sph.xyz; //distance ray origin - sphere center\n \n float b = dot(ro, rd);\t\t\t\t\t//=dot(oc, rd);\n float c = dot(ro, ro) - rad * rad;\t\t//=dot(oc, oc) - sph.w * sph.w; //sph.w is radius\n float h = b*b - c; // delta\n if(h < 0.0) \n return vec2(-1.0);\n //h = sqrt(h);\n h *= 0.5;\t\t// just some rough approximation to prevent sqrt.\n return vec2(-b-h, -b+h);\n }\n \n vec3 computePixelRay( in vec2 p, out vec3 cameraPos )\n {\n /*\n // camera orbits around explosion\n float camRadius = CAM_DIST;\n float phi = (p.y-0.5) * 3.14;\n float camRadiusProjectedDown = camRadius * cos(phi);\n float theta = p.x*3.14;\n float xoff = camRadiusProjectedDown * cos(theta);\n float zoff = camRadiusProjectedDown * sin(theta);\n float yoff = camRadius * sin(phi);\n */\n cameraPos = cameraPosition;\n \n // camera target\n vec3 target = vec3(0.);\n \n // camera frame\n vec3 zup = vec3(0.,0.,1.0);\n vec3 fo = normalize(target-cameraPos);\n vec3 ri = normalize(cross(fo,zup));\n vec3 up = normalize(cross(ri,fo));\n\n // vec3 ri = normalize(vec3(fo.z, 0., -fo.x ));\n // vec3 up = normalize(cross(fo,ri));\n \n // multiplier to emulate a fov control\n float fov = .5;\n \n // ray direction\n vec3 rayDir = normalize(fo + fov*p.x*ri + fov*p.y*up);\n \n return rayDir;\n }\n \n void setup()\n {\n // first expl ball always centered looking up\n balls[0] = Ball(\n vec3(0.),\n vec3(0.,.7,0.),\t\t// not normalized so that expl ball 0 rolls somewhat slower\n 0.0\n );\n \n float pseed = variation_seed;\n float tseed = delay_seed;\n float maxdelay = 0.0;\n for ( int k = 1; k < mult_explosions; ++k )\n {\n float pseed = variation_seed + 3. * float(k-1);\n float tseed = delay_seed + 3. * float(k-1);\n vec2 phi = hash2(pseed) * vec2(2.*pi, pi*ball_spread);\n vec2 tilted = vec2( sin(phi.y), cos(phi.y) );\n vec3 rotated = vec3( tilted.x * cos(phi.x), tilted.y, tilted.x * sin(phi.x) );\n balls[k].offset = 0.7 * rotated; //hash3(pseed) - 0.5;\n balls[k].dir = normalize( balls[k].offset );\n balls[k].delay = delay_range * hash(tseed);\n pseed += 3.;\n tseed += 3.;\n maxdelay = max(maxdelay, balls[k].delay);\n }\n \n if ( maxdelay > 0.0 )\n {\n // Now stretch the ball explosion delays to the maximum allowed range.\n // So that the last ball starts with a delay of exactly delay_range and thus we do not waste any final time with just empty space.\n for ( int k = 0; k < mult_explosions; ++k )\n balls[k].delay *= delay_range / maxdelay;\n }\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput) { \n czm_material material = czm_getDefaultMaterial(materialInput); \n #ifdef LOW_Q\n grain *= 1.0 + 0.1 * float(LOW_Q);\n growth *= 1.0 - 0.1 * float(LOW_Q);\n ballness *= 0.85;\n #endif\n \n float t = getTime();\n // some global initialization.\n setup();\n \n // get aspect corrected normalized pixel coordinate\n /*\n vec2 q = gl_FragCoord.xy / czm_viewport.xy;\n vec2 p = -1.0 + 2.0*q;\n p.x *= czm_viewport.x / czm_viewport.y;\n */\n vec2 uv = materialInput.st;\n vec2 p = -1.0 + 2.0*uv;\n \n vec3 rayDir, cameraPos;\n \n rayDir = computePixelRay( p, cameraPos );\n \n vec4 col = vec4(0.);\n float d = 4000.0;\n \n // does pixel ray intersect with exp bounding sphere?\n vec2 boundingSphereInter = iSphere( cameraPos, rayDir, expRadius );\n if( boundingSphereInter.x > 0. )\n {\n // yes, cast ray\n col = raymarch( cameraPos, rayDir, boundingSphereInter, t, d );\n }\n \n vec4 back = vec4(.0);\n \n material.diffuse = mix( back.rgb, col.xyz, col.a );\n material.alpha = col.a; \n return material; \n }\n "}})||this}return a(t,e),Object.defineProperty(t.prototype,"cameraPosition",{get:function(){return this._cameraPosition},set:function(e){r.default.clone(e,this._cameraPosition),this.uniforms.cameraPosition=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keyframe",{get:function(){return this.uniforms.u_keyframe},set:function(e){this.uniforms.u_keyframe=e},enumerable:!1,configurable:!0}),t}(i(69).default);t.default=o},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={speed:1,color1:o.default.YELLOW,color2:o.default.RED},u=function(e){function t(t){void 0===t&&(t=l);var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"Flame2",uniforms:r({},n),source:"\nvec2 hash( vec2 p )\n{\n p = vec2( dot(p,vec2(127.1,311.7)),\n dot(p,vec2(269.5,183.3)) );\n return -1.0 + 2.0*fract(sin(p)*43758.5453123);\n}\n\nfloat noise( in vec2 p )\n{\n const float K1 = 0.366025404; // (sqrt(3)-1)/2;\n const float K2 = 0.211324865; // (3-sqrt(3))/6;\n \n vec2 i = floor( p + (p.x+p.y)*K1 );\n \n vec2 a = p - i + (i.x+i.y)*K2;\n vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);\n vec2 b = a - o + K2;\n vec2 c = a - 1.0 + 2.0*K2;\n \n vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );\n \n vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));\n \n return dot( n, vec3(70.0) );\n}\n\nfloat fbm(vec2 uv)\n{\n float f;\n mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );\n f = 0.5000*noise( uv ); uv = m*uv;\n f += 0.2500*noise( uv ); uv = m*uv;\n f += 0.1250*noise( uv ); uv = m*uv;\n f += 0.0625*noise( uv ); uv = m*uv;\n f = 0.5 + 0.5*f;\n return f;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput) { \n czm_material material = czm_getDefaultMaterial(materialInput); \n vec2 uv = materialInput.st;\n float n = fbm(uv*vec2(10.0,5.0) - vec2(0, czm_frameNumber/60.0*speed));\n float intensity = mix(n,0.,uv.y);\n vec3 gradient = mix(color1.rgb,color2.rgb,uv.y+0.2);\n material.diffuse = gradient; \n material.emission = gradient; \n material.alpha = mix(intensity,0.,uv.y);\n return material; \n}\n "},translucent:!0})||this)._speed=n.speed,i._color1=n.color1,i._color2=n.color2,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color1",{get:function(){return this._color1},set:function(e){this._color1=e,this.uniforms.color1=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color2",{get:function(){return this._color2},set:function(e){this._color2=e,this.uniforms.color2=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(6),s=i(13),l=i(1),u=i(22),d=i(151),c=i(489),f=i(27),h=i(391),p=i(54),m=i(324),_=i(0),g=i(2),v=new u.default,y=new u.default,b=new f.default,w=new l.default(0,0,0),O=new l.default(0,0,1),x=new l.default(0,0,0),A=(new l.default(0,0,0),new l.default(0,0,0),new l.default(0,0,0),new l.default(0,0,0),new l.default(0,0,0)),T=new l.default(0,0,0),E=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,t)||this;return n.options=t,n.cartesian1=new l.default,n.cartesian2=new l.default,n._keepNonePerformanceMode=!1,_.default(t.asynchronous)||(t.asynchronous=!0),n._entity1=t.entityFrom,n._entityOneOffset=g.default(t.entityFromOffset,l.default.ZERO),n._entity2=t.entityTo,n._entityTwoOffset=g.default(t.entityToOffset,l.default.ZERO),t.polylineOptions&&(t.polylineOptions.arcType=void 0!==t.polylineOptions.arcType?t.polylineOptions.arcType:p.default.NONE),n.labelConfig=r({locationPercent:.5},g.default(t.labelConfig,{})),n.polylineOptions=t.polylineOptions,n._lengthPerSection=n.polylineOptions.lengthPerSection?n.polylineOptions.lengthPerSection:5e5,n._keepNonePerformanceMode=n.polylineOptions.arcType!==p.default.NONE,n._keepNonePerformanceMode?n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[n.entity1.position,n.entity2.position],asynchronous:t.asynchronous})):n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[w,O],asynchronous:t.asynchronous})),n._performanceMode=i,n}return a(t,e),Object.defineProperty(t.prototype,"entity1",{get:function(){return this._entity1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entity2",{get:function(){return this._entity2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"performanceMode",{get:function(){return this._performanceMode},set:function(e){var t;this._performanceMode=e,this.parent&&(null===(t=this.parent)||void 0===t||t.remove(this._polyline),this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.entity1.position,this.entity2.position],asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=this.show)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t;this._show=e,this.label&&(this.label.show=e),this.performanceMode&&!this._keepNonePerformanceMode?this._polyline.show=e:e&&this.parent?(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.entity1.position,this.entity2.position],asynchronous:!1})),this.parent.add(this._polyline)):null===(t=this.parent)||void 0===t||t.remove(this._polyline)},enumerable:!1,configurable:!0}),t.prototype.destroyForward=function(){this.parent.remove(this._polyline),this.parent.labels.remove(this.label)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&(this._polyline.show=this.entity1.show&&this.entity2.show,this._polyline.show)){var n=this.getViewer().sceneMode;if(A=this.entity1.position.clone(),T=this.entity2.position.clone(),this.entity1.model&&o.default.multiplyByPoint(this.entity1.model.modelMatrix,this._entityOneOffset,A),this.entity2.model&&o.default.multiplyByPoint(this.entity2.model.modelMatrix,this._entityTwoOffset,T),this.performanceMode&&!this._keepNonePerformanceMode&&n===s.default.SCENE3D){var a=O,d=l.default.subtract(T,A,this.cartesian1);if(m.default.calculateQuaternionFromV1ToV2(a,d,b),o.default.fromTranslationQuaternionRotationScale(A,b,new l.default(1,1,l.default.magnitude(d)),this._polyline.polyline.modelMatrix),this.polylineOptions.material instanceof h.default)(f=this._polyline.polyline.appearance.material).startPosition=A,f.endPosition=T}else{var f;if(this.parent.remove(this._polyline),n===s.default.SCENE2D?(u.default.fromCartesian(A,void 0,v),u.default.fromCartesian(T,void 0,y),v.height=0,y.height=0,u.default.toCartesian(v,void 0,this.cartesian1),u.default.toCartesian(y,void 0,this.cartesian2)):(this.cartesian1=A,this.cartesian2=T),this.polylineOptions.material instanceof h.default)(f=this._polyline.polyline.appearance.material).startPosition=A,f.endPosition=T;this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.cartesian1,this.cartesian2],asynchronous:!1})),this.parent.add(this._polyline)}this.label&&this.label.show&&(l.default.subtract(A,T,x),l.default.multiplyByScalar(x,this.labelConfig.locationPercent,x),l.default.add(this.entity2.position,x,x),this.label.position=x.clone())}},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),t.add(this._polyline),this.labelConfig&&(this.label=t.labels.add(this.labelConfig),this.label.show=g.default(this.labelConfig.show,!0)&&this.show,this.label.entityId=this.id)},t.prototype.beforeSwitchMode=function(e){e!==s.default.SCENE2D&&this.parent.remove(this._polyline)},t.prototype.afterSwitchMode=function(e){e!==s.default.SCENE2D&&(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[w,O],asynchronous:!1})),this.parent.add(this._polyline))},t}(d.default);t.default=E},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1010),a=i(976);t.default={OrbitLoader:n.default,WebSocketLoader:a.default}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(204),a=i(1262),r=i(37),o=i(14),s=i(326),l=i(76),u=function(){function e(e,t,i){this.nextQuery={preTime:"",nextTime:"",isQuery:!1},this.viewer=e,this.layer=t;var n=i.url,a=i.headers,r=i.params,o=r.ids,l=r.step;this.url=n,this.headers=a,this.step=s.defaultValue(l,60),this.ids=o,this.init()}return e.prototype.init=function(){var e=this;this.addClockEventListener();var t=r(o.default.toDate(this.viewer.cesiumViewer.clock.currentTime)).utc().format("YYYY-MM-DDTHH:mm:ss")+"Z";this.getOrbitData({startTime:t},(function(t){e.nextQuery.preTime=t.startTime}))},e.prototype.addClockEventListener=function(){var e=this;this.event=this.viewer.cesiumViewer.clock.onTick.addEventListener((function(t){var i=t.currentTime,n=t.multiplier;if(e.multiplier!==n&&(e.multiplier=n),e.nextQuery.nextTime&&!e.nextQuery.isQuery){var a=o.default.fromIso8601(e.nextQuery.nextTime),s=o.default.fromIso8601(e.nextQuery.preTime);if(e.multiplier>0){if(o.default.lessThan(i,a)&&o.default.secondsDifference(a,i)<10*Math.abs(e.multiplier)&&!e.nextQuery.isQuery&&e.nextQuery.preTime!==e.nextQuery.nextTime){e.nextQuery.isQuery=!0;var l=r(e.nextQuery.nextTime).subtract(10*Math.abs(e.multiplier),"seconds").utc().format("YYYY-MM-DDTHH:mm:ss")+"Z";e.getOrbitData({startTime:l},(function(t){e.nextQuery.preTime=t.startTime,e.nextQuery.isQuery=!1}))}if((o.default.greaterThan(i,a)||o.default.lessThan(i,s))&&!e.nextQuery.isQuery){e.nextQuery.isQuery=!0;l=r(o.default.toDate(e.viewer.cesiumViewer.clock.currentTime)).subtract(10*Math.abs(e.multiplier),"seconds").utc().format("YYYY-MM-DDTHH:mm:ss")+"Z";e.getOrbitData({startTime:l},(function(t){e.nextQuery.preTime=t.startTime,e.nextQuery.isQuery=!1}))}}else{if(o.default.greaterThan(i,s)&&o.default.secondsDifference(i,s)<10*Math.abs(e.multiplier)&&!e.nextQuery.isQuery&&e.nextQuery.preTime!==e.nextQuery.nextTime){e.nextQuery.isQuery=!0;l=r(e.nextQuery.preTime).add(10*Math.abs(e.multiplier),"seconds").utc().format("YYYY-MM-DDTHH:mm:ss")+"Z";e.getOrbitData({endTime:l},(function(t){e.nextQuery.nextTime=t.endTime,e.nextQuery.isQuery=!1}))}if((o.default.lessThan(i,s)||o.default.greaterThan(i,a))&&!e.nextQuery.isQuery){e.nextQuery.isQuery=!0;l=r(o.default.toDate(e.viewer.cesiumViewer.clock.currentTime)).subtract(10*Math.abs(e.multiplier),"seconds").utc().format("YYYY-MM-DDTHH:mm:ss")+"Z";e.nextQuery.nextTime=l,e.getOrbitData({endTime:l},(function(t){e.nextQuery.nextTime=t.endTime,e.nextQuery.isQuery=!1}))}}}}))},e.prototype.getOrbitData=function(e,t){var i=this;e.satIds=s.defaultValue(e.satIds,this.ids),e.step=s.defaultValue(e.step,this.step),this.multiplier>0&&e.startTime&&(e.startTime=r(e.startTime).utc().format("YYYY-MM-DDTHH:mm:ss")+"Z"),this.multiplier<0&&e.endTime&&(e.endTime=r(e.endTime).utc().format("YYYY-MM-DDTHH:mm:ss")+"Z"),a.default({url:this.url,method:"post",headers:this.headers,data:e}).then((function(a){var r=a.data.data,o=[];for(var s in r)if(i.ids.includes(+s)){r[s].length>0&&o.push({endTime:r[s][r[s].length-1][0],startTime:r[s][0][0],length:r[s].length,name:s});var u=i.layer.getEntityById(s);if(u){var d=u.sampledPositionProperty._property._times;d.length>0&&u.sampledPositionProperty.removeSamples(new l.default({start:d[0],stop:d[d.length-1]})),n.updatePositions(u,"cartesian",r[s]),u.updateTrajectory()}}i.multiplier>0?i.nextQuery.nextTime=o.sort((function(e,t){return e.length-t.length}))[0].endTime:i.nextQuery.preTime=o.sort((function(e,t){return e.length-t.length}))[0].startTime,t&&t(e)}))},e.prototype.destroy=function(){this.event()},e}();t.default=u},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"vm":"VM":i?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},a={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(t,i,r,o){var s=n(t),l=a[e][n(t)];return 2===s&&(l=l[i?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},n=function(e){return function(n,a,r,o){var s=t(n),l=i[e][t(n)];return 2===s&&(l=l[a?0:1]),l.replace(/%d/i,n)}},a=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:n("s"),ss:n("s"),m:n("m"),mm:n("m"),h:n("h"),hh:n("h"),d:n("d"),dd:n("d"),M:n("M"),MM:n("M"),y:n("y"),yy:n("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},i=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},a=function(e){return function(t,a,r,o){var s=i(t),l=n[e][i(t)];return 2===s&&(l=l[a?0:1]),l.replace(/%d/i,t)}},r=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{months:r,monthsShort:r,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return i[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,i){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"};e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,i){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var i=e%10;return e+(t[i]||t[e%100-i]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n,a;return"m"===i?t?"хвіліна":"хвіліну":"h"===i?t?"гадзіна":"гадзіну":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[i].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},i={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,i){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},i={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},i={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,i){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[i],e)}var i=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],n=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,a=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:a,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:a,monthsRegex:n,monthsShortRegex:n,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(function e(t){return t>9?e(t%10):t}(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,i){return e<12?"a.m.":"g.m."}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n=e+" ";switch(i){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return"jedan sat";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:function(e,t,i,n){switch(i){case"m":return t?"jedna minuta":n?"jednu minutu":"jedne minute"}},mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var i=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(i="a"),e+i},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},i="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),n=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],a=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function r(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,i,n){var a=e+" ";switch(i){case"s":return t||n?"pár sekund":"pár sekundami";case"ss":return t||n?a+(r(e)?"sekundy":"sekund"):a+"sekundami";case"m":return t?"minuta":n?"minutu":"minutou";case"mm":return t||n?a+(r(e)?"minuty":"minut"):a+"minutami";case"h":return t?"hodina":n?"hodinu":"hodinou";case"hh":return t||n?a+(r(e)?"hodiny":"hodin"):a+"hodinami";case"d":return t||n?"den":"dnem";case"dd":return t||n?a+(r(e)?"dny":"dní"):a+"dny";case"M":return t||n?"měsíc":"měsícem";case"MM":return t||n?a+(r(e)?"měsíce":"měsíců"):a+"měsíci";case"y":return t||n?"rok":"rokem";case"yy":return t||n?a+(r(e)?"roky":"let"):a+"lety"}}e.defineLocale("cs",{months:t,monthsShort:i,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[i][0]:a[i][1]}e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[i][0]:a[i][1]}e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?a[i][0]:a[i][1]}e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],i=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];e.defineLocale("dv",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,i){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"==typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,i){return e>11?i?"μμ":"ΜΜ":i?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,t){var i,n=this._calendarEl[e],a=t&&t.hours();return i=n,("undefined"!=typeof Function&&i instanceof Function||"[object Function]"===Object.prototype.toString.call(i))&&(n=n.apply(t)),n.replace("{}",a%12==1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,i){return e>11?i?"p.t.m.":"P.T.M.":i?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),i="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),n=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?a[i][2]?a[i][2]:a[i][1]:n?a[i][0]:a[i][1]}e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},i={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,i){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),i=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function n(e,n,a,r){var o="";switch(a){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":o=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":o=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":o=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":o=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":o=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":o=r?"vuoden":"vuotta"}return o=function(e,n){return e<10?n?i[e]:t[e]:e}(e,r)+" "+o}e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),i="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_");e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("gd",{months:["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return n?a[i][0]:a[i][1]}e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return n?a[i][0]:a[i][1]}e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},i={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10==0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,i){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?i?'לפנה"צ':"לפני הצהריים":e<18?i?'אחה"צ':"אחרי הצהריים":"בערב"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},n=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i];e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:n,longMonthsParse:n,shortMonthsParse:[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n=e+" ";switch(i){case"ss":return n+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return t?"jedna minuta":"jedne minute";case"mm":return n+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta";case"h":return t?"jedan sat":"jednog sata";case"hh":return n+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return n+=1===e?"dan":"dana";case"MM":return n+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return n+=1===e?"godina":2===e||3===e||4===e?"godine":"godina"}}e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function i(e,t,i,n){var a=e;switch(i){case"s":return n||t?"néhány másodperc":"néhány másodperce";case"ss":return a+(n||t)?" másodperc":" másodperce";case"m":return"egy"+(n||t?" perc":" perce");case"mm":return a+(n||t?" perc":" perce");case"h":return"egy"+(n||t?" óra":" órája");case"hh":return a+(n||t?" óra":" órája");case"d":return"egy"+(n||t?" nap":" napja");case"dd":return a+(n||t?" nap":" napja");case"M":return"egy"+(n||t?" hónap":" hónapja");case"MM":return a+(n||t?" hónap":" hónapja");case"y":return"egy"+(n||t?" év":" éve");case"yy":return a+(n||t?" év":" éve")}return""}function n(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,i){return e<12?!0===i?"de":"DE":!0===i?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return n.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return n.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e){return e%100==11||e%10!=1}function i(e,i,n,a){var r=e+" ";switch(n){case"s":return i||a?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?r+(i||a?"sekúndur":"sekúndum"):r+"sekúnda";case"m":return i?"mínúta":"mínútu";case"mm":return t(e)?r+(i||a?"mínútur":"mínútum"):i?r+"mínúta":r+"mínútu";case"hh":return t(e)?r+(i||a?"klukkustundir":"klukkustundum"):r+"klukkustund";case"d":return i?"dagur":a?"dag":"degi";case"dd":return t(e)?i?r+"dagar":r+(a?"daga":"dögum"):i?r+"dagur":r+(a?"dag":"degi");case"M":return i?"mánuður":a?"mánuð":"mánuði";case"MM":return t(e)?i?r+"mánuðir":r+(a?"mánuði":"mánuðum"):i?r+"mánuður":r+(a?"mánuð":"mánuði");case"y":return i||a?"ár":"ári";case"yy":return t(e)?r+(i||a?"ár":"árum"):r+(i||a?"ár":"ári")}}e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:i,ss:i,m:i,mm:i,h:"klukkustund",hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,i){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,i){return"ი"===i?t+"ში":t+i+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20==0||e%100==0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},i={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,i){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},i={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,i){return e<12?"오전":"오후"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},i={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},n=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"];e.defineLocale("ku",{months:n,monthsShort:n,weekdays:"یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌".split("_"),weekdaysShort:"یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره‌|به‌یانی/,isPM:function(e){return/ئێواره‌/.test(e)},meridiem:function(e,t,i){return e<12?"به‌یانی":"ئێواره‌"},calendar:{sameDay:"[ئه‌مرۆ كاتژمێر] LT",nextDay:"[به‌یانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له‌ %s",past:"%s",s:"چه‌ند چركه‌یه‌ك",ss:"چركه‌ %d",m:"یه‌ك خوله‌ك",mm:"%d خوله‌ك",h:"یه‌ك كاتژمێر",hh:"%d كاتژمێر",d:"یه‌ك ڕۆژ",dd:"%d ڕۆژ",M:"یه‌ك مانگ",MM:"%d مانگ",y:"یه‌ك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return i[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?a[i][0]:a[i][1]}e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,i){return e<12?i?"bn":"BN":i?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var i=t.toLowerCase();return i.includes("w")||i.includes("m")?e+".":e+function(e){var t=(e=""+e).substring(e.length-1),i=e.length>1?e.substring(e.length-2):"";return 12==i||13==i||"2"!=t&&"3"!=t&&"50"!=i&&"70"!=t&&"80"!=t?"ê":"yê"}(e)},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?a[i][0]:a[i][1]}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10;return i(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return i(e)}return i(e/=1e3)}e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:function(e){return i(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return i(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,i){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function i(e,t,i,n){return t?a(i)[0]:n?a(i)[1]:a(i)[2]}function n(e){return e%10==0||e>10&&e<20}function a(e){return t[e].split("_")}function r(e,t,r,o){var s=e+" ";return 1===e?s+i(0,t,r[0],o):t?s+(n(e)?a(r)[1]:a(r)[0]):o?s+a(r)[1]:s+(n(e)?a(r)[1]:a(r)[2])}e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:function(e,t,i,n){return t?"kelios sekundės":n?"kelių sekundžių":"kelias sekundes"},ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function i(e,t,i){return i?t%10==1&&t%100!=11?e[2]:e[3]:t%10==1&&t%100!=11?e[0]:e[1]}function n(e,n,a){return e+" "+i(t[a],e,n)}function a(e,n,a){return i(t[a],e,n)}e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:n,m:a,mm:n,h:a,hh:n,d:a,dd:n,M:a,MM:n,y:a,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,i,n){var a=t.words[n];return 1===n.length?i?a[0]:a[1]:e+" "+t.correctGrammaticalCase(e,a)}};e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,i=e%100;return 0===e?e+"-ев":0===i?e+"-ен":i>10&&i<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,i){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){switch(i){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,i){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function n(e,t,i,n){var a="";if(t)switch(i){case"s":a="काही सेकंद";break;case"ss":a="%d सेकंद";break;case"m":a="एक मिनिट";break;case"mm":a="%d मिनिटे";break;case"h":a="एक तास";break;case"hh":a="%d तास";break;case"d":a="एक दिवस";break;case"dd":a="%d दिवस";break;case"M":a="एक महिना";break;case"MM":a="%d महिने";break;case"y":a="एक वर्ष";break;case"yy":a="%d वर्षे"}else switch(i){case"s":a="काही सेकंदां";break;case"ss":a="%d सेकंदां";break;case"m":a="एका मिनिटा";break;case"mm":a="%d मिनिटां";break;case"h":a="एका तासा";break;case"hh":a="%d तासां";break;case"d":a="एका दिवसा";break;case"dd":a="%d दिवसां";break;case"M":a="एका महिन्या";break;case"MM":a="%d महिन्यां";break;case"y":a="एका वर्षा";break;case"yy":a="%d वर्षां"}return a.replace(/%d/i,e)}e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,i){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,i){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},i={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},i={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,i){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),i="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),n=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,n){return e?/-MMM-/.test(n)?i[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var i=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(i="a"),e+i},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},i={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),i="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),n=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function a(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function r(e,t,i){var n=e+" ";switch(i){case"ss":return n+(a(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return n+(a(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return n+(a(e)?"godziny":"godzin");case"ww":return n+(a(e)?"tygodnie":"tygodni");case"MM":return n+(a(e)?"miesiące":"miesięcy");case"yy":return n+(a(e)?"lata":"lat")}}e.defineLocale("pl",{months:function(e,n){return e?/D MMMM/.test(n)?i[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:n,longMonthsParse:n,shortMonthsParse:n,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:r,m:r,mm:r,h:r,hh:r,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:r,M:"miesiąc",MM:r,y:"rok",yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n=" ";return(e%100>=20||e>=100&&e%100==0)&&(n=" de "),e+n+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[i]}e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n,a;return"m"===i?t?"минута":"минуту":e+" "+(n=+e,a={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[i].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],i=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];e.defineLocale("sd",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,i){return e>11?i?"ප.ව.":"පස් වරු":i?"පෙ.ව.":"පෙර වරු"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),i="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function n(e){return e>1&&e<5}function a(e,t,i,a){var r=e+" ";switch(i){case"s":return t||a?"pár sekúnd":"pár sekundami";case"ss":return t||a?r+(n(e)?"sekundy":"sekúnd"):r+"sekundami";case"m":return t?"minúta":a?"minútu":"minútou";case"mm":return t||a?r+(n(e)?"minúty":"minút"):r+"minútami";case"h":return t?"hodina":a?"hodinu":"hodinou";case"hh":return t||a?r+(n(e)?"hodiny":"hodín"):r+"hodinami";case"d":return t||a?"deň":"dňom";case"dd":return t||a?r+(n(e)?"dni":"dní"):r+"dňami";case"M":return t||a?"mesiac":"mesiacom";case"MM":return t||a?r+(n(e)?"mesiace":"mesiacov"):r+"mesiacmi";case"y":return t||a?"rok":"rokom";case"yy":return t||a?r+(n(e)?"roky":"rokov"):r+"rokmi"}}e.defineLocale("sk",{months:t,monthsShort:i,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:a,ss:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a=e+" ";switch(i){case"s":return t||n?"nekaj sekund":"nekaj sekundami";case"ss":return a+=1===e?t?"sekundo":"sekundi":2===e?t||n?"sekundi":"sekundah":e<5?t||n?"sekunde":"sekundah":"sekund";case"m":return t?"ena minuta":"eno minuto";case"mm":return a+=1===e?t?"minuta":"minuto":2===e?t||n?"minuti":"minutama":e<5?t||n?"minute":"minutami":t||n?"minut":"minutami";case"h":return t?"ena ura":"eno uro";case"hh":return a+=1===e?t?"ura":"uro":2===e?t||n?"uri":"urama":e<5?t||n?"ure":"urami":t||n?"ur":"urami";case"d":return t||n?"en dan":"enim dnem";case"dd":return a+=1===e?t||n?"dan":"dnem":2===e?t||n?"dni":"dnevoma":t||n?"dni":"dnevi";case"M":return t||n?"en mesec":"enim mesecem";case"MM":return a+=1===e?t||n?"mesec":"mesecem":2===e?t||n?"meseca":"mesecema":e<5?t||n?"mesece":"meseci":t||n?"mesecev":"meseci";case"y":return t||n?"eno leto":"enim letom";case"yy":return a+=1===e?t||n?"leto":"letom":2===e?t||n?"leti":"letoma":e<5?t||n?"leta":"leti":t||n?"let":"leti"}}e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,i){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,i,n,a){var r,o=t.words[n];return 1===n.length?"y"===n&&i?"jedna godina":a||i?o[0]:o[1]:(r=t.correctGrammaticalCase(e,o),"yy"===n&&i&&"godinu"===r?e+" godina":e+" "+r)}};e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){return["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},translate:function(e,i,n,a){var r,o=t.words[n];return 1===n.length?"y"===n&&i?"једна година":a||i?o[0]:o[1]:(r=t.correctGrammaticalCase(e,o),"yy"===n&&i&&"годину"===r?e+" година":e+" "+r)}};e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,i){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},i={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return i[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,i){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,i){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,i){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"};e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,i){switch(i){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function i(e,i,n,a){var r=function(e){var i=Math.floor(e%1e3/100),n=Math.floor(e%100/10),a=e%10,r="";return i>0&&(r+=t[i]+"vatlh"),n>0&&(r+=(""!==r?" ":"")+t[n]+"maH"),a>0&&(r+=(""!==r?" ":"")+t[a]),""===r?"pagh":r}(e);switch(n){case"ss":return r+" lup";case"mm":return r+" tup";case"hh":return r+" rep";case"dd":return r+" jaj";case"MM":return r+" jar";case"yy":return r+" DIS"}}e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq"},past:function(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret"},s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"};e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,i){return e<12?i?"öö":"ÖÖ":i?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,i){switch(i){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var n=e%10;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i,n){var a={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return n||t?a[i][0]:a[i][1]}e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,i){return e>11?i?"d'o":"D'O":i?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var n=100*e+t;return n<600?"يېرىم كېچە":n<900?"سەھەر":n<1130?"چۈشتىن بۇرۇن":n<1230?"چۈش":n<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration function t(e,t,i){var n,a;return"m"===i?t?"хвилина":"хвилину":"h"===i?t?"година":"годину":e+" "+(n=+e,a={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[i].split("_"),n%10==1&&n%100!=11?a[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?a[1]:a[2])}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var i={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?i.nominative.slice(1,7).concat(i.nominative.slice(0,1)):e?i[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:i.nominative},weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,i){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],i=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];e.defineLocale("ur",{months:t,monthsShort:t,weekdays:i,weekdaysShort:i,weekdaysMin:i,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,i){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,i){return e<12?i?"sa":"SA":i?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1200?"上午":1200===n?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(i(37))},function(e,t,i){!function(e){"use strict"; //! moment.js locale configuration e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,i){var n=100*e+t;return n<600?"凌晨":n<900?"早上":n<1130?"上午":n<1230?"中午":n<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}})}(i(37))},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(98),s=i(204),l=i(27),u=i(1),d=i(8),c=i(348),f=i(490),h=i(328),p=i(325),m=i(418),_=i(89),g=i(7),v=i(49),y=function(){function e(){}return e.load=function(e,t){t.id;var i=t.enabled,y=t.realtime,b=t.reference,w=t.alwaysShowModel,O=t.relativeRotation,x=t.rotation,A=t.billboardConfig,T=t.pointConfig,E=t.labelConfig,C=t.htmlLabelConfig,S=t.pathOptions,M=t.position,D=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(y,!1),t.reference=o.default[r.default(b,"INERTIAL")],t.alwaysShowModel=r.default(w,!1),t.relativeRotation=O?new(l.default.bind.apply(l.default,a([void 0],O))):l.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(C,null),s.toColorInstanceInOption(T,["color"]);var P,I=E.font,L=E.pixelOffset,j=E.backgroundPadding,R=E.eyeOffset,N=E.verticalOrigin,B=E.outlineColor,F=E.outlineWidth,k=E.distanceDisplayCondition;s.toColorInstanceInOption(E,["Color"]),E.font=r.default(I,"14px Microsoft YaHei"),E.verticalOrigin=r.default(N,_.default.CENTER),E.outlineColor=r.default(B,g.default.BLACK),E.outlineWidth=r.default(F,2),E.pixelOffset=d.default.fromArray(r.default(L,[30,0])),E.backgroundPadding=d.default.fromArray(r.default(j,[0,0])),E.eyeOffset=u.default.fromArray(r.default(R,[0,0,0])),E.distanceDisplayCondition=new(v.default.bind.apply(v.default,a([void 0],r.default(k,[0,1e7])))),A.pixelOffset=d.default.fromArray(r.default(A.pixelOffset,[0,0])),A.eyeOffset=u.default.fromArray(r.default(A.eyeOffset,[0,0,0])),D.minimumPixelSize=r.default(D.minimumPixelSize,64),y?(P=new m.default(S),t.pathOptions=null):(t.pathOptions.mode=r.default(c.default[S.mode],c.default.SOLID),t.pathOptions.resolution=r.default(S.resolution,60),s.toColorInstanceInOption(S,["material"])),M?"degrees"===M.type?t.position=u.default.fromDegrees.apply(u.default,M.data):"entitytesian"===M.type&&(t.position=new(u.default.bind.apply(u.default,a([void 0],M.data)))):t.position=new u.default(1,1,1);var z=new f.default(n(n({},t),{position:t.position}));z.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:h.default,interpolationDegree:S.resolution});var U=null==S?void 0:S.positions;return y?P&&z.add(P):U&&s.updatePositions(z,U.type,U.data),x&&p.default.rotation(z,x),z.realtime=y,e.add(z),z},e}();t.default=y},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(98),s=i(204),l=i(27),u=i(1),d=i(8),c=i(490),f=i(325),h=i(89),p=i(7),m=i(49),_=function(){function e(){}return e.load=function(e,t){t.id;var i=t.enabled,_=t.realtime,g=t.reference,v=t.alwaysShowModel,y=t.relativeRotation,b=t.rotation,w=t.billboardConfig,O=t.pointConfig,x=t.labelConfig,A=t.htmlLabelConfig,T=t.position,E=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(_,!1),t.reference=o.default[r.default(g,"INERTIAL")],t.alwaysShowModel=r.default(v,!1),t.relativeRotation=y?new(l.default.bind.apply(l.default,a([void 0],y))):l.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(A,null),s.toColorInstanceInOption(O,["color"]);var C=x.font,S=x.pixelOffset,M=x.backgroundPadding,D=x.eyeOffset,P=x.verticalOrigin,I=x.outlineColor,L=x.outlineWidth,j=x.distanceDisplayCondition;s.toColorInstanceInOption(x,["Color"]),x.font=r.default(C,"14px Microsoft YaHei"),x.verticalOrigin=r.default(P,h.default.CENTER),x.outlineColor=r.default(I,p.default.BLACK),x.outlineWidth=r.default(L,2),x.pixelOffset=d.default.fromArray(r.default(S,[30,0])),x.backgroundPadding=d.default.fromArray(r.default(M,[0,0])),x.eyeOffset=u.default.fromArray(r.default(D,[0,0,0])),x.distanceDisplayCondition=new(m.default.bind.apply(m.default,a([void 0],r.default(j,[0,1e7])))),w.pixelOffset=d.default.fromArray(r.default(w.pixelOffset,[0,0])),w.eyeOffset=u.default.fromArray(r.default(w.eyeOffset,[0,0,0])),E.minimumPixelSize=r.default(E.minimumPixelSize,64),T?"degrees"===T.type?t.position=u.default.fromDegrees.apply(u.default,T.data):"cartesian"===T.type&&(t.position=new(u.default.bind.apply(u.default,a([void 0],T.data)))):t.position=new u.default(1,1,1),t.pathOptions=null;var R=new c.default(n(n({},t),{position:t.position}));return b&&f.default.rotation(R,b),R.realtime=_,e.add(R),R},e}();t.default=_},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(488),s=i(98),l=i(204),u=i(27),d=i(1),c=i(8),f=i(348),h=i(418),p=i(325),m=i(89),_=i(7),g=i(49),v=i(300),y=function(){function e(){}return e.load=function(e,t){v.default.deepClone(t),t.id;var i=t.enabled,y=t.realtime,b=t.reference,w=t.alwaysShowModel,O=t.relativeRotation,x=t.rotation,A=t.billboardConfig,T=t.pointConfig,E=t.labelConfig,C=t.htmlLabelConfig,S=t.pathOptions,M=t.position,D=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(y,!1),t.reference=s.default[r.default(b,"FIXED")],t.alwaysShowModel=r.default(w,!1),t.relativeRotation=O?new(u.default.bind.apply(u.default,a([void 0],O))):u.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(C,null),l.toColorInstanceInOption(T,["color"]);var P,I=E.font,L=E.pixelOffset,j=E.backgroundPadding,R=E.eyeOffset,N=E.verticalOrigin,B=E.outlineColor,F=E.outlineWidth,k=E.distanceDisplayCondition;l.toColorInstanceInOption(E,["Color"]),E.font=r.default(I,"14px Microsoft YaHei"),E.verticalOrigin=r.default(N,m.default.CENTER),E.outlineColor=r.default(B,_.default.BLACK),E.outlineWidth=r.default(F,2),E.pixelOffset=c.default.fromArray(r.default(L,[30,0])),E.backgroundPadding=c.default.fromArray(r.default(j,[0,0])),E.eyeOffset=d.default.fromArray(r.default(R,[0,0,0])),E.distanceDisplayCondition=new(g.default.bind.apply(g.default,a([void 0],r.default(k,[0,1e7])))),A.pixelOffset=c.default.fromArray(r.default(A.pixelOffset,[0,0])),A.eyeOffset=d.default.fromArray(r.default(A.eyeOffset,[0,0,0])),D.minimumPixelSize=r.default(D.minimumPixelSize,64),y?(P=new h.default(S),t.pathOptions=null):(t.pathOptions.mode=r.default(f.default[S.mode],f.default.SOLID),t.pathOptions.resolution=r.default(S.resolution,60),l.toColorInstanceInOption(S,["material"])),M?"degrees"===M.type?t.position=d.default.fromDegrees.apply(d.default,M.data):"cartesian"===M.type&&(t.position=new(d.default.bind.apply(d.default,a([void 0],M.data)))):t.position=new d.default(1,1,1);var z=new o.default(n(n({},t),{position:t.position})),U=null==S?void 0:S.positions;return y?P&&z.add(P):U&&l.updatePositions(z,U.type,U.data),x&&p.default.rotation(z,x),z.realtime=y,e.add(z),z},e}();t.default=y},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(488),s=i(98),l=i(204),u=i(27),d=i(1),c=i(8),f=i(348),h=i(328),p=i(325),m=i(418),_=i(89),g=i(7),v=i(49),y=i(300),b=function(){function e(){}return e.load=function(e,t){y.default.deepClone(t),t.id;var i=t.enabled,b=t.realtime,w=t.reference,O=t.alwaysShowModel,x=t.relativeRotation,A=t.rotation,T=t.billboardConfig,E=t.pointConfig,C=t.labelConfig,S=t.htmlLabelConfig,M=t.pathOptions,D=t.position,P=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(b,!1),t.reference=s.default[r.default(w,"FIXED")],t.alwaysShowModel=r.default(O,!1),t.relativeRotation=x?new(u.default.bind.apply(u.default,a([void 0],x))):u.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(S,null),l.toColorInstanceInOption(E,["color"]);var I,L=C.font,j=C.pixelOffset,R=C.backgroundPadding,N=C.eyeOffset,B=C.verticalOrigin,F=C.outlineColor,k=C.outlineWidth,z=C.distanceDisplayCondition;l.toColorInstanceInOption(C,["Color"]),C.font=r.default(L,"14px Microsoft YaHei"),C.verticalOrigin=r.default(B,_.default.CENTER),C.outlineColor=r.default(F,g.default.BLACK),C.outlineWidth=r.default(k,2),C.pixelOffset=c.default.fromArray(r.default(j,[30,0])),C.backgroundPadding=c.default.fromArray(r.default(R,[0,0])),C.eyeOffset=d.default.fromArray(r.default(N,[0,0,0])),C.distanceDisplayCondition=new(v.default.bind.apply(v.default,a([void 0],r.default(z,[0,1e7])))),T.pixelOffset=c.default.fromArray(r.default(T.pixelOffset,[0,0])),T.eyeOffset=d.default.fromArray(r.default(T.eyeOffset,[0,0,0])),P.minimumPixelSize=r.default(P.minimumPixelSize,64),b?(I=new m.default(M),t.pathOptions=null):(t.pathOptions.mode=r.default(f.default[M.mode],f.default.SOLID),l.toColorInstanceInOption(M,["material"])),D?"degrees"===D.type?t.position=d.default.fromDegrees.apply(d.default,D.data):"cartesian"===D.type&&(t.position=new(d.default.bind.apply(d.default,a([void 0],D.data)))):t.position=new d.default(1,1,1);var U=new o.default(n(n({},t),{position:t.position}));U.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:h.default,interpolationDegree:M.resolution});var V=null==M?void 0:M.positions;return b?I&&U.add(I):V&&l.updatePositions(U,V.type,V.data),A&&p.default.rotation(U,A),U.realtime=b,e.add(U),U},e}();t.default=b},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(488),s=i(98),l=i(204),u=i(27),d=i(1),c=i(8),f=i(348),h=i(325),p=i(89),m=i(7),_=i(49),g=function(){function e(){}return e.load=function(e,t){t.id;var i=t.enabled,g=t.realtime,v=t.reference,y=t.alwaysShowModel,b=t.relativeRotation,w=t.rotation,O=t.billboardConfig,x=t.pointConfig,A=t.labelConfig,T=t.htmlLabelConfig,E=t.pathOptions,C=t.position,S=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(g,!1),t.reference=s.default[r.default(v,"INERTIAL")],t.alwaysShowModel=r.default(y,!1),t.relativeRotation=b?new(u.default.bind.apply(u.default,a([void 0],b))):u.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(T,null),l.toColorInstanceInOption(x,["color"]);var M=A.font,D=A.pixelOffset,P=A.backgroundPadding,I=A.eyeOffset,L=A.verticalOrigin,j=A.outlineColor,R=A.outlineWidth,N=A.distanceDisplayCondition;l.toColorInstanceInOption(A,["Color"]),A.font=r.default(M,"14px Microsoft YaHei"),A.verticalOrigin=r.default(L,p.default.CENTER),A.outlineColor=r.default(j,m.default.BLACK),A.outlineWidth=r.default(R,2),A.pixelOffset=c.default.fromArray(r.default(D,[30,0])),A.backgroundPadding=c.default.fromArray(r.default(P,[0,0])),A.eyeOffset=d.default.fromArray(r.default(I,[0,0,0])),A.distanceDisplayCondition=new(_.default.bind.apply(_.default,a([void 0],r.default(N,[0,1e7])))),O.pixelOffset=c.default.fromArray(r.default(O.pixelOffset,[0,0])),O.eyeOffset=d.default.fromArray(r.default(O.eyeOffset,[0,0,0])),S.minimumPixelSize=r.default(S.minimumPixelSize,64),g?t.pathOptions=null:(t.pathOptions.mode=r.default(f.default[E.mode],f.default.SOLID),t.pathOptions.resolution=r.default(E.resolution,60),l.toColorInstanceInOption(E,["material"])),C?"degrees"===C.type?t.position=d.default.fromDegrees.apply(d.default,C.data):"cartesian"===C.type&&(t.position=new(d.default.bind.apply(d.default,a([void 0],C.data)))):t.position=new d.default(1,1,1);var B=new o.default(n(n({},t),{position:t.position})),F=null==E?void 0:E.positions;return!g&&F&&l.updatePositions(B,F.type,F.data),w&&h.default.rotation(B,w),B.realtime=g,e.add(B),B},e}();t.default=g},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(98),s=i(204),l=i(27),u=i(1),d=i(8),c=i(348),f=i(490),h=i(328),p=i(325),m=i(418),_=i(89),g=i(7),v=i(49),y=function(){function e(){}return e.load=function(e,t){t.id;var i=t.enabled,y=t.realtime,b=t.reference,w=t.alwaysShowModel,O=t.relativeRotation,x=t.rotation,A=t.billboardConfig,T=t.pointConfig,E=t.labelConfig,C=t.htmlLabelConfig,S=t.pathOptions,M=t.position,D=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(y,!1),t.reference=o.default[r.default(b,"INERTIAL")],t.alwaysShowModel=r.default(w,!1),t.relativeRotation=O?new(l.default.bind.apply(l.default,a([void 0],O))):l.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(C,null),s.toColorInstanceInOption(T,["color"]);var P,I=E.font,L=E.pixelOffset,j=E.backgroundPadding,R=E.eyeOffset,N=E.verticalOrigin,B=E.outlineColor,F=E.outlineWidth,k=E.distanceDisplayCondition;s.toColorInstanceInOption(E,["Color"]),E.font=r.default(I,"14px Microsoft YaHei"),E.verticalOrigin=r.default(N,_.default.CENTER),E.outlineColor=r.default(B,g.default.BLACK),E.outlineWidth=r.default(F,2),E.pixelOffset=d.default.fromArray(r.default(L,[30,0])),E.backgroundPadding=d.default.fromArray(r.default(j,[0,0])),E.eyeOffset=u.default.fromArray(r.default(R,[0,0,0])),E.distanceDisplayCondition=new(v.default.bind.apply(v.default,a([void 0],r.default(k,[0,1e7])))),A.pixelOffset=d.default.fromArray(r.default(A.pixelOffset,[0,0])),A.eyeOffset=u.default.fromArray(r.default(A.eyeOffset,[0,0,0])),D.minimumPixelSize=r.default(D.minimumPixelSize,64),y?(P=new m.default(S),t.pathOptions=null):(t.pathOptions.mode=r.default(c.default[S.mode],c.default.SOLID),t.pathOptions.resolution=r.default(S.resolution,60),s.toColorInstanceInOption(S,["material"])),M?"degrees"===M.type?t.position=u.default.fromDegrees.apply(u.default,M.data):"cartesian"===M.type&&(t.position=new(u.default.bind.apply(u.default,a([void 0],M.data)))):t.position=new u.default(1,1,1);var z=new f.default(n(n({},t),{position:t.position}));z.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:h.default,interpolationDegree:S.resolution});var U=null==S?void 0:S.positions;return y?P&&z.add(P):U&&s.updatePositions(z,U.type,U.data),x&&p.default.rotation(z,x),z.realtime=y,e.add(z),z},e}();t.default=y},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(98),s=i(204),l=i(27),u=i(1),d=i(8),c=i(490),f=i(325),h=i(89),p=i(7),m=i(49),_=function(){function e(){}return e.load=function(e,t){t.id;var i=t.enabled,_=t.realtime,g=t.reference,v=t.alwaysShowModel,y=t.relativeRotation,b=t.rotation,w=t.billboardConfig,O=t.pointConfig,x=t.labelConfig,A=t.htmlLabelConfig,T=t.position,E=t.modelConfig;t.enabled=r.default(i,!0),t.realtime=r.default(_,!1),t.reference=o.default[r.default(g,"INERTIAL")],t.alwaysShowModel=r.default(v,!1),t.relativeRotation=y?new(l.default.bind.apply(l.default,a([void 0],y))):l.default.IDENTITY.clone(),t.htmlLabelConfig=r.default(A,null),s.toColorInstanceInOption(O,["color"]);var C=x.font,S=x.pixelOffset,M=x.backgroundPadding,D=x.eyeOffset,P=x.verticalOrigin,I=x.outlineColor,L=x.outlineWidth,j=x.distanceDisplayCondition;s.toColorInstanceInOption(x,["Color"]),x.font=r.default(C,"14px Microsoft YaHei"),x.verticalOrigin=r.default(P,h.default.CENTER),x.outlineColor=r.default(I,p.default.BLACK),x.outlineWidth=r.default(L,2),x.pixelOffset=d.default.fromArray(r.default(S,[30,0])),x.backgroundPadding=d.default.fromArray(r.default(M,[0,0])),x.eyeOffset=u.default.fromArray(r.default(D,[0,0,0])),x.distanceDisplayCondition=new(m.default.bind.apply(m.default,a([void 0],r.default(j,[0,1e7])))),w.pixelOffset=d.default.fromArray(r.default(w.pixelOffset,[0,0])),w.eyeOffset=u.default.fromArray(r.default(w.eyeOffset,[0,0,0])),E.minimumPixelSize=r.default(E.minimumPixelSize,64),T?"degrees"===T.type?t.position=u.default.fromDegrees.apply(u.default,T.data):"cartesian"===T.type&&(t.position=new(u.default.bind.apply(u.default,a([void 0],T.data)))):t.position=new u.default(1,1,1),t.pathOptions=null;var R=new c.default(n(n({},t),{position:t.position}));return b&&f.default.rotation(R,b),R.realtime=_,e.add(R),R},e}();t.default=_},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(5),r=i(979),o=i(204),s=i(980),l=i(326),u=i(301),d=i(491),c=i(300),f=function(){function e(){}return e.load=function(e,t){var i=c.default.deepClone(t),f=t.parent,h=(t.halfAngle,t.material),p=t.scanMode,m=t.rotation,_=e.getEntityById(f);o.toColorInstanceInOption(t,["aterial"]),o.toRadiansInOption(t,["halfAngle"]),t.scanMode=u.default[l.defaultValue(p,"STATIC")],h instanceof Object&&(o.toColorInstanceInOption(t.material,["olor"]),t.material=new s.default(h));var g=new r.default(t);g.rawOption=i,m&&(g.pointing.ypr=new(d.default.bind.apply(d.default,n([void 0],m.map((function(e){return a.default.toRadians(e)})))))),_.add(g)},e}();t.default=f},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(495),s=i(496),l=i(43),u=i(14),d=i(5),c=i(6),f=i(61),h=i(64),p=i(13),m=i(547),_=i(321),g=i(2),v=i(27),y=i(301),b=i(301),w=function(e){function t(t){var i=e.call(this,t)||this;return i._halfAngle=d.default.toRadians(45),i._length=1e3,i.circleRotation=0,i.coneRotation=0,i.crossSingleRotation=0,i.crossSingleRotationMax=d.default.toRadians(49.5),i.coneUpdate=!1,i.backTime=0,i._halfAngle=t.halfAngle,i._length=t.length,i._radius=Math.tan(i._halfAngle)*i.length,i._topPosition=new r.default(0,0,-i.length/2),i._bottomCenterPosition=new r.default(0,0,i.length/2),i.bottomPositions=[],i.edgeVertices=[],i.circleSpeed=g.default(t.circleSpeed,1.5),i.crossSpeed=g.default(t.crossSpeed,5.6),i.crossBackSpeed=g.default(t.crossBackSpeed,.8),i.coneSpeed=g.default(t.coneSpeed,1.8),i.crossScanAngle=g.default(t.crossScanAngle,d.default.PI/4),i.coneScanAngle=g.default(t.coneScanAngle,d.default.PI/4),i.crossOffsetAngle=g.default(t.crossOffsetAngle,0),i._scanMode=g.default(t.scanMode,1),i.backTime=i.crossSpeed/2,i.isCover=5!==i._scanMode,i.offsetMatrix=c.default.fromTranslation(new r.default(0,0,i.length/2),new c.default),i.calculateBottomPositions(),i.createGeometry(),i}return a(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"radius",{get:function(){return this._radius},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scanMode",{get:function(){return this._scanMode},set:function(e){this._scanMode!==e&&(this.rotation=v.default.IDENTITY.clone(),5===this._scanMode?this.isCover=!1:this.isCover=!0,this.prevTime=null,this.statTime=null,this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this._scanMode=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,5===this._scanMode?this.isCover=!1:this.isCover=e,this.prevTime=null,this.statTime=null,1!==this._scanMode&&(this.rotation=v.default.IDENTITY.clone()),this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this.primitive&&(this.primitive.show=e),this.outlinePrimitive&&(this.outlinePrimitive.show=e),this.surfaceEdge&&(this.surfaceEdge.show=e)},enumerable:!1,configurable:!0}),t.prototype.createGeometry=function(){this.geometry=new o.default({length:this.length,topRadius:this.radius,bottomRadius:1,vertexFormat:this.getVertexFormat()}),this.showOutline&&(this.outlineGeometry=new s.default({length:this.length,topRadius:this.radius,bottomRadius:1,numberOfVerticalLines:16}))},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=p.default.SCENE3D;t&&(i=t.sceneMode),c.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),(this._shouldUpdateIn2D||i!==p.default.SCENE2D)&&(this.geometrInstance=new l.default({geometry:this.geometry,modelMatrix:i!==p.default.SCENE3D?c.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new h.default({geometryInstances:this.geometrInstance,modelMatrix:i===p.default.SCENE3D?c.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:this.getAppearance(),asynchronous:i===p.default.SCENE3D,show:this.show}),this.showOutline&&(this.outlineGeometrInstance=new l.default({geometry:this.outlineGeometry,modelMatrix:i!==p.default.SCENE3D?c.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new h.default({geometryInstances:this.outlineGeometrInstance,modelMatrix:i===p.default.SCENE3D?c.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix):void 0,appearance:new f.default({flat:!0}),show:this.showOutline&&this.show,asynchronous:i===p.default.SCENE3D})))},t.prototype.updateMatrix=function(t){c.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),e.prototype.updateMatrix.call(this,t)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&1!==this._scanMode){if(!this.prevTime)return this.prevTime=u.default.clone(t),void(this.statTime=u.default.clone(t));5===this._scanMode&&!this.isCover&&this.coneUpdate&&(this.isCover=!0);var n=u.default.secondsDifference(t,this.prevTime),a=u.default.secondsDifference(t,this.statTime);this.backTime+=n,this.backTime>this.crossSpeed+this.crossBackSpeed&&(this.backTime=0),this.prevTime=u.default.clone(t);var o=void 0,s=void 0;switch(this._scanMode){case y.default.STATIC:break;case b.default.CIRCLE:o=2*Math.PI/this.circleSpeed,this.circleRotation+=n*o,this.rotation=v.default.fromAxisAngle(r.default.UNIT_X,this.circleRotation);break;case b.default.CROSS_SINGLE:this.backTime<this.crossSpeed?(this.isCover=!0,s=this.crossScanAngle*Math.sin((this.backTime+this.crossSpeed/2)*Math.PI/this.crossSpeed)):(this.isCover=!1,s=this.crossScanAngle*Math.sin((this.backTime-this.crossSpeed-this.crossBackSpeed/2)*Math.PI/this.crossBackSpeed)),this.crossSingleRotation=s,this.rotation=v.default.fromAxisAngle(r.default.UNIT_X,this.crossSingleRotation);break;case b.default.CROSS_DOUBLE:s=this.crossScanAngle*Math.sin(a*Math.PI*2/this.crossSpeed),this.crossSingleRotation=s+this.crossOffsetAngle;var l=new v.default,d=new v.default;l=v.default.fromAxisAngle(r.default.UNIT_X,this.crossSingleRotation),v.default.multiply(l,this.relativeRotation,d),this.rotation=d;break;case b.default.CONE:var c=v.default.fromAxisAngle(r.default.UNIT_X,this.coneScanAngle);o=2*Math.PI/this.coneSpeed,this.coneRotation+=n*o;var f=v.default.fromAxisAngle(r.default.UNIT_Z,this.coneRotation),h=v.default.IDENTITY.clone();v.default.multiply(f,c,h),this.rotation=h,this.coneUpdate=!0}}},t.prototype.getEdgeVertices=function(e){void 0===e&&(e=1);var t=[];return m.default.calcuateIntersectionPointsFromConeAndWGS84Ellipsoid(this.bottomPositions,this.worldMatrix,this._topPosition,this._bottomCenterPosition,t),t},t.prototype.calculateBottomPositions=function(e){void 0===e&&(e=64);for(var t=d.default.TWO_PI/e,i=0;i<d.default.TWO_PI;)this.bottomPositions.push(new r.default(Math.sin(i)*this.radius,Math.cos(i)*this.radius,this.length/2)),i+=t},t.prototype.updateEllipsoidSurfaceEdge=function(){var e=this.edgeVertices;e.length=0,m.default.calcuateIntersectionPointsFromConeAndWGS84Ellipsoid(this.bottomPositions,this.worldMatrix,this._topPosition,this._bottomCenterPosition,e),this.removeSurfaceEdge(),this.createSurfaceEdge(),this.addSurfaceEdge()},t}(_.default);t.default=w},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(5),r=i(204),o=i(7),s=i(980),l=i(326),u=i(301),d=i(981),c=i(491),f=i(300),h=function(){function e(){}return e.load=function(e,t){var i=f.default.deepClone(t),h=t.parent,p=t.material,m=t.scanMode,_=t.rotation,g=e.getEntityById(h);r.toRadiansInOption(t,["Angle"]),r.toColorInstanceInOption(t,["aterial"]),t.scanMode=u.default[l.defaultValue(m,"STATIC")],!(p instanceof Object)||p instanceof s.default||p instanceof o.default||(r.toColorInstanceInOption(t.material,["olor"]),t.material=new s.default(p));var v=new d.default(t);v.rawOption=i,_&&(v.pointing.ypr=new(c.default.bind.apply(c.default,n([void 0],_.map((function(e){return a.default.toRadians(e)})))))),g.add(v)},e}();t.default=h},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(204),r=i(1159),o=i(1),s=i(300),l=function(){function e(){}return e.load=function(e,t){var i=s.default.deepClone(t),l=t.parent,u=t.radii;a.toColorInstanceInOption(t,["Material"]),a.toRadiansInOption(t,["maximum","minimum","coneHalfAngle","conePitch"]);var d=e.getEntityById(l);t.radii=new(o.default.bind.apply(o.default,n([void 0],u)));var c=new r.default(t);c.rawOption=i,d.add(c)},e}();t.default=l},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(7),s=i(2),l=i(3),u=i(14),d=i(6),c=i(27),f=i(13),h=i(1160),p=i(280),m=i(392),_=i(979),g=new c.default,v=new c.default,y=function(e){function t(t){var i=e.call(this,t)||this;if(i.options=t,i.angle=0,i.prevTime=new u.default,i.clockWise=!1,i._yoyo=!0,i.pointing=new m.default(i),i.rotationAnglePerSecond=t.rotationAnglePerSecond||Math.PI/18,i.options.maximumClock=s.default(t.maximumClock,2*Math.PI),i.options.minimumClock=s.default(t.minimumClock,0),i.options.outlineMaximumClock=s.default(t.outlineMaximumClock,2*Math.PI),i.options.outlineMinimumClock=s.default(t.outlineMinimumClock,0),i.options.maximumHeading=t.maximumHeading||i.options.maximumClock,i.options.minimumHeading=t.minimumHeading||i.options.minimumClock,i.options.minimumPitch=s.default(t.minimumPitch,0),i.options.maximumPitch=s.default(t.maximumPitch,Math.PI/2+Math.PI/16),i.fanOffsetAngle=s.default(t.fanOffsetAngle,0),0!==i.options.minimumHeading&&i.options.maximumHeading!==2*Math.PI||(i._yoyo=!1,i.clockWise=!0),i.angleRange=i.options.maximumHeading-i.options.minimumHeading,i.enableFan=s.default(t.enableFan,!0),i.angleRange<0)throw new l.default("maximumClock should be greater than minimumClock");return i.add(new h.default({id:i.id+"__par-outline",radii:t.radii,minimumCone:i.options.minimumPitch,maximumCone:i.options.maximumPitch,maximumClock:i.options.outlineMaximumClock,minimumClock:i.options.outlineMinimumClock,showOutline:!0,slicePartitions:s.default(i.options.verticalPartitions,40),stackPartitions:s.default(i.options.horizontalPartitions,40),material:s.default(i.options.outMaterial,o.default.TRANSPARENT),outlineMaterial:s.default(i.options.outlineMaterial,o.default.WHITE),shouldUpdateIn2D:!1,enableSurfaceEdge:!0,showSurfaceEdgeOutline:!0,showSurfaceEdge:!1,surfaceEdgeOutlineMaterial:t.outSurfaceEdgeOutlineMaterial})),i.add(new h.default({id:i.id+"__par-inner",radii:t.radii,innerRadii:new r.default(1,1,1),minimumCone:i.options.minimumPitch,maximumCone:i.options.maximumPitch,maximumClock:i.options.maximumClock,minimumClock:i.options.minimumClock,material:s.default(i.options.innerMaterial,o.default.CYAN.withAlpha(.5)),shouldUpdateIn2D:!1,enableSurfaceEdge:!1,showSurfaceEdgeOutline:!1,showSurfaceEdge:!1,surfaceEdgeOutlineMaterial:t.innerSurfaceEdgeOutlineMaterial,slicePartitions:40,stackPartitions:40})),i.enableFan&&i.add(new h.default({id:i.id+"__par-fan",radii:t.radii,innerRadii:new r.default(1,1,1),minimumCone:s.default(i.options.minFanConeAngle,i.options.minimumPitch),maximumCone:s.default(i.options.maxFanConeAngle,i.options.maximumPitch),maximumClock:s.default(i.options.minFanClockAngle,0),minimumClock:s.default(i.options.maxFanClockAngle,Math.PI/180),material:s.default(i.options.fanMaterial,o.default.YELLOW),shouldUpdateIn2D:!1,enableSurfaceEdge:!1})),t.coneHalfAngle&&(i.conePitch=s.default(t.conePitch,0),i.add(new _.default({id:i.id+"__par-cone",length:t.radii.x,halfAngle:s.default(t.coneHalfAngle,Math.PI/12),material:s.default(i.options.coneMaterial,o.default.RED),enableSurfaceEdge:!1}))),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t=this;this._show=e&&this.enabled,this.children.values.forEach((function(i){i.show=e&&t.enabled}))},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t),this.children.values.forEach((function(e){e.isAdded||e.afterAdded(i)}))},t.prototype.addHeadingPitchRollSample=function(e,t){this.addRotationSample(e,m.default.headingPitchRollToQuaternion(t,new c.default))},t.prototype.updateForward=function(t,i){var n,a=this;e.prototype.updateForward.call(this,t,i),d.default.clone(i,this.matrix);var o=u.default.secondsDifference(t,this.prevTime);u.default.clone(t,this.prevTime);var s=null===(n=this.getViewer())||void 0===n?void 0:n.sceneMode,l=this.children.get(this.id+"__par-fan"),h=this.children.get(this.id+"__par-cone");if(l){if(s===f.default.SCENE2D)return;var p=this.angle+this.rotationAnglePerSecond*o;this._yoyo&&p>=this.angleRange&&(this.clockWise=!this.clockWise),this.angle=p%this.angleRange,c.default.fromAxisAngle(r.default.UNIT_Y,this.fanOffsetAngle,g),c.default.fromAxisAngle(r.default.UNIT_Z,this.clockWise?this.options.maximumHeading-this.angle:this.options.minimumHeading+this.angle,v),c.default.multiply(v,g,g),l.rotation=g.clone()}if(h){if(s===f.default.SCENE2D)return;p=this.angle+this.rotationAnglePerSecond*o;this._yoyo&&p>=this.angleRange&&(this.clockWise=!this.clockWise),this.angle=p%this.angleRange,c.default.fromAxisAngle(r.default.UNIT_Y,Math.PI/2-this.conePitch,g),c.default.fromAxisAngle(r.default.UNIT_Z,this.clockWise?this.options.maximumHeading-this.angle:this.options.minimumHeading+this.angle,v),c.default.multiply(v,g,g),h.rotation=g.clone()}this.children.values.forEach((function(e,i){e.updateForward(t,a.matrix)}))},t.prototype.clone=function(){return new t(this.options)},t.prototype.beforeSwitchMode=function(t){if(this.show){e.prototype.beforeSwitchMode.call(this,t);var i=this.children.get(this.id+"__par-outline"),n=this.children.get(this.id+"__par-fan");t===f.default.SCENE2D?(n&&(n.show=!1),i&&(i.showOutline=!1)):this.show&&(n&&(n.show=!0),i&&(i.showOutline=!0))}},t}(p.default);t.default=y},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(15),l=i(196),u=i(257),d=i(43),c=i(6),f=i(61),h=i(64),p=i(13),m=i(321),_=i(5),g=i(547),v=i(85),y=i(205),b=i(22),w=new o.default,O=new o.default,x=new b.default,A=new v.default,T=new y.default,E={minimumClock:0,maximumClock:_.default.TWO_PI,minimumCone:0,maximumCone:_.default.PI,stackPartitions:64,slicePartitions:64},C=function(e){function t(t){var i=e.call(this,r(r({},E),t))||this;i.sliceLines=[];var n=r(r({},E),t);return i.geometry=new l.default(r(r({},n),{vertexFormat:i.getVertexFormat()})),i.options=n,i.showOutline&&(i.outlineGeometry=new u.default(t)),i.calculateSliceLines(),i}return a(t,e),t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=p.default.SCENE3D;t&&(i=t.sceneMode),(this._shouldUpdateIn2D||i!==p.default.SCENE2D)&&(this.geometrInstance=new d.default({geometry:this.geometry,modelMatrix:i!==p.default.SCENE3D?c.default.multiply(e,this.matrix,this.worldMatrix):void 0,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new h.default({asynchronous:i===p.default.SCENE3D,geometryInstances:this.geometrInstance,modelMatrix:i===p.default.SCENE3D?this.matrix:void 0,appearance:this.getAppearance(),show:this.show}),this.showOutline&&(this.outlineGeometrInstance=new d.default({geometry:this.outlineGeometry,modelMatrix:i!==p.default.SCENE3D?c.default.multiply(e,this.matrix,this.worldMatrix):void 0,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new h.default({asynchronous:i===p.default.SCENE3D,geometryInstances:this.outlineGeometrInstance,modelMatrix:i===p.default.SCENE3D?this.matrix:void 0,appearance:new f.default({flat:!0}),show:this.showOutline&&this.show})))},t.prototype.updateMatrix=function(t){c.default.clone(this.matrix,this.worldMatrix),e.prototype.updateMatrix.call(this,t)},t.prototype.updateEllipsoidSurfaceEdge=function(){var e=this,t=this.edgeVertices;t.length=0,this.options.maximumClock===_.default.TWO_PI&&0===this.options.minimumClock||(c.default.multiplyByPoint(this.worldMatrix,this.position,O),b.default.fromCartesian(O,void 0,x),x.height=0,b.default.toCartesian(x,void 0,O),t.push(O.clone())),this.sliceLines.forEach((function(i){for(var n=0;n<i.length-1;n++){var a=i[n],r=i[n+1],o=g.default.lineSegmentEllipsoid(c.default.multiplyByPoint(e.worldMatrix,a,w),c.default.multiplyByPoint(e.worldMatrix,r,O),s.default.WGS84,A,T);if(o){v.default.getPoint(A,o.start,O),t.push(O.clone());break}}})),this.enableSurfaceEdge&&(t.push(t[0]),this.removeSurfaceEdge(),this.createSurfaceEdge(),this.addSurfaceEdge())},t.prototype.calculateSliceLines=function(){var e,t,i=this.options,n=i.radii,a=i.minimumClock,r=i.maximumClock,s=i.minimumCone,l=i.maximumCone,u=i.slicePartitions,d=i.stackPartitions;(u=Math.round(u*Math.abs(r-a)/_.default.TWO_PI))<2&&(u=2),(d=Math.round(d*Math.abs(l-s)/_.default.PI))<2&&(d=2);var c=[],f=[];for(e=0;e<d;e++)c.push(s+e*(l-s)/(d-1));for(t=0;t<u;t++)f.push(a+t*(r-a)/(u-1));var h=c.length,p=f.length,m=new Array(h),g=new Array(h);for(e=0;e<h;e++)m[e]=Math.sin(c[e]),g[e]=Math.cos(c[e]);var v=new Array(p),y=new Array(p);for(t=0;t<p;t++)y[t]=Math.cos(f[t]),v[t]=Math.sin(f[t]);for(t=0;t<p;t++){var b=[];for(e=0;e<h;e++)b.push(new o.default(n.x*m[e]*y[t],n.y*m[e]*v[t],n.z*g[e]));this.sliceLines.push(b)}},t}(m.default);t.default=C},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(204),r=i(1008),o=i(391),s=i(76),l=i(14),u=i(300),d=function(){function e(){}return e.load=function(e,t){var i=u.default.deepClone(t),d=t.entityFrom,c=t.entityTo,f=t.polylineOptions,h=t.availability;t.entityFrom=e.getEntityById(d),t.entityTo=e.getEntityById(c),a.toColorInstanceInOption(f,["material"]),f.material instanceof Object&&(a.toColorInstanceInOption(f.material,["color"]),f.material=new o.default(f.material));var p=new r.default(t);p.rawOption=i,(null==h?void 0:h.length)>0&&(p.availability=n(n([],p.availability),h.map((function(e){var t=e.split("/"),i=t[0],n=t[1];return new s.default({start:l.default.fromIso8601(i),stop:l.default.fromIso8601(n)})})))),e.add(p)},e}();t.default=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(204),a=i(1163),r=i(14),o=i(1),s=i(76),l=function(){function e(){}return e.load=function(e,t){var i=t.id,l=t.parent,u=(t.material,t.resetStripe),d=e.getEntityById(l);n.toColorInstanceInOption(t,["material"]),u&&d.forEachChildren((function(e){e instanceof a.default&&e.id.includes(i)&&d.remove(e)})),t.stripes.forEach((function(e,n){var u=r.default.fromDate(new Date(e[0].split("/")[0])),c=r.default.fromDate(new Date(e[0].split("/")[1])),f=[];Array.isArray(e[1][0])?e[1].forEach((function(e){f.push(o.default.fromDegreesArray(e))})):f=o.default.fromDegreesArray(e[1]);var h=Object.assign({positions:f},t,{id:l+"-"+i+"-"+n}),p=new a.default(h);p.availability.push(new s.default({start:u,stop:c})),d.add(p)}))},e}();t.default=l},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var o=i(2),s=i(151),l=i(7),u=i(43),d=i(302),c=i(206),f=i(279),h=i(322),p=i(69),m=i(117),_=i(53),g=i(143),v=i(61),y=i(263),b=i(349),w=i(195),O=function(e){function t(t){var i=e.call(this,t)||this;return i.positions=[],i.geometryInstances=[],i.outlineGeometryInstances=[],i._material=t.material,i._outlineMaterial=o.default(t.outlineMaterial,t.material),i.positions=t.positions,i.height=o.default(t.height,500),i.showFill=o.default(t.showFill,!0),i.showOutline=o.default(t.showOutline,!1),i.outlineWidth=o.default(t.outlineWidth,2),i.createPrimitive(),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polygon&&(this.polygon.show=e),this.outline&&(this.outline.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},set:function(e){var t=this;this._material=e,this.positions.forEach((function(i,n){if(t.polygon&&t.showFill){var a=t.polygon.getGeometryInstanceAttributes(t.id+"_stripe_"+n);e instanceof l.default?a.color=_.default.toValue(e,a.color):e instanceof p.default&&(a.material=_.default.toValue(e,a.material))}}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outlineMaterial",{get:function(){return this._outlineMaterial},set:function(e){var t=this;this._outlineMaterial=e,this.positions.forEach((function(i,n){if(t.outline&&t.showOutline){var a=t.outline.getGeometryInstanceAttributes(t.id+"_stripe_outline_"+n);e instanceof l.default?a.color=_.default.toValue(e,a.color):e instanceof p.default&&(a.material=_.default.toValue(e,a.material))}}))},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(){var e=this;Array.isArray(this.positions[0])||(this.positions=[r([],this.positions)]),this.positions.forEach((function(t,i){if(e.showFill){var n=new d.default({polygonHierarchy:new c.default(t),height:e.height,vertexFormat:h.default.VERTEX_FORMAT}),a=new u.default({id:e.id+"_stripe_"+i,geometry:n,attributes:e.getAttributes()});e.geometryInstances.push(a)}if(e.showOutline){var o=new b.default({positions:r(r([],t),[t[0]]),width:e.outlineWidth}),s=new u.default({id:e.id+"_stripe_outline_"+i,geometry:o,attributes:{color:_.default.fromColor(e._outlineMaterial)}});e.outlineGeometryInstances.push(s)}})),this.geometryInstances.length>0&&(this.polygon=new w.default({geometryInstances:this.geometryInstances,appearance:this.getAppearance(),asynchronous:!1,show:this._show})),this.outlineGeometryInstances.length>0&&(this.outline=new y.default({geometryInstances:this.outlineGeometryInstances,appearance:new g.default({translucent:!0}),show:this._show}))},t.prototype.removePrimitive=function(){this.polygon&&this._polygons.remove(this.polygon),this.outline&&this._polygons.remove(this.outline)},t.prototype.afterAdded=function(t){var i=[];e.prototype.afterAdded.call(this,t),t instanceof f.default?this._polygons=t.polygons:t.parent instanceof f.default&&(this._polygons=t.parent.polygons),this._polygons&&(this.polygon&&(i.push(this.polygon.readyPromise),this._polygons.add(this.polygon)),this.outline&&(i.push(this.outline.readyPromise),this._polygons.add(this.outline)),this.show=t.show&&this.show,this.isAdded=!0),this.readyPromise=Promise.all(i)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polygons&&(this.polygon&&this._polygons.remove(this.polygon),this.outline&&this._polygons.remove(this.outline))},t.prototype.reAdd=function(){this.polygon&&this._polygons.remove(this.polygon),this.outline&&this._polygons.remove(this.outline),this.polygon=null,this.outline=null,this.geometryInstances=[],this.outlineGeometryInstances=[],this.createPrimitive();var e=[];this._polygons&&(this.polygon&&(e.push(this.polygon.readyPromise),this._polygons.add(this.polygon)),this.outline&&(e.push(this.outline.readyPromise),this._polygons.add(this.outline)),this.isAdded=!0)},t.prototype.getAppearance=function(){return this._material instanceof l.default?new v.default({flat:!0}):new m.default({material:this._material,faceForward:!1,closed:!0})},t.prototype.getAttributes=function(){return this._material instanceof l.default?{color:_.default.fromColor(this._material)}:void 0},t}(s.default);t.default=O},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},a=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var r=i(1004),o=i(14),s=i(1),l=i(76),u=i(300),d=function(){function e(){}return e.load=function(e,t){var i=u.default.deepClone(t),d=t.position,c=t.availability,f=t.resetAvailability;t.position=s.default.fromDegrees.apply(s.default,t.position);var h=new r.default(n(n({},t),{position:d}));h.rawOption=i,f&&(h.availability.length=0,h.enabled=!0),c&&c.length>0&&(h.availability=a(a([],h.availability),c.map((function(e){var t=e.split("/"),i=t[0],n=t[1];return new l.default({start:o.default.fromIso8601(i),stop:o.default.fromIso8601(n)})})))),e.add(h)},e}();t.default=d},function(e,t,i){"use strict";var n=this&&this.__spreadArray||function(e,t){for(var i=0,n=t.length,a=e.length;i<n;i++,a++)e[a]=t[i];return e};Object.defineProperty(t,"__esModule",{value:!0});var a=i(76),r=i(14),o=function(){function e(){}return e.load=function(e,t){var i=t.id,o=t.trackedEntityId,s=t.availability,l=t.resetAvailability,u=i.split("-"),d=u[0],c=u[1],f=e.getEntityById(d).getEntityById(c);if(o){var h=e.getEntityById(o);f.pointing.trackedEntity=h}l&&(f.availability.length=0,f.enabled=!0),s&&s.length>0&&(f.availability=n(n([],f.availability),s.map((function(e){var t=e.split("/"),i=t[0],n=t[1];return new a.default({start:r.default.fromIso8601(i),stop:r.default.fromIso8601(n)})}))))},e}();t.default=o},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(53),u=i(15),d=i(43),c=i(5),f=i(6),h=i(12),p=i(85),m=i(117),_=i(61),g=i(64),v=i(13),y=i(279),b=i(321),w=i(280),O=i(46),x=i(28),A=i(11),T=i(35),E=i(17),C=new o.default,S=new f.default,M=new h.default,D=i(249),P=i(1182),I=i(323),L=i(52),j=i(124),R={material:s.default.CYAN,minElevationAngle:Math.PI/4,maxElevationAngle:5*Math.PI/12,forwardExclusionAngle:Math.PI/3,afterExclusionAngle:Math.PI/3,length:1e5,shouldUpdateIn2D:!0},N=function(e){function t(t){var i=e.call(this,r(r({},R),t))||this;i.offsetMatrix=f.default.IDENTITY.clone(),i.worldMatrix=f.default.IDENTITY.clone(),i._shouldUpdateIn2D=!0,i._forwardExclusionAngle=c.default.toRadians(45),i._afterExclusionAngle=c.default.toRadians(45),i._length=1e3,i.geometryPointingAxis=b.GeometryPointingAxis.NEGATIVE_Z,i.rotationFrame=I.default.LOCAL;var n=r(r({},R),t);return i._minElevationAngle=n.minElevationAngle,i._maxElevationAngle=n.maxElevationAngle,i._forwardExclusionAngle=n.forwardExclusionAngle,i._afterExclusionAngle=n.afterExclusionAngle,i._length=n.length,i.material=n.material,i.offsetMatrix=f.default.fromTranslation(new o.default(0,0,-i.length/2),new f.default),i}return a(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.primitive&&(this.primitive.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},set:function(e){if(this._material=e,this.primitive&&e instanceof s.default){var t=this.primitive.getGeometryInstanceAttributes(this.id);t.color=l.default.toValue(e,t.color)}},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(e){var t;if(!this.isAdded&&(this.parent=e,this.enabled&&(this.show=e.show),e.parent)){var i=new o.default;f.default.getTranslation(e.matrix,i),o.default.magnitude(i)>0&&(this.createGeometry(i),this.createPrimitive(e.matrixVelocity),this.updateMatrix(e.matrixVelocity),this.isAdded=this.addPrimitive(),(null===(t=this.primitive)||void 0===t?void 0:t.entityId)&&(this.primitive.entityId=this.id))}},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(e===v.default.SCENE2D?this.primitive&&(this.primitive.show=!1):this.primitive&&(this.primitive.show=this.show),this.updateGeometry(this.parent.matrix))},t.prototype.createGeometry=function(e){console.log("创建集合",e);var t=o.default.magnitude(e),i=new o.default(t,0,0),n=Math.asin(6378137/t),a=6378137*Math.sin(n),r=new o.default(a,0,0),s=(new o.default(0,0,1),new o.default(Math.tan(this._minElevationAngle),0,1)),l=new o.default(Math.tan(this._maxElevationAngle),0,1);o.default.normalize(s,s),o.default.normalize(l,l);var d=new p.default(r,s),c=new p.default(r,l),f=j.default.rayEllipsoid(d,u.default.WGS84),h=j.default.rayEllipsoid(c,u.default.WGS84),m=new o.default,_=new o.default;p.default.getPoint(d,f.stop,m),p.default.getPoint(c,h.stop,_);var g=i.x-m.x,v=i.x-_.x,y=Math.atan2(m.z,g),b=Math.atan2(_.z,v);m.z,_.z,o.default.distance(i,m);i.x,m.x;var w={radius:11*Math.tan(b),height:11,radialSegments:64},C={radius:10*Math.tan(y),height:10,radialSegments:64},S=new D.ConeGeometry(w.radius,w.height,w.radialSegments);S.translate(0,.5*-w.height,0);var M=new D.MeshNormalMaterial,I=new D.Mesh(S,M),L=new D.ConeGeometry(C.radius,C.height,C.radialSegments);L.translate(0,.5*-C.height,0);var R=new D.Mesh(L,M),N={radius:20*Math.tan(this._afterExclusionAngle),height:20,radialSegments:64},B={radius:20*Math.tan(this._forwardExclusionAngle),height:20,radialSegments:64},F=new D.ConeGeometry(N.radius,N.height,N.radialSegments);F.translate(0,.5*-N.height,0),F.rotateZ(Math.PI/2);var k=new D.MeshNormalMaterial,z=new D.Mesh(F,k),U=new D.ConeGeometry(B.radius,B.height,B.radialSegments);U.translate(0,.5*-B.height,0),U.rotateZ(-Math.PI/2);var V=new D.MeshNormalMaterial,H=new D.Mesh(U,V);I.updateMatrix(),R.updateMatrix(),z.updateMatrix(),H.updateMatrix();var G=P.CSG.union(R,R),Y=(P.CSG.union(I,I),P.CSG.union(z,z),P.CSG.union(H,H),P.CSG.subtract(G,I)),W=P.CSG.subtract(Y,z),q=P.CSG.subtract(W,H);q.geometry.scale(this.length/10,this.length/10,this.length/10),q.geometry.translate(0,.5*-this._length,0),q.geometry.rotateX(-Math.PI/2),q.updateMatrix();var X=q.geometry.attributes.position.array,K=q.geometry.attributes.uv.array,J=q.geometry.attributes.normal.array;q.geometry.index.array.length>0&&(this.geometry=new O.default({attributes:{position:new x.default({componentDatatype:A.default.DOUBLE,componentsPerAttribute:3,values:X}),normal:new x.default({componentDatatype:A.default.FLOAT,componentsPerAttribute:3,values:J}),st:new x.default({componentDatatype:A.default.FLOAT,componentsPerAttribute:2,values:K})},indices:q.geometry.index.array,primitiveType:T.default.TRIANGLES,boundingSphere:E.default.fromVertices(X)}))},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=v.default.SCENE3D;t&&(i=t.sceneMode),f.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),(this._shouldUpdateIn2D||i!==v.default.SCENE2D)&&this.geometry&&(this.geometryInstance=new d.default({geometry:this.geometry,modelMatrix:i!==v.default.SCENE3D?f.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id,attributes:this.getAttributes()}),this.primitive=new g.default({geometryInstances:this.geometryInstance,appearance:this.getAppearance(),asynchronous:!1,show:this.show}))},t.prototype.getAttributes=function(){return this.material instanceof s.default?{color:l.default.fromColor(this.material)}:void 0},t.prototype.getAppearance=function(){return this.material instanceof s.default?new _.default({flat:!0}):new m.default({material:this.material,faceForward:!1,closed:!0})},t.prototype.updateMatrix=function(e){f.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),this.processWorldMatrix(e);var t=this.getViewer();if(this.primitive){if((null==t?void 0:t.sceneMode)===v.default.SCENE3D)this.primitive.modelMatrix=this.worldMatrix;else if((null==t?void 0:t.sceneMode)===v.default.COLUMBUS_VIEW){var i=this.getLODSceneLayer().models;this.primitive.ready&&(i.remove(this.primitive),this.createPrimitive(e),this.addPrimitive())}}else this.afterAdded(this.parent)},t.prototype.processWorldMatrix=function(e){switch(this.geometryPointingAxis){case b.GeometryPointingAxis.POSITIVE_Z:h.default.fromRotationX(Math.PI,M),f.default.fromRotationTranslation(M,o.default.ZERO,S),f.default.multiply(S,this.worldMatrix,this.worldMatrix)}switch(this.rotationFrame){case I.default.GLOBAL:f.default.fromTranslation(f.default.getTranslation(e,C),S),f.default.multiply(S,this.worldMatrix,this.worldMatrix);break;case I.default.LOCAL:f.default.multiply(e,this.worldMatrix,this.worldMatrix);break;case I.default.ENU:f.default.getTranslation(e,C),L.default.eastNorthUpToFixedFrame(C,void 0,S),f.default.multiply(S,this.worldMatrix,this.worldMatrix)}},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show){var n=this.getViewer();n&&this.parent&&(this.updateMatrix(i),n.sceneMode===v.default.SCENE2D&&this.updateGeometry(i))}},t.prototype.updateGeometry=function(e){var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i),this.createPrimitive(e),this.updateMatrix(e),this.addPrimitive()}},t.prototype.addPrimitive=function(){var e=this.getLODSceneLayer();return e instanceof y.default&&(!(!this._shouldUpdateIn2D&&e.parent.sceneMode===v.default.SCENE2D)&&(this.primitive&&e.models.add(this.primitive),!0))},t.prototype.removePrimitive=function(e){this.primitive&&e.remove(this.primitive)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i)}},t}(w.default);t.default=N},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(53),u=i(15),d=i(43),c=i(5),f=i(6),h=i(12),p=i(85),m=i(117),_=i(61),g=i(64),v=i(13),y=i(279),b=i(321),w=i(280),O=i(46),x=i(28),A=i(11),T=i(35),E=i(17),C=new o.default,S=new f.default,M=new h.default,D=i(249),P=i(1182),I=i(323),L=i(52),j=i(124),R=i(198),N={material:s.default.CYAN,minElevationAngle:Math.PI/4,maxElevationAngle:5*Math.PI/12,horizontalHalfAngle:Math.PI/4,verticalHalfAngle:Math.PI/6,length:1e5,beamRotation:[0,0,0],shouldUpdateIn2D:!0},B=function(e){function t(t){var i=e.call(this,r(r({},N),t))||this;i.offsetMatrix=f.default.IDENTITY.clone(),i.worldMatrix=f.default.IDENTITY.clone(),i._shouldUpdateIn2D=!0,i._horizontalHalfAngle=c.default.toRadians(45),i._verticalHalfAngle=c.default.toRadians(45),i._length=1e3,i.geometryPointingAxis=b.GeometryPointingAxis.NEGATIVE_Z,i.rotationFrame=I.default.LOCAL,i._beamRotation=[0,0,0],i.noneResult=!1;var n=r(r({},N),t);i._minElevationAngle=n.minElevationAngle,i._maxElevationAngle=n.maxElevationAngle,i._horizontalHalfAngle=n.horizontalHalfAngle,i._verticalHalfAngle=n.verticalHalfAngle,i._length=n.length,i._beamRotation=n.beamRotation,i.material=n.material;h.default.fromRotationX(-0);return i.offsetMatrix=f.default.fromTranslation(new o.default(0,0,-i.length/2),new f.default),i}return a(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.primitive&&(this.primitive.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"beamRotation",{get:function(){return this._beamRotation},set:function(e){if(this._beamRotation!==e){this._beamRotation=e;var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i)}if(this.geometry=null,this.parent){var n=new o.default;f.default.getTranslation(this.parent.matrix,n),this.createGeometry(n),this.createPrimitive(this.parent.matrixVelocity),this.updateMatrix(this.parent.matrixVelocity),this.addPrimitive()}}},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(e){var t;if(!this.isAdded&&(this.parent=e,this.enabled&&(this.show=e.show),e.parent)){var i=new o.default;f.default.getTranslation(e.matrix,i),o.default.magnitude(i)>0&&(this.createGeometry(i),this.createPrimitive(e.matrixVelocity),this.updateMatrix(e.matrixVelocity),this.isAdded=this.addPrimitive(),(null===(t=this.primitive)||void 0===t?void 0:t.entityId)&&(this.primitive.entityId=this.id))}},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(e===v.default.SCENE2D?this.primitive&&(this.primitive.show=!1):this.primitive&&(this.primitive.show=this.show),this.updateGeometry(this.parent.matrix))},t.prototype.createGeometry=function(e){var t=o.default.magnitude(e),i=new o.default(t,0,0),n=Math.asin(6378137/t),a=6378137*Math.sin(n),r=new o.default(a,0,0),s=(new o.default(0,0,1),new o.default(Math.tan(this._minElevationAngle),0,1)),l=new o.default(Math.tan(this._maxElevationAngle),0,1);o.default.normalize(s,s),o.default.normalize(l,l);var d=new p.default(r,s),c=new p.default(r,l),h=j.default.rayEllipsoid(d,u.default.WGS84),m=j.default.rayEllipsoid(c,u.default.WGS84),_=new o.default,g=new o.default;p.default.getPoint(d,h.stop,_),p.default.getPoint(c,m.stop,g);var v=i.x-_.x,y=i.x-g.x,b=Math.atan2(_.z,v),w=Math.atan2(g.z,y),C=(_.z,g.z,o.default.distance(i,_));C=i.x-_.x;var S={radius:11*Math.tan(w),height:11,radialSegments:64},M={radius:10*Math.tan(b),height:10,radialSegments:64},I=new D.ConeGeometry(S.radius,S.height,S.radialSegments);I.translate(0,.5*-S.height,0);var L=new D.MeshNormalMaterial,N=new D.Mesh(I,L),B=new D.ConeGeometry(M.radius,M.height,M.radialSegments);B.translate(0,.5*-M.height,0);var F=new D.Mesh(B,L),k=1.41421356237,z=10/Math.cos(b),U=z*Math.tan(this._horizontalHalfAngle)*k,V=z*Math.tan(this._verticalHalfAngle)*k,H=U/V,G={radius:V,height:z,radialSegments:4},Y=new D.ConeGeometry(G.radius,G.height,G.radialSegments);Y.translate(0,.5*-G.height,0),Y.rotateY(Math.PI/4),Y.scale(1,1,H);var W=R.default.fromQuaternion(this.parent.relativeRotation,new R.default);Y.rotateX(this.beamRotation[0]+W.roll),Y.rotateY(this.beamRotation[2]+W.heading),Y.rotateZ(this.beamRotation[1]-W.pitch);var q=new D.Mesh(Y,L),X=q.clone();N.updateMatrix(),F.updateMatrix(),q.updateMatrix(),X.updateMatrix();var K=P.CSG.union(q,X),J=P.CSG.subtract(K,N),Z=P.CSG.intersect(J,F),Q=Math.min(C,this.length);this._length=Q,this.offsetMatrix=f.default.fromTranslation(new o.default(0,0,-this.length/2),new f.default),Z.geometry.scale(Q/10,Q/10,Q/10),Z.geometry.translate(0,.5*-this._length,0),Z.geometry.rotateX(-Math.PI/2),Z.updateMatrix();var $=Z.geometry.attributes.position.array,ee=Z.geometry.attributes.uv.array,te=Z.geometry.attributes.normal.array;Z.geometry.index&&Z.geometry.index.array.length>0?(this.noneResult=!1,this.geometry=new O.default({attributes:{position:new x.default({componentDatatype:A.default.DOUBLE,componentsPerAttribute:3,values:$}),normal:new x.default({componentDatatype:A.default.FLOAT,componentsPerAttribute:3,values:te}),st:new x.default({componentDatatype:A.default.FLOAT,componentsPerAttribute:2,values:ee})},indices:Z.geometry.index.array,primitiveType:T.default.TRIANGLES,boundingSphere:E.default.fromVertices($)})):this.noneResult=!0},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=v.default.SCENE3D;t&&(i=t.sceneMode),f.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),(this._shouldUpdateIn2D||i!==v.default.SCENE2D)&&this.geometry&&(this.geometryInstance=new d.default({geometry:this.geometry,modelMatrix:i!==v.default.SCENE3D?f.default.multiply(e,this.worldMatrix,this.worldMatrix):void 0,id:this.id,attributes:this.getAttributes()}),this.primitive=new g.default({geometryInstances:this.geometryInstance,appearance:this.getAppearance(),asynchronous:!1,show:this.show}),console.log("生成得primitive",this.primitive))},t.prototype.getAttributes=function(){return this.material instanceof s.default?{color:l.default.fromColor(this.material)}:void 0},t.prototype.getAppearance=function(){return this.material instanceof s.default?new _.default({flat:!0}):new m.default({material:this.material,faceForward:!1,closed:!0})},Object.defineProperty(t.prototype,"material",{get:function(){return this._material},set:function(e){if(this._material=e,this.primitive&&e instanceof s.default){var t=this.primitive.getGeometryInstanceAttributes(this.id);t.color=l.default.toValue(e,t.color)}},enumerable:!1,configurable:!0}),t.prototype.updateMatrix=function(e){f.default.multiply(this.matrix,this.offsetMatrix,this.worldMatrix),this.processWorldMatrix(e);var t=this.getViewer();if(this.primitive){if((null==t?void 0:t.sceneMode)===v.default.SCENE3D)this.primitive.modelMatrix=this.worldMatrix;else if((null==t?void 0:t.sceneMode)===v.default.COLUMBUS_VIEW){var i=this.getLODSceneLayer().models;this.primitive.ready&&(i.remove(this.primitive),this.createPrimitive(e),this.addPrimitive())}}else this.noneResult||this.afterAdded(this.parent)},t.prototype.processWorldMatrix=function(e){switch(this.geometryPointingAxis){case b.GeometryPointingAxis.POSITIVE_Z:h.default.fromRotationX(Math.PI,M),f.default.fromRotationTranslation(M,o.default.ZERO,S),f.default.multiply(S,this.worldMatrix,this.worldMatrix)}switch(this.rotationFrame){case I.default.GLOBAL:f.default.fromTranslation(f.default.getTranslation(e,C),S),f.default.multiply(S,this.worldMatrix,this.worldMatrix);break;case I.default.LOCAL:f.default.multiply(e,this.worldMatrix,this.worldMatrix);break;case I.default.ENU:f.default.getTranslation(e,C),L.default.eastNorthUpToFixedFrame(C,void 0,S),f.default.multiply(S,this.worldMatrix,this.worldMatrix)}},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show){var n=this.getViewer();n&&this.parent&&(this.updateMatrix(this.parent.matrixVelocity),n.sceneMode===v.default.SCENE2D&&this.updateGeometry(this.parent.matrixVelocity))}},t.prototype.updateGeometry=function(e){var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i),this.createPrimitive(e),this.updateMatrix(e),this.addPrimitive()}},t.prototype.addPrimitive=function(){var e=this.getLODSceneLayer();return e instanceof y.default&&(!(!this._shouldUpdateIn2D&&e.parent.sceneMode===v.default.SCENE2D)&&(this.primitive&&e.models.add(this.primitive),!0))},t.prototype.removePrimitive=function(e){this.primitive&&(e.remove(this.primitive),this.primitive=null)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i)}},t}(w.default);t.default=B},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,baseColor:o.default.CYAN.withAlpha(.1),thickness:.1,speed:1,circular:!1},u=function(e){function t(t){void 0===t&&(t=l);var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"Wave",uniforms:n,source:"\n uniform vec4 color;\n uniform vec4 baseColor;\n uniform float thickness;\n uniform float speed;\n uniform bool circular;\n \n \n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n float sp = thickness / 2.0;\n vec2 st = materialInput.st;\n float dis = circular ? distance(st, vec2(0.5)) : distance(st.s, 0.5);\n float test = mod(czm_frameNumber*speed * 0.001, 1.0);\n float offset = mod(-1.0*0.001*speed*czm_frameNumber,1.0);\n // float m = mod(dis + offset, 1.0);\n float isReverse = step(0.5, test);\n float m = isReverse > 0.5 ? mod(dis - offset, 1.0) : mod(dis + offset, 1.0);\n float a = step(sp, m);\n material.diffuse = a>0.5?color.rgb:baseColor.rgb;\n material.alpha = a>0.5?color.a:baseColor.a;\n \n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._baseColor=n.baseColor,i._thickness=n.thickness,i._speed=n.speed,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseColor",{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this.uniforms.baseColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this._thickness},set:function(e){this._thickness=e,this.uniforms.thickness=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(22),s=i(7),l=i(53),u=i(43),d=i(12),c=i(6),f=i(185),h=i(69),p=i(143),m=i(156),_=i(64),g=i(151),v=i(2),y=i(302),b=i(206),w=i(322),O=i(61),x=i(117),A=i(21),T=i(389),E=(new d.default,new r.default,new o.default,function(e){function t(t){var i=e.call(this,t)||this;i._asynchronous=!0,i._showOutline=!1,i._positions=t.positions,i._material=t.material,i._outlineMaterial=t.outlineMaterial,i._outlineWidth=v.default(t.outlineWidth,1),i._asynchronous=v.default(t.asynchronous,!1),i._showOutline=v.default(t.showOutline,!1),i._height=v.default(t.height,0),i._enableDepthTest=v.default(t.enableDepthTest,!0);var n=A.default.fromCartesianArray(t.positions),a=new o.default;return A.default.center(n,a),i._center=o.default.toCartesian(a),i.matrix=c.default.fromTranslation(i._center,i.matrix),i.createPrimitive(i._positions,i._height,i._material,i._showOutline,i._outlineMaterial,i._outlineWidth),t.htmlLabelConfig&&t.htmlLabelConfig.length>0&&(i._htmlLabel=[],t.htmlLabelConfig.forEach((function(e){var t=new T.default(e);i._htmlLabel.push(t),i.add(t)}))),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polygon&&(this.polygon.show=e),this.polygonOutline&&(this.polygonOutline.show=e),this._htmlLabel&&(e?this._htmlLabel.forEach((function(e){e.visibleFollowParent&&(e.show=!0)})):this._htmlLabel.forEach((function(e){e.show=!1})))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlLabel",{get:function(){return this._htmlLabel},set:function(e){var t=this;this._htmlLabel&&this._htmlLabel.length>0&&this._htmlLabel.forEach((function(e){e.destroy()})),this._htmlLabel=e,e.forEach((function(e){t.add(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"center",{get:function(){return this._center},set:function(e){this._center=e,this.matrix=c.default.fromTranslation(this._center,this.matrix)},enumerable:!1,configurable:!0}),t.prototype.appendHtmlLabel=function(e){this._htmlLabel.push(e),this.add(e)},t.prototype.createPrimitive=function(e,t,i,n,a,r){void 0===t&&(t=0),void 0===i&&(i=s.default.YELLOW),void 0===n&&(n=!1),void 0===a&&(a=s.default.YELLOW),void 0===r&&(r=1);var o=new u.default({geometry:new y.default({polygonHierarchy:new b.default(e),height:t,vertexFormat:w.default.VERTEX_FORMAT}),attributes:a instanceof s.default?{color:l.default.fromColor(a)}:void 0});if(this.polygon=new _.default({geometryInstances:o,asynchronous:this._asynchronous,appearance:this.getAppearance(i),show:this.enabled&&this._show}),this.polygon.entityId=this.id,n){var d=new u.default({geometry:new f.default({positions:e,width:r,vertexFormat:a instanceof h.default?m.default.VERTEX_FORMAT:p.default.VERTEX_FORMAT}),attributes:a instanceof s.default?{color:l.default.fromColor(a)}:void 0});this.polygonOutline=new _.default({geometryInstances:d,asynchronous:this._asynchronous,appearance:this.getLineAppearance(i,!1),show:this.enabled&&this._show}),this.polygonOutline.entityId=this.id}this.readyPromise=null,this.readyPromise=n?Promise.all([this.polygon.readyPromise,this.polygonOutline.readyPromise]):this.polygon.readyPromise},t.prototype.getLineAppearance=function(e,t){return void 0===t&&(t=!1),e instanceof h.default?new m.default({material:e,translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}}):new p.default({translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}})},t.prototype.getAppearance=function(e){return e instanceof s.default?new O.default({flat:!0,translucent:!0,renderState:{depthTest:{enabled:this._enableDepthTest}}}):new x.default({material:e,translucent:!0,faceForward:!1,closed:!0,renderState:{depthTest:{enabled:this._enableDepthTest}}})},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);var i=this.getLODSceneLayer();i&&(this._polylines=i.polylines,this._polygones=i.polygons),this.polygon&&this._polygones&&this._polygones.add(this.polygon),this.polygonOutline&&this._polylines&&this._polylines.add(this.polygonOutline),this.show=t.show&&this.show,this.isAdded=!0},t.prototype.updateForward=function(t,i){var n=this;e.prototype.updateForward.call(this,t,i),this.children.values.forEach((function(e){e.updateForward(t,n.matrix)}))},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polygones&&this.polygon&&this._polygones.remove(this.polygon),this._polylines&&this.polygonOutline&&this._polylines.remove(this.polygonOutline)},t.prototype.afterSwitchMode=function(e){},t}(g.default));t.default=E},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),a=i(0),r=i(14),o=i(47),s=i(99),l=i(2),u=function(){function e(e,t,i,r){var l=this;this.interval=new o.default,e.forEach((function(e){var i=e.id;a.default(i)||(i=s.default()),e.type=e.type?e.type:"rectangle",e.color=e.color?e.color:new n.default(.5,.5,.5,1),e.borderColor=e.borderColor?e.borderColor:e.color,e.imageId=e.imageId?e.imageId:"cesium-track-image",e.pointSize=e.pointSize?e.pointSize:Math.max(1,Math.floor(t/4));var r=Math.max(1,Math.floor(7*t/8));e.imageSize?e.imageSize=Array.isArray(e.imageSize)?e.imageSize:[e.imageSize,e.imageSize]:e.imageSize=[r,r],!e.padding&&0!==e.padding&&t>5&&(e.padding=2),e.descriptionOffset=e.descriptionOffset?e.descriptionOffset:[0,0],e.borderWidth=e.borderWidth?e.borderWidth:0,l.interval.set(e.id,e)})),a.default(r)||(r=s.default()),this.id=r,this.height=t,this.backgroundColor=i||new n.default(0,0,0,0);var u=document.createElement("canvas");u.width=256,u.height=1,this.colorCanvas=u}return e.prototype._calculatePadding=function(e){return this.height>2*e?e:0},e.prototype._calculateBorder=function(e,t){return this.height-2*e>2*t?t:0},e.prototype.render=function(e,t){var i=this;e.fillStyle=this.backgroundColor.toCssColorString(),e.fillRect(0,t.y,t.timeBarWidth,this.height),this.interval.values.forEach((function(n){var o,s,u=null===(o=n.interval)||void 0===o?void 0:o.start,d=null===(s=n.interval)||void 0===s?void 0:s.stop,c=i._calculatePadding(n.padding),f=i._calculateBorder(c,n.borderWidth),h=t.startJulian,p=r.default.addSeconds(t.startJulian,t.duration,new r.default);switch(e.strokeStyle=n.borderColor.toCssColorString(),e.lineWidth=f,e.fillStyle=n.color.toCssColorString(),n.type){case"rectangle":if(r.default.lessThan(u,h)&&r.default.greaterThan(d,p)){var m=t.timeBarWidth/2,_=t.y+Math.floor(i.height/2);"start"===n.textStartPosition?m=0:"end"===n.textStartPosition&&(m=t.timeBarWidth),f>0?(e.strokeRect(f/2,t.y+c+f/2,t.timeBarWidth-f,i.height-2*c-f),e.fillRect(f,t.y+c+f,t.timeBarWidth-2*f,i.height-2*c-2*f)):e.fillRect(0,t.y+c,t.timeBarWidth,i.height-2*c);var g=n.textFont?n.textFont:"14px serif";n.textColor&&(e.fillStyle=n.textColor);var v=n.textAlign?n.textAlign:"center";e.font=g,e.textAlign=v,e.textBaseline=n.textBaseline?n.textBaseline:"middle",n.textContent&&e.fillText(n.textContent,m,_)}else if(r.default.lessThanOrEquals(u,p)&&r.default.greaterThanOrEquals(d,h)){var y,b=void 0,w=void 0;for(b=0;b<t.timeBarWidth;++b){var O=r.default.addSeconds(t.startJulian,b/t.timeBarWidth*t.duration,new r.default);!a.default(w)&&r.default.greaterThanOrEquals(O,u)?w=b:!a.default(y)&&r.default.greaterThanOrEquals(O,d)&&(y=b)}if(a.default(w)){a.default(y)||(y=t.timeBarWidth);m=w+Math.ceil((y-w)/2),_=t.y+Math.floor(i.height/2);"start"===n.textStartPosition?m=w:"end"===n.textStartPosition&&(m=y),f>0?(e.strokeRect(w+f/2,t.y+c+f/2,Math.max(y-w-f,1),i.height-2*c-f),e.fillRect(w+f,t.y+c+f,Math.max(y-w-2*f,1),i.height-2*c-2*f)):e.fillRect(w,t.y+c,Math.max(y-w,1),i.height-2*c);var x=n.textFont?n.textFont:"14px serif";n.textColor&&(e.fillStyle=n.textColor);var A=n.textAlign?n.textAlign:"center";e.font=x,e.textAlign=A,e.textBaseline=n.textBaseline?n.textBaseline:"middle",n.textContent&&e.fillText(n.textContent,m,_)}}break;case"point":if(r.default.lessThanOrEquals(u,p)&&r.default.greaterThanOrEquals(u,h)){var T=r.default.secondsDifference(u,t.startJulian),E=Math.ceil(T/t.duration*t.timeBarWidth),C=Math.min(n.pointSize,Math.floor(i.height/4));e.beginPath(),f>0?(e.arc(E,t.y+Math.floor(i.height/2),C,0,2*Math.PI),e.closePath(),e.fill(),e.stroke()):(e.arc(E,t.y+Math.floor(i.height/2),C,0,2*Math.PI),e.closePath(),e.fill())}break;case"image":if(r.default.lessThanOrEquals(u,p)&&r.default.greaterThanOrEquals(u,h)){var S=void 0;S=n.imageUrl?n.imageUrl:document.getElementById(n.imageId);var M=r.default.secondsDifference(u,t.startJulian),D=Math.ceil(M/t.duration*t.timeBarWidth),P=Math.min(n.imageSize[0],Math.floor(7*i.height/8)),I=Math.min(n.imageSize[1],Math.floor(7*i.height/8)),L=Math.floor(P/2),j=Math.floor(I/2),R=i;n.realImageSize=P;var N=t.y;e.drawImage(S,D-L,N+Math.floor(R.height/2)-j,P,I)}break;case"text":var B=r.default.secondsDifference(u,t.startJulian),F=Math.ceil(B/t.duration*t.timeBarWidth),k=n.textFont?n.textFont:"14px serif";n.textColor&&(e.fillStyle=n.textColor);var z=n.textAlign?n.textAlign:"start";e.font=k,e.textAlign=z,e.textBaseline=n.textBaseline?n.textBaseline:"middle";var U=t.y+Math.floor(i.height/2);n.textContent&&e.fillText(n.textContent,F,U);break;case"line":var V=0,H=1;a.default(n.min)?V=n.min:n.data.forEach((function(e){V=Math.min(e[1],V)})),a.default(n.max)?H=n.max:n.data.forEach((function(e){H=Math.max(e[1],H)}));var G=[];n.data.forEach((function(e){var t=r.default.fromDate(new Date(e[0]));r.default.greaterThanOrEquals(t,h)&&r.default.lessThanOrEquals(t,p)&&G.push([t,e[1]])}));var Y=H-V,W=l.default(n.lineWidth,1);if(G.length>1&&Y>0){var q,X,K,J=[],Z=i.height-2*c,Q=(t.y,t.y+c),$=t.y+i.height-c;G.forEach((function(e,i){K=r.default.secondsDifference(e[0],t.startJulian),q=Math.ceil(K/t.duration*t.timeBarWidth),X=$-Math.round(Z*(e[1]-V)/Y),X=Math.max(X,Q),X=Math.min(X,$),J=J.concat([q,X])}));var ee=0,te=J.length/2;e.beginPath();var ie=n.lineColor&&Array.isArray(n.lineColor)&&n.lineColor.length>1;!ie&&n.lineColor&&(Array.isArray(n.lineColor)&&n.lineColor.length?n.lineColor[0]:n.lineColor);for(var ne=l.default(n.smooth,.7),ae=function(){var t=i.drawSegment(e,J,ee,te,te,1,ne,"x",!1);if(ee+=t+1,ie){var a=i.colorCanvas.getContext("2d");a.clearRect(0,0,256,1);var r=a.createLinearGradient(0,0,256,0),o=n.lineColor.length-1;n.lineColor.forEach((function(e,t){r.addColorStop(t/o,e)})),a.fillStyle=r,a.fillRect(0,0,256,1);var s=a.getImageData(0,0,256,1).data,u=J.length,d=e.createLinearGradient(J[0],0,J[u-2],0),c=G.length-1;G.forEach((function(e,t){var i=Math.min(Math.max((e[1]-V)/Y,0),1),n=4*Math.floor(255*i),a="rgb("+s[n]+", "+s[n+1]+", "+s[n+2]+")";d.addColorStop(t/c,a)})),e.strokeStyle=d,e.lineWidth=W}else e.strokeStyle=l.default(n.lineColor,"#fff"),e.lineWidth=W;e.stroke(),e.closePath()};ee<te;)ae()}}}))},e.prototype.add=function(e){var t=this;e.forEach((function(e){var i=e.id;a.default(i)||(i=s.default()),e.type=e.type?e.type:"rectangle",e.color=e.color?e.color:new n.default(.5,.5,.5,1),e.borderColor=e.borderColor?e.borderColor:e.color,e.pointSize=e.pointSize?e.pointSize:Math.max(1,Math.floor(t.height/4));var r=Math.max(1,Math.floor(7*t.height/8));e.imageSize?e.imageSize=Array.isArray(e.imageSize)?e.imageSize:[e.imageSize,e.imageSize]:e.imageSize=[r,r],e.imageId=e.imageId?e.imageId:"cesium-track-image",!e.padding&&0!==e.padding&&t.height>5&&(e.padding=1),e.borderWidth=e.borderWidth?e.borderWidth:0,t.interval.set(e.id,e)}))},e.prototype.remove=function(e){"string"==typeof e||"number"==typeof e?this.interval.remove(e):this.interval.remove(e.id)},e.prototype.removeAll=function(){this.interval.removeAll()},e.prototype.drawSegment=function(e,t,i,n,a,r,o,s,l){for(var u,d,c,f,h,p,m=i,_=0;_<n;_++){var g=t[2*m],v=t[2*m+1];if(m>=a||m<0)break;if(this.isPointNull(g,v)){if(l){m+=r;continue}break}if(m===i)e[r>0?"moveTo":"lineTo"](g,v),c=g,f=v;else{var y=g-u,b=v-d;if(y*y+b*b<.5){m+=r;continue}if(o>0){for(var w=m+r,O=t[2*w],x=t[2*w+1];O===g&&x===v&&_<n;)_++,m+=r,O=t[2*(w+=r)],x=t[2*w+1],y=(g=t[2*m])-u,b=(v=t[2*m+1])-d;var A=_+1;if(l)for(;this.isPointNull(O,x)&&A<n;)A++,O=t[2*(w+=r)],x=t[2*w+1];var T=.5,E=0,C=0,S=void 0,M=void 0;if(A>=n||this.isPointNull(O,x))h=g,p=v;else{E=O-u,C=x-d;var D=g-u,P=O-g,I=v-d,L=x-v,j=void 0,R=void 0;if("x"===s){var N=E>0?1:-1;h=g-N*(j=Math.abs(D))*o,p=v,S=g+N*(R=Math.abs(P))*o,M=v}else if("y"===s){var B=C>0?1:-1;h=g,p=v-B*(j=Math.abs(I))*o,S=g,M=v+B*(R=Math.abs(L))*o}else j=Math.sqrt(D*D+I*I),h=g-E*o*(1-(T=(R=Math.sqrt(P*P+L*L))/(R+j))),p=v-C*o*(1-T),S=g+E*o*T,M=v+C*o*T,S=Math.min(S,Math.max(O,g)),M=Math.min(M,Math.max(x,v)),h=g-(E=(S=Math.max(S,Math.min(O,g)))-g)*j/R,p=v-(C=(M=Math.max(M,Math.min(x,v)))-v)*j/R,h=Math.min(h,Math.max(u,g)),p=Math.min(p,Math.max(d,v)),S=g+(E=g-(h=Math.max(h,Math.min(u,g))))*R/j,M=v+(C=v-(p=Math.max(p,Math.min(d,v))))*R/j}e.bezierCurveTo(c,f,h,p,g,v),c=S,f=M}else e.lineTo(g,v)}u=g,d=v,m+=r}return _},e.prototype.isPointNull=function(e,t){return isNaN(e)||isNaN(t)},e}();t.default=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(2),a=i(14),r=i(0),o=i(99);function s(e,t,i){return(e-t)/i}var l=function(){function e(e,t,i,a,s,l){this._start=e,this._stop=t,this._color=i,this._height=a,this._base=n.default(s,0),r.default(l)||(l=o.default()),this.id=l}return e.prototype.getHeight=function(){return this._height},e.prototype.getBase=function(){return this._base},e.prototype.getStartTime=function(){return this._start},e.prototype.getStopTime=function(){return this._stop},e.prototype.setRange=function(e,t){this._start=e,this._stop=t},e.prototype.render=function(e){var t="";if(this._start&&this._stop&&this._color){var i=a.default.secondsDifference(this._start,e.epochJulian),n=Math.round(e.timeBarWidth*s(i,e.startTime,e.duration)),r=a.default.secondsDifference(this._stop,e.epochJulian),o=Math.round(e.timeBarWidth*s(r,e.startTime,e.duration))-n;n<0&&(o+=n,n=0),n+o>e.timeBarWidth&&(o=e.timeBarWidth-n);var l=this._color.toCssColorString();o>0&&(t='<span class="cesium-timeline-highlight" style="left: '+n.toString()+"px; width: "+o.toString()+"px; bottom: "+this._base.toString()+"px; height: "+this._height+"px; background-color: "+l+';"></span>')}return t},e}();t.default=l},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.UTC=0]="UTC",e[e.LOCALE=1]="LOCALE"}(n||(n={})),t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),a=i(2),r=i(108),o=i(26),s=i(104),l=i(36),u=i(67),d=i(39),c=i(44),f=i(140),h=i(74),p=i(0),m=i(19),_=function(){function e(e){this.ready=!1,this.geometry=e.geometry,this.uniformMap=e.uniformMap,this.modelMatrix=e.modelMatrix,this.backVertexShader="precision highp float;\nattribute vec3 position;\nuniform vec3 u_dimensions;\nvarying vec3 v_pos;\n \nvoid main(){\n v_pos = position / u_dimensions + vec3(0.5);\n gl_Position = czm_modelViewProjection * vec4(position,1.0);\n}",this.backFragmentShader="precision highp float;\nvarying vec3 v_pos;\nvoid main(){\n gl_FragColor = vec4(v_pos,1.0); //move it to [0,1]\n}",this.frontVertexShader="precision highp float;\nuniform vec3 u_dimensions;\nattribute vec3 position;\nvarying vec3 v_pos;\nvarying vec4 v_prjPos;\nvoid main(){\n v_pos=position / u_dimensions + vec3(0.5);\n v_prjPos=czm_modelViewProjection * vec4(position,1.0);\n gl_Position = v_prjPos;\n}",this.frontFragmentShader="precision highp float;\nuniform sampler2D u_volumeTexture;\nuniform sampler2D u_colorTexture;\nuniform sampler2D u_backTexture;\nuniform float steps;\nuniform float alphaCorrection;\nuniform float u_slices;\nvarying vec3 v_pos;\nvarying vec4 v_prjPos;\nuniform bool u_decoded;\n\nfloat decodeValue(vec3 cv) {\n return (cv.r + cv.g + cv.b) / 3.0;\n}\n\nvec2 islices = vec2(1.0 / u_slices, 1.0 / u_slices);\n\nconst int MAX_STEPS = 887;\nvec4 texture3Dfrom2D(vec3 pos)\n{\n // vec2 islices = vec2(1.0 /GRID_NUMBER_X, 1.0 /GRID_NUMBER_Y);\n //Get z slice index and position between two slices\n float Z = pos.z * u_slices * u_slices;\n int slice = int(Z); //Index of first slice\n\n //X & Y coords of sample scaled to slice size\n vec2 sampleOffset = pos.xy * islices;\n sampleOffset.x = islices.x-sampleOffset.x;\n //Offsets in 2D texture of given slice indices\n //(add offsets to scaled position within slice to get sample positions)\n float A = float(slice) * islices.x;\n float B = float(slice+1) * islices.x;\n vec2 z1offset = vec2(fract(A), floor(A) / u_slices) + sampleOffset;\n vec2 z2offset = vec2(fract(B), floor(B) / u_slices) + sampleOffset;\n\n z1offset.x = 1.0 - z1offset.x;\n z2offset.x = 1.0 - z2offset.x;\n if(u_decoded){\n float z1 = decodeValue(texture2D(u_volumeTexture, z1offset).rgb);\n float z2 = decodeValue(texture2D(u_volumeTexture, z2offset).rgb);\n vec4 color1 = texture2D( u_colorTexture, vec2( z1, 1.0) );\n vec4 color2 = texture2D( u_colorTexture, vec2( z2, 1.0) );\n return mix(color1, color2, fract(Z));\n }\n float z1 = texture2D(u_volumeTexture, z1offset).r;\n float z2 = texture2D(u_volumeTexture, z2offset).r;\n vec4 color1 = texture2D( u_colorTexture, vec2( z1, 1.0) );\n vec4 color2 = texture2D( u_colorTexture, vec2( z2, 1.0) );\n return mix(color1, color2, fract(Z));\n}\nvec4 sampleAs3DTexture( vec3 texCoord )\n{\n vec4 colorSlice1, colorSlice2;\n vec2 texCoordSlice1, texCoordSlice2;\n\n //The z coordinate determines which Z slice we have to look for.\n //Z slice number goes from 0 to 255.\n float slices = u_slices * u_slices;\n float zSliceNumber1 = floor(texCoord.z * slices);\n\n //As we use trilinear we go the next Z slice.\n float zSliceNumber2 = min( zSliceNumber1 + 1.0, slices); //Clamp to 255\n\n //The Z slices are stored in a matrix of 16x16 of Z slices.\n //The original UV coordinates have to be rescaled by the tile numbers in each row and column.\n texCoord.xy /= u_slices;\n\n texCoordSlice1 = texCoordSlice2 = texCoord.xy;\n\n //Add an offset to the original UV coordinates depending on the row and column number.\n texCoordSlice1.x += (mod(zSliceNumber1, u_slices ) / u_slices);\n texCoordSlice1.y += floor((slices - zSliceNumber1) / u_slices) / u_slices;\n\n texCoordSlice2.x += (mod(zSliceNumber2, u_slices ) / u_slices);\n texCoordSlice2.y += floor((slices - zSliceNumber2) / u_slices) / u_slices;\n\n //Get the opacity value from the 2D texture.\n //Bilinear filtering is done at each texture2D by default.\n colorSlice1 = texture2D( u_volumeTexture, texCoordSlice1 );\n colorSlice2 = texture2D( u_volumeTexture, texCoordSlice2 );\n\n //Based on the opacity obtained earlier, get the RGB color in the transfer function texture.\n colorSlice1.rgb = texture2D( u_colorTexture, vec2( colorSlice1.a, 1.0) ).rgb;\n colorSlice2.rgb = texture2D( u_colorTexture, vec2( colorSlice2.a, 1.0) ).rgb;\n\n //How distant is zSlice1 to ZSlice2. Used to interpolate between one Z slice and the other.\n float zDifference = mod(texCoord.z * slices, 1.0);\n\n //Finally interpolate between the two intermediate colors of each Z slice.\n return mix(colorSlice1, colorSlice2, zDifference) ;\n}\nvoid main() {\n vec2 texc = vec2(((v_prjPos.x / v_prjPos.w) + 1.0 ) / 2.0, ((v_prjPos.y / v_prjPos.w) + 1.0 ) / 2.0 );\n vec3 backPos = texture2D(u_backTexture, texc).xyz;\n vec3 frontPos = v_pos;\n\n vec3 dir = backPos - frontPos;\n\n float rayLength = length(dir);\n\n //Calculate how long to increment in each step.\n float delta = 1.0 / steps;\n\n //The increment in each direction for each step.\n vec3 deltaDirection = normalize(dir) * delta;\n float deltaDirectionLength = length(deltaDirection);\n\n //Start the ray casting from the front position.\n vec3 currentPosition = frontPos;\n\n //The color accumulator.\n vec4 accumulatedColor = vec4(0.0);\n\n //The alpha value accumulated so far.\n float accumulatedAlpha = 0.0;\n\n //How long has the ray travelled so far.\n float accumulatedLength = 0.0;\n\n //If we have twice as many samples, we only need ~1/2 the alpha per sample.\n //Scaling by 256/10 just happens to give a good value for the alphaCorrection slider.\n float alphaScaleFactor = 25.6 * delta;\n\n vec4 colorSample;\n float alphaSample;\n\n //Perform the ray marching iterations\n for(int i = 0; i < MAX_STEPS; i++)\n {\n //Get the voxel intensity value from the 3D texture.\n colorSample = texture3Dfrom2D( currentPosition );\n\n //Allow the alpha correction customization.\n alphaSample = colorSample.a * alphaCorrection;\n\n //Applying this effect to both the color and alpha accumulation results in more realistic transparency.\n alphaSample *= (1.0 - accumulatedAlpha);\n\n //Scaling alpha by the number of steps makes the final color invariant to the step size.\n alphaSample *= alphaScaleFactor;\n\n //Perform the composition.\n accumulatedColor += colorSample * alphaSample;\n\n //Store the alpha accumulated so far.\n accumulatedAlpha += alphaSample;\n\n //Advance the ray.\n currentPosition += deltaDirection;\n accumulatedLength += deltaDirectionLength;\n\n //If the length traversed is more than the ray length, or if the alpha accumulated reaches 1.0 then exit.\n if(accumulatedLength >= rayLength || accumulatedAlpha >= 1.0 )\n break;\n }\n\n gl_FragColor = accumulatedColor;\n}",this.framebuffer=e.framebuffer,this.autoClear=a.default(e.autoClear,!1),this.show=!0,this.backCommand=void 0,this.frontCommand=void 0,this.clearCommand=void 0,this.autoClear&&(this.clearCommand=new r.default({color:new n.default(0,0,0,0),depth:1,framebuffer:this.framebuffer,pass:o.default.OPAQUE}))}return e.prototype.createCommand=function(e,t){var i,n,a=s.default.fromGeometry({context:e,geometry:this.geometry,bufferUsage:l.default.STATIC_DRAW});return t?(i=u.default.fromCache({context:e,vertexShaderSource:this.backVertexShader,fragmentShaderSource:this.backFragmentShader}),n=d.default.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:f.default.FRONT},depthMask:!1,blending:h.default.ALPHA_BLEND}),new c.default({owner:this,vertexArray:a,modelMatrix:this.modelMatrix,shaderProgram:i,framebuffer:this.framebuffer,renderState:n,pass:o.default.OPAQUE,uniformMap:this.uniformMap})):(i=u.default.fromCache({context:e,vertexShaderSource:this.frontVertexShader,fragmentShaderSource:this.frontFragmentShader}),n=d.default.fromCache({depthTest:{enabled:!0},cull:{enabled:!0,face:f.default.BACK},depthMask:!1,blending:h.default.ALPHA_BLEND}),new c.default({owner:this,vertexArray:a,uniformMap:this.uniformMap,modelMatrix:this.modelMatrix,shaderProgram:i,renderState:n,pass:o.default.OPAQUE}))},e.prototype.update=function(e){this.ready&&this.show&&(p.default(this.backCommand)||(this.backCommand=this.createCommand(e.context,!0)),p.default(this.frontCommand)||(this.frontCommand=this.createCommand(e.context,!1)),p.default(this.clearCommand)&&e.commandList.push(this.clearCommand),e.commandList.push(this.backCommand),e.commandList.push(this.frontCommand))},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){return p.default(this.backCommand)&&(this.backCommand.shaderProgram=this.backCommand.shaderProgram&&this.backCommand.shaderProgram.destroy()),p.default(this.frontCommand)&&(this.frontCommand.shaderProgram=this.frontCommand.shaderProgram&&this.frontCommand.shaderProgram.destroy()),m.default(this)},e}();t.default=_},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(151),s=i(7),l=i(6),u=i(43),d=i(13),c=i(64),f=i(1),h=i(22),p=i(53),m=i(61),_=i(117),g=i(279),v=i(52),y=i(347),b=i(12),w=i(27),O=i(230),x=i(258),A={center:f.default.fromDegrees(100,20),semiMajorAxis:100,semiMinorAxis:100,height:0,rotation:0,stRotation:0,fill:!0,material:s.default.WHITE,outline:!0,outlineColor:s.default.RED,outlineWidth:1,numberOfVerticalLines:64},T=function(e){function t(t){var i=e.call(this,r(r({},A),t))||this;return i.asynchronous=!0,i.matrix=l.default.IDENTITY.clone(),i.worldMatrix=l.default.IDENTITY.clone(),i.initMatrix=l.default.IDENTITY.clone(),i.optionsConfig=r(r({},A),t),i.ellipseInnerConfig={center:i.optionsConfig.center,semiMajorAxis:i.optionsConfig.semiMajorAxis,semiMinorAxis:i.optionsConfig.semiMinorAxis,height:i.optionsConfig.height,rotation:i.optionsConfig.rotation,stRotation:i.optionsConfig.stRotation,numberOfVerticalLines:i.optionsConfig.numberOfVerticalLines},i.ellipseLineConfig={center:i.optionsConfig.center,semiMajorAxis:i.optionsConfig.semiMajorAxis,semiMinorAxis:i.optionsConfig.semiMinorAxis,height:i.optionsConfig.height,rotation:i.optionsConfig.rotation,numberOfVerticalLines:i.optionsConfig.numberOfVerticalLines},i.material=i.optionsConfig.material,i.outlineMaterial=i.optionsConfig.outlineColor,i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e&&this.enabled,this.primitive&&(this.primitive.show=e&&this.enabled),this.outlinePrimitive&&(this.outlinePrimitive.show=e&&this.enabled)},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(e){var t=this;if(!this.isAdded){this.parent=e,this.children.values.forEach((function(e){e.isAdded||e.afterAdded(t)}));var i=this.optionsConfig.center.clone(),n=new l.default;if(e.position&&!e.position.equals(f.default.ZERO)){var a=h.default.fromCartesian(e.position);i=f.default.fromRadians(a.longitude,a.latitude),this.optionsConfig.center=i,this.ellipseInnerConfig.center=i,this.ellipseLineConfig.center=i}n=v.default.eastNorthUpToFixedFrame(i),l.default.inverse(n,this.initMatrix),this.createPrimitive(e.matrix),this.primitive&&(this.primitive.entityId=this.id),this.outlinePrimitive&&(this.outlinePrimitive.entityId=this.id),this.isAdded=this.addPrimitive()}},t.prototype.updateDepth=function(e){var t,i;(null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(e))?(this.primitive&&(this.primitive.show=this._show),this.outlinePrimitive&&(this.outlinePrimitive.show=this._show)):(this.primitive&&(this.primitive.show=!1),this.outlinePrimitive&&(this.outlinePrimitive.show=!1))},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show)if(this.children.values.forEach((function(e){e.updateForward(t,i)})),this.getViewer().sceneMode===d.default.SCENE3D){var n=new l.default,a=new l.default,r=new f.default,o=new b.default,s=new w.default;if(l.default.getTranslation(i,r),l.default.getMatrix3(i,o),s=w.default.fromRotationMatrix(o,s),r){var u=h.default.fromCartesian(r);if(!u)return;var c=f.default.fromRadians(u.longitude,u.latitude);l.default.fromTranslationQuaternionRotationScale(c,s,y.UNIT_SCALE,n),l.default.multiply(n,this.initMatrix,a),this.primitive&&(this.primitive.modelMatrix=a),this.outlinePrimitive&&(this.outlinePrimitive.modelMatrix=a),this.updateDepth(r)}}else this.updateGeometry(i)},t.prototype.updateGeometry=function(e){var t=this.getLODSceneLayer();if(t){var i=t.models;this.removePrimitive(i);var n=this.optionsConfig.center.clone(),a=new l.default;if(this.parent.position&&!this.parent.position.equals(f.default.ZERO)){var r=h.default.fromCartesian(this.parent.position);n=f.default.fromRadians(r.longitude,r.latitude),this.optionsConfig.center=n,this.ellipseInnerConfig.center=n,this.ellipseLineConfig.center=n}a=v.default.eastNorthUpToFixedFrame(n),l.default.inverse(a,this.initMatrix),this.createPrimitive(this.parent.matrix),this.addPrimitive()}},t.prototype.createPrimitive=function(e){var t=this.getViewer(),i=d.default.SCENE3D;t&&(i=t.sceneMode),this.optionsConfig.fill&&(this.geometry=new O.default(this.ellipseInnerConfig),this.geometryInstance=new u.default({geometry:this.geometry,id:this.id+"_volume",attributes:this.getAttributes()}),this.primitive=new c.default({asynchronous:i===d.default.SCENE3D,geometryInstances:this.geometryInstance,appearance:this.getAppearance(),show:this.show})),this.optionsConfig.outline&&(this.outlineGeometry=new x.default(this.ellipseLineConfig),this.outlineGeometryInstance=new u.default({geometry:this.outlineGeometry,id:this.id+"_outline",attributes:this.getOutlineAttributes()}),this.outlinePrimitive=new c.default({asynchronous:i===d.default.SCENE3D,geometryInstances:this.outlineGeometryInstance,appearance:new m.default({flat:!0,renderState:{depthTest:!1}}),show:this.show}))},t.prototype.addPrimitive=function(){var e=this.getLODSceneLayer();return e instanceof g.default&&(this.optionsConfig.fill&&(this.primitive.isDestroyed()||e.models.add(this.primitive)),this.optionsConfig.outline&&(this.outlinePrimitive.isDestroyed()||e.models.add(this.outlinePrimitive)),!0)},t.prototype.beforeSwitchMode=function(t){e.prototype.beforeSwitchMode.call(this,t);var i=this.getLODSceneLayer();i&&this.removePrimitive(i.models)},t.prototype.afterSwitchMode=function(t){e.prototype.afterSwitchMode.call(this,t),this.updateGeometry(this.parent.matrix)},t.prototype.removePrimitive=function(e){this.primitive&&e.remove(this.primitive),this.outlinePrimitive&&e.remove(this.outlinePrimitive)},t.prototype.getAttributes=function(){return this.material instanceof s.default?{color:p.default.fromColor(this.material)}:void 0},t.prototype.getAppearance=function(){return this.material instanceof s.default?new m.default({flat:!0,renderState:{depthTest:!1}}):new _.default({flat:!0,material:this.material,faceForward:!0,closed:!0})},t.prototype.getOutlineAttributes=function(){return{color:p.default.fromColor(this.outlineMaterial)}},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();if(t){var i=t.models;this.primitive&&i.remove(this.primitive),this.outlinePrimitive&&i.remove(this.outlinePrimitive)}},t}(o.default);t.default=T},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(151).default);t.default=r},function(e,t,i){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.PRECIPITABLE_WATER=0]="PRECIPITABLE_WATER",e[e.TEMPERATURE=1]="TEMPERATURE",e[e.PRESSURE=2]="PRESSURE",e[e.RELATIVE_HUMIDITY=3]="RELATIVE_HUMIDITY",e[e.TOTAL_CLOUD_COVER=4]="TOTAL_CLOUD_COVER",e[e.VISIBILITY=5]="VISIBILITY",e[e.WIND_SPEED=6]="WIND_SPEED",e[e.PRECIPITATION_RATE=7]="PRECIPITATION_RATE",e[e.DIRECTION=8]="DIRECTION",e[e.WIND_WAVES=9]="WIND_WAVES"}(n||(n={})),t.default=n},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,i){void 0===i&&(i=!0);var n=this,a=t;return(n=e.call(this,{fabric:{type:"Cover",uniforms:a,source:"\n uniform vec4 fillColor;\n uniform sampler2D imageFilter;\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 imageAlpha = texture2D(imageFilter,st);\n material.alpha = imageAlpha.r > 0.5 && imageAlpha.r < 1.0 ? 0.5 : 0.0;\n material.diffuse = fillColor.rgb;\n return material;\n}\n "},translucent:!0})||this)._fillColor=a.fillColor,n._imageFilter=a.imageFilter,n}return a(t,e),Object.defineProperty(t.prototype,"fillColor",{get:function(){return this._fillColor},set:function(e){this._fillColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageFilter",{get:function(){return this._imageFilter},set:function(e){this._imageFilter=e,this.uniforms.imageFilter=e},enumerable:!1,configurable:!0}),t}(i(69).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(t,i){void 0===i&&(i=!0);var n=this,a=t;return(n=e.call(this,{fabric:{type:"Filter",uniforms:a,source:"\n\nczm_material czm_getMaterial(czm_materialInput materialInput)\n{\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n vec4 imageAlpha = texture2D(imageFilter,st);\n vec4 imageColor = texture2D(imageSource,st);\n material.diffuse = imageColor.rgb;\n material.alpha = imageAlpha.a > 0.1 && imageAlpha.a < 1.0 ? imageColor.a : 0.0;\n return material;\n}\n "},translucent:!0})||this)._imageSource=a.imageSource,n._imageFilter=a.imageFilter,n}return a(t,e),Object.defineProperty(t.prototype,"imageSource",{get:function(){return this._imageSource},set:function(e){this._imageSource=e,this.uniforms.imageSource=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageFilter",{get:function(){return this._imageFilter},set:function(e){this._imageFilter=e,this.uniforms.imageFilter=e},enumerable:!1,configurable:!0}),t}(i(69).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(43),o=i(21),s=i(332),l=i(322),u=i(69),d=i(64),c=i(45),f=i(234),h=i(2),p=i(97),m=i(195),_=function(e){function t(t){var i=e.call(this)||this;return i._imageDirty=!1,i._heightDirty=!1,i._rectangle=t.rectangle||o.default.MAX_VALUE,i._height=t.height||0,i._ground=h.default(t.ground,!1),i._imageWidth=h.default(t.imageWidth,1),i._imageHeight=h.default(t.imageHeight,1),i._primitive=i.createPrimitive(),i.image=t.image,i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._primitive.show},set:function(e){this._primitive.show=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this._imageDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageWidth",{get:function(){return this._imageWidth},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imageHeight},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this._imageWidth=e,this._imageHeight=t,this._texture=new c.default({context:this.parent.cesiumViewer.scene.context,source:{width:this._imageWidth,height:this._imageHeight,arrayBufferView:new Uint8Array([0,0,0,0])}}),this._primitive.appearance.material.uniforms.image=this._texture},Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height!==e&&(this._height=e,this._heightDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),t.prototype.createGeometryInstance=function(){return new r.default({geometry:new s.default({rectangle:this._rectangle instanceof o.default?this._rectangle:o.default.fromDegrees.apply(o.default,this._rectangle),height:this.height,vertexFormat:l.default.VERTEX_FORMAT})})},t.prototype.createAppearance=function(){return new l.default({aboveGround:!1,material:new u.default({fabric:{type:"Image"}}),faceForward:!0,flat:!0})},t.prototype.createPrimitive=function(e){return void 0===e&&(e=!1),this.ground?new m.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:e,asynchronous:!0,classificationType:p.default.TERRAIN}):new d.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:e,asynchronous:!1})},t.prototype.afterAdded=function(e){this.parent=e,this._texture=new c.default({context:e.cesiumViewer.scene.context,source:{width:this._imageWidth,height:this._imageHeight,arrayBufferView:new Uint8Array([0,0,0,0])}}),this._primitive.appearance.material.uniforms.image=this._texture,e.primitives.add(this._primitive)},t.prototype.destroyForward=function(){this.parent.primitives.remove(this._primitive)},t.prototype.updateForward=function(e){var t=this;if(this.parent&&(this._imageDirty&&(this._image?(this._imageElement=null,this._imageElement=new Image,this._imageElement.crossOrigin="",this._imageElement.src=this._image,this._imageElement.onload=function(){t._primitive.show||(t._primitive.show=!0),t._texture.copyFrom({source:t._imageElement})}):this._primitive.show&&(this._primitive.show=!1),this._imageDirty=!1),this._heightDirty&&!this.ground)){var i=this.createPrimitive(!0);this.parent.primitives.add(i),this._primitive&&this.parent.primitives.remove(this._primitive),this._primitive=i,this._primitive.appearance.material.uniforms.image=this._texture,this._heightDirty=!1}},t.prototype.afterSwitchMode=function(e){},t.prototype.beforeSwitchMode=function(e){},t}(f.default);t.default=_},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(222),o=i(84),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){this._handler.destroy(),this._handler=null,document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp)},t.prototype.updateForward=function(e,t){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.afterAdded=function(e){this.parent=e,this._handler=new r.default(e.cesiumViewer.scene.canvas),this._handler.setInputAction(this.onMouseLeftDown.bind(this),o.default.LEFT_DOWN),this._handler.setInputAction(this.onMouseLeftUp.bind(this),o.default.LEFT_UP),this._handler.setInputAction(this.onMouseMove.bind(this),o.default.MOUSE_MOVE),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp)},t}(i(487).default);t.default=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.updateFunction=e,this.records=new Map}return e.prototype.record=function(e,t,i){var n=this.records.get(e);n||(n=new Map,this.records.set(e,n)),n.has(t)||n.set(t,i)},e.prototype.recover=function(){var e=this;this.records.forEach((function(t,i){t.forEach((function(t,n){e.updateFunction(i,n,t)}))}))},e.prototype.isEmpty=function(){return 0===this.records.size},e}();t.default=n},function(e,t,i){"use strict";i.r(t);var n=i(249);class a{constructor(e){this.top=0,this.array=new Float32Array(e)}write(e){this.array[this.top++]=e.x,this.array[this.top++]=e.y,this.array[this.top++]=e.z}}class r{constructor(e){this.top=0,this.array=new Float32Array(e)}write(e){this.array[this.top++]=e.x,this.array[this.top++]=e.y}}class o{constructor(e){this.plane=null,this.front=null,this.back=null,this.polygons=[],e&&this.build(e)}clone(){const e=new o;return e.plane=this.plane&&this.plane.clone(),e.front=this.front&&this.front.clone(),e.back=this.back&&this.back.clone(),e.polygons=this.polygons.map(e=>e.clone()),e}invert(){for(let e=0;e<this.polygons.length;e++)this.polygons[e].flip();this.plane&&this.plane.flip(),this.front&&this.front.invert(),this.back&&this.back.invert();const e=this.front;this.front=this.back,this.back=e}clipPolygons(e){if(!this.plane)return e.slice();let t=new Array,i=new Array;for(let n=0;n<e.length;n++)this.plane.splitPolygon(e[n],t,i,t,i);return this.front&&(t=this.front.clipPolygons(t)),i=this.back?this.back.clipPolygons(i):[],t.concat(i)}clipTo(e){this.polygons=e.clipPolygons(this.polygons),this.front&&this.front.clipTo(e),this.back&&this.back.clipTo(e)}allPolygons(){let e=this.polygons.slice();return this.front&&(e=e.concat(this.front.allPolygons())),this.back&&(e=e.concat(this.back.allPolygons())),e}build(e){if(!e.length)return;this.plane||(this.plane=e[0].plane.clone());const t=[],i=[];for(let n=0;n<e.length;n++)this.plane.splitPolygon(e[n],this.polygons,this.polygons,t,i);t.length&&(this.front||(this.front=new o),this.front.build(t)),i.length&&(this.back||(this.back=new o),this.back.build(i))}}class s{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.z=i}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}clone(){return new s(this.x,this.y,this.z)}negate(){return this.x*=-1,this.y*=-1,this.z*=-1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}times(e){return this.x*=e,this.y*=e,this.z*=e,this}dividedBy(e){return this.x/=e,this.y/=e,this.z/=e,this}lerp(e,t){return this.add((new s).copy(e).sub(this).times(t))}unit(){return this.dividedBy(this.length())}length(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2)+Math.pow(this.z,2))}normalize(){return this.unit()}cross(e){const t=this.clone(),i=t.x,n=t.y,a=t.z,r=e.x,o=e.y,s=e.z;return this.x=n*s-a*o,this.y=a*r-i*s,this.z=i*o-n*r,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}toVector3(){return new n.Vector3(this.x,this.y,this.z)}}class l{constructor(e,t){this.normal=e,this.w=t,this.normal=e,this.w=t}clone(){return new l(this.normal.clone(),this.w)}flip(){this.normal.negate(),this.w=-this.w}splitPolygon(e,t,i,n,a){let r=0;const o=[];for(let t=0;t<e.vertices.length;t++){const i=this.normal.dot(e.vertices[t].pos)-this.w,n=i<-l.EPSILON?2:i>l.EPSILON?1:0;r|=n,o.push(n)}switch(r){case 0:(this.normal.dot(e.plane.normal)>0?t:i).push(e);break;case 1:n.push(e);break;case 2:a.push(e);break;case 3:{const t=[],i=[];for(let n=0;n<e.vertices.length;n++){const a=(n+1)%e.vertices.length,r=o[n],l=o[a],u=e.vertices[n],d=e.vertices[a];if(2!=r&&t.push(u),1!=r&&i.push(2!=r?u.clone():u),3==(r|l)){const e=(this.w-this.normal.dot(u.pos))/this.normal.dot((new s).copy(d.pos).sub(u.pos)),n=u.interpolate(d,e);t.push(n),i.push(n.clone())}}t.length>=3&&n.push(new u(t,e.shared)),i.length>=3&&a.push(new u(i,e.shared));break}}}static fromPoints(e,t,i){const n=(new s).copy(t).sub(e).cross((new s).copy(i).sub(e)).normalize();return new l(n.clone(),n.dot(e))}}l.EPSILON=1e-5;class u{constructor(e,t){this.vertices=e,this.shared=t,this.plane=l.fromPoints(e[0].pos,e[1].pos,e[2].pos)}clone(){return new u(this.vertices.map(e=>e.clone()),this.shared)}flip(){this.vertices.reverse().map(e=>e.flip()),this.plane.flip()}}class d{constructor(e,t,i,n){this.pos=(new s).copy(e),this.normal=(new s).copy(t),this.uv=(new s).copy(i),this.uv.z=0,n&&(this.color=(new s).copy(n))}clone(){return new d(this.pos,this.normal,this.uv,this.color)}flip(){this.normal.negate()}interpolate(e,t){return new d(this.pos.clone().lerp(e.pos,t),this.normal.clone().lerp(e.normal,t),this.uv.clone().lerp(e.uv,t),this.color&&e.color&&this.color.clone().lerp(e.color,t))}}class c{constructor(){this.polygons=[]}static fromPolygons(e){const t=new c;return t.polygons=e,t}static fromGeometry(e,t){let i=[];const n=e.attributes.position,a=e.attributes.normal,r=e.attributes.uv,o=e.attributes.color,l=e.groups;let f;if(e.index)f=e.index.array;else{f=new Uint16Array(n.array.length/n.itemSize|0);for(let e=0;e<f.length;e++)f[e]=e}const h=f.length/3|0;i=new Array(h);for(let e=0,c=0,h=f.length;e<h;e+=3,c++){const h=new Array(3);for(let t=0;t<3;t++){const i=f[e+t],l=3*i,u=2*i,c=n.array[l],p=n.array[l+1],m=n.array[l+2],_=a.array[l],g=a.array[l+1],v=a.array[l+2],y=null==r?void 0:r.array[u],b=null==r?void 0:r.array[u+1];h[t]=new d(new s(c,p,m),new s(_,g,v),new s(y,b,0),o&&new s(o.array[l],o.array[l+1],o.array[l+2]))}if(void 0===t&&l&&l.length>0)for(const t of l)e>=t.start&&e<t.start+t.count&&(i[c]=new u(h,t.materialIndex));else i[c]=new u(h,t)}return c.fromPolygons(i.filter(e=>!Number.isNaN(e.plane.normal.x)))}static toGeometry(e,t){let i=0;const o=e.polygons;for(const e of o)i+=e.vertices.length-2;const s=new n.BufferGeometry,l=new a(3*i*3),u=new a(3*i*3),d=new r(2*i*3);let c;const f=[],h=[];for(const e of o){const t=e.vertices,n=t.length;void 0!==e.shared&&(f[e.shared]||(f[e.shared]=[])),n&&void 0!==t[0].color&&(c||(c=new a(3*i*3)));for(let i=3;i<=n;i++){(void 0===e.shared?h:f[e.shared]).push(l.top/3,l.top/3+1,l.top/3+2),l.write(t[0].pos),l.write(t[i-2].pos),l.write(t[i-1].pos),u.write(t[0].normal),u.write(t[i-2].normal),u.write(t[i-1].normal),d&&(d.write(t[0].uv),d.write(t[i-2].uv),d.write(t[i-1].uv)),c&&(c.write(t[0].color),c.write(t[i-2].color),c.write(t[i-1].color))}}s.setAttribute("position",new n.BufferAttribute(l.array,3)),s.setAttribute("normal",new n.BufferAttribute(u.array,3)),d&&s.setAttribute("uv",new n.BufferAttribute(d.array,2)),c&&s.setAttribute("color",new n.BufferAttribute(c.array,3));for(let e=0;e<f.length;e++)void 0===f[e]&&(f[e]=[]);if(f.length){let e=[],t=0;for(let i=0;i<f.length;i++)s.addGroup(t,f[i].length,i),t+=f[i].length,e=e.concat(f[i]);s.addGroup(t,h.length,f.length),e=e.concat(h),s.setIndex(e)}const p=(new n.Matrix4).copy(t).invert();return s.applyMatrix4(p),s.computeBoundingSphere(),s.computeBoundingBox(),s}static fromMesh(e,t){const i=c.fromGeometry(e.geometry,t),a=new n.Vector3,r=new n.Matrix3;r.getNormalMatrix(e.matrix);for(let t=0;t<i.polygons.length;t++){const n=i.polygons[t];for(let t=0;t<n.vertices.length;t++){const i=n.vertices[t];i.pos.copy(a.copy(i.pos.toVector3()).applyMatrix4(e.matrix)),i.normal.copy(a.copy(i.normal.toVector3()).applyMatrix3(r))}}return i}static toMesh(e,t,i){const a=c.toGeometry(e,t),r=new n.Mesh(a,i);return r.matrix.copy(t),r.matrix.decompose(r.position,r.quaternion,r.scale),r.rotation.setFromQuaternion(r.quaternion),r.updateMatrixWorld(),r.castShadow=r.receiveShadow=!0,r}static union(e,t){const i=c.fromMesh(e),n=c.fromMesh(t);return c.toMesh(i.union(n),e.matrix,e.material)}static subtract(e,t){const i=c.fromMesh(e),n=c.fromMesh(t);return c.toMesh(i.subtract(n),e.matrix,e.material)}static intersect(e,t){const i=c.fromMesh(e),n=c.fromMesh(t);return c.toMesh(i.intersect(n),e.matrix,e.material)}clone(){const e=new c;return e.polygons=this.polygons.map(e=>e.clone()).filter(e=>Number.isFinite(e.plane.w)),e}toPolygons(){return this.polygons}union(e){const t=new o(this.clone().polygons),i=new o(e.clone().polygons);return t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),c.fromPolygons(t.allPolygons())}subtract(e){const t=new o(this.clone().polygons),i=new o(e.clone().polygons);return t.invert(),t.clipTo(i),i.clipTo(t),i.invert(),i.clipTo(t),i.invert(),t.build(i.allPolygons()),t.invert(),c.fromPolygons(t.allPolygons())}intersect(e){const t=new o(this.clone().polygons),i=new o(e.clone().polygons);return t.invert(),i.clipTo(t),i.invert(),t.clipTo(i),i.clipTo(t),t.build(i.allPolygons()),t.invert(),c.fromPolygons(t.allPolygons())}inverse(){const e=this.clone();for(const t of e.polygons)t.flip();return e}toMesh(e,t){return c.toMesh(this,e,t)}toGeometry(e){return c.toGeometry(this,e)}}i.d(t,"CSG",(function(){return c}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DTVelocityOrientationProperty=t.Typhoon=t.Trajectory=t.UnionRectangularCone=t.SimpleCone=t.ScanRectangularCone=t.SarRecCone=t.SarCone=t.RectangularCone=t.PAR=t.Satellite=t.RelativeDistanceLine=t.PerformancePolyline=t.YPR=t.Pointing=t.OperationBase=t.ObjectWithPath=t.TaskLoaders=t.StripeLoader=t.PayloadLoader=t.LinkLoader=t.ExplosionLoader=t.SimpleConeLoader=t.RectangularConeLoader=t.PayloadLoaders=t.ParLoader=t.LoaderBase=t.Loader=t.StationLoader=t.ShipLoader=t.SatelliteLoader=t.PlaneLoader=t.MissileLoader=t.EntityLoaders=t.CommandCenterLoader=t.CarLoader=t.WebSocketLoader=t.UpdateStrategies=t.OrbitLoader=t.ApiLoaders=t.LinkPoints=t.Link=t.GroundObject=t.Flame=t.FixedPath=t.Explosion=t.EntityLink=t.DynamicPolyline=t.DirectionPath=t.Blowout=void 0,t.SarRecConeEntity=t.SarConeEntity=t.RTNAxis=t.RectangularConeEntity=t.PolylineEntity=t.PolygonEntity=t.PointLikeEntity=t.PointingAxis=t.PointEntity=t.PointBillboardEntity=t.PlaneEntity=t.PathEntity=t.NewStripeEntity=t.Model=t.LODEntity=t.LocalAxis=t.LinkEntity=t.Label=t.HTMLLabel=t.GroundPolylineEntity=t.GeometryEntity=t.EllipsoidEntity=t.EllipseEntity=t.DTEntity=t.CylinderEntity=t.CustomCoordinateAxis=t.CoordinateAxis=t.CellEntity=t.BillboardEntity=t.Billboard=t.Axis=t.VolumePrimitive=t.Volume=t.ViewportVolumePrimitive=t.ViewportVolume=t.Flow3D=t.Effect=t.DTObject=t.removePrimitive=t.RectangularSensorVisualizer=t.RectangularSensorGraphics=t.RectangularPyramidSensorVolume=t.initializeCZMLExtends=t.CustomSensorVolume=t.ConicSensorVisualizer=t.ConicSensorGraphics=t.SuperTimelineTrack=t.SuperTimelineHighlightRange=t.SuperTimeline=t.SatelliteVelocityOrientationProperty=void 0,t.simplifySamples=t.simplify=t.Viewer=t.TransformControl=t.BaseTool=t.WaveReboundMaterial=t.WaveMaterial=t.VerticalMultipleColorMaterial=t.VerticalMultipleColorFlowMaterial=t.PolylineTexMaterial=t.PingPongMaterial=t.MultipleColorFlowMaterial=t.HorizontalMultipleColorFlowMaterial=t.FlowLineMaterial=t.FlowLightMaterial=t.FlowImageMaterial=t.FlameMaterial=t.FireMaterial=t.filterMaterial=t.ExplosionMaterial=t.EmissionFlowMaterial=t.CoverMaterial=t.CircleWaveMaterial=t.CircleScanMaterial=t.CircleDiffuseMaterial=t.BlowoutMaterial=t.WindFieldLayer=t.SingleImageryLayer=t.LODSceneLayer=t.Layer=t.KMLLayer=t.ImageryLayer=t.HexGridLayer=t.HeatMapLayer=t.GraticulesLayer=t.GeoJsonLayer=t.FilterImageryLayer2=t.FilterImageryLayer=t.CoverImageryLayer=t.global=t.WaveScanMode=t.TrajectoryMode=t.TimelineFormatter=t.RotationFrame=t.ReferenceType=t.HighlightMode=t.AtmosphereDataType=t.Tileset=t.StripeEntity=t.SimpleConeEntity=void 0,t.Cesium=t.Tool=t.subSample=t.ResourcePool=t.OperationManager=t.Operation=t.Measure=t.IntersectionTest=t.DTMath=t.AtmosphereDataToImage=void 0;var n=i(1184);t.Blowout=n.default;var a=i(1200);t.DirectionPath=a.default;var r=i(1201);t.DynamicPolyline=r.default;var o=i(1202);t.EntityLink=o.default;var s=i(1004);t.Explosion=s.default;var l=i(418);t.FixedPath=l.default;var u=i(1203);t.Flame=u.default;var d=i(490);t.GroundObject=d.default;var c=i(1008);t.Link=c.default;var f=i(1204);t.LinkPoints=f.default;var h=i(1009);t.ApiLoaders=h.default;var p=i(1010);t.OrbitLoader=p.default;var m=i(325);t.UpdateStrategies=m.default;var _=i(976);t.WebSocketLoader=_.default;var g=i(1148);t.CarLoader=g.default;var v=i(1149);t.CommandCenterLoader=v.default;var y=i(977);t.EntityLoaders=y.default;var b=i(1150);t.MissileLoader=b.default;var w=i(1151);t.PlaneLoader=w.default;var O=i(1152);t.SatelliteLoader=O.default;var x=i(1153);t.ShipLoader=x.default;var A=i(1154);t.StationLoader=A.default;var T=i(1208);t.Loader=T.default;var E=i(204);t.LoaderBase=E.default;var C=i(1158);t.ParLoader=C.default;var S=i(978);t.PayloadLoaders=S.default;var M=i(1157);t.RectangularConeLoader=M.default;var D=i(1155);t.SimpleConeLoader=D.default;var P=i(1164);t.ExplosionLoader=P.default;var I=i(1161);t.LinkLoader=I.default;var L=i(1165);t.PayloadLoader=L.default;var j=i(1162);t.StripeLoader=j.default;var R=i(983);t.TaskLoaders=R.default;var N=i(974);t.ObjectWithPath=N.default;var B=i(1209);t.OperationBase=B.default;var F=i(392);t.Pointing=F.default;var k=i(491);t.YPR=k.default;var z=i(1210);t.PerformancePolyline=z.default;var U=i(1211);t.RelativeDistanceLine=U.default;var V=i(488);t.Satellite=V.default;var H=i(1159);t.PAR=H.default;var G=i(981);t.RectangularCone=G.default;var Y=i(1212);t.SarCone=Y.default;var W=i(1213);t.SarRecCone=W.default;var q=i(1214);t.ScanRectangularCone=q.default;var X=i(979);t.SimpleCone=X.default;var K=i(1215);t.UnionRectangularCone=K.default;var J=i(1001);t.Trajectory=J.default;var Z=i(1216);t.Typhoon=Z.default;var Q=i(994);t.DTVelocityOrientationProperty=Q.default;var $=i(986);t.SatelliteVelocityOrientationProperty=$.default;var ee=i(1217);t.SuperTimeline=ee.default;var te=i(1171);t.SuperTimelineHighlightRange=te.default;var ie=i(1170);t.SuperTimelineTrack=ie.default;var ne=i(993);t.ConicSensorGraphics=ne.default;var ae=i(992);t.ConicSensorVisualizer=ae.default;var re=i(972);t.CustomSensorVolume=re.default;var oe=i(988);t.initializeCZMLExtends=oe.default;var se=i(991);t.RectangularPyramidSensorVolume=se.default;var le=i(989);t.RectangularSensorGraphics=le.default;var ue=i(990);t.RectangularSensorVisualizer=ue.default;var de=i(973);t.removePrimitive=de.default;var ce=i(487);t.DTObject=ce.default;var fe=i(549);t.Effect=fe.default;var he=i(1218);t.Flow3D=he.default;var pe=i(1219);t.ViewportVolume=pe.default;var me=i(984);t.ViewportVolumePrimitive=me.default;var _e=i(1220);t.Volume=_e.default;var ge=i(1173);t.VolumePrimitive=ge.default;var ve=i(1221);t.Axis=ve.default;var ye=i(1222);t.Billboard=ye.default;var be=i(1003);t.BillboardEntity=be.default;var we=i(1223);t.CellEntity=we.default;var Oe=i(999);t.CoordinateAxis=Oe.default;var xe=i(1e3);t.CustomCoordinateAxis=xe.default;var Ae=i(968);t.CylinderEntity=Ae.default;var Te=i(151);t.DTEntity=Te.default;var Ee=i(1174);t.EllipseEntity=Ee.default;var Ce=i(1160);t.EllipsoidEntity=Ce.default;var Se=i(321);t.GeometryEntity=Se.default;var Me=i(1002);t.GroundPolylineEntity=Me.default;var De=i(389);t.HTMLLabel=De.default;var Pe=i(1224);t.Label=Pe.default;var Ie=i(489);t.LinkEntity=Ie.default;var Le=i(1225);t.LocalAxis=Le.default;var je=i(997);t.LODEntity=je.default;var Re=i(1175);t.Model=Re.default;var Ne=i(1226);t.NewStripeEntity=Ne.default;var Be=i(975);t.PathEntity=Be.default;var Fe=i(1005);t.PlaneEntity=Fe.default;var ke=i(1227);t.PointBillboardEntity=ke.default;var ze=i(548);t.PointEntity=ze.default;var Ue=i(1228);t.PointingAxis=Ue.default;var Ve=i(280);t.PointLikeEntity=Ve.default;var He=i(1169);t.PolygonEntity=He.default;var Ge=i(390);t.PolylineEntity=Ge.default;var Ye=i(982);t.RectangularConeEntity=Ye.default;var We=i(1229);t.RTNAxis=We.default;var qe=i(1166);t.SarConeEntity=qe.default;var Xe=i(1167);t.SarRecConeEntity=Xe.default;var Ke=i(1156);t.SimpleConeEntity=Ke.default;var Je=i(1163);t.StripeEntity=Je.default;var Ze=i(1230);t.Tileset=Ze.default;var Qe=i(1176);t.AtmosphereDataType=Qe.default;var $e=i(998);t.HighlightMode=$e.default;var et=i(546);t.ReferenceType=et.default;var tt=i(323);t.RotationFrame=tt.default;var it=i(1172);t.TimelineFormatter=it.default;var nt=i(348);t.TrajectoryMode=nt.default;var at=i(301);t.WaveScanMode=at.default;var rt=i(347);t.global=rt;var ot=i(1231);t.CoverImageryLayer=ot.default;var st=i(1232);t.FilterImageryLayer=st.default;var lt=i(1233);t.FilterImageryLayer2=lt.default;var ut=i(1234);t.GeoJsonLayer=ut.default;var dt=i(1235);t.GraticulesLayer=dt.default;var ct=i(1236);t.HeatMapLayer=ct.default;var ft=i(1237);t.HexGridLayer=ft.default;var ht=i(1238);t.ImageryLayer=ht.default;var pt=i(1239);t.KMLLayer=pt.default;var mt=i(234);t.Layer=mt.default;var _t=i(279);t.LODSceneLayer=_t.default;var gt=i(1179);t.SingleImageryLayer=gt.default;var vt=i(1240);t.WindFieldLayer=vt.default;var yt=i(995);t.BlowoutMaterial=yt.default;var bt=i(1242);t.CircleDiffuseMaterial=bt.default;var wt=i(1243);t.CircleScanMaterial=wt.default;var Ot=i(1244);t.CircleWaveMaterial=Ot.default;var xt=i(1177);t.CoverMaterial=xt.default;var At=i(1245);t.EmissionFlowMaterial=At.default;var Tt=i(1006);t.ExplosionMaterial=Tt.default;var Et=i(1178);t.filterMaterial=Et.default;var Ct=i(1246);t.FireMaterial=Ct.default;var St=i(1007);t.FlameMaterial=St.default;var Mt=i(1247);t.FlowImageMaterial=Mt.default;var Dt=i(1248);t.FlowLightMaterial=Dt.default;var Pt=i(1249);t.FlowLineMaterial=Pt.default;var It=i(1250);t.HorizontalMultipleColorFlowMaterial=It.default;var Lt=i(1251);t.MultipleColorFlowMaterial=Lt.default;var jt=i(1252);t.PingPongMaterial=jt.default;var Rt=i(391);t.PolylineTexMaterial=Rt.default;var Nt=i(1253);t.VerticalMultipleColorFlowMaterial=Nt.default;var Bt=i(1254);t.VerticalMultipleColorMaterial=Bt.default;var Ft=i(980);t.WaveMaterial=Ft.default;var kt=i(1168);t.WaveReboundMaterial=kt.default;var zt=i(1180);t.BaseTool=zt.default;var Ut=i(1255);t.TransformControl=Ut.default;var Vt=i(987);t.Viewer=Vt.default;var Ht=i(1256);t.simplify=Ht.default;var Gt=i(996);t.simplifySamples=Gt.default;var Yt=i(1257);t.AtmosphereDataToImage=Yt.default;var Wt=i(324);t.DTMath=Wt.default;var qt=i(547);t.IntersectionTest=qt.default;var Xt=i(1258);t.Measure=Xt.default;var Kt=i(1181);t.Operation=Kt.default;var Jt=i(1259);t.OperationManager=Jt.default;var Zt=i(1260);t.ResourcePool=Zt.default;var Qt=i(1261);t.subSample=Qt.default;var $t=i(300);t.Tool=$t.default;var ei=i(326);t.Cesium=ei},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(968),l=i(995),u=i(6),d=i(1),c=i(488),f=new d.default,h=new u.default,p={material:new l.default,topRadius:1,bottomRadius:1,length:10,speed:5,color1:o.default.fromCssColorString("#ffffff"),color2:o.default.fromCssColorString("#929292"),frequency:1,intermittent:!1,isShow:!0,type:"blowout"},m=function(e){function t(t){var i=this,n=r(r({},p),t);return(i=e.call(this,n)||this).material.speed=n.speed,i.material.frequency=n.frequency,i.material.intermittent=n.intermittent,i.material.isShow=n.isShow,i.material.color1=n.color1,i.material.color2=n.color2,i}return a(t,e),t.prototype.updateForward=function(t,i){var n=i.clone();if(this.parent instanceof c.default){var a=this.parent.model._computedModelMatrix;u.default.getScale(a,f),u.default.fromScale(f,h),u.default.multiply(n,h,n),u.default.multiply(n,this.parent.modelConfig.initialMatrix,n);var r=this.getViewer(),o=d.default.distance(this.parent.position,r.cesiumViewer.camera.positionWC);this.parent.model.distanceDisplayCondition&&(o>this.parent.model.distanceDisplayCondition.far?this.show=!1:this.show=!0)}e.prototype.updateForward.call(this,t,n)},t}(s.default);t.default=m},function(e,t,i){"use strict";var n=i(1186),a=i(1187);function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}t.parse=y,t.resolve=function(e,t){return y(e,!1,!0).resolve(t)},t.resolveObject=function(e,t){return e?y(e,!1,!0).resolveObject(t):t},t.format=function(e){a.isString(e)&&(e=y(e));return e instanceof r?e.format():r.prototype.format.call(e)},t.Url=r;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(u),c=["%","/","?",";","#"].concat(d),f=["/","?","#"],h=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},_={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=i(1188);function y(e,t,i){if(e&&a.isObject(e)&&e instanceof r)return e;var n=new r;return n.parse(e,t,i),n}r.prototype.parse=function(e,t,i){if(!a.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),s=-1!==r&&r<e.indexOf("#")?"?":"#",u=e.split(s);u[0]=u[0].replace(/\\/g,"/");var y=e=u.join(s);if(y=y.trim(),!i&&1===e.split("#").length){var b=l.exec(y);if(b)return this.path=y,this.href=y,this.pathname=b[1],b[2]?(this.search=b[2],this.query=t?v.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var w=o.exec(y);if(w){var O=(w=w[0]).toLowerCase();this.protocol=O,y=y.substr(w.length)}if(i||w||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===y.substr(0,2);!x||w&&_[w]||(y=y.substr(2),this.slashes=!0)}if(!_[w]&&(x||w&&!g[w])){for(var A,T,E=-1,C=0;C<f.length;C++){-1!==(S=y.indexOf(f[C]))&&(-1===E||S<E)&&(E=S)}-1!==(T=-1===E?y.lastIndexOf("@"):y.lastIndexOf("@",E))&&(A=y.slice(0,T),y=y.slice(T+1),this.auth=decodeURIComponent(A)),E=-1;for(C=0;C<c.length;C++){var S;-1!==(S=y.indexOf(c[C]))&&(-1===E||S<E)&&(E=S)}-1===E&&(E=y.length),this.host=y.slice(0,E),y=y.slice(E),this.parseHost(),this.hostname=this.hostname||"";var M="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!M)for(var D=this.hostname.split(/\./),P=(C=0,D.length);C<P;C++){var I=D[C];if(I&&!I.match(h)){for(var L="",j=0,R=I.length;j<R;j++)I.charCodeAt(j)>127?L+="x":L+=I[j];if(!L.match(h)){var N=D.slice(0,C),B=D.slice(C+1),F=I.match(p);F&&(N.push(F[1]),B.unshift(F[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),M||(this.hostname=n.toASCII(this.hostname));var k=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+k,this.href+=this.host,M&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[O])for(C=0,P=d.length;C<P;C++){var U=d[C];if(-1!==y.indexOf(U)){var V=encodeURIComponent(U);V===U&&(V=escape(U)),y=y.split(U).join(V)}}var H=y.indexOf("#");-1!==H&&(this.hash=y.substr(H),y=y.slice(0,H));var G=y.indexOf("?");if(-1!==G?(this.search=y.substr(G),this.query=y.substr(G+1),t&&(this.query=v.parse(this.query)),y=y.slice(0,G)):t&&(this.search="",this.query={}),y&&(this.pathname=y),g[O]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var Y=this.search||"";this.path=k+Y}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",i=this.pathname||"",n=this.hash||"",r=!1,o="";this.host?r=e+this.host:this.hostname&&(r=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(r+=":"+this.port)),this.query&&a.isObject(this.query)&&Object.keys(this.query).length&&(o=v.stringify(this.query));var s=this.search||o&&"?"+o||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||g[t])&&!1!==r?(r="//"+(r||""),i&&"/"!==i.charAt(0)&&(i="/"+i)):r||(r=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),t+r+(i=i.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+n},r.prototype.resolve=function(e){return this.resolveObject(y(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(a.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var i=new r,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];i[s]=this[s]}if(i.hash=e.hash,""===e.href)return i.href=i.format(),i;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),u=0;u<l.length;u++){var d=l[u];"protocol"!==d&&(i[d]=e[d])}return g[i.protocol]&&i.hostname&&!i.pathname&&(i.path=i.pathname="/"),i.href=i.format(),i}if(e.protocol&&e.protocol!==i.protocol){if(!g[e.protocol]){for(var c=Object.keys(e),f=0;f<c.length;f++){var h=c[f];i[h]=e[h]}return i.href=i.format(),i}if(i.protocol=e.protocol,e.host||_[e.protocol])i.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),i.pathname=p.join("/")}if(i.search=e.search,i.query=e.query,i.host=e.host||"",i.auth=e.auth,i.hostname=e.hostname||e.host,i.port=e.port,i.pathname||i.search){var m=i.pathname||"",v=i.search||"";i.path=m+v}return i.slashes=i.slashes||e.slashes,i.href=i.format(),i}var y=i.pathname&&"/"===i.pathname.charAt(0),b=e.host||e.pathname&&"/"===e.pathname.charAt(0),w=b||y||i.host&&e.pathname,O=w,x=i.pathname&&i.pathname.split("/")||[],A=(p=e.pathname&&e.pathname.split("/")||[],i.protocol&&!g[i.protocol]);if(A&&(i.hostname="",i.port=null,i.host&&(""===x[0]?x[0]=i.host:x.unshift(i.host)),i.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),w=w&&(""===p[0]||""===x[0])),b)i.host=e.host||""===e.host?e.host:i.host,i.hostname=e.hostname||""===e.hostname?e.hostname:i.hostname,i.search=e.search,i.query=e.query,x=p;else if(p.length)x||(x=[]),x.pop(),x=x.concat(p),i.search=e.search,i.query=e.query;else if(!a.isNullOrUndefined(e.search)){if(A)i.hostname=i.host=x.shift(),(M=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift());return i.search=e.search,i.query=e.query,a.isNull(i.pathname)&&a.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.href=i.format(),i}if(!x.length)return i.pathname=null,i.search?i.path="/"+i.search:i.path=null,i.href=i.format(),i;for(var T=x.slice(-1)[0],E=(i.host||e.host||x.length>1)&&("."===T||".."===T)||""===T,C=0,S=x.length;S>=0;S--)"."===(T=x[S])?x.splice(S,1):".."===T?(x.splice(S,1),C++):C&&(x.splice(S,1),C--);if(!w&&!O)for(;C--;C)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),E&&"/"!==x.join("/").substr(-1)&&x.push("");var M,D=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(i.hostname=i.host=D?"":x.length?x.shift():"",(M=!!(i.host&&i.host.indexOf("@")>0)&&i.host.split("@"))&&(i.auth=M.shift(),i.host=i.hostname=M.shift()));return(w=w||i.host&&x.length)&&!D&&x.unshift(""),x.length?i.pathname=x.join("/"):(i.pathname=null,i.path=null),a.isNull(i.pathname)&&a.isNull(i.search)||(i.path=(i.pathname?i.pathname:"")+(i.search?i.search:"")),i.auth=e.auth||i.auth,i.slashes=i.slashes||e.slashes,i.href=i.format(),i},r.prototype.parseHost=function(){var e=this.host,t=s.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,i){(function(e,n){var a;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(r){t&&t.nodeType,e&&e.nodeType;var o="object"==typeof n&&n;o.global!==o&&o.window!==o&&o.self;var s,l=2147483647,u=/^xn--/,d=/[^\x20-\x7E]/,c=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,p=String.fromCharCode;function m(e){throw new RangeError(f[e])}function _(e,t){for(var i=e.length,n=[];i--;)n[i]=t(e[i]);return n}function g(e,t){var i=e.split("@"),n="";return i.length>1&&(n=i[0]+"@",e=i[1]),n+_((e=e.replace(c,".")).split("."),t).join(".")}function v(e){for(var t,i,n=[],a=0,r=e.length;a<r;)(t=e.charCodeAt(a++))>=55296&&t<=56319&&a<r?56320==(64512&(i=e.charCodeAt(a++)))?n.push(((1023&t)<<10)+(1023&i)+65536):(n.push(t),a--):n.push(t);return n}function y(e){return _(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function b(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,i){var n=0;for(e=i?h(e/700):e>>1,e+=h(e/t);e>455;n+=36)e=h(e/35);return h(n+36*e/(e+38))}function O(e){var t,i,n,a,r,o,s,u,d,c,f,p=[],_=e.length,g=0,v=128,b=72;for((i=e.lastIndexOf("-"))<0&&(i=0),n=0;n<i;++n)e.charCodeAt(n)>=128&&m("not-basic"),p.push(e.charCodeAt(n));for(a=i>0?i+1:0;a<_;){for(r=g,o=1,s=36;a>=_&&m("invalid-input"),((u=(f=e.charCodeAt(a++))-48<10?f-22:f-65<26?f-65:f-97<26?f-97:36)>=36||u>h((l-g)/o))&&m("overflow"),g+=u*o,!(u<(d=s<=b?1:s>=b+26?26:s-b));s+=36)o>h(l/(c=36-d))&&m("overflow"),o*=c;b=w(g-r,t=p.length+1,0==r),h(g/t)>l-v&&m("overflow"),v+=h(g/t),g%=t,p.splice(g++,0,v)}return y(p)}function x(e){var t,i,n,a,r,o,s,u,d,c,f,_,g,y,O,x=[];for(_=(e=v(e)).length,t=128,i=0,r=72,o=0;o<_;++o)(f=e[o])<128&&x.push(p(f));for(n=a=x.length,a&&x.push("-");n<_;){for(s=l,o=0;o<_;++o)(f=e[o])>=t&&f<s&&(s=f);for(s-t>h((l-i)/(g=n+1))&&m("overflow"),i+=(s-t)*g,t=s,o=0;o<_;++o)if((f=e[o])<t&&++i>l&&m("overflow"),f==t){for(u=i,d=36;!(u<(c=d<=r?1:d>=r+26?26:d-r));d+=36)O=u-c,y=36-c,x.push(p(b(c+O%y,0))),u=h(O/y);x.push(p(b(u,0))),r=w(i,g,n==a),i=0,++n}++i,++t}return x.join("")}s={version:"1.4.1",ucs2:{decode:v,encode:y},decode:O,encode:x,toASCII:function(e){return g(e,(function(e){return d.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return g(e,(function(e){return u.test(e)?O(e.slice(4).toLowerCase()):e}))}},void 0===(a=function(){return s}.call(t,i,t,e))||(e.exports=a)}()}).call(this,i(985)(e),i(417))},function(e,t,i){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,i){"use strict";t.decode=t.parse=i(1189),t.encode=t.stringify=i(1190)},function(e,t,i){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,i,r){t=t||"&",i=i||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var l=1e3;r&&"number"==typeof r.maxKeys&&(l=r.maxKeys);var u=e.length;l>0&&u>l&&(u=l);for(var d=0;d<u;++d){var c,f,h,p,m=e[d].replace(s,"%20"),_=m.indexOf(i);_>=0?(c=m.substr(0,_),f=m.substr(_+1)):(c=m,f=""),h=decodeURIComponent(c),p=decodeURIComponent(f),n(o,h)?a(o[h])?o[h].push(p):o[h]=[o[h],p]:o[h]=p}return o};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},function(e,t,i){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,i,s){return t=t||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?r(o(e),(function(o){var s=encodeURIComponent(n(o))+i;return a(e[o])?r(e[o],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[o]))})).join(t):s?encodeURIComponent(n(s))+i+encodeURIComponent(n(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function r(e,t){if(e.map)return e.map(t);for(var i=[],n=0;n<e.length;n++)i.push(t(e[n],n));return i}var o=Object.keys||function(e){var t=[];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);return t}},function(e,t,i){var n=i(1192);"string"==typeof n&&(n=[[e.i,n,""]]);var a={insert:"head",singleton:!1};i(1196)(n,a);n.locals&&(e.exports=n.locals)},function(e,t,i){t=e.exports=i(1193)(!1);var n=i(1194)(i(1195));t.push([e.i,'.cesium-svgPath-svg{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden}.cesium-button{display:inline-block;position:relative;background:#303336;border:1px solid #444;color:#edffff;fill:#edffff;border-radius:4px;padding:5px 12px;margin:2px 3px;cursor:pointer;overflow:hidden;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-button:focus{color:#fff;fill:#fff;border-color:#ea4;outline:0}.cesium-button:hover{color:#fff;fill:#fff;background:#48b;border-color:#aef;box-shadow:0 0 8px #fff}.cesium-button:active{color:#000;fill:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-button-disabled,.cesium-button-disabled:active,.cesium-button-disabled:focus,.cesium-button-disabled:hover,.cesium-button:disabled{background:#303336;border-color:#444;color:#646464;fill:#646464;box-shadow:none;cursor:default}.cesium-button option{background-color:#000;color:#eee}.cesium-button option:disabled{color:#777}.cesium-button input,.cesium-button label{cursor:pointer}.cesium-button input{vertical-align:sub}.cesium-toolbar-button{box-sizing:border-box;width:32px;height:32px;border-radius:14%;padding:0;vertical-align:middle;z-index:0}.cesium-performanceDisplay-defaultContainer{position:absolute;top:50px;right:10px;text-align:right}.cesium-performanceDisplay{background-color:rgba(40,40,40,.7);padding:7px;border-radius:5px;border:1px solid #444;font:bold 12px sans-serif}.cesium-performanceDisplay-fps{color:#e52}.cesium-performanceDisplay-throttled{color:#a42}.cesium-performanceDisplay-ms{color:#de3}.cesium-animation-theme{visibility:hidden;display:block;position:absolute;z-index:-100}.cesium-animation-themeNormal{color:#222}.cesium-animation-themeHover{color:#4488b0}.cesium-animation-themeSelect{color:#242}.cesium-animation-themeDisabled{color:#333}.cesium-animation-themeKnob{color:#222}.cesium-animation-themePointer{color:#2e2}.cesium-animation-themeSwoosh{color:#8ac}.cesium-animation-themeSwooshHover{color:#aef}.cesium-animation-svgText{fill:#edffff;font-family:Sans-Serif;font-size:15px;text-anchor:middle}.cesium-animation-blank{fill:#000;fill-opacity:.01;stroke:none}.cesium-animation-rectButton{cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-rectButton .cesium-animation-buttonGlow{fill:#fff;stroke:none;display:none}.cesium-animation-rectButton:hover .cesium-animation-buttonGlow{display:block}.cesium-animation-rectButton .cesium-animation-buttonPath{fill:#edffff}.cesium-animation-rectButton .cesium-animation-buttonMain{stroke:#444;stroke-width:1.2}.cesium-animation-rectButton:hover .cesium-animation-buttonMain{stroke:#aef}.cesium-animation-rectButton:active .cesium-animation-buttonMain{fill:#abd6ff}.cesium-animation-buttonDisabled{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.cesium-animation-buttonDisabled .cesium-animation-buttonMain{stroke:#555}.cesium-animation-buttonDisabled .cesium-animation-buttonPath{fill:#818181}.cesium-animation-buttonDisabled .cesium-animation-buttonGlow{display:none}.cesium-animation-buttonToggled .cesium-animation-buttonGlow{display:block;fill:#2e2}.cesium-animation-buttonToggled .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-buttonToggled:hover .cesium-animation-buttonGlow{fill:#fff}.cesium-animation-buttonToggled:hover .cesium-animation-buttonMain{stroke:#2e2}.cesium-animation-shuttleRingG{cursor:pointer}.cesium-animation-shuttleRingPointer{cursor:pointer}.cesium-animation-shuttleRingPausePointer{cursor:pointer}.cesium-animation-shuttleRingBack{fill:#181818;fill-opacity:.8;stroke:#333;stroke-width:1.2}.cesium-animation-shuttleRingSwoosh line{stroke:#8ac;stroke-width:3;stroke-opacity:.2;stroke-linecap:round}.cesium-animation-knobOuter{cursor:pointer;stroke:#444;stroke-width:1.2}.cesium-animation-knobInner{cursor:pointer}.cesium-baseLayerPicker-selected{position:absolute;top:0;left:0;width:100%;height:100%;border:none}.cesium-baseLayerPicker-dropDown{display:block;position:absolute;box-sizing:content-box;top:auto;right:0;width:320px;max-height:500px;margin-top:5px;background-color:rgba(38,38,38,.75);border:1px solid #444;padding:6px;overflow:auto;border-radius:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;transform:translate(0,-20%);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-baseLayerPicker-dropDown-visible{transform:translate(0,0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-baseLayerPicker-sectionTitle{display:block;font-family:sans-serif;font-size:16pt;text-align:left;color:#edffff;margin-bottom:4px}.cesium-baseLayerPicker-choices{margin-bottom:5px}.cesium-baseLayerPicker-categoryTitle{color:#edffff;font-size:11pt}.cesium-baseLayerPicker-choices{display:block;border:1px solid #888;border-radius:5px;padding:5px 0}.cesium-baseLayerPicker-item{display:inline-block;vertical-align:top;margin:2px 5px;width:64px;text-align:center;cursor:pointer}.cesium-baseLayerPicker-itemLabel{display:block;font-family:sans-serif;font-size:8pt;text-align:center;vertical-align:middle;color:#edffff;cursor:pointer;word-wrap:break-word}.cesium-baseLayerPicker-item:focus .cesium-baseLayerPicker-itemLabel,.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemLabel{text-decoration:underline}.cesium-baseLayerPicker-itemIcon{display:inline-block;position:relative;width:inherit;height:auto;background-size:100% 100%;border:solid 1px #444;border-radius:9px;color:#edffff;margin:0;padding:0;cursor:pointer;box-sizing:border-box}.cesium-baseLayerPicker-item:hover .cesium-baseLayerPicker-itemIcon{border-color:#fff;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemLabel{color:#bdecf8}.cesium-baseLayerPicker-selectedItem .cesium-baseLayerPicker-itemIcon{border:double 4px #bdecf8}.cesium-widget{position:relative}.cesium-widget,.cesium-widget canvas{width:100%;height:100%;touch-action:none}.cesium-widget-credits{display:block;position:absolute;bottom:0;left:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000;padding-right:5px}.cesium-widget-credits a,.cesium-widget-credits a:visited{color:#fff}.cesium-widget-errorPanel{position:absolute;top:0;right:0;bottom:0;left:0;text-align:center;background:rgba(0,0,0,.7);z-index:99999}.cesium-widget-errorPanel:before{display:inline-block;vertical-align:middle;height:100%;content:""}.cesium-widget-errorPanel-content{width:75%;max-width:500px;display:inline-block;text-align:left;vertical-align:middle;border:1px solid #510c00;border-radius:7px;background-color:#f0d9d5;font-size:14px;color:#510c00}.cesium-widget-errorPanel-content.expanded{max-width:75%}.cesium-widget-errorPanel-header{font-size:18px;font-family:"Open Sans",Verdana,Geneva,sans-serif;background:#d69d93;border-bottom:2px solid #510c00;padding-bottom:10px;border-radius:3px 3px 0 0;padding:15px}.cesium-widget-errorPanel-scroll{overflow:auto;font-family:"Open Sans",Verdana,Geneva,sans-serif;white-space:pre-wrap;padding:0 15px;margin:10px 0 20px 0}.cesium-widget-errorPanel-buttonPanel{padding:0 15px;margin:10px 0 20px 0;text-align:right}.cesium-widget-errorPanel-buttonPanel button{border-color:#510c00;background:#d69d93;color:#202020;margin:0}.cesium-widget-errorPanel-buttonPanel button:focus{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:hover{border-color:#510c00;background:#f0d9d5;color:#510c00}.cesium-widget-errorPanel-buttonPanel button:active{border-color:#510c00;background:#b17b72;color:#510c00}.cesium-widget-errorPanel-more-details{text-decoration:underline;cursor:pointer}.cesium-widget-errorPanel-more-details:hover{color:#2b0700}.cesium-cesiumInspector{border-radius:5px;transition:width ease-in-out .25s;background:rgba(48,51,54,.8);border:1px solid #444;color:#edffff;display:inline-block;position:relative;padding:4px 12px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden}.cesium-cesiumInspector-button{text-align:center;font-size:11pt}.cesium-cesiumInspector-visible .cesium-cesiumInspector-button{border-bottom:1px solid #aaa;padding-bottom:3px}.cesium-cesiumInspector input:enabled,.cesium-cesiumInspector-button{cursor:pointer}.cesium-cesiumInspector-visible{width:185px;height:auto}.cesium-cesiumInspector-hidden{width:122px;height:17px}.cesium-cesiumInspector-sectionContent{max-height:500px}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionContent{max-height:0;padding:0!important;overflow:hidden}.cesium-cesiumInspector-dropDown{margin:5px 0;font-family:sans-serif;font-size:10pt;width:185px}.cesium-cesiumInspector-frustumStatistics{padding-left:10px;padding:5px;background-color:rgba(80,80,80,.75)}.cesium-cesiumInspector-pickButton{background-color:rgba(0,0,0,.3);border:1px solid #444;color:#edffff;border-radius:5px;padding:3px 7px;cursor:pointer;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;margin:0 auto}.cesium-cesiumInspector-pickButton:focus{outline:0}.cesium-cesiumInspector-pickButton:active,.cesium-cesiumInspector-pickButtonHighlight{color:#000;background:#adf;border-color:#fff;box-shadow:0 0 8px #fff}.cesium-cesiumInspector-center{text-align:center}.cesium-cesiumInspector-sectionHeader{font-weight:700;font-size:10pt;margin:0;cursor:pointer}.cesium-cesiumInspector-pickSection{border:1px solid #aaa;border-radius:5px;padding:3px;margin-bottom:5px}.cesium-cesiumInspector-sectionContent{margin-bottom:10px;transition:max-height .25s}.cesium-cesiumInspector-tileText{padding-bottom:10px;border-bottom:1px solid #aaa}.cesium-cesiumInspector-relativeText{padding-top:10px}.cesium-cesiumInspector-sectionHeader::before{margin-right:5px;content:"-";width:1ch;display:inline-block}.cesium-cesiumInspector-section-collapsed .cesium-cesiumInspector-sectionHeader::before{content:"+"}ul.cesium-cesiumInspector-statistics{margin:0;padding-top:3px;padding-bottom:3px}ul.cesium-cesiumInspector-statistics+ul.cesium-cesiumInspector-statistics{border-top:1px solid #aaa}.cesium-cesiumInspector-slider{margin-top:5px}.cesium-cesiumInspector-slider input[type=number]{text-align:left;background-color:#222;outline:0;border:1px solid #444;color:#edffff;width:100px;border-radius:3px;padding:1px;margin-left:10px;cursor:auto}.cesium-cesiumInspector-slider input[type=number]::-webkit-inner-spin-button,.cesium-cesiumInspector-slider input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cesium-cesiumInspector-slider input[type=range]{margin-left:5px;vertical-align:middle}.cesium-cesiumInspector-hide .cesium-cesiumInspector-styleEditor{display:none}.cesium-cesiumInspector-styleEditor{padding:10px;border-radius:5px;background:rgba(48,51,54,.8);border:1px solid #444}.cesium-cesiumInspector-styleEditor textarea{width:100%;height:300px;background:0 0;color:#edffff;border:none;padding:0;white-space:pre;overflow-wrap:normal;overflow-x:auto}.cesium-3DTilesInspector{width:300px;pointer-events:all}.cesium-3DTilesInspector-statistics{font-size:11px}.cesium-3DTilesInspector div,.cesium-3DTilesInspector input[type=range]{width:100%;box-sizing:border-box}.cesium-cesiumInspector-error{color:#ff9e9e;overflow:auto}.cesium-3DTilesInspector .cesium-cesiumInspector-section{margin-top:3px}.cesium-3DTilesInspector .cesium-cesiumInspector-sectionHeader+.cesium-cesiumInspector-show{border-top:1px solid #fff}input.cesium-cesiumInspector-url{overflow:hidden;white-space:nowrap;overflow-x:scroll;background-color:transparent;color:#fff;outline:0;border:none;height:1em;width:100%}.cesium-cesiumInspector .field-group{display:table}.cesium-cesiumInspector .field-group>label{display:table-cell;font-weight:700}.cesium-cesiumInspector .field-group>.field{display:table-cell;width:100%}.cesium-button.cesium-fullscreenButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-button.cesium-vrButton{display:block;width:100%;height:100%;margin:0;border-radius:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input{border:solid 1px #444;background-color:rgba(40,40,40,.7);color:#fff;display:inline-block;vertical-align:middle;width:0;height:32px;margin:0;padding:0 32px 0 0;border-radius:0;box-sizing:border-box;transition:width ease-in-out .25s,background-color .2s ease-in-out;-webkit-appearance:none}.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{border-color:#aef;box-shadow:0 0 8px #fff}.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus{border-color:#ea4;background-color:rgba(15,15,15,.9);box-shadow:none;outline:0}.cesium-viewer-geocoderContainer .cesium-geocoder-input-wide,.cesium-viewer-geocoderContainer .cesium-geocoder-input:focus,.cesium-viewer-geocoderContainer:hover .cesium-geocoder-input{padding-left:4px;width:250px}.cesium-viewer-geocoderContainer .search-results{position:absolute;background-color:#000;color:#eee;overflow-y:auto;opacity:.8;width:100%}.cesium-viewer-geocoderContainer .search-results ul{list-style-type:none;margin:0;padding:0}.cesium-viewer-geocoderContainer .search-results ul li{font-size:14px;padding:3px 10px}.cesium-viewer-geocoderContainer .search-results ul li:hover{cursor:pointer}.cesium-viewer-geocoderContainer .search-results ul li.active{background:#48b}.cesium-geocoder-searchButton{background-color:#303336;display:inline-block;position:absolute;cursor:pointer;width:32px;top:1px;right:1px;height:30px;vertical-align:middle;fill:#edffff}.cesium-geocoder-searchButton:hover{background-color:#48b}.cesium-infoBox{display:block;position:absolute;top:50px;right:0;width:40%;max-width:480px;background:rgba(38,38,38,.95);color:#edffff;border:1px solid #444;border-right:none;border-top-left-radius:7px;border-bottom-left-radius:7px;box-shadow:0 0 10px 1px #000;transform:translate(100%,0);visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in,transform .2s ease-in}.cesium-infoBox-visible{transform:translate(0,0);visibility:visible;opacity:1;transition:opacity .2s ease-out,transform .2s ease-out}.cesium-infoBox-title{display:block;height:20px;padding:5px 30px 5px 25px;background:#545454;border-top-left-radius:7px;text-align:center;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;box-sizing:content-box}.cesium-infoBox-bodyless .cesium-infoBox-title{border-bottom-left-radius:7px}button.cesium-infoBox-camera{display:block;position:absolute;top:4px;left:4px;width:22px;height:22px;background:0 0;border-color:transparent;border-radius:3px;padding:0 5px;margin:0}button.cesium-infoBox-close{display:block;position:absolute;top:5px;right:5px;height:20px;background:0 0;border:none;border-radius:2px;font-weight:700;font-size:16px;padding:0 5px;margin:0;color:#edffff}button.cesium-infoBox-close:focus{background:rgba(238,136,0,.44);outline:0}button.cesium-infoBox-close:hover{background:#888;color:#000}button.cesium-infoBox-close:active{background:#a00;color:#000}.cesium-infoBox-bodyless .cesium-infoBox-iframe{display:none}.cesium-infoBox-iframe{border:none;width:100%;width:calc(100% - 2px)}span.cesium-sceneModePicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-sceneModePicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-sceneModePicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-none{display:none}.cesium-sceneModePicker-slide-svg{transition:left 2s;top:0;left:0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D,.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView{margin:0 0 3px 0}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-icon2D{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button3D .cesium-sceneModePicker-iconColumbusView{left:200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon3D{left:-200%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-buttonColumbusView .cesium-sceneModePicker-icon2D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-icon3D{left:-100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-button2D .cesium-sceneModePicker-iconColumbusView{left:100%}.cesium-sceneModePicker-wrapper .cesium-sceneModePicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}span.cesium-projectionPicker-wrapper{display:inline-block;position:relative;margin:0 3px}.cesium-projectionPicker-visible{visibility:visible;opacity:1;transition:opacity .25s linear}.cesium-projectionPicker-hidden{visibility:hidden;opacity:0;transition:visibility 0s .25s,opacity .25s linear}.cesium-projectionPicker-wrapper .cesium-projectionPicker-none{display:none}.cesium-projectionPicker-wrapper .cesium-projectionPicker-dropDown-icon{box-sizing:border-box;padding:0;margin:3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic,.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective{margin:0 0 3px 0}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonPerspective .cesium-projectionPicker-iconOrthographic{left:100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-buttonOrthographic .cesium-projectionPicker-iconPerspective{left:-100%}.cesium-projectionPicker-wrapper .cesium-projectionPicker-selected{border-color:#2e2;box-shadow:0 0 8px #fff,0 0 8px #fff}.cesium-performance-watchdog-message-area{position:relative;background-color:#ff0;color:#000;padding:10px}.cesium-performance-watchdog-message{margin-right:30px}.cesium-performance-watchdog-message-dismiss{position:absolute;right:0;margin:0 10px 0 0}.cesium-navigationHelpButton-wrapper{position:relative;display:inline-block}.cesium-navigation-help{visibility:hidden;position:absolute;top:38px;right:2px;width:250px;border-radius:10px;transform:scale(.01);transform-origin:234px -10px;transition:visibility 0s .25s,transform .25s ease-in}.cesium-navigation-help-visible{visibility:visible;transform:scale(1);transition:transform .25s ease-out}.cesium-navigation-help-instructions{border:1px solid #444;background-color:rgba(38,38,38,.75);padding-bottom:5px;border-radius:0 0 10px 10px}.cesium-click-navigation-help{display:none}.cesium-touch-navigation-help{display:none;padding-top:5px}.cesium-click-navigation-help-visible{display:block}.cesium-touch-navigation-help-visible{display:block}.cesium-navigation-help-pan{color:#6cf;font-weight:700}.cesium-navigation-help-zoom{color:#65fd00;font-weight:700}.cesium-navigation-help-rotate{color:#ffd800;font-weight:700}.cesium-navigation-help-tilt{color:#d800d8;font-weight:700}.cesium-navigation-help-details{color:#fff}.cesium-navigation-button{color:#fff;background-color:transparent;border-bottom:none;border-top:1px solid #444;border-right:1px solid #444;margin:0;width:50%;cursor:pointer}.cesium-navigation-button-icon{vertical-align:middle;padding:5px 1px}.cesium-navigation-button:focus{outline:0}.cesium-navigation-button-left{border-radius:10px 0 0 0;border-left:1px solid #444}.cesium-navigation-button-right{border-radius:0 10px 0 0;border-left:none}.cesium-navigation-button-selected{background-color:rgba(38,38,38,.75)}.cesium-navigation-button-unselected{background-color:rgba(0,0,0,.75)}.cesium-navigation-button-unselected:hover{background-color:rgba(76,76,76,.75)}.cesium-selection-wrapper{position:absolute;width:160px;height:160px;pointer-events:none;visibility:hidden;opacity:0;transition:visibility 0s .2s,opacity .2s ease-in}.cesium-selection-wrapper-visible{visibility:visible;opacity:1;transition:opacity .2s ease-out}.cesium-selection-wrapper svg{fill:#2e2;stroke:#000;stroke-width:1.1px}.cesium-timeline-main{position:relative;left:0;bottom:0;overflow:hidden;border:solid 1px #888}.cesium-timeline-trackContainer{width:100%;overflow:auto;border-top:solid 1px #888;position:relative;top:0;left:0}.cesium-timeline-tracks{position:absolute;top:0;left:0;width:100%}.cesium-timeline-needle{position:absolute;left:0;top:1.7em;bottom:0;width:1px;background:red}.cesium-timeline-bar{position:relative;left:0;top:0;overflow:hidden;cursor:pointer;width:100%;height:1.7em;background:linear-gradient(to bottom,rgba(116,117,119,.8) 0,rgba(58,68,82,.8) 11%,rgba(46,50,56,.8) 46%,rgba(53,53,53,.8) 81%,rgba(53,53,53,.8) 100%)}.cesium-timeline-ruler{visibility:hidden;white-space:nowrap;font-size:80%;z-index:-200}.cesium-timeline-highlight{position:absolute;bottom:0;left:0;background:#08f}.cesium-timeline-ticLabel{position:absolute;top:0;left:0;white-space:nowrap;font-size:80%;color:#eee}.cesium-timeline-ticMain{position:absolute;bottom:0;left:0;width:1px;height:50%;background:#eee}.cesium-timeline-ticSub{position:absolute;bottom:0;left:0;width:1px;height:33%;background:#aaa}.cesium-timeline-ticTiny{position:absolute;bottom:0;left:0;width:1px;height:25%;background:#888}.cesium-timeline-icon16{display:block;position:absolute;width:16px;height:16px;background-image:url('+n+");background-repeat:no-repeat}.cesium-viewer{font-family:sans-serif;font-size:16px;overflow:hidden;display:block;position:relative;top:0;left:0;width:100%;height:100%}.cesium-viewer-cesiumWidgetContainer{width:100%;height:100%}.cesium-viewer-bottom{display:block;position:absolute;bottom:0;left:0;padding-right:5px}.cesium-viewer .cesium-widget-credits{display:inline;position:static;bottom:auto;left:auto;padding-right:0;color:#fff;font-size:10px;text-shadow:0 0 2px #000}.cesium-viewer-timelineContainer{position:absolute;bottom:0;left:169px;right:29px;height:27px;padding:0;margin:0;overflow:hidden;font-size:14px}.cesium-viewer-animationContainer{position:absolute;bottom:0;left:0;padding:0;width:169px;height:112px}.cesium-viewer-fullscreenContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-vrContainer{position:absolute;bottom:0;right:0;padding:0;width:29px;height:29px;overflow:hidden}.cesium-viewer-toolbar{display:block;position:absolute;top:5px;right:5px}.cesium-viewer-cesiumInspectorContainer{display:block;position:absolute;top:50px;right:10px}.cesium-viewer-geocoderContainer{position:relative;display:inline-block;margin:0 3px}.cesium-viewer-cesium3DTilesInspectorContainer{display:block;position:absolute;top:50px;right:10px;max-height:calc(100% - 120px);box-sizing:border-box;overflow-y:auto;overflow-x:hidden}",""])},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var a=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),r=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot).concat(e," */")}));return[i].concat(r).concat([a]).join("\n")}var o,s,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},a=0;a<this.length;a++){var r=this[a][0];null!=r&&(n[r]=!0)}for(var o=0;o<e.length;o++){var s=e[o];null!=s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="(".concat(s[2],") and (").concat(i,")")),t.push(s))}},t}},function(e,t,i){"use strict";e.exports=function(e,t){return"string"!=typeof(e=e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),/["'() \t\n]/.test(e)||t?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB3AH1ZAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sIDBITKIVzLEMAAAKNSURBVEjHxdXNSxRhHAfw7zzrqhuoWJnSkrippUVSEKsHI9BTUYdAJA/RoYMREV26rAdn6tAfUARi16hQqkOBQRgUEYFWEC3OwczMjdZd92VmdWfmeelgTjO7q7gb0VzmmZnn85vvPPPMM8B/3qTcE2PPpuTZKB1eWuUQACgXYACYwVFbCTTVeZXB/i55o4LFelcAZfStYD4vpAoPGAGo4GBcQEgSOAUMQyAezwK6iQfDPXnhS/FkHZ+/8VLMWxxqWkfH3gbMRNOYi2roavbja0zHQmoFPYf8ED4Ko4aivm9MOG/u9I8mwrafeK7a/tVrNc/bARYN5noadeq7q0342vXw9CIMU6BmW8rVP9cPBPe52uu+v3O/y9sB4gkTWs6Qsk0mj5ExXMelejvA8WafYmkmGPHanTijdtvif8rx5RiCjdWKs2Cp3jWRDl96KhrbqlBeJqBOLyLQXg0IgbkZDS0dO8EZxZfPSTA9jvDDK3mT0OmP1FXh3XwEEAKdTX5MRWLgjCK4pwH3xt/YnjgLHAv4lHTCAKMMu/wV+KZGob6PoKyMQ0+sgBpZVJZn0NterxQaVqef/DRn+/EXYds/mZx2eVeAW9d65dhCEsaKCb7K8HH0gqTevyh9GDkn0VULRiaLzJKGBu9swfdaiie5RVo9ESURN8E8BE0n7ggACJy8KzghSCzp6DmwWxkaCm24EBXr8wI8Hrkq06QBiRC0t24HALS11IBTCyJl4vb1AXmzpbVYTwoVOXN0h7L8Mwtm8bXPybIQ/5FCX3dA2cr6XowvGCA02CvztAnz9+JiZk1AMxG6fEreSoBiPNmoyNnuWiWVzAIAtISO08E6pZi/3N96AIDn4E3h3P8L/wshP+txtEs4JAAAAABJRU5ErkJggg=="},function(e,t,i){"use strict";var n,a={},r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}();function s(e,t){for(var i=[],n={},a=0;a<e.length;a++){var r=e[a],o=t.base?r[0]+t.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};n[o]?n[o].parts.push(s):i.push(n[o]={id:o,parts:[s]})}return i}function l(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=a[n.id],o=0;if(r){for(r.refs++;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(_(n.parts[o],t))}else{for(var s=[];o<n.parts.length;o++)s.push(_(n.parts[o],t));a[n.id]={id:n.id,refs:1,parts:s}}}}function u(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var n=i.nc;n&&(e.attributes.nonce=n)}if(Object.keys(e.attributes).forEach((function(i){t.setAttribute(i,e.attributes[i])})),"function"==typeof e.insert)e.insert(t);else{var a=o(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var d,c=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function f(e,t,i,n){var a=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=c(t,a);else{var r=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(r,o[t]):e.appendChild(r)}}function h(e,t,i){var n=i.css,a=i.media,r=i.sourceMap;if(a&&e.setAttribute("media",a),r&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var p=null,m=0;function _(e,t){var i,n,a;if(t.singleton){var r=m++;i=p||(p=u(t)),n=f.bind(null,i,r,!1),a=f.bind(null,i,r,!0)}else i=u(t),n=h.bind(null,i,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=r());var i=s(e,t);return l(i,t),function(e){for(var n=[],r=0;r<i.length;r++){var o=i[r],u=a[o.id];u&&(u.refs--,n.push(u))}e&&l(s(e,t),t);for(var d=0;d<n.length;d++){var c=n[d];if(0===c.refs){for(var f=0;f<c.parts.length;f++)c.parts[f]();delete a[c.id]}}}}},function(e,t){e.exports='// #ifdef GL_OES_standard_derivatives\n// #extension GL_OES_standard_derivatives : enable\n// #endif \n\nuniform bool u_showIntersection;\nuniform bool u_showThroughEllipsoid;\n\nuniform float u_sensorRadius;\nuniform float u_normalDirection;\n\nvarying vec3 v_positionWC;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvec4 getColor(float sensorRadius, vec3 pointEC)\n{\n czm_materialInput materialInput;\n \n vec3 pointMC = (czm_inverseModelView * vec4(pointEC, 1.0)).xyz; \n materialInput.st = sensor2dTextureCoordinates(sensorRadius, pointMC); \n materialInput.str = pointMC / sensorRadius;\n \n vec3 positionToEyeEC = -v_positionEC;\n materialInput.positionToEyeEC = positionToEyeEC;\n \n vec3 normalEC = normalize(v_normalEC);\n materialInput.normalEC = u_normalDirection * normalEC;\n \n czm_material material = czm_getMaterial(materialInput);\n return mix(czm_phong(normalize(positionToEyeEC), material, czm_lightDirectionEC), vec4(material.diffuse, material.alpha), 0.4);\n}\n\nbool isOnBoundary(float value, float epsilon)\n{\n float width = getIntersectionWidth();\n float tolerance = width * epsilon;\n\n#ifdef GL_OES_standard_derivatives\n float delta = max(abs(dFdx(value)), abs(dFdy(value)));\n float pixels = width * delta;\n float temp = abs(value);\n // There are a couple things going on here.\n // First we test the value at the current fragment to see if it is within the tolerance.\n // We also want to check if the value of an adjacent pixel is within the tolerance,\n // but we don\'t want to admit points that are obviously not on the surface.\n // For example, if we are looking for "value" to be close to 0, but value is 1 and the adjacent value is 2,\n // then the delta would be 1 and "temp - delta" would be "1 - 1" which is zero even though neither of\n // the points is close to zero.\n return temp < tolerance && temp < pixels || (delta < 10.0 * tolerance && temp - delta < tolerance && temp < pixels);\n#else\n return abs(value) < tolerance;\n#endif\n}\n\nvec4 shade(bool isOnBoundary)\n{\n if(u_showIntersection && isOnBoundary)\n {\n return getIntersectionColor();\n }\n return getColor(u_sensorRadius, v_positionEC);\n}\n\nfloat ellipsoidSurfaceFunction(vec3 inverseRadii, vec3 point)\n{\n vec3 scaled = inverseRadii * point;\n return dot(scaled, scaled) - 1.0;\n}\n\nvoid main()\n{\n vec3 sensorVertexWC = czm_model[3].xyz; // (0.0, 0.0, 0.0) in model coordinates\n vec3 sensorVertexEC = czm_modelView[3].xyz; // (0.0, 0.0, 0.0) in model coordinates\n\n // czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n float ellipsoidValue = ellipsoidSurfaceFunction(czm_ellipsoidInverseRadii, v_positionWC);\n\n // Occluded by the ellipsoid?\n\tif(!u_showThroughEllipsoid)\n\t{\n\t // Discard if in the ellipsoid \n\t // PERFORMANCE_IDEA: A coarse check for ellipsoid intersection could be done on the CPU first.\n\t if(ellipsoidValue < 0.0)\n\t {\n discard;\n\t }\n\n\t // Discard if in the sensor\'s shadow\n\t if(inSensorShadow(sensorVertexWC, v_positionWC))\n\t {\n\t discard;\n\t }\n }\n\n // Discard if not in the sensor\'s sphere\n // PERFORMANCE_IDEA: We can omit this check if the radius is Number.POSITIVE_INFINITY.\n if(distance(v_positionEC, sensorVertexEC) > u_sensorRadius)\n {\n discard;\n }\n \n // Notes: Each surface functions should have an associated tolerance based on the floating point error.\n bool isOnEllipsoid = isOnBoundary(ellipsoidValue, czm_epsilon3);\n gl_FragColor = shade(isOnEllipsoid);\n}\n'},function(e,t){e.exports="attribute vec4 position;\nattribute vec3 normal;\n\nvarying vec3 v_positionWC;\nvarying vec3 v_positionEC;\nvarying vec3 v_normalEC;\n\nvoid main()\n{\n gl_Position = czm_modelViewProjection * position;\n v_positionWC = (czm_model * position).xyz;\n v_positionEC = (czm_modelView * position).xyz;\n v_normalEC = czm_normal * normal;\n}"},function(e,t){e.exports="uniform vec4 u_intersectionColor;\nuniform float u_intersectionWidth;\n\nbool inSensorShadow(vec3 coneVertexWC, vec3 pointWC)\n{\n // Diagonal matrix from the unscaled ellipsoid space to the scaled space. \n vec3 D = czm_ellipsoidInverseRadii;\n\n // Sensor vertex in the scaled ellipsoid space\n vec3 q = D * coneVertexWC;\n float qMagnitudeSquared = dot(q, q);\n float test = qMagnitudeSquared - 1.0;\n \n // Sensor vertex to fragment vector in the ellipsoid's scaled space\n vec3 temp = D * pointWC - q;\n float d = dot(temp, q);\n \n // Behind silhouette plane and inside silhouette cone\n return (d < -test) && (d / length(temp) < -sqrt(test));\n}\n\n///////////////////////////////////////////////////////////////////////////////\n\nvec4 getIntersectionColor()\n{\n return u_intersectionColor;\n}\n\nfloat getIntersectionWidth()\n{\n return u_intersectionWidth;\n}\n\nvec2 sensor2dTextureCoordinates(float sensorRadius, vec3 pointMC)\n{\n // (s, t) both in the range [0, 1]\n float t = pointMC.z / sensorRadius;\n float s = 1.0 + (atan(pointMC.y, pointMC.x) / czm_twoPi);\n s = s - floor(s);\n \n return vec2(s, t);\n}\n"},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(151),l=i(390),u=i(2),d=i(1003),c=i(326),f=i(391),h=i(7),p={width:10,repeat:15,speed:0,dashLength:2,asynchronous:!1,color:h.default.WHITE,arcType:c.ArcType.GEODESIC},m=function(e){function t(t){var i=e.call(this,t)||this;return i.options=t,i.leadLineOption={image:"",width:10,repeat:15,speed:0,dashLength:20,asynchronous:!1,arcType:c.ArcType.NONE,color:h.default.WHITE},i.passLineOption={image:"",width:10,repeat:15,speed:0,asynchronous:!1,arcType:c.ArcType.NONE,dashLength:20,color:h.default.WHITE},i._currentIndex=0,i._autoStep=!1,i._stepDistance=1e3,i.equalsEpsilon=1e-5,i.passPositions=[],i.leadPositions=[],i.enableRepeatAdjust=!1,i.lastRepeat=60,i.addMark=!0,i.lineRepeatArray=[],i.leadLineOption=r(r({},p),t.leadLineOption),i.passLineOption=r(r({},p),t.passLineOption),i._positions=u.default(t.positions,[]),i._autoStep=u.default(t.autoStep,!1),i._stepDistance=u.default(t.stepDistance,1e3),i.dataFit=u.default(t.dataFit,!0),i.addMark=u.default(t.addMark,!0),i.equalsEpsilon=u.default(t.equalsEpsilon,1e-5),i.markOptions={labelConfig:t.labelConfig,billboardConfig:t.billboardConfig,position:t.currentPosition},t.currentPosition?i._currentPosition=t.currentPosition.clone():i._currentPosition=i._positions.length>0?i._positions[0]:null,i._currentIndex=u.default(t.currentIndex,0),i.enableRepeatAdjust=u.default(t.enableRepeatAdjust,!1),i.lineBaseDistance=u.default(t.lineBaseDistance,1e4),i.lineMaxDistance=u.default(t.lineMaxDistance,2e4),i.lineMinDistance=u.default(t.lineMinDistance,100),i.lineBaseRepeat=u.default(t.lineBaseRepeat,10),i.lineMaxRepeat=u.default(t.lineMaxRepeat,50),i.lineMinRepeat=u.default(t.lineMinRepeat,1),i.lineRepeatArray=u.default(t.lineRepeatArray,[]),i.lastRepeat=i.lineBaseRepeat,i.leadLineOption.image&&(i.dashMaterial=new f.default({image:i.leadLineOption.image,dashLength:i.leadLineOption.dashLength,color:i.leadLineOption.color,speed:i.leadLineOption.speed})),i._positions.length>1&&i.createPrimitive(),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.leadLine&&(this.leadLine.show=e),this.passLine&&(this.passLine.show=e),this.mark&&(this.mark.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positions",{get:function(){return this._positions},set:function(e){this._positions=e,this.createPrimitive(),this.reAdded()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentPosition",{get:function(){return this._currentPosition},set:function(e){this._currentPosition=e,this.createPrimitive(),this.reAdded()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentIndex",{get:function(){return this._currentIndex},set:function(e){this._currentIndex=e,this.createPrimitive(),this.reAdded()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoStep",{get:function(){return this._autoStep},set:function(e){this._autoStep=e,this.createPrimitive(),this.reAdded()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stepDistance",{get:function(){return this._stepDistance},set:function(e){this._stepDistance=e,this.createPrimitive(),this.reAdded()},enumerable:!1,configurable:!0}),t.prototype.updatePrimitive=function(){this.createPrimitive(),this.reAdded()},t.prototype.updateIndex=function(e,t){e<0?this.updateMarkPosition(t):(this._currentPosition=t.clone(),this.currentIndex=e)},t.prototype.updateMarkPosition=function(e){this.mark&&(this.mark.position=e.clone())},t.prototype.getPassDistance=function(){if(this.passPositions.length>1){for(var e=this.passPositions.length,t=0,i=0;i<e-1;i++)t+=o.default.distance(this.passPositions[i],this.passPositions[i+1]);return t}return 0},t.prototype.getLeadDistance=function(){if(this.leadPositions.length>1){for(var e=this.leadPositions.length,t=0,i=0;i<e-1;i++)t+=o.default.distance(this.leadPositions[i],this.leadPositions[i+1]);return t}return 0},t.prototype.getTotalDistance=function(){if(this.positions.length>1){for(var e=this.positions.length,t=0,i=0;i<e-1;i++)t+=o.default.distance(this.positions[i],this.positions[i+1]);return t}return 0},t.prototype.updateCurrentPosition=function(e){for(var t=new o.default,i=new o.default,n=new o.default,a=-1,r=Math.max(0,this.currentIndex);r<this.positions.length-1;r++){if(o.default.equals(this.positions[r],e)){a=r;break}if(o.default.equals(this.positions[r+1],e)){a=r+1;break}if(o.default.subtract(this.positions[r+1],this.positions[r],t),o.default.subtract(e,this.positions[r],i),o.default.cross(t,i,n),o.default.angleBetween(t,i)<this.equalsEpsilon&&o.default.magnitude(t)>o.default.magnitude(i)){a=r;break}}a>0?this.updateIndex(a,e):this.updateMarkPosition(e)},t.prototype.createPrimitive=function(){var e=this;if(this.currentPosition){this.passLine&&(this.remove(this.passLine),this.passLine=null),this.leadLine&&(this.remove(this.leadLine),this.leadLine=null),this.mark&&(this.remove(this.mark),this.mark=null);var t=[],i=[];if(this.dataFit){var n=this.positions.findIndex((function(t){return t.equals(e.currentPosition)}));n>-1?(t=this.positions.slice(0,n+1),i=this.positions.slice(n)):i=this.positions.slice(0)}else t=this.positions.slice(0,this.currentIndex+1),i=this.positions.slice(this.currentIndex+1),t.push(this.currentPosition.clone()),i.unshift(this.currentPosition.clone());if(this.passPositions=[].concat(t),this.leadPositions=[].concat(i),t.length>1){this.passLineOption.repeat;this.autoStep&&this.getCalculateRepeat(t,this.stepDistance),this.passLine=new l.default({positions:t,width:this.passLineOption.width,asynchronous:this.passLineOption.asynchronous,arcType:this.passLineOption.arcType,material:this.passLineOption.color})}if(i.length>1){this.leadLineOption.repeat;this.autoStep&&this.getCalculateRepeat(i,this.stepDistance),this.leadLine=new l.default({positions:i,width:this.leadLineOption.width,asynchronous:this.leadLineOption.asynchronous,arcType:this.leadLineOption.arcType,material:this.dashMaterial})}this.currentPosition&&(this.markOptions.position=this.currentPosition.clone()),this.addMark&&(this.mark=new d.default(this.markOptions))}},t.prototype.getCalculateRepeat=function(e,t){void 0===e&&(e=[]);for(var i=e.length,n=0,a=0;a<i-1;a++)n+=o.default.distance(e[0],e[1]);return Math.ceil(n/t)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.enableRepeatAdjust){var n=1,a=this.getViewer();if(!a)return;var r=a.cesiumViewer.camera.positionCartographic.height;if(this.lineRepeatArray.length>0){for(var o=!1,s=this.lineRepeatArray.length,l=0;l<s;l++)if(r<this.lineRepeatArray[l].distance){n=this.lineRepeatArray[l].repeat,o=!0;break}o||(n=this.lineRepeatArray[s-1].repeat)}else n=r>this.lineMaxDistance?this.lineMinRepeat:r<this.lineMinDistance?this.lineMaxRepeat:Math.round(this.lineBaseRepeat*this.lineBaseDistance/r);n=Math.min(n,this.lineMaxRepeat),(n=Math.max(n,this.lineMinRepeat))!==this.lastRepeat&&(this.lastRepeat=n,this.leadLine._material.repeat=n,this.passLine._material.repeat=n)}},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this.passLine&&(this.add(this.passLine),this.passLine.show=this.show),this.leadLine&&(this.add(this.leadLine),this.leadLine.show=this.show),this.mark&&this.add(this.mark)},t.prototype.reAdded=function(){this.passLine&&(this.add(this.passLine),this.passLine.show=this.show),this.leadLine&&(this.add(this.leadLine),this.leadLine.show=this.show),this.mark&&(this.add(this.mark),this.mark.show=this.show)},t}(s.default);t.default=m},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(54),o=i(1),s=i(22),l=i(7),u=i(53),d=i(43),c=i(14),f=i(12),h=i(6),p=i(185),m=i(52),_=i(69),g=i(143),v=i(156),y=i(64),b=i(13),w=i(151),O=i(2),x=i(98),A=new f.default,T=(new o.default,new s.default),E=function(e){function t(t){var i=e.call(this,t)||this;return i._asynchronous=!0,i._positionsInertial=t.positions,i._times=t.times,i._positionsFixed=i.getFixedPositions(t.positions,t.times),i._material=O.default(t.material,l.default.WHITE),i._width=O.default(t.width,1),i._arcType=t.arcType||r.default.NONE,i._asynchronous=O.default(t.asynchronous,!1),i._enableDepthTest=O.default(t.enableDepthTest,!0),i._resolution=O.default(t.resolution,43200),i._enableAdjust=O.default(t.enableAdjust,!0),i._enableSample=O.default(t.enableSample,!0),i._sampleStep=O.default(t.sampleStep,60),i.createPrimitive(t.positions,t.material,t.width,t.arcType),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polyline&&(this.polyline.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"referenceFrame",{get:function(){return this._referenceFrame},set:function(e){var t;if(this._referenceFrame!==e){this._referenceFrame=e,this._polylines.remove(this.polyline);var i=e===x.default.FIXED?this._positionsFixed:this._positionsInertial;this.createPrimitive(i,this._material,this._width,this._arcType),this._polylines.add(this.polyline),e===x.default.INERTIAL&&(null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.mode)!==b.default.SCENE2D&&m.default.computeIcrfToFixedMatrix(this.getViewer().cesiumViewer.clock.currentTime,A)&&h.default.multiplyByMatrix3(h.default.IDENTITY,A,this.polyline.modelMatrix)}},enumerable:!1,configurable:!0}),t.prototype.getFixedPositions=function(e,t){var i=[];return t.forEach((function(t,n){m.default.computeIcrfToFixedMatrix(t,A);var a=new o.default;f.default.multiplyByVector(A,e[n],a),i.push(a)})),i},t.prototype.createPrimitive=function(e,t,i,n){var a;if(void 0===t&&(t=l.default.YELLOW),void 0===i&&(i=1),void 0===n&&(n=r.default.NONE),!(e.length<2)){var o=this.isColorsPerVertex(t),c=[];c=(null===(a=this.getViewer())||void 0===a?void 0:a.sceneMode)===b.default.SCENE2D?this._positionsFixed.map((function(e,t){return s.default.fromCartesian(e,void 0,T),T.height=0,s.default.toCartesian(T,void 0)})):e;var f=new d.default({geometry:new p.default({positions:c,arcType:n,width:i,vertexFormat:t instanceof _.default?v.default.VERTEX_FORMAT:g.default.VERTEX_FORMAT,colors:o?t:void 0,colorsPerVertex:o}),attributes:t instanceof l.default?{color:u.default.fromColor(t)}:void 0}),h=!1;h=o?t.some((function(e){return e.alpha<1})):!(t instanceof l.default)||t.alpha<1,this.polyline=new y.default({geometryInstances:f,asynchronous:this._asynchronous,appearance:this.getAppearance(t,h),show:this.enabled&&this._show}),this.polyline.entityId=this.id,this.readyPromise=null,this.readyPromise=this.polyline.readyPromise}},t.prototype.updatePosition=function(e,t){var i;if(this._positionsInertial.length>2&&this._enableSample){var n=this._times.length;if(c.default.secondsDifference(t,this._times[n-1])>this._sampleStep){this._positionsInertial.splice(n-1,1,e),this._times.splice(n-1,1,t),m.default.computeIcrfToFixedMatrix(t,A);var a=new o.default;f.default.multiplyByVector(A,e,a),this._positionsFixed.splice(n-1,1,a)}else{this._positionsInertial.push(e),this._times&&this._times.push(t),m.default.computeIcrfToFixedMatrix(t,A);a=new o.default;f.default.multiplyByVector(A,e,a),this._positionsFixed.push(a)}}else{this._positionsInertial.push(e),this._times&&this._times.push(t),m.default.computeIcrfToFixedMatrix(t,A);a=new o.default;f.default.multiplyByVector(A,e,a),this._positionsFixed.push(a)}if(this._enableAdjust&&c.default.secondsDifference(t,this._times[0])>this._resolution){for(var r=[],s=[],l=[],u=0;u<this._times.length;u++)c.default.secondsDifference(t,this._times[u])<=this._resolution&&(r.push(this._times[u]),s.push(this._positionsInertial[u]),l.push(this._positionsFixed[u]));this._times=r,this._positionsInertial=s,this._positionsFixed=l}this.polyline&&this._polylines.remove(this.polyline);var d=this.referenceFrame===x.default.FIXED?this._positionsFixed:this._positionsInertial;this.createPrimitive(d,this._material,this._width,this._arcType),this.polyline&&this._polylines.add(this.polyline),this.referenceFrame===x.default.INERTIAL&&(null===(i=this.getViewer())||void 0===i?void 0:i.cesiumViewer.scene.mode)!==b.default.SCENE2D&&this.polyline&&m.default.computeIcrfToFixedMatrix(t,A)&&h.default.multiplyByMatrix3(h.default.IDENTITY,A,this.polyline.modelMatrix)},t.prototype.isColorsPerVertex=function(e){return!!(Array.isArray(e)&&e.length>0&&e[0]instanceof l.default)},t.prototype.getAppearance=function(e,t){return void 0===t&&(t=!1),e instanceof _.default?new v.default({material:e,translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}}):new g.default({translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}})},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);var i=this.getLODSceneLayer();i&&(this._polylines=i.polylines),this.polyline&&this._polylines&&this._polylines.add(this.polyline),this.show=t.show,this.afterSwitchMode(this.getViewer().sceneMode)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polylines&&this._polylines.remove(this.polyline)},t.prototype.beforeSwitchMode=function(t){if(e.prototype.beforeSwitchMode.call(this,t),t!==b.default.SCENE3D&&this._polylines){this._polylines.remove(this.polyline);var i=this.referenceFrame===x.default.FIXED?this._positionsFixed:this._positionsInertial;this.createPrimitive(i,this._material,this._width,this._arcType),this._polylines.add(this.polyline)}},t.prototype.afterSwitchMode=function(t){if(e.prototype.afterSwitchMode.call(this,t),t===b.default.SCENE3D&&this._polylines){this._polylines.remove(this.polyline);var i=this.referenceFrame===x.default.FIXED?this._positionsFixed:this._positionsInertial;this.createPrimitive(i,this._material,this._width,this._arcType),this._polylines.add(this.polyline)}},t}(w.default);t.default=E},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(13),s=i(1),l=i(22),u=i(151),d=i(489),c=i(27),f=i(391),h=i(54),p=i(0),m=new l.default,_=new l.default,g=(new c.default,new s.default(0,0,0)),v=new s.default(0,0,1),y=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,t)||this;if(n.options=t,n.cartesian1=new s.default,n.cartesian2=new s.default,n._keepNonePerformanceMode=!1,p.default(t.asynchronous)||(t.asynchronous=!0),n._entity1=t.entityFrom,n._entity2=t.entityTo,t.polylineOptions&&(t.polylineOptions.arcType=void 0!==t.polylineOptions.arcType?t.polylineOptions.arcType:h.default.NONE),n.polylineOptions=t.polylineOptions,n._lengthPerSection=n.polylineOptions.lengthPerSection?n.polylineOptions.lengthPerSection:5e5,n._keepNonePerformanceMode=n.polylineOptions.arcType!==h.default.NONE,n._keepNonePerformanceMode){var a=[];"number"==typeof n.entity1.position.x?a.push(n.entity1.position):a.push(n.entity1.position._value),"number"==typeof n.entity2.position.x?a.push(n.entity2.position):a.push(n.entity2.position._value),n._polyline=new d.default(r(r({},n.polylineOptions),{positions:a,asynchronous:t.asynchronous}))}else n._polyline=new d.default(r(r({},n.polylineOptions),{positions:[g,v],asynchronous:t.asynchronous}));return n._performanceMode=i,n}return a(t,e),Object.defineProperty(t.prototype,"entity1",{get:function(){return this._entity1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entity2",{get:function(){return this._entity2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"performanceMode",{get:function(){return this._performanceMode},set:function(e){var t;if(this._performanceMode=e,this.parent){null===(t=this.parent)||void 0===t||t.remove(this._polyline);var i=[];"number"==typeof this.entity1.position.x?i.push(this.entity1.position):i.push(this.entity1.position._value),"number"==typeof this.entity2.position.x?i.push(this.entity2.position):i.push(this.entity2.position._value),this._polyline=new d.default(r(r({},this.polylineOptions),{positions:i,asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=this.show}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t;if(this._show=e,this.performanceMode&&!this._keepNonePerformanceMode)this._polyline.show=e;else if(e&&this.parent){var i=[];"number"==typeof this.entity1.position.x?i.push(this.entity1.position):i.push(this.entity1.position._value),"number"==typeof this.entity2.position.x?i.push(this.entity2.position):i.push(this.entity2.position._value),this._polyline=new d.default(r(r({},this.polylineOptions),{positions:i,asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=e}else null===(t=this.parent)||void 0===t||t.remove(this._polyline)},enumerable:!1,configurable:!0}),t.prototype.destroyForward=function(){this.parent.remove(this._polyline)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i)},t.prototype.updateForwardManual=function(){var e,t,i=this.getViewer().sceneMode;if(this.parent.remove(this._polyline),e="number"==typeof this.entity1.position.x?this.entity1.position:this.entity1.position._value,t="number"==typeof this.entity2.position.x?this.entity2.position:this.entity2.position._value,i===o.default.SCENE2D?(l.default.fromCartesian(e,void 0,m),l.default.fromCartesian(t,void 0,_),m.height=0,_.height=0,l.default.toCartesian(m,void 0,this.cartesian1),l.default.toCartesian(_,void 0,this.cartesian2)):(this.cartesian1=e,this.cartesian2=t),this.polylineOptions.material instanceof f.default){var n=this._polyline.polyline.appearance.material;n.startPosition=e,n.endPosition=t}this._polyline=new d.default(r(r({},this.polylineOptions),{positions:[this.cartesian1,this.cartesian2],asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=this.show},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),t.add(this._polyline)},t.prototype.beforeSwitchMode=function(e){e!==o.default.SCENE2D&&this.parent.remove(this._polyline)},t.prototype.afterSwitchMode=function(e){e!==o.default.SCENE2D&&(this._polyline=new d.default(r(r({},this.polylineOptions),{positions:[g,v],asynchronous:!1})),this.parent.add(this._polyline))},t}(u.default);t.default=y},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(968),l={material:new(i(1007).default),topRadius:1,bottomRadius:1,length:10,speed:5,color1:o.default.YELLOW,color2:o.default.RED},u=function(e){function t(t){var i=this,n=r(r({},l),t);return(i=e.call(this,n)||this).material.speed=n.speed,i}return a(t,e),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(6),s=i(13),l=i(1),u=i(22),d=i(151),c=i(489),f=i(27),h=i(391),p=i(54),m=i(324),_=i(0),g=i(12),v=i(5),y=(new u.default,new u.default,new f.default),b=new l.default(0,0,0),w=new l.default(0,0,1),O=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,{id:t.id})||this;return n.cartesian1=new l.default,n.cartesian2=new l.default,n._keepNonePerformanceMode=!1,_.default(t.asynchronous)||(t.asynchronous=!0),n._startPoint=t.startPoint,n._endPoint=t.endPoint,n._baseMatrix=o.default.fromRotationTranslation(g.default.fromRotationZ(v.default.toRadians(45))),t.polylineOptions&&(t.polylineOptions.arcType=void 0!==t.polylineOptions.arcType?t.polylineOptions.arcType:p.default.NONE),n.polylineOptions=t.polylineOptions,n._lengthPerSection=n.polylineOptions.lengthPerSection?n.polylineOptions.lengthPerSection:5e5,n._keepNonePerformanceMode=n.polylineOptions.arcType!==p.default.NONE,n._keepNonePerformanceMode?n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[n._startPoint,n._endPoint],asynchronous:t.asynchronous})):n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[b,w],asynchronous:t.asynchronous})),n._performanceMode=i,n}return a(t,e),Object.defineProperty(t.prototype,"startPoint",{get:function(){return this._startPoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"endPoint",{get:function(){return this._endPoint},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"performanceMode",{get:function(){return this._performanceMode},set:function(e){var t;this._performanceMode=e,this.parent&&(null===(t=this.parent)||void 0===t||t.remove(this._polyline),this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.startPoint,this.endPoint],asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=this.show)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t;this._show=e,this.performanceMode&&!this._keepNonePerformanceMode?this._polyline.show=e:e&&this.parent?(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.startPoint,this.endPoint],asynchronous:!1})),this.parent.add(this._polyline)):null===(t=this.parent)||void 0===t||t.remove(this._polyline)},enumerable:!1,configurable:!0}),t.prototype.destroyForward=function(){this.parent.remove(this._polyline)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&this._polyline.show){var n=this.getViewer().sceneMode;if(this.performanceMode&&!this._keepNonePerformanceMode&&n===s.default.SCENE3D){var a=w,r=l.default.subtract(this.endPoint,this.startPoint,this.cartesian1);if(m.default.calculateQuaternionFromV1ToV2(a,r,y),o.default.fromTranslationQuaternionRotationScale(this.startPoint,y,new l.default(1,1,l.default.magnitude(r)),this._polyline.polyline.modelMatrix),this.polylineOptions.material instanceof h.default){var u=this._polyline.polyline.appearance.material;u.startPosition=this.startPoint,u.endPosition=this.endPoint}}}},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),t.add(this._polyline)},t.prototype.beforeSwitchMode=function(e){e!==s.default.SCENE2D&&this.parent.remove(this._polyline)},t.prototype.afterSwitchMode=function(e){e!==s.default.SCENE2D&&(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[b,w],asynchronous:!1})),this.parent.add(this._polyline))},t}(d.default);t.default=O},function(e,t,i){(function(e){var n=void 0!==e&&e||"undefined"!=typeof self&&self||window,a=Function.prototype.apply;function r(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new r(a.call(setTimeout,n,arguments),clearTimeout)},t.setInterval=function(){return new r(a.call(setInterval,n,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(n,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},i(1206),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,i(417))},function(e,t,i){(function(e,t){!function(e,i){"use strict";if(!e.setImmediate){var n,a,r,o,s,l=1,u={},d=!1,c=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,"[object process]"==={}.toString.call(e.process)?n=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,i=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=i,t}}()?e.MessageChannel?((r=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){r.port2.postMessage(e)}):c&&"onreadystatechange"in c.createElement("script")?(a=c.documentElement,n=function(e){var t=c.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,a.removeChild(t),t=null},a.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(o="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(o)&&p(+t.data.slice(o.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),n=function(t){e.postMessage(o+t,"*")}),f.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),i=0;i<t.length;i++)t[i]=arguments[i+1];var a={callback:e,args:t};return u[l]=a,n(l),l++},f.clearImmediate=h}function h(e){delete u[e]}function p(e){if(d)setTimeout(p,0,e);else{var t=u[e];if(t){d=!0;try{!function(e){var t=e.callback,i=e.args;switch(i.length){case 0:t();break;case 1:t(i[0]);break;case 2:t(i[0],i[1]);break;case 3:t(i[0],i[1],i[2]);break;default:t.apply(void 0,i)}}(t)}finally{h(e),d=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,i(417),i(971))},function(e,t,i){var n={"./af":1011,"./af.js":1011,"./ar":1012,"./ar-dz":1013,"./ar-dz.js":1013,"./ar-kw":1014,"./ar-kw.js":1014,"./ar-ly":1015,"./ar-ly.js":1015,"./ar-ma":1016,"./ar-ma.js":1016,"./ar-ps":1017,"./ar-ps.js":1017,"./ar-sa":1018,"./ar-sa.js":1018,"./ar-tn":1019,"./ar-tn.js":1019,"./ar.js":1012,"./az":1020,"./az.js":1020,"./be":1021,"./be.js":1021,"./bg":1022,"./bg.js":1022,"./bm":1023,"./bm.js":1023,"./bn":1024,"./bn-bd":1025,"./bn-bd.js":1025,"./bn.js":1024,"./bo":1026,"./bo.js":1026,"./br":1027,"./br.js":1027,"./bs":1028,"./bs.js":1028,"./ca":1029,"./ca.js":1029,"./cs":1030,"./cs.js":1030,"./cv":1031,"./cv.js":1031,"./cy":1032,"./cy.js":1032,"./da":1033,"./da.js":1033,"./de":1034,"./de-at":1035,"./de-at.js":1035,"./de-ch":1036,"./de-ch.js":1036,"./de.js":1034,"./dv":1037,"./dv.js":1037,"./el":1038,"./el.js":1038,"./en-au":1039,"./en-au.js":1039,"./en-ca":1040,"./en-ca.js":1040,"./en-gb":1041,"./en-gb.js":1041,"./en-ie":1042,"./en-ie.js":1042,"./en-il":1043,"./en-il.js":1043,"./en-in":1044,"./en-in.js":1044,"./en-nz":1045,"./en-nz.js":1045,"./en-sg":1046,"./en-sg.js":1046,"./eo":1047,"./eo.js":1047,"./es":1048,"./es-do":1049,"./es-do.js":1049,"./es-mx":1050,"./es-mx.js":1050,"./es-us":1051,"./es-us.js":1051,"./es.js":1048,"./et":1052,"./et.js":1052,"./eu":1053,"./eu.js":1053,"./fa":1054,"./fa.js":1054,"./fi":1055,"./fi.js":1055,"./fil":1056,"./fil.js":1056,"./fo":1057,"./fo.js":1057,"./fr":1058,"./fr-ca":1059,"./fr-ca.js":1059,"./fr-ch":1060,"./fr-ch.js":1060,"./fr.js":1058,"./fy":1061,"./fy.js":1061,"./ga":1062,"./ga.js":1062,"./gd":1063,"./gd.js":1063,"./gl":1064,"./gl.js":1064,"./gom-deva":1065,"./gom-deva.js":1065,"./gom-latn":1066,"./gom-latn.js":1066,"./gu":1067,"./gu.js":1067,"./he":1068,"./he.js":1068,"./hi":1069,"./hi.js":1069,"./hr":1070,"./hr.js":1070,"./hu":1071,"./hu.js":1071,"./hy-am":1072,"./hy-am.js":1072,"./id":1073,"./id.js":1073,"./is":1074,"./is.js":1074,"./it":1075,"./it-ch":1076,"./it-ch.js":1076,"./it.js":1075,"./ja":1077,"./ja.js":1077,"./jv":1078,"./jv.js":1078,"./ka":1079,"./ka.js":1079,"./kk":1080,"./kk.js":1080,"./km":1081,"./km.js":1081,"./kn":1082,"./kn.js":1082,"./ko":1083,"./ko.js":1083,"./ku":1084,"./ku-kmr":1085,"./ku-kmr.js":1085,"./ku.js":1084,"./ky":1086,"./ky.js":1086,"./lb":1087,"./lb.js":1087,"./lo":1088,"./lo.js":1088,"./lt":1089,"./lt.js":1089,"./lv":1090,"./lv.js":1090,"./me":1091,"./me.js":1091,"./mi":1092,"./mi.js":1092,"./mk":1093,"./mk.js":1093,"./ml":1094,"./ml.js":1094,"./mn":1095,"./mn.js":1095,"./mr":1096,"./mr.js":1096,"./ms":1097,"./ms-my":1098,"./ms-my.js":1098,"./ms.js":1097,"./mt":1099,"./mt.js":1099,"./my":1100,"./my.js":1100,"./nb":1101,"./nb.js":1101,"./ne":1102,"./ne.js":1102,"./nl":1103,"./nl-be":1104,"./nl-be.js":1104,"./nl.js":1103,"./nn":1105,"./nn.js":1105,"./oc-lnc":1106,"./oc-lnc.js":1106,"./pa-in":1107,"./pa-in.js":1107,"./pl":1108,"./pl.js":1108,"./pt":1109,"./pt-br":1110,"./pt-br.js":1110,"./pt.js":1109,"./ro":1111,"./ro.js":1111,"./ru":1112,"./ru.js":1112,"./sd":1113,"./sd.js":1113,"./se":1114,"./se.js":1114,"./si":1115,"./si.js":1115,"./sk":1116,"./sk.js":1116,"./sl":1117,"./sl.js":1117,"./sq":1118,"./sq.js":1118,"./sr":1119,"./sr-cyrl":1120,"./sr-cyrl.js":1120,"./sr.js":1119,"./ss":1121,"./ss.js":1121,"./sv":1122,"./sv.js":1122,"./sw":1123,"./sw.js":1123,"./ta":1124,"./ta.js":1124,"./te":1125,"./te.js":1125,"./tet":1126,"./tet.js":1126,"./tg":1127,"./tg.js":1127,"./th":1128,"./th.js":1128,"./tk":1129,"./tk.js":1129,"./tl-ph":1130,"./tl-ph.js":1130,"./tlh":1131,"./tlh.js":1131,"./tr":1132,"./tr.js":1132,"./tzl":1133,"./tzl.js":1133,"./tzm":1134,"./tzm-latn":1135,"./tzm-latn.js":1135,"./tzm.js":1134,"./ug-cn":1136,"./ug-cn.js":1136,"./uk":1137,"./uk.js":1137,"./ur":1138,"./ur.js":1138,"./uz":1139,"./uz-latn":1140,"./uz-latn.js":1140,"./uz.js":1139,"./vi":1141,"./vi.js":1141,"./x-pseudo":1142,"./x-pseudo.js":1142,"./yo":1143,"./yo.js":1143,"./zh-cn":1144,"./zh-cn.js":1144,"./zh-hk":1145,"./zh-hk.js":1145,"./zh-mo":1146,"./zh-mo.js":1146,"./zh-tw":1147,"./zh-tw.js":1147};function a(e){var t=r(e);return i(t)}function r(e){if(!i.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}a.keys=function(){return Object.keys(n)},a.resolve=r,e.exports=a,a.id=1207},function(e,t,i){"use strict";var n=this&&this.__assign||function(){return(n=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=i(279),r=i(977),o=i(978),s=i(983),l=i(1009),u=i(204),d=i(976),c=i(14),f=function(){function e(e){this.layer=new a.default,this.document={},this.api=[],this.entity=[],this.payload=[],this.task=[],this.instances=[],this.viewer=e,this.viewer.addLayer(this.layer)}return e.prototype.getOptions=function(){return this._options},e.prototype.load=function(e,t){var i=this;void 0===t&&(t=!1),this._options=e,e.forEach((function(e){if("document"===e.type){if(i.document=e,e.time){var t=c.default.fromIso8601(e.time);i.viewer.cesiumViewer.clock.currentTime=t}}else switch(e.type.split("/")[0]){case"api":i.api.push(e);break;case"entity":i.entity.push(e);break;case"payload":i.payload.push(e);break;case"task":i.task.push(e)}})),this.init()},e.prototype.init=function(){var e=this,t=[];this.entity.forEach((function(i){var n,a=u.toCamelCase(i.type.split("/")[1]),o=null===(n=r.default[a+"Loader"])||void 0===n?void 0:n.load(e.layer,i);t.push(o.readyPromise)})),this.payload.forEach((function(t){var i,n=u.toCamelCase(t.type.split("/")[1]);null===(i=o.default[n+"Loader"])||void 0===i||i.load(e.layer,t)})),this.task.forEach((function(t){var i,n=u.toCamelCase(t.type.split("/")[1]);null===(i=s.default[n+"Loader"])||void 0===i||i.load(e.layer,t)})),this.api.forEach((function(i){var a=i.type.split("/")[1];if("http"===a)null==i||i.children.forEach((function(t){var a=u.toCamelCase(t.type.split("/")[1]),r=new l.default[a+"Loader"](e.viewer,e.layer,n(n({},t),{headers:i.headers}));e.instances.push(r)}));else if("ws"===a){var r=new d.default(e.viewer,e.layer,i);e.instances.push(r),t.push(r.readyPromise),e.ws=r}})),this.readyPromise=Promise.all(t)},e.prototype.destroy=function(){this.instances.forEach((function(e){return e.destroy()})),this.viewer.removeLayer(this.layer)},e}();t.default=f},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.record=function(e){this.raiseEvent("opertion-record")},t}(i(24).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(54),o=i(1),s=i(22),l=i(7),u=i(53),d=i(43),c=i(14),f=i(12),h=i(6),p=i(185),m=i(52),_=i(69),g=i(143),v=i(156),y=i(64),b=i(13),w=i(151),O=i(2),x=i(326),A=new f.default,T=(new o.default,new s.default),E=function(e){function t(t){var i=e.call(this,t)||this;if((i.polylineArray=[],i._asynchronous=!0,i.positionInertialArray=[],i.positionFixedArray=[],i.timeArray=[],i._positionsInertial=t.positions,i._times=t.times,i._positionsFixed=i.getFixedPositions(t.positions,t.times),i._material=t.material,i._width=t.width,i._arcType=t.arcType||r.default.NONE,i._asynchronous=t.asynchronous,i._enableDepthTest=O.default(t.enableDepthTest,!0),i._enableDepthTest=O.default(t.enableDepthTest,!0),i._resolution=O.default(t.resolution,43200),i._splitStep=O.default(t.splitStep,i._resolution/4),i._enableAdjust=O.default(t.enableAdjust,!0),i._enableSample=O.default(t.enableSample,!0),i._sampleStep=O.default(t.sampleStep,60),i._enableAdjust&&t.startTime)&&c.default.secondsDifference(t.startTime,i._times[0])>i._resolution){var n=i.processResolution(i._positionsInertial,i._positionsFixed,i._times,t.startTime);i._times=n.times,i._positionsInertial=n.positionsInertial,i._positionsFixed=n.positionsFixed}var a=i._times[0],o=[],s=[],l=[];return i._times.forEach((function(e,t){c.default.secondsDifference(e,a)<i._splitStep?(o.push(i._positionsInertial[t]),s.push(i._positionsFixed[t]),l.push(i._times[t])):(i.positionInertialArray=i.positionInertialArray.concat([o]),i.positionFixedArray=i.positionFixedArray.concat([s]),i.timeArray=i.timeArray.concat([l]),o=[i._positionsInertial[t-1],i._positionsInertial[t]],s=[i._positionsFixed[t-1],i._positionsFixed[t]],l=[i._times[t-1],i._times[t]],a=e.clone()),t===i._times.length-1&&(i.positionInertialArray=i.positionInertialArray.concat([o]),i.positionFixedArray=i.positionFixedArray.concat([s]),i.timeArray=i.timeArray.concat([l]))})),i.createPrimitive(t.material,t.width,t.arcType),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polylineArray&&this.polylineArray.forEach((function(t){t.show=e}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"referenceFrame",{get:function(){return this._referenceFrame},set:function(e){var t,i=this;this._referenceFrame!==e&&(this._referenceFrame=e,console.log("this._referenceFrame",this._referenceFrame),this.polylineArray.forEach((function(e){i._polylines.remove(e)})),this.polylineArray=[],this.createPrimitive(this._material,this._width,this._arcType),this.polylineArray.forEach((function(e){i._polylines.add(e)})),e===x.ReferenceFrame.INERTIAL&&(null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.mode)===b.default.SCENE3D&&m.default.computeIcrfToFixedMatrix(this.getViewer().cesiumViewer.clock.currentTime,A)&&this.polylineArray.forEach((function(e){h.default.multiplyByMatrix3(h.default.IDENTITY,A,e.modelMatrix)})))},enumerable:!1,configurable:!0}),t.prototype.getFixedPositions=function(e,t){var i=[];return t.forEach((function(t,n){m.default.computeIcrfToFixedMatrix(t,A);var a=new o.default;f.default.multiplyByVector(A,e[n],a),i.push(a)})),i},t.prototype.createPrimitive=function(e,t,i){var n,a,o=this;void 0===e&&(e=l.default.YELLOW),void 0===t&&(t=1),void 0===i&&(i=r.default.NONE);var c=this.isColorsPerVertex(e),f=[];(null===(n=this.getViewer())||void 0===n?void 0:n.sceneMode)!==b.default.SCENE3D?(null===(a=this.getViewer())||void 0===a?void 0:a.sceneMode)===b.default.SCENE2D?this.positionFixedArray.forEach((function(e){var t=e.map((function(e,t){return s.default.fromCartesian(e,void 0,T),T.height=2e3,s.default.toCartesian(T,void 0)}));f.push(t)})):f=this.positionFixedArray:f=this.referenceFrame===x.ReferenceFrame.FIXED?this.positionFixedArray:this.positionInertialArray,f.forEach((function(n,a){var r=new d.default({geometry:new p.default({positions:n,arcType:i,width:t,vertexFormat:e instanceof _.default?v.default.VERTEX_FORMAT:g.default.VERTEX_FORMAT,colors:c?e:void 0,colorsPerVertex:c}),attributes:e instanceof l.default?{color:u.default.fromColor(e)}:void 0}),s=!1;s=c?e.some((function(e){return e.alpha<1})):!(e instanceof l.default)||e.alpha<1;var f=new y.default({geometryInstances:r,asynchronous:o._asynchronous,appearance:o.getAppearance(e,s),show:o.enabled&&o._show});f.entityId=o.id+"~"+a,o.polylineArray.push(f)}))},t.prototype.addPartLine=function(e,t,i,n,a){var o;void 0===t&&(t=l.default.YELLOW),void 0===i&&(i=1),void 0===n&&(n=r.default.NONE);var c=this.isColorsPerVertex(t),f=[];f=(null===(o=this.getViewer())||void 0===o?void 0:o.sceneMode)===b.default.SCENE2D?e.map((function(e,t){return s.default.fromCartesian(e,void 0,T),T.height=2e3,s.default.toCartesian(T,void 0)})):e;var h=new d.default({geometry:new p.default({positions:f,arcType:n,width:i,vertexFormat:t instanceof _.default?v.default.VERTEX_FORMAT:g.default.VERTEX_FORMAT,colors:c?t:void 0,colorsPerVertex:c}),attributes:t instanceof l.default?{color:u.default.fromColor(t)}:void 0}),m=!1;m=c?t.some((function(e){return e.alpha<1})):!(t instanceof l.default)||t.alpha<1;var w=new y.default({geometryInstances:h,asynchronous:this._asynchronous,appearance:this.getAppearance(t,m),show:this.enabled&&this._show});return w.entityId=this.id+"~"+a,w},t.prototype.processResolution=function(e,t,i,n){for(var a=[],r=[],o=[],s=0;s<i.length;s++)c.default.secondsDifference(n,i[s])<=this._resolution&&(a.push(i[s]),r.push(e[s]),o.push(t[s]));return{times:a,positionsInertial:r,positionsFixed:o}},t.prototype.updatePosition=function(e,t){var i,n,a,r,s,l=new o.default,u=this.positionInertialArray.length,d=this.timeArray.length,p=this.polylineArray[d-1].entityId.split("~"),_=parseInt(p[p.length-1]),g=this.timeArray[d-1];if(this._positionsInertial.length>2&&this._enableSample){var v=this._times.length;c.default.secondsDifference(t,this._times[v-1])>this._sampleStep&&c.default.secondsDifference(t,g[0])<this._splitStep?(s=this._times[v-1],this._positionsInertial[v-1],this._positionsFixed[v-1],this._positionsInertial.splice(v-1,1,e),this._times.splice(v-1,1,t),m.default.computeIcrfToFixedMatrix(t,A),l=new o.default,f.default.multiplyByVector(A,e,l),this._positionsFixed.splice(v-1,1,l)):(this._positionsInertial.push(e),this._times&&this._times.push(t),m.default.computeIcrfToFixedMatrix(t,A),l=new o.default,f.default.multiplyByVector(A,e,l),this._positionsFixed.push(l))}else this._positionsInertial.push(e),this._times&&this._times.push(t),m.default.computeIcrfToFixedMatrix(t,A),l=new o.default,f.default.multiplyByVector(A,e,l),this._positionsFixed.push(l);if(c.default.secondsDifference(t,g[0])<this._splitStep){if(this._polylines.remove(this.polylineArray[u-1]),s){var y=this.positionInertialArray[u-1].length;this.positionInertialArray[u-1].splice(y-1,1,e),this.positionFixedArray[u-1].splice(y-1,1,l),this.timeArray[u-1].splice(y-1,1,t)}else this.positionInertialArray[u-1].push(e),this.positionFixedArray[u-1].push(l),this.timeArray[u-1].push(t);var w=void 0;w=(null===(i=this.getViewer())||void 0===i?void 0:i.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?this.positionFixedArray[u-1]:this.positionInertialArray[u-1];var O=this.addPartLine(w,this._material,this._width,this._arcType,_);this.polylineArray.splice(u-1,1,O),this._polylines.add(O)}else{var T=this.positionInertialArray[u-1],E=this.positionFixedArray[u-1],C=[T[T.length-1],e],S=[E[E.length-1],l],M=[g[g.length-1],t];w=void 0;w=(null===(n=this.getViewer())||void 0===n?void 0:n.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?S:C;O=this.addPartLine(w,this._material,this._width,this._arcType,_+1);this.polylineArray.push(O),this.positionInertialArray.push(C),this.positionFixedArray.push(S),this.timeArray.push(M),this._polylines.add(O)}if(this._enableAdjust&&c.default.secondsDifference(t,this._times[0])>this._resolution){for(var D=[],P=[],I=[],L=-1,j=0;j<this.timeArray[0].length;j++){if(c.default.secondsDifference(t,this.timeArray[0][j])<=this._resolution){L=j;break}this._times.splice(0,1),this._positionsInertial.splice(0,1),this._positionsFixed.splice(0,1)}if(this._polylines.remove(this.polylineArray[0]),L>0&&L<this.timeArray[0].length-1){I=this.timeArray[0].slice(L),D=this.positionInertialArray[0].slice(L),P=this.positionFixedArray[0].slice(L);var R=this.polylineArray[0].entityId.split("~"),N=parseInt(R[R.length-1]),B=void 0;B=(null===(a=this.getViewer())||void 0===a?void 0:a.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?P:D;O=this.addPartLine(B,this._material,this._width,this._arcType,N);this.polylineArray.splice(0,1,O),this._polylines.add(O),this.timeArray.splice(0,1,I),this.positionInertialArray.splice(0,1,D),this.positionFixedArray.splice(0,1,P)}else this.polylineArray.splice(0,1),this.positionInertialArray.splice(0,1),this.positionFixedArray.splice(0,1),this.timeArray.splice(0,1)}this.referenceFrame===x.ReferenceFrame.INERTIAL&&(null===(r=this.getViewer())||void 0===r?void 0:r.cesiumViewer.scene.mode)===b.default.SCENE3D&&m.default.computeIcrfToFixedMatrix(t,A)&&this.polylineArray.forEach((function(e){h.default.multiplyByMatrix3(h.default.IDENTITY,A,e.modelMatrix)}))},t.prototype.updatePosition2=function(e,t){var i,n,a,r;this._positionsInertial.push(e),this._times&&this._times.push(t),m.default.computeIcrfToFixedMatrix(t,A);var s=new o.default;f.default.multiplyByVector(A,e,s),this._positionsFixed.push(s);var l=this.positionInertialArray.length,u=this.timeArray.length,d=this.polylineArray[u-1].entityId.split("~"),p=parseInt(d[d.length-1]),_=this.timeArray[u-1];if(c.default.secondsDifference(t,_[0])<this._splitStep){this._polylines.remove(this.polylineArray[l-1]),this.positionInertialArray[l-1].push(e),this.positionFixedArray[l-1].push(s),this.timeArray[l-1].push(t);var g=void 0;g=(null===(i=this.getViewer())||void 0===i?void 0:i.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?this.positionFixedArray[l-1]:this.positionInertialArray[l-1];var v=this.addPartLine(g,this._material,this._width,this._arcType,p);this.polylineArray.splice(l-1,1,v),this._polylines.add(v)}else{var y=this.positionInertialArray[l-1],w=this.positionFixedArray[l-1],O=[y[y.length-1],e],T=[w[w.length-1],s],E=[_[_.length-1],t];g=void 0;g=(null===(n=this.getViewer())||void 0===n?void 0:n.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?T:O;v=this.addPartLine(g,this._material,this._width,this._arcType,p+1);this.polylineArray.push(v),this.positionInertialArray.push(O),this.positionFixedArray.push(T),this.timeArray.push(E),this._polylines.add(v)}if(this._enableAdjust&&c.default.secondsDifference(t,this._times[0])>this._resolution){for(var C=[],S=[],M=[],D=-1,P=0;P<this.timeArray[0].length;P++){if(c.default.secondsDifference(t,this.timeArray[0][P])<=this._resolution){D=P;break}this._times.splice(0,1),this._positionsInertial.splice(0,1),this._positionsFixed.splice(0,1)}if(this._polylines.remove(this.polylineArray[0]),D>0&&D<this.timeArray[0].length-1){M=this.timeArray[0].slice(D),C=this.positionInertialArray[0].slice(D),S=this.positionFixedArray[0].slice(D);var I=this.polylineArray[0].entityId.split("~"),L=parseInt(I[I.length-1]),j=void 0;j=(null===(a=this.getViewer())||void 0===a?void 0:a.sceneMode)!==b.default.SCENE3D||this.referenceFrame===x.ReferenceFrame.FIXED?S:C;v=this.addPartLine(j,this._material,this._width,this._arcType,L);this.polylineArray.splice(0,1,v),this._polylines.add(v),this.timeArray.splice(0,1,M),this.positionInertialArray.splice(0,1,C),this.positionFixedArray.splice(0,1,S)}else this.polylineArray.splice(0,1),this.positionInertialArray.splice(0,1),this.positionFixedArray.splice(0,1),this.timeArray.splice(0,1)}this.referenceFrame===x.ReferenceFrame.INERTIAL&&(null===(r=this.getViewer())||void 0===r?void 0:r.cesiumViewer.scene.mode)===b.default.SCENE3D&&m.default.computeIcrfToFixedMatrix(t,A)&&this.polylineArray.forEach((function(e){h.default.multiplyByMatrix3(h.default.IDENTITY,A,e.modelMatrix)}))},t.prototype.isColorsPerVertex=function(e){return!!(Array.isArray(e)&&e.length>0&&e[0]instanceof l.default)},t.prototype.getAppearance=function(e,t){return void 0===t&&(t=!1),e instanceof _.default?new v.default({material:e,translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}}):new g.default({translucent:t,renderState:{depthTest:{enabled:this._enableDepthTest}}})},t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t);var n=this.getLODSceneLayer();n&&(this._polylines=n.polylines),this.polylineArray&&this._polylines&&this.polylineArray.forEach((function(e){i._polylines.add(e)})),this.show=t.show,this.afterSwitchMode(this.getViewer().sceneMode)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i)},t.prototype.destroyForward=function(){var t=this;e.prototype.destroyForward.call(this),this._polylines&&this.polylineArray.forEach((function(e){t._polylines.remove(e)}))},t.prototype.beforeSwitchMode=function(t){var i=this;e.prototype.beforeSwitchMode.call(this,t),this._polylines&&(this.polylineArray.forEach((function(e){i._polylines.remove(e)})),this.polylineArray=[],this.createPrimitive(this._material,this._width,this._arcType),this.polylineArray.forEach((function(e){i._polylines.add(e)})))},t.prototype.afterSwitchMode=function(t){e.prototype.afterSwitchMode.call(this,t),t===b.default.SCENE3D&&this.referenceFrame===x.ReferenceFrame.INERTIAL&&m.default.computeIcrfToFixedMatrix(this.getViewer().cesiumViewer.clock.currentTime,A)&&this.polylineArray.forEach((function(e){h.default.multiplyByMatrix3(h.default.IDENTITY,A,e.modelMatrix)}))},t}(w.default);t.default=E},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(6),s=i(13),l=i(1),u=i(22),d=i(151),c=i(489),f=i(27),h=i(391),p=i(54),m=i(324),_=i(0),g=i(2),v=i(49),y=new u.default,b=new u.default,w=new f.default,O=new l.default(0,0,0),x=new l.default(0,0,1),A=function(e){function t(t,i){void 0===i&&(i=!0);var n=e.call(this,t)||this;return n.options=t,n.cartesian1=new l.default,n.cartesian2=new l.default,n._keepNonePerformanceMode=!1,n.scale=1,n.unit="m",_.default(t.asynchronous)||(t.asynchronous=!0),n._entity1=t.entityFrom,n._entity2=t.entityTo,n.labelConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},g.default(t.labelConfig,{})),n.scale=g.default(t.scale,1),n.unit=g.default(t.unit,"m"),t.polylineOptions&&(t.polylineOptions.arcType=void 0!==t.polylineOptions.arcType?t.polylineOptions.arcType:p.default.NONE),n.polylineOptions=t.polylineOptions,n._lengthPerSection=n.polylineOptions.lengthPerSection?n.polylineOptions.lengthPerSection:5e5,n._keepNonePerformanceMode=n.polylineOptions.arcType!==p.default.NONE,n._keepNonePerformanceMode?n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[n.entity1.position,n.entity2.position],asynchronous:t.asynchronous})):n._polyline=new c.default(r(r({},n.polylineOptions),{positions:[O,x],asynchronous:t.asynchronous})),n._performanceMode=i,n}return a(t,e),Object.defineProperty(t.prototype,"entity1",{get:function(){return this._entity1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entity2",{get:function(){return this._entity2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"performanceMode",{get:function(){return this._performanceMode},set:function(e){var t;this._performanceMode=e,this.parent&&(null===(t=this.parent)||void 0===t||t.remove(this._polyline),this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.entity1.position,this.entity2.position],asynchronous:!1})),this.parent.add(this._polyline),this._polyline.show=this.show)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){var t;this._show=e,this.performanceMode&&!this._keepNonePerformanceMode?this._polyline.show=e:e&&this.parent?(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.entity1.position,this.entity2.position],asynchronous:!1})),this.parent.add(this._polyline)):null===(t=this.parent)||void 0===t||t.remove(this._polyline)},enumerable:!1,configurable:!0}),t.prototype.destroyForward=function(){this.parent.remove(this._polyline),this.parent.labels.remove(this.label)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.show&&(this._polyline.show=this.entity1.show&&this.entity2.show,this._polyline.show)){var n=this.getViewer().sceneMode;if(this.performanceMode&&!this._keepNonePerformanceMode&&n===s.default.SCENE3D){var a=x,d=l.default.subtract(this.entity2.position,this.entity1.position,this.cartesian1);if(m.default.calculateQuaternionFromV1ToV2(a,d,w),o.default.fromTranslationQuaternionRotationScale(this.entity1.position,w,new l.default(1,1,l.default.magnitude(d)),this._polyline.polyline.modelMatrix),this.polylineOptions.material instanceof h.default)(f=this._polyline.polyline.appearance.material).startPosition=this.entity1.position,f.endPosition=this.entity2.position}else{var f;if(this.parent.remove(this._polyline),[s.default.SCENE2D,s.default.COLUMBUS_VIEW].includes(n)?(u.default.fromCartesian(this.entity1.position,void 0,y),u.default.fromCartesian(this.entity2.position,void 0,b),u.default.toCartesian(y,void 0,this.cartesian1),u.default.toCartesian(b,void 0,this.cartesian2)):(this.cartesian1=this.entity1.position,this.cartesian2=this.entity2.position),this.polylineOptions.material instanceof h.default)(f=this._polyline.polyline.appearance.material).startPosition=this.entity1.position,f.endPosition=this.entity2.position;this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[this.cartesian1,this.cartesian2],asynchronous:!1})),this.parent.add(this._polyline)}this.label.position=l.default.midpoint(this.entity1.position,this.entity2.position,new l.default);var p=l.default.distance(this.entity1.position,this.entity2.position)/this.scale;this.label.text=p.toFixed(2)+this.unit}},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this.label=t.labels.add(Object.assign({distanceDisplayCondition:new v.default(0,2e8)},this.labelConfig)),t.add(this._polyline)},t.prototype.beforeSwitchMode=function(e){e!==s.default.SCENE2D&&this.parent.remove(this._polyline)},t.prototype.afterSwitchMode=function(e){e!==s.default.SCENE2D&&(this._polyline=new c.default(r(r({},this.polylineOptions),{positions:[O,x],asynchronous:!1})),this.parent.add(this._polyline))},t}(d.default);t.default=A},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(12),s=i(6),l=i(27),u=i(392),d=i(1166),c=new s.default,f=new r.default,h=(new s.default,new o.default,function(e){function t(t){var i=e.call(this,t)||this;return i.options=t,i.pointing=new u.default(i),i}return a(t,e),t.prototype.addHeadingPitchRollSample=function(e,t){this.addRotationSample(e,u.default.headingPitchRollToQuaternion(t,new l.default))},t.prototype.updateForward=function(t,i){this.pointing.trackedEntity&&this.pointing.trackedEntity.position?(this.pointing.calculateMatrixByTrackedEntity(i,c),s.default.multiplyByPoint(this.parent.matrix,this.position,f),this.scale=new r.default(1,1,r.default.distance(this.pointing.trackedEntity.position,f)/this.length+.1)):s.default.clone(i,c),e.prototype.updateForward.call(this,t,c)},t.prototype.clone=function(){return new t(this.options)},t}(d.default));t.default=h},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(12),s=i(6),l=i(27),u=i(392),d=i(1167),c=new s.default,f=new r.default,h=(new s.default,new o.default,function(e){function t(t){var i=e.call(this,t)||this;return i.options=t,i.pointing=new u.default(i),i}return a(t,e),t.prototype.addHeadingPitchRollSample=function(e,t){this.addRotationSample(e,u.default.headingPitchRollToQuaternion(t,new l.default))},t.prototype.updateForward=function(t,i){this.pointing.trackedEntity&&this.pointing.trackedEntity.position?(this.pointing.calculateMatrixByTrackedEntity(i,c),s.default.multiplyByPoint(this.parent.matrix,this.position,f),this.scale=new r.default(1,1,r.default.distance(this.pointing.trackedEntity.position,f)/this.length+.1)):s.default.clone(i,c),e.prototype.updateForward.call(this,t,c)},t.prototype.clone=function(){return new t(this.options)},t}(d.default));t.default=h},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(14),s=i(27),l=i(6),u=i(2),d=i(301),c=i(1),f=i(5),h=i(301),p=i(7),m=i(1168),_=i(117),g=i(61),v=i(981),y=(new l.default,new c.default,function(e){function t(t){var i=e.call(this,r(r({},t),{shouldUpdateIn2D:!1}))||this;return i._waveMaterialMode=1,i.circleRotation=0,i.coneRotation=0,i.crossSingleRotation=0,i.crossSingleRotationMax=f.default.toRadians(49.5),i.coneUpdate=!1,i.backTime=0,i.options=t,i._waveMaterialMode=u.default(t.waveMaterialMode,1),i.baseColor=u.default(t.baseColor,p.default.CYAN.withAlpha(.3)),i.lightColor=u.default(t.lightColor,i.baseColor.withAlpha(.7)),i.waveSpeed=u.default(t.waveSpeed,1),i.waveThickness=u.default(t.waveThickness,.1),i.circleSpeed=u.default(t.circleSpeed,1.5),i.crossSpeed=u.default(t.crossSpeed,5.6),i.crossBackSpeed=u.default(t.crossBackSpeed,.8),i.coneSpeed=u.default(t.coneSpeed,1.8),i.crossScanAngle=u.default(t.crossScanAngle,49.5),i.coneScanAngle=u.default(t.coneScanAngle,45),i.crossOffsetAngle=u.default(t.crossOffsetAngle,0),i._scanMode=t.scanMode,i.backTime=i.crossSpeed/2,i.isCover=5!==i._scanMode,i}return a(t,e),Object.defineProperty(t.prototype,"scanMode",{get:function(){return this._scanMode},set:function(e){this._scanMode!==e&&(this.rotation=s.default.IDENTITY.clone(),5===this._scanMode?this.isCover=!1:this.isCover=!0,this.prevTime=null,this.statTime=null,this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this._scanMode=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,5===this._scanMode?this.isCover=!1:this.isCover=e,this.prevTime=null,this.statTime=null,this.rotation=s.default.IDENTITY.clone(),this.circleRotation=0,this.coneRotation=0,this.crossSingleRotation=0,this.primitive&&(this.primitive.show=e),this.outlinePrimitive&&(this.outlinePrimitive.show=e),this.surfaceEdge&&(this.surfaceEdge.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"waveMaterialMode",{get:function(){return this._waveMaterialMode},set:function(e){this._waveMaterialMode!==e&&(this._waveMaterialMode=e,this.primitive.appearance=e>1?new _.default({material:new m.default({color:this.lightColor,baseColor:this.baseColor,speed:this.waveSpeed,thickness:this.waveThickness}),faceForward:!1,closed:!0}):new g.default({flat:!0}))},enumerable:!1,configurable:!0}),t.prototype.updateForward=function(t,i){if(this.pointing.trackedEntity&&this.pointing.trackedEntity.position)e.prototype.updateForward.call(this,t,i);else if(e.prototype.updateForward.call(this,t,i),this.show){if(!this.prevTime)return this.prevTime=o.default.clone(t),void(this.statTime=o.default.clone(t));5===this._scanMode&&!this.isCover&&this.coneUpdate&&(this.isCover=!0);var n,a,r=o.default.secondsDifference(t,this.prevTime),l=o.default.secondsDifference(t,this.statTime);switch(this.backTime+=r,this.backTime>this.crossSpeed+this.crossBackSpeed&&(this.backTime=0),this.prevTime=o.default.clone(t),this._scanMode){case h.default.STATIC:break;case d.default.CIRCLE:n=2*Math.PI/this.circleSpeed,this.circleRotation+=r*n,this.rotation=s.default.fromAxisAngle(c.default.UNIT_X,this.circleRotation);break;case d.default.CROSS_SINGLE:this.backTime<this.crossSpeed?(this.isCover=!0,a=f.default.toRadians(this.crossScanAngle)*Math.sin((this.backTime+this.crossSpeed/2)*Math.PI/this.crossSpeed)):(this.isCover=!1,a=f.default.toRadians(this.crossScanAngle)*Math.sin((this.backTime-this.crossSpeed-this.crossBackSpeed/2)*Math.PI/this.crossBackSpeed)),this.crossSingleRotation=a,this.rotation=s.default.fromAxisAngle(c.default.UNIT_X,this.crossSingleRotation);break;case d.default.CROSS_DOUBLE:a=f.default.toRadians(this.crossScanAngle)*Math.sin(l*Math.PI*2/this.crossSpeed),this.crossSingleRotation=a+f.default.toRadians(this.crossOffsetAngle);var u=new s.default,p=new s.default;u=s.default.fromAxisAngle(c.default.UNIT_X,this.crossSingleRotation),s.default.multiply(u,this.relativeRotation,p),this.rotation=p;break;case d.default.CONE:var m=s.default.fromAxisAngle(c.default.UNIT_X,f.default.toRadians(this.coneScanAngle));n=2*Math.PI/this.coneSpeed,this.coneRotation+=r*n;var _=s.default.fromAxisAngle(c.default.UNIT_Z,this.coneRotation),g=s.default.IDENTITY.clone();s.default.multiply(_,m,g),this.rotation=g,this.coneUpdate=!0}}},t.prototype.clone=function(){return new t(this.options)},t}(v.default));t.default=y},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.UnionRectangularDirection=void 0;var o=i(27),s=i(982),l=i(6),u=i(1),d=i(151),c=i(5),f=i(2),h=i(347),p=i(7),m=i(99),_=new l.default;new u.default;t.UnionRectangularDirection={Horizontal:0,Vertical:1};var g=function(e){function i(i){var n=e.call(this,i)||this;return n.matrix=l.default.IDENTITY.clone(),n.primitives=[],n.primitivesOffsetQuaternion=[],n._autoWork=!1,n._closeBeam=[],n._workBeam=[],n._markBeam=[],n.workInterval=null,n.currentWorkBeamIndex=0,n._workStep=1,n._rotation=o.default.IDENTITY.clone(),n.options=i,n._horizontalHalfAngle=f.default(i.horizontalHalfAngle,c.default.toRadians(.06)),n._verticalHalfAngle=f.default(i.verticalHalfAngle,c.default.toRadians(1.5)),n._length=f.default(i.length,1e6),n._workMaterial=f.default(i.workMaterial,p.default.CYAN.withAlpha(.5)),n._markMaterial=f.default(i.markMaterial,p.default.RED.withAlpha(.5)),n._closeMaterial=f.default(i.surfaceEdgeMaterial,p.default.CYAN.withAlpha(.5)),n._autoWork=f.default(i.autoWork,!1),n._workStep=f.default(i.workStep,1),n._beamNumber=f.default(i.beamNumber,1),n._expandDirection=f.default(i.expandDirection,t.UnionRectangularDirection.Horizontal),n.createPrimitive(),n.addPrimitive(),n}return a(i,e),Object.defineProperty(i.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"autoWork",{get:function(){return this._autoWork},set:function(e){var t=this;this._autoWork=e,this.workInterval&&(window.clearInterval(this.workInterval),this.workInterval=null),e&&this.workBeam.length>0?(this.currentWorkBeamIndex=0,this.primitives[this._workBeam[this.currentWorkBeamIndex]].surfaceEdgeMaterial=this._workMaterial,this.workBeam.length>1&&(this.workInterval=setInterval((function(){t.primitives[t._workBeam[t.currentWorkBeamIndex]].surfaceEdgeMaterial=t._closeMaterial,t.currentWorkBeamIndex+=1,t.currentWorkBeamIndex===t.workBeam.length&&(t.currentWorkBeamIndex=0),t.primitives[t._workBeam[t.currentWorkBeamIndex]].surfaceEdgeMaterial=t._workMaterial}),1e3*this._workStep))):this.workBeam.forEach((function(e){t.primitives[e].surfaceEdgeMaterial=t._closeMaterial}))},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"rotation",{get:function(){return this._rotation},set:function(e){o.default.clone(e,this._rotation),l.default.fromTranslationQuaternionRotationScale(u.default.ZERO,e,h.UNIT_SCALE,_),l.default.multiply(this.matrix,_,this.matrix);for(var t=0;t<this.primitives.length;t++){var i=new o.default;o.default.multiply(this._rotation,this.primitivesOffsetQuaternion[t],i),this.primitives[t].rotation=i.clone()}},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"closeBeam",{get:function(){return this._closeBeam},set:function(e){this._closeBeam=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"workBeam",{get:function(){return this._workBeam},set:function(e){this._workBeam=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"markBeam",{get:function(){return this._markBeam},set:function(e){this._markBeam=e},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"show",{set:function(e){this._show=e,this.children.values.forEach((function(t){t.enabled&&(t.show=e)})),e||(this.autoWork=!1)},enumerable:!1,configurable:!0}),i.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t);for(var i=0;i<this.primitives.length;i++){var n=new o.default;o.default.multiply(this.primitivesOffsetQuaternion[i],this._rotation,n),this.primitives[i].rotation=n.clone(),t.add(this.primitives[i])}},i.prototype.createPrimitive=function(){for(var e=this._beamNumber/2+.5,i=this._expandDirection===t.UnionRectangularDirection.Horizontal?this._horizontalHalfAngle:this._verticalHalfAngle,n=this._expandDirection===t.UnionRectangularDirection.Horizontal?u.default.UNIT_Y:u.default.UNIT_X,a=1;a<this._beamNumber+1;a++){var l=2*(e-a)*i,d=o.default.fromAxisAngle(n,l),c=(f.default(this.options.id,m.default()),new s.default(r(r({},this.options),{id:this.id+a,material:p.default.TRANSPARENT})));this.primitives.push(c),this.primitivesOffsetQuaternion.push(d)}var h=this._expandDirection===t.UnionRectangularDirection.Horizontal?this.options.horizontalHalfAngle*this._beamNumber:this.options.horizontalHalfAngle,_=this._expandDirection===t.UnionRectangularDirection.Horizontal?this.options.verticalHalfAngle:this.options.verticalHalfAngle*this._beamNumber,g=new s.default(r(r({},this.options),{id:this.id+"total",horizontalHalfAngle:h,verticalHalfAngle:_,enableSurfaceEdge:!1,showSurfaceEdgeOutline:!1}));this.primitives.push(g),this.primitivesOffsetQuaternion.push(o.default.IDENTITY)},i.prototype.addPrimitive=function(){},i.prototype.changeBeamStatus=function(e){var t=this;e.forEach((function(e){var i=t._closeBeam.findIndex((function(t){return t===e.index})),n=t._workBeam.findIndex((function(t){return t===e.index})),a=t._markBeam.findIndex((function(t){return t===e.index}));switch(e.status){case 0:-1===i&&t._closeBeam.push(e.index),-1!==n&&t._workBeam.splice(n,1),-1!==a&&t._markBeam.splice(n,1),t.primitives[e.index].surfaceEdgeMaterial=t._closeMaterial;break;case 1:-1===n&&t._workBeam.push(e.index),-1!==i&&t._closeBeam.splice(n,1),-1!==a&&t._markBeam.splice(n,1),t.primitives[e.index].surfaceEdgeMaterial=t._workMaterial;break;case 2:-1===a&&t._markBeam.push(e.index),-1!==n&&t._workBeam.splice(n,1),-1!==i&&t._closeBeam.splice(n,1),t.primitives[e.index].surfaceEdgeMaterial=t._markMaterial}}))},i.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,_)},i.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this.workInterval&&(window.clearInterval(this.workInterval),this.workInterval=null)},i.prototype.clone=function(){return new i(this.options)},i}(d.default);t.default=g},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(151),o=i(548),s=i(7),l=i(2),u=i(1),d=i(222),c=i(84),f=i(1169),h=i(47),p=i(390),m=i(14),_=i(76),g=i(69),v={6:"#076dec",7:"#076dec",8:"#fef301",9:"#fef301",10:"#fc8e2c",11:"#fc8e2c",12:"#fe0405",13:"#fe0405",14:"#fe3ba1",15:"#fe3ba1",16:"#ad00d8",17:"#ad00d8",18:"#ad00d8",19:"#ad00d8",20:"#ad00d8"},y=["#FF3A3A","#EE489D","#9F24FF","#3F75FF","#6AFF24","#602ee0"],b=function(e){function t(t){var i=e.call(this,t)||this;return i.levelColor=v,i.pointsArray=new h.default,i.forecastEntity=new h.default,i.polygonEntity=new h.default,i.baseHeight=0,i.currentMouseMovePoint=null,i.data=t.data,i.animationStep=l.default(t.animationStep,70),i.pointSize=l.default(t.pointSize,8),i.forecastPointSize=l.default(t.forecastPointSize,8),i.lineWidth=l.default(t.lineWidth,1),i.forecastColor=l.default(t.forecastColor,y),i.levelColor=l.default(t.levelColorConfig,v),i.data.points.forEach((function(e,t){i.createLineAndPoint(e,t,!1)})),i}return a(t,e),t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t),this.pointsArray.values.forEach((function(e,t){e[2].forEach((function(e){i.add(e),e.show=!1})),i.add(e[3]),e[3].show=!1,i.add(e[0]),e[0].show=!1,e[1]&&(i.add(e[1]),e[1].show=!1)}));var n=this.pointsArray.values.length,a=0;this.loading=setInterval((function(){var e=i.pointsArray.values[a];if(e[1]&&(e[1].show=i.show),a>0&&i.pointsArray.values[a-1][2].forEach((function(e){e.show=!1})),e[2].forEach((function(e){e.show=i.show})),e[0].show=i.show,++a>=n){window.clearInterval(i.loading),i.loading=null,i.pointsArray.values[a-1][3].show=!0;var t=i.getViewer();i.layer=i.getLODSceneLayer(),i.viewer=t,i.mouseMoveHandler=new d.default(t.cesiumViewer.scene.canvas),i.mouseMoveHandler.setInputAction((function(e){return i.toggleHTMLLabelVisible(e)}),c.default.MOUSE_MOVE),i.addAvailability()}}),this.animationStep)},t.prototype.addAvailability=function(){var e=this,t=this.pointsArray.values.length,i=m.default.fromDate(new Date(this.data.points[0].time)),n=new m.default;m.default.addDays(i,1e3,n),this.pointsArray.values.forEach((function(a,r){var o=m.default.fromDate(new Date(e.data.points[r].time)),s=new m.default;r<t-1?s=m.default.fromDate(new Date(e.data.points[r+1].time),s):m.default.addDays(o,1e3,s),a[0].availability.push(new _.default({start:i,stop:n})),a[1]&&a[1].availability.push(new _.default({start:i,stop:n})),a[2].forEach((function(e){e.availability.push(new _.default({start:o,stop:s}))})),a[3].availability.push(new _.default({start:o,stop:s})),a[3].htmlLabel&&a[3].htmlLabel[1]&&(a[3].htmlLabel[1].visibleFollowParent=!0,r===t-1&&(a[3].htmlLabel[1].show=!0))})),this.addFutureLine()},t.prototype.addFutureLine=function(){var e=this,t=this.data.points[this.data.points.length-1],i=m.default.fromDate(new Date(this.data.points[0].time)),n=new m.default;m.default.addDays(i,1e3,n),t.forecast&&t.forecast.length>0&&t.forecast.forEach((function(t,a){var r=e.forecastColor[a%e.forecastColor.length],l=[];t.forecastpoints.forEach((function(t,r){l=l.concat([parseFloat(t.lng),parseFloat(t.lat)]);var d="typhoon-forecast-point~"+a+"~"+r+"~"+e.id,c=new o.default({id:d,labelConfig:{},pointConfig:{color:s.default.fromCssColorString(e.getPointColor(+t.power)),pixelSize:e.forecastPointSize},htmlLabelConfig:t.htmlLabelConfig,position:u.default.fromDegrees(parseFloat(t.lng),parseFloat(t.lat))});r>0&&(c.availability.push(new _.default({start:i,stop:n})),e.add(c),e.forecastEntity.set(d,c))}));var d=new p.default({id:"typhoon-forecast-line~"+a+"~"+e.id,width:1,enableDepthTest:!1,asynchronous:!1,material:g.default.fromType(g.default.PolylineDashType,{color:s.default.fromCssColorString(r)}),positions:u.default.fromDegreesArray(l)});d.availability.push(new _.default({start:i,stop:n})),e.add(d),e.forecastEntity.set("typhoon-forecast-line~"+a+"~"+e.id,d)}))},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&this.children.values.forEach((function(e){e.updateForward(t,i)}))},t.prototype.appendData=function(e){var t=this;this.data.points.push(e);var i=this.data.points.length,n=this.pointsArray.get(i-2+"-"+this.id),a=new m.default,r=new m.default;a=m.default.fromDate(new Date(e.time),a),m.default.addDays(a,1e3,r);var o=n[2][0].availability[0].start.clone();n[2].forEach((function(e){e.show=!1,e.availability=[new _.default({start:o,stop:a})]})),n[3].show=!1,n[3].availability=[new _.default({start:o,stop:a})],this.forecastEntity.values.forEach((function(e){t.remove(e)})),this.forecastEntity.removeAll(),this.currentMouseMovePoint&&(this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!1})),this.currentMouseMovePoint=null),this.createLineAndPoint(e,i-1,!0);var s=this.pointsArray.get(i-1+"-"+this.id);s[2].forEach((function(e){t.add(e),e.show=!0,e.availability.push(new _.default({start:a,stop:r}))})),this.add(s[3]),s[3].show=!0,s[3].availability.push(new _.default({start:a,stop:r})),i===length-1&&s[3].htmlLabel&&s[3].htmlLabel[1]&&(s[3].htmlLabel[1].show=!0),this.add(s[0]),s[1]&&this.add(s[1]),this.addFutureLine()},t.prototype.toggleHTMLLabelVisible=function(e){var t=this;if(this.show){var i=e.endPosition,n=this.viewer.cesiumViewer.scene.drillPick(i),a=[];n.forEach((function(e){e.primitive&&e.primitive.entityId&&e.primitive.entityId.includes("typhoon")&&a.push(e)}));var r=a.find((function(e){return e.primitive.entityId.includes("typhoon-point")&&e.primitive.entityId.includes(t.id)})),o=a.find((function(e){return e.primitive.entityId.includes("typhoon-forecast-point")&&e.primitive.entityId.includes(t.id)})),s=a.find((function(e){return e.primitive.entityId.includes("typhoon-polygon")&&e.primitive.entityId.includes(t.id)})),l=[];r&&l.push(r),o&&l.push(o),s&&l.push(s);var u=l.length>0?l[0]:void 0;if(u&&u.primitive&&u.primitive.entityId){if(this.currentMouseMovePoint&&this.currentMouseMovePoint.id===u.primitive.entityId)return;if(this.currentMouseMovePoint&&(this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!1})),this.currentMouseMovePoint=null),u.primitive.entityId.includes("typhoon-point")){var d=u.primitive.entityId.split("~")[1],c=this.pointsArray.get(d+"-"+this.id);this.currentMouseMovePoint=c[0],this.currentMouseMovePoint.htmlLabel&&this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!0}))}u.primitive.entityId.includes("typhoon-forecast-point")&&(this.currentMouseMovePoint=this.forecastEntity.get(u.primitive.entityId),this.currentMouseMovePoint.htmlLabel&&this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!0}))),u.primitive.entityId.includes("typhoon-polygon")&&(this.currentMouseMovePoint=this.polygonEntity.get(u.primitive.entityId),this.currentMouseMovePoint.htmlLabel&&this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!0})))}else this.currentMouseMovePoint&&(this.currentMouseMovePoint.htmlLabel.forEach((function(e){e.show=!1})),this.currentMouseMovePoint=null)}},t.prototype.getPointColor=function(e){var t=this.levelColor[e.toString()];return t||(t="#076dec"),t},t.prototype.createLineAndPoint=function(e,t,i){void 0===i&&(i=!1);var n,a=e.power,r=e.lng,l=e.lat,d="typhoon-point~"+t+"~"+this.id,c=new o.default({id:d,labelConfig:{},pointConfig:{color:s.default.fromCssColorString(this.getPointColor(+a)),pixelSize:this.pointSize},htmlLabelConfig:e.htmlLabelConfig,position:u.default.fromDegrees(+r,+l,this.baseHeight+1e3)});if(t>0){var f=u.default.fromDegrees(+r,+l,this.baseHeight),h=u.default.fromDegrees(+this.data.points[t-1].lng,+this.data.points[t-1].lat,this.baseHeight);n=new p.default({id:"typhoon-line-"+t+"-"+this.id,width:this.lineWidth,enableDepthTest:!1,asynchronous:i,material:[s.default.fromCssColorString(this.getPointColor(+a)),s.default.fromCssColorString(this.getPointColor(+this.data.points[t-1].power))],positions:[f,h]})}var m=[];if(e.radius7){var _=e.radius7.split("|").map(Number);m.push(["radius7",_[0],_[1],_[2],_[3]])}if(e.radius10){var g=e.radius10.split("|").map(Number);m.push(["radius10",g[0],g[1],g[2],g[3]])}if(e.radius12){var v=e.radius12.split("|").map(Number);m.push(["radius12",v[0],v[1],v[2],v[3]])}var y={lon:parseFloat(e.lng),lat:parseFloat(e.lat)},b=this.drawWindCircle(m,y,i,e.radiusHtmlLabel,t),w=new o.default({labelConfig:{},pointConfig:{color:s.default.fromCssColorString(this.getPointColor(+a)),pixelSize:1},htmlLabelConfig:e.animationLabelConfig,position:u.default.fromDegrees(+r,+l)});this.pointsArray.set(t+"-"+this.id,[c,n,b,w])},t.prototype.drawWindCircle=function(e,t,i,n,a){void 0===i&&(i=!1);for(var r=[],o=0;o<e.length;o++){var l=1e3*e[o][1],d=1e3*e[o][2],c=1e3*e[o][3],h=1e3*e[o][4],p={lon:t.lon,lat:t.lat,radius:l,direct:"EN"},m={lon:t.lon,lat:t.lat,radius:d,direct:"ES"},_={lon:t.lon,lat:t.lat,radius:c,direct:"WS"},g={lon:t.lon,lat:t.lat,radius:h,direct:"WN"},v=[];(v=(v=(v=(v=v.concat(this.getWindCircle(p))).concat(this.getWindCircle(m))).concat(this.getWindCircle(_))).concat(this.getWindCircle(g))).push(v[0]),v.push(v[1]),v.push(this.baseHeight);var y=e[o][0],b=s.default.YELLOW;switch(y){case"radius7":b=s.default.fromCssColorString("#fff400");break;case"radius10":b=s.default.fromCssColorString("#f37500");break;case"radius12":b=s.default.fromCssColorString("#a02997")}var w="typhoon-polygon~"+a+"~"+o+"~"+t.lon+"~"+t.lat+"~"+this.id,O=new f.default({id:w,positions:u.default.fromDegreesArrayHeights(v),height:this.baseHeight,showOutline:!0,enableDepthTest:!1,asynchronous:i,material:b.withAlpha(.15),outlineMaterial:b.withAlpha(.1),outlineWidth:1,htmlLabelConfig:n[y]});O.center=u.default.fromDegrees(t.lon,t.lat),this.polygonEntity.set(w,O),r.push(O)}return r},t.prototype.getWindCircle=function(e){var t=0,i=90;switch(e.direct){case"EN":t=0,i=90;break;case"ES":t=90,i=180;break;case"WS":t=180,i=270;break;case"WN":t=270,i=360}return this.computeCirclularFlight(e.lon,e.lat,e.radius,t,i)},t.prototype.computeCirclularFlight=function(e,t,i,n,a){for(var r=[],o=n;o<=a;o+=2){var s=i*Math.sin(o*Math.PI/180),l=i*Math.cos(o*Math.PI/180),u=6356725+21412*(90-t)/90,d=e+s/(u*Math.cos(t*Math.PI/180))*180/Math.PI,c=t+l/u*180/Math.PI;r.push(d),r.push(c),r.push(this.baseHeight)}return r},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this.mouseMoveHandler&&(this.mouseMoveHandler.removeInputAction(c.default.MOUSE_MOVE),this.mouseMoveHandler.destroy(),this.mouseMoveHandler=null),this.loading&&(window.clearInterval(this.loading),this.loading=null),this.pointsArray.removeAll(),this.forecastEntity.removeAll(),this.polygonEntity.removeAll()},t}(r.default);t.default=b},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(194),a=i(0),r=i(19),o=i(3),s=i(14),l=i(1170),u=i(1171),d=i(24),c=i(1172),f=1e12,h=0,p=1,m=2,_=3,g=4,v=0,y=1,b=2,w=3,O=4,x=[.001,.002,.005,.01,.02,.05,.1,.25,.5,1,2,5,10,15,30,60,120,300,600,900,1800,3600,7200,14400,21600,43200,86400,172800,345600,604800,1296e3,2592e3,5184e3,7776e3,15552e3,31536e3,63072e3,126144e3,15768e4,31536e4,63072e4,126144e4,15768e5,31536e5,63072e5,126144e5,15768e6,31536e6],A=function(){function e(e,t,i,n,r){var l=this;if(void 0===i&&(i=!0),void 0===n&&(n=!1),void 0===r&&(r=!0),this._labelFormatter=c.default.LOCALE,this.smallestTicInPixels=7,this._isAccumulate=!1,this._enableFormatter=!1,this._isOnClick=!1,this._currentTrackDescription={time:new Date,id:"",wait:100},!a.default(e))throw new o.default("container is required.");if(!a.default(t))throw new o.default("clock is required.");this._isAccumulate=n,this._enableFormatter=i,this._allowMouseEvent=r;var u=function(e){var t;if("string"==typeof e&&null===(t=document.getElementById(e)))throw new o.default('Element with id "'+e+'" does not exist in the document.');return t}(e),x=u.ownerDocument;this.container=u,new ResizeObserver((function(){l.resize()})).observe(u);var A,T=x.createElement("div");T.className="super-cesium-timeline-main",u.appendChild(T),this._topDiv=T,this._endJulian=void 0,this._epochJulian=void 0,this._lastXPos=void 0,this._scrubElement=void 0,this._startJulian=void 0,this._timeBarSecondsSpan=void 0,this._clock=t,this._scrubJulian=t.currentTime,this._mainTicSpan=-1,this._mouseMode=h,this._touchMode=v,this._touchState={centerX:0,spanX:0},this._mouseX=0,this._timelineDrag=0,this._timelineDragLocation=void 0,this._lastHeight=void 0,this._lastWidth=void 0,this._topDiv.innerHTML='<div class="super-cesium-timeline-bar"></div><div class="super-cesium-timeline-trackContainer"><canvas class="super-cesium-timeline-tracks" width="10" height="1"></canvas></div><div class="super-cesium-timeline-needle"></div><span class="super-cesium-timeline-ruler"></span><div class="super-cesium-track-description"></div><div class="super-cesium-timeline-bar-tooltip"></div>',this._timeBarEle=this._topDiv.childNodes[0],this._trackContainer=this._topDiv.childNodes[1],this._trackListEle=this._topDiv.childNodes[1].childNodes[0],this._needleEle=this._topDiv.childNodes[2],this._rulerEle=this._topDiv.childNodes[3],this._trackDescriptionEle=this._topDiv.childNodes[4],this._context=this._trackListEle.getContext("2d"),this._timeBarTooltip=this._topDiv.childNodes[5],this._timeBarEle.addEventListener("mousemove",this.handleTimeBarMove.bind(this),!1),this._timeBarEle.addEventListener("mouseleave",this.handleTimeBarLeave.bind(this),!1),this.onCanvasClick=new d.default,this._trackListEle.addEventListener("click",this.handleCanvasClick.bind(this),!1),this._trackListEle.addEventListener("mousemove",this.handleCanvasMove.bind(this),!1),this._trackListEle.addEventListener("mouseleave",this.handleCanvasLeave.bind(this),!1),this._trackList=[],this._highlightRanges=[],this.zoomTo(t.startTime,t.stopTime),this._onMouseDown=(A=this,function(e){A._isOnClick=!0,A._timeBarTooltip&&(A._timeBarTooltip.style.display="none"),A._mouseMode!==g&&(0===e.button?(A._mouseMode=p,A._scrubElement&&(A._scrubElement.style.backgroundPosition="-16px 0"),A._onMouseMove(e)):(A._mouseX=e.clientX,2===e.button?A._mouseMode=_:A._mouseMode=m)),e.preventDefault()}),this._onMouseUp=function(e){return function(t){e._isOnClick=!1,e._mouseMode=h,e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0"),e._timelineDrag=0,e._timelineDragLocation=void 0}}(this),this._onMouseMove=function(e){return function(t){var i;if(e._mouseMode===p){t.preventDefault();var n=t.clientX-e._topDiv.getBoundingClientRect().left;n<0?(e._timelineDragLocation=0,e._timelineDrag=-.01*e._timeBarSecondsSpan):n>e._topDiv.clientWidth?(e._timelineDragLocation=e._topDiv.clientWidth,e._timelineDrag=.01*e._timeBarSecondsSpan):(e._timelineDragLocation=void 0,e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth))}else if(e._mouseMode===m){if(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i){var a=i*e._timeBarSecondsSpan/e._topDiv.clientWidth;e.zoomTo(s.default.addSeconds(e._startJulian,a,new s.default),s.default.addSeconds(e._endJulian,a,new s.default))}}else e._mouseMode===_&&(i=e._mouseX-t.clientX,e._mouseX=t.clientX,0!==i&&e.zoomFrom(Math.pow(1.01,i)))}}(this),this._onMouseWheel=function(e){return function(t){var i=t.wheelDeltaY||t.wheelDelta||-t.detail;i/=f=Math.max(Math.min(Math.abs(i),f),1),e.zoomFrom(Math.pow(1.05,-i))}}(this),this._onTouchStart=function(e){return function(t){var i,n,a=t.touches.length,r=e._topDiv.getBoundingClientRect().left;t.preventDefault(),e._mouseMode=g,1===a?(i=s.default.secondsDifference(e._scrubJulian,e._startJulian),n=Math.round(i*e._topDiv.clientWidth/e._timeBarSecondsSpan+r),Math.abs(t.touches[0].clientX-n)<50?(e._touchMode=y,e._scrubElement&&(e._scrubElement.style.backgroundPosition=1===a?"-16px 0":"0 0")):(e._touchMode=w,e._touchState.centerX=t.touches[0].clientX-r)):2===a?(e._touchMode=b,e._touchState.centerX=.5*(t.touches[0].clientX+t.touches[1].clientX)-r,e._touchState.spanX=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):e._touchMode=O}}(this),this._onTouchMove=function(e){return function(t){var i,n,r,o,l,u,d=1,c=e._topDiv.getBoundingClientRect().left;e._touchMode===w&&(e._touchMode=b),e._mouseMode=g,e._touchMode===y?(t.preventDefault(),1===t.changedTouches.length&&(n=t.changedTouches[0].clientX-c)>=0&&n<=e._topDiv.clientWidth&&e._setTimeBarTime(n,n*e._timeBarSecondsSpan/e._topDiv.clientWidth)):e._touchMode===b&&(2===(r=t.touches.length)?(o=.5*(t.touches[0].clientX+t.touches[1].clientX)-c,l=Math.abs(t.touches[0].clientX-t.touches[1].clientX)):1===r&&(o=t.touches[0].clientX-c,l=0),a.default(o)&&(l>0&&e._touchState.spanX>0?(d=e._touchState.spanX/l,u=s.default.addSeconds(e._startJulian,(e._touchState.centerX*e._timeBarSecondsSpan-o*e._timeBarSecondsSpan*d)/e._topDiv.clientWidth,new s.default)):(i=e._touchState.centerX-o,u=s.default.addSeconds(e._startJulian,i*e._timeBarSecondsSpan/e._topDiv.clientWidth,new s.default)),e.zoomTo(u,s.default.addSeconds(u,e._timeBarSecondsSpan*d,new s.default)),e._touchState.centerX=o,e._touchState.spanX=l))}}(this),this._onTouchEnd=function(e){return function(t){var i=t.touches.length,n=e._topDiv.getBoundingClientRect().left;e._touchMode===w?(e._touchMode=y,e._onTouchMove(t)):e._touchMode===y&&e._onTouchMove(t),e._mouseMode=g,1!==i?e._touchMode=i>0?O:v:e._touchMode===b&&(e._touchState.centerX=t.touches[0].clientX-n),e._scrubElement&&(e._scrubElement.style.backgroundPosition="0 0")}}(this);var E=this._timeBarEle;r&&(x.addEventListener("mouseup",this._onMouseUp,!1),x.addEventListener("mousemove",this._onMouseMove,!1),E.addEventListener("mousedown",this._onMouseDown,!1),E.addEventListener("touchstart",this._onTouchStart,!1),E.addEventListener("touchmove",this._onTouchMove,!1),E.addEventListener("touchend",this._onTouchEnd,!1),E.addEventListener("touchcancel",this._onTouchEnd,!1)),E.addEventListener("wheel",this._onMouseWheel,!1),E.addEventListener("DOMMouseScroll",this._onMouseWheel,!1),E.addEventListener("mousewheel",this._onMouseWheel,!1),this._topDiv.oncontextmenu=function(){return!1},this._topDiv.onwheel=function(){return!1},t.onTick.addEventListener(this.updateFromClock,this),this.updateFromClock()}return Object.defineProperty(e.prototype,"isAccumulate",{get:function(){return this._isAccumulate},set:function(e){this._isAccumulate!==e&&(this._isAccumulate=e,this.resize())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"labelFormatter",{get:function(){return this._labelFormatter},set:function(e){this._labelFormatter!==e&&(this._labelFormatter=e,this.resize())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"allowMouseEvent",{get:function(){return this._allowMouseEvent},set:function(e){if(e!==this._allowMouseEvent){this._allowMouseEvent=e;var t=this.container.ownerDocument,i=this._timeBarEle;e?(t.addEventListener("mouseup",this._onMouseUp,!1),t.addEventListener("mousemove",this._onMouseMove,!1),i.addEventListener("mousedown",this._onMouseDown,!1),i.addEventListener("touchstart",this._onTouchStart,!1),i.addEventListener("touchmove",this._onTouchMove,!1),i.addEventListener("touchend",this._onTouchEnd,!1),i.addEventListener("touchcancel",this._onTouchEnd,!1)):(t.removeEventListener("mouseup",this._onMouseUp,!1),t.removeEventListener("mousemove",this._onMouseMove,!1),i.removeEventListener("mousedown",this._onMouseDown,!1),i.removeEventListener("touchstart",this._onTouchStart,!1),i.removeEventListener("touchmove",this._onTouchMove,!1),i.removeEventListener("touchend",this._onTouchEnd,!1),i.removeEventListener("touchcancel",this._onTouchEnd,!1))}},enumerable:!1,configurable:!0}),e.prototype.addEventListener=function(e,t,i){this._topDiv.addEventListener(e,t,i)},e.prototype.removeEventListener=function(e,t,i){this._topDiv.removeEventListener(e,t,i)},e.prototype.isDestroyed=function(){return!1},e.prototype.destroy=function(){this._trackListEle.removeEventListener("click",this.handleCanvasClick),this._clock.onTick.removeEventListener(this.updateFromClock,this);var e=this.container.ownerDocument;e.removeEventListener("mouseup",this._onMouseUp,!1),e.removeEventListener("mousemove",this._onMouseMove,!1);var t=this._timeBarEle;t.removeEventListener("mousedown",this._onMouseDown,!1),t.removeEventListener("DOMMouseScroll",this._onMouseWheel,!1),t.removeEventListener("mousewheel",this._onMouseWheel,!1),t.removeEventListener("touchstart",this._onTouchStart,!1),t.removeEventListener("touchmove",this._onTouchMove,!1),t.removeEventListener("touchend",this._onTouchEnd,!1),t.removeEventListener("touchcancel",this._onTouchEnd,!1),this.container.removeChild(this._topDiv),r.default(this)},e.prototype.handleTimeBarMove=function(e){var t=this;return this._isOnClick||"super-cesium-timeline-icon16-label"===e.target.className?(this.moveTimer&&window.clearTimeout(this.moveTimer),void(this._timeBarTooltip.style.display="none")):(this.moveTimer&&window.clearTimeout(this.moveTimer),void(this.moveTimer=setTimeout((function(){var i=e.offsetX,n=e.offsetY;navigator.userAgent.indexOf("Firefox")>=0&&(i=e.layerX,n=e.layerY);var a=i,r=n;"super-cesium-timeline-bar"!==e.target.className&&(a=e.target.offsetLeft+i,r=e.target.offsetTop+n);var o=t._timeBarEle.clientHeight,l=r-8,u=a+3;r<8?l=0:o-r<8&&(l=o-16),t._timeBarEle.clientWidth-a<125&&(u=a-122-3);var d=a*t._timeBarSecondsSpan/t._topDiv.clientWidth,f=new s.default;s.default.addSeconds(t._startJulian,d,f);var h,p=s.default.toDate(f);t._labelFormatter===c.default.LOCALE?h=new Date(p.valueOf()+288e5).toJSON().substr(0,19).replace("T"," "):h=p.toJSON().substr(0,19)+"Z";t._timeBarTooltip.innerText=h,t._timeBarTooltip.style.transform="translate("+u+"px,"+l+"px)",t._timeBarTooltip.style.display="block"}),20)))},e.prototype.handleTimeBarLeave=function(){this.moveTimer&&window.clearTimeout(this.moveTimer),this._timeBarTooltip.style.display="none",this.barMoveTimer&&window.clearTimeout(this.barMoveTimer),this._trackDescriptionEle.style.display="none",this._currentTrackDescription.id=""},e.prototype.handleCanvasClick=function(e){if(this._trackList.length>0){var t=void 0,i=void 0,n=e.offsetX,a=e.offsetY;navigator.userAgent.indexOf("Firefox")>=0&&(n=e.layerX,a=e.layerY);for(var r=0,o=0;o<this._trackList.length;o++)if(a<(r+=this._trackList[o].height)){t=this._trackList[o],i=this._trackList[o].height;break}if(t){var l=t.interval.values,u=void 0,d=new s.default;for(o=0;o<l.length;o++){var c=l[o].interval.start,f=l[o].interval.stop,h=n*this._timeBarSecondsSpan/this._topDiv.clientWidth;if(d=s.default.addSeconds(this._startJulian,h,d),"rectangle"===l[o].type){if(s.default.lessThanOrEquals(d,f)&&s.default.greaterThanOrEquals(d,c)){u=l[o],this.onCanvasClick.raiseEvent(u);break}}else if("point"===l[o].type){var p=Math.min(l[o].pointSize,Math.floor(i/4)),m=Math.round(p/this._topDiv.clientWidth*this._timeBarSecondsSpan),_=new s.default,g=new s.default;if(_=s.default.addSeconds(d,-m,_),g=s.default.addSeconds(d,m,g),s.default.lessThanOrEquals(c,g)&&s.default.greaterThanOrEquals(c,_)){u=l[o],this.onCanvasClick.raiseEvent(u);break}}else if("image"===l[o].type){var v=Math.round(l[o].imageSize[0]/this._topDiv.clientWidth/2*this._timeBarSecondsSpan),y=new s.default,b=new s.default;if(y=s.default.addSeconds(d,-v,y),b=s.default.addSeconds(d,v,b),s.default.lessThanOrEquals(c,b)&&s.default.greaterThanOrEquals(c,y)){u=l[o],this.onCanvasClick.raiseEvent(u);break}}}}}},e.prototype.handleCanvasMove=function(e){var t=this;this.barMoveTimer&&window.clearTimeout(this.barMoveTimer),this.barMoveTimer=setTimeout((function(){if(t._trackList.length>0){if(Date.now()-t._currentTrackDescription.time.valueOf()<t._currentTrackDescription.wait)return;t._currentTrackDescription.time=new Date;var i=void 0,n=void 0,a=e.offsetX,r=e.offsetY;navigator.userAgent.indexOf("Firefox")>=0&&(a=e.layerX,r=e.layerY);for(var o=0,l=0;l<t._trackList.length;l++)if(r<(o+=t._trackList[l].height)){i=t._trackList[l],n=t._trackList[l].height;break}if(i){var u=i.interval.values,d=void 0,c=new s.default,f=!1,h=void 0,p=void 0;for(l=0;l<u.length;l++){var m=u[l].interval.start,_=u[l].interval.stop,g=a*t._timeBarSecondsSpan/t._topDiv.clientWidth;if(c=s.default.addSeconds(t._startJulian,g,c),"rectangle"===u[l].type){if(s.default.lessThanOrEquals(c,_)&&s.default.greaterThanOrEquals(c,m)){d=u[l];var v=Math.round(s.default.secondsDifference(_,m)/2),y=s.default.secondsDifference(m,t._startJulian)+v;h=Math.round(y/t._timeBarSecondsSpan*t._topDiv.clientWidth),p=Math.round(t._topDiv.clientHeight-t._timeBarEle.clientHeight-o+n-d.padding-d.borderWidth),f=!0;break}}else if("point"===u[l].type){var b=Math.min(u[l].pointSize,Math.floor(n/4)),w=Math.round(b/t._topDiv.clientWidth*t._timeBarSecondsSpan),O=new s.default,x=new s.default;if(O=s.default.addSeconds(c,-w,O),x=s.default.addSeconds(c,w,x),s.default.lessThanOrEquals(m,x)&&s.default.greaterThanOrEquals(m,O)){d=u[l];var A=s.default.secondsDifference(m,t._startJulian);h=Math.round(A/t._timeBarSecondsSpan*t._topDiv.clientWidth),p=Math.round(t._topDiv.clientHeight-t._timeBarEle.clientHeight-o+n/2+b),f=!0;break}}else if("image"===u[l].type){var T=Math.round(u[l].imageSize[0]/t._topDiv.clientWidth/2*t._timeBarSecondsSpan),E=new s.default,C=new s.default;if(E=s.default.addSeconds(c,-T,E),C=s.default.addSeconds(c,T,C),s.default.lessThanOrEquals(m,C)&&s.default.greaterThanOrEquals(m,E)){d=u[l];var S=s.default.secondsDifference(m,t._startJulian);h=Math.round(S/t._timeBarSecondsSpan*t._topDiv.clientWidth),p=Math.round(t._topDiv.clientHeight-t._timeBarEle.clientHeight-o+n/2+d.realImageSize/2),f=!0;break}}}f&&d.description&&d.id+d.description!==t._currentTrackDescription.id?(t._currentTrackDescription.id=d.id+d.description,t._trackDescriptionEle.innerHTML=d.description,t._trackDescriptionEle.style.left=h+d.descriptionOffset[0]+"px",t._trackDescriptionEle.style.bottom=p+d.descriptionOffset[1]+2+"px",t._trackDescriptionEle.style.display="inline-block"):f||(t._trackDescriptionEle.style.display="none",t._currentTrackDescription.id="")}}}),20)},e.prototype.handleCanvasLeave=function(e){this.barMoveTimer&&window.clearTimeout(this.barMoveTimer),this._trackDescriptionEle.style.display="none",this._currentTrackDescription.id=""},e.prototype.addHighlightRange=function(e,t,i,n,a,r){var o=new u.default(e,t,i,n,a,r);return this._highlightRanges.push(o),this.resize(),o},e.prototype.removeHighlightRange=function(e){var t;t="string"==typeof e||"number"==typeof e?e:e.id;for(var i=!1,n=0;n<this._highlightRanges.length;n++)if(t===this._highlightRanges[n].id){this._highlightRanges.splice(n,1),i=!0;break}return!!i&&(this._lastHeight=void 0,this.resize(),!0)},e.prototype.addTrack=function(e,t,i,n){var a=new l.default(e,t,i,n);return this._trackList.push(a),this._lastHeight=void 0,this.resize(),a},e.prototype.removeTrack=function(e){var t;t="string"==typeof e||"number"==typeof e?e:e.id;for(var i=!1,n=0;n<this._trackList.length;n++)if(t===this._trackList[n].id){this._trackList.splice(n,1),i=!0;break}return!!i&&(this._lastHeight=void 0,this.resize(),!0)},e.prototype.zoomTo=function(e,t){if(!a.default(e))throw new o.default("startTime is required.");if(!a.default(t))throw new o.default("stopTime is required");if(s.default.lessThanOrEquals(t,e))throw new o.default("Start time must come before end time.");if(this._startJulian=e,this._endJulian=t,this._timeBarSecondsSpan=s.default.secondsDifference(t,e),this._clock&&this._clock.clockRange!==n.default.UNBOUNDED){var i=this._clock.startTime,r=this._clock.stopTime,l=s.default.secondsDifference(r,i),u=s.default.secondsDifference(i,this._startJulian),d=s.default.secondsDifference(r,this._endJulian);this._timeBarSecondsSpan>=l?(this._timeBarSecondsSpan=l,this._startJulian=this._clock.startTime,this._endJulian=this._clock.stopTime):u>0?(this._endJulian=s.default.addSeconds(this._endJulian,u,new s.default),this._startJulian=i,this._timeBarSecondsSpan=s.default.secondsDifference(this._endJulian,this._startJulian)):d<0&&(this._startJulian=s.default.addSeconds(this._startJulian,d,new s.default),this._endJulian=r,this._timeBarSecondsSpan=s.default.secondsDifference(this._endJulian,this._startJulian))}this._makeTics();var c=document.createEvent("Event");c.initEvent("setzoom",!0,!0),c.startJulian=this._startJulian,c.endJulian=this._endJulian,c.epochJulian=this._epochJulian,c.totalSpan=this._timeBarSecondsSpan,c.mainTicSpan=this._mainTicSpan,this._topDiv.dispatchEvent(c)},e.prototype.zoomFrom=function(e){var t=s.default.secondsDifference(this._scrubJulian,this._startJulian);e>1||t<0||t>this._timeBarSecondsSpan?t=.5*this._timeBarSecondsSpan:t+=t-.5*this._timeBarSecondsSpan;var i=this._timeBarSecondsSpan-t,n=new s.default,a=new s.default;s.default.addSeconds(this._startJulian,t-t*e,n),s.default.addSeconds(this._endJulian,i*e-i,a),this.zoomTo(s.default.addSeconds(this._startJulian,t-t*e,new s.default),s.default.addSeconds(this._endJulian,i*e-i,new s.default))},e.prototype.makeLabel=function(e){var t="";if(this._isAccumulate){t=""+Math.round(s.default.secondsDifference(e,this._clock.startTime))}else{var i=s.default.toDate(e);t=this._getTimeStringByRank(i,this._timeBarSecondsSpan,this._enableFormatter).toString()}return t},e.prototype._getTimeStringByRank=function(e,t,i){var n,a,r,o,s,l;this._labelFormatter===c.default.LOCALE?(n=e.getFullYear(),a=e.getMonth(),r=e.getDate(),o=e.getHours(),s=e.getMinutes(),l=e.getSeconds(),e.getMilliseconds()):(n=e.getUTCFullYear(),a=e.getUTCMonth(),r=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),l=e.getUTCSeconds(),e.getUTCMilliseconds());var u=n+"",d=a+1<10?"0"+(a+1):a+1;u+="-"+d+"-"+(r<10?"0"+r:r);var f=(o<10?"0"+o:o)+":"+(s<10?"0"+s:s)+":"+(l<10?"0"+l:l);return i?0===a&&1===r&&0===o&&0===s&&0===l?n:a>0&&1===r&&0===o&&0===s&&0===l?n+"-"+d:r>1&&0===o&&0===s&&0===l?t<259200?u.slice(5):u:o>0&&0===s&&0===l||s>0&&0===l?f.slice(0,5):t<=600?f:t<=86400||t<259200?f.slice(0,5):u:u+" "+f},e.prototype._getMainTicMinValue=function(){if(this._enableFormatter){var e=this._timeBarSecondsSpan;return e<=600?.9:e<=86400||e<=259200?59:86399}return 0},e.prototype._makeTics=function(){var e,t=this._timeBarEle,i=s.default.secondsDifference(this._scrubJulian,this._startJulian),n=Math.round(i*this._topDiv.clientWidth/this._timeBarSecondsSpan),a=n-8,r=this;this._needleEle.style.left=n.toString()+"px";var o="",l=2;this._isAccumulate&&(l=2);var u=.06,d=this._timeBarSecondsSpan;d<l?(d=l,this._timeBarSecondsSpan=l,this._endJulian=s.default.addSeconds(this._startJulian,l,new s.default)):d>31536e6&&(d=31536e6,this._timeBarSecondsSpan=31536e6,this._endJulian=s.default.addSeconds(this._startJulian,31536e6,new s.default));var f=this._timeBarEle.clientWidth;f<10&&(f=10);var h,p=this._startJulian,m=Math.min(d/f*1e-5,.4),_=s.default.toGregorianDate(p);h=d>31536e4?s.default.fromDate(new Date(Date.UTC(100*Math.floor(_.year/100),0))):d>31536e3?s.default.fromDate(new Date(Date.UTC(10*Math.floor(_.year/10),0))):d>86400?s.default.fromDate(new Date(Date.UTC(_.year,0))):s.default.fromDate(new Date(Date.UTC(_.year,_.month,_.day))),this._labelFormatter===c.default.LOCALE&&s.default.addHours(h,-8,h);var g=s.default.secondsDifference(this._startJulian,s.default.addSeconds(h,m,new s.default)),v=g+d;function y(e){return Math.floor(g/e)*e}function b(e,t){return Math.ceil(e/t+.5)*t}function w(e){return(e-g)/d}function O(e,t){return e-t*Math.round(e/t)}this._epochJulian=h,this._rulerEle.innerHTML=this.makeLabel(s.default.addSeconds(this._endJulian,-l,new s.default));var A=this._rulerEle.offsetWidth;this._isAccumulate||(A+=20),A<30&&!this._isAccumulate&&(A=180);var T=u;u-=1e-10;var E={startTime:g,startJulian:p,epochJulian:h,duration:d,timeBarWidth:f,y:0};this._highlightRanges.forEach((function(e){o+=e.render(E)}));var C=0,S=0,M=0,D=A/f;D>1&&(D=1),D*=this._timeBarSecondsSpan;var P,I=-1,L=-1,j=x.length,R=this._getMainTicMinValue();for(P=0;P<j;++P){var N=x[P];if(++I,C=N,N>D&&N>.9&&N>R)break;L<0&&f*(N/this._timeBarSecondsSpan)>=this.smallestTicInPixels&&(L=I)}if(I>0){for(;I>0;)if(--I,Math.abs(O(C,x[I]))<1e-5){x[I]>=u&&(S=x[I]);break}if(L>=0)for(;L<I;){if(Math.abs(O(S,x[L]))<1e-5&&x[L]>=u){M=x[L];break}++L}}(u=T)>1e-10&&M<1e-5&&Math.abs(u-C)>1e-10&&(M=u,u<=C+1e-10&&(S=0));var B,F=-999999;if(f*(M/this._timeBarSecondsSpan)>=3)for(e=y(M);e<=v;e=b(e,M))o+='<span class="super-cesium-timeline-ticTiny" style="left: '+Math.round(f*w(e)).toString()+'px;"></span>';if(f*(S/this._timeBarSecondsSpan)>=3)for(e=y(S);e<=v;e=b(e,S))o+='<span class="super-cesium-timeline-ticSub" style="left: '+Math.round(f*w(e)).toString()+'px;"></span>';if(f*(C/this._timeBarSecondsSpan)>=2){this._mainTicSpan=C,v+=C,e=y(C);for(var k=s.default.computeTaiMinusUtc(h);e<=v;){var z=s.default.addSeconds(p,e-g,new s.default);if(C>2.1){var U=s.default.computeTaiMinusUtc(z);Math.abs(U-k)>.1&&(e+=U-k,z=s.default.addSeconds(p,e-g,new s.default))}var V=Math.round(f*w(e)),H=this.makeLabel(z);this._rulerEle.innerHTML=H,(B=this._rulerEle.offsetWidth)<10&&(B=A);var G=V-(B/2-1);G>F?(F=G+B+5,o+='<span class="super-cesium-timeline-ticMain" style="left: '+V.toString()+'px;"></span><span class="super-cesium-timeline-ticLabel" style="left: '+G.toString()+'px;">'+H+"</span>"):o+='<span class="super-cesium-timeline-ticSub" style="left: '+V.toString()+'px;"></span>',e=b(e,C)}}else this._mainTicSpan=-1;var Y,W=s.default.toDate(this._scrubJulian);this._labelFormatter===c.default.LOCALE?Y=new Date(W.valueOf()+288e5).toJSON().substr(0,19).replace("T"," "):Y=W.toJSON().substr(0,19)+"Z";o+='\x3c!--<span class="super-cesium-timeline-icon16-label" style="left:'+a+'px;">'+Y+"</span>--\x3e",o+='<div class="super-cesium-timeline-icon16" style="left:'+a+'px;bottom:0;background-position: 0 0;"><span class="super-cesium-timeline-icon16-label">'+Y+"</span></div>",t.innerHTML=o,this._scrubElement=t.lastChild,this._scrubElementLabel=t.lastChild.firstChild,this._context.clearRect(0,0,this._trackListEle.width,this._trackListEle.height),E.y=0,this._trackList.forEach((function(e){e.render(r._context,E),E.y+=e.height}))},e.prototype.updateFromClock=function(){this._scrubJulian=this._clock.currentTime;var e=this._scrubElement;if(a.default(this._scrubElement)){var t=s.default.secondsDifference(this._scrubJulian,this._startJulian),i=Math.round(t*this._topDiv.clientWidth/this._timeBarSecondsSpan);if(a.default(this._scrubElementLabel)){var n=void 0,r=s.default.toDate(this._scrubJulian);if(this._labelFormatter===c.default.LOCALE){var o=s.default.toDate(this._scrubJulian);n=new Date(o.valueOf()+288e5).toJSON().substr(0,19).replace("T"," ")}else n=r.toJSON().substr(0,19)+"Z";this._scrubElementLabel.innerText=n}this._lastXPos!==i&&(this._lastXPos=i,e.style.left=i-8+"px",this._needleEle.style.left=i+"px")}a.default(this._timelineDragLocation)&&(this._setTimeBarTime(this._timelineDragLocation,this._timelineDragLocation*this._timeBarSecondsSpan/this._topDiv.clientWidth),this.zoomTo(s.default.addSeconds(this._startJulian,this._timelineDrag,new s.default),s.default.addSeconds(this._endJulian,this._timelineDrag,new s.default)))},e.prototype._setTimeBarTime=function(e,t){if(e=Math.round(e),this._scrubJulian=s.default.addSeconds(this._startJulian,t,new s.default),this._scrubElement){var i=e-8;if(a.default(this._scrubElementLabel)){var n=void 0,r=s.default.toDate(this._scrubJulian);if(this._labelFormatter===c.default.LOCALE){var o=s.default.toDate(this._scrubJulian);n=new Date(o.valueOf()+288e5).toJSON().substr(0,19).replace("T"," ")}else n=r.toJSON().substr(0,19)+"Z";this._scrubElementLabel.innerText=n}this._scrubElement.style.left=i.toString()+"px",this._needleEle.style.left=e.toString()+"px"}var l=document.createEvent("Event");l.initEvent("settime",!0,!0),l.clientX=e,l.timeSeconds=t,l.timeJulian=this._scrubJulian,l.clock=this._clock,this._topDiv.dispatchEvent(l)},e.prototype.resize=function(){var e=this.container.clientWidth,t=this.container.clientHeight,i=this._timeBarEle.clientHeight,n=Math.max(0,t-i);this._trackContainer.style.height=n+"px";var a=1;this._trackList.forEach((function(e){a+=e.height})),this._trackListEle.style.height=a.toString()+"px",this._trackListEle.width=this._trackListEle.clientWidth,this._trackListEle.height=a,this._makeTics(),this._lastXPos=void 0,this._lastWidth=e,this._lastHeight=t},e}();t.default=A},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(549).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),o=i(6),s=i(549),l=i(984),u=function(e){function t(t){var i=e.call(this)||this,n=t.width,a=t.height,s=t.depth,l=t.matrix,u=void 0===l?o.default.IDENTITY:l,d=t.data,c=t.slices,f=void 0===c?4:c,h=t.decodeData,p=void 0!==h&&h,m=t.colorScheme;return i.data=d,i._matrix=u,i.slices=f,i.decodeData=p,i.dimensions=new r.default(n,a,s),i.colorScheme=m,i.createPrimitive(),i}return a(t,e),t.prototype.createPrimitive=function(){this.volumePrimitive=new l.default({modelMatrix:this._matrix,video:this.data instanceof HTMLVideoElement?this.data:void 0,image:this.data instanceof HTMLImageElement?this.data:void 0,slices:this.slices,width:2*this.dimensions.x,height:2*this.dimensions.y,depth:2*this.dimensions.z,density:2,resolution:new r.default(128,128,128),colorScheme:this.colorScheme})},t.prototype.afterAdded=function(e){this.parent=e,this.volumePrimitive.createTextureAndCommand(this.parent.cesiumViewer.scene.context),this.parent.cesiumViewer.scene.primitives.add(this.volumePrimitive)},t.prototype.destroyForward=function(){this.parent.cesiumViewer.scene.primitives.remove(this.volumePrimitive)},t.prototype.updateForward=function(){},t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(240),o=i(1),s=i(6),l=i(549),u=i(45),d=i(58),c=i(83),f=i(91),h=i(33),p=i(32),m=i(62),_=i(118),g=i(35),v=i(1173),y=i(0),b=i(984),w=function(e){function t(t){var i=e.call(this)||this,n=t.width,a=t.height,l=t.depth,u=t.matrix,d=void 0===u?s.default.IDENTITY:u,c=t.data,f=t.slices,h=void 0===f?4:f,p=t.decodeData,m=void 0!==p&&p;i.data=c,i._matrix=d,i.slices=h,i.decodeData=m,i.dimensions=new o.default(n,a,l),i._colorScheme=t.colorScheme;var _=r.default.fromDimensions({dimensions:i.dimensions});return i._boxGeometry=r.default.createGeometry(_),i}return a(t,e),t.prototype.createPrimitive=function(){var e=this,t=this.parent.cesiumViewer.scene.context,i=b.updateTransferFunction(t,this._colorScheme);this.data instanceof HTMLVideoElement?this.data.addEventListener("canplaythrough",(function(){e.volumeTexture=new u.default({context:t,width:e.data.videoWidth,height:e.data.videoHeight,sampler:new d.default({wrapS:c.default.CLAMP_TO_EDGE,wrapT:c.default.CLAMP_TO_EDGE,minificationFilter:m.default.LINEAR,magnificationFilter:_.default.LINEAR})}),e.volumePrimitive&&(e.volumePrimitive.ready=!0)})):this.volumeTexture=new u.default({context:t,width:this.data.width,height:this.data.height,pixelFormat:h.default.RGBA,pixelDatatype:p.default.UNSIGNED_BYTE,source:this.data,sampler:new d.default({wrapS:c.default.CLAMP_TO_EDGE,wrapT:c.default.CLAMP_TO_EDGE,minificationFilter:m.default.LINEAR,magnificationFilter:_.default.LINEAR})});var n=new u.default({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:h.default.RGBA,pixelDatatype:p.default.UNSIGNED_BYTE}),a=new u.default({context:t,width:t.drawingBufferWidth,height:t.drawingBufferHeight,pixelFormat:h.default.DEPTH_COMPONENT,pixelDatatype:p.default.UNSIGNED_INT,sampler:new d.default({wrapS:c.default.CLAMP_TO_EDGE,wrapT:c.default.CLAMP_TO_EDGE,minificationFilter:m.default.LINEAR,magnificationFilter:_.default.LINEAR})}),r=new f.default({context:t,colorTextures:[n],depthTexture:a});this.volumePrimitive=new v.default({modelMatrix:this._matrix,geometry:this._boxGeometry,primitiveType:g.default.TRIANGLES,uniformMap:{u_backTexture:function(){return n},u_depthTexture:function(){return a},u_volumeTexture:function(){return e.volumeTexture},u_colorTexture:function(){return i},u_dimensions:function(){return e.dimensions},steps:function(){return 64},alphaCorrection:function(){return.1},u_slices:function(){return e.slices},u_decoded:function(){return e.decodeData}},framebuffer:r,autoClear:!0}),this.volumeTexture&&(this.volumePrimitive.ready=!0)},t.prototype.afterAdded=function(e){this.parent=e,this.createPrimitive(),this.parent.cesiumViewer.scene.primitives.add(this.volumePrimitive)},t.prototype.destroyForward=function(){this.parent.cesiumViewer.scene.primitives.remove(this.volumePrimitive)},t.prototype.updateForward=function(){y.default(this.volumeTexture)&&this.data instanceof HTMLVideoElement&&4===this.data.readyState&&this.volumeTexture.copyFrom({source:this.data})},t}(l.default);t.default=w},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(151).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(548).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(151),s=i(6),l=i(47),u=i(1),d=i(43),c=i(53),f=i(7),h=i(143),p=i(326),m=i(22),_=i(5),g=i(64),v=i(185),y={latitudeStartDegree:-60,latitudeEndDegree:60,longitudeStartDegree:-180,longitudeEndDegree:180,stepDegree:1,cellWidth:1,activeColor:f.default.GREEN,initColor:f.default.WHITE,initVisible:!0,enableUpdateStatus:!0},b=function(e){function t(t){var i=e.call(this,r(r({},y),t))||this;i.ready=!1,i.smallEarthRadii=63e5,i.primitiveCollection=new l.default,i.groupCollection=new l.default,i.instanceCollection=new l.default;var n=r(r({},y),t);return i.latitudeStartDegree=n.latitudeStartDegree,i.latitudeEndDegree=n.latitudeEndDegree,i.longitudeStartDegree=n.longitudeStartDegree,i.longitudeEndDegree=n.longitudeEndDegree,i.stepDegree=n.stepDegree,i.cellWidth=n.cellWidth,i.activeColor=n.activeColor,i.initColor=n.initColor,i.initVisible=n.initVisible,i}return a(t,e),t.prototype.createPrimitive=function(){for(var e=0,t=this.latitudeStartDegree;t<this.latitudeEndDegree;t+=Math.sqrt(3)*this.stepDegree){var i=[],n=[];if(e%2==0)for(var a=this.longitudeStartDegree+this.stepDegree;a<this.longitudeEndDegree;a+=2*this.stepDegree){var r=[];r=[u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a,this.latitudeStartDegree+(e*Math.sqrt(3)+2*Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a+this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a+this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a,this.latitudeStartDegree+(e*Math.sqrt(3)-2*Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3)];var o=new d.default({geometry:new v.default({positions:r,width:this.cellWidth}),attributes:{color:c.default.fromColor(this.initColor),show:new p.ShowGeometryInstanceAttribute(this.initVisible)},id:"cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree)});n.push("cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree)),this.instanceCollection.set("cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree),[a,this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree,"cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree)]),i.push(o)}else for(a=this.longitudeStartDegree;a<this.longitudeEndDegree-this.stepDegree;a+=2*this.stepDegree){r=[];r=[u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a,this.latitudeStartDegree+(e*Math.sqrt(3)+2*Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a+this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a+this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a,this.latitudeStartDegree+(e*Math.sqrt(3)-2*Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.stepDegree,1e3),u.default.fromDegrees(a-this.stepDegree,this.latitudeStartDegree+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.stepDegree,1e3)];o=new d.default({geometry:new v.default({positions:r,width:this.cellWidth}),attributes:{color:c.default.fromColor(this.initColor),show:new p.ShowGeometryInstanceAttribute(this.initVisible)},id:"cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree)});this.instanceCollection.set("cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree),[a,this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree,"cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree)]),i.push(o),n.push("cell_geometry_"+a+"_"+(this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree))}var s=new g.default({geometryInstances:i,appearance:new h.default({})});this.primitiveCollection.set(e,s),this.groupCollection.set(e,[this.latitudeStartDegree+e*Math.sqrt(3)*this.stepDegree,e,n]),e++}},t.prototype.addPrimitive=function(){var e=this,t=this.getViewer();if(t){var i=[];return this.primitiveCollection.values.forEach((function(e,n){var a=t.cesiumViewer.scene.groundPrimitives.add(e);i.push(a.readyPromise)})),Promise.all(i).then((function(){e.ready=!0})),!0}return!1},t.prototype.afterAdded=function(e){this.isAdded||(this.parent=e,this.createPrimitive(),this.isAdded=this.addPrimitive())},t.prototype.updateForward=function(t,i){var n=this;if(e.prototype.updateForward.call(this,t,i),this.isAdded&&this.ready){var a=this.parent.optionsConfig.semiMajorAxis,r=new u.default,o=new u.default;s.default.getTranslation(i,r);var l=m.default.fromCartesian(r),d=_.default.toDegrees(l.latitude),h=_.default.toDegrees(a/this.smallEarthRadii)+2*this.stepDegree,g=[d-h,d+h];if(r&&!r.equals(u.default.ZERO)){var v=m.default.fromCartesian(r);o=u.default.fromRadians(v.longitude,v.latitude),this.groupCollection.values.forEach((function(e){if(e[0]>=g[0]&&e[0]<=g[1]){var t=n.primitiveCollection.get(e[1]);e[2].forEach((function(e){var i=n.instanceCollection.get(e),r=u.default.fromDegrees(i[0],i[1]),s=u.default.distance(r,o);if(s<2*a){var l=t.getGeometryInstanceAttributes(e);s<a?(l.color=c.default.toValue(f.default.RED),l.show=p.ShowGeometryInstanceAttribute.toValue(!0)):(l.color=c.default.toValue(f.default.WHITE),l.show=p.ShowGeometryInstanceAttribute.toValue(!1))}}))}}))}}},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getViewer();this.primitiveCollection.values.forEach((function(e,i){t.cesiumViewer.scene.groundPrimitives.remove(e)}))},t}(o.default);t.default=b},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(548).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(54),s=i(1),l=i(7),u=i(43),d=i(6),c=i(185),f=i(235),h=i(69),p=i(156),m=i(64),_=i(190),g=i(323),v=i(151),y=i(47),b=i(13),w={positiveXAxisConfig:{show:!0,name:"+X",color:l.default.RED,width:4,font:"16px",length:10},negativeXAxisConfig:{show:!0,name:"-X",color:l.default.RED,width:4,font:"16px",length:10},positiveYAxisConfig:{show:!0,name:"+Y",color:l.default.GREEN,width:4,font:"16px",length:10},negativeYAxisConfig:{show:!0,name:"-Y",color:l.default.GREEN,width:4,font:"16px",length:10},positiveZAxisConfig:{show:!0,name:"+Z",color:l.default.BLUE,width:4,font:"16px",length:10},negativeZAxisConfig:{show:!0,name:"-Z",color:l.default.BLUE,width:4,font:"16px",length:10}},O=function(e){function t(t){var i=e.call(this,t)||this;return i.rotationFrame=g.default.LOCAL,i.parentMatrix=d.default.IDENTITY.clone(),i.axisCollection=new y.default,i.axisLabelCollection=new y.default,i._axes=new _.default,i._labels=new f.default,i.positiveXAxisConfig=r(r({},w.positiveXAxisConfig),null==t?void 0:t.positiveXAxisConfig),i.negativeXAxisConfig=r(r({},w.negativeXAxisConfig),null==t?void 0:t.negativeXAxisConfig),i.positiveYAxisConfig=r(r({},w.positiveYAxisConfig),null==t?void 0:t.positiveYAxisConfig),i.negativeYAxisConfig=r(r({},w.negativeYAxisConfig),null==t?void 0:t.negativeYAxisConfig),i.positiveZAxisConfig=r(r({},w.positiveZAxisConfig),null==t?void 0:t.positiveZAxisConfig),i.negativeZAxisConfig=r(r({},w.negativeZAxisConfig),null==t?void 0:t.negativeZAxisConfig),i._showPositiveXAxis=i.positiveXAxisConfig.show,i._showNegativeXAxis=i.negativeXAxisConfig.show,i._showPositiveYAxis=i.positiveYAxisConfig.show,i._showNegativeYAxis=i.negativeYAxisConfig.show,i._showPositiveZAxis=i.positiveZAxisConfig.show,i._showNegativeZAxis=i.negativeZAxisConfig.show,i._show=!0,i._axes.add(i._labels),i}return a(t,e),t.prototype.showAxis=function(e,t){var i=this.axisCollection.get(e),n=this.axisLabelCollection.get(e+"Label");i.show=t,n.show=t},Object.defineProperty(t.prototype,"showPositiveXAxis",{get:function(){return this._showPositiveXAxis},set:function(e){this._showPositiveXAxis=e,this.showAxis("+X",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showNegativeXAxis",{get:function(){return this._showNegativeXAxis},set:function(e){this._showNegativeXAxis=e,this.showAxis("-X",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPositiveYAxis",{get:function(){return this._showPositiveYAxis},set:function(e){this._showPositiveYAxis=e,this.showAxis("+Y",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showNegativeYAxis",{get:function(){return this._showNegativeYAxis},set:function(e){this._showNegativeYAxis=e,this.showAxis("-Y",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showPositiveZAxis",{get:function(){return this._showPositiveZAxis},set:function(e){this._showPositiveZAxis=e,this.showAxis("+Z",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showNegativeZAxis",{get:function(){return this._showNegativeZAxis},set:function(e){this._showNegativeZAxis=e,this.showAxis("-Z",e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.showPositiveXAxis&&this.showAxis("+X",e),this.showNegativeXAxis&&this.showAxis("-X",e),this.showPositiveYAxis&&this.showAxis("+Y",e),this.showNegativeYAxis&&this.showAxis("-Y",e),this.showPositiveZAxis&&this.showAxis("+Z",e),this.showNegativeZAxis&&this.showAxis("-Z",e)},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(e,t){var i=new u.default({geometry:new c.default({positions:[s.default.multiplyByScalar(s.default.normalize(e,new s.default),.1,new s.default),s.default.multiplyByScalar(s.default.normalize(e,new s.default),t.length,new s.default)],width:t.width,vertexFormat:p.default.VERTEX_FORMAT,arcType:o.default.NONE})}),n=new m.default({geometryInstances:i,appearance:new p.default({material:h.default.fromType(h.default.PolylineArrowType,{color:t.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:t.show}),a=s.default.multiplyByScalar(s.default.normalize(e,new s.default),t.length,new s.default);return{primitive:n,labelConfig:{show:t.show,position:a,text:t.name,font:t.font,fillColor:t.color}}},t.prototype.afterAdded=function(e){this.parent=e,this.parentMatrix=e.matrix.clone();var t=e.getViewer();t&&(t.primitives.add(this._axes),this.createAxis(),this.isAdded=!0)},t.prototype.createAxis=function(){var e=this.createPrimitive(new s.default(1,0,0),this.positiveXAxisConfig),t=e.primitive,i=e.labelConfig;this._axes.add(t);var n=this._labels.add(i);this.axisCollection.set("+X",t),this.axisLabelCollection.set("+XLabel",n);var a=this.createPrimitive(new s.default(-1,0,0),this.negativeXAxisConfig),r=a.primitive,o=a.labelConfig;this._axes.add(r);var l=this._labels.add(o);this.axisCollection.set("-X",r),this.axisLabelCollection.set("-XLabel",l);var u=this.createPrimitive(new s.default(0,1,0),this.positiveYAxisConfig),d=u.primitive,c=u.labelConfig;this._axes.add(d);var f=this._labels.add(c);this.axisCollection.set("+Y",d),this.axisLabelCollection.set("+YLabel",f);var h=this.createPrimitive(new s.default(0,-1,0),this.negativeYAxisConfig),p=h.primitive,m=h.labelConfig;this._axes.add(p);var _=this._labels.add(m);this.axisCollection.set("-Y",p),this.axisLabelCollection.set("-YLabel",_);var g=this.createPrimitive(new s.default(0,0,1),this.positiveZAxisConfig),v=g.primitive,y=g.labelConfig;this._axes.add(v);var b=this._labels.add(y);this.axisCollection.set("+Z",v),this.axisLabelCollection.set("+ZLabel",b);var w=this.createPrimitive(new s.default(0,0,-1),this.negativeZAxisConfig),O=w.primitive,x=w.labelConfig;this._axes.add(O);var A=this._labels.add(x);this.axisCollection.set("-Z",O),this.axisLabelCollection.set("-ZLabel",A)},t.prototype.destroyForward=function(){(e.prototype.destroyForward.call(this),this._axes)&&this.parent.getViewer().primitives.remove(this._axes)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&this.updateMatrix(i)},t.prototype.updateLabel=function(e){if(this.showPositiveXAxis){var t=this.axisLabelCollection.get("+XLabel"),i=s.default.multiplyByScalar(new s.default(1,0,0),this.positiveXAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}if(this.showNegativeXAxis){t=this.axisLabelCollection.get("-XLabel"),i=s.default.multiplyByScalar(new s.default(-1,0,0),this.negativeXAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}if(this.showPositiveYAxis){t=this.axisLabelCollection.get("+YLabel"),i=s.default.multiplyByScalar(new s.default(0,1,0),this.positiveYAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}if(this.showNegativeYAxis){t=this.axisLabelCollection.get("-YLabel"),i=s.default.multiplyByScalar(new s.default(0,-1,0),this.negativeYAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}if(this.showPositiveZAxis){t=this.axisLabelCollection.get("+ZLabel"),i=s.default.multiplyByScalar(new s.default(0,0,1),this.positiveZAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}if(this.showNegativeZAxis){t=this.axisLabelCollection.get("-ZLabel"),i=s.default.multiplyByScalar(new s.default(0,0,-1),this.negativeZAxisConfig.length,new s.default);t.position=d.default.multiplyByPoint(e,i,new s.default)}},t.prototype.updateMatrix=function(e){this.updateLabel(e),this.axisCollection.values.forEach((function(t){t.modelMatrix=e}))},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(this.show=![b.default.SCENE2D,b.default.COLUMBUS_VIEW].includes(e))},t}(v.default);t.default=O},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(2),o=i(151),s=i(7),l=i(43),u=i(302),d=i(206),c=i(279),f=i(322),h=i(76),p=i(117),m=i(53),_=i(61),g=i(195),v=function(e){function t(t){var i=e.call(this,t)||this;return i.geometryInstances=[],i.timeIntervalCollectionProperty=[],i._positions=[],i.material=t.material,i.height=r.default(t.height,200),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polygon&&(this.polygon.show=e)},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(){var e=this;this._positions.forEach((function(t,i){var n=new u.default({polygonHierarchy:new d.default(t),height:e.height,vertexFormat:f.default.VERTEX_FORMAT}),a=new l.default({id:e.id+"_stripe_"+i,geometry:n,attributes:e.getAttributes()});e.geometryInstances.push(a)})),this.polygon=new g.default({geometryInstances:this.geometryInstances,appearance:this.getAppearance(),asynchronous:!1,show:this._show})},t.prototype.removePrimitive=function(){this.polygon&&this._polygons.remove(this.polygon)},t.prototype.addInterval=function(e,t,i){this.timeIntervalCollectionProperty.push(new h.default({start:e,stop:t,isStartIncluded:!0,isStopIncluded:!1,data:i}))},t.prototype.afterAdded=function(t){var i=[];e.prototype.afterAdded.call(this,t),t instanceof c.default?this._polygons=t.polygons:t.parent instanceof c.default&&(this._polygons=t.parent.polygons),this._polygons&&(this.polygon&&(i.push(this.polygon.readyPromise),this._polygons.add(this.polygon)),this.show=t.show,this.isAdded=!0),this.readyPromise=Promise.all(i)},t.prototype.updateForward=function(e){var t=this.timeIntervalCollectionProperty.filter((function(t){return h.default.contains(t,e)}));this._positions=t.map((function(e){return e.data})),this.polygon&&this.removePrimitive(),this.createPrimitive(),this._polygons.add(this.polygon)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._polygons&&this._polygons.remove(this.polygon)},t.prototype.getAppearance=function(){return this.material instanceof s.default?new _.default({flat:!0}):new p.default({material:this.material,faceForward:!1,closed:!0})},t.prototype.getAttributes=function(){return this.material instanceof s.default?{color:m.default.fromColor(this.material)}:void 0},t}(o.default);t.default=v},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(280),l=i(49),u=i(327),d=i(27),c=i(13),f=i(6),h=i(2),p=i(30),m=i(389),_=(f.default.IDENTITY.clone(),function(e){function t(t){var i=e.call(this,t)||this;return i.pointToBillBoardDistance=1e6,i.labelConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},h.default(t.labelConfig,{})),i.pointConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},h.default(t.pointConfig,{})),i.billboardConfig=r({dynamicDepthTest:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY},h.default(t.billboardConfig,{})),t.position&&(i.position=t.position),i.sampledPositionProperty.setInterpolationOptions({interpolationAlgorithm:u.default,interpolationDegree:5}),i.pointToBillBoardDistance=h.default(t.pointToBillBoardDistance,1e6),i.enableDisplayCondition=h.default(t.enableDisplayCondition,!0),t.htmlLabelConfig&&t.htmlLabelConfig.element&&(i._htmlLabel=new m.default(t.htmlLabelConfig),i.add(i._htmlLabel)),i}return a(t,e),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){o.default.clone(e,this._position),this.billboard&&(this.billboard.position=e),this.billboardConfig.position=e,this.point&&(this.point.position=e),this.pointConfig.position=e,this.label&&(this.label.position=e),this.labelConfig.position=e,this.setMatrix(this.position,this.rotation,this._scale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(e){d.default.clone(e,this._rotation),this._rotation=e,this.setMatrix(this.position,this.rotation,this._scale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.point&&(this.point.show=e),this.label&&(this.label.show=e),this.billboard&&(this.billboard.show=e),this._htmlLabel&&(e?this._htmlLabel.visibleFollowParent&&(this._htmlLabel.show=!0):this._htmlLabel.show=!1),this.afterSetVisible(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"htmlLabel",{get:function(){return this._htmlLabel},set:function(e){this._htmlLabel&&this._htmlLabel.destroy(),this._htmlLabel=e,this.add(this._htmlLabel)},enumerable:!1,configurable:!0}),t.prototype.afterTracked=function(){},t.prototype.afterUnTracked=function(){},t.prototype.afterAdded=function(t){var i=this;e.prototype.afterAdded.call(this,t);var n=this.getLODSceneLayer();if(this.point=n.points.add(r(r({},this.pointConfig),{show:!1})),this.label=n.labels.add(Object.assign({distanceDisplayCondition:new l.default(0,2e8)},this.labelConfig)),this.point.show=h.default(this.pointConfig.show,this.show),this.label.show=h.default(this.labelConfig.show,this.show),n._imageCache.has(this.billboardConfig.image)){var a=n._imageCache.get(this.billboardConfig.image);this.initBillboard(a)}else p.default.fetchImage({url:this.billboardConfig.image}).then((function(e){n._imageCache.set(i.billboardConfig.image,e),i.initBillboard(e)}));this.point.entityId=this.id,this.label.entityId=this.id,this.isAdded=!0},t.prototype.initBillboard=function(e){var t=this.getLODSceneLayer();this.enableDisplayCondition&&(this.point.distanceDisplayCondition=new l.default(this.pointToBillBoardDistance,Number.POSITIVE_INFINITY)),this.billboard=t.billboards.add(r(r({},this.billboardConfig),{image:e,show:!1})),this.enableDisplayCondition&&(this.billboard.distanceDisplayCondition=new l.default(0,this.pointToBillBoardDistance)),this.billboard.entityId=this.id,this.billboard.show=this.show,this.billboard.position=this.position,this.point.show=this.show,this.point.position=this.position},t.prototype.updatePoint=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.point&&this.pointConfig.dynamicDepthTest&&n===c.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.point.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.point.disableDepthTestDistance=0)},t.prototype.updateLabel=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.label&&this.labelConfig.dynamicDepthTest&&n===c.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.label.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.label.disableDepthTestDistance=0)},t.prototype.updateBillboard=function(){var e,t,i,n=null===(e=this.getViewer())||void 0===e?void 0:e.sceneMode;this.isAdded&&this.billboard&&this.billboardConfig.dynamicDepthTest&&n===c.default.SCENE3D&&((null===(i=null===(t=this.getViewer())||void 0===t?void 0:t.cesiumViewer.scene.frameState.occluder)||void 0===i?void 0:i.isPointVisible(this.position))?this.billboard.disableDepthTestDistance=Number.POSITIVE_INFINITY:this.billboard.disableDepthTestDistance=0)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&(this.updateLabel(),this.updatePoint(),this.updateBillboard())},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this);var t=this.getLODSceneLayer();t.labels.remove(this.label),t.points.remove(this.point),t.billboards.remove(this.billboard)},t.prototype.beforeSwitchMode=function(e){e===c.default.SCENE2D&&this.getLODSceneLayer().points.remove(this.point)},t.prototype.afterSwitchMode=function(e){if(e===c.default.SCENE2D){var t=this.getLODSceneLayer();this.point=t.points.add(r(r({},this.pointConfig),{show:!1})),this.enableDisplayCondition&&(this.point.distanceDisplayCondition=new l.default(this.pointToBillBoardDistance,Number.POSITIVE_INFINITY)),this.point.show=h.default(this.pointConfig.show,this.show),this.point.entityId=this.id}},t}(s.default));t.default=_},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(7),l=i(69),u=i(151),d=i(390),c=(new o.default,{material:l.default.fromType("PolylineArrow",{color:s.default.CHARTREUSE}),width:10,length:5e5}),f=function(e){function t(t){var i=e.call(this,t)||this;return i.pointingAxisOptions=r(r({},c),t),i.entityTo=t.entityTo,i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this.polyline&&(this.polyline.show=e)},enumerable:!1,configurable:!0}),t.prototype.destroyForward=function(){this.parent.parent.remove(this.polyline)},t.prototype.updateForward=function(t,i){if(e.prototype.updateForward.call(this,t,i),this.parent.position&&this.entityTo.position&&!this.parent.position.equals(new o.default)&&(this.polyline&&this.parent.parent.remove(this.polyline),this.show)){var n=o.default.subtract(this.entityTo.position,this.parent.position,new o.default),a=o.default.normalize(n,new o.default);o.default.multiplyByScalar(a,this.pointingAxisOptions.length,n);var s=o.default.add(n,this.parent.position,new o.default);this.polyline=new d.default(r(r({},this.pointingAxisOptions),{positions:[this.parent.position,s],asynchronous:!1})),this.parent.parent.add(this.polyline)}},t}(u.default);t.default=f},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(54),s=i(1),l=i(7),u=i(43),d=i(6),c=i(185),f=i(235),h=i(69),p=i(156),m=i(64),_=i(190),g=i(323),v=i(151),y=i(47),b=i(13),w={tAxisConfig:{show:!0,name:"T",color:l.default.RED,width:4,font:"16px",length:10},nAxisConfig:{show:!0,name:"N",color:l.default.GREEN,width:4,font:"16px",length:10},rAxisConfig:{show:!0,name:"R",color:l.default.BLUE,width:4,font:"16px",length:10}},O=function(e){function t(t){var i=e.call(this,t)||this;return i.rotationFrame=g.default.LOCAL,i.parentMatrix=d.default.IDENTITY.clone(),i.axisCollection=new y.default,i.axisLabelCollection=new y.default,i._axes=new _.default,i._labels=new f.default,i.tAxisConfig=r(r({},w.tAxisConfig),null==t?void 0:t.tAxisConfig),i.nAxisConfig=r(r({},w.nAxisConfig),null==t?void 0:t.nAxisConfig),i.rAxisConfig=r(r({},w.rAxisConfig),null==t?void 0:t.rAxisConfig),i._showTAxis=i.tAxisConfig.show,i._showNAxis=i.nAxisConfig.show,i._showRAxis=i.rAxisConfig.show,i._axes.add(i._labels),i}return a(t,e),Object.defineProperty(t.prototype,"showTAxis",{get:function(){return this._showTAxis},set:function(e){this._showTAxis=e;var t=this.axisCollection.get("t"),i=this.axisLabelCollection.get("tLabel");t.show=this._showTAxis&&this.show,i.show=this._showTAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showNAxis",{get:function(){return this._showNAxis},set:function(e){this._showNAxis=e;var t=this.axisCollection.get("n"),i=this.axisLabelCollection.get("nLabel");t.show=this._showNAxis&&this.show,i.show=this._showNAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"showRAxis",{get:function(){return this._showRAxis},set:function(e){this._showRAxis=e;var t=this.axisCollection.get("r"),i=this.axisLabelCollection.get("rLabel");t.show=this._showRAxis&&this.show,i.show=this._showRAxis&&this.show},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){if(this._show=e,this.showTAxis){var t=this.axisCollection.get("t"),i=this.axisLabelCollection.get("tLabel");t.show=e,i.show=e}if(this.showNAxis){var n=this.axisCollection.get("n"),a=this.axisLabelCollection.get("nLabel");n.show=e,a.show=e}if(this.showRAxis){var r=this.axisCollection.get("r"),o=this.axisLabelCollection.get("rLabel");r.show=e,o.show=e}},enumerable:!1,configurable:!0}),t.prototype.createPrimitive=function(){var e=new u.default({geometry:new c.default({positions:[s.default.multiplyByScalar(s.default.UNIT_X,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_X,this.tAxisConfig.length,new s.default)],width:this.tAxisConfig.width,vertexFormat:p.default.VERTEX_FORMAT,arcType:o.default.NONE})}),t=new m.default({geometryInstances:e,appearance:new p.default({material:h.default.fromType(h.default.PolylineArrowType,{color:this.tAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showTAxis&&this.show}),i=s.default.multiplyByScalar(s.default.UNIT_X,this.tAxisConfig.length,new s.default),n={show:this._showTAxis&&this.show,position:i,text:this.tAxisConfig.name,font:this.tAxisConfig.font,fillColor:this.tAxisConfig.color},a=new u.default({geometry:new c.default({positions:[s.default.multiplyByScalar(new s.default(0,-1,0),.1,new s.default),s.default.multiplyByScalar(new s.default(0,-1,0),this.nAxisConfig.length,new s.default)],width:this.nAxisConfig.width,vertexFormat:p.default.VERTEX_FORMAT,arcType:o.default.NONE})}),r=new m.default({geometryInstances:a,appearance:new p.default({material:h.default.fromType(h.default.PolylineArrowType,{color:this.nAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showNAxis&&this.show}),l=s.default.multiplyByScalar(new s.default(0,-1,0),this.nAxisConfig.length,new s.default),d={show:this._showNAxis&&this.show,position:l,text:this.nAxisConfig.name,font:this.nAxisConfig.font,fillColor:this.nAxisConfig.color},f=new u.default({geometry:new c.default({positions:[s.default.multiplyByScalar(new s.default(0,0,-1),.1,new s.default),s.default.multiplyByScalar(new s.default(0,0,-1),this.rAxisConfig.length,new s.default)],width:this.rAxisConfig.width,vertexFormat:p.default.VERTEX_FORMAT,arcType:o.default.NONE})}),_=s.default.multiplyByScalar(new s.default(0,0,-1),this.rAxisConfig.length,new s.default),g={show:this._showRAxis&&this.show,position:_,text:this.rAxisConfig.name,font:this.rAxisConfig.font,fillColor:this.rAxisConfig.color},v=new m.default({geometryInstances:f,appearance:new p.default({material:h.default.fromType(h.default.PolylineArrowType,{color:this.rAxisConfig.color}),renderState:{depthTest:{enabled:!1}}}),modelMatrix:this.parentMatrix,show:this._showRAxis&&this.show});this._axes.add(t);var y=this._labels.add(n);this.axisCollection.set("t",t),this.axisLabelCollection.set("tLabel",y),this._axes.add(r);var b=this._labels.add(d);this.axisCollection.set("n",r),this.axisLabelCollection.set("nLabel",b),this._axes.add(v);var w=this._labels.add(g);this.axisCollection.set("r",v),this.axisLabelCollection.set("rLabel",w)},t.prototype.afterAdded=function(e){this.parent=e,this.parentMatrix=e.matrix.clone(),e.getViewer().primitives.add(this._axes),this.createPrimitive()},t.prototype.destroyForward=function(){(e.prototype.destroyForward.call(this),this._axes)&&this.parent.getViewer().primitives.remove(this._axes)},t.prototype.updateForward=function(t,i){e.prototype.updateForward.call(this,t,i),this.show&&this.updateMatrix(i)},t.prototype.updateLabel=function(e){if(this.showTAxis){var t=this.axisLabelCollection.get("tLabel"),i=new s.default(this.tAxisConfig.length,0,0),n=d.default.multiplyByPoint(e,i,new s.default);t.position=n}if(this.showNAxis){var a=this.axisLabelCollection.get("nLabel"),r=new s.default(0,-this.nAxisConfig.length,0),o=d.default.multiplyByPoint(e,r,new s.default);a.position=o}if(this.showRAxis){var l=this.axisLabelCollection.get("rLabel"),u=new s.default(0,0,-this.rAxisConfig.length),c=d.default.multiplyByPoint(e,u,new s.default);l.position=c}},t.prototype.updateMatrix=function(e){this.updateLabel(e),this.axisCollection.values.forEach((function(t){t.modelMatrix=e}))},t.prototype.afterSwitchMode=function(e){this.getLODSceneLayer()&&(this.show=![b.default.SCENE2D,b.default.COLUMBUS_VIEW].includes(e))},t}(v.default);t.default=O},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(i(1175).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(234),o=i(21),s=i(64),l=i(2),u=i(195),d=i(97),c=i(43),f=i(332),h=i(322),p=i(1177),m=i(339),_=i(76),g=i(7),v=function(e){function t(t){var i=e.call(this)||this;return i.filterDataIntervalProperty=new m.default,i._filterCanvas=document.createElement("canvas"),i._filterCanvas.width=l.default(t.imageWidth,2048),i._filterCanvas.height=l.default(t.imageHeight,1024),i._imageWidth=l.default(t.imageWidth,2048),i._imageHeight=l.default(t.imageHeight,1024),i._rectangle=t.rectangle||[-180,-90,180,90],i._height=t.height||0,i._autoFilter=l.default(t.autoFilter,!1),i._ground=l.default(t.ground,!1),i._fillColor=l.default(t.fillColor,g.default.BLUE.withAlpha(.4)),i._primitive=i.createPrimitive(),i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this._primitive&&(this._primitive.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filterSourceData",{get:function(){return this._filterSourceData},set:function(e){this._filterSourceData=e,this.updateFilterImage()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillColor",{get:function(){return this._fillColor},set:function(e){this._fillColor=e,this._primitive&&(this._primitive.appearance.material.uniforms.fillColor=e)},enumerable:!1,configurable:!0}),t.prototype.addFilterDataIntervalProperty=function(e,t,i){this.filterDataIntervalProperty.intervals.addInterval(new _.default({start:e,stop:t,isStartIncluded:!0,isStopIncluded:!1,data:i}))},t.prototype.appendFilterSourceData=function(e){this._filterSourceData?this.filterSourceData=this._filterSourceData.concat(e):this.filterSourceData=e},t.prototype.drawCoverArea=function(e){var t=this,i=[];e.forEach((function(e){i=i.concat(t.processAreaData(e))}));var n=[];i.forEach((function(e){n=n.concat(t.getCanvasCoords(e))}));var a=this._filterCanvas.getContext("2d");n.length>0&&n.forEach((function(e){t.drawFilterCanvasArea(a,e)})),this._filterImage=this._filterCanvas.toDataURL("image/png"),this._primitive?this._primitive.appearance.material.uniforms.imageFilter=this._filterImage:(this._primitive=this.createPrimitive(),this._primitive&&this.parent.primitives.add(this._primitive))},t.prototype.updateFilterImage=function(){var e=this;if(this._filterCanvas){var t=[];this._filterSourceData.length>0&&this._filterSourceData.forEach((function(i){t=t.concat(e.getCanvasCoords(i))}));var i=this._filterCanvas.getContext("2d");i.clearRect(0,0,this._imageWidth,this._imageHeight),t.length>0&&t.forEach((function(t){e.drawFilterCanvasArea(i,t)})),this._filterImage=this._filterCanvas.toDataURL("image/png"),this._primitive?this._primitive.appearance.material.uniforms.imageFilter=this._filterImage:(this._primitive=this.createPrimitive(),this._primitive&&this.parent.primitives.add(this._primitive))}},t.prototype.processAreaData=function(e){var t=0,i=0;if(e.forEach((function(e){t=e[0]>t?e[0]:t,i=e[0]<i?e[0]:i})),t-i>180){var n=[],a=[],r=-1,o=-1,s=!1,l=!1,u=e[0][0]>0;e.forEach((function(e,t){u?(e[0]<0&&!s&&(s=!0,r=t),e[0]>0&&s&&!l&&(l=!0,o=t)):(e[0]>0&&!s&&(s=!0,r=t),e[0]<0&&s&&!l&&(l=!0,o=t)),e[0]>0?a.push(e):n.push(e)}));this._rectangle[2],this._rectangle[0];var d=void 0,c=void 0,f=void 0,h=void 0;u?(d=e[r-1],f=e[r],h=-1!==o?e[o-1]:e[e.length-1],c=-1!==o?e[o]:e[0]):(h=e[r-1],c=e[r],d=-1!==o?e[o-1]:e[e.length-1],f=-1!==o?e[o]:e[0]);var p,m;return p=(f[1]-d[1])*(180-d[0])/(360+f[0]-d[0])+d[1],m=(h[1]-c[1])*(180-c[0])/(360+h[0]-c[0])+c[1],u?(a.splice(r,0,[this._rectangle[2],p]),n.unshift([this._rectangle[0],p]),a.splice(r+1,0,[this._rectangle[2],m]),n.push([this._rectangle[0],m])):(n.splice(r,0,[this._rectangle[0],m]),a.unshift([this._rectangle[2],m]),n.splice(r+1,0,[this._rectangle[0],p]),a.push([this._rectangle[2],p])),[n,a]}return[e]},t.prototype.getCanvasCoords=function(e){for(var t=this._rectangle[2]-this._rectangle[0],i=this._rectangle[3]-this._rectangle[1],n=this._imageWidth,a=this._imageHeight,r=[],o=0;o<e.length;o++){var s=(e[o][0]-this._rectangle[0])/t*n,l=(this._rectangle[3]-e[o][1])/i*a;r.push([s,l])}return[r]},t.prototype.getCanvasCoords2=function(e){var t=this._rectangle[2]-this._rectangle[0],i=this._rectangle[3]-this._rectangle[1],n=this._imageWidth,a=this._imageHeight,r=0,o=0;if(e.forEach((function(e){r=e[0]>r?e[0]:r,o=e[0]<o?e[0]:o})),r-o>180){var s=[],l=[],u=-1,d=-1,c=!1,f=!1,h=e[0][0]>0;e.forEach((function(e,t){h?(e[0]<0&&!c&&(c=!0,u=t),e[0]>0&&c&&!f&&(f=!0,d=t)):(e[0]>0&&!c&&(c=!0,u=t),e[0]<0&&c&&!f&&(f=!0,d=t)),e[0]>0?l.push(e):s.push(e)}));this._rectangle[2],this._rectangle[0];var p=void 0,m=void 0,_=void 0,g=void 0;h?(p=e[u-1],_=e[u],g=-1!==d?e[d-1]:e[e.length-1],m=-1!==d?e[d]:e[0]):(g=e[u-1],m=e[u],p=-1!==d?e[d-1]:e[e.length-1],_=-1!==d?e[d]:e[0]);var v,y;v=(_[1]-p[1])*(180-p[0])/(360+_[0]-p[0])+p[1],y=(g[1]-m[1])*(180-m[0])/(360+g[0]-m[0])+m[1],h?(l.splice(u,0,[this._rectangle[2],v]),s.unshift([this._rectangle[0],v]),l.splice(u+1,0,[this._rectangle[2],y]),s.push([this._rectangle[0],y])):(s.splice(u,0,[this._rectangle[0],y]),l.unshift([this._rectangle[2],y]),s.splice(u+1,0,[this._rectangle[0],v]),l.push([this._rectangle[2],v]));for(var b=[],w=[],O=0;O<s.length;O++){var x=(s[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-s[O][1])/i*a;b.push([x,A])}for(var O=0;O<l.length;O++){var x=(l[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-l[O][1])/i*a;w.push([x,A])}return[b,w]}var T=[];for(O=0;O<e.length;O++){x=(e[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-e[O][1])/i*a;T.push([x,A])}return[T]},t.prototype.drawFilterCanvasArea=function(e,t){var i=t.length;e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var n=1;n<i;n++)e.lineTo(t[n][0],t[n][1]);e.closePath(),e.lineWidth=1,e.strokeStyle="rgb(200,0,0)",e.fillStyle="rgb(200,0,0)",e.fill(),e.stroke()},t.prototype.createPrimitive=function(){return this.ground?new u.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:this.show,asynchronous:!0,classificationType:d.default.TERRAIN}):new s.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:this.show,asynchronous:!1})},t.prototype.createGeometryInstance=function(){return new c.default({geometry:new f.default({rectangle:o.default.fromDegrees.apply(o.default,this._rectangle),height:this.height,vertexFormat:h.default.VERTEX_FORMAT})})},t.prototype.createAppearance=function(){var e=document.createElement("canvas");e.width=1,e.height=1;var t=this._filterCanvas.getContext("2d");t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1);var i=e.toDataURL("image/png");return new h.default({aboveGround:!1,material:new p.default({imageFilter:i,fillColor:this.fillColor}),faceForward:!0,flat:!0})},t.prototype.afterAdded=function(e){this.parent=e,this._primitive&&e.primitives.add(this._primitive)},t.prototype.destroyForward=function(){this._primitive&&this.parent.primitives.remove(this._primitive)},t.prototype.updateForward=function(e){if(this.show&&this._filterCanvas&&this._autoFilter){var t=this.filterDataIntervalProperty.getValue(e);t?JSON.stringify(this.filterSourceData)!==JSON.stringify(t)&&(this.filterSourceData=t):JSON.stringify(this.filterSourceData)!==JSON.stringify([])&&(this.filterSourceData=[])}},t.prototype.afterSwitchMode=function(e){},t.prototype.beforeSwitchMode=function(e){},t}(r.default);t.default=v},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=i(234),o=i(21),s=i(64),l=i(2),u=i(195),d=i(97),c=i(43),f=i(332),h=i(322),p=i(1178),m=i(76),_=i(189),g=function(e){function t(t){var i=e.call(this)||this;i.lastAdd="",i.filterDataIntervalCollection=new _.default;var n=new Image;return n.crossOrigin="",n.src=t.image,n.onload=function(){i._imageElement=n,i._imageWidth=n.width,i._imageHeight=n.height,i._filterCanvas=document.createElement("canvas"),i._filterCanvas.width=n.width,i._filterCanvas.height=n.height,i._resultCanvas=document.createElement("canvas"),i._resultCanvas.width=n.width,i._resultCanvas.height=n.height},i._rectangle=t.rectangle||[-180,-90,180,90],i._height=t.height||0,i._autoFilter=l.default(t.autoFilter,!0),i._enableBack=l.default(t.enableBack,!1),i._ground=l.default(t.ground,!1),i._sourceImage=t.image,i._filterSourceData=[],i}return a(t,e),Object.defineProperty(t.prototype,"show",{get:function(){return this._show},set:function(e){this._show=e,this._primitive&&(this._primitive.show=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"filterSourceData",{get:function(){return this._filterSourceData},set:function(e){this._filterSourceData=e,this.updateFilterImage()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sourceImage",{get:function(){return this._sourceImage},set:function(e){var t=this;this._sourceImage=e;var i=new Image;i.crossOrigin="",i.src=e,i.onload=function(){t._imageElement=i,t._imageWidth=i.width,t._imageHeight=i.height,t._filterCanvas=document.createElement("canvas"),t._filterCanvas.width=i.width,t._filterCanvas.height=i.height,t._resultCanvas=document.createElement("canvas"),t._resultCanvas.width=i.width,t._resultCanvas.height=i.height,t._primitive&&(t._primitive.appearance.material.uniforms.imageSource=t._imageElement)}},enumerable:!1,configurable:!0}),t.prototype.addFilterDataInterval=function(e,t,i){this.filterDataIntervalCollection.addInterval(new m.default({start:e,stop:t,isStartIncluded:!0,isStopIncluded:!1,data:i}))},t.prototype.clearFilterDataInterval=function(){this.filterDataIntervalCollection.removeAll(),this.lastAdd=""},t.prototype.appendFilterSourceData=function(e){this._filterSourceData?this.filterSourceData=this._filterSourceData.concat(e):this.filterSourceData=e},t.prototype.resetFilterSourceData=function(){this.filterSourceData=[],this.lastAdd=""},t.prototype.updateFilterImage=function(){var e=this;if(this._filterCanvas){var t=[];this._filterSourceData.length>0&&this._filterSourceData.forEach((function(i){t=t.concat(e.getCanvasCoords(i))}));var i=this._filterCanvas.getContext("2d");i.clearRect(0,0,this._imageWidth,this._imageHeight),t.length>0&&t.forEach((function(t){e.drawFilterCanvasArea(i,t)})),this._filterImage=this._filterCanvas.toDataURL("image/png"),this._primitive?this._primitive.appearance.material.uniforms.imageFilter=this._filterImage:(this._primitive=this.createPrimitive(),this._primitive&&this.parent.primitives.add(this._primitive))}},t.prototype.getCanvasCoords=function(e){var t=this._rectangle[2]-this._rectangle[0],i=this._rectangle[3]-this._rectangle[1],n=this._imageWidth,a=this._imageHeight,r=0,o=0;if(e.forEach((function(e){r=e[0]>r?e[0]:r,o=e[0]<o?e[0]:o})),r-o>180){var s=[],l=[],u=-1,d=-1,c=!1,f=!1,h=e[0][0]>0;e.forEach((function(e,t){h?(e[0]<0&&!c&&(c=!0,u=t),e[0]>0&&c&&!f&&(f=!0,d=t)):(e[0]>0&&!c&&(c=!0,u=t),e[0]<0&&c&&!f&&(f=!0,d=t)),e[0]>0?l.push(e):s.push(e)}));this._rectangle[2],this._rectangle[0];var p=void 0,m=void 0,_=void 0,g=void 0;e.length;h?(p=e[u-1],_=e[u],g=-1!==d?e[d-1]:e[e.length-1],m=-1!==d?e[d]:e[0]):(g=e[u-1],m=e[u],p=-1!==d?e[d-1]:e[e.length-1],_=-1!==d?e[d]:e[0]);var v,y;v=(_[1]-p[1])*(180-p[0])/(360+_[0]-p[0])+p[1],y=(g[1]-m[1])*(180-m[0])/(360+g[0]-m[0])+m[1],h?(l.splice(u,0,[this._rectangle[2],v]),s.unshift([this._rectangle[0],v]),l.splice(u+1,0,[this._rectangle[2],y]),s.push([this._rectangle[0],y])):(s.splice(u,0,[this._rectangle[0],y]),l.unshift([this._rectangle[2],y]),s.splice(u+1,0,[this._rectangle[0],v]),l.push([this._rectangle[2],v]));for(var b=[],w=[],O=0;O<s.length;O++){var x=(s[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-s[O][1])/i*a;b.push([x,A])}for(O=0;O<l.length;O++){x=(l[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-l[O][1])/i*a;w.push([x,A])}return[b,w]}var T=[];for(O=0;O<e.length;O++){x=(e[O][0]-this._rectangle[0])/t*n,A=(this._rectangle[3]-e[O][1])/i*a;T.push([x,A])}return[T]},t.prototype.drawFilterCanvasArea=function(e,t){var i=t.length;e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var n=1;n<i;n++)e.lineTo(t[n][0],t[n][1]);e.closePath(),e.lineWidth=1,e.strokeStyle="rgba(255,0,0, 0.5)",e.fillStyle="rgba(255,0,0, 0.5)",e.fill(),e.stroke()},t.prototype.createPrimitive=function(){return this.ground?new u.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:this.show,asynchronous:!0,classificationType:d.default.TERRAIN}):new s.default({geometryInstances:this.createGeometryInstance(),appearance:this.createAppearance(),show:this.show,asynchronous:!1})},t.prototype.createGeometryInstance=function(){return new c.default({geometry:new f.default({rectangle:o.default.fromDegrees.apply(o.default,this._rectangle),height:this.height,vertexFormat:h.default.VERTEX_FORMAT})})},t.prototype.createAppearance=function(){return new h.default({aboveGround:!1,material:new p.default({imageSource:this._sourceImage,imageFilter:this._filterImage}),faceForward:!0,flat:!0})},t.prototype.afterAdded=function(e){this.parent=e,this._primitive&&e.primitives.add(this._primitive)},t.prototype.destroyForward=function(){this._primitive&&this.parent.primitives.remove(this._primitive)},t.prototype.updateForward=function(e){if(this.show&&this._filterCanvas&&this._autoFilter){var t=this.filterDataIntervalCollection.findDataForIntervalContainingDate(e);this._enableBack?t?JSON.stringify(this.filterSourceData)!==JSON.stringify(t)&&(this.filterSourceData=t):JSON.stringify(this.filterSourceData)!==JSON.stringify([])&&(this.filterSourceData=[]):t&&this.lastAdd!==JSON.stringify(t)&&(this.filterSourceData=this._filterSourceData.concat(t),this.lastAdd=JSON.stringify(t))}},t.prototype.afterSwitchMode=function(e){},t.prototype.beforeSwitchMode=function(e){},t}(r.default);t.default=g},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(234),s=i(1179),l=i(21),u={rectangle:[-180,-90,180,90],height:0,ground:!0},d=function(e){function t(t){var i=e.call(this)||this,n=r(r({},u),t);i._finalOptions=n;var a={image:n.image,height:n.height,imageWidth:n.imageWidth,imageHeight:n.imageHeight,ground:n.ground},o=l.default.fromDegrees.apply(l.default,n.rectangle);Reflect.defineProperty(a,"rectangle",{value:o});var s=new Image;s.crossOrigin="",s.src=i._finalOptions.image,s.onload=function(){i._imageElement=s,i._sourceCanvas=document.createElement("canvas"),i._sourceCanvas.width=s.width,i._sourceCanvas.height=s.height,i._resultCanvas=document.createElement("canvas"),i._resultCanvas.width=s.width,i._resultCanvas.height=s.height},i._worker=new Worker("./dt-workers/filterImageryLayerWorker.js"),i._worker.postMessage("发送消息");var d=i;return i._worker.onmessage=function(e){d.handleWorkerBack(e.data)},i}return a(t,e),Object.defineProperty(t.prototype,"filterSourceData",{get:function(){return this._filterSourceData},set:function(e){this._filterSourceData=e,this._duringWorker?this._needDraw=!0:this.updateFilterImage()},enumerable:!1,configurable:!0}),t.prototype.appendFilterSourceData=function(e){this._filterSourceData?this.filterSourceData=this._filterSourceData.concat(e):this.filterSourceData=e},t.prototype.updateFilterImage=function(){var e=this;if(this._sourceCanvas){var t=this._finalOptions.imageWidth,i=this._finalOptions.imageHeight,n=[];this._filterSourceData.length>0&&this._filterSourceData.forEach((function(t){n=n.concat(e.getCanvasCoords(t))}));var a=this._sourceCanvas.getContext("2d");n.forEach((function(t){e.drawFilterCanvasArea(a,t)}));var r=a.getImageData(0,0,t,i),o=this._resultCanvas.getContext("2d");o.drawImage(this._imageElement,0,0);var s=o.getImageData(0,0,this._imageElement.width,this._imageElement.height);this._duringWorker=!0,this._worker.postMessage({sourceData:r,resultData:s})}},t.prototype.getCanvasCoords=function(e){var t=this._finalOptions.rectangle[2]-this._finalOptions.rectangle[0],i=this._finalOptions.rectangle[3]-this._finalOptions.rectangle[1],n=this._finalOptions.imageWidth,a=this._finalOptions.imageHeight,r=0,o=0;if(e.forEach((function(e){r=e[0]>r?e[0]:r,o=e[0]<o?e[0]:o})),r-o>180){var s=[],l=[],u=-1,d=-1,c=!1,f=!1,h=e[0][0]>0;e.forEach((function(e,t){h?(e[0]<0&&!c&&(c=!0,u=t),e[0]>0&&c&&!f&&(f=!0,d=t)):(e[0]>0&&!c&&(c=!0,u=t),e[0]<0&&c&&!f&&(f=!0,d=t)),e[0]>0?l.push(e):s.push(e)}));var p=this._finalOptions.rectangle[2]-this._finalOptions.rectangle[0],m=void 0,_=void 0,g=void 0,v=void 0,y=d<e.length;h?(m=e[u-1],g=e[u],v=e[d-1],_=y?e[d]:e[0]):(v=e[u-1],_=e[u],m=e[d],g=y?e[d]:e[0]);var b,w;b=g[1]+(g[0]-p)*(g[1]-m[1])/(g[0]-m[0]),w=v[1]+(v[0]-p)*(v[1]-_[1])/(v[0]-_[0]),h?(l.splice(u-1,0,[this._finalOptions.rectangle[2],b]),s.unshift([this._finalOptions.rectangle[0],b]),l.splice(d,0,[this._finalOptions.rectangle[2],w]),s.push([this._finalOptions.rectangle[0],w])):(s.splice(u-1,0,[this._finalOptions.rectangle[0],w]),l.unshift([this._finalOptions.rectangle[2],w]),s.splice(d,0,[this._finalOptions.rectangle[0],b]),l.push([this._finalOptions.rectangle[2],b]));for(var O=[],x=[],A=0;A<s.length;A++){var T=(s[A][0]-this._finalOptions.rectangle[0])/t*n,E=(this._finalOptions.rectangle[3]-e[A][1])/i*a;O.push([T,E])}for(A=0;A<l.length;A++){T=(l[A][0]-this._finalOptions.rectangle[0])/t*n,E=(this._finalOptions.rectangle[3]-e[A][1])/i*a;x.push([T,E])}return[O,x]}var C=[];for(A=0;A<e.length;A++){T=(e[A][0]-this._finalOptions.rectangle[0])/t*n,E=(this._finalOptions.rectangle[3]-e[A][1])/i*a;C.push([T,E])}return[C]},t.prototype.drawFilterCanvasArea=function(e,t){var i=t.length;e.beginPath(),e.moveTo(t[0][0],t[0][1]);for(var n=1;n<i;n++)e.lineTo(t[n][0],t[n][1]);e.closePath(),e.lineWidth=1,e.strokeStyle="rgb(255,0,0)",e.fillStyle="rgb(255,0,0)",e.fill(),e.stroke()},t.prototype.handleWorkerBack=function(e){this._resultCanvas.getContext("2d").putImageData(e,0,0);var t=this._resultCanvas.toDataURL("image/png");if(this._singleImageLayer)this._singleImageLayer.image=t;else{var i=l.default.fromDegrees.apply(l.default,this._finalOptions.rectangle);this._singleImageLayer=new s.default({image:t,height:this._finalOptions.height,imageWidth:this._finalOptions.imageWidth,imageHeight:this._finalOptions.imageHeight,ground:this._finalOptions.ground,rectangle:i}),this.parent.addLayer(this._singleImageLayer)}this._duringWorker=!1,this._needDraw&&(this._needDraw=!1,this.updateFilterImage())},t.prototype.afterAdded=function(e){this.parent=e,this._singleImageLayer&&this._singleImageLayer.afterAdded(e)},t.prototype.destroyForward=function(){this._worker.terminate(),this._singleImageLayer&&this._singleImageLayer.destroyForward()},t.prototype.updateForward=function(e){this._singleImageLayer&&this._singleImageLayer.updateForward(e)},t.prototype.afterSwitchMode=function(e){this._singleImageLayer&&this._singleImageLayer.afterSwitchMode(e)},t.prototype.beforeSwitchMode=function(e){this._singleImageLayer&&this._singleImageLayer.beforeSwitchMode(e)},t}(o.default);t.default=d},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){throw new Error("Method not implemented.")},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(234).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){throw new Error("Method not implemented.")},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(234).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){throw new Error("Method not implemented.")},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(234).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(234),s=i(6),l=i(47),u=i(1),d=i(43),c=i(53),f=i(7),h=i(143),p=i(22),m=i(5),_=i(64),g=i(185),v=i(87),y=i(1174),b={startLatitude:-90,endLatitude:90,startLongitude:-180,stopLongitude:180,height:1e3,step:1,cellWidth:1,highlightColor:f.default.RED,color:f.default.WHITE,show:!0},w=function(e){function t(t){var i=e.call(this)||this;i.ready=!1,i.smallEarthRadii=63e5,i.updateTarget=new l.default,i.primitiveCollection=new l.default,i.groupCollection=new l.default,i.instanceCollection=new l.default;var n=r(r({},b),t);return i.startLatitude=n.startLatitude,i.endLatitude=n.endLatitude,i.startLongitude=n.startLongitude,i.stopLongitude=n.stopLongitude,i.step=n.step,i.cellWidth=n.cellWidth,i.highlightColor=n.highlightColor,i.color=n.color,i.show=n.show,i.height=n.height,i}return a(t,e),t.prototype.createPrimitive=function(){for(var e=0,t=this.startLatitude;t<this.endLatitude;t+=Math.sqrt(3)*this.step){var i=[],n=[];if(e%2==0)for(var a=this.startLongitude+this.step;a<this.stopLongitude;a+=2*this.step){var r=[];r=[u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a,this.startLatitude+(e*Math.sqrt(3)+2*Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a+this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a+this.step,this.startLatitude+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a,this.startLatitude+(e*Math.sqrt(3)-2*Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height)];var o=new d.default({geometry:new g.default({positions:r,width:this.cellWidth}),attributes:{color:c.default.fromColor(this.color),show:new v.default(this.show)},id:"cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step)});n.push("cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step)),this.instanceCollection.set("cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step),[a,this.startLatitude+e*Math.sqrt(3)*this.step,"cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step)]),i.push(o)}else for(a=this.startLongitude;a<this.stopLongitude-this.step;a+=2*this.step){r=[];r=[u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a,this.startLatitude+(e*Math.sqrt(3)+2*Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a+this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a+this.step,this.startLatitude+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a,this.startLatitude+(e*Math.sqrt(3)-2*Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)-Math.sqrt(3)/3)*this.step,this.height),u.default.fromDegrees(a-this.step,this.startLatitude+(e*Math.sqrt(3)+Math.sqrt(3)/3)*this.step,this.height)];o=new d.default({geometry:new g.default({positions:r,width:this.cellWidth}),attributes:{color:c.default.fromColor(this.color),show:new v.default(this.show)},id:"cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step)});this.instanceCollection.set("cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step),[a,this.startLatitude+e*Math.sqrt(3)*this.step,"cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step)]),i.push(o),n.push("cell_geometry_"+a+"_"+(this.startLatitude+e*Math.sqrt(3)*this.step))}var s=new _.default({geometryInstances:i,appearance:new h.default({})});this.primitiveCollection.set(e,s),this.groupCollection.set(e,[this.startLatitude+e*Math.sqrt(3)*this.step,e,n]),e++}},t.prototype.addPrimitive=function(){var e=this,t=this.parent;if(t){var i=[];return this.primitiveCollection.values.forEach((function(e,n){var a=t.cesiumViewer.scene.groundPrimitives.add(e);i.push(a.readyPromise)})),Promise.all(i).then((function(){e.ready=!0})),!0}return!1},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this.createPrimitive(),this.addPrimitive()},t.prototype.updateForward=function(e,t){var i=this;this.ready&&(this.everyUpdateIds=[],this.updateTarget.values.forEach((function(e){e.children.values.forEach((function(t){t instanceof y.default&&i.changeGridStatus(e.matrix,t.optionsConfig.semiMajorAxis)}))})))},t.prototype.changeGridStatus=function(e,t){var i=this,n=new u.default,a=new u.default;s.default.getTranslation(e,n);var r=p.default.fromCartesian(n),o=m.default.toDegrees(r.latitude),l=m.default.toDegrees(t/this.smallEarthRadii)+2*this.step,d=[o-l,o+l];if(n&&!n.equals(u.default.ZERO)){var h=p.default.fromCartesian(n);a=u.default.fromRadians(h.longitude,h.latitude),this.groupCollection.values.forEach((function(e){if(e[0]>=d[0]&&e[0]<=d[1]){var n=i.primitiveCollection.get(e[1]);e[2].forEach((function(e){var r=i.instanceCollection.get(e),o=u.default.fromDegrees(r[0],r[1]),s=u.default.distance(o,a);if(s<2*t){var l=n.getGeometryInstanceAttributes(e);s<t?(i.everyUpdateIds.push(e),l.color=c.default.toValue(i.highlightColor),l.show=v.default.toValue(!0)):-1===i.everyUpdateIds.indexOf(e)&&(l.color=c.default.toValue(f.default.WHITE),l.show=v.default.toValue(!1))}}))}}))}},t.prototype.clearGridStatus=function(e,t){var i=this,n=new u.default,a=new u.default;s.default.getTranslation(e,n);var r=p.default.fromCartesian(n),o=m.default.toDegrees(r.latitude),l=m.default.toDegrees(t/this.smallEarthRadii)+2*this.step,d=[o-l,o+l];if(n&&!n.equals(u.default.ZERO)){var h=p.default.fromCartesian(n);a=u.default.fromRadians(h.longitude,h.latitude),this.groupCollection.values.forEach((function(e){if(e[0]>=d[0]&&e[0]<=d[1]){var n=i.primitiveCollection.get(e[1]);e[2].forEach((function(e){var r=i.instanceCollection.get(e),o=u.default.fromDegrees(r[0],r[1]);if(u.default.distance(o,a)<2*t){var s=n.getGeometryInstanceAttributes(e);s.color=c.default.toValue(f.default.WHITE),s.show=v.default.toValue(!1)}}))}}))}},t.prototype.attach=function(e){this.updateTarget.set(e.id,e)},t.prototype.detach=function(e){var t=this;this.updateTarget.remove(e.id),e.children.values.forEach((function(i){i instanceof y.default&&t.clearGridStatus(e.matrix,i.optionsConfig.semiMajorAxis)}))},t.prototype.beforeSwitchMode=function(e){},t.prototype.afterSwitchMode=function(e){},t.prototype.destroyForward=function(){var e=this.parent;this.primitiveCollection.values.forEach((function(t,i){e.cesiumViewer.scene.groundPrimitives.remove(t)}))},t}(o.default);t.default=w},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){throw new Error("Method not implemented.")},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(234).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.destroyForward=function(){throw new Error("Method not implemented.")},t.prototype.updateForward=function(e){throw new Error("Method not implemented.")},t.prototype.afterSwitchMode=function(e){throw new Error("Method not implemented.")},t.prototype.beforeSwitchMode=function(e){throw new Error("Method not implemented.")},t}(i(234).default);t.default=r},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(1),s=i(234),l=i(1241),u=i(177),d=i(8),c=i(5),f=i(22),h=i(329),p=i(13),m=new d.default,_=new o.default,g=new f.default,v={colorScale:["#fff"],lineWidth:1,frameRate:30,maxAge:60,globalAlpha:.9,velocityScale:1/30,paths:6e3},y=function(e){function t(t,i){var n=e.call(this)||this;n.options=r(r({},v),i),n._velocityScale=n.options.velocityScale,n._data=t,n.field=l.formatData(t);var a=document.createElement("canvas");return a.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",a.className="cesium-wind-j",n.canvas=a,n}return a(t,e),t.prototype.calcSparseFactor=function(){var e=this.viewRect(),t=Math.min(Math.abs(e.east-e.west),Math.abs(e.north-e.south));return Math.sqrt(t/90)},t.prototype.viewRect=function(){var e,t,i,n,a=this.viewer.cesiumViewer.camera.computeViewRectangle(this.viewer.cesiumViewer.scene.globe.ellipsoid);if(a)e=360*a.east/(2*Math.PI),t=360*a.west/(2*Math.PI),i=360*a.north/(2*Math.PI),n=360*a.south/(2*Math.PI);else{var r=this.view2D();e=r.east,t=r.west,i=r.north,n=r.south}return{east:e,west:t,north:i,south:n}},t.prototype.view2D=function(){for(var e,t,i,n,a=this.viewer.cesiumViewer.canvas.width/2,r=this.viewer.cesiumViewer.canvas.height/2,o=a,s=0;s<this.viewer.cesiumViewer.canvas.height;s++)if(e=this.unproject([o,s])){e=e[1];break}o=a;for(s=this.viewer.cesiumViewer.canvas.height-1;s>=0;s--)if(t=this.unproject([o,s])){t=t[1];break}o=0;for(s=r;o<this.viewer.cesiumViewer.canvas.width;o++)if(n=this.unproject([o,s])){n=n[0];break}o=this.viewer.cesiumViewer.canvas.width;for(s=r;o>=0;o--)if(i=this.unproject([o,s])){i=i[0];break}return{east:i,west:n,north:e,south:t}},Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,this.field=l.formatData(e),this.wind.updateData(this.field)},enumerable:!1,configurable:!0}),t.prototype.afterAdded=function(e){this.viewer=e,this.options.velocityScale=this._velocityScale*this.calcSparseFactor(),this.appendCanvas();var t=this.canvas.getContext("2d");this.wind=new l.WindCore(t,this.options,this.field),this.wind.project=this.project.bind(this),this.wind.unproject=this.unproject.bind(this),this.wind.intersectsCoordinate=this.intersectsCoordinate.bind(this),this.wind.postrender=function(){},this.wind.prerender(),this.wind.render(),this.setupEventListeners()},t.prototype.appendCanvas=function(){var e=this.viewer.cesiumViewer.canvas.parentNode;this.adjustSize(),e.appendChild(this.canvas)},t.prototype.adjustSize=function(){var e=this.viewer.cesiumViewer.canvas,t=e.clientWidth,i=e.clientHeight;this.canvas.width=1*t,this.canvas.height=1*i,this.canvas.style.width=t+"px",this.canvas.style.height=i+"px"},t.prototype.afterSwitchMode=function(){},t.prototype.beforeSwitchMode=function(){},t.prototype.destroy=function(){this.viewer&&(this.wind&&this.wind.stop(),this.canvas&&l.removeDomNode(this.canvas),this.removeEvent(),delete this.canvas)},t.prototype.destroyForward=function(){this.destroy()},t.prototype.updateForward=function(){},t.prototype.project=function(e){var t=o.default.fromDegrees(e[0],e[1]),i=this.viewer.cesiumViewer.scene,n=u.default.wgs84ToWindowCoordinates(i,t,m);return n?[n.x,n.y]:null},t.prototype.unproject=function(e){var t=new d.default(e[0],e[1]),i=this.viewer.cesiumViewer.camera.pickEllipsoid(t,this.viewer.cesiumViewer.scene.globe.ellipsoid,_);if(i){var n=f.default.fromCartesian(i,this.viewer.cesiumViewer.scene.globe.ellipsoid,g);return[c.default.toDegrees(n.longitude),c.default.toDegrees(n.latitude)]}return null},t.prototype.intersectsCoordinate=function(e){var t=this.viewer.sceneMode;if(t===p.default.SCENE3D){var i=this.viewer.cesiumViewer.scene.globe.ellipsoid,n=this.viewer.cesiumViewer.camera,a=new h.default(i,n.position),r=o.default.fromDegrees(e[0],e[1],0,i,_);return a.isPointVisible(r)}if(t===p.default.SCENE2D){var s=this.viewer.cesiumViewer.scene.canvas,l=s.clientWidth,d=s.clientHeight,c=this.viewer.cesiumViewer.scene,f=u.default.wgs84ToWindowCoordinates(c,o.default.fromDegrees(e[0],e[1]),m);return f.x>=1&&f.x<=l-1&&f.y>=1&&f.y<=d-1}return t===p.default.COLUMBUS_VIEW},t.prototype.setupEventListeners=function(){var e=this;this.removeMoveStartEvent=this.viewer.cesiumViewer.camera.moveStart.addEventListener((function(){var t=e.viewer.cesiumViewer.camera.position.clone();setTimeout((function(){e.viewer.cesiumViewer.camera.position.equals(t)||e.wind.clearCanvas()}),20)})),this.removeMoveEndEvent=this.viewer.cesiumViewer.camera.moveEnd.addEventListener((function(){e.wind.start(),e.options.velocityScale=e._velocityScale*e.calcSparseFactor(),e.wind.setOptions(e.options)})),window.addEventListener("resize",(function(){e.wind.clearCanvas(),e.adjustSize()}))},t.prototype.removeEvent=function(){this.removeMoveStartEvent&&this.removeMoveStartEvent(),this.removeMoveEndEvent&&this.removeMoveEndEvent()},t}(s.default);t.default=y},function(e,t,i){"use strict";i.r(t),i.d(t,"Field",(function(){return D})),i.d(t,"TypeOf",(function(){return r})),i.d(t,"Vector",(function(){return M})),i.d(t,"WindCore",(function(){return L})),i.d(t,"assign",(function(){return m})),i.d(t,"createCanvas",(function(){return O})),i.d(t,"defaultOptions",(function(){return P})),i.d(t,"floorMod",(function(){return y})),i.d(t,"formatData",(function(){return w})),i.d(t,"getColor",(function(){return S})),i.d(t,"isArray",(function(){return p})),i.d(t,"isArrayBuffer",(function(){return u})),i.d(t,"isDate",(function(){return l})),i.d(t,"isEmpty",(function(){return f})),i.d(t,"isFunction",(function(){return o})),i.d(t,"isNull",(function(){return h})),i.d(t,"isNumber",(function(){return c})),i.d(t,"isObject",(function(){return s})),i.d(t,"isString",(function(){return d})),i.d(t,"isValide",(function(){return b})),i.d(t,"removeDomNode",(function(){return x})),i.d(t,"warnLog",(function(){return _})),i.d(t,"warnOnce",(function(){return v}));const n=Object.prototype.hasOwnProperty,a="undefined"!=typeof Symbol?Symbol.toStringTag:void 0;function r(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function o(e){if(!s(e))return!1;const t=function(e){if(null===e)return void 0===e?"[object Undefined]":"[object Null]";if(!a||!(a in Object(e)))return toString.call(e);const t=n.call(e,a),i=e[a];let r=!1;try{e[a]=void 0,r=!0}catch(e){}const o=Object.prototype.toString.call(e);return r&&(t?e[a]=i:delete e[a]),o}(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object Proxy]"===t}function s(e){const t=typeof e;return null!==e&&("object"===t||"function"===t)}function l(e){return"[object Date]"===Object.prototype.toString.call(e)}function u(e){return"[object ArrayBuffer]"===Object.prototype.toString.call(e)}function d(e){return null!=e&&("string"==typeof e||null!==e.constructor&&e.constructor===String)}function c(e){return"[object Number]"===Object.prototype.toString.call(e)&&!isNaN(e)}function f(e){let t;for(t in e)return!1;return!t}function h(e){return null==e}function p(e){return Array.isArray(e)}function m(e,...t){return Object.assign(e,...t)}function _(e,t){console.warn(`${t||"wind-layer"}: ${e}`)}const g={};function v(e,t){g[t]||(_(t,e),g[t]=!0)}function y(e,t){return e-t*Math.floor(e/t)}function b(e){return null!=e&&!isNaN(e)}function w(e,t={}){let i=void 0,n=void 0;if(e.forEach((function(e){switch(e.header.parameterCategory+","+e.header.parameterNumber){case"1,2":case"2,2":i=e;break;case"1,3":case"2,3":n=e}})),!n||!i)return;const a=i.header;return new D({xmin:a.lo1,ymin:a.la1,xmax:a.lo2,ymax:a.la2,deltaX:a.dx,deltaY:a.dy,cols:a.nx,rows:a.ny,us:i.data,vs:n.data,...t})}function O(e,t,i,n){if("undefined"!=typeof document){const n=document.createElement("canvas");return n.width=e*i,n.height=t*i,n}return new n(e*i,t*i)}function x(e){return e?(e.parentNode&&e.parentNode.removeChild(e),e):null}const A=/(\D+)/,T=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,E=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,C={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function S(e){let t=[];if(e.match(T)){let i=e.match(T);if(null!==i){i=i[1];for(let e=0;e<3;e++){const n=2*e;t[e]=parseInt(i.slice(n,n+2),16)}t[3]=1}}else{if(!e.match(E)){if(e.match(A)){const i=e.match(A);return"transparent"===i[1]?[0,0,0,0]:(t=C[i[1]],t?(t[3]=1,t):null)}return null}{const i=e.match(E);for(let e=0;e<3;e++)t[e]=parseInt(i[e+1],0);i[4]?t[3]=parseFloat(i[4]):t[3]=1}}return t}class M{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u**2+this.v**2)}directionTo(){let e=Math.atan2(this.u,this.v)*(180/Math.PI);return e<0&&(e+=360),e}directionFrom(){return(this.directionTo()+180)%360}}class D{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.flipY=Boolean(e.flipY),this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin),this.deltaY<0&&this.ymin<this.ymax||(void 0===e.flipY&&(this.flipY=!0),console.warn("[wind-core]: The data is flipY")),this.isFields=!0;const t=Math.ceil((this.xmax-this.xmin)/e.deltaX),i=Math.ceil((this.ymax-this.ymin)/e.deltaY);t===this.cols&&i===this.rows||console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.translateX="translateX"in e?e.translateX:this.xmax>180,"wrappedX"in e&&v("[wind-core]: ","`wrappedX` namespace will deprecated please use `translateX` instead!"),this.wrapX=Boolean(e.wrapX),this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],t=0;const{rows:i,cols:n,us:a,vs:r}=this;for(let o=0;o<i;o++){const i=[];for(let e=0;e<n;e++,t++){let n=a[t],o=r[t],s=this.isValid(n)&&this.isValid(o);i[e]=s?new M(n,o):null}this.isContinuous&&i.push(i[0]),e[o]=i}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,i,n,a,r){const o=1-e,s=1-t,l=o*s,u=e*s,d=o*t,c=e*t,f=i.u*l+n.u*u+a.u*d+r.u*c,h=i.v*l+n.v*u+a.v*d+r.v*c;return new M(f,h)}calculateRange(){if(!this.grid||!this.grid[0])return;const e=this.grid.length,t=this.grid[0].length;let i,n;for(let a=0;a<e;a++)for(let e=0;e<t;e++){const t=this.grid[a][e];if(null!==t){const e=t.m||t.magnitude();void 0===i?i=e:void 0===n?(n=e,i=Math.min(i,n),n=Math.max(i,n)):(i=Math.min(e,i),n=Math.max(e,n))}}return[i,n]}isValid(e){return null!=e}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.translateX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){const[i,n]=this.getWrappedLongitudes();let a,r=e>=i&&e<=n;return a=this.deltaY>=0?t>=this.ymin&&t<=this.ymax:t>=this.ymax&&t<=this.ymin,r&&a}getDecimalIndexes(e,t){const i=y(e-this.xmin,360)/this.deltaX;if(this.flipY){return[i,(this.ymax-t)/this.deltaY]}return[i,(this.ymin+t)/this.deltaY]}valueAt(e,t){let i=!1;if((this.wrapX||this.contains(e,t))&&(i=!0),!i)return null;const n=this.getDecimalIndexes(e,t);let a=Math.floor(n[0]),r=Math.floor(n[1]);const o=this.clampColumnIndex(a),s=this.clampRowIndex(r);return this.valueAtIndexes(o,s)}interpolatedValueAt(e,t){let i=!1;if((this.wrapX||this.contains(e,t))&&(i=!0),!i)return null;let[n,a]=this.getDecimalIndexes(e,t);return this.interpolatePoint(n,a)}hasValueAt(e,t){return null!==this.valueAt(e,t)}interpolatePoint(e,t){const i=this.getFourSurroundingIndexes(e,t),[n,a,r,o]=i;let s=this.getFourSurroundingValues(n,a,r,o);if(s){const[i,a,o,l]=s;return this.bilinearInterpolateVector(e-n,t-r,i,a,o,l)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let i=this.cols-1;return e>i&&(t=i),t}clampRowIndex(e){let t=e;e<0&&(t=0);let i=this.rows-1;return e>i&&(t=i),t}getFourSurroundingIndexes(e,t){let i=Math.floor(e),n=i+1;this.isContinuous&&n>=this.cols&&(n=0),n=this.clampColumnIndex(n);let a=this.clampRowIndex(Math.floor(t));return[i,n,a,this.clampRowIndex(a+1)]}getFourSurroundingValues(e,t,i,n){let a;if(a=this.grid[i]){const i=a[e],r=a[t];if(this.isValid(i)&&this.isValid(r)&&(a=this.grid[n])){const n=a[e],o=a[t];if(this.isValid(n)&&this.isValid(o))return[i,r,n,o]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){return[this.longitudeAtX(e),this.latitudeAtY(t)]}longitudeAtX(e){let t=this.deltaX/2,i=this.xmin+t+e*this.deltaX;return this.translateX&&(i=i>180?i-360:i),i}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e={},t,i,n){let a=Math.random()*(t||this.cols)|0,r=Math.random()*(i||this.rows)|0;const o=n([a,r]);return null!==o?(e.x=o[0],e.y=o[1]):(e.x=this.longitudeAtX(a),e.y=this.latitudeAtY(r)),e}checkFields(){return this.isFields}}const P={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:.04,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0};function I(e,t,i,n){return Math.max(0,Math.min(n.length-1,Math.round((e-t)/(i-t)*(n.length-1))))}class L{constructor(e,t,i){if(this.particles=[],this.generated=!1,this.ctx=e,!this.ctx)throw new Error("ctx error");this.animate=this.animate.bind(this),this.setOptions(t),i&&this.updateData(i)}setOptions(e){this.options={...P,...e};const{width:t,height:i}=this.ctx.canvas;"particleAge"in e&&!("maxAge"in e)&&c(this.options.particleAge)&&(this.options.maxAge=this.options.particleAge),"particleMultiplier"in e&&!("paths"in e)&&c(this.options.particleMultiplier)&&(this.options.paths=Math.round(t*i*this.options.particleMultiplier)),this.prerender()}getOptions(){return this.options}updateData(e){this.field=e,this.generated&&(this.particles=this.prepareParticlePaths())}project(...e){throw new Error("project must be overriden")}unproject(...e){throw new Error("unproject must be overriden")}intersectsCoordinate(e){throw new Error("must be overriden")}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this.then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);const e=Date.now(),t=e-this.then;t>this.options.frameRate&&(this.then=e-t%this.options.frameRate,this.render())}prerender(){this.generated=!1,this.field&&(this.particles=this.prepareParticlePaths(),this.generated=!0,this.starting||this.forceStop||(this.starting=!0,this.then=Date.now(),this.animate()))}render(){this.moveParticles(),this.drawParticles(),this.postrender()}postrender(){}moveParticles(){const{width:e,height:t}=this.ctx.canvas,i=this.particles,n=this.options.maxAge,a=o(this.options.velocityScale)?this.options.velocityScale():this.options.velocityScale;let r=0;const s=i.length;for(;r<s;r++){const o=i[r];o.age>n&&(o.age=0,this.field.randomize(o,e,t,this.unproject));const s=o.x,l=o.y,u=this.field.interpolatedValueAt(s,l);if(null===u)o.age=n;else{const e=s+u.u*a,t=l+u.v*a;this.field.hasValueAt(e,t)?(o.xt=e,o.yt=t,o.m=u.m):(o.x=e,o.y=t,o.age=n)}o.age++}}fadeIn(){const e=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=e}drawParticles(){const e=this.particles;this.fadeIn(),this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle=`rgba(0, 0, 0, ${this.options.globalAlpha})`,this.ctx.lineWidth=c(this.options.lineWidth)?this.options.lineWidth:1,this.ctx.strokeStyle=d(this.options.colorScale)?this.options.colorScale:"#fff";let t=0;const i=e.length;if(this.field&&i>0){let n,a;for(b(this.options.minVelocity)&&b(this.options.maxVelocity)?(n=this.options.minVelocity,a=this.options.maxVelocity):[n,a]=this.field.range;t<i;t++)this[this.options.useCoordsDraw?"drawCoordsParticle":"drawPixelParticle"](e[t],n,a)}}drawPixelParticle(e,t,i){const n=[e.x,e.y],a=[e.xt,e.yt];if(a&&n&&b(a[0])&&b(a[1])&&b(n[0])&&b(n[1])&&e.age<=this.options.maxAge){if(this.ctx.beginPath(),this.ctx.moveTo(n[0],n[1]),this.ctx.lineTo(a[0],a[1]),o(this.options.colorScale))this.ctx.strokeStyle=this.options.colorScale(e.m);else if(Array.isArray(this.options.colorScale)){const n=I(e.m,t,i,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}o(this.options.lineWidth)&&(this.ctx.lineWidth=this.options.lineWidth(e.m)),e.x=e.xt,e.y=e.yt,this.ctx.stroke()}}drawCoordsParticle(e,t,i){const n=[e.x,e.y],a=[e.xt,e.yt];if(a&&n&&b(a[0])&&b(a[1])&&b(n[0])&&b(n[1])&&this.intersectsCoordinate(a)&&e.age<=this.options.maxAge){const r=this.project(n),s=this.project(a);if(r&&s){if(this.ctx.beginPath(),this.ctx.moveTo(r[0],r[1]),this.ctx.lineTo(s[0],s[1]),e.x=e.xt,e.y=e.yt,o(this.options.colorScale))this.ctx.strokeStyle=this.options.colorScale(e.m);else if(Array.isArray(this.options.colorScale)){const n=I(e.m,t,i,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}o(this.options.lineWidth)&&(this.ctx.lineWidth=this.options.lineWidth(e.m)),this.ctx.stroke()}}}prepareParticlePaths(){const{width:e,height:t}=this.ctx.canvas,i="function"==typeof this.options.paths?this.options.paths(this):this.options.paths,n=[];if(!this.field)return[];let a=0;for(;a<i;a++)n.push(this.field.randomize({age:this.randomize()},e,t,this.unproject));return n}randomize(){return Math.floor(Math.random()*this.options.maxAge)}}L.Field=D},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,speed:10},u=function(e){function t(t){var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"CircleDiffuse",uniforms:n,source:"\n uniform vec4 color;\n uniform float speed;\n \n vec3 circlePing(float r,float innerTail,float frontierBorder,float timeResetSeconds,float radarPingSpeed,float fadeDistance){\n float t = fract(czm_frameNumber * speed/1000.0);\n float time = mod(t,timeResetSeconds) * radarPingSpeed;\n float circle;\n circle +=smoothstep(time-innerTail,time,r) * smoothstep(time + frontierBorder,time,r);\n circle *=smoothstep(fadeDistance,0.0,r);\n return vec3(circle);\n }\n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st * 2.0 -1.0;\n vec2 center = vec2(0.0);\n float time = fract(czm_frameNumber * speed/1000.0);\n vec3 flagColor;\n float r = length(st -center)/4.0;\n flagColor = circlePing(r,0.25,0.025,4.0,0.3,1.0) * color.rgb;\n material.alpha = length(flagColor) * color.a;\n material.diffuse = flagColor.rgb;\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._speed=n.speed,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(118),l=i(62),u=i(69),d={color:o.default.SPRINGGREEN,speed:5,lineWidth:1,edgeThickness:0},c=function(e){function t(t){var i=this,n=r(r({},d),t);return(i=e.call(this,{fabric:{type:"CircleScan",uniforms:n,source:"\n uniform vec4 color;\n uniform float speed;\n uniform float lineWidth;\n uniform float edgeThickness;\n\n\n //圆环软边 uv坐标,中心位置,半径,线宽,柔化边缘\n float circle(vec2 position,vec2 center,float radius,float line_width,float soften){\n vec2 p = position - center;\n float length = length(p);\n float half_line_width = line_width/1000.0;\n return smoothstep(radius - half_line_width - soften,radius - half_line_width,length) - smoothstep(radius + half_line_width,radius + half_line_width + soften,length);\n }\n //画线 坐标轴,位置,线宽,柔化边缘\n float line(float a,float b,float line_width,float edge_thickness){\n float half_line_width = line_width * 0.5;\n return smoothstep(a - half_line_width - edge_thickness, a - half_line_width, b) - smoothstep(a + half_line_width,a + half_line_width + edge_thickness,b);\n }\n //扫描线 uv坐标,中心,半径,线宽,柔化边缘\n float sweep(vec2 pt,vec2 center,float radius,float line_width,float edge_thickness,float u_time,float speed){\n vec2 d = pt - center;\n float theta = u_time * 2.5 * speed ;\n //p是圆上的点\n vec2 p = vec2(cos(theta),-sin(theta)) * radius;\n //h取点乘d,p除以点乘p,p后0到1的值,舍去大于1,和小于0的数值\n float h = clamp( dot(d,p)/dot(p,p),0.0,1.0);\n //l是计算d点垂直p矢量上垂直点长度\n float l = length(d - p * h);\n //拖尾效果\n float gradient = 0.0;\n //拖尾角度\n const float gradient_angle = czm_pi * 0.8;\n if(length(d)<radius){\n float angle = mod(theta + atan(d.y,d.x),czm_twoPi);\n gradient = clamp(gradient_angle - angle,0.0,gradient_angle)/gradient_angle * 0.5;\n }\n //l长度小于线宽为0,大于线宽+软边为1\n // return gradient + 1.0 - smoothstep(line_width,line_width + edge_thickness,l);\n return gradient;\n }\n //多边形\n float polygon(vec2 pt,vec2 center,float radius,int sides,float rotate,float edge_thickness){\n pt -= center;\n float theta = atan(pt.y,pt.x) + rotate;\n float rad = czm_twoPi/float(sides);\n float d = cos(floor(0.5 + theta/rad) * rad - theta) * length(pt);\n return 1.0 - smoothstep(radius,radius + edge_thickness,d);\n }\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n \n // float time = czm_frameNumber/1000.0*speed; //变化时间由帧率决定\n float time = fract(czm_frameNumber * speed /1000.0);\n vec2 v_uv = materialInput.st;\n\n //线\n // float strength = line(v_uv.y,0.5,lineWidth,edgeThickness);\n \n // strength += line(v_uv.x,0.5,lineWidth,edgeThickness) ;\n //圆环\n float strength = circle(v_uv,vec2(0.5),0.3,lineWidth,edgeThickness) ;\n // strength += circle(v_uv,vec2(0.5),0.12,lineWidth,edgeThickness) ;\n \n //扫描线\n strength += sweep(v_uv,vec2(0.5),0.3,lineWidth,edgeThickness,time,speed) ;\n\n //横向三角\n // strength += polygon(v_uv,vec2(0.9 - sin(time * speed * 6.0 ) * 0.05,0.5),0.02,3,0.0,edgeThickness) ;\n // strength += polygon(v_uv,vec2(0.1 - sin(time * speed * 6.0 + czm_pi) * 0.05,0.5),0.02,3,czm_pi ,edgeThickness) ;\n //竖向三角\n // strength += polygon(v_uv,vec2(0.5,0.9 - sin(time * speed* 6.0 ) * 0.05),0.02,3,-czm_pi*0.5,edgeThickness) ;\n // strength += polygon(v_uv,vec2(0.5,0.1 - sin(time * speed* 6.0 + czm_pi ) * 0.05),0.02,3, czm_pi*0.5,edgeThickness) ;\n\n //限定输出范围0-1\n strength = clamp(strength, 0.0, 1.0);\n \n material.alpha = strength;\n material.diffuse = color.rgb;\n return material;\n }\n "},strict:!1,translucent:!0,minificationFilter:l.default.LINEAR,magnificationFilter:s.default.LINEAR})||this)._color=n.color,i._speed=n.speed,i._lineWidth=n.lineWidth,i._edgeThickness=n.edgeThickness,i}return a(t,e),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return this._lineWidth},set:function(e){this._lineWidth=e,this.uniforms.lineWidth=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgeThickness",{get:function(){return this._edgeThickness},set:function(e){this._edgeThickness=e,this.uniforms.edgeThickness=e},enumerable:!1,configurable:!0}),t}(u.default);t.default=c},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,speed:10,count:3,gradient:.1},u=function(e){function t(t){var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"CircleWave",uniforms:n,source:"\n uniform vec4 color;\n uniform float speed;\n uniform float count;\n uniform float gradient;\n \n czm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n material.diffuse = 1.5 * color.rgb;\n vec2 st = materialInput.st;\n float dis = distance(st,vec2(0.5,0.5));\n float per = fract(czm_frameNumber * speed/1000.0);\n if(count==1.0){\n if(dis>per * 0.5){\n discard;\n }else{\n material.alpha = color.a * dis/per/2.0;\n }\n }else{\n vec3 str = materialInput.str;\n if(abs(str.z) > 0.001){\n discard;\n }\n if(dis>0.5){\n discard;\n }else{\n float perDis = 0.5 / count;\n float disNum;\n float bl = 0.0;\n for(int i = 0;i<=99;i++){\n if(float(i)<=count){\n disNum = perDis * float(i) - dis + per/count;\n if(disNum > 0.0){\n if(disNum<perDis){\n bl = 1.0-disNum/perDis;\n }else if(disNum-perDis<perDis){\n bl = 1.0 - abs(1.0 - disNum/perDis);\n }\n material.alpha = pow(bl,(1.0+10.0 *(1.0-gradient))); \n }\n }\n }\n }\n }\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._speed=n.speed,i._count=n.count,i._gradient=n.gradient,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},set:function(e){this._count=e,this.uniforms.count=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"gradient",{get:function(){return this._gradient},set:function(e){this._gradient=e,this.uniforms.gradient=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.BLACK,markColor:o.default.RED,moveColor:o.default.GREEN,lightColor:o.default.GREEN,markStart:.2,markEnd:.4,movePercent:.1,glowPower:.4,speed:5,imageHeight:.6,enableFlow:!1,enableMark:!1},u=function(e){function t(t){var i=this,n=r(r({},l),t),a={markStart:n.markStart,markEnd:n.markEnd,color:n.color,markColor:n.markColor,lightColor:n.lightColor,moveColor:n.moveColor,glowPower:n.glowPower,movePercent:n.movePercent,enableFlow:n.enableFlow,enableMark:n.enableMark,image:n.image,speed:n.speed,imageHeight:n.imageHeight};return(i=e.call(this,{fabric:{type:"EmissionFlow",uniforms:a,source:"\n uniform float markStart;\n uniform float markEnd;\n uniform vec4 color;\n uniform float glowPower;\n uniform float movePercent;\n uniform float imageHeight;\n uniform vec4 markColor;\n uniform vec4 moveColor;\n uniform vec4 lightColor;\n uniform bool enableFlow;\n uniform bool enableMark;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n if (glow > 0.999) {\n glow = 0.999;\n }\n \n vec4 fragColor;\n if (enableMark && st.s > markStart && st.s < markEnd) {\n fragColor.rgb = max(vec3(glow - 1.0 + markColor.rgb), markColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * markColor.a;\n } else {\n fragColor.rgb = max(vec3(glow - 1.0 + lightColor.rgb), lightColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * lightColor.a;\n }\n fragColor = czm_gammaCorrect(fragColor);\n if (st.t > 0.5 - imageHeight / 2.0 && st.t < 0.5 + imageHeight / 2.0) {\n material.emission = color.rgb;\n material.alpha = color.a;\n \n } else {\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n }\n if (enableFlow) {\n vec4 fragColor2;\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n if (m < movePercent && st.t > 0.5 - imageHeight / 2.0 && st.t < 0.5 + imageHeight / 2.0) {\n // fragColor2.rgb = max(vec3(glow - 1.0 + moveColor.rgb), moveColor.rgb);\n // fragColor2.a = clamp(0.0, 1.0, glow) * moveColor.a;\n // material.emission = fragColor2.rgb;\n // material.alpha = fragColor2.a;\n tex = texture2D(image, vec2(m / movePercent, (st.t - 0.5 + imageHeight / 2.0) / imageHeight));\n if (tex.a > 0.0) {\n material.emission = tex.rgb;\n material.alpha = max(tex.a, fragColor.a);\n }\n }\n }\n // material.emission = fragColor.rgb;\n // material.diffuse = markColor.rgb;\n // material.alpha = fragColor.a;\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._lightColor=n.lightColor,i._markColor=n.color,i._moveColor=n.moveColor,i._glowPower=n.glowPower,i._markStart=n.markStart,i._markEnd=n.markEnd,i._movePercent=n.movePercent,i._enableFlow=n.enableFlow,i._enableMark=n.enableMark,i._image=n.image,i._speed=n.speed,i._imageHeight=n.imageHeight,i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imageHeight},set:function(e){this._imageHeight=e,this.uniforms.imageHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableMark",{get:function(){return this._enableMark},set:function(e){this._enableMark=e,this.uniforms.enableMark=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableFlow",{get:function(){return this._enableFlow},set:function(e){this._enableFlow=e,this.uniforms.enableFlow=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glowPower",{get:function(){return this._glowPower},set:function(e){this._glowPower=e,this.uniforms.glowPower=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markStart",{get:function(){return this._markStart},set:function(e){this._markStart=e,this.uniforms.markStart=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markEnd",{get:function(){return this._markEnd},set:function(e){this._markEnd=e,this.uniforms.markEnd=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return this._lightColor},set:function(e){this._lightColor=e,this.uniforms.lightColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moveColor",{get:function(){return this._moveColor},set:function(e){this._moveColor=e,this.uniforms.moveColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markColor",{get:function(){return this._markColor},set:function(e){this._markColor=e,this.uniforms.markColor=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(69),s={intensity:.4},l=function(e){function t(t){void 0===t&&(t=s);var i=this,n=r(r({},s),t);return(i=e.call(this,{fabric:{type:"Flame",uniforms:r({},n),source:"\nvec2 hash( vec2 p )\n{\n p = vec2( dot(p,vec2(127.1,311.7)),\n dot(p,vec2(269.5,183.3)) );\n return -1.0 + 2.0*fract(sin(p)*43758.5453123);\n}\n\nfloat noise( in vec2 p )\n{\n const float K1 = 0.366025404; // (sqrt(3)-1)/2;\n const float K2 = 0.211324865; // (3-sqrt(3))/6;\n \n vec2 i = floor( p + (p.x+p.y)*K1 );\n \n vec2 a = p - i + (i.x+i.y)*K2;\n vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);\n vec2 b = a - o + K2;\n vec2 c = a - 1.0 + 2.0*K2;\n \n vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );\n \n vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));\n \n return dot( n, vec3(70.0) );\n}\n\nfloat fbm(vec2 uv)\n{\n float f;\n mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );\n f = 0.5000*noise( uv ); uv = m*uv;\n f += 0.2500*noise( uv ); uv = m*uv;\n f += 0.1250*noise( uv ); uv = m*uv;\n f += 0.0625*noise( uv ); uv = m*uv;\n f = 0.5 + 0.5*f;\n return f;\n}\nczm_material czm_getMaterial(czm_materialInput materialInput) { \n czm_material material = czm_getDefaultMaterial(materialInput); \n vec2 uv = materialInput.st;\n vec2 q = uv;\n q.y*=2.;\n float strength = floor(q.x+0.8);\n float T3 = max(3.,1.25*strength)*czm_frameNumber/60.0;\n q.x-=0.5;\n q.y -= 0.25;\n float n = fbm(strength*q - vec2(0,T3));\n float c = 1. - 16. * pow( max( 0., length(q*vec2(1.8+q.y*1.5,.75) ) - n * max( 0., q.y+.25 ) ),1.2 );\n//\tfloat c1 = n * c * (1.5-pow(1.25*uv.y,4.));\n float c1 = n * c * (1.5-pow(2.50*uv.y,4.));\n c1=clamp(c1,0.,1.);\n\n vec3 col = vec3(1.5*c1, 1.5*c1*c1*c1, c1*c1*c1*c1*c1*c1);\n \n float a = c * (1.-pow(uv.y,3.));\n material.diffuse = mix(vec3(0.),col,a); \n material.alpha = clamp(a,0.,1.); \n return material; \n}\n "},translucent:!0})||this)._intensity=n.intensity,i}return a(t,e),Object.defineProperty(t.prototype,"intensity",{get:function(){return this._intensity},set:function(e){this._intensity=e,this.uniforms.intensity=e},enumerable:!1,configurable:!0}),t}(o.default);t.default=l},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:["rgb(255,255,255)"],lightColor:o.default.GREEN,repeat:5,speed:5,glowPower:.4,movePercent:.1,imageHeight:.6,backgroundAlpha:1},u=function(e){function t(t){var i=this,n=r(r({},l),t);n.color&&0!==n.color.length||(n.color=["rgb(255,255,255)"]);var a={repeat:n.repeat,speed:n.speed,movePercent:n.movePercent,lightColor:n.lightColor,image:n.image,backgroundAlpha:n.backgroundAlpha,imageHeight:n.imageHeight,glowPower:n.glowPower,baseImage:""};(i=e.call(this,{fabric:{type:"VerticalMultipleColorFlow",uniforms:a,source:"\n uniform float repeat;\n uniform float movePercent;\n uniform float thickness;\n uniform float speed;\n uniform float glowPower;\n uniform vec4 lightColor;\n uniform float imageHeight;\n uniform float backgroundAlpha;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n if (st.t > (0.5 - imageHeight/ 2.0) && st.t < (0.5 + imageHeight/ 2.0) ) {\n float pickt = (st.t - 0.5 + imageHeight / 2.0) / imageHeight;\n float pickStep = min(1.0, 1.0 / repeat);\n float inits = mod(st.s, pickStep);\n float picks = inits / pickStep;\n vec4 tex2 = texture2D(baseImage, vec2(picks, pickt));\n material.emission =tex2.rgb;\n material.alpha = backgroundAlpha;\n \n } else {\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n if (glow > 0.999) {\n glow = 0.999;\n }\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + lightColor.rgb), lightColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * lightColor.a;\n material.emission = fragColor.rgb;\n material.alpha = min(fragColor.a,backgroundAlpha);;\n }\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n if (m < movePercent) {\n tex = texture2D(image, vec2(m / movePercent, st.t));\n float alpha = tex.a;\n if (alpha > 0.5) {\n material.alpha = tex.a;\n material.emission = tex.rgb + material.emission;\n // material.emission = tex.rgb;\n }\n }\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._lightColor=n.lightColor,i._imageHeight=n.imageHeight,i._glowPower=n.glowPower,i._image=n.image,i._backgroundAlpha=n.backgroundAlpha;var o=document.createElement("canvas");o.width=400,o.height=4;var s=o.getContext("2d"),u=i._color.length;return i._color.forEach((function(e,t){s.fillStyle=e,s.fillRect(400*t/u,0,400*(t+1)/u,4)})),i.baseImage=o.toDataURL("image/png"),i}return a(t,e),t.prototype.getRepeatCorrectByColor=function(e){return e/this._color.length},Object.defineProperty(t.prototype,"glowPower",{get:function(){return this._glowPower},set:function(e){this._glowPower=e,this.uniforms.glowPower=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imageHeight},set:function(e){this._imageHeight=e,this.uniforms.imageHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return this._lightColor},set:function(e){this._lightColor=e,this.uniforms.lightColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseImage",{get:function(){return this._baseImage},set:function(e){this._baseImage=e,this.uniforms.baseImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundAlpha},set:function(e){this._backgroundAlpha=e,this.uniforms.backgroundAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=document.createElement("canvas");t.width=400,t.height=4;var i=t.getContext("2d"),n=this._color.length;this._color.forEach((function(e,t){i.fillStyle=e,i.fillRect(400*t/n,0,400*(t+1)/n,4)})),this.baseImage=t.toDataURL("image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.BLACK,markColor:o.default.RED,moveColor:o.default.GREEN,markStart:.2,markEnd:.4,movePercent:.1,glowPower:.4,speed:5,enableFlow:!1,enableMark:!1},u=function(e){function t(t){var i=this,n=r(r({},l),t),a={markStart:n.markStart,markEnd:n.markEnd,color:n.color,markColor:n.markColor,moveColor:n.moveColor,glowPower:n.glowPower,movePercent:n.movePercent,enableFlow:n.enableFlow,enableMark:n.enableMark,image:n.image,speed:n.speed};return(i=e.call(this,{fabric:{type:"FlowLight",uniforms:a,source:"\n uniform float markStart;\n uniform float markEnd;\n uniform vec4 color;\n uniform float glowPower;\n uniform float movePercent;\n uniform vec4 markColor;\n uniform vec4 moveColor;\n uniform bool enableFlow;\n uniform bool enableMark;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n if (glow > 0.999) {\n glow = 0.999;\n }\n float a = 1.0;\n if (st.t < 0.4) {\n a = st.t * 2.0;\n }\n if (st.t > 0.6) {\n a = (1.0 - st.t) * 2.0;\n }\n \n \n\n vec4 fragColor;\n if (enableMark && st.s > markStart && st.s < markEnd) {\n fragColor.rgb = max(vec3(glow - 1.0 + markColor.rgb), markColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * markColor.a;\n } else {\n fragColor.rgb = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * color.a;\n }\n fragColor = czm_gammaCorrect(fragColor);\n if (st.t < 0.45 || st.t > 0.55) {\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n } else {\n material.emission = fragColor.rgb;\n material.alpha = fragColor.a;\n }\n if (enableFlow) {\n vec4 fragColor2;\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n if (m < movePercent) {\n fragColor2.rgb = max(vec3(glow - 1.0 + moveColor.rgb), moveColor.rgb);\n fragColor2.a = clamp(0.0, 1.0, glow) * moveColor.a;\n material.emission = fragColor2.rgb;\n material.alpha = fragColor2.a;\n // tex = texture2D(image, vec2(m / movePercent, st.t));\n // if (tex.a > 0.0) {\n // material.emission = tex.rgb;\n // material.alpha = max(tex.a, fragColor.a);\n // }\n }\n }\n // material.emission = fragColor.rgb;\n // material.diffuse = markColor.rgb;\n // material.alpha = fragColor.a;\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._markColor=n.color,i._moveColor=n.moveColor,i._glowPower=n.glowPower,i._markStart=n.markStart,i._markEnd=n.markEnd,i._movePercent=n.movePercent,i._enableFlow=n.enableFlow,i._enableMark=n.enableMark,i._image=n.image,i._speed=n.speed,i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableMark",{get:function(){return this._enableMark},set:function(e){this._enableMark=e,this.uniforms.enableMark=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"enableFlow",{get:function(){return this._enableFlow},set:function(e){this._enableFlow=e,this.uniforms.enableFlow=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"glowPower",{get:function(){return this._glowPower},set:function(e){this._glowPower=e,this.uniforms.glowPower=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markStart",{get:function(){return this._markStart},set:function(e){this._markStart=e,this.uniforms.markStart=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markEnd",{get:function(){return this._markEnd},set:function(e){this._markEnd=e,this.uniforms.markEnd=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"moveColor",{get:function(){return this._moveColor},set:function(e){this._moveColor=e,this.uniforms.moveColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"markColor",{get:function(){return this._markColor},set:function(e){this._markColor=e,this.uniforms.markColor=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,repeat:30,speed:5,colorMixMode:!1},u=function(e){function t(t){var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"FlowLine",uniforms:n,source:"\n uniform vec4 color;\n uniform vec4 baseColor;\n uniform float repeat;\n uniform float thickness;\n uniform float speed;\n uniform bool colorMixMode;\n\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float offset = 0.001*speed*czm_frameNumber;\n float m = mod(st.s*repeat + offset, 1.0);\n vec4 tex = texture2D(image, vec2(m, st.t));\n if (colorMixMode) {\n material.diffuse = tex.rgb+color.rgb;\n } else {\n material.diffuse = tex.rgb*color.rgb;\n }\n material.alpha = tex.a;\n\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._image=n.image,i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorMixMode",{get:function(){return this._colorMixMode},set:function(e){this._colorMixMode=e,this.uniforms.colorMixMode=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:["rgb(255,255,255)"],lightColor:o.default.GREEN,repeat:5,speed:5,glowPower:.4,movePercent:.1,imageHeight:.6,backgroundAlpha:1},u=function(e){function t(t){var i=this,n=r(r({},l),t);n.color&&0!==n.color.length||(n.color=["rgb(255,255,255)"]);var a={repeat:n.repeat,speed:n.speed,movePercent:n.movePercent,lightColor:n.lightColor,image:n.image,backgroundAlpha:n.backgroundAlpha,imageHeight:n.imageHeight,glowPower:n.glowPower,baseImage:""};(i=e.call(this,{fabric:{type:"HorizontalMultipleColorFlow",uniforms:a,source:"\n uniform float repeat;\n uniform float movePercent;\n uniform float thickness;\n uniform float speed;\n uniform float glowPower;\n uniform vec4 lightColor;\n uniform float imageHeight;\n uniform float backgroundAlpha;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n if (st.t > (0.5 - imageHeight/ 2.0) && st.t < (0.5 + imageHeight/ 2.0) ) {\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n float pickt = (st.t - 0.5 + imageHeight / 2.0) / imageHeight;\n if (m < movePercent) {\n tex = texture2D(image, vec2(m / movePercent, pickt));\n }\n float pickStep = min(1.0, 1.0 / repeat);\n float inits = mod(st.s, pickStep);\n float picks = inits / pickStep;\n vec4 tex2 = texture2D(baseImage, vec2(picks, pickt));\n float alpha = tex.a;\n if (alpha > 0.0) {\n material.alpha = tex.a;\n material.emission = tex.rgb;\n } else {\n material.emission =tex2.rgb;\n material.alpha = backgroundAlpha;\n }\n } else {\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n if (glow > 0.999) {\n glow = 0.999;\n }\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + lightColor.rgb), lightColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * lightColor.a;\n material.emission = fragColor.rgb;\n material.alpha = min(fragColor.a,backgroundAlpha);;\n }\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._lightColor=n.lightColor,i._imageHeight=n.imageHeight,i._glowPower=n.glowPower,i._image=n.image,i._backgroundAlpha=n.backgroundAlpha;var o=document.createElement("canvas");o.width=400,o.height=4;var s=o.getContext("2d"),u=i._color.length;return i._color.forEach((function(e,t){s.fillStyle=e,s.fillRect(400*t/u,0,400*(t+1)/u,4)})),i.baseImage=o.toDataURL("image/png"),i}return a(t,e),t.prototype.getRepeatCorrectByColor=function(e){return e/this._color.length},Object.defineProperty(t.prototype,"glowPower",{get:function(){return this._glowPower},set:function(e){this._glowPower=e,this.uniforms.glowPower=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imageHeight},set:function(e){this._imageHeight=e,this.uniforms.imageHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return this._lightColor},set:function(e){this._lightColor=e,this.uniforms.lightColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseImage",{get:function(){return this._baseImage},set:function(e){this._baseImage=e,this.uniforms.baseImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundAlpha},set:function(e){this._backgroundAlpha=e,this.uniforms.backgroundAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=document.createElement("canvas");t.width=400,t.height=4;var i=t.getContext("2d"),n=this._color.length;this._color.forEach((function(e,t){i.fillStyle=e,i.fillRect(400*t/n,0,400*(t+1)/n,4)})),this.baseImage=t.toDataURL("image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(69),s={color:["rgb(255,255,255)"],repeat:30,speed:5,movePercent:.1,backgroundAlpha:1},l=function(e){function t(t){var i=this,n=r(r({},s),t);n.color&&0!==n.color.length||(n.color=["rgb(255,255,255)"]);var a={repeat:n.repeat,speed:n.speed,movePercent:n.movePercent,image:n.image,backgroundAlpha:n.backgroundAlpha,baseImage:""};(i=e.call(this,{fabric:{type:"MuiltyColorFlow",uniforms:a,source:"\n uniform float repeat;\n uniform float movePercent;\n uniform float thickness;\n uniform float speed;\n uniform float backgroundAlpha;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n if (m < movePercent) {\n tex = texture2D(image, vec2(m * 10.0, st.t));\n }\n vec4 tex2 = texture2D(baseImage, vec2(st.s, st.t));\n float alpha = tex.a;\n material.alpha = 1.0;\n if (alpha > 0.0) {\n material.diffuse = tex.rgb;\n } else {\n material.diffuse =tex2.rgb;\n material.alpha = backgroundAlpha;\n }\n\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._image=n.image,i._backgroundAlpha=n.backgroundAlpha;var o=document.createElement("canvas");o.width=200,o.height=2;var l=o.getContext("2d"),u=i._color.length;return i._color.forEach((function(e,t){l.fillStyle=e,l.fillRect(200*t/u,0,200*(t+1)/u,2),console.log(l.filter)})),i.baseImage=o.toDataURL("image/png"),i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseImage",{get:function(){return this._baseImage},set:function(e){this._baseImage=e,this.uniforms.baseImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundAlpha},set:function(e){this._backgroundAlpha=e,this.uniforms.backgroundAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=document.createElement("canvas");t.width=200,t.height=2;var i=t.getContext("2d"),n=this._color.length;this._color.forEach((function(e,t){i.fillStyle=e,i.fillRect(200*t/n,0,200*(t+1)/n,2),console.log(i.filter)})),this.baseImage=t.toDataURL("image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),t}(o.default);t.default=l},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:o.default.CYAN,baseColor:o.default.CYAN.withAlpha(.1),blendStrength:.2,speed:20,isCircle:!0,thickness:.02},u=function(e){function t(t){void 0===t&&(t=l);var i=this,n=r(r({},l),t);return(i=e.call(this,{fabric:{type:"PingPong",uniforms:n,source:"\nuniform vec4 color;//主颜色\nuniform float speed;//运动速度\nuniform vec4 baseColor;//背景颜色\nuniform float blendStrength;//背景色与主色对比强度,混合强度0-1\nuniform bool isCircle;//判断是圆形还是方形\nuniform float thickness;//波束线条宽度\nczm_material czm_getMaterial(czm_materialInput materialInput){\n czm_material material = czm_getDefaultMaterial(materialInput);\n //获取uv坐标\n vec2 vUv = materialInput.st;\n //圆心坐标\n vec2 center = vec2(0.5);\n //获得时间\n float time = czm_frameNumber * speed/1000.0;\n \n \n float mask = (sin(time)+1.0)/4.0;\n //计算圆环通道强度\n float strengthCircle = 1.0 - step(thickness,abs(distance(vUv,vec2(0.5))- mask));\n \n //计算正方形通道强度\n float strengthSquare = step(mask, max(abs(vUv.x - 0.5), abs(vUv.y - 0.5)));\n strengthSquare *= 1.0 - step(mask+thickness, max(abs(vUv.x - 0.5), abs(vUv.y - 0.5)));\n \n //根据布尔值判断是方形还是圆形\n float strength = isCircle?strengthCircle:strengthSquare;\n \n //混合颜色\n vec3 diffuseColor = strength>0.9?color.rgb:baseColor.rgb;\n \n material.alpha = strength+blendStrength;\n material.diffuse = diffuseColor;\n return material;\n}\n "},translucent:!0})||this)._color=n.color,i._baseColor=n.baseColor,i._speed=n.speed,i._blendStrength=n.blendStrength,i._isCircle=n.isCircle,i._thickness=n.thickness,i}return a(t,e),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e,this.uniforms.color=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseColor",{get:function(){return this._baseColor},set:function(e){this._baseColor=e,this.uniforms.baseColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendStrength",{get:function(){return this._blendStrength},set:function(e){this._blendStrength=e,this.uniforms.blendStrength=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCircle",{get:function(){return this.isCircle},set:function(e){this._isCircle=e,this.uniforms.isCircle=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"thickness",{get:function(){return this.thickness},set:function(e){this._thickness=e,this.uniforms.thickness=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(7),s=i(69),l={color:["rgb(255,255,255)"],lightColor:o.default.GREEN,repeat:30,speed:5,glowPower:.4,movePercent:.1,imageHeight:.6,backgroundAlpha:1},u=function(e){function t(t){var i=this,n=r(r({},l),t);n.color&&0!==n.color.length||(n.color=["rgb(255,255,255)"]);var a={repeat:n.repeat,speed:n.speed,movePercent:n.movePercent,lightColor:n.lightColor,image:n.image,backgroundAlpha:n.backgroundAlpha,imageHeight:n.imageHeight,glowPower:n.glowPower,baseImage:""};(i=e.call(this,{fabric:{type:"VerticalMultipleColorFlow",uniforms:a,source:"\n uniform float repeat;\n uniform float movePercent;\n uniform float thickness;\n uniform float speed;\n uniform float glowPower;\n uniform vec4 lightColor;\n uniform float imageHeight;\n uniform float backgroundAlpha;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n if (st.t > (0.5 - imageHeight/ 2.0) && st.t < (0.5 + imageHeight/ 2.0) ) {\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n float pickt = (st.t - 0.5 + imageHeight / 2.0) / imageHeight;\n if (m < movePercent) {\n tex = texture2D(image, vec2(m / movePercent, pickt));\n }\n vec4 tex2 = texture2D(baseImage, vec2(0.0, pickt));\n float alpha = tex.a;\n if (alpha > 0.0) {\n // material.diffuse = tex.rgb * tex2.rgb;\n // material.alpha = mod(alpha + backgroundAlpha, 1.0);\n // material.alpha = alpha;\n material.alpha = max(alpha, backgroundAlpha);\n float blendAlpha = alpha + backgroundAlpha - backgroundAlpha * alpha;\n // material.alpha = alpha;\n // material.alpha = max(alpha,backgroundAlpha);\n // material.alpha = alpha;\n material.emission = tex.rgb;\n // material.emission = tex.rgb * tex2.rgb;\n float r = (tex.r * alpha * (1.0 - backgroundAlpha) + tex2.r * backgroundAlpha) / blendAlpha;\n float g = (tex.g * alpha * (1.0 - backgroundAlpha) + tex2.g * backgroundAlpha) / blendAlpha;\n float b = (tex.b * alpha * (1.0 - backgroundAlpha) + tex2.b * backgroundAlpha) / blendAlpha;\n // material.emission = vec3(r,g,b);\n } else {\n material.emission =tex2.rgb;\n material.alpha = backgroundAlpha;\n }\n } else {\n float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n if (glow > 0.999) {\n glow = 0.999;\n }\n vec4 fragColor;\n fragColor.rgb = max(vec3(glow - 1.0 + lightColor.rgb), lightColor.rgb);\n fragColor.a = clamp(0.0, 1.0, glow) * lightColor.a;\n material.emission = fragColor.rgb;\n // material.alpha = fragColor.a;\n material.alpha = min(fragColor.a,backgroundAlpha);;\n }\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._lightColor=n.lightColor,i._imageHeight=n.imageHeight,i._glowPower=n.glowPower,i._image=n.image,i._backgroundAlpha=n.backgroundAlpha;var o=document.createElement("canvas"),s=2*i._color.length;o.width=4,o.height=s;var u=o.getContext("2d"),d=i._color.length;return i._color.forEach((function(e,t){u.fillStyle=e,u.fillRect(0,t*s/d,4,(t+1)*s/d)})),i.baseImage=o.toDataURL("image/png"),i}return a(t,e),Object.defineProperty(t.prototype,"glowPower",{get:function(){return this._glowPower},set:function(e){this._glowPower=e,this.uniforms.glowPower=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageHeight",{get:function(){return this._imageHeight},set:function(e){this._imageHeight=e,this.uniforms.imageHeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lightColor",{get:function(){return this._lightColor},set:function(e){this._lightColor=e,this.uniforms.lightColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseImage",{get:function(){return this._baseImage},set:function(e){this._baseImage=e,this.uniforms.baseImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundAlpha},set:function(e){this._backgroundAlpha=e,this.uniforms.backgroundAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=document.createElement("canvas");t.width=4,t.height=4;var i=t.getContext("2d"),n=this._color.length;this._color.forEach((function(e,t){i.fillStyle=e,i.fillRect(0,4*t/n,4,4*(t+1)/n)})),this.baseImage=t.toDataURL("image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),t}(s.default);t.default=u},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++)for(var a in t=arguments[i])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var o=i(69),s={color:["rgb(255,255,255)"],repeat:30,speed:5,movePercent:.1,backgroundAlpha:1},l=function(e){function t(t){var i=this,n=r(r({},s),t);n.color&&0!==n.color.length||(n.color=["rgb(255,255,255)"]);var a={repeat:n.repeat,speed:n.speed,movePercent:n.movePercent,image:n.image,backgroundAlpha:n.backgroundAlpha,baseImage:""};(i=e.call(this,{fabric:{type:"VerticalMultipleColor",uniforms:a,source:"\n uniform float repeat;\n uniform float movePercent;\n uniform float thickness;\n uniform float speed;\n uniform float backgroundAlpha;\n czm_material czm_getMaterial(czm_materialInput materialInput)\n {\n czm_material material = czm_getDefaultMaterial(materialInput);\n vec2 st = materialInput.st;\n float offset = 0.0001*speed*czm_frameNumber;\n float m = mod(st.s + offset, 1.0);\n vec4 tex = vec4(0.0,0.0,0.0,0.0);\n if (m < movePercent) {\n tex = texture2D(image, vec2(m / movePercent, st.t));\n }\n vec4 tex2 = texture2D(baseImage, vec2(0.0, st.t));\n float alpha = tex.a;\n material.alpha = 1.0;\n if (alpha > 0.0) {\n material.diffuse = tex.rgb;\n // material.alpha = mod(alpha + backgroundAlpha, 1.0);\n material.alpha =alpha;\n material.emission = tex.rgb;\n } else {\n material.diffuse =tex2.rgb;\n material.alpha = backgroundAlpha;\n }\n\n return material;\n }\n "},translucent:!0})||this)._color=n.color,i._repeat=n.repeat,i._speed=n.speed,i._image=n.image,i._backgroundAlpha=n.backgroundAlpha;var o=document.createElement("canvas"),l=2*i._color.length;o.width=4,o.height=l;var u=o.getContext("2d"),d=i._color.length;return i._color.forEach((function(e,t){u.fillStyle=e,u.fillRect(0,t*l/d,4,(t+1)*l/d)})),i.baseImage=o.toDataURL("image/png"),i}return a(t,e),Object.defineProperty(t.prototype,"image",{get:function(){return this._image},set:function(e){this._image=e,this.uniforms.image=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseImage",{get:function(){return this._baseImage},set:function(e){this._baseImage=e,this.uniforms.baseImage=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"movePercent",{get:function(){return this._movePercent},set:function(e){this._movePercent=e,this.uniforms.movePercent=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){this._speed=e,this.uniforms.speed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"backgroundAlpha",{get:function(){return this._backgroundAlpha},set:function(e){this._backgroundAlpha=e,this.uniforms.backgroundAlpha=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"color",{get:function(){return this._color},set:function(e){this._color=e;var t=document.createElement("canvas");t.width=4,t.height=4;var i=t.getContext("2d"),n=this._color.length;this._color.forEach((function(e,t){i.fillStyle=e,i.fillRect(0,4*t/n,4,4*(t+1)/n)})),this.baseImage=t.toDataURL("image/png")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"repeat",{get:function(){return this._repeat},set:function(e){this._repeat=e,this.uniforms.repeat=e},enumerable:!1,configurable:!0}),t}(o.default);t.default=l},function(e,t,i){"use strict";var n,a=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var r,o=i(54),s=i(1),l=i(7),u=i(43),d=i(124),c=i(6),f=i(80),h=i(185),p=i(85),m=i(64),_=i(190),g=i(1180),v=i(324),y=i(27),b=i(156),w=i(69),O=i(24),x=new s.default,A=new y.default,T=new s.default,E=new s.default,C=new s.default,S=new f.default(s.default.UNIT_Z,0),M=new f.default(s.default.UNIT_Z,0),D=new s.default,P=new p.default,I=new s.default,L=new s.default(1,1,1),j=[];!function(e){e.AXIS_X="tx",e.AXIS_Y="ty",e.AXIS_Z="tz",e.ROTATE_X="rx",e.ROTATE_Y="ry",e.ROTATE_Z="rz"}(r||(r={}));var R=[r.AXIS_X,r.AXIS_Y,r.AXIS_Z,r.ROTATE_X,r.ROTATE_Y,r.ROTATE_Z],N=function(e){function t(t,i){void 0===t&&(t=5),void 0===i&&(i=100);var n=e.call(this)||this;return n._axes=new _.default,n.modelMatrix=c.default.IDENTITY.clone(),n._isMoving=!1,n._scaleFactor=1,n.modelUpdateEvent=new O.default,n.onKeyDown=function(e){console.log(e)},n.onKeyUp=function(e){console.log(e)},n._width=t,n._length=i,n.createControl(),n}return a(t,e),Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hovered",{get:function(){return this._hovered},set:function(e){if(this._hovered!==e){if(this._hovered){var t=R.indexOf(this._hovered);(i=this._axes.get(t))&&(i.appearance.material.uniforms.color=j),this._axes.get(t).getGeometryInstanceAttributes(this._hovered).color=j}if(e){var i;t=R.indexOf(e);(i=this._axes.get(t))&&(j=i.appearance.material.uniforms.color,i.appearance.material.uniforms.color=l.default.YELLOW)}this._hovered=e}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activated",{get:function(){return this._activated},set:function(e){var t=this;this._activated!==e&&(this._activated=e,void 0!==e?R.forEach((function(i,n){var a=t._axes.get(n);a&&(a.show=i===e)})):R.forEach((function(e,i){var n=t._axes.get(i);n&&(n.show=!0)})))},enumerable:!1,configurable:!0}),t.prototype.setEntity=function(e){this._entity=e,e?(c.default.clone(this._entity.matrix,this.modelMatrix),this.setMatrix(this.modelMatrix),this._axes.show=!0):this._axes.show=!1},t.prototype.setMatrix=function(e){c.default.clone(e,this.modelMatrix);for(var t=0;t<this._axes.length;t++){var i=this._axes.get(t).modelMatrix;c.default.clone(e,i),c.default.setScale(i,new s.default(this._scaleFactor,this._scaleFactor,this._scaleFactor),i)}},t.prototype.afterAdded=function(t){e.prototype.afterAdded.call(this,t),this._axes&&this.parent.cesiumViewer.scene.primitives.add(this._axes)},t.prototype.destroyForward=function(){e.prototype.destroyForward.call(this),this._axes&&this.parent.cesiumViewer.scene.primitives.remove(this._axes)},t.prototype.createControl=function(){var e=new u.default({geometry:new h.default({positions:[s.default.multiplyByScalar(s.default.UNIT_X,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_X,this.length,new s.default)],width:4*this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.AXIS_X}),t=new u.default({geometry:new h.default({positions:[s.default.multiplyByScalar(s.default.UNIT_Y,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_Y,this.length,new s.default)],width:4*this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.AXIS_Y}),i=new u.default({geometry:new h.default({positions:[s.default.multiplyByScalar(s.default.UNIT_Z,.1,new s.default),s.default.multiplyByScalar(s.default.UNIT_Z,this.length,new s.default)],width:4*this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.AXIS_Z}),n=v.default.getCirclePositions(.5*this.length,18,0,Math.PI/2),a=c.default.fromTranslationQuaternionRotationScale(s.default.ZERO,y.default.fromAxisAngle(s.default.UNIT_Y,-Math.PI/2),L),d=new u.default({geometry:new h.default({positions:n.map((function(e){return new s.default(e.x,e.y,0)})),width:this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.ROTATE_X,modelMatrix:a}),f=c.default.fromTranslationQuaternionRotationScale(s.default.ZERO,y.default.fromAxisAngle(s.default.UNIT_X,Math.PI/2),L),p=new u.default({geometry:new h.default({positions:n.map((function(e){return new s.default(e.x,e.y,0)})),width:this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.ROTATE_Y,modelMatrix:f}),_=new u.default({geometry:new h.default({positions:n.map((function(e){return new s.default(e.x,e.y,0)})),width:this.width,vertexFormat:b.default.VERTEX_FORMAT,arcType:o.default.NONE}),id:r.ROTATE_Z}),g=new m.default({geometryInstances:e,appearance:new b.default({material:w.default.fromType(w.default.PolylineArrowType,{color:l.default.RED}),renderState:{depthTest:{enabled:!1}}})}),O=new m.default({geometryInstances:t,appearance:new b.default({material:w.default.fromType(w.default.PolylineArrowType,{color:l.default.GREEN}),renderState:{depthTest:{enabled:!1}}})}),x=new m.default({geometryInstances:i,appearance:new b.default({material:w.default.fromType(w.default.PolylineArrowType,{color:l.default.BLUE}),renderState:{depthTest:{enabled:!1}}})}),A=new m.default({geometryInstances:d,appearance:new b.default({material:w.default.fromType(w.default.ColorType,{color:l.default.RED}),renderState:{depthTest:{enabled:!1}}})}),T=new m.default({geometryInstances:p,appearance:new b.default({material:w.default.fromType(w.default.ColorType,{color:l.default.GREEN}),renderState:{depthTest:{enabled:!1}}})}),E=new m.default({geometryInstances:_,appearance:new b.default({material:w.default.fromType(w.default.ColorType,{color:l.default.BLUE}),renderState:{depthTest:{enabled:!1}}})});this._axes.add(g),this._axes.add(O),this._axes.add(x),this._axes.add(A),this._axes.add(T),this._axes.add(E)},t.prototype.onMouseMove=function(e){if(this.activated){var t=this.parent.cesiumViewer.camera;this._isMoving||(this._isMoving=!0);var i=this.getMovingDirection(this._hovered);switch(s.default.clone(i,I),c.default.multiplyByPointAsVector(this.modelMatrix,I,I),t.getPickRay(e.endPosition,P),P&&d.default.rayPlane(P,S,C),this.activated){case r.AXIS_X:case r.AXIS_Y:case r.AXIS_Z:s.default.subtract(C,T,C),s.default.projectVector(C,I,C),s.default.add(x,C,C),this._entity.position=C,this.setMatrix(this._entity.matrix);break;case r.ROTATE_X:case r.ROTATE_Y:case r.ROTATE_Z:f.default.fromPointNormal(this._entity.position,I,M),f.default.projectPointOntoPlane(M,T,E),s.default.clone(C,T),f.default.projectPointOntoPlane(M,C,C),s.default.subtract(E,this._entity.position,E),s.default.subtract(C,this._entity.position,C);var n=s.default.angleBetween(E,C);this._entity.rotation=y.default.multiply(this._entity.rotation,y.default.fromAxisAngle(i,Math.sign(s.default.dot(s.default.cross(E,C,E),I))*n),this._entity.rotation),this.setMatrix(this._entity.matrix)}}else{var a=this.parent.cesiumViewer.scene.pick(e.endPosition);a&&a.primitive&&this._axes.contains(a.primitive)?this.hovered=a.id:this.hovered=void 0}},t.prototype.onMouseLeftDown=function(e){if(this._hovered){var t=this.parent.cesiumViewer;t.scene.screenSpaceCameraController.enableInputs=!1;var i=t.camera;f.default.fromPointNormal(this._entity.position,s.default.negate(i.direction,D),S),i.getPickRay(e.position,P),s.default.clone(this.getMovingDirection(this._hovered),I),c.default.multiplyByPointAsVector(this.modelMatrix,I,I),P&&(d.default.rayPlane(P,S,T),this.activated=this.hovered,s.default.clone(this._entity.position,x),y.default.clone(this._entity.rotation,A))}},t.prototype.onMouseLeftUp=function(){this.activated&&this.modelUpdateEvent.raiseEvent(this._entity),this._isMoving=!1,this.activated=void 0,this.parent.cesiumViewer.scene.screenSpaceCameraController.enableInputs=!0},t.prototype.getMovingDirection=function(e){switch(e){case r.AXIS_X:case r.ROTATE_X:return s.default.UNIT_X;case r.AXIS_Y:case r.ROTATE_Y:return s.default.UNIT_Y;case r.AXIS_Z:case r.ROTATE_Z:return s.default.UNIT_Z}},t.prototype.updateForward=function(e,t){this._entity&&(this._scaleFactor=s.default.distance(this._entity.position,this.parent.cesiumViewer.camera.positionWC)/35,this.setMatrix(this.modelMatrix))},t}(g.default);t.default=N},function(e,t,i){"use strict";function n(e,t,i){var n=t.x,a=t.y,r=t.z,o=i.x-n,s=i.y-a,l=i.z-r;if(0!==o||0!==s||0!==l){var u=((e.x-n)*o+(e.y-a)*s+(e.z-r)*l)/(o*o+s*s+l*l);u>1?(n=i.x,a=i.y,r=i.z):u>0&&(n+=o*u,a+=s*u,r+=l*u)}return(o=e.x-n)*o+(s=e.y-a)*s+(l=e.z-r)*l}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,i){var a=void 0!==t?t*t:1;return e=function(e,t){var i,a,r,o,s=e.length,l=new("undefined"!=typeof Uint8Array?Uint8Array:Array)(s),u=[],d=[],c=0,f=s-1;for(l[c]=l[f]=1;f;){for(a=0,i=c+1;i<f;i++)(r=n(e[i],e[c],e[f]))>a&&(o=i,a=r);a>t&&(l[o]=1,u.push(c,o,o,f)),f=u.pop(),c=u.pop()}for(i=0;i<s;i++)l[i]&&d.push(e[i]);return d}(e=i?e:function(e,t){for(var i,n,a,r,o,s,l=e[0],u=[l],d=1,c=e.length;d<c;d++)i=e[d],a=l,r=void 0,o=void 0,s=void 0,r=(n=i).x-a.x,o=n.y-a.y,s=n.z-a.z,r*r+o*o+s*s>t&&(u.push(i),l=i);return l!==i&&u.push(i),u}(e,a),a)}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(1176),a=function(){function e(e,t){this.step=100,this.NaNColor="#676767",this.colorStops={0:"#0103ce",100:"#810000"},this.inputData=e,this.dataType=t,this.canvas=document.createElement("canvas"),this.canvas.width=e.header.nx,this.canvas.height=e.header.ny,this.colorProfile(),this.getColorRanges(),this.generateBase64Image()}return e.getImage=function(t,i){return new e(t,i).image},e.prototype.generateBase64Image=function(){for(var e=this.canvas.getContext("2d"),t=0;t<this.inputData.data.length;t++){var i=this.inputData.data[t];e.fillStyle="number"==typeof i?this.getColor(i):"rgb("+this.hexToRGB(this.NaNColor).join(",")+")";var n=(t+.5*this.canvas.width)%this.canvas.width,a=Math.floor(t/this.canvas.width);e.fillRect(n,a,1,1)}this.image=this.canvas.toDataURL("image/png")},e.prototype.getColorRanges=function(){var e=this.findMaxMinValue(this.inputData.data),t=e.minNumber,i=e.maxNumber,n=[],a=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(var o in this.colorStops)a=a<parseFloat(o)?a:parseFloat(o),r=r>parseFloat(o)?r:parseFloat(o),this.colorStops[parseFloat(o)+this.step]&&n.push({min:parseFloat(o),max:Number(o)+this.step,startColor:this.colorStops[o],endColor:this.colorStops[parseFloat(o)+this.step]});if(t<a)for(var o in n)n[o].min===a&&(n[o].min=t);if(i>r)for(var o in n)n[o].max===r&&(n[o].max=i);this.colorRanges=n},e.prototype.getColor=function(e){for(var t=0;t<this.colorRanges.length;t++)if(e>=this.colorRanges[t].min&&e<=this.colorRanges[t].max){var i=this.colorRanges[t],n=i.max-i.min,a=(e-i.min)/n,r=this.hexToRGB(i.startColor.toString()),o=this.hexToRGB(i.endColor.toString());return"rgb("+this.interpolateColor(r,o,a).join(",")+")"}},e.prototype.findMaxMinValue=function(e){for(var t=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY,n=1;n<e.length;n++)"NaN"!==e[n]&&"number"==typeof e[n]&&(t=e[n]>t?e[n]:t,i=e[n]<i?e[n]:i);return{maxNumber:t,minNumber:i}},e.prototype.hexToRGB=function(e){var t=e.replace("#","");return[parseInt(t.substring(0,2),16),parseInt(t.substring(2,4),16),parseInt(t.substring(4,6),16)]},e.prototype.interpolateColor=function(e,t,i){for(var n=[],a=0;a<e.length;a++){var r=Math.round(e[a]+(t[a]-e[a])*i);n.push(r)}return n},e.prototype.colorProfile=function(){var e,t;switch(this.dataType){case n.default.PRECIPITABLE_WATER:e={0:"#0103ce",8:"#2965ff",16:"#61b5ff",24:"#88dbff",32:"#aaf3ff",40:"#e4feae",48:"#ffe800",56:"#ffa300",64:"#ff3700",72:"#db0000",80:"#810000"},t=8;break;case n.default.TEMPERATURE:e={208.15:"#885f7f",213.15:"#af8ca7",218.15:"#c9a9c2",223.15:"#bc86b1",228.15:"#b067a2",233.15:"#a44a94",238.15:"#9f4a98",243.15:"#9363b4",248.15:"#9387d1",253.15:"#9589d3",258.15:"#96d1d8",263.15:"#81ccc5",268.15:"#65aebb",273.15:"#5c8bba",278.15:"#508c44",283.15:"#778e1a",288.15:"#a8a00e",293.15:"#d7ac06",298.15:"#f29106",303.15:"#e85e14",308.15:"#bd4012",313.15:"#8a2b0a",318.15:"#832101",323.15:"#831001",328.15:"#730d00",333.15:"#5d0a00"},t=5;break;case n.default.PRESSURE:e={96e3:"#003a54",96500:"#01435e",97e3:"#004b69",97500:"#005475",98e3:"#005b80",98500:"#006794",99e3:"#00628d",99500:"#007493",1e5:"#127f8c",100500:"#4f9c9a",101e3:"#8bb0a6",101500:"#b1b09e",102e3:"#a1875e",102500:"#a36e3e",103e3:"#984e29",103500:"#a1410f"},t=500;break;case n.default.RELATIVE_HUMIDITY:e={0:"#ae6e38",10:"#ae6e38",20:"#ae6e38",30:"#a66935",40:"#ac9338",50:"#66a535",60:"#3cae87",70:"#37a99e",80:"#379baa",90:"#357fa7",100:"#384774"},t=10;break;case n.default.TOTAL_CLOUD_COVER:e={0:"#000000",50:"#fbfeae",100:"#ffffff"},t=50;break;case n.default.VISIBILITY:e={0:"#a459a4",1500:"#a359a3",3e3:"#a65555",4500:"#a1575c",6e3:"#58619f",7500:"#4e956e",9e3:"#47b04e",10500:"#4dac4e",12e3:"#52a750",13500:"#599b53",15e3:"#5b9e55",16500:"#163ade",18e3:"#163ade"},t=1500;break;case n.default.WIND_SPEED:e={0:"#4f6aac",5:"#498875",10:"#659d34",15:"#9c6858",20:"#8f4788",25:"#5f65a0",30:"#578299",35:"#5b88a1"},t=5;break;case n.default.PRECIPITATION_RATE:e={0:"#0002ad",.005:"#2965ff",.01:"#61b5ff",.015:"#88dbff",.02:"#b7fbfd"},t=.005;break;case n.default.DIRECTION:e={0:"#ff0000",90:"#80ff00",180:"#00ffff",270:"#8000ff",360:"#ff0000"},t=90;break;case n.default.WIND_WAVES:e={0:"#040595",3:"#5aafff",6:"#a3f1fe",9:"#ffee06",12:"#ff4001",15:"#880203",18:"#690001"},t=3;break;default:e={0:"#0103ce",10:"#2965ff",20:"#61b5ff",30:"#88dbff",40:"#aaf3ff",50:"#e4feae",60:"#ffe800",70:"#ffa300",80:"#ff3700",90:"#db0000",100:"#810000"},t=10}this.colorStops=e,this.step=t},e}();t.default=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){};t.default=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OperationManagerStatus=void 0;var n,a=i(1181);!function(e){e[e.None=0]="None",e[e.Undoing=1]="Undoing",e[e.Redoing=2]="Redoing",e[e.Aborting=3]="Aborting"}(n=t.OperationManagerStatus||(t.OperationManagerStatus={}));var r=function(){function e(e){var t=this;this.undoStack=[],this.redoStack=[],this.status=n.None,this.onPropertyChange=function(e,i,a){t.status!==n.Aborting&&t.activeOperation.record(e,i,a)},this.updateFunction=e.updateFunction,this.maxBackupStep=e.maxBackupStep||25,this.openOperation()}return Object.defineProperty(e.prototype,"undoable",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoable",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),e.prototype.setMaxBackupStep=function(e){if(e<1)throw Error("MaxBackupStep must not smaller than 1");this.maxBackupStep=e,this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-this.maxBackupStep)},e.prototype.openOperation=function(){this.redoStack.length=0,this.activeOperation=this.createOperation()},e.prototype.commitOperation=function(){this.undoStack.length>=this.maxBackupStep&&this.undoStack.splice(0,this.undoStack.length-(this.maxBackupStep+1)),this.undoStack.push(this.activeOperation),this.openOperation()},e.prototype.abortOperation=function(){this.status=n.Aborting,this.activeOperation.recover(),this.status=n.None,this.activeOperation=this.createOperation()},e.prototype.undo=function(){return 0!==this.undoStack.length&&(this.abortOperation(),this.activeOperation=this.createOperation(),this.status=n.Undoing,this.undoStack.pop().recover(),this.status=n.None,this.redoStack.push(this.activeOperation),this.activeOperation=this.createOperation(),!0)},e.prototype.redo=function(){return 0!==this.redoStack.length&&(this.abortOperation(),this.activeOperation=this.createOperation(),this.status=n.Redoing,this.redoStack.pop().recover(),this.status=n.None,this.undoStack.push(this.activeOperation),this.activeOperation=this.createOperation(),!0)},e.prototype.clear=function(){this.abortOperation(),this.undoStack.length=0,this.redoStack.length=0,this.openOperation()},e.prototype.createOperation=function(){return new a.default(this.updateFunction)},e}();t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(217),a=i(164),r=function(){function e(e,t,i){this.interval=i,n.default.requestsByServer[e]=t}return e.prototype.addRequest=function(e){var t=new a.default({throttle:!1,throttleByServer:!0});!function e(t,i){var n;n="json"===t.type?t.resource.fetchJson():t.resource.fetch();n?n.then((function(e){t.success(e)})).otherwise((function(e){t.fail(e)})):setTimeout((function(){console.log("request defer "+i+" ms"),e(t,i)}),i)}({resource:e.resource.getDerivedResource({request:t}),type:"json",success:e.success,fail:e.fail},this.interval)},e}();t.default=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(0),a=i(14);t.default=function(e,t,i,r,o,s,l,u,d){var c,f=u;c=e.getValueInReferenceFrame(t,s,d[f]),n.default(c)&&(d[f++]=c);for(var h,p,m,_=!n.default(o)||a.default.lessThanOrEquals(o,t)||a.default.greaterThanOrEquals(o,i),g=0,v=r.length,y=r[g],b=i,w=!1;g<v;){if(!_&&a.default.greaterThanOrEquals(y,o)&&(c=e.getValueInReferenceFrame(o,s,d[f]),n.default(c)&&(d[f++]=c),_=!0),a.default.greaterThan(y,t)&&a.default.lessThan(y,b)&&!y.equals(o)&&(c=e.getValueInReferenceFrame(y,s,d[f]),n.default(c)&&(d[f++]=c)),g<v-1){if(l>0&&!w){var O=r[g+1],x=a.default.secondsDifference(O,y);(w=x>l)&&(h=Math.ceil(x/l),p=0,m=x/Math.max(h,2),h=Math.max(h-1,1))}if(w&&p<h){y=a.default.addSeconds(y,m,new a.default),p++;continue}}w=!1,y=r[++g]}return c=e.getValueInReferenceFrame(i,s,d[f]),n.default(c)&&(d[f++]=c),f}},function(e,t,i){"use strict";i.r(t);var n={};i.r(n),i.d(n,"hasBrowserEnv",(function(){return A})),i.d(n,"hasStandardBrowserWebWorkerEnv",(function(){return C})),i.d(n,"hasStandardBrowserEnv",(function(){return E})),i.d(n,"navigator",(function(){return T})),i.d(n,"origin",(function(){return S}));var a=i(31),r=i(967);function o(e,t,i,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}a.a.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.a.toJSONObject(this.config),code:this.code,status:this.status}}});const s=o.prototype,l={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{l[e]={value:e}}),Object.defineProperties(o,l),Object.defineProperty(s,"isAxiosError",{value:!0}),o.from=(e,t,i,n,r,l)=>{const u=Object.create(s);return a.a.toFlatObject(e,u,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e),o.call(u,e.message,t,i,n,r),u.cause=e,u.name=e.name,l&&Object.assign(u,l),u};var u=o;function d(e){return a.a.isPlainObject(e)||a.a.isArray(e)}function c(e){return a.a.endsWith(e,"[]")?e.slice(0,-2):e}function f(e,t,i){return e?e.concat(t).map((function(e,t){return e=c(e),!i&&t?"["+e+"]":e})).join(i?".":""):t}const h=a.a.toFlatObject(a.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));var p=function(e,t,i){if(!a.a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(i=a.a.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!a.a.isUndefined(t[e])}))).metaTokens,r=i.visitor||m,o=i.dots,s=i.indexes,l=(i.Blob||"undefined"!=typeof Blob&&Blob)&&a.a.isSpecCompliantForm(t);if(!a.a.isFunction(r))throw new TypeError("visitor must be a function");function p(e){if(null===e)return"";if(a.a.isDate(e))return e.toISOString();if(!l&&a.a.isBlob(e))throw new u("Blob is not supported. Use a Buffer instead.");return a.a.isArrayBuffer(e)||a.a.isTypedArray(e)?l&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function m(e,i,r){let l=e;if(e&&!r&&"object"==typeof e)if(a.a.endsWith(i,"{}"))i=n?i:i.slice(0,-2),e=JSON.stringify(e);else if(a.a.isArray(e)&&function(e){return a.a.isArray(e)&&!e.some(d)}(e)||(a.a.isFileList(e)||a.a.endsWith(i,"[]"))&&(l=a.a.toArray(e)))return i=c(i),l.forEach((function(e,n){!a.a.isUndefined(e)&&null!==e&&t.append(!0===s?f([i],n,o):null===s?i:i+"[]",p(e))})),!1;return!!d(e)||(t.append(f(r,i,o),p(e)),!1)}const _=[],g=Object.assign(h,{defaultVisitor:m,convertValue:p,isVisitable:d});if(!a.a.isObject(e))throw new TypeError("data must be an object");return function e(i,n){if(!a.a.isUndefined(i)){if(-1!==_.indexOf(i))throw Error("Circular reference detected in "+n.join("."));_.push(i),a.a.forEach(i,(function(i,o){!0===(!(a.a.isUndefined(i)||null===i)&&r.call(t,i,a.a.isString(o)?o.trim():o,n,g))&&e(i,n?n.concat(o):[o])})),_.pop()}}(e),t};function m(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function _(e,t){this._pairs=[],e&&p(e,this,t)}const g=_.prototype;g.append=function(e,t){this._pairs.push([e,t])},g.toString=function(e){const t=e?function(t){return e.call(this,t,m)}:m;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var v=_;function y(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function b(e,t,i){if(!t)return e;const n=i&&i.encode||y,r=i&&i.serialize;let o;if(o=r?r(t,i):a.a.isURLSearchParams(t)?t.toString():new v(t,i).toString(n),o){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}var w=class{constructor(){this.handlers=[]}use(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){a.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},O={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},x={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:v,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const A="undefined"!=typeof window&&"undefined"!=typeof document,T="object"==typeof navigator&&navigator||void 0,E=A&&(!T||["ReactNative","NativeScript","NS"].indexOf(T.product)<0),C="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,S=A&&window.location.href||"http://localhost";var M={...n,...x};var D=function(e){function t(e,i,n,r){let o=e[r++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),l=r>=e.length;if(o=!o&&a.a.isArray(n)?n.length:o,l)return a.a.hasOwnProp(n,o)?n[o]=[n[o],i]:n[o]=i,!s;n[o]&&a.a.isObject(n[o])||(n[o]=[]);return t(e,i,n[o],r)&&a.a.isArray(n[o])&&(n[o]=function(e){const t={},i=Object.keys(e);let n;const a=i.length;let r;for(n=0;n<a;n++)r=i[n],t[r]=e[r];return t}(n[o])),!s}if(a.a.isFormData(e)&&a.a.isFunction(e.entries)){const i={};return a.a.forEachEntry(e,(e,n)=>{t(function(e){return a.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,i,0)}),i}return null};const P={transitional:O,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const i=t.getContentType()||"",n=i.indexOf("application/json")>-1,r=a.a.isObject(e);r&&a.a.isHTMLForm(e)&&(e=new FormData(e));if(a.a.isFormData(e))return n?JSON.stringify(D(e)):e;if(a.a.isArrayBuffer(e)||a.a.isBuffer(e)||a.a.isStream(e)||a.a.isFile(e)||a.a.isBlob(e)||a.a.isReadableStream(e))return e;if(a.a.isArrayBufferView(e))return e.buffer;if(a.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(r){if(i.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return p(e,new M.classes.URLSearchParams,Object.assign({visitor:function(e,t,i,n){return M.isNode&&a.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((o=a.a.isFileList(e))||i.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return p(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}return r||n?(t.setContentType("application/json",!1),function(e,t,i){if(a.a.isString(e))try{return(t||JSON.parse)(e),a.a.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||P.transitional,i=t&&t.forcedJSONParsing,n="json"===this.responseType;if(a.a.isResponse(e)||a.a.isReadableStream(e))return e;if(e&&a.a.isString(e)&&(i&&!this.responseType||n)){const i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw u.from(e,u.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:M.classes.FormData,Blob:M.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.a.forEach(["delete","get","head","post","put","patch"],e=>{P.headers[e]={}});var I=P;const L=a.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const j=Symbol("internals");function R(e){return e&&String(e).trim().toLowerCase()}function N(e){return!1===e||null==e?e:a.a.isArray(e)?e.map(N):String(e)}function B(e,t,i,n,r){return a.a.isFunction(n)?n.call(this,t,i):(r&&(t=i),a.a.isString(t)?a.a.isString(n)?-1!==t.indexOf(n):a.a.isRegExp(n)?n.test(t):void 0:void 0)}class F{constructor(e){e&&this.set(e)}set(e,t,i){const n=this;function r(e,t,i){const r=R(t);if(!r)throw new Error("header name must be a non-empty string");const o=a.a.findKey(n,r);(!o||void 0===n[o]||!0===i||void 0===i&&!1!==n[o])&&(n[o||t]=N(e))}const o=(e,t)=>a.a.forEach(e,(e,i)=>r(e,i,t));if(a.a.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(a.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o((e=>{const t={};let i,n,a;return e&&e.split("\n").forEach((function(e){a=e.indexOf(":"),i=e.substring(0,a).trim().toLowerCase(),n=e.substring(a+1).trim(),!i||t[i]&&L[i]||("set-cookie"===i?t[i]?t[i].push(n):t[i]=[n]:t[i]=t[i]?t[i]+", "+n:n)})),t})(e),t);else if(a.a.isHeaders(e))for(const[t,n]of e.entries())r(n,t,i);else null!=e&&r(t,e,i);return this}get(e,t){if(e=R(e)){const i=a.a.findKey(this,e);if(i){const e=this[i];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=i.exec(e);)t[n[1]]=n[2];return t}(e);if(a.a.isFunction(t))return t.call(this,e,i);if(a.a.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=R(e)){const i=a.a.findKey(this,e);return!(!i||void 0===this[i]||t&&!B(0,this[i],i,t))}return!1}delete(e,t){const i=this;let n=!1;function r(e){if(e=R(e)){const r=a.a.findKey(i,e);!r||t&&!B(0,i[r],r,t)||(delete i[r],n=!0)}}return a.a.isArray(e)?e.forEach(r):r(e),n}clear(e){const t=Object.keys(this);let i=t.length,n=!1;for(;i--;){const a=t[i];e&&!B(0,this[a],a,e,!0)||(delete this[a],n=!0)}return n}normalize(e){const t=this,i={};return a.a.forEach(this,(n,r)=>{const o=a.a.findKey(i,r);if(o)return t[o]=N(n),void delete t[r];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,i)=>t.toUpperCase()+i)}(r):String(r).trim();s!==r&&delete t[r],t[s]=N(n),i[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return a.a.forEach(this,(i,n)=>{null!=i&&!1!==i&&(t[n]=e&&a.a.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const i=new this(e);return t.forEach(e=>i.set(e)),i}static accessor(e){const t=(this[j]=this[j]={accessors:{}}).accessors,i=this.prototype;function n(e){const n=R(e);t[n]||(!function(e,t){const i=a.a.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+i,{value:function(e,i,a){return this[n].call(this,t,e,i,a)},configurable:!0})})}(i,e),t[n]=!0)}return a.a.isArray(e)?e.forEach(n):n(e),this}}F.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),a.a.reduceDescriptors(F.prototype,({value:e},t)=>{let i=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[i]=e}}}),a.a.freezeMethods(F);var k=F;function z(e,t){const i=this||I,n=t||i,r=k.from(n.headers);let o=n.data;return a.a.forEach(e,(function(e){o=e.call(i,o,r.normalize(),t?t.status:void 0)})),r.normalize(),o}function U(e){return!(!e||!e.__CANCEL__)}function V(e,t,i){u.call(this,null==e?"canceled":e,u.ERR_CANCELED,t,i),this.name="CanceledError"}a.a.inherits(V,u,{__CANCEL__:!0});var H=V;function G(e,t,i){const n=i.config.validateStatus;i.status&&n&&!n(i.status)?t(new u("Request failed with status code "+i.status,[u.ERR_BAD_REQUEST,u.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i)):e(i)}var Y=function(e,t){e=e||10;const i=new Array(e),n=new Array(e);let a,r=0,o=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),u=n[o];a||(a=l),i[r]=s,n[r]=l;let d=o,c=0;for(;d!==r;)c+=i[d++],d%=e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),l-a<t)return;const f=u&&l-u;return f?Math.round(1e3*c/f):void 0}};var W=function(e,t){let i,n,a=0,r=1e3/t;const o=(t,r=Date.now())=>{a=r,i=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-a;s>=r?o(e,t):(i=e,n||(n=setTimeout(()=>{n=null,o(i)},r-s)))},()=>i&&o(i)]};const q=(e,t,i=3)=>{let n=0;const a=Y(50,250);return W(i=>{const r=i.loaded,o=i.lengthComputable?i.total:void 0,s=r-n,l=a(s);n=r;e({loaded:r,total:o,progress:o?r/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&r<=o?(o-r)/l:void 0,event:i,lengthComputable:null!=o,[t?"download":"upload"]:!0})},i)},X=(e,t)=>{const i=null!=e;return[n=>t[0]({lengthComputable:i,total:e,loaded:n}),t[1]]},K=e=>(...t)=>a.a.asap(()=>e(...t));var J=M.hasStandardBrowserEnv?function(){const e=M.navigator&&/(msie|trident)/i.test(M.navigator.userAgent),t=document.createElement("a");let i;function n(i){let n=i;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return i=n(window.location.href),function(e){const t=a.a.isString(e)?n(e):e;return t.protocol===i.protocol&&t.host===i.host}}():function(){return!0},Z=M.hasStandardBrowserEnv?{write(e,t,i,n,r,o){const s=[e+"="+encodeURIComponent(t)];a.a.isNumber(i)&&s.push("expires="+new Date(i).toGMTString()),a.a.isString(n)&&s.push("path="+n),a.a.isString(r)&&s.push("domain="+r),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Q(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const $=e=>e instanceof k?{...e}:e;function ee(e,t){t=t||{};const i={};function n(e,t,i){return a.a.isPlainObject(e)&&a.a.isPlainObject(t)?a.a.merge.call({caseless:i},e,t):a.a.isPlainObject(t)?a.a.merge({},t):a.a.isArray(t)?t.slice():t}function r(e,t,i){return a.a.isUndefined(t)?a.a.isUndefined(e)?void 0:n(void 0,e,i):n(e,t,i)}function o(e,t){if(!a.a.isUndefined(t))return n(void 0,t)}function s(e,t){return a.a.isUndefined(t)?a.a.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function l(i,a,r){return r in t?n(i,a):r in e?n(void 0,i):void 0}const u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(e,t)=>r($(e),$(t),!0)};return a.a.forEach(Object.keys(Object.assign({},e,t)),(function(n){const o=u[n]||r,s=o(e[n],t[n],n);a.a.isUndefined(s)&&o!==l||(i[n]=s)})),i}var te=e=>{const t=ee({},e);let i,{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:l,auth:u}=t;if(t.headers=l=k.from(l),t.url=b(Q(t.baseURL,t.url),e.params,e.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),a.a.isFormData(n))if(M.hasStandardBrowserEnv||M.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(i=l.getContentType())){const[e,...t]=i?i.split(";").map(e=>e.trim()).filter(Boolean):[];l.setContentType([e||"multipart/form-data",...t].join("; "))}if(M.hasStandardBrowserEnv&&(r&&a.a.isFunction(r)&&(r=r(t)),r||!1!==r&&J(t.url))){const e=o&&s&&Z.read(s);e&&l.set(o,e)}return t};var ie="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,i){const n=te(e);let r=n.data;const o=k.from(n.headers).normalize();let s,l,d,c,f,{responseType:h,onUploadProgress:p,onDownloadProgress:m}=n;function _(){c&&c(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function v(){if(!g)return;const n=k.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());G((function(e){t(e),_()}),(function(e){i(e),_()}),{data:h&&"text"!==h&&"json"!==h?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(i(new u("Request aborted",u.ECONNABORTED,e,g)),g=null)},g.onerror=function(){i(new u("Network Error",u.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const a=n.transitional||O;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),i(new u(t,a.clarifyTimeoutError?u.ETIMEDOUT:u.ECONNABORTED,e,g)),g=null},void 0===r&&o.setContentType(null),"setRequestHeader"in g&&a.a.forEach(o.toJSON(),(function(e,t){g.setRequestHeader(t,e)})),a.a.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),h&&"json"!==h&&(g.responseType=n.responseType),m&&([d,f]=q(m,!0),g.addEventListener("progress",d)),p&&g.upload&&([l,c]=q(p),g.upload.addEventListener("progress",l),g.upload.addEventListener("loadend",c)),(n.cancelToken||n.signal)&&(s=t=>{g&&(i(!t||t.type?new H(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);y&&-1===M.protocols.indexOf(y)?i(new u("Unsupported protocol "+y+":",u.ERR_BAD_REQUEST,e)):g.send(r||null)}))};var ne=(e,t)=>{const{length:i}=e=e?e.filter(Boolean):[];if(t||i){let i,n=new AbortController;const r=function(e){if(!i){i=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof u?t:new H(t instanceof Error?t.message:t))}};let o=t&&setTimeout(()=>{o=null,r(new u(`timeout ${t} of ms exceeded`,u.ETIMEDOUT))},t);const s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(r):e.removeEventListener("abort",r)}),e=null)};e.forEach(e=>e.addEventListener("abort",r));const{signal:l}=n;return l.unsubscribe=()=>a.a.asap(s),l}};const ae=function*(e,t){let i=e.byteLength;if(!t||i<t)return void(yield e);let n,a=0;for(;a<i;)n=a+t,yield e.slice(a,n),a=n},re=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:i}=await t.read();if(e)break;yield i}}finally{await t.cancel()}},oe=(e,t,i,n)=>{const a=async function*(e,t){for await(const i of re(e))yield*ae(i,t)}(e,t);let r,o=0,s=e=>{r||(r=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await a.next();if(t)return s(),void e.close();let r=n.byteLength;if(i){let e=o+=r;i(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},se="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,le=se&&"function"==typeof ReadableStream,ue=se&&("function"==typeof TextEncoder?(de=new TextEncoder,e=>de.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var de;const ce=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},fe=le&&ce(()=>{let e=!1;const t=new Request(M.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),he=le&&ce(()=>a.a.isReadableStream(new Response("").body)),pe={stream:he&&(e=>e.body)};var me;se&&(me=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!pe[e]&&(pe[e]=a.a.isFunction(me[e])?t=>t[e]():(t,i)=>{throw new u(`Response type '${e}' is not supported`,u.ERR_NOT_SUPPORT,i)})}));const _e=async(e,t)=>{const i=a.a.toFiniteNumber(e.getContentLength());return null==i?(async e=>{if(null==e)return 0;if(a.a.isBlob(e))return e.size;if(a.a.isSpecCompliantForm(e)){const t=new Request(M.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return a.a.isArrayBufferView(e)||a.a.isArrayBuffer(e)?e.byteLength:(a.a.isURLSearchParams(e)&&(e+=""),a.a.isString(e)?(await ue(e)).byteLength:void 0)})(t):i};const ge={http:null,xhr:ie,fetch:se&&(async e=>{let{url:t,method:i,data:n,signal:r,cancelToken:o,timeout:s,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:f,withCredentials:h="same-origin",fetchOptions:p}=te(e);c=c?(c+"").toLowerCase():"text";let m,_=ne([r,o&&o.toAbortSignal()],s);const g=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let v;try{if(d&&fe&&"get"!==i&&"head"!==i&&0!==(v=await _e(f,n))){let e,i=new Request(t,{method:"POST",body:n,duplex:"half"});if(a.a.isFormData(n)&&(e=i.headers.get("content-type"))&&f.setContentType(e),i.body){const[e,t]=X(v,q(K(d)));n=oe(i.body,65536,e,t)}}a.a.isString(h)||(h=h?"include":"omit");const r="credentials"in Request.prototype;m=new Request(t,{...p,signal:_,method:i.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:r?h:void 0});let o=await fetch(m);const s=he&&("stream"===c||"response"===c);if(he&&(l||s&&g)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=o[t]});const t=a.a.toFiniteNumber(o.headers.get("content-length")),[i,n]=l&&X(t,q(K(l),!0))||[];o=new Response(oe(o.body,65536,i,()=>{n&&n(),g&&g()}),e)}c=c||"text";let u=await pe[a.a.findKey(pe,c)||"text"](o,e);return!s&&g&&g(),await new Promise((t,i)=>{G(t,i,{data:u,headers:k.from(o.headers),status:o.status,statusText:o.statusText,config:e,request:m})})}catch(t){if(g&&g(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new u("Network Error",u.ERR_NETWORK,e,m),{cause:t.cause||t});throw u.from(t,t&&t.code,e,m)}})};a.a.forEach(ge,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const ve=e=>"- "+e,ye=e=>a.a.isFunction(e)||null===e||!1===e;var be=e=>{e=a.a.isArray(e)?e:[e];const{length:t}=e;let i,n;const r={};for(let a=0;a<t;a++){let t;if(i=e[a],n=i,!ye(i)&&(n=ge[(t=String(i)).toLowerCase()],void 0===n))throw new u(`Unknown adapter '${t}'`);if(n)break;r[t||"#"+a]=n}if(!n){const e=Object.entries(r).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let i=t?e.length>1?"since :\n"+e.map(ve).join("\n"):" "+ve(e[0]):"as no adapter specified";throw new u("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n};function we(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new H(null,e)}function Oe(e){we(e),e.headers=k.from(e.headers),e.data=z.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return be(e.adapter||I.adapter)(e).then((function(t){return we(e),t.data=z.call(e,e.transformResponse,t),t.headers=k.from(t.headers),t}),(function(t){return U(t)||(we(e),t&&t.response&&(t.response.data=z.call(e,e.transformResponse,t.response),t.response.headers=k.from(t.response.headers))),Promise.reject(t)}))}const xe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xe[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const Ae={};xe.transitional=function(e,t,i){function n(e,t){return"[Axios v1.7.7] Transitional option '"+e+"'"+t+(i?". "+i:"")}return(i,a,r)=>{if(!1===e)throw new u(n(a," has been removed"+(t?" in "+t:"")),u.ERR_DEPRECATED);return t&&!Ae[a]&&(Ae[a]=!0,console.warn(n(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,a,r)}};var Te={assertOptions:function(e,t,i){if("object"!=typeof e)throw new u("options must be an object",u.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const r=n[a],o=t[r];if(o){const t=e[r],i=void 0===t||o(t,r,e);if(!0!==i)throw new u("option "+r+" must be "+i,u.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new u("Unknown option "+r,u.ERR_BAD_OPTION)}},validators:xe};const Ee=Te.validators;class Ce{constructor(e){this.defaults=e,this.interceptors={request:new w,response:new w}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const i=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?i&&!String(e.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+i):e.stack=i}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ee(this.defaults,t);const{transitional:i,paramsSerializer:n,headers:r}=t;void 0!==i&&Te.assertOptions(i,{silentJSONParsing:Ee.transitional(Ee.boolean),forcedJSONParsing:Ee.transitional(Ee.boolean),clarifyTimeoutError:Ee.transitional(Ee.boolean)},!1),null!=n&&(a.a.isFunction(n)?t.paramsSerializer={serialize:n}:Te.assertOptions(n,{encode:Ee.function,serialize:Ee.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=r&&a.a.merge(r.common,r[t.method]);r&&a.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete r[e]}),t.headers=k.concat(o,r);const s=[];let l=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(l=l&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let d;this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)}));let c,f=0;if(!l){const e=[Oe.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),c=e.length,d=Promise.resolve(t);f<c;)d=d.then(e[f++],e[f++]);return d}c=s.length;let h=t;for(f=0;f<c;){const e=s[f++],t=s[f++];try{h=e(h)}catch(e){t.call(this,e);break}}try{d=Oe.call(this,h)}catch(e){return Promise.reject(e)}for(f=0,c=u.length;f<c;)d=d.then(u[f++],u[f++]);return d}getUri(e){return b(Q((e=ee(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}a.a.forEach(["delete","get","head","options"],(function(e){Ce.prototype[e]=function(t,i){return this.request(ee(i||{},{method:e,url:t,data:(i||{}).data}))}})),a.a.forEach(["post","put","patch"],(function(e){function t(t){return function(i,n,a){return this.request(ee(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}Ce.prototype[e]=t(),Ce.prototype[e+"Form"]=t(!0)}));var Se=Ce;class Me{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const i=this;this.promise.then(e=>{if(!i._listeners)return;let t=i._listeners.length;for(;t-- >0;)i._listeners[t](e);i._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{i.subscribe(e),t=e}).then(e);return n.cancel=function(){i.unsubscribe(t)},n},e((function(e,n,a){i.reason||(i.reason=new H(e,n,a),t(i.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Me((function(t){e=t})),cancel:e}}}var De=Me;const Pe={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Pe).forEach(([e,t])=>{Pe[t]=e});var Ie=Pe;const Le=function e(t){const i=new Se(t),n=Object(r.a)(Se.prototype.request,i);return a.a.extend(n,Se.prototype,i,{allOwnKeys:!0}),a.a.extend(n,i,null,{allOwnKeys:!0}),n.create=function(i){return e(ee(t,i))},n}(I);Le.Axios=Se,Le.CanceledError=H,Le.CancelToken=De,Le.isCancel=U,Le.VERSION="1.7.7",Le.toFormData=p,Le.AxiosError=u,Le.Cancel=Le.CanceledError,Le.all=function(e){return Promise.all(e)},Le.spread=function(e){return function(t){return e.apply(null,t)}},Le.isAxiosError=function(e){return a.a.isObject(e)&&!0===e.isAxiosError},Le.mergeConfig=ee,Le.AxiosHeaders=k,Le.formToJSON=e=>D(a.a.isHTMLForm(e)?new FormData(e):e),Le.getAdapter=be,Le.HttpStatusCode=Ie,Le.default=Le;var je=Le;i.d(t,"Axios",(function(){return Re})),i.d(t,"AxiosError",(function(){return Ne})),i.d(t,"CanceledError",(function(){return Be})),i.d(t,"isCancel",(function(){return Fe})),i.d(t,"CancelToken",(function(){return ke})),i.d(t,"VERSION",(function(){return ze})),i.d(t,"all",(function(){return Ue})),i.d(t,"Cancel",(function(){return Ve})),i.d(t,"isAxiosError",(function(){return He})),i.d(t,"spread",(function(){return Ge})),i.d(t,"toFormData",(function(){return Ye})),i.d(t,"AxiosHeaders",(function(){return We})),i.d(t,"HttpStatusCode",(function(){return qe})),i.d(t,"formToJSON",(function(){return Xe})),i.d(t,"getAdapter",(function(){return Ke})),i.d(t,"mergeConfig",(function(){return Je})),i.d(t,"default",(function(){return je}));const{Axios:Re,AxiosError:Ne,CanceledError:Be,isCancel:Fe,CancelToken:ke,VERSION:ze,all:Ue,Cancel:Ve,isAxiosError:He,spread:Ge,toFormData:Ye,AxiosHeaders:We,HttpStatusCode:qe,formToJSON:Xe,getAdapter:Ke,mergeConfig:Je}=je}])}));