define(["exports","./BoundingSphere-9a3b5656","./ComponentDatatype-aaeec80f","./defaultValue-81eec7ed","./Check-741c5f3c","./Cartesian2-bd414876","./GeographicProjection-c931c7fb","./GeometryAttribute-2b42a913","./GeometryAttributes-32b29525","./GeometryPipeline-e7083fea","./IndexDatatype-3f3c99e8","./Matrix4-4c545f70","./WebMercatorProjection-44373a3d"],(function(e,t,n,o,r,i,s,c,a,d,p,u,f){"use strict";function l(e,t,n){e=o.defaultValue(e,0),t=o.defaultValue(t,0),n=o.defaultValue(n,0),this.value=new Float32Array([e,t,n])}function m(e,t){const o=e.attributes,r=o.position,i=r.values.length/r.componentsPerAttribute;o.batchId=new c.GeometryAttribute({componentDatatype:n.ComponentDatatype.FLOAT,componentsPerAttribute:1,values:new Float32Array(i)});const s=o.batchId.values;for(let e=0;e1){const t=e[0].modelMatrix;for(s=1;s=0){const e=r[a];i=e.offset+e.count,c=e.index,s=n[c].indices.length}else i=0,c=0,s=n[c].indices.length;const d=e.length;for(let a=0;as&&(i=0,s=n[++c].indices.length),r.push({index:c,offset:i,count:p}),i+=p}}Object.defineProperties(l.prototype,{componentDatatype:{get:function(){return n.ComponentDatatype.FLOAT}},componentsPerAttribute:{get:function(){return 3}},normalize:{get:function(){return!1}}}),l.fromCartesian3=function(e){return new l(e.x,e.y,e.z)},l.toValue=function(e,t){return o.defined(t)||(t=new Float32Array([e.x,e.y,e.z])),t[0]=e.x,t[1]=e.y,t[2]=e.z,t};const y={};function b(e,t){const n=e.attributes;for(const e in n)if(n.hasOwnProperty(e)){const r=n[e];o.defined(r)&&o.defined(r.values)&&t.push(r.values.buffer)}o.defined(e.indices)&&t.push(e.indices.buffer)}function G(e,t){const n=e.length,r=new Float64Array(1+19*n);let i=0;r[i++]=n;for(let t=0;t0&&(n=h(e),n.length>0&&(r=d.GeometryPipeline.createAttributeLocations(n[0]),e.createPickOffsets&&(c=function(e,t){const n=[];return g(e,"geometry",t,n),g(e,"westHemisphereGeometry",t,n),g(e,"eastHemisphereGeometry",t,n),n}(i,n))),o.defined(i[0].attributes)&&o.defined(i[0].attributes.offset)&&(a=new Array(s),p=!0));const u=new Array(s),f=new Array(s);for(let e=0;e0&&(r.set(c.indices,a),a+=m)}return n.push(r.buffer),{stringTable:i,packedData:r}},y.unpackCreateGeometryResults=function(e){const o=e.stringTable,r=e.packedData;let i;const s=new Array(r[0]);let d=0,u=1;for(;u0){const e=y.length/b;for(S=p.IndexDatatype.createTypedArray(e,g),i=0;i