????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/52.2a6a80308bef7f753b65.js |
(function(){var e={"esri/views/3d/layers/i3s/LEPCC":"1RVI","esri/core/libs/gl-matrix-2/quat":"EuvN","esri/views/3d/layers/i3s/PointCloudWorkerUtil":"NNdt","esri/core/libs/gl-matrix-2/factories/quatf64":"SgdR","esri/views/3d/layers/i3s/I3SBinaryReader":"W2ph","esri/core/libs/gl-matrix-2/math/vec4":"bH65","esri/core/libs/gl-matrix-2/quatf32":"fdzS","esri/core/libs/gl-matrix-2/factories/quatf32":"gKSc","esri/core/libs/gl-matrix-2/factories/vec3f32":"iHt0","esri/core/libs/gl-matrix-2/vec3f32":"vlC2","esri/views/3d/layers/PointCloudWorker":"wCvz","esri/core/libs/gl-matrix-2/math/quat":"weYu","esri/core/libs/gl-matrix-2/factories/mat3f64":"xf8T"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[52],{"1RVI":function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("ma1f")],void 0===(o=(function(e,t,r){function n(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+0,10)),version:t.getUint16(r+10,!0),checksum:t.getUint32(r+12,!0)}}function o(e,t,r){var n=[];t=a(e,t,n);for(var o=[],i=0;i<n.length;i++){o.length=0,t=a(e,t,o);for(var u=0;u<o.length;u++)r.push(o[u]+n[i])}return t}function a(e,t,n){var o=new DataView(e,t),a=o.getUint8(0),i=31&a,u=!!(32&a),c=(192&a)>>6,l=0;if(0===c)l=o.getUint32(1,!0),t+=5;else if(1===c)l=o.getUint16(1,!0),t+=3;else{if(2!==c)throw new r("lepcc-decode-error","Bad count type");l=o.getUint8(1),t+=2}if(u)throw new r("lepcc-decode-error","LUT not implemented");for(var s=Math.ceil(l*i/8),f=new Uint8Array(e,t,s),d=0,v=0,h=0,p=-1>>>32-i,y=0;y<l;y++){for(;v<i;)d|=f[h]<<v,v+=8,h+=1;n[y]=d&p,d>>>=i,(v-=i)+i>32&&(d|=f[h-1]>>8-v)}return t+h}Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXYZ=function(e){var t=new DataView(e,0),a=0,i=n(e,t,a),u=i.version;if(a+=16,"LEPCC "!==i.identifier)throw new r("lepcc-decode-error","Bad identifier");if(u>1)throw new r("lepcc-decode-error","Unknown version");var c=function(e,t){return{sizeLo:e.getUint32(t+0,!0),sizeHi:e.getUint32(t+4,!0),minX:e.getFloat64(t+8,!0),minY:e.getFloat64(t+16,!0),minZ:e.getFloat64(t+24,!0),maxX:e.getFloat64(t+32,!0),maxY:e.getFloat64(t+40,!0),maxZ:e.getFloat64(t+48,!0),errorX:e.getFloat64(t+56,!0),errorY:e.getFloat64(t+64,!0),errorZ:e.getFloat64(t+72,!0),count:e.getUint32(t+80,!0),reserved:e.getUint32(t+84,!0)}}(t,a);if(a+=88,c.sizeHi*Math.pow(2,32)+c.sizeLo!==e.byteLength)throw new r("lepcc-decode-error","Bad size");var l=new Float64Array(3*c.count),s=[],f=[],d=[],v=[];if(a=o(e,a,s),a=o(e,a,f),a=o(e,a,d),(a=o(e,a,v))!==e.byteLength)throw new r("lepcc-decode-error","Bad length");for(var h=0,p=0,y=0;y<s.length;y++){p+=s[y];for(var b=0,g=0;g<f[y];g++){var w=v[h];l[3*h]=Math.min(c.maxX,c.minX+2*c.errorX*(b+=d[h])),l[3*h+1]=Math.min(c.maxY,c.minY+2*c.errorY*p),l[3*h+2]=Math.min(c.maxZ,c.minZ+2*c.errorZ*w),h++}}return{errorX:c.errorX,errorY:c.errorY,errorZ:c.errorZ,result:l}},t.decodeRGB=function(e){var t=new DataView(e,0),o=0,a=n(e,t,o),i=a.version;if(o+=16,"ClusterRGB"!==a.identifier)throw new r("lepcc-decode-error","Bad identifier");if(i>1)throw new r("lepcc-decode-error","Unknown version");var u=function(e,t){return{sizeLo:e.getUint32(t+0,!0),sizeHi:e.getUint32(t+4,!0),count:e.getUint32(t+8,!0),colorMapCount:e.getUint16(t+12,!0),lookupMethod:e.getUint8(t+14),compressionMethod:e.getUint8(t+15)}}(t,o);if(o+=16,u.sizeHi*Math.pow(2,32)+u.sizeLo!==e.byteLength)throw new r("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+o!==e.byteLength||u.colorMapCount>256)throw new r("lepcc-decode-error","Bad count");for(var c=new Uint8Array(e,o,3*u.colorMapCount),l=new Uint8Array(e,o+3*u.colorMapCount,u.count),s=new Uint8Array(3*u.count),f=0;f<u.count;f++){var d=l[f];s[3*f]=c[3*d],s[3*f+1]=c[3*d+1],s[3*f+2]=c[3*d+2]}return s}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+o!==e.byteLength||0!==u.colorMapCount)throw new r("lepcc-decode-error","Bad count");return new Uint8Array(e,o).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(o+3!==e.byteLength||1!==u.colorMapCount)throw new r("lepcc-decode-error","Bad count");var v=t.getUint8(o),h=t.getUint8(o+1),p=t.getUint8(o+2);for(s=new Uint8Array(3*u.count),f=0;f<u.count;f++)s[3*f]=v,s[3*f+1]=h,s[3*f+2]=p;return s}throw new r("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)},t.decodeIntensity=function(e){var t=new DataView(e,0),o=0,i=n(e,t,o),u=i.version;if(o+=16,"Intensity "!==i.identifier)throw new r("lepcc-decode-error","Bad identifier");if(u>1)throw new r("lepcc-decode-error","Unknown version");var c=function(e,t){return{sizeLo:e.getUint32(t+0,!0),sizeHi:e.getUint32(t+4,!0),count:e.getUint32(t+8,!0),scaleFactor:e.getUint16(t+12,!0),bitsPerPoint:e.getUint8(t+14),reserved:e.getUint8(t+15)}}(t,o);if(o+=16,c.sizeHi*Math.pow(2,32)+c.sizeLo!==e.byteLength)throw new r("lepcc-decode-error","Bad size");var l=new Uint16Array(c.count);if(8===c.bitsPerPoint){if(c.count+o!==e.byteLength)throw new r("lepcc-decode-error","Bad size");for(var s=new Uint8Array(e,o,c.count),f=0;f<c.count;f++)l[f]=s[f]*c.scaleFactor}else if(16===c.bitsPerPoint){if(2*c.count+o!==e.byteLength)throw new r("lepcc-decode-error","Bad size");for(s=new Uint16Array(e,o,c.count),f=0;f<c.count;f++)l[f]=s[f]*c.scaleFactor}else{if(a(e,o,s=[])!==e.byteLength)throw new r("lepcc-decode-error","Bad size");for(f=0;f<c.count;f++)l[f]=s[f]*c.scaleFactor}return l}}).apply(null,n))||(e.exports=o)},EuvN:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("weYu")],void 0===(o=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.quat=r}).apply(null,n))||(e.exports=o)},NNdt:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("LxLY"),r("O0KB"),r("qasq"),r("mkxQ"),r("W2ph"),r("1RVI")],void 0===(o=(function(e,t,r,n,o,a,i,u){function c(e,t){for(var r=new Float64Array(t),n=0;n<t;n++)r[n]=e[3*n+2];return r}function l(e){return null==e||"none"===e?null:"low-four-bit"===e?function(e){return 15&e}:"high-four-bit"===e?function(e){return(240&e)>>4}:"absolute-value"===e?function(e){return Math.abs(e)}:"modulo-ten"===e?function(e){return e%10}:null}function s(e){for(var t=0,r=0,n=e||[];r<n.length;r++)t|=1<<n[r];return t}Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateRenderer=function(e,t,r,i){var u=e.rendererJSON,c=null,s=null;if(t&&e.isRGBRenderer)c=t;else if(t&&"pointCloudUniqueValueRenderer"===u.type){var f=(s=a.fromJSON(u)).colorUniqueValueInfos;c=new Uint8Array(3*i);for(var d=l(s.fieldTransformType),v=0;v<i;v++)for(var h=(b=d?d(t[v]):t[v])+"",p=0;p<f.length;p++)if(f[p].values.indexOf(h)>=0){c[3*v]=f[p].color.r,c[3*v+1]=f[p].color.g,c[3*v+2]=f[p].color.b;break}}else if(t&&"pointCloudStretchRenderer"===u.type){var y=(s=o.fromJSON(u)).stops;for(c=new Uint8Array(3*i),d=l(s.fieldTransformType),v=0;v<i;v++){var b=d?d(t[v]):t[v],g=y.length-1;if(b<y[0].value)c[3*v]=y[0].color.r,c[3*v+1]=y[0].color.g,c[3*v+2]=y[0].color.b;else if(b>=y[g].value)c[3*v]=y[g].color.r,c[3*v+1]=y[g].color.g,c[3*v+2]=y[g].color.b;else for(p=1;p<y.length;p++)if(b<y[p].value){var w=(b-y[p-1].value)/(y[p].value-y[p-1].value);c[3*v]=y[p].color.r*w+y[p-1].color.r*(1-w),c[3*v+1]=y[p].color.g*w+y[p-1].color.g*(1-w),c[3*v+2]=y[p].color.b*w+y[p-1].color.b*(1-w);break}}}else if(t&&"pointCloudClassBreaksRenderer"===u.type){var m=(s=n.fromJSON(u)).colorClassBreakInfos;for(c=new Uint8Array(3*i),d=l(s.fieldTransformType),v=0;v<i;v++)for(b=d?d(t[v]):t[v],p=0;p<m.length;p++)if(b>=m[p].minValue&&b<=m[p].maxValue){c[3*v]=m[p].color.r,c[3*v+1]=m[p].color.g,c[3*v+2]=m[p].color.b;break}}else for(c=new Uint8Array(3*i),v=0;v<c.length;v++)c[v]=255;if(r&&s&&s.colorModulation){var M=s.colorModulation.minValue,A=s.colorModulation.maxValue;for(v=0;v<i;v++){var I=(b=r[v])>=A?1:b<=M?.3:.3+.7*(b-M)/(A-M);c[3*v]=I*c[3*v],c[3*v+1]=I*c[3*v+1],c[3*v+2]=I*c[3*v+2]}}return c},t.readGeometry=function(e,t){if(null==e.encoding||""===e.encoding){var n=i.createGeometryIndexFromSchema(t,e);if(r.isNone(n.vertexAttributes.position))return;for(var o=i.createTypedView(t,n.vertexAttributes.position),a=n.header.fields,c=[a.offsetX,a.offsetY,a.offsetZ],l=[a.scaleX,a.scaleY,a.scaleZ],s=o.length/3,f=new Float64Array(3*s),d=0;d<s;d++)f[3*d]=o[3*d]*l[0]+c[0],f[3*d+1]=o[3*d+1]*l[1]+c[1],f[3*d+2]=o[3*d+2]*l[2]+c[2];return f}if("lepcc-xyz"===e.encoding)return u.decodeXYZ(t).result},t.getAttributeValues=function(e,t,n){return r.isSome(e)&&e.attributeInfo.useElevation?c(t,n):r.isSome(e)?i.readBinaryAttribute(e.attributeInfo.storageInfo,e.buffer,n):null},t.elevationFromPositions=c,t.filterInPlace=function(e,t,r,n,o){for(var a=e.length/3,i=0,u=0;u<a;u++){for(var c=!0,l=0;l<n.length&&c;l++){var f=n[l].filterJSON,d=o[l].values[u];switch(f.type){case"pointCloudValueFilter":var v="exclude"===f.mode;-1!==f.values.indexOf(d)===v&&(c=!1);break;case"pointCloudBitfieldFilter":var h=s(f.requiredSetBits),p=s(f.requiredClearBits);(d&h)===h&&0==(d&p)||(c=!1);break;case"pointCloudReturnFilter":for(var y=15&d,b=d>>>4&15,g=b>1,w=1===y,m=y===b,M=!1,A=0,I=f.includedReturns;A<I.length;A++){var x=I[A];if("last"===x&&m||"firstOfMany"===x&&w&&g||"lastOfMany"===x&&m&&g||"single"===x&&!g){M=!0;break}}M||(c=!1)}}c&&(r[i]=u,e[3*i]=e[3*u],e[3*i+1]=e[3*u+1],e[3*i+2]=e[3*u+2],t[3*i]=t[3*u],t[3*i+1]=t[3*u+1],t[3*i+2]=t[3*u+2],i++)}return i}}).apply(null,n))||(e.exports=o)},SgdR:function(e,t,r){var n,o;n=[r.dj.c(e.i),t],void 0===(o=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(){return[0,0,0,1]},t.clone=function(e){return[e[0],e[1],e[2],e[3]]},t.fromValues=function(e,t,r,n){return[e,t,r,n]},t.createView=function(e,t){return new Float64Array(e,t,4)},t.IDENTITY=[0,0,0,1]}).apply(null,n))||(e.exports=o)},W2ph:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("zOht"),r("ma1f"),r("rg9i"),r("qsST"),r("1RVI")],void 0===(o=(function(e,t,r,n,o,a,i){Object.defineProperty(t,"__esModule",{value:!0});var u=a.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(e,t,r){for(var o="",a=0;a<r;){var i=e[t+a];if(i<128)o+=String.fromCharCode(i),a++;else if(i>=192&&i<224){if(a+1>=r)throw new n("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");var u=(31&i)<<6|63&e[t+a+1];o+=String.fromCharCode(u),a+=2}else if(i>=224&&i<240){if(a+2>=r)throw new n("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");u=(15&i)<<12|(63&e[t+a+1])<<6|63&e[t+a+2],o+=String.fromCharCode(u),a+=3}else{if(!(i>=240&&i<248))throw new n("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");if(a+3>=r)throw new n("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");(u=(7&i)<<18|(63&e[t+a+1])<<12|(63&e[t+a+2])<<6|63&e[t+a+3])>=65536?o+=String.fromCharCode(55296+(u-65536>>10),56320+(1023&u)):o+=String.fromCharCode(u),a+=4}}return o}function l(e,r){for(var n={byteOffset:0,byteCount:0,fields:Object.create(null)},o=0,a=0;a<r.length;a++){var i=r[a],u=i.valueType||i.type;n.fields[i.property]=(0,t.valueType2ArrayBufferReader[u])(e,o),o+=t.valueType2TypedArrayClassMap[u].BYTES_PER_ELEMENT}return n.byteCount=o,n}function s(e,t,r){var o,a,i=[],u=0;for(a=0;a<e;a+=1){if((o=t[a])>0){if(i.push(c(r,u,o-1)),0!==r[u+o-1])throw new n("string-array-error","Invalid string array: missing null termination.")}else i.push(null);u+=o}return i}function f(e,r){return new(0,t.valueType2TypedArrayClassMap[r.valueType])(e,r.byteOffset,r.count*r.valuesPerElement)}function d(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}function v(e,t,r){for(var a=null!=t.header?l(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},i={header:a,byteOffset:a.byteCount,byteCount:0,entries:Object.create(null)},u=a.byteCount,c=0;c<t.ordering.length;c++){var s=t.ordering[c],f=o.clone(t[s]);if(f.count=a.fields.count,"String"===f.valueType){if(f.byteOffset=u,f.byteCount=a.fields[s+"ByteCount"],"UTF-8"!==f.encoding)throw new n("unsupported-encoding","Unsupported String encoding.",{encoding:f.encoding})}else{if(!w(f.valueType))throw new n("unsupported-value-type","Unsupported binary valueType",{valueType:f.valueType});var d=m(f.valueType);f.byteOffset=u+=u%d!=0?d-u%d:0,f.byteCount=d*f.valuesPerElement*f.count}u+=f.byteCount,i.entries[s]=f}return i.byteCount=u-i.byteOffset,i}function h(e,t,r){if(t!==e&&u.error("Invalid "+r+" buffer size\n expected: "+e+", actual: "+t+")"),t<e)throw new n("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function p(e){return{isDraco:!1,isLegacy:!1,color:null!=e.color,normal:null!=e.normal,uv0:null!=e.uv0,uvRegion:null!=e.uvRegion,featureIndex:null!=e.faceRange&&null!=e.featureId}}function y(e){for(var t={isDraco:!1,isLegacy:!0,color:!1,normal:!1,uv0:!1,uvRegion:!1,featureIndex:!1},r=0,n=e.ordering;r<n.length;r++){var o=n[r];if(e.vertexAttributes[o])switch(o){case"position":break;case"normal":t.normal=!0;break;case"color":t.color=!0;break;case"uv0":t.uv0=!0;break;case"region":t.uvRegion=!0}}return e.featureAttributes&&e.featureAttributeOrder&&(t.featureIndex=!0),t}function b(e){for(var t={isDraco:!0,isLegacy:!1,color:!1,normal:!1,uv0:!1,uvRegion:!1,featureIndex:!1},r=0,n=e;r<n.length;r++)switch(n[r]){case"position":break;case"normal":t.normal=!0;break;case"uv0":t.uv0=!0;break;case"color":t.color=!0;break;case"uv-region":t.uvRegion=!0;break;case"feature-index":t.featureIndex=!0}return t}t.readHeader=l,t.readStringArray=s,t.createTypedView=f,t.createRawView=d,t.createAttributeDataIndex=v,t.createGeometryDescriptorFromDefinition=p,t.createGeometryIndexFromSchema=function(e,t){for(var n=l(e,t&&t.header),o=n.byteCount,a={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,u=null!=i.vertexCount?i.vertexCount:i.count,c=0,s=t.ordering;c<s.length;c++){var f=s[c];if(t.vertexAttributes[f]){var d=r.__assign(r.__assign({},t.vertexAttributes[f]),{byteOffset:o,count:u});a.vertexAttributes[g[f]?g[f]:"_"+f]=d,o+=m(d.valueType)*d.valuesPerElement*u}}var v=i.faceCount;if(t.faces&&v){a.faces={};for(var p=0,y=t.ordering;p<y.length;p++){var b=y[p];t.faces[b]&&(d=r.__assign(r.__assign({},t.faces[b]),{byteOffset:o,count:v}),a.faces[b]=d,o+=m(d.valueType)*d.valuesPerElement*v)}}var w=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&w){a.featureAttributes={};for(var M=0,A=t.featureAttributeOrder;M<A.length;M++){var I=A[M];t.featureAttributes[I]&&(d=r.__assign(r.__assign({},t.featureAttributes[I]),{byteOffset:o,count:w}),a.featureAttributes[I]=d,o+=("UInt64"===d.valueType?8:m(d.valueType))*d.valuesPerElement*w)}}return h(o,e.byteLength,"geometry"),a.byteCount=o-a.byteOffset,a},t.createGeometryDescriptor=function(e,t){return e&&e.compressedAttributes&&"draco"===e.compressedAttributes.encoding?b(e.compressedAttributes.attributes):e?p(e):y(t)},t.createGeometryDescriptorFromSchema=y,t.createGeometryDescriptorForDraco=b;var g={position:"position",normal:"normal",color:"color",uv0:"uv0",region:"uvRegion"};function w(e){return t.valueType2TypedArrayClassMap.hasOwnProperty(e)}function m(e){return w(e)?t.valueType2TypedArrayClassMap[e].BYTES_PER_ELEMENT:0}t.readBinaryAttribute=function(e,t,r){if("lepcc-rgb"===e.encoding)return i.decodeRGB(t);if("lepcc-intensity"===e.encoding)return i.decodeIntensity(t);if(null!=e.encoding&&""!==e.encoding)throw new n("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");var o=v(t,e,r);h(o.byteOffset+o.byteCount,t.byteLength,"attribute");var a=o.entries.attributeValues||o.entries.objectIds;if(a){if("String"===a.valueType){var c=o.entries.attributeByteCounts,l=f(t,c),p=d(t,a);return s(c.count,l,p)}return f(t,a)}throw new n("bad-attribute-storage-info","Bad attributeStorageInfo specification.")},t.valueType2TypedArrayClassMap={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},t.valueType2ArrayBufferReader={Float32:function(e,t){return new DataView(e,0).getFloat32(t,!0)},Float64:function(e,t){return new DataView(e,0).getFloat64(t,!0)},UInt8:function(e,t){return new DataView(e,0).getUint8(t)},Int8:function(e,t){return new DataView(e,0).getInt8(t)},UInt16:function(e,t){return new DataView(e,0).getUint16(t,!0)},Int16:function(e,t){return new DataView(e,0).getInt16(t,!0)},UInt32:function(e,t){return new DataView(e,0).getUint32(t,!0)},Int32:function(e,t){return new DataView(e,0).getInt32(t,!0)}},t.isValueType=w,t.getBytesPerValue=m}).apply(null,n))||(e.exports=o)},bH65:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("qysZ")],void 0===(o=(function(e,t,r){function n(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function o(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function a(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function i(e,t){var r=t[0]-e[0],n=t[1]-e[1],o=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+o*o+a*a)}function u(e,t){var r=t[0]-e[0],n=t[1]-e[1],o=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+o*o+a*a}function c(e){var t=e[0],r=e[1],n=e[2],o=e[3];return Math.sqrt(t*t+r*r+n*n+o*o)}function l(e){var t=e[0],r=e[1],n=e[2],o=e[3];return t*t+r*r+n*n+o*o}Object.defineProperty(t,"__esModule",{value:!0}),t.copy=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},t.set=function(e,t,r,n,o){return e[0]=t,e[1]=r,e[2]=n,e[3]=o,e},t.add=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e},t.subtract=n,t.multiply=o,t.divide=a,t.ceil=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},t.floor=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},t.min=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e},t.max=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e},t.round=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},t.scale=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},t.scaleAndAdd=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e},t.distance=i,t.squaredDistance=u,t.length=c,t.squaredLength=l,t.negate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},t.inverse=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},t.normalize=function(e,t){var r=t[0],n=t[1],o=t[2],a=t[3],i=r*r+n*n+o*o+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=n*i,e[2]=o*i,e[3]=a*i),e},t.dot=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},t.lerp=function(e,t,r,n){var o=t[0],a=t[1],i=t[2],u=t[3];return e[0]=o+n*(r[0]-o),e[1]=a+n*(r[1]-a),e[2]=i+n*(r[2]-i),e[3]=u+n*(r[3]-u),e},t.random=function(e,t){var n,o,a,i,u,c;t=t||1;do{u=(n=2*r.RANDOM()-1)*n+(o=2*r.RANDOM()-1)*o}while(u>=1);do{c=(a=2*r.RANDOM()-1)*a+(i=2*r.RANDOM()-1)*i}while(c>=1);var l=Math.sqrt((1-u)/c);return e[0]=t*n,e[1]=t*o,e[2]=t*a*l,e[3]=t*i*l,e},t.transformMat4=function(e,t,r){var n=t[0],o=t[1],a=t[2],i=t[3];return e[0]=r[0]*n+r[4]*o+r[8]*a+r[12]*i,e[1]=r[1]*n+r[5]*o+r[9]*a+r[13]*i,e[2]=r[2]*n+r[6]*o+r[10]*a+r[14]*i,e[3]=r[3]*n+r[7]*o+r[11]*a+r[15]*i,e},t.transformQuat=function(e,t,r){var n=t[0],o=t[1],a=t[2],i=r[0],u=r[1],c=r[2],l=r[3],s=l*n+u*a-c*o,f=l*o+c*n-i*a,d=l*a+i*o-u*n,v=-i*n-u*o-c*a;return e[0]=s*l+v*-i+f*-c-d*-u,e[1]=f*l+v*-u+d*-i-s*-c,e[2]=d*l+v*-c+s*-u-f*-i,e[3]=t[3],e},t.str=function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},t.exactEquals=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]},t.equals=function(e,t){var n=e[0],o=e[1],a=e[2],i=e[3],u=t[0],c=t[1],l=t[2],s=t[3];return Math.abs(n-u)<=r.EPSILON*Math.max(1,Math.abs(n),Math.abs(u))&&Math.abs(o-c)<=r.EPSILON*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(a-l)<=r.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(i-s)<=r.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))},t.sub=n,t.mul=o,t.div=a,t.dist=i,t.sqrDist=u,t.len=c,t.sqrLen=l}).apply(null,n))||(e.exports=o)},fdzS:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("gKSc")],void 0===(o=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.quatf32=r}).apply(null,n))||(e.exports=o)},gKSc:function(e,t,r){var n,o;n=[r.dj.c(e.i),t],void 0===(o=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(){var e=new Float32Array(4);return e[3]=1,e},t.clone=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},t.fromValues=function(e,t,r,n){var o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o},t.createView=function(e,t){return new Float32Array(e,t,4)}}).apply(null,n))||(e.exports=o)},iHt0:function(e,t,r){var n,o;n=[r.dj.c(e.i),t],void 0===(o=(function(e,t){function r(){return new Float32Array(3)}function n(e,t,r){var n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function o(){return r()}function a(){return n(1,1,1)}function i(){return n(1,0,0)}function u(){return n(0,1,0)}function c(){return n(0,0,1)}Object.defineProperty(t,"__esModule",{value:!0}),t.create=r,t.clone=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},t.fromValues=n,t.createView=function(e,t){return new Float32Array(e,t,3)},t.zeros=o,t.ones=a,t.unitX=i,t.unitY=u,t.unitZ=c,t.ZEROS=o(),t.ONES=a(),t.UNIT_X=i(),t.UNIT_Y=u(),t.UNIT_Z=c()}).apply(null,n))||(e.exports=o)},vlC2:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("iHt0")],void 0===(o=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.vec3f32=r}).apply(null,n))||(e.exports=o)},wCvz:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("LxLY"),r("qMld"),r("rusB"),r("EuvN"),r("fdzS"),r("0LE5"),r("vlC2"),r("Z4y+"),r("NNdt"),r("mmEe")],void 0===(o=(function(e,t,r,n,o,a,i,u,c,l,s,f){Object.defineProperty(t,"__esModule",{value:!0});var d=function(){function e(){}return e.prototype.transform=function(e){var t=this._transform(e),a=[t.points.buffer,t.rgb.buffer];r.isSome(t.pointIdFilterMap)&&a.push(t.pointIdFilterMap.buffer);for(var i=0,u=t.attributes;i<u.length;i++){var c=u[i];"buffer"in c.values&&o.isArrayBuffer(c.values.buffer)&&c.values.buffer!==t.rgb.buffer&&a.push(c.values.buffer)}return n.resolve({result:t,transferList:a})},e.prototype._transform=function(e){var t=s.readGeometry(e.schema,e.geometryBuffer),n=t.length/3,o=null,a=[],i=s.getAttributeValues(e.primaryAttributeData,t,n);r.isSome(e.primaryAttributeData)&&i&&a.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:i});var u=s.getAttributeValues(e.modulationAttributeData,t,n);r.isSome(e.modulationAttributeData)&&u&&a.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:u});var c=s.evaluateRenderer(e.rendererInfo,i,u,n);if(e.filterInfo&&e.filterInfo.length>0&&r.isSome(e.filterAttributesData)){var f=e.filterAttributesData.map((function(e){var r=s.getAttributeValues(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return a.push(o),o}));o=new Uint32Array(n),n=s.filterInPlace(t,c,o,e.filterInfo,f)}for(var d=0,v=e.userAttributesData;d<v.length;d++){var h=v[d],p=s.getAttributeValues(h,t,n);a.push({attributeInfo:h.attributeInfo,values:p})}3*n<c.length&&(c=new Uint8Array(c.buffer.slice(0,3*n))),this._applyElevationOffsetInPlace(t,n,e.elevationOffset);var y=this._transformCoordinates(t,n,e.obb,l.fromJSON(e.inSR),l.fromJSON(e.outSR));return{obb:e.obb,points:y,rgb:c,attributes:a,pointIdFilterMap:o}},e.prototype._transformCoordinates=function(e,t,r,n,o){if(!f.bufferToBuffer(e,n,0,e,o,0,t))throw Error("Can't reproject");var i=c.vec3f32.fromValues(r.center[0],r.center[1],r.center[2]),l=c.vec3f32.create(),s=c.vec3f32.create();a.quat.conjugate(v,r.quaternion);for(var d=new Float32Array(3*t),h=0;h<t;h++)l[0]=e[3*h]-i[0],l[1]=e[3*h+1]-i[1],l[2]=e[3*h+2]-i[2],u.vec3.transformQuat(s,l,v),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(s[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(s[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(s[2])),d[3*h]=l[0],d[3*h+1]=l[1],d[3*h+2]=l[2];return d},e.prototype._applyElevationOffsetInPlace=function(e,t,r){if(0!==r)for(var n=0;n<t;n++)e[3*n+2]+=r},e}(),v=i.quatf32.create();t.default=function(){return new d}}).apply(null,n))||(e.exports=o)},weYu:function(e,t,r){var n,o;n=[r.dj.c(e.i),t,r("xf8T"),r("SgdR"),r("jaBu"),r("qysZ"),r("VIrK"),r("bH65")],void 0===(o=(function(e,t,r,n,o,a,i,u){function c(e,t,r){r*=.5;var n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function l(e,t,r){var n=t[0],o=t[1],a=t[2],i=t[3],u=r[0],c=r[1],l=r[2],s=r[3];return e[0]=n*s+i*u+o*l-a*c,e[1]=o*s+i*c+a*u-n*l,e[2]=a*s+i*l+n*c-o*u,e[3]=i*s-n*u-o*c-a*l,e}function s(e,t,r,n){var o,i,u,c,l,s=t[0],f=t[1],d=t[2],v=t[3],h=r[0],p=r[1],y=r[2],b=r[3];return(i=s*h+f*p+d*y+v*b)<0&&(i=-i,h=-h,p=-p,y=-y,b=-b),1-i>a.EPSILON?(o=Math.acos(i),u=Math.sin(o),c=Math.sin((1-n)*o)/u,l=Math.sin(n*o)/u):(c=1-n,l=n),e[0]=c*s+l*h,e[1]=c*f+l*p,e[2]=c*d+l*y,e[3]=c*v+l*b,e}function f(e,t){var r,n=t[0]+t[4]+t[8];if(n>0)r=Math.sqrt(n+1),e[3]=.5*r,e[0]=(t[5]-t[7])*(r=.5/r),e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{var o=0;t[4]>t[0]&&(o=1),t[8]>t[3*o+o]&&(o=2);var a=(o+1)%3,i=(o+2)%3;r=Math.sqrt(t[3*o+o]-t[3*a+a]-t[3*i+i]+1),e[o]=.5*r,e[3]=(t[3*a+i]-t[3*i+a])*(r=.5/r),e[a]=(t[3*a+o]+t[3*o+a])*r,e[i]=(t[3*i+o]+t[3*o+i])*r}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.identity=function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},t.setAxisAngle=c,t.getAxisAngle=function(e,t){var r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>a.EPSILON?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r},t.multiply=l,t.rotateX=function(e,t,r){r*=.5;var n=t[0],o=t[1],a=t[2],i=t[3],u=Math.sin(r),c=Math.cos(r);return e[0]=n*c+i*u,e[1]=o*c+a*u,e[2]=a*c-o*u,e[3]=i*c-n*u,e},t.rotateY=function(e,t,r){r*=.5;var n=t[0],o=t[1],a=t[2],i=t[3],u=Math.sin(r),c=Math.cos(r);return e[0]=n*c-a*u,e[1]=o*c+i*u,e[2]=a*c+n*u,e[3]=i*c-o*u,e},t.rotateZ=function(e,t,r){r*=.5;var n=t[0],o=t[1],a=t[2],i=t[3],u=Math.sin(r),c=Math.cos(r);return e[0]=n*c+o*u,e[1]=o*c-n*u,e[2]=a*c+i*u,e[3]=i*c-a*u,e},t.calculateW=function(e,t){var r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},t.slerp=s,t.random=function(e){var t=a.RANDOM(),r=a.RANDOM(),n=a.RANDOM(),o=Math.sqrt(1-t),i=Math.sqrt(t);return e[0]=o*Math.sin(2*Math.PI*r),e[1]=o*Math.cos(2*Math.PI*r),e[2]=i*Math.sin(2*Math.PI*n),e[3]=i*Math.cos(2*Math.PI*n),e},t.invert=function(e,t){var r=t[0],n=t[1],o=t[2],a=t[3],i=r*r+n*n+o*o+a*a,u=i?1/i:0;return e[0]=-r*u,e[1]=-n*u,e[2]=-o*u,e[3]=a*u,e},t.conjugate=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e},t.fromMat3=f,t.fromEuler=function(e,t,r,n){var o=.5*Math.PI/180;t*=o,r*=o,n*=o;var a=Math.sin(t),i=Math.cos(t),u=Math.sin(r),c=Math.cos(r),l=Math.sin(n),s=Math.cos(n);return e[0]=a*c*s-i*u*l,e[1]=i*u*s+a*c*l,e[2]=i*c*l-a*u*s,e[3]=i*c*s+a*u*l,e},t.str=function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},t.copy=u.copy,t.set=u.set,t.add=u.add,t.mul=l,t.scale=u.scale,t.dot=u.dot,t.lerp=u.lerp,t.length=u.length,t.len=t.length,t.squaredLength=u.squaredLength,t.sqrLen=t.squaredLength,t.normalize=u.normalize,t.exactEquals=u.exactEquals,t.equals=u.equals,t.rotationTo=function(e,r,n){var o=i.dot(r,n);return o<-.999999?(i.cross(d,v,r),i.len(d)<1e-6&&i.cross(d,h,r),i.normalize(d,d),c(e,d,Math.PI),e):o>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):(i.cross(d,r,n),e[0]=d[0],e[1]=d[1],e[2]=d[2],e[3]=1+o,t.normalize(e,e))};var d=o.create(),v=o.fromValues(1,0,0),h=o.fromValues(0,1,0);t.sqlerp=function(e,t,r,n,o,a){return s(p,t,o,a),s(y,r,n,a),s(e,p,y,2*a*(1-a)),e};var p=n.create(),y=n.create();t.setAxes=function(e,r,n,o){var a=b;return a[0]=n[0],a[3]=n[1],a[6]=n[2],a[1]=o[0],a[4]=o[1],a[7]=o[2],a[2]=-r[0],a[5]=-r[1],a[8]=-r[2],t.normalize(e,f(e,a))};var b=r.create()}).apply(null,n))||(e.exports=o)},xf8T:function(e,t,r){var n,o;n=[r.dj.c(e.i),t],void 0===(o=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.create=function(){return[1,0,0,0,1,0,0,0,1]},t.clone=function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},t.fromValues=function(e,t,r,n,o,a,i,u,c){return[e,t,r,n,o,a,i,u,c]},t.createView=function(e,t){return new Float64Array(e,t,9)}}).apply(null,n))||(e.exports=o)}}]);