12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-33bd1f4e"],{"05ff":function(e,t,o){"use strict";o.d(t,"a",(function(){return f})),o.d(t,"b",(function(){return l})),o.d(t,"c",(function(){return b})),o.d(t,"d",(function(){return d})),o.d(t,"e",(function(){return u}));var r=o("b2b2"),n=o("4e0d"),i=o("578b"),a=o("a1f7"),s=o("ad64"),c=o("d207");function l(e,t,o,r){const{rendererJSON:s,isRGBRenderer:c}=e;let l=null,u=null;if(t&&c)l=t;else if(t&&"pointCloudUniqueValueRenderer"===s.type){u=a["a"].fromJSON(s);const e=u.colorUniqueValueInfos;l=new Uint8Array(3*r);const o=p(u.fieldTransformType);for(let n=0;n<r;n++){const r=(o?o(t[n]):t[n])+"";for(let t=0;t<e.length;t++)if(e[t].values.indexOf(r)>=0){l[3*n]=e[t].color.r,l[3*n+1]=e[t].color.g,l[3*n+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===s.type){u=i["a"].fromJSON(s);const e=u.stops;l=new Uint8Array(3*r);const o=p(u.fieldTransformType);for(let n=0;n<r;n++){const r=o?o(t[n]):t[n],i=e.length-1;if(r<e[0].value)l[3*n]=e[0].color.r,l[3*n+1]=e[0].color.g,l[3*n+2]=e[0].color.b;else if(r>=e[i].value)l[3*n]=e[i].color.r,l[3*n+1]=e[i].color.g,l[3*n+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const o=(r-e[t-1].value)/(e[t].value-e[t-1].value);l[3*n]=e[t].color.r*o+e[t-1].color.r*(1-o),l[3*n+1]=e[t].color.g*o+e[t-1].color.g*(1-o),l[3*n+2]=e[t].color.b*o+e[t-1].color.b*(1-o);break}}}else if(t&&"pointCloudClassBreaksRenderer"===s.type){u=n["a"].fromJSON(s);const e=u.colorClassBreakInfos;l=new Uint8Array(3*r);const o=p(u.fieldTransformType);for(let n=0;n<r;n++){const r=o?o(t[n]):t[n];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){l[3*n]=e[t].color.r,l[3*n+1]=e[t].color.g,l[3*n+2]=e[t].color.b;break}}}else{l=new Uint8Array(3*r);for(let e=0;e<l.length;e++)l[e]=255}if(o&&u&&u.colorModulation){const e=u.colorModulation.minValue,t=u.colorModulation.maxValue,n=.3;for(let i=0;i<r;i++){const r=o[i],a=r>=t?1:r<=e?n:n+(1-n)*(r-e)/(t-e);l[3*i]=a*l[3*i],l[3*i+1]=a*l[3*i+1],l[3*i+2]=a*l[3*i+2]}}return l}function u(e,t){if(null==e.encoding||""===e.encoding){const o=Object(s["b"])(t,e);if(Object(r["j"])(o.vertexAttributes.position))return;const n=Object(s["c"])(t,o.vertexAttributes.position),i=o.header.fields,a=[i.offsetX,i.offsetY,i.offsetZ],c=[i.scaleX,i.scaleY,i.scaleZ],l=n.length/3,u=new Float64Array(3*l);for(let e=0;e<l;e++)u[3*e]=n[3*e]*c[0]+a[0],u[3*e+1]=n[3*e+1]*c[1]+a[1],u[3*e+2]=n[3*e+2]*c[2]+a[2];return u}if("lepcc-xyz"===e.encoding)return Object(c["c"])(t).result}function d(e,t,o){return Object(r["k"])(e)&&e.attributeInfo.useElevation?f(t,o):Object(r["k"])(e)?Object(s["d"])(e.attributeInfo.storageInfo,e.buffer,o):null}function f(e,t){const o=new Float64Array(t);for(let r=0;r<t;r++)o[r]=e[3*r+2];return o}function b(e,t,o,r,n){const i=e.length/3;let a=0;for(let s=0;s<i;s++){let i=!0;for(let e=0;e<r.length&&i;e++){const{filterJSON:t}=r[e],o=n[e].values[s];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;-1!==t.values.indexOf(o)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=y(t.requiredSetBits),r=y(t.requiredClearBits);(o&e)===e&&0==(o&r)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&o,r=o>>>4&15,n=r>1,a=1===e,s=e===r;let c=!1;for(const o of t.includedReturns)if("last"===o&&s||"firstOfMany"===o&&a&&n||"lastOfMany"===o&&s&&n||"single"===o&&!n){c=!0;break}c||(i=!1);break}}}i&&(o[a]=s,e[3*a]=e[3*s],e[3*a+1]=e[3*s+1],e[3*a+2]=e[3*s+2],t[3*a]=t[3*s],t[3*a+1]=t[3*s+1],t[3*a+2]=t[3*s+2],a++)}return a}function p(e){return null==e||"none"===e?null:"low-four-bit"===e?e=>15&e:"high-four-bit"===e?e=>(240&e)>>4:"absolute-value"===e?e=>Math.abs(e):"modulo-ten"===e?e=>e%10:null}function y(e){let t=0;for(const o of e||[])t|=1<<o;return t}},"4e0d":function(e,t,o){"use strict";o.d(t,"a",(function(){return g}));var r,n=o("a4ee"),i=o("7ffa"),a=o("59b2"),s=o("cea0"),c=o("448d"),l=o("d386"),u=o("7731"),d=o("d611"),f=o("9ef0"),b=o("6a0ed");let p=r=class extends b["a"]{constructor(){super(...arguments),this.description=null,this.label=null,this.minValue=0,this.maxValue=0,this.color=null}clone(){return new r({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,color:Object(i["a"])(this.color)})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],p.prototype,"description",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],p.prototype,"label",void 0),Object(n["a"])([Object(a["b"])({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],p.prototype,"minValue",void 0),Object(n["a"])([Object(a["b"])({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],p.prototype,"maxValue",void 0),Object(n["a"])([Object(a["b"])({type:f["a"],json:{type:[s["a"]],write:!0}})],p.prototype,"color",void 0),p=r=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.ColorClassBreakInfo")],p);const y=p;var h;let O=h=class extends u["a"]{constructor(e){super(e),this.type="point-cloud-class-breaks",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.colorClassBreakInfos=null}clone(){return new h({...this.cloneProperties(),field:this.field,fieldTransformType:this.fieldTransformType,colorClassBreakInfos:Object(i["a"])(this.colorClassBreakInfos),legendOptions:Object(i["a"])(this.legendOptions)})}};Object(n["a"])([Object(c["a"])({pointCloudClassBreaksRenderer:"point-cloud-class-breaks"})],O.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0},type:String})],O.prototype,"field",void 0),Object(n["a"])([Object(a["b"])({type:d["a"],json:{write:!0}})],O.prototype,"legendOptions",void 0),Object(n["a"])([Object(a["b"])({type:u["a"].fieldTransformTypeKebabDict.apiValues,json:{type:u["a"].fieldTransformTypeKebabDict.jsonValues,read:u["a"].fieldTransformTypeKebabDict.read,write:u["a"].fieldTransformTypeKebabDict.write}})],O.prototype,"fieldTransformType",void 0),Object(n["a"])([Object(a["b"])({type:[y],json:{write:!0}})],O.prototype,"colorClassBreakInfos",void 0),O=h=Object(n["a"])([Object(l["a"])("esri.renderers.PointCloudClassBreaksRenderer")],O);const g=O},"578b":function(e,t,o){"use strict";o.d(t,"a",(function(){return b}));var r,n=o("a4ee"),i=o("7ffa"),a=o("59b2"),s=(o("cea0"),o("448d")),c=o("d386"),l=o("7731"),u=o("d611"),d=o("3f60");let f=r=class extends l["a"]{constructor(e){super(e),this.type="point-cloud-stretch",this.field=null,this.legendOptions=null,this.fieldTransformType=null,this.stops=null}clone(){return new r({...this.cloneProperties(),field:Object(i["a"])(this.field),fieldTransformType:Object(i["a"])(this.fieldTransformType),stops:Object(i["a"])(this.stops),legendOptions:Object(i["a"])(this.legendOptions)})}};Object(n["a"])([Object(s["a"])({pointCloudStretchRenderer:"point-cloud-stretch"})],f.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0},type:String})],f.prototype,"field",void 0),Object(n["a"])([Object(a["b"])({type:u["a"],json:{write:!0}})],f.prototype,"legendOptions",void 0),Object(n["a"])([Object(a["b"])({type:l["a"].fieldTransformTypeKebabDict.apiValues,json:{type:l["a"].fieldTransformTypeKebabDict.jsonValues,read:l["a"].fieldTransformTypeKebabDict.read,write:l["a"].fieldTransformTypeKebabDict.write}})],f.prototype,"fieldTransformType",void 0),Object(n["a"])([Object(a["b"])({type:[d["a"]],json:{write:!0}})],f.prototype,"stops",void 0),f=r=Object(n["a"])([Object(c["a"])("esri.renderers.PointCloudStretchRenderer")],f);const b=f},7731:function(e,t,o){"use strict";o.d(t,"a",(function(){return U}));var r,n=o("a4ee"),i=o("fa8a"),a=o("6a0ed"),s=o("7ffa"),c=o("59b2"),l=(o("cea0"),o("d386"));o("b50f"),o("c120");let u=r=class extends a["a"]{constructor(){super(...arguments),this.field=null,this.minValue=0,this.maxValue=255}clone(){return new r({field:this.field,minValue:this.minValue,maxValue:this.maxValue})}};Object(n["a"])([Object(c["b"])({type:String,json:{write:!0}})],u.prototype,"field",void 0),Object(n["a"])([Object(c["b"])({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"minValue",void 0),Object(n["a"])([Object(c["b"])({type:Number,nonNullable:!0,json:{write:!0}})],u.prototype,"maxValue",void 0),u=r=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.ColorModulation")],u);const d=u,f=new i["a"]({pointCloudFixedSizeAlgorithm:"fixed-size",pointCloudSplatAlgorithm:"splat"});let b=class extends a["a"]{};Object(n["a"])([Object(c["b"])({type:f.apiValues,readOnly:!0,nonNullable:!0,json:{type:f.jsonValues,read:!1,write:f.write}})],b.prototype,"type",void 0),b=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.PointSizeAlgorithm")],b);const p=b;var y,h=o("448d");let O=y=class extends p{constructor(){super(...arguments),this.type="fixed-size",this.size=0,this.useRealWorldSymbolSizes=null}clone(){return new y({size:this.size,useRealWorldSymbolSizes:this.useRealWorldSymbolSizes})}};Object(n["a"])([Object(h["a"])({pointCloudFixedSizeAlgorithm:"fixed-size"})],O.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({type:Number,nonNullable:!0,json:{write:!0}})],O.prototype,"size",void 0),Object(n["a"])([Object(c["b"])({type:Boolean,json:{write:!0}})],O.prototype,"useRealWorldSymbolSizes",void 0),O=y=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.PointSizeFixedSizeAlgorithm")],O);const g=O;var w;let j=w=class extends p{constructor(){super(...arguments),this.type="splat",this.scaleFactor=1}clone(){return new w({scaleFactor:this.scaleFactor})}};Object(n["a"])([Object(h["a"])({pointCloudSplatAlgorithm:"splat"})],j.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({type:Number,value:1,nonNullable:!0,json:{write:!0}})],j.prototype,"scaleFactor",void 0),j=w=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.PointSizeSplatAlgorithm")],j);const m=j,v={key:"type",base:p,typeMap:{"fixed-size":g,splat:m}},C=Object(i["b"])()({pointCloudClassBreaksRenderer:"point-cloud-class-breaks",pointCloudRGBRenderer:"point-cloud-rgb",pointCloudStretchRenderer:"point-cloud-stretch",pointCloudUniqueValueRenderer:"point-cloud-unique-value"});let T=class extends a["a"]{constructor(e){super(e),this.type=void 0,this.pointSizeAlgorithm=null,this.colorModulation=null,this.pointsPerInch=10}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}cloneProperties(){return{pointSizeAlgorithm:Object(s["a"])(this.pointSizeAlgorithm),colorModulation:Object(s["a"])(this.colorModulation),pointsPerInch:Object(s["a"])(this.pointsPerInch)}}};Object(n["a"])([Object(c["b"])({type:C.apiValues,readOnly:!0,nonNullable:!0,json:{type:C.jsonValues,read:!1,write:C.write}})],T.prototype,"type",void 0),Object(n["a"])([Object(c["b"])({types:v,json:{write:!0}})],T.prototype,"pointSizeAlgorithm",void 0),Object(n["a"])([Object(c["b"])({type:d,json:{write:!0}})],T.prototype,"colorModulation",void 0),Object(n["a"])([Object(c["b"])({json:{write:!0},nonNullable:!0,type:Number})],T.prototype,"pointsPerInch",void 0),T=Object(n["a"])([Object(l["a"])("esri.renderers.PointCloudRenderer")],T),function(e){e.fieldTransformTypeKebabDict=new i["a"]({none:"none",lowFourBit:"low-four-bit",highFourBit:"high-four-bit",absoluteValue:"absolute-value",moduloTen:"modulo-ten"})}(T||(T={}));const U=T},a1f7:function(e,t,o){"use strict";o.d(t,"a",(function(){return g}));var r,n=o("a4ee"),i=o("7ffa"),a=o("59b2"),s=o("cea0"),c=o("448d"),l=o("d386"),u=o("7731"),d=o("d611"),f=o("9ef0"),b=o("6a0ed");let p=r=class extends b["a"]{constructor(){super(...arguments),this.description=null,this.label=null,this.values=null,this.color=null}clone(){return new r({description:this.description,label:this.label,values:Object(i["a"])(this.values),color:Object(i["a"])(this.color)})}};Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],p.prototype,"description",void 0),Object(n["a"])([Object(a["b"])({type:String,json:{write:!0}})],p.prototype,"label",void 0),Object(n["a"])([Object(a["b"])({type:[String],json:{write:!0}})],p.prototype,"values",void 0),Object(n["a"])([Object(a["b"])({type:f["a"],json:{type:[s["a"]],write:!0}})],p.prototype,"color",void 0),p=r=Object(n["a"])([Object(l["a"])("esri.renderers.support.pointCloud.ColorUniqueValueInfo")],p);const y=p;var h;let O=h=class extends u["a"]{constructor(e){super(e),this.type="point-cloud-unique-value",this.field=null,this.fieldTransformType=null,this.colorUniqueValueInfos=null,this.legendOptions=null}clone(){return new h({...this.cloneProperties(),field:Object(i["a"])(this.field),fieldTransformType:Object(i["a"])(this.fieldTransformType),colorUniqueValueInfos:Object(i["a"])(this.colorUniqueValueInfos),legendOptions:Object(i["a"])(this.legendOptions)})}};Object(n["a"])([Object(c["a"])({pointCloudUniqueValueRenderer:"point-cloud-unique-value"})],O.prototype,"type",void 0),Object(n["a"])([Object(a["b"])({json:{write:!0},type:String})],O.prototype,"field",void 0),Object(n["a"])([Object(a["b"])({type:u["a"].fieldTransformTypeKebabDict.apiValues,json:{type:u["a"].fieldTransformTypeKebabDict.jsonValues,read:u["a"].fieldTransformTypeKebabDict.read,write:u["a"].fieldTransformTypeKebabDict.write}})],O.prototype,"fieldTransformType",void 0),Object(n["a"])([Object(a["b"])({type:[y],json:{write:!0}})],O.prototype,"colorUniqueValueInfos",void 0),Object(n["a"])([Object(a["b"])({type:d["a"],json:{write:!0}})],O.prototype,"legendOptions",void 0),O=h=Object(n["a"])([Object(l["a"])("esri.renderers.PointCloudUniqueValueRenderer")],O);const g=O},ad64:function(e,t,o){"use strict";o.d(t,"a",(function(){return g})),o.d(t,"b",(function(){return O})),o.d(t,"c",(function(){return f})),o.d(t,"d",(function(){return v}));var r=o("ce50"),n=o("7ffa"),i=o("e92d"),a=o("d207"),s=o("b7bd");const c=i["a"].getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,o){let n="",i=0;for(;i<o;){const a=e[t+i];if(a<128)n+=String.fromCharCode(a),i++;else if(a>=192&&a<224){if(i+1>=o)throw new r["a"]("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const s=(31&a)<<6|63&e[t+i+1];n+=String.fromCharCode(s),i+=2}else if(a>=224&&a<240){if(i+2>=o)throw new r["a"]("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(15&a)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];n+=String.fromCharCode(s),i+=3}else{if(!(a>=240&&a<248))throw new r["a"]("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=o)throw new r["a"]("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const s=(7&a)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(s>=65536){const e=55296+(s-65536>>10),t=56320+(1023&s);n+=String.fromCharCode(e,t)}else n+=String.fromCharCode(s);i+=4}}}return n}function u(e,t){const o={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let n=0;n<t.length;n++){const i=t[n],a=i.valueType||i.type,s=T[a];o.fields[i.property]=s(e,r),r+=C[a].BYTES_PER_ELEMENT}return o.byteCount=r,o}function d(e,t,o){const n=[];let i,a,s=0;for(a=0;a<e;a+=1){if(i=t[a],i>0){if(n.push(l(o,s,i-1)),0!==o[s+i-1])throw new r["a"]("string-array-error","Invalid string array: missing null termination.")}else n.push(null);s+=i}return n}function f(e,t){return new(0,C[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function b(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}function p(e,t,o){const i=null!=t.header?u(e,t.header):{byteOffset:0,byteCount:0,fields:{count:o}},a={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let s=i.byteCount;for(let c=0;c<t.ordering.length;c++){const e=t.ordering[c],o=Object(n["a"])(t[e]);if(o.count=i.fields.count,"String"===o.valueType){if(o.byteOffset=s,o.byteCount=i.fields[e+"ByteCount"],"UTF-8"!==o.encoding)throw new r["a"]("unsupported-encoding","Unsupported String encoding.",{encoding:o.encoding})}else{if(!U(o.valueType))throw new r["a"]("unsupported-value-type","Unsupported binary valueType",{valueType:o.valueType});{const e=x(o.valueType);s+=s%e!=0?e-s%e:0,o.byteOffset=s,o.byteCount=e*o.valuesPerElement*o.count}}s+=o.byteCount,a.entries[e]=o}return a.byteCount=s-a.byteOffset,a}function y(e,t,o){if(t!==e&&c.error(`Invalid ${o} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r["a"]("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function h(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 O(e,t){const o=u(e,t&&t.header);let r=o.byteCount;const n={isDraco:!1,header:o,byteOffset:o.byteCount,byteCount:0,vertexAttributes:{}},i=o.fields,a=null!=i.vertexCount?i.vertexCount:i.count;for(const l of t.ordering){if(!t.vertexAttributes[l])continue;const e={...t.vertexAttributes[l],byteOffset:r,count:a},o=m[l]?m[l]:"_"+l;n.vertexAttributes[o]=e,r+=x(e.valueType)*e.valuesPerElement*a}const s=i.faceCount;if(t.faces&&s){n.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const o={...t.faces[e],byteOffset:r,count:s};n.faces[e]=o,r+=x(o.valueType)*o.valuesPerElement*s}}const c=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&c){n.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const o={...t.featureAttributes[e],byteOffset:r,count:c};n.featureAttributes[e]=o,r+=("UInt64"===o.valueType?8:x(o.valueType))*o.valuesPerElement*c}}return y(r,e.byteLength,"geometry"),n.byteCount=r-n.byteOffset,n}function g(e,t){return e&&e.compressedAttributes&&"draco"===e.compressedAttributes.encoding?j(e.compressedAttributes.attributes):e?h(e):w(t)}function w(e){const t={isDraco:!1,isLegacy:!0,color:!1,normal:!1,uv0:!1,uvRegion:!1,featureIndex:!1};for(const o of e.ordering)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 j(e){const t={isDraco:!0,isLegacy:!1,color:!1,normal:!1,uv0:!1,uvRegion:!1,featureIndex:!1};for(const o of e)switch(o){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}const m={position:s["a"].POSITION,normal:s["a"].NORMAL,color:s["a"].COLOR,uv0:s["a"].UV0,region:s["a"].UVREGION};function v(e,t,o){if("lepcc-rgb"===e.encoding)return Object(a["b"])(t);if("lepcc-intensity"===e.encoding)return Object(a["a"])(t);if(null!=e.encoding&&""!==e.encoding)throw new r["a"]("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(c.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(c.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const n=p(t,e,o);y(n.byteOffset+n.byteCount,t.byteLength,"attribute");const i=n.entries.attributeValues||n.entries.objectIds;if(i){if("String"===i.valueType){const e=n.entries.attributeByteCounts,o=f(t,e),r=b(t,i);return d(e.count,o,r)}return f(t,i)}throw new r["a"]("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const C={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},T={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function U(e){return C.hasOwnProperty(e)}function x(e){return U(e)?C[e].BYTES_PER_ELEMENT:0}},d207:function(e,t,o){"use strict";o.d(t,"a",(function(){return O})),o.d(t,"b",(function(){return p})),o.d(t,"c",(function(){return l}));var r=o("ce50");const n=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function a(e,t,o){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,o+i.identifierOffset,i.identifierLength)),version:t.getUint16(o+i.versionOffset,n),checksum:t.getUint32(o+i.checksumOffset,n)}}const s={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function c(e,t){return{sizeLo:e.getUint32(t+s.sizeLo,n),sizeHi:e.getUint32(t+s.sizeHi,n),minX:e.getFloat64(t+s.minX,n),minY:e.getFloat64(t+s.minY,n),minZ:e.getFloat64(t+s.minZ,n),maxX:e.getFloat64(t+s.maxX,n),maxY:e.getFloat64(t+s.maxY,n),maxZ:e.getFloat64(t+s.maxZ,n),errorX:e.getFloat64(t+s.errorX,n),errorY:e.getFloat64(t+s.errorY,n),errorZ:e.getFloat64(t+s.errorZ,n),count:e.getUint32(t+s.count,n),reserved:e.getUint32(t+s.reserved,n)}}function l(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:l}=a(e,t,o);if(o+=i.byteCount,"LEPCC "!==n)throw new r["a"]("lepcc-decode-error","Bad identifier");if(l>1)throw new r["a"]("lepcc-decode-error","Unknown version");const d=c(t,o);if(o+=s.byteCount,d.sizeHi*2**32+d.sizeLo!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");const f=new Float64Array(3*d.count),b=[],p=[],y=[],h=[];if(o=u(e,o,b),o=u(e,o,p),o=u(e,o,y),o=u(e,o,h),o!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad length");let O=0,g=0;for(let r=0;r<b.length;r++){g+=b[r];let e=0;for(let t=0;t<p[r];t++){e+=y[O];const t=h[O];f[3*O]=Math.min(d.maxX,d.minX+2*d.errorX*e),f[3*O+1]=Math.min(d.maxY,d.minY+2*d.errorY*g),f[3*O+2]=Math.min(d.maxZ,d.minZ+2*d.errorZ*t),O++}}return{errorX:d.errorX,errorY:d.errorY,errorZ:d.errorZ,result:f}}function u(e,t,o){const r=[];t=d(e,t,r);const n=[];for(let i=0;i<r.length;i++){n.length=0,t=d(e,t,n);for(let e=0;e<n.length;e++)o.push(n[e]+r[i])}return t}function d(e,t,o){const i=new DataView(e,t),a=i.getUint8(0),s=31&a,c=!!(32&a),l=(192&a)>>6;let u=0;if(0===l)u=i.getUint32(1,n),t+=5;else if(1===l)u=i.getUint16(1,n),t+=3;else{if(2!==l)throw new r["a"]("lepcc-decode-error","Bad count type");u=i.getUint8(1),t+=2}if(c)throw new r["a"]("lepcc-decode-error","LUT not implemented");const d=Math.ceil(u*s/8),f=new Uint8Array(e,t,d);let b=0,p=0,y=0;const h=-1>>>32-s;for(let r=0;r<u;r++){for(;p<s;)b|=f[y]<<p,p+=8,y+=1;o[r]=b&h,b>>>=s,p-=s,p+s>32&&(b|=f[y-1]>>8-p)}return t+y}const f={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function b(e,t){return{sizeLo:e.getUint32(t+f.sizeLo,n),sizeHi:e.getUint32(t+f.sizeHi,n),count:e.getUint32(t+f.count,n),colorMapCount:e.getUint16(t+f.colorMapCount,n),lookupMethod:e.getUint8(t+f.lookupMethod),compressionMethod:e.getUint8(t+f.compressionMethod)}}function p(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:s}=a(e,t,o);if(o+=i.byteCount,"ClusterRGB"!==n)throw new r["a"]("lepcc-decode-error","Bad identifier");if(s>1)throw new r["a"]("lepcc-decode-error","Unknown version");const c=b(t,o);if(o+=f.byteCount,c.sizeHi*2**32+c.sizeLo!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");if((2===c.lookupMethod||1===c.lookupMethod)&&0===c.compressionMethod){if(3*c.colorMapCount+c.count+o!==e.byteLength||c.colorMapCount>256)throw new r["a"]("lepcc-decode-error","Bad count");const t=new Uint8Array(e,o,3*c.colorMapCount),n=new Uint8Array(e,o+3*c.colorMapCount,c.count),i=new Uint8Array(3*c.count);for(let e=0;e<c.count;e++){const o=n[e];i[3*e]=t[3*o],i[3*e+1]=t[3*o+1],i[3*e+2]=t[3*o+2]}return i}if(0===c.lookupMethod&&0===c.compressionMethod){if(3*c.count+o!==e.byteLength||0!==c.colorMapCount)throw new r["a"]("lepcc-decode-error","Bad count");return new Uint8Array(e,o).slice()}if(c.lookupMethod<=2&&1===c.compressionMethod){if(o+3!==e.byteLength||1!==c.colorMapCount)throw new r["a"]("lepcc-decode-error","Bad count");const n=t.getUint8(o),i=t.getUint8(o+1),a=t.getUint8(o+2),s=new Uint8Array(3*c.count);for(let e=0;e<c.count;e++)s[3*e]=n,s[3*e+1]=i,s[3*e+2]=a;return s}throw new r["a"]("lepcc-decode-error","Bad method "+c.lookupMethod+","+c.compressionMethod)}const y={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+y.sizeLo,n),sizeHi:e.getUint32(t+y.sizeHi,n),count:e.getUint32(t+y.count,n),scaleFactor:e.getUint16(t+y.scaleFactor,n),bitsPerPoint:e.getUint8(t+y.bitsPerPoint),reserved:e.getUint8(t+y.reserved)}}function O(e){const t=new DataView(e,0);let o=0;const{identifier:n,version:s}=a(e,t,o);if(o+=i.byteCount,"Intensity "!==n)throw new r["a"]("lepcc-decode-error","Bad identifier");if(s>1)throw new r["a"]("lepcc-decode-error","Unknown version");const c=h(t,o);if(o+=y.byteCount,c.sizeHi*2**32+c.sizeLo!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");const l=new Uint16Array(c.count);if(8===c.bitsPerPoint){if(c.count+o!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");const t=new Uint8Array(e,o,c.count);for(let e=0;e<c.count;e++)l[e]=t[e]*c.scaleFactor}else if(16===c.bitsPerPoint){if(2*c.count+o!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");const t=new Uint16Array(e,o,c.count);for(let e=0;e<c.count;e++)l[e]=t[e]*c.scaleFactor}else{const t=[];if(d(e,o,t)!==e.byteLength)throw new r["a"]("lepcc-decode-error","Bad size");for(let e=0;e<c.count;e++)l[e]=t[e]*c.scaleFactor}return l}}}]);
- //# sourceMappingURL=chunk-33bd1f4e.dd415ef7.js.map
|