@arcgis/core 4.30.0-next.20240210 → 4.30.0-next.20240213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +1 -0
- package/assets/esri/core/workers/chunks/0d54451c740f54a59f49.js +1 -0
- package/assets/esri/core/workers/chunks/{2b7513fe57eca6cff7c3.js → 0f30059c4e7a9cb85d1d.js} +1 -1
- package/assets/esri/core/workers/chunks/18551a7eb5a9b88aa0dc.js +1 -0
- package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +1 -0
- package/assets/esri/core/workers/chunks/{3f4d63436c3de04a6ebb.js → 254b4ee3621bbe345bb1.js} +1 -1
- package/assets/esri/core/workers/chunks/2d682ee6e5d66f2ea5cd.js +1 -0
- package/assets/esri/core/workers/chunks/{d5484d470121de2b403b.js → 36d091be859bbb1a149b.js} +1 -1
- package/assets/esri/core/workers/chunks/50b41f91be903a0977f9.js +1 -0
- package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +1 -0
- package/assets/esri/core/workers/chunks/784b6a8216b97440b180.js +1 -0
- package/assets/esri/core/workers/chunks/{7f7a4de2cd4ab71b9aee.js → 8d119dc0a92ad3612daa.js} +1 -1
- package/assets/esri/core/workers/chunks/966cc0b54008c7348678.js +1 -0
- package/assets/esri/core/workers/chunks/{2853221e88ed7077a447.js → 9850b0e04cce8c1bdddf.js} +1 -1
- package/assets/esri/core/workers/chunks/{0014635097a32ad38895.js → a854611d1a86b838c6ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf6970b490b98aa0a117.js → be562536212360943388.js} +1 -1
- package/assets/esri/core/workers/chunks/{50a5abd75fa7dbb571a5.js → ccd53b81c2688dd11584.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2b8e6a0b3f70ada2799.js → e4da908079417cc2f495.js} +1 -1
- package/assets/esri/core/workers/chunks/{af0314c2b5b7dc4f5bbd.js → e6dbf0a7b7b1cf64f23f.js} +1 -1
- package/assets/esri/core/workers/chunks/{eba72ff1726ff6998204.js → f03d62ab7806b68d0b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fcda75ed02b8aee3a3c.js → f89278782ddfb154aa9f.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/interfaces.d.ts +174 -16
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
- package/package.json +2 -2
- package/portal/support/resourceUtils.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/constants.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/support/automaticLengthMeasurementUtils.js +1 -1
- package/views/support/extentUtils.js +5 -0
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/assets/esri/core/workers/chunks/062629a9b4695dea8bf8.js +0 -1
- package/assets/esri/core/workers/chunks/3401157faaa8619aaa47.js +0 -1
- package/assets/esri/core/workers/chunks/37803888bd9a537481a7.js +0 -1
- package/assets/esri/core/workers/chunks/560f677a356c7ebde5d3.js +0 -1
- package/assets/esri/core/workers/chunks/5bfc5ffad705aaaafcd4.js +0 -1
- package/assets/esri/core/workers/chunks/655f4560fb36a0d9ff0b.js +0 -1
- package/assets/esri/core/workers/chunks/b927b655e955abe00d48.js +0 -1
- package/assets/esri/core/workers/chunks/d2417d179d015f1193a1.js +0 -1
- package/assets/esri/core/workers/chunks/f75ec599f53c66cab194.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7852,8240],{10212:(e,t,r)=>{r.d(t,{S:()=>o});var a=r(4644);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.w)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},4644:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{w:()=>a})},7852:(e,t,r)=>{r.d(t,{save:()=>h,saveAs:()=>w});var a=r(24516),o=r(58648),s=r(46940),n=r(76668);const i="Media Layer",c="media-layer-save",l="media-layer-save-as",u=["media-layer:unsupported-source"];function p(e){return{isValid:"media"===e.type,errorMessage:"Layer.type should be 'media'"}}function d(e){return(0,o.a)(e,"portal-item",!0)}function f(e){return e.layerJSON}async function m(e,t){const{title:r,fullExtent:a}=e;t.title||=r,t.extent=a?await(0,s.oj)(a):null,(0,s.KI)(t,s.qk.METADATA)}async function h(e,t){return(0,a.eI)({layer:e,itemType:i,validateLayer:p,createJSONContext:e=>d(e),createItemData:f,errorNamePrefix:c,supplementalUnsupportedErrors:u,saveResources:(t,r)=>(0,n.U)(e.resourceReferences,r)},t)}async function w(e,t,r){return(0,a.ER)({layer:e,itemType:i,validateLayer:p,createJSONContext:e=>d(e),createItemData:f,errorNamePrefix:l,supplementalUnsupportedErrors:u,newItem:t,setItemProperties:m,saveResources:(t,r)=>(0,n.U)(e.resourceReferences,r)},r)}},24516:(e,t,r)=>{r.d(t,{ER:()=>I,eI:()=>g});var a=r(20744),o=r(10212),s=r(54872),n=r(9764),i=r(58648),c=r(46940),l=r(4424),u=r(13448);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new a.c(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function d(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function f(e){const{item:t,errorNamePrefix:r,layer:o,validateItem:s}=e;if((0,l.y)(t),function(e){const{item:t,itemType:r,additionalItemType:o,errorNamePrefix:s,layer:n}=e,i=[r];if(o&&i.push(o),!i.includes(t.type)){const e=i.map((e=>`'${e}'`)).join(", ");throw new a.c(`${s}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:n})}}(e),s){const e=s(t);if(!e.isValid)throw new a.c(`${r}:invalid-parameters`,e.errorMessage,{layer:o})}}function m(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new a.c(`${r}:portal-item-not-set`,d(t,"requires the portalItem property to be set"));if(!o.loaded)throw new a.c(`${r}:portal-item-not-loaded`,d(t,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:o})}function h(e){const{newItem:t,itemType:r}=e;let a=n.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=s.c.getDefault(),f({...e,item:a}),a}function w(e){return(0,i.a)(e,"portal-item")}async function y(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,u.e)(t,{errorName:"layer-write:unsupported"},r),a}function v(e){(0,c.O2)(e,c.qk.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:s,saveResources:n,supplementalUnsupportedErrors:i}=e;await p(e),m(e);const c=r.portalItem,l=s?s(c):w(c),u=await y(r,l,{...t,supplementalUnsupportedErrors:i}),d=await a({layer:r,layerJSON:u},c);return v(c),await c.update({data:d}),(0,o.S)(l),await(n?.(c,l)),c}async function I(e,t){const{layer:r,createItemData:a,createJSONContext:s,setItemProperties:n,saveResources:i,supplementalUnsupportedErrors:c}=e;await p(e);const l=h(e),u=s?s(l):w(l),d=await y(r,u,{...t,supplementalUnsupportedErrors:c}),f=await a({layer:r,layerJSON:d},l);return await n(r,l),v(l),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(l,f,t),r.portalItem=l,(0,o.S)(u),await(i?.(l,u)),l}},58648:(e,t,r)=>{r.d(t,{a:()=>n,s:()=>s});var a=r(28176),o=r(54872);function s(e,t){return{...i(e,t),readResourcePaths:[]}}function n(e,t,r){const o=(0,a.as)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,a.as)(e.itemUrl),portal:e.portal||o.c.getDefault(),portalItem:e}}},38240:(e,t,r)=>{r.d(t,{CW:()=>d,EN:()=>p,addOrUpdateResources:()=>i,fetchResources:()=>n,removeAllResources:()=>l,removeResource:()=>c});var a=r(2600),o=r(20744),s=r(28176);async function n(e,t={},r){await e.load(r);const a=(0,s.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:i="asc",sortField:c="created"}=t,l={query:{start:o,num:n,sortOrder:i,sortField:c,token:e.apiKey},signal:r?.signal},u=await e.portal.request(a,l);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:a})=>({created:new Date(t),size:r,resource:e.resourceFromPath(a)})))}}async function i(e,t,r,a){const n=new Map;for(const{resource:e,content:a,compress:s,access:i}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,c]=u(e.path),l=`${t}/${s??""}/${i??""}`;n.has(l)||n.set(l,{prefix:t,compress:s,access:i,files:[]}),n.get(l).files.push({fileName:c,content:a})}await e.load(a);const i=(0,s.kn)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:o,files:s}of n.values()){const n=25;for(let c=0;c<s.length;c+=n){const l=s.slice(c,c+n),u=new FormData;t&&"."!==t&&u.append("resourcesPrefix",t),r&&u.append("compress","true"),o&&u.append("access",o);let p=0;for(const{fileName:e,content:t}of l)u.append("file"+ ++p,t,e);u.append("f","json"),await e.portal.request(i,{method:"post",body:u,signal:a?.signal})}}}async function c(e,t,r){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const a=(0,s.kn)(e.userItemUrl,"removeResources");await e.portal.request(a,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function l(e,t){await e.load(t);const r=(0,s.kn)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,a.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,a]=function(e){const[t,r]=function(e){const t=(0,s.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[a,o]=u(t);return[a,o,r]}(e.path);return e.portalItem.resourceFromPath((0,s.kn)(r,t+a))}},76668:(e,t,r)=>{r.d(t,{U:()=>i,W:()=>c});var a=r(20744),o=r(10860),s=r(63564),n=r(38240);async function i(e,t,r){const a=await l(e,t,r);await u(a,t,r)}async function c(e,t,r,a,o){const s=await l(r,a,o);await e.update({data:t}),await u(s,a,o)}async function l(e,t,i){if(!t?.resources)return;const c=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const l=new Set(t.resources.toKeep.map((e=>e.resource.path))),u=new Set,p=[];l.forEach((t=>{c.delete(t),e.paths.push(t)}));const d=[],f=[],m=[];for(const r of t.resources.toUpdate)if(c.delete(r.resource.path),l.has(r.resource.path)||u.has(r.resource.path)){const{resource:t,content:a,finish:o}=r,i=(0,n.CW)(t,(0,s.g1)());e.paths.push(i.path),d.push({resource:i,content:await(0,n.EN)(a),compress:r.compress}),o&&m.push((()=>o(i)))}else{e.paths.push(r.resource.path),f.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const t=r.finish;t&&m.push((()=>t(r.resource))),u.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),c.has(r.resource.path))c.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const e=r.finish;e&&m.push((()=>e(r.resource)))}if(d.length||f.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,38240));await e(t.portalItem,d,"add",i),await e(t.portalItem,f,"update",i)}if(m.forEach((e=>e())),0===p.length)return c;const h=await(0,o.Ml)(p);if((0,o.wp)(i),h.length>0)throw new a.c("save:resources","Failed to save one or more resources",{errors:h});return c}async function u(e,t,r){if(!e||!t.portalItem)return;const a=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);a.push(e.portalItem.removeResource(e,r))}await(0,o.Dv)(a)}},4424:(e,t,r)=>{r.d(t,{y:()=>n});var a=r(6220),o=r(20744),s=r(20572);function n(e){if(a.default.apiKey&&(0,s.s)(e.portal.url))throw new o.c("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},13448:(e,t,r)=>{r.d(t,{W:()=>o,e:()=>n});var a=r(20744);async function o(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const s=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function n(e,t,r){let o=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.c(e,t,r)));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map((e=>new a.c("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(o=o.filter((({name:e})=>!(s.has(e)||t.includes(e))))),a&&(o=o.filter((e=>"web-document-write:property-required"!==e.name)))}if(o.length>0)throw new a.c(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[456],{52180:(t,e,r)=>{r.d(e,{o:()=>n});var s=r(52324);class n{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,s.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},93184:(t,e,r)=>{r.d(e,{M:()=>i});var s=r(62484),n=r(60074),o=r(62880);function i(t,e,r,s){if((0,n.canProjectWithoutEngine)(t.spatialReference,r)){a[0]=t.x,a[1]=t.y;const n=t.z;return a[2]=n??s??0,(0,o.projectBuffer)(a,t.spatialReference,0,e,r,0,1)}const i=(0,n.tryProjectWithZConversion)(t,r);return!!i&&(e[0]=i?.x,e[1]=i?.y,e[2]=i?.z??s??0,!0)}const a=(0,s.Su)()},12784:(t,e,r)=>{r.r(e),r.d(e,{assetMapFromAssetMapsJSON:()=>P,extractMesh:()=>y,meshFeatureSetFromJSON:()=>d});var s=r(6444),n=r(66360),o=r(86916),i=r(62484),a=r(95247),c=r(94716),u=r(67776),l=r(56156),f=r(51232),h=r(13708),m=r(41104),p=r(54264),g=r(4048),w=r(59500);const E=()=>n.c.getLogger("esri.rest.support.meshFeatureSet");function d(t,e,r){const n=r.features;r.features=[],delete r.geometryType;const o=w.c.fromJSON(r);if(o.geometryType="mesh",!r.assetMaps)return o;const i=P(e,r.assetMaps),a=t.sourceSpatialReference??l.c.WGS84,c=r.globalIdFieldName,{outFields:u}=t,f=null!=u&&u.length>0?(h=u.includes("*")?null:new Set(u),({attributes:t})=>{if(!t)return{};if(!h)return t;for(const e in t)h.has(e)||delete t[e];return t}):()=>({});var h;for(const t of n){const r=y(t,c,a,e,i);null!=r&&o.features.push(new s.c({geometry:r,attributes:f(t)}))}return o}function y(t,e,r,s,n){const o=t.attributes[e],l=n.get(o);if(null==l)return E().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",t),null;if(!t.geometry)return E().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",t),null;const{originPoint:g,originVector:w}=function({attributes:t},e,{transformFieldRoles:r}){const s=t[r.originX],n=t[r.originY],o=t[r.originZ];return{originPoint:new u.c({x:s,y:n,z:o,spatialReference:e}),originVector:(0,i.WK)(s,n,o)}}(t,r,s),d=a.c.fromJSON(t.geometry);d.spatialReference=r;const y=function(t,{transformFieldRoles:e}){return new m.c({translation:[t[e.translationX],-t[e.translationZ],t[e.translationY]],rotationAxis:[t[e.rotationX],-t[e.rotationZ],t[e.rotationY]],rotationAngle:t[e.rotationDeg],scale:[t[e.scaleX],t[e.scaleZ],t[e.scaleY]]})}(t.attributes,s),_=l.projectVertices?new f.c({origin:w}):new h.c({origin:w}),P=function(t){const e=Array.from(t.files.values()),r=new Array;for(const t of e){if(t.status!==S.COMPLETED)return null;const e=new Array;for(const r of t.parts){if(!r)return null;e.push(new p.ai(r.url,r.hash))}r.push(new p.Si(t.name,t.mimeType,e))}return r}(l);return P?c.c.createWithExternalSource(g,P,{extent:d,transform:y,vertexSpace:_}):c.c.createIncomplete(g,{extent:d,transform:y,vertexSpace:_})}var S,_;function P(t,e){const r=new Map;for(const s of e){const e=s.parentGlobalId;if(null==e)continue;const n=s.assetName,i=s.assetType,a=s.assetHash,c=s.assetURL,u=s.conversionStatus,l=s.seqNo,f=(0,g.w$)(i,t.supportedFormats);if(!f){E().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${i}, but it does not list it as a supported type`);continue}const h=(0,o.wJ)(r,e,(()=>({projectVertices:N(s.flags).projectVertices,files:new Map})));(0,o.wJ)(h.files,n,(()=>({name:n,type:i,mimeType:f,status:M(u),parts:[]}))).parts[l]={hash:a,url:c}}return r}function M(t){switch(t){case"COMPLETED":case"SUBMITTED":return S.COMPLETED;case"INPROGRESS":return S.PENDING;default:return S.FAILED}}function N(t){return{projectVertices:t.includes("PROJECT_VERTICES")}}(_=S||(S={}))[_.FAILED=0]="FAILED",_[_.PENDING=1]="PENDING",_[_.COMPLETED=2]="COMPLETED"}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4716],{17012:(t,e,n)=>{n.d(e,{e:()=>l});var r,o,i,s=n(8528),a={exports:{}};r=a,o=function(){function t(t,n,o){o=o||2;var i,s,a,c,u,h,f,p=n&&n.length,g=p?n[0]*o:t.length,d=e(t,0,g,o,!0),m=[];if(!d||d.next===d.prev)return m;if(p&&(d=l(t,n,d,o)),t.length>80*o){i=a=t[0],s=c=t[1];for(var y=o;y<g;y+=o)(u=t[y])<i&&(i=u),(h=t[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-i,c-s))?1/f:0}return r(d,m,o,i,s,f),m}function e(t,e,n,r,o){var i,s;if(o===C(t,e,n,r)>0)for(i=e;i<n;i+=r)s=T(i,t[i],t[i+1],s);else for(i=n-r;i>=e;i-=r)s=T(i,t[i],t[i+1],s);if(s&&v(s,s.next)){var a=s.next;M(s),s=a}return s}function n(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(M(r),(r=e=o)===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,l,c,u,h,f){if(t){!f&&h&&p(t,c,u,h);for(var g,d,m=t;t.prev!==t.next;)if(g=t.prev,d=t.next,h?i(t,c,u,h):o(t))e.push(g.i/l),e.push(t.i/l),e.push(d.i/l),M(t),t=d.next,m=d.next;else if((t=d)===m){f?1===f?r(t=s(n(t),e,l),e,l,c,u,h,2):2===f&&a(t,e,l,c,u,h):r(n(t),e,l,c,u,h,1);break}}}function o(t){var e=t.prev,n=t,r=t.next;if(x(e,n,r)>=0)return!1;for(var o=t.next.next;o!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,o.x,o.y)&&x(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(t,e,n,r){var o=t.prev,i=t,s=t.next;if(x(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,h=g(a,l,e,n,r),f=g(c,u,e,n,r),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&m(o.x,o.y,i.x,i.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,r){var o=t;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&_(i,s)&&_(s,i)&&(e.push(i.i/r),e.push(o.i/r),e.push(s.i/r),M(o),M(o.next),o=t=s),o=o.next}while(o!==t);return n(o)}function a(t,e,o,i,s,a){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=S(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,e,o,i,s,a),void r(u,e,o,i,s,a)}c=c.next}l=l.next}while(l!==t)}function l(t,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=e(t,r[s]*i,s<a-1?r[s+1]*i:t.length,i,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=h(u[s],o),o.next);return o}function c(t,e){return t.x-e.x}function u(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function h(t,e){var r=function(t,e){var n,r=e,o=t.x,i=t.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&m(i<h?o:s,i,u,h,i<h?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),_(r,t)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(t,e);if(!r)return e;var o=S(r,t),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(e===r?i:e)}function f(t,e){return x(t.prev,t,e.prev)<0&&x(e.next,t,t.next)<0}function p(t,e,n,r){var o=t;do{null===o.z&&(o.z=g(o.x,o.y,e,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==t);o.prevZ.nextZ=null,o.prevZ=null,function(t){var e,n,r,o,i,s,a,l,c=1;do{for(n=t,t=null,i=null,s=0;n;){for(s++,r=n,a=0,e=0;e<c&&(a++,r=r.nextZ);e++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:t=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(t,e,n,r,o){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*o)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*o)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function m(t,e,n,r,o,i,s,a){return(o-s)*(e-a)-(t-s)*(i-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&w(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var n=t,r=!1,o=(t.x+e.x)/2,i=(t.y+e.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(x(t.prev,t,e.prev)||x(t,e.prev,e))||v(t,e)&&x(t.prev,t,t.next)>0&&x(e.prev,e,e.next)>0)}function x(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function w(t,e,n,r){var o=b(x(t,e,n)),i=b(x(t,e,r)),s=b(x(n,r,t)),a=b(x(n,r,e));return o!==i&&s!==a||!(0!==o||!A(t,n,e))||!(0!==i||!A(t,r,e))||!(0!==s||!A(n,t,r))||!(0!==a||!A(n,e,r))}function A(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function _(t,e){return x(t.prev,t,t.next)<0?x(t,e,t.next)>=0&&x(t,t.prev,e)>=0:x(t,e,t.prev)<0||x(t,t.next,e)<0}function S(t,e){var n=new q(t.i,t.x,t.y),r=new q(e.i,e.x,e.y),o=t.next,i=e.prev;return t.next=e,e.prev=t,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function T(t,e,n,r){var o=new q(t,e,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function q(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,r){for(var o=0,i=e,s=n-r;i<n;i+=r)o+=(t[s]-t[i])*(t[i+1]+t[s+1]),s=i;return o}return t.deviation=function(t,e,n,r){var o=e&&e.length,i=o?e[0]*n:t.length,s=Math.abs(C(t,0,i,n));if(o)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(C(t,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,g=r[a+2]*n;h+=Math.abs((t[f]-t[g])*(t[p+1]-t[f+1])-(t[f]-t[p])*(t[g+1]-t[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,o=0;o<t.length;o++){for(var i=0;i<t[o].length;i++)for(var s=0;s<e;s++)n.vertices.push(t[o][i][s]);o>0&&(r+=t[o-1].length,n.holes.push(r))}return n},t},void 0!==(i=o())&&(r.exports=i);const l=(0,s.g)(a.exports)},48952:(t,e,n)=>{n.d(e,{a:()=>i,b:()=>a,c:()=>s,d:()=>o,e:()=>h,f:()=>l,n:()=>f,s:()=>c,t:()=>u}),n(9456);var r=n(23704);function o(t,e,n){i(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function i(t,e,n,r=3,o=r){if(t.length/r!==Math.ceil(e.length/o))return t;const i=t.length/r,s=n[0],a=n[1],l=n[2],c=n[4],u=n[5],h=n[6],f=n[8],p=n[9],g=n[10],d=n[12],m=n[13],y=n[14];let x=0,v=0;for(let n=0;n<i;n++){const n=e[x],i=e[x+1],w=e[x+2];t[v]=s*n+c*i+f*w+d,t[v+1]=a*n+u*i+p*w+m,t[v+2]=l*n+h*i+g*w+y,x+=o,v+=r}return t}function s(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,o=3,i=o){if(t.length/o!==Math.ceil(e.length/i))return void(0,r.A)().error("source and destination buffers need to have the same number of elements");const s=t.length/o,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],g=n[7],d=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=e[m],r=e[m+1],s=e[m+2];t[y]=a*n+u*r+p*s,t[y+1]=l*n+h*r+g*s,t[y+2]=c*n+f*r+d*s,m+=i,y+=o}}function l(t,e,n){c(t.typedBuffer,e,n,t.typedBufferStride)}function c(t,e,n,r=3){const o=Math.min(t.length/r,e.count),i=e.typedBuffer,s=e.typedBufferStride;let a=0,l=0;for(let e=0;e<o;e++)t[l]=n*i[a],t[l+1]=n*i[a+1],t[l+2]=n*i[a+2],a+=s,l+=r}function u(t,e,n,r=3,o=r){const i=t.length/r;if(i!==Math.ceil(e.length/o))return t;let s=0,a=0;for(let l=0;l<i;l++)t[a]=e[s]+n[0],t[a+1]=e[s+1]+n[1],t[a+2]=e[s+2]+n[2],s+=o,a+=r;return t}function h(t,e){f(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function f(t,e,n=3,r=n){const o=Math.min(t.length/n,e.length/r);let i=0,s=0;for(let a=0;a<o;a++){const o=e[i],a=e[i+1],l=e[i+2],c=o*o+a*a+l*l;if(c>0){const e=1/Math.sqrt(c);t[s]=e*o,t[s+1]=e*a,t[s+2]=e*l}i+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:f,normalizeView:h,scale:c,scaleView:l,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),o=t.typedBuffer,i=t.typedBufferStride,s=e.typedBuffer,a=e.typedBufferStride;let l=0,c=0;for(let t=0;t<r;t++)o[c]=s[l]>>n,o[c+1]=s[l+1]>>n,o[c+2]=s[l+2]>>n,l+=a,c+=i},transformMat3:a,transformMat3View:s,transformMat4:i,transformMat4View:o,translate:u},Symbol.toStringTag,{value:"Module"}))},63316:(t,e,n)=>{n.d(e,{AD:()=>h,wV:()=>u});var r=n(2600),o=n(20744),i=n(10860),s=n(28176),a=n(49416);let l=null,c=!0;function u(t,e,n,r){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(c)try{return new ImageData(t,e,n)}catch(t){c=!1}const o=function(t,e,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(t,e)}(e,n,r);return o.data.set(t,0),o}async function h(t,e){const{arrayBuffer:l,mediaType:c}=await async function(t,e){const n=(0,s.nV)(t);if(n?.isBase64)return{arrayBuffer:(0,a.K)(n.data),mediaType:n.mediaType};const o=await(0,r.c)(t,{responseType:"array-buffer",...e});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(t,e),u="image/png"===c;if("image/gif"===c){const{isAnimatedGIF:t,parseGif:r}=await n.e(8560).then(n.bind(n,68560));if(t(l))return r(l,e)}if(u){const{isAnimatedPNG:t,parseApng:r}=await n.e(4464).then(n.bind(n,84464));if(t(l))return r(l,e)}return async function(t,e){const n=window.URL.createObjectURL(t);try{const{data:t}=await(0,r.c)(n,{...e,responseType:"image"});return t}catch(t){if(!(0,i.mA)(t))throw new o.c("invalid-image",`Could not fetch requested image at ${n}`);throw t}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:c}),e)}},94716:(t,e,n)=>{n.d(e,{c:()=>zt});var r=n(41948),o=n(26832),i=n(20744),s=n(95800),a=n(66360),l=n(94804),c=n(10860),u=n(57896),h=n(1580),f=(n(9456),n(72052),n(12552)),p=n(62484),g=n(95247),d=n(50853),m=n(67776),y=n(7488),x=n(66952),v=n(43912);const w="Expected location to be a Point instance";class A extends i.c{constructor(){super("invalid-input:location",w)}}var b=n(51232),_=n(13708),S=n(41104),T=n(82384),M=n(21136),q=n(17012),C=n(82315),F=n(47452),O=n(15688),L=n(97143),I=n(77080),P=(n(60708),n(53648)),R=n(24296),j=n(98472),k=n(58632);n(89560),n(74376),n(71520),n(4636);const U=(0,k.Su)();function N(t,e,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=t[e];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,e+=n}return o/3}function E(t,e,n){if(e){const e=function(t,e,n){const r=function(t,e,n,r){const o=(t=>!Array.isArray(t[0]))(e)?(t,n)=>e[3*t+n]:(t,n)=>e[t][n],i=r?(0,R.k8)(r)/(0,R.gl)(r):1;return(0,k.XX)(t,((t,e)=>(0,j.s)(t,o(e,0)*i,o(e,1)*i,o(e,2))),n)}(U,t,e,n)?(0,k.Oq)(U):[0,0,1];return Math.abs(r[2])>Math.cos((0,P.EF)(80))?C.k.Z:Math.abs(r[1])>Math.abs(r[0])?C.k.Y:C.k.X}(t,t.length-1,n);if(e===C.k.X)return!(0,F.K_)(t,C.k.Y,C.k.Z);if(e===C.k.Y)return!(0,F.K_)(t,C.k.X,C.k.Z)}return!(0,F.K_)(t,C.k.X,C.k.Y)}var D,B;(B=D||(D={}))[B.NONE=0]="NONE",B[B.CCW_IS_HOLE=1]="CCW_IS_HOLE";var W=n(54828);let z=null;function $(t,e){let n=1/0,r=1/0,o=1/0,i=-1/0,s=-1/0,a=-1/0;const l=t.length;let c=0;for(;c<l;){const e=t[c++],l=t[c++],u=t[c++];n=Math.min(n,e),r=Math.min(r,l),o=Math.min(o,u),i=Math.max(i,e),s=Math.max(s,l),a=Math.max(a,u)}return new g.c({xmin:n,ymin:r,zmin:o,xmax:i,ymax:s,zmax:a,spatialReference:e})}var G=n(93184),H=n(71488);const Z="esri.geometry.support.meshUtils.centerAt";const K=(0,p.Su)(),V=(0,p.Su)(),Y=(0,p.Su)();var X=n(28176);function Q(t){const e=(0,X.iu)(t.url);return n=>{const r=(0,X.SU)(n,e,e),o=r?r.replace(/^ *\.\//,""):null;return(o?t.files.get(o):null)??n}}function J(t){return it.fromBlob(t,st(t.name,t.type))}const tt=/^model\/gltf\+json$/,et=/^model\/gltf-binary$/,nt=/\.gltf$/i,rt=/\.glb$/i;function ot(t){const e=new Map;let n,r=null;for(const{name:o,mimeType:i,source:s}of t)null===r&&(tt.test(i)||nt.test(o)?(r=s.url,n="gltf"):(et.test(i)||rt.test(o))&&(r=s.url,n="glb")),e.set(o,s.url),s.files.forEach(((t,n)=>e.set(n,t)));if(null==r)throw new i.c("mesh-load-external:missing-files","Missing files to load external mesh source");return new it(r,(()=>t.forEach((({source:t})=>t.dispose()))),e,n)}class it{constructor(t,e=(()=>{}),n=new Map,r){this.url=t,this.dispose=e,this.files=n,this.type=r}static fromBlob(t,e){const n=URL.createObjectURL(t);return new it(n,(()=>URL.revokeObjectURL(n)),void 0,e)}}function st(t,e){return tt.test(e)||nt.test(t)?"gltf":et.test(e)||nt.test(t)?"glb":void 0}var at=n(3856),lt=n(2952),ct=n(54264);let ut=class extends at.m{constructor(){super(),this.externalSources=new lt.c,this._explicitDisplaySource=null,this.addHandles((0,u.on)((()=>this.externalSources),"after-remove",(({item:t})=>{t===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(t){if(null!=t&&!(0,ct.Ud)(t))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=t,t&&this.externalSources.every((e=>!(0,ct._o)(e,t)))&&this.externalSources.add(t)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(t){return this.externalSources.items.filter((e=>(0,ct.v_)(e,t)))}get _implicitDisplaySource(){return this.externalSources.find(ct.Ud)}};(0,r._)([(0,h.qq)()],ut.prototype,"externalSources",void 0),(0,r._)([(0,h.qq)()],ut.prototype,"displaySource",null),(0,r._)([(0,h.qq)()],ut.prototype,"_implicitDisplaySource",null),(0,r._)([(0,h.qq)()],ut.prototype,"_explicitDisplaySource",void 0),ut=(0,r._)([(0,f.c)("esri.geometry.support.meshUtils.Metadata")],ut);var ht=n(68612);const ft={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function pt(t,e,n){t.isPlane||function(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}(t),function(t,e){if(null!=e){yt[0]=e[0],yt[4]=e[1],yt[8]=e[2];for(let e=0;e<t.position.length;e+=3){for(let n=0;n<3;n++)mt[n]=t.position[e+n];(0,j.t)(mt,mt,yt);for(let n=0;n<3;n++)t.position[e+n]=mt[n]}if(e[0]!==e[1]||e[1]!==e[2]){yt[0]=1/e[0],yt[4]=1/e[1],yt[8]=1/e[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)mt[n]=t.normal[e+n];(0,j.t)(mt,mt,yt),(0,j.n)(mt,mt);for(let n=0;n<3;n++)t.normal[e+n]=mt[n]}}}}(t,function(t,e,n){const r=(0,W._0)(e,n);if(null==t&&1===r)return null;if(null==t)return[r,r,r];if("number"==typeof t){const e=t*r;return[e,e,e]}return[null!=t.width?t.width*r:r,null!=t.depth?t.depth*r:r,null!=t.height?t.height*r:r]}(n?.size,n?.unit,e.spatialReference));const{vertexAttributes:r,vertexSpace:o,transform:i}=(0,W.EX)(t,e,{vertexSpace:n?.vertexSpace,geographic:n?.geographic});return{vertexAttributes:new T.s({...r,uv:t.uv}),vertexSpace:o,transform:i,components:[new v.c({faces:t.faces,material:n?.material||null})],spatialReference:e.spatialReference}}const gt={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},dt={south:0,east:1,north:2,west:3,up:4,down:5},mt=(0,p.Su)(),yt=(0,ht.Su)();var xt=n(77556),vt=n(15008),wt=n(87104),At=n(82448),bt=n(51120),_t=n(38496);const St="esri.geometry.support.meshUtils.rotate";function Tt(t,e,n,r=p.cX){if(null!=t){(0,vt.IT)(Ft,(0,x.kX)(e),(0,x.Yz)(e));for(let e=0;e<t.length;e+=n){for(let n=0;n<3;n++)Mt[n]=t[e+n]-r[n];(0,j.e)(Mt,Mt,Ft);for(let n=0;n<3;n++)t[e+n]=Mt[n]+r[n]}}}const Mt=(0,p.Su)(),qt=(0,p.Su)(),Ct=(0,x.Su)(),Ft=(0,wt.Su)(),Ot=(0,ht.Su)(),Lt=(0,p.Su)(),It="esri.geometry.support.meshUtils.scale";function Pt(t,e,n=p.cX){if(t)for(let r=0;r<t.length;r+=3){for(let e=0;e<3;e++)Rt[e]=t[r+e]-n[e];(0,j.i)(Rt,Rt,e);for(let e=0;e<3;e++)t[r+e]=Rt[e]+n[e]}}const Rt=(0,p.Su)(),jt=(0,p.Su)(),kt=(0,p.Su)();var Ut;const Nt="esri.geometry.Mesh";function Et(){return a.c.getLogger(Nt)}const Dt={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:b.c,local:_.c}};let Bt=Ut=class extends(s.c.LoadableMixin((0,l.g)(d.c))){constructor(t){super(t),this.components=null,this.vertexSpace=new b.c,this.transform=null,this.metadata=new ut,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new T.s,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,u.aE)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((t=>t.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:t,spatialReference:e,vertexAttributes:n,vertexSpace:r}=this,o=n.position;if(0===o.length||t&&0===t.length)return new g.c({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:e});if("local"===r.type){const{_untransformedExtent:t,transform:n}=this;return function({xmin:t,xmax:e,ymin:n,ymax:r,zmin:o,zmax:i},s,a,l){o??=0,i??=0,z??=new Float64Array(24);const c=z;return c[0]=t,c[1]=n,c[2]=o,c[3]=t,c[4]=r,c[5]=o,c[6]=e,c[7]=r,c[8]=o,c[9]=e,c[10]=n,c[11]=o,c[12]=t,c[13]=n,c[14]=i,c[15]=t,c[16]=r,c[17]=i,c[18]=e,c[19]=r,c[20]=i,c[21]=e,c[22]=n,c[23]=i,(0,W.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c}),$(c,l)}(t,n,r,e)}if("georeferenced"===r.type&&(0,M.k$)(r)){const{transform:t}=this;return $((0,W.project)({positions:o,transform:t,vertexSpace:r,inSpatialReference:e,outSpatialReference:e}),e)}return $(o,e)}get _untransformedExtent(){return $(this.vertexAttributes.position,this.spatialReference)}get anchor(){const t=(0,M.mA)(this.vertexSpace,this.spatialReference);if(null!=t)return t;const{center:e,zmin:n}=this._transformedExtent;return new m.c({x:e.x,y:e.y,z:n,spatialReference:this.spatialReference})}get origin(){const t=(0,M.mA)(this.vertexSpace,this.spatialReference);return null!=t?t:this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(t){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(v.c.from(t)),this.notifyChange("components"))}removeComponent(t){if(this._checkIfLoaded("removeComponent()")){if(this.components){const e=this.components.indexOf(t);if(-1!==e)return this.components.splice(e,1),void this.notifyChange("components")}Et().error("removeComponent()","Provided component is not part of the list of components")}}rotate(t,e,n,r){return(0,x.GA)(t,e,n,Wt),function(t,e,n){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:r,vertexSpace:o}=t,i=n?.origin??t.anchor,s=n?.geographic,l=(0,H.QL)(St,o,r,s);(0,M.k$)(o)?(t.transform??=new S.c,function(t,e,n,r){const o=(0,j.s)(Mt,r.x,r.y,r.z??0),i=(0,j.f)(Mt,o,e);t.applyLocalInverse(i,qt),t.rotation=(0,x.Jn)(t.rotation,n,(0,x.Su)()),t.applyLocalInverse(i,i),(0,j.f)(i,i,qt),t.translation=(0,j.g)((0,p.Su)(),t.translation,i)}(t.transform,o.origin,e,i)):l?function(t,e,n){const r=t.spatialReference,o=(0,At._s)(r),i=Lt;(0,G.M)(n,i,o)||(0,G.M)(t.origin,i,o);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,bt.y)(o,i,Ft,o),(0,xt.kr)(Ot,Ft);const f=Ct;(0,j.t)((0,x.Yz)(Ct),(0,x.Yz)(e),Ot),f[3]=e[3],(0,_t.K_)(s,r,c),null!=a&&null!=u&&(0,_t.cH)(a,s,c,r,u),null!=l&&null!=h&&(0,_t.GW)(l,s,c,r,h),Tt(c,f,3,i),(0,_t.o$)(c,s,r),null!=a&&null!=u&&(Tt(u,f,3),(0,_t.QP)(u,s,c,r,a)),null!=l&&null!=h&&(Tt(h,f,4),(0,_t.Cr)(h,s,c,r,l)),t.vertexAttributesChanged()}(t,e,i):function(t,e,n){const r=Lt;if(!(0,G.M)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,a.c.getLogger(St).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Tt(t.vertexAttributes.position,e,3,r),Tt(t.vertexAttributes.normal,e,3),Tt(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}(t,e,i)}(this,Wt,r),this}offset(t,e,n){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:r,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,M.k$)(r)){const[o,i,s]=r.origin;r.origin=(0,p.WK)(o+t,i+e,s+n)}else{for(let r=0;r<i.length;r+=3)i[r]+=t,i[r+1]+=e,i[r+2]+=n;this.vertexAttributesChanged()}return this}scale(t,e){return this._checkIfLoaded("scale()")?(function(t,e,n){if(!t.vertexAttributes?.position)return;const{vertexSpace:r,spatialReference:o}=t,i=n?.origin??t.anchor,s=n?.geographic,l=(0,H.QL)(It,r,o,s);(0,M.k$)(r)?(t.transform??=new S.c,function(t,e,n,r){const o=(0,j.s)(Rt,r.x,r.y,r.z),i=(0,j.f)(Rt,o,e);t.applyLocalInverse(i,jt);const s=(0,j.i)((0,p.Su)(),t.scale,n);t.scale=s,t.applyLocalInverse(i,i),(0,j.f)(i,i,jt),t.translation=(0,j.g)((0,p.Su)(),t.translation,i)}(t.transform,r.origin,e,i)):l?function(t,e,n){const r=t.spatialReference,o=(0,At._s)(r),i=kt;(0,G.M)(n,i,o)||(0,G.M)(t.origin,i,o);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,_t.K_)(s,r,c),null!=a&&null!=u&&(0,_t.cH)(a,s,c,r,u),null!=l&&null!=h&&(0,_t.GW)(l,s,c,r,h),Pt(c,e,i),(0,_t.o$)(c,s,r),null!=a&&null!=u&&(0,_t.QP)(u,s,c,r,a),null!=l&&null!=h&&(0,_t.Cr)(h,s,c,r,l),t.vertexAttributesChanged()}(t,e,i):function(t,e,n){const r=kt;if(!(0,G.M)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,a.c.getLogger(It).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Pt(t.vertexAttributes.position,e,r),t.vertexAttributesChanged()}(t,e,i)}(this,t,e),this):this}centerAt(t,e){return this._checkIfLoaded("centerAt()")?(function(t,e,n){if(!t.vertexAttributes?.position)return;const{vertexSpace:r}=t,o=n?.origin??t.anchor,i=n?.geographic,s=(0,H.QL)(Z,r,o.spatialReference,i);(0,M.k$)(r)?function(t,e,n){const{vertexSpace:r}=t;if(!(0,M.k$)(r))return;const o=V,i=K;if(!(0,G.M)(e,i,t.spatialReference))return void a.c.getLogger(Z).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,G.M)(n,o,t.spatialReference)){const e=t.origin;o[0]=e.x,o[1]=e.y,o[2]=e.z,a.c.getLogger(Z).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const s=(0,j.f)(Y,i,o);r.origin=(0,j.g)((0,p.Su)(),r.origin,s)}(t,e,o):s?function(t,e,n){const r=(0,W.qu)(t.vertexAttributes,n),{position:o,normal:i,tangent:s}=(0,W.mC)(r,e,!1);t.vertexAttributes.position=o,t.vertexAttributes.normal=i,t.vertexAttributes.tangent=s,t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=V,o=K;if((0,G.M)(e,o,t.spatialReference)){if(!(0,G.M)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,a.c.getLogger(Z).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(t,e,n){if(t)for(let r=0;r<t.length;r+=3)for(let o=0;o<3;o++)t[r+o]+=e[o]-n[o]})(t.vertexAttributes.position,o,r),t.vertexAttributesChanged()}else a.c.getLogger(Z).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(t,e,o)}(this,t,e),this):this}load(t){const{metadata:{displaySource:e}}=this;return e&&this.addResolvingPromise(async function(t,e,r){const{source:o}=e,{loadGLTFMesh:s}=await(0,c.Yv)(Promise.all([n.e(8108),n.e(2818)]).then(n.bind(n,42818)),r),a=await async function(t,e){if(Array.isArray(t)){if(!t.length)throw new i.c("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?function(t){return ot(t.map((t=>({name:t.name,mimeType:t.type,source:J(t)}))))}(t):async function(t,e){const n=await(0,c.Y3)(t.map((async t=>{const n=await async function(t,e){const{parts:n,assetMimeType:r,assetName:o}=t;if(1===n.length)return new it(n[0].partUrl);const i=await t.toBlob(e);return(0,c.wp)(e),it.fromBlob(i,st(o,r))}(t);return(0,c.wp)(e),{name:t.assetName,mimeType:t.assetMimeType,source:n}})));if((0,c.wv)(e))throw n.forEach((t=>t.source.dispose())),(0,c.Uh)();return ot(n)}(t,e)}return J(t)}(o,r);(0,c.wp)(r);const l=s(new m.c({x:0,y:0,z:0,spatialReference:t.spatialReference}),a.url,{resolveFile:Q(a),signal:r?.signal,expectedType:a.type});l.then((()=>a.dispose()),(()=>a.dispose()));const{vertexAttributes:u,components:h}=await l;t.vertexAttributes=u,t.components=h}(this,e,t)),Promise.resolve(this)}addExternalSources(t){this.metadata.externalSources.addMany(t)}updateDisplaySource(t){this.metadata.displaySource=t}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(t){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const n={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:t,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ut(n)}cloneShallow(){return new Ut({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(t){const e=n.e(4232).then(n.bind(n,4232)),r=this.load(),o=await Promise.all([e,r]),{toBinaryGLTF:i}=o[0];return i(this,t)}get memoryUsage(){let t=0;if(t+=this.vertexAttributes.memoryUsage,null!=this.components)for(const e of this.components)t+=e.memoryUsage;return t}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(t){return!!this.loaded||(Et().error(t,"Mesh must be loaded before applying operations"),!1)}static createBox(t,e){if(!(t instanceof m.c))return Et().error(".createBox()",w),null;const n=new Ut(pt(function(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=gt,r=4*t.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*t.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<t.length;r++){const f=t[r],p=l/3;for(const t of e)a[h++]=p+t;const g=f.corners;for(let t=0;t<4;t++){const e=g[t];let r=0;s[u++]=.25*n[t][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==f.axis[t]?(o[l++]=.5*f.axis[t],i[c++]=f.axis[t]):(o[l++]=.5*e[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),t,e));return e?.imageFace&&"all"!==e.imageFace?function(t,e){const n=t.components[0],r=n.faces,o=dt[e],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let t=0;t<r.length;t++)t>=i&&t<i+6?s[l++]=r[t]:a[c++]=r[t];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new v.c({faces:s,material:n.material}),new v.c({faces:a})],t}(n,e.imageFace):n}static createSphere(t,e){return t instanceof m.c?new Ut(pt(function(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((e-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let t=0;t<=e;t++){const r=t/e*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);mt[2]=p;const g=0===t||t===e,d=g?n-1:n;for(let r=0;r<=d;r++){const p=r/d*2*Math.PI;mt[0]=-Math.sin(p)*f,mt[1]=Math.cos(p)*f;for(let t=0;t<3;t++)o[l]=.5*mt[t],i[l]=mt[t],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=t/e,0!==t&&r!==n&&(t!==e&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==t&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:o,normal:i,uv:s,faces:a}}(e?.densificationFactor||0),t,e)):(Et().error(".createSphere()",w),null)}static createCylinder(t,e){return t instanceof m.c?new Ut(pt(function(t=0){const e=Math.round(16*2**t),n=4*(e+1)+2*e,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*e*3);let a=0,l=0,c=0,u=0,h=0;for(let t=0;t<=5;t++){const n=0===t||5===t,f=t<=1||t>=4,p=2===t||4===t,g=n?e-1:e;for(let d=0;d<=g;d++){const m=d/g*2*Math.PI,y=n?0:.5;mt[0]=y*Math.sin(m),mt[1]=y*-Math.cos(m),mt[2]=t<=2?.5:-.5;for(let e=0;e<3;e++)r[a++]=mt[e],o[l++]=f?2===e?t<=1?1:-1:0:2===e?0:mt[e]/y;i[c++]=(d+(n?.5:0))/e,i[c++]=t<=1?1*t/3:t<=3?1*(t-2)/3+1/3:1*(t-4)/3+2/3,p||0===t||d===e||(5!==t&&(s[u++]=h,s[u++]=h+1,s[u++]=h-e),1!==t&&(s[u++]=h,s[u++]=h-e,s[u++]=h-e-1)),h++}}return{position:r,normal:o,uv:i,faces:s}}(e?.densificationFactor||0),t,e)):(Et().error(".createCylinder()",w),null)}static createPlane(t,e){if(!(t instanceof m.c))return Et().error(".createPlane()",w),null;const n=e?.facing??"up",r=function(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,e?.size);return new Ut(pt(function(t){const e=ft.facingAxisOrderSwap[t],n=ft.position,r=ft.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let t=0;t<4;t++){const t=s;for(let a=0;a<3;a++){const l=e[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[t+c]*u,i[s]=r[t+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(ft.uv),faces:new Uint32Array(ft.faces),isPlane:!0}}(n),t,{...e,size:r}))}static createFromPolygon(t,e){if(!(t instanceof y.c))return Et().error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const n=function(t){const e=function(t,e,n,r){const o=t.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,h=0;for(let e=0;e<o;++e)h+=t[e].length;const f=(0,O.Gg)(3*h);let p=0;for(let h=o-1;h>=0;h--){const g=t[h],d=n===D.CCW_IS_HOLE&&E(g,e,r);if(d&&1!==o)i[l++]=g;else{let t=g.length;for(let e=0;e<l;++e)t+=i[e].length;const n={index:p,pathLengths:new Array(l+1),count:t,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:p,count:g.length}),p=d?N(g,g.length-1,-1,f,p,g.length,e):N(g,0,1,f,p,g.length,e);for(let t=0;t<l;++t){const r=i[t];n.holeIndices[t]=p,n.pathLengths[t+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=N(r,0,1,f,p,r.length,e)}l=0,n.count>0&&(s[c++]=n)}}for(let t=0;t<l;++t){const n=i[t];n.length>0&&(a[u++]={index:p,count:n.length}),p=N(n,0,1,f,p,n.length,e)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(t.rings,t.hasZ,D.CCW_IS_HOLE,t.spatialReference),n=new Array;let r=0,o=0;for(const t of e.polygons){const i=t.count,s=t.index,a=(0,O.lL)(e.position,3*s,3*i),l=t.holeIndices.map((t=>t-s)),c=(0,L.Uv)((0,q.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,o+=c.length}const i=function(t,e,n){if(1===t.length)return t[0];const r=(0,O.Gg)(e),o=new Array(n);let i=0,s=0,a=0;for(const e of t){for(let t=0;t<e.position.length;t++)r[i++]=e.position[t];for(const t of e.faces)o[s++]=t+a;a=i/3}return{position:r,faces:(0,L.Uv)(o)}}(n,r,o),s=Array.isArray(i.position)?(0,I.g)(i.position,3,{originalIndices:i.faces}):(0,I.g)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,O.cp)(new Float64Array(s.buffer)),i.faces=s.indices,i}(t);return new Ut({vertexAttributes:new T.s({position:n.position}),components:[new v.c({faces:n.faces,shading:"flat",material:e?.material??null})],spatialReference:t.spatialReference,vertexSpace:new b.c})}static async createFromGLTF(t,e,r){if(!(t instanceof m.c)){const t=new A;throw Et().error(".createfromGLTF()",t.message),t}const{loadGLTFMesh:o}=await(0,c.Yv)(Promise.all([n.e(8108),n.e(2818)]).then(n.bind(n,42818)),r);return new Ut(await o(t,e,r))}static async createFromFiles(t,e,n){if((0,o.gx)(Et(),"`Mesh.createFromFiles` is deprecated in favor of 'SceneLayer.convertMesh'",{replacement:"SceneLayer.convertMesh",version:"4.29"}),!(t instanceof m.c)){const t=new A;throw(t=>{Et().error(".createFromFiles()",t.message)})(t),t}if(!n?.layer)throw new i.c("invalid:no-layer","SceneLayer required for file to mesh conversion.");return n.layer.convertMesh(e,{location:t,...n})}static createWithExternalSource(t,e,n){const r=n?.extent??null,{x:o,y:i,z:s,spatialReference:a}=t,l=n?.transform?.clone()??new S.c,c=n?.vertexSpace??new _.c({origin:[o,i,s??0]}),u={source:e,extent:r},h=new ut;return h.externalSources.push(u),new Ut({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(t,e){const{x:n,y:r,z:o,spatialReference:s}=t,a=e?.transform?.clone()??new S.c,l=e?.vertexSpace??new _.c({origin:[n,r,o??0]}),c=new Ut({transform:a,vertexSpace:l,spatialReference:s});return c.addResolvingPromise(Promise.reject(new i.c("mesh-incomplete","Mesh resources are not complete"))),c}};(0,r._)([(0,h.qq)({type:[v.c],json:{write:!0}})],Bt.prototype,"components",void 0),(0,r._)([(0,h.qq)({nonNullable:!0,types:Dt,constructOnly:!0,json:{write:!0}})],Bt.prototype,"vertexSpace",void 0),(0,r._)([(0,h.qq)({type:S.c,json:{write:!0}})],Bt.prototype,"transform",void 0),(0,r._)([(0,h.qq)({constructOnly:!0})],Bt.prototype,"metadata",void 0),(0,r._)([(0,h.qq)()],Bt.prototype,"hasExtent",null),(0,r._)([(0,h.qq)()],Bt.prototype,"_transformedExtent",null),(0,r._)([(0,h.qq)()],Bt.prototype,"_untransformedExtent",null),(0,r._)([(0,h.qq)()],Bt.prototype,"anchor",null),(0,r._)([(0,h.qq)()],Bt.prototype,"origin",null),(0,r._)([(0,h.qq)({readOnly:!0,json:{read:!1}})],Bt.prototype,"extent",null),(0,r._)([(0,h.qq)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Bt.prototype,"hasZ",void 0),(0,r._)([(0,h.qq)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Bt.prototype,"hasM",void 0),(0,r._)([(0,h.qq)({type:T.s,nonNullable:!0,json:{write:!0}})],Bt.prototype,"vertexAttributes",void 0),Bt=Ut=(0,r._)([(0,f.c)(Nt)],Bt);const Wt=(0,x.Su)(),zt=Bt},15688:(t,e,n)=>{n.d(e,{Gg:()=>o,cp:()=>i,lL:()=>s,mw:()=>a,qW:()=>l});var r=n(72008);function o(t,e=!1){return t<=r._?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function i(t){return((0,r.c7)(t)?t.length:t.byteLength/8)<=r._?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function a(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}function l(t){return Array.isArray(t)?new Float64Array(t):t}},43912:(t,e,n)=>{n.d(e,{c:()=>m});var r,o=n(41948),i=n(40504),s=n(62088),a=n(66360),l=n(1580),c=n(33392),u=n(12552),h=n(53368),f=n(96344),p=n(70492),g=n(82384);let d=r=class extends i.am{static from(t){return(0,h.uY)(r,t)}constructor(t){super(t),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(t){return(0,g.c)(t,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},a.c.getLogger(this))}castMaterial(t){return(0,h.uY)(t&&"object"==typeof t&&("metallic"in t||"roughness"in t||"metallicRoughnessTexture"in t)?p.c:f.c,t)}clone(){return new r({faces:(0,s.ct)(this.faces),shading:this.shading,material:(0,s.ct)(this.material),trustSourceNormals:this.trustSourceNormals,name:this.name})}cloneWithDeduplication(t,e){const n={faces:(0,s.ct)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(t,e):null,trustSourceNormals:this.trustSourceNormals,name:this.name};return new r(n)}get memoryUsage(){let t=0;return null!=this.faces&&(t+=this.faces.byteLength),null!=this.material&&(t+=this.material.memoryUsage),t}};(0,o._)([(0,l.qq)({json:{write:!0}})],d.prototype,"faces",void 0),(0,o._)([(0,c.W)("faces")],d.prototype,"castFaces",null),(0,o._)([(0,l.qq)({type:f.c,json:{write:!0}})],d.prototype,"material",void 0),(0,o._)([(0,c.W)("material")],d.prototype,"castMaterial",null),(0,o._)([(0,l.qq)()],d.prototype,"name",void 0),(0,o._)([(0,l.qq)({type:String,json:{write:!0}})],d.prototype,"shading",void 0),(0,o._)([(0,l.qq)({type:Boolean})],d.prototype,"trustSourceNormals",void 0),d=r=(0,o._)([(0,u.c)("esri.geometry.support.MeshComponent")],d);const m=d},51232:(t,e,n)=>{n.d(e,{c:()=>u});var r=n(41948),o=n(3856),i=n(40504),s=n(1580),a=(n(9456),n(66360),n(72052),n(9968)),l=n(12552);let c=class extends((0,o.q)(i.am)){constructor(t){super(t),this.type="georeferenced",this.origin=null}};(0,r._)([(0,a.G)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,r._)([(0,s.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r._)([(0,l.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c);const u=c},13708:(t,e,n)=>{n.d(e,{c:()=>h});var r=n(41948),o=n(3856),i=n(40504),s=n(1580),a=(n(9456),n(66360),n(72052),n(9968)),l=n(12552),c=n(62484);let u=class extends((0,o.q)(i.am)){constructor(t){super(t),this.type="local",this.origin=(0,c.Su)()}};(0,r._)([(0,a.G)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r._)([(0,l.c)("esri.geometry.support.MeshLocalVertexSpace")],u);const h=u},96344:(t,e,n)=>{n.d(e,{c:()=>f});var r,o=n(41948),i=n(44728),s=n(40504),a=n(1580),l=(n(9456),n(66360),n(72052),n(12552)),c=n(7192),u=n(56160);let h=r=class extends s.am{constructor(t){super(t),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,o),o}clonePropertiesWithDeduplication(t){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(t),normalTexture:this.normalTexture?.cloneWithDeduplication(t),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let t=0;return t+=null!=this.color?16:0,null!=this.colorTexture&&(t+=this.colorTexture.memoryUsage),t+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(t+=this.normalTexture.memoryUsage),t+=null!=this.normalTextureTransform?20:0,t}};(0,o._)([(0,a.qq)({type:i.c,json:{write:!0}})],h.prototype,"color",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,o._)([(0,a.qq)({type:c.c,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,o._)([(0,a.qq)({type:u.c,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,o._)([(0,a.qq)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,o._)([(0,a.qq)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,o._)([(0,a.qq)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,o._)([(0,l.c)("esri.geometry.support.MeshMaterial")],h);const f=h},70492:(t,e,n)=>{n.d(e,{c:()=>f});var r,o=n(41948),i=n(44728),s=n(1580),a=(n(9456),n(66360),n(72052),n(12552)),l=n(96344),c=n(7192),u=n(56160);let h=r=class extends l.c{constructor(t){super(t),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,o),o}getMemoryUsage(){let t=super.getMemoryUsage();return t+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(t+=this.emissiveTexture.memoryUsage),t+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(t+=this.occlusionTexture.memoryUsage),t+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(t+=this.metallicRoughnessTexture.memoryUsage),t+=null!=this.metallicRoughnessTextureTransform?20:0,t}clonePropertiesWithDeduplication(t){return{...super.clonePropertiesWithDeduplication(t),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(t),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(t),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(t),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,o._)([(0,s.qq)({type:i.c,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,o._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,o._)([(0,s.qq)({type:c.c,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,s.qq)({type:u.c,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,o._)([(0,a.c)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},7192:(t,e,n)=>{n.d(e,{c:()=>m});var r,o=n(41948),i=(n(9456),n(63316)),s=n(40504),a=n(1580),l=n(53368),c=(n(72052),n(33600)),u=n(12552),h=n(18996),f=n(91952);const p=new WeakMap;let g=0,d=r=class extends s.am{constructor(t){super(t),this.wrap="repeat"}get url(){return this._get("url")||null}set url(t){this._set("url",t),t&&this._set("data",null)}get data(){return this._get("data")||null}set data(t){this._set("data",t),t&&this._set("url",null)}writeData(t,e,n,r){if(t instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(t.src,r),crossOrigin:t.crossOrigin};e[n]=o}else if(t instanceof HTMLCanvasElement){const r=t.getContext("2d").getImageData(0,0,t.width,t.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};e[n]=o}else if(t instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(t.src,r),autoplay:t.autoplay,loop:t.loop,muted:t.muted,crossOrigin:t.crossOrigin,preload:t.preload};e[n]=o}else if(t instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(t)};e[n]=r}}readData(t){switch(t.type){case"image-element":{const e=new Image;return e.src=t.src,e.crossOrigin=t.crossOrigin,e}case"canvas-element":{const e=this._decodeImageData(t.imageData),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").putImageData(e,0,0),n}case"image-data":return this._decodeImageData(t.imageData);case"video-element":{const e=document.createElement("video");return e.src=t.src,e.crossOrigin=t.crossOrigin,e.autoplay=t.autoplay,e.loop=t.loop,e.muted=t.muted,e.preload=t.preload,e}default:return}}get transparent(){const t=this.data,e=this.url;if(t instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(t.getContext("2d").getImageData(0,0,t.width,t.height));if(t instanceof ImageData)return this._imageDataContainsTransparent(t);if(e){const t=e.substr(e.length-4,4).toLowerCase(),n=e.substr(0,15).toLocaleLowerCase();if(".png"===t||"data:image/png;"===n)return!0}return!1}set transparent(t){this._overrideIfSome("transparent",t)}get contentHash(){const t="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",e=(e="")=>`d:${e},t:${this.transparent},w:${t}`;return null!=this.url?e(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?e(this.data.src):(p.has(this.data)||p.set(this.data,++g),e(p.get(this.data))):e()}get memoryUsage(){let t=0;if(t+=null!=this.url?this.url.length:0,null!=this.data){const e=this.data;"data"in e?t+=e.data.byteLength:e instanceof HTMLImageElement?t+=e.naturalWidth*e.naturalHeight*3:e instanceof HTMLCanvasElement&&(t+=e.width*e.height*3)}return t}clone(){const t={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(t)}cloneWithDeduplication(t){const e=t.get(this);if(e)return e;const n=this.clone();return t.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(t){let e="";for(let n=0;n<t.data.length;n++)e+=String.fromCharCode(t.data[n]);return{data:btoa(e),width:t.width,height:t.height}}_decodeImageData(t){const e=atob(t.data),n=new Uint8ClampedArray(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return(0,i.wV)(n,t.width,t.height)}_imageDataContainsTransparent(t){for(let e=3;e<t.data.length;e+=4)if(255!==t.data[e])return!0;return!1}static from(t){return"string"==typeof t?new r({url:t}):t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData||t instanceof HTMLVideoElement?new r({data:t}):(0,l.uY)(r,t)}};(0,o._)([(0,a.qq)({type:String,json:{write:f.w}})],d.prototype,"url",null),(0,o._)([(0,a.qq)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.qq)()],d.prototype,"data",null),(0,o._)([(0,h.G)("data")],d.prototype,"writeData",null),(0,o._)([(0,c.E)("data")],d.prototype,"readData",null),(0,o._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype,"transparent",null),(0,o._)([(0,a.qq)({json:{write:!0}})],d.prototype,"wrap",void 0),(0,o._)([(0,a.qq)({readOnly:!0})],d.prototype,"contentHash",null),d=r=(0,o._)([(0,u.c)("esri.geometry.support.MeshTexture")],d);const m=d},56160:(t,e,n)=>{n.d(e,{c:()=>c});var r=n(41948),o=n(3856),i=n(40504),s=n(1580),a=(n(9456),n(66360),n(72052),n(12552));let l=class extends((0,o.q)(i.am)){constructor(t){super(t),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.c)("esri.geometry.support.MeshTextureTransform")],l);const c=l},41104:(t,e,n)=>{n.d(e,{c:()=>y});var r,o=n(41948),i=n(40504),s=n(1580),a=(n(9456),n(66360),n(72052),n(12552)),l=n(15008),c=n(87104),u=n(41512),h=n(2620),f=n(98472),p=n(62484),g=n(66952);let d=r=class extends i.am{constructor(t){super(t),this.translation=(0,p.Su)(),this.rotationAxis=(0,p.eu)(g.up),this.rotationAngle=0,this.scale=(0,p.WK)(1,1,1)}get rotation(){return(0,g.eE)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.ct)((0,g.Yz)(t)),this.rotationAngle=(0,g.i4)(t)}get localMatrix(){const t=(0,c.Su)();return(0,u.yG)(m,(0,g.Yz)(this.rotation),(0,g.kX)(this.rotation)),(0,l.um)(t,m,this.translation,this.scale),t}get localMatrixInverse(){return(0,l.S_)((0,c.Su)(),this.localMatrix)}applyLocal(t,e){return(0,f.e)(e,t,this.localMatrix)}applyLocalInverse(t,e){return(0,f.e)(e,t,this.localMatrixInverse)}equals(t){return this===t||null!=t&&(0,l.sF)(this.localMatrix,t.localMatrix)}clone(){const t={translation:(0,p.ct)(this.translation),rotationAxis:(0,p.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.ct)(this.scale)};return new r(t)}};(0,o._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,o._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,o._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,o._)([(0,s.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,o._)([(0,s.qq)()],d.prototype,"rotation",null),(0,o._)([(0,s.qq)()],d.prototype,"localMatrix",null),(0,o._)([(0,s.qq)()],d.prototype,"localMatrixInverse",null),d=r=(0,o._)([(0,a.c)("esri.geometry.support.MeshTransform")],d);const m=(0,h.Su)(),y=d},82384:(t,e,n)=>{n.d(e,{c:()=>p,s:()=>h});var r,o=n(41948),i=n(40504),s=n(62088),a=n(66360),l=n(1580),c=n(33392),u=n(12552);let h=r=class extends i.am{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return p(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.c.getLogger(this))}castPosition(t){return t&&t instanceof Float32Array&&a.c.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),p(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.c.getLogger(this))}castUv(t){return p(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.c.getLogger(this))}castNormal(t){return p(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.c.getLogger(this))}castTangent(t){return p(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.c.getLogger(this))}clone(){const t={position:(0,s.ct)(this.position),uv:(0,s.ct)(this.uv),normal:(0,s.ct)(this.normal),tangent:(0,s.ct)(this.tangent),color:(0,s.ct)(this.color)};return new r(t)}clonePositional(){const t={position:(0,s.ct)(this.position),normal:(0,s.ct)(this.normal),tangent:(0,s.ct)(this.tangent),uv:this.uv,color:this.color};return new r(t)}get memoryUsage(){let t=0;return t+=this.position.byteLength,null!=this.uv&&(t+=this.uv.byteLength),null!=this.normal&&(t+=this.normal.byteLength),null!=this.tangent&&(t+=this.tangent.byteLength),null!=this.color&&(t+=this.color.byteLength),t}};function f(t,e,n,r){const{loggerTag:o,stride:i}=e;return t.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):t}function p(t,e,n,r,o){if(!t)return t;if(t instanceof e)return f(t,r,e,o);for(const i of n)if(t instanceof i)return f(new e(t),r,e,o);if(Array.isArray(t))return f(new e(t),r,e,o);{const r=n.map((t=>`'${t.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new e([])}}function g(t,e,n){e[n]=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n];return e}(t)}(0,o._)([(0,l.qq)({json:{write:g}})],h.prototype,"color",void 0),(0,o._)([(0,c.W)("color")],h.prototype,"castColor",null),(0,o._)([(0,l.qq)({nonNullable:!0,json:{write:g}})],h.prototype,"position",void 0),(0,o._)([(0,c.W)("position")],h.prototype,"castPosition",null),(0,o._)([(0,l.qq)({json:{write:g}})],h.prototype,"uv",void 0),(0,o._)([(0,c.W)("uv")],h.prototype,"castUv",null),(0,o._)([(0,l.qq)({json:{write:g}})],h.prototype,"normal",void 0),(0,o._)([(0,c.W)("normal")],h.prototype,"castNormal",null),(0,o._)([(0,l.qq)({json:{write:g}})],h.prototype,"tangent",void 0),(0,o._)([(0,c.W)("tangent")],h.prototype,"castTangent",null),h=r=(0,o._)([(0,u.c)("esri.geometry.support.MeshVertexAttributes")],h)},66952:(t,e,n)=>{n.d(e,{GA:()=>h,Jn:()=>u,Su:()=>l,Yz:()=>f,eE:()=>c,i4:()=>p,kX:()=>g,up:()=>d});var r=n(53648),o=n(41512),i=n(2620),s=n(98472),a=n(62484);function l(t=d){return[t[0],t[1],t[2],t[3]]}function c(t,e,n=l()){return(0,s.c)(n,t),n[3]=e,n}function u(t,e,n=l()){return(0,o.yG)(m,t,g(t)),(0,o.yG)(y,e,g(e)),(0,o.iW)(m,y,m),function(t,e){return t[3]=e,t}(n,(0,r.UB)((0,o.C0)(n,m)))}function h(t,e,n,r=l()){return c(a.UV,t,x),c(a.IR,e,v),c(a.wx,n,w),u(x,v,x),u(x,w,r),r}function f(t){return t}function p(t){return t[3]}function g(t){return(0,r.EF)(t[3])}n(37008);const d=[0,0,1,0],m=(0,i.Su)(),y=(0,i.Su)(),x=(l(),l()),v=l(),w=l()},23704:(t,e,n)=>{n.d(e,{A:()=>o});var r=n(66360);const o=()=>r.c.getLogger("esri.views.3d.support.buffer.math")},24363:(t,e,n)=>{n.d(e,{C_:()=>u,Su:()=>l,i_:()=>c});var r=n(53648),o=n(52180),i=n(98472),s=n(62484),a=n(20136);function l(t){return t?{origin:(0,s.ct)(t.origin),vector:(0,s.ct)(t.vector)}:{origin:(0,s.Su)(),vector:(0,s.Su)()}}function c(t,e,n=l()){return(0,i.c)(n.origin,t),(0,i.f)(n.vector,e,t),n}function u(t,e,n){return function(t,e,n,o,s){const{vector:l,origin:c}=t,u=(0,i.f)(a.Wq.get(),e,c),h=(0,i.j)(l,u)/(0,i.o)(l);return(0,i.i)(s,l,(0,r.qk)(h,0,1)),(0,i.g)(s,s,t.origin)}(t,e,0,0,n)}(0,s.Su)(),(0,s.Su)(),new o.o((()=>l()))},54264:(t,e,n)=>{n.d(e,{CT:()=>x,Ki:()=>y,Si:()=>a,Ud:()=>c,_o:()=>d,ai:()=>l,mK:()=>v,v_:()=>g});var r=n(2600),o=n(92400),i=n(10860),s=n(4048);class a{constructor(t,e,n){this.assetName=t,this.assetMimeType=e,this.parts=n}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,o.yK)(this.parts,t.parts,((t,e)=>t.equals(e)))}isOnService(t){return this.parts.every((e=>e.isOnService(t)))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const n=await Promise.all(e.map((e=>e.toBlob(t))));return(0,i.wp)(t),new Blob(n)}}class l{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.c)(this.partUrl,{responseType:"blob"});return(0,i.wp)(t),e}}function c(t){return function(t){return!!t&&(Array.isArray(t)?t.some(p):p(t))}(t?.source)}function u(t){return!!Array.isArray(t)&&t.every((t=>t instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(t){if(t instanceof File){const{type:e,name:n}=t;return h.test(e)||f.test(n)}return h.test(t.assetMimeType)||f.test(t.assetName)}function g(t,e){if(!t)return!1;const{source:n}=t;return function(t,e){if(Array.isArray(t)){const n=t;return n.length>0&&n.every((t=>m(t,e)))}return m(t,e)}(n,e)}function d(t,e){if(t===e)return!0;const{source:n}=t,{source:r}=e;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...n].sort(t),o=[...r].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(o[t]))return!1;return!0}return!1}function m(t,e){return t instanceof a&&t.isOnService(e)}function y(t,e){return t instanceof File?(0,s.K0)(t,e):(0,s.me)(t.assetMimeType,e)??(0,s.If)(t.assetName,e)}function x(t){return Array.isArray(t)?t:[t]}function v(t){return!!t.original}},77080:(t,e,n)=>{n.d(e,{g:()=>i});var r=n(53648),o=n(97143);function i(t,e,n){const i=Array.isArray(t),u=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,u*e),f=n?.minReduction??0,p=n?.originalIndices||null,g=p?p.length:0,d=n?.componentOffsets||null;let m=0;if(d)for(let t=0;t<d.length-1;t++){const e=d[t+1]-d[t];e>m&&(m=e)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.w7)(2*y)));for(let t=0;t<2*y;t++)c[t]=0;let x=0;const v=!!d&&!!p,w=v?g:u;let A=(0,o.aw)(u);const b=new Uint32Array(g),_=1.96;let S=0!==f?Math.ceil(4*_*_/(f*f)*f*(1-f)):w,T=1,M=d?d[1]:w;for(let t=0;t<w;t++){if(t===S){const e=1-x/t;if(e+_*Math.sqrt(e*(1-e)/t)<f)return null;S*=2}if(t===M){for(let t=0;t<2*y;t++)c[t]=0;if(p)for(let t=d[T-1];t<d[T];t++)b[t]=A[p[t]];M=d[++T]}const n=v?p[t]:t,r=n*e,o=l(h,r,e);let i=o%y,a=x;for(;0!==c[2*i+1];){if(c[2*i]===o){const t=c[2*i+1]-1;if(s(h,r,t*e,e)){a=A[t];break}}i++,i>=y&&(i-=y)}a===x&&(c[2*i]=o,c[2*i+1]=n+1,x++),A[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let t=d[T-1];t<b.length;t++)b[t]=A[p[t]];A=(0,o.Uv)(b)}const q=i?new Array(x):new Uint32Array(x*e);x=0;for(let t=0;t<w;t++)A[t]===x&&(a(h,(v?p[t]:t)*e,q,x*e,e),x++);if(p&&!v){const t=new Uint32Array(g);for(let e=0;e<t.length;e++)t[e]=A[p[e]];A=(0,o.Uv)(t)}return{buffer:Array.isArray(q)?q:q.buffer,indices:A,uniqueCount:x}}function s(t,e,n,r){for(let o=0;o<r;o++)if(t[e+o]!==t[n+o])return!1;return!0}function a(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[e+i]}function l(t,e,n){let r=0;for(let o=0;o<n;o++)r=t[e+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},71488:(t,e,n)=>{n.d(e,{Kk:()=>a,QL:()=>l,yO:()=>s});var r=n(26832),o=n(66360),i=n(21136);function s(t,e){return t.isGeographic||t.isWebMercator&&(e??!0)}function a(t,e){switch(t.type){case"georeferenced":return e.isGeographic;case"local":return e.isGeographic||e.isWebMercator}}function l(t,e,n,s){if(void 0!==s){(0,r.O2)(o.c.getLogger(t),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const a="local"===e.type;if(!(0,i.k$)(e)||s===a)return n.isGeographic||n.isWebMercator&&s;o.c.getLogger(t).warnOnce(`Specifying the 'geographic' parameter (${s}) for a Mesh vertex space of type "${e.type}" is not supported. This parameter will be ignored.`)}return a(e,n)}},54828:(t,e,n)=>{n.d(e,{CE:()=>A,EX:()=>_,_0:()=>P,_S:()=>b,iS:()=>T,mC:()=>q,project:()=>M,qu:()=>F});var r=n(24296),o=n(68612),i=n(15008),s=n(87104),a=n(98472),l=n(62484),c=n(77556),u=n(60074),h=n(82448),f=n(51120),p=n(62880),g=n(15688),d=n(41104),m=n(21136),y=n(48952),x=n(71488),v=n(38496);function w(t,e,n){return(0,x.yO)(e.spatialReference,n?.geographic)?q(t,e,!1,n):function(t,e,n){const r=new Float64Array(t.position.length),o=t.position,i=e.x,s=e.y,a=e.z??0,l=P(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=o[t]*l+i,r[t+1]=o[t+1]*l+s,r[t+2]=o[t+2]*l+a;return{position:r,normal:t.normal,tangent:t.tangent}}(t,e,n)}function A(t,e=s.IJ){const{position:n,normal:r,tangent:o}=t;return{position:(0,y.a)(new Float64Array(n.length),n,e),normal:null!=r?(0,v.W4)(r,new Float32Array(r.length),e):null,tangent:null!=o?(0,v.AT)(o,new Float32Array(o.length),e):null}}function b(t,e,n,r){const{position:o,normal:i,tangent:s}=t;if(!(0,m.k$)(e))return{position:o,normal:i,tangent:s};const a=(0,m.mA)(e,r);return w(A(t,n?.localMatrix),a,{geographic:"local"===e.type})}function _(t,e,n){const r=(0,m.Al)(e,n),o=e.spatialReference,i=(0,m.k$)(r);if(!i)return{vertexAttributes:w(t,e,n),vertexSpace:r,transform:null};const{position:s,normal:a,tangent:l}=t,c=(0,x.Kk)(r,o);switch(r.type){case"georeferenced":return c?{vertexAttributes:q(t,e,i,n),vertexSpace:r,transform:null}:{vertexAttributes:{position:s,normal:a,tangent:l},vertexSpace:r,transform:new d.c};case"local":return{vertexAttributes:{position:s,normal:a,tangent:l},vertexSpace:r,transform:new d.c}}}function S(t,e,n){return(0,x.yO)(e.spatialReference,n?.geographic)?F(t,e,n):C(t,e,n)}function T(t,e,n,r,o){if(!(0,m.k$)(e))return S(t,r,o);const{spatialReference:i}=r,s=b(t,e,n,i);return r.equals((0,m.mA)(e,i))?C(s,r,o):S(s,r,o)}function M({positions:t,transform:e,vertexSpace:n,inSpatialReference:r,outSpatialReference:o,outPositions:c,localMode:d}){const m=n.origin??l.cX,x=null!=n.origin?e?.localMatrix??s.IJ:s.IJ;if("georeferenced"===n.type){const e=c??(0,g.Gg)(t.length);if((0,i.yK)(x,s.IJ)?(0,g.mw)(e,t):(0,y.a)(e,t,x),!(0,a.h)(m,l.cX)){const[t,n,r]=m;for(let o=0;o<e.length;o+=3)e[o]+=t,e[o+1]+=n,e[o+2]+=r}return(0,p.projectBuffer)(e,r,0,e,o,0,e.length/3),e}let v=r;const w=(0,h._s)(r);v=o.isWebMercator&&d||!(0,u.canProjectWithoutEngine)(r,w)?v:w,(0,f.y)(r,m,R,v),(0,i.iW)(R,R,x);const A=c??(0,g.Gg)(t.length);return(0,y.a)(A,t,R),(0,p.projectBuffer)(A,v,0,A,o,0,A.length/3),A}function q(t,e,n,r){const o=e.spatialReference,i=O(e,r,R),s=new Float64Array(t.position.length),a=function(t,e,n,r){(0,y.a)(r,t,e);const o=new Float64Array(t.length);return(0,v.o$)(r,o,n)}(t.position,i,o,s),l=(0,c.yy)(k,i),u=function(t,e,n,r,o){if(null==n)return null;const i=new Float32Array(n.length);return(0,y.b)(i,n,r),(0,v.QP)(i,t,e,o,i),i}(a,s,t.normal,l,o),h=function(t,e,n,r,o){if(null==n)return null;const i=new Float32Array(n.length);(0,y.b)(i,n,r,4);for(let t=3;t<i.length;t+=4)i[t]=n[t];return(0,v.Cr)(i,t,e,o,i),i}(a,s,t.tangent,l,o);if(n){const{x:t,y:n,z:r}=e;(0,y.t)(a,a,[-t,-n,-(r??0)])}return{position:a,normal:u,tangent:h}}function C(t,e,n){const r=new Float64Array(t.position.length),o=t.position,i=e.x,s=e.y,a=e.z??0,l=P(n?n.unit:null,e.spatialReference);for(let t=0;t<o.length;t+=3)r[t]=(o[t]-i)/l,r[t+1]=(o[t+1]-s)/l,r[t+2]=(o[t+2]-a)/l;return{position:r,normal:t.normal,tangent:t.tangent}}function F(t,e,n){const r=e.spatialReference;O(e,n,R);const o=(0,i.S_)(j,R),s=new Float64Array(t.position.length),a=function(t,e,n,r){const o=(0,v.K_)(t,e,r),i=new Float64Array(o.length);return(0,y.a)(i,o,n),i}(t.position,r,o,s),l=(0,c.yy)(k,o);return{position:a,normal:L(t.normal,t.position,s,r,l),tangent:I(t.tangent,t.position,s,r,l)}}function O(t,e,n){(0,f.y)(t.spatialReference,[t.x,t.y,t.z??0],n,(0,h._s)(t.spatialReference));const r=P(e?e.unit:null,t.spatialReference);return(0,i.aU)(n,n,[r,r,r]),n}function L(t,e,n,r,o){if(null==t)return null;const i=(0,v.cH)(t,e,n,r,new Float32Array(t.length));return(0,y.b)(i,i,o),i}function I(t,e,n,r,o){if(null==t)return null;const i=(0,v.GW)(t,e,n,r,new Float32Array(t.length));return(0,y.b)(i,i,o,4),i}function P(t,e){if(null==t)return 1;const n=(0,r.eg)(e);return 1/(0,r.ck)(n,"meters",t)}const R=(0,s.Su)(),j=(0,s.Su)(),k=(0,o.Su)()},38496:(t,e,n)=>{n.d(e,{AT:()=>b,Cr:()=>S,GW:()=>_,K_:()=>v,QP:()=>x,W4:()=>A,cH:()=>y,o$:()=>w});var r=n(66360),o=n(77556),i=n(68612),s=n(87104),a=n(98472),l=n(62484),c=n(82448),u=n(51120),h=n(62880),f=n(60544),p=n(29120),g=n(71004),d=n(48952);const m=()=>r.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function y(t,e,n,r,o){return M(r)?(T(C.TO_PCPF,g.Yj.fromTypedArray(t),g.Ax.fromTypedArray(e),g.Ax.fromTypedArray(n),r,g.Yj.fromTypedArray(o)),o):(m().error("Cannot convert spatial reference to PCPF"),o)}function x(t,e,n,r,o){return M(r)?(T(C.FROM_PCPF,g.Yj.fromTypedArray(t),g.Ax.fromTypedArray(e),g.Ax.fromTypedArray(n),r,g.Yj.fromTypedArray(o)),o):(m().error("Cannot convert to spatial reference from PCPF"),o)}function v(t,e,n){return(0,h.projectBuffer)(t,e,0,n,(0,c._s)(e),0,t.length/3),n}function w(t,e,n){return(0,h.projectBuffer)(t,(0,c._s)(n),0,e,n,0,t.length/3),e}function A(t,e,n){return(0,o.yy)(P,n),(0,d.b)(e,t,P),(0,o.QT)(P)||(0,d.n)(e,e),e}function b(t,e,n){if((0,o.yy)(P,n),(0,d.b)(e,t,P,4),(0,o.QT)(P)||(0,d.n)(e,e,4),t!==e)for(let n=3;n<t.length;n+=4)e[n]=t[n];return e}function _(t,e,n,r,o){if(!M(r))return m().error("Cannot convert spatial reference to PCPF"),o;T(C.TO_PCPF,g.Yj.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),g.Ax.fromTypedArray(e),g.Ax.fromTypedArray(n),r,g.Yj.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function S(t,e,n,r,o){if(!M(r))return m().error("Cannot convert to spatial reference from PCPF"),o;T(C.FROM_PCPF,g.Yj.fromTypedArray(t,16),g.Ax.fromTypedArray(e),g.Ax.fromTypedArray(n),r,g.Yj.fromTypedArray(o,16));for(let e=3;e<t.length;e+=4)o[e]=t[e];return o}function T(t,e,n,r,i,s){if(!e)return;const l=n.count,h=(0,c._s)(i);if(q(i))for(let n=0;n<l;n++)r.getVec(n,O),e.getVec(n,L),(0,u.y)(h,O,I,h),(0,o.kr)(P,I),t===C.FROM_PCPF&&(0,o.oL)(P,P),(0,a.t)(L,L,P),s.setVec(n,L);else for(let i=0;i<l;i++){r.getVec(i,O),e.getVec(i,L),(0,u.y)(h,O,I,h),(0,o.kr)(P,I);const l=(0,p.MB)(n.get(i,1));let c=Math.cos(l);t===C.TO_PCPF&&(c=1/c),P[0]*=c,P[1]*=c,P[2]*=c,P[3]*=c,P[4]*=c,P[5]*=c,t===C.FROM_PCPF&&(0,o.oL)(P,P),(0,a.t)(L,L,P),(0,a.n)(L,L),s.setVec(i,L)}return s}function M(t){return q(t)||function(t){return t.isWebMercator}(t)}function q(t){return t.isWGS84||(0,f.Ub)(t)||(0,f.qg)(t)||(0,f.UB)(t)}var C,F;(F=C||(C={}))[F.TO_PCPF=0]="TO_PCPF",F[F.FROM_PCPF=1]="FROM_PCPF";const O=(0,l.Su)(),L=(0,l.Su)(),I=(0,s.Su)(),P=(0,i.Su)()},21136:(t,e,n)=>{n.d(e,{Al:()=>p,k$:()=>h,mA:()=>f,wX:()=>u});var r=n(26832),o=n(66360),i=n(67776),s=n(51232),a=n(13708),l=n(48952);function c(){return o.c.getLogger("esri.geometry.Mesh")}function u(t){const{vertexSpace:e}=t;if(null!=e.origin)return t.clone();const{anchor:n}=t,r=n.clone(),o=new s.c({origin:[r.x,r.y,r.z]}),i=t.cloneWithVertexSpace(o),{position:a}=i.vertexAttributes;return i.vertexAttributes.position=(0,l.t)(new Float64Array(a.length),a,[-r.x,-r.y,-(r.z??0)]),i.vertexAttributesChanged(),i}function h(t){return null!=t.origin}function f(t,e){if(!h(t))return null;const[n,r,o]=t.origin;return new i.c({x:n,y:r,z:o,spatialReference:e})}function p(t,e){const{x:n,y:o,z:i,spatialReference:l}=t,u=[n,o,i??0];if(void 0!==e?.geographic){if((0,r.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!e?.vertexSpace)return e?.geographic?new a.c({origin:u}):new s.c({origin:u});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!e?.vertexSpace)return l.isGeographic||l.isWebMercator?new a.c({origin:u}):new s.c({origin:u});switch(e.vertexSpace){case"local":return new a.c({origin:u});case"georeferenced":return new s.c({origin:u});case"georeferenced-absolute":return new s.c}}},58608:(t,e,n)=>{n.d(e,{u:()=>o});var r=n(60924);class o{constructor(){this.id=(0,r.Q)()}}},74376:(t,e,n)=>{var r;n.d(e,{C:()=>r}),function(t){t[t.Layer=0]="Layer",t[t.Object=1]="Object",t[t.Mesh=2]="Mesh",t[t.Line=3]="Line",t[t.Point=4]="Point",t[t.Material=5]="Material",t[t.Texture=6]="Texture",t[t.COUNT=7]="COUNT"}(r||(r={}))},71520:(t,e,n)=>{n.d(e,{K:()=>C});var r=n(87104),o=n(98472),i=n(97143),s=n(72008);function a(t){if(t.length<s._)return Array.from(t);if((0,s.c7)(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,s.Qx)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}var l=n(12260),c=n(24680),u=n(62484),h=n(90736);class f{constructor(t,e,n){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.position=n,this._children=void 0,(0,h.Uc)(t.length>=1),(0,h.Uc)(3===n.size||4===n.size);const{data:r,size:i,indices:s}=n;(0,h.Uc)(s.length%this._numIndexPerPrimitive==0),(0,h.Uc)(s.length>=t.length*this._numIndexPerPrimitive);const a=t.length;let l=i*s[this._numIndexPerPrimitive*t[0]];p.clear(),p.push(l);const c=(0,u.WK)(r[l],r[l+1],r[l+2]),f=(0,u.ct)(c);for(let e=0;e<a;++e){const n=this._numIndexPerPrimitive*t[e];for(let t=0;t<this._numIndexPerPrimitive;++t){l=i*s[n+t],p.push(l);let e=r[l];c[0]=Math.min(e,c[0]),f[0]=Math.max(e,f[0]),e=r[l+1],c[1]=Math.min(e,c[1]),f[1]=Math.max(e,f[1]),e=r[l+2],c[2]=Math.min(e,c[2]),f[2]=Math.max(e,f[2])}}this.bbMin=c,this.bbMax=f;const g=(0,o.k)((0,u.Su)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let d=this.radius*this.radius;for(let t=0;t<p.length;++t){l=p.at(t);const e=r[l]-g[0],n=r[l+1]-g[1],o=r[l+2]-g[2],i=e*e+n*n+o*o;if(i<=d)continue;const s=Math.sqrt(i),a=.5*(s-this.radius);this.radius=this.radius+a,d=this.radius*this.radius;const c=a/s;g[0]+=e*c,g[1]+=n*c,g[2]+=o*c}this.center=g,p.clear()}getChildren(){if(this._children||(0,o.a)(this.bbMin,this.bbMax)<=1)return this._children;const t=(0,o.k)((0,u.Su)(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),r=new Array(8);for(let t=0;t<8;++t)r[t]=0;const{data:i,size:s,indices:a}=this.position;for(let o=0;o<e;++o){let e=0;const l=this._numIndexPerPrimitive*this.primitiveIndices[o];let c=s*a[l],u=i[c],h=i[c+1],f=i[c+2];for(let t=1;t<this._numIndexPerPrimitive;++t){c=s*a[l+t];const e=i[c],n=i[c+1],r=i[c+2];e<u&&(u=e),n<h&&(h=n),r<f&&(f=r)}u<t[0]&&(e|=1),h<t[1]&&(e|=2),f<t[2]&&(e|=4),n[o]=e,++r[e]}let l=0;for(let t=0;t<8;++t)r[t]>0&&++l;if(l<2)return;const c=new Array(8);for(let t=0;t<8;++t)c[t]=r[t]>0?new Uint32Array(r[t]):void 0;for(let t=0;t<8;++t)r[t]=0;for(let t=0;t<e;++t){const e=n[t];c[e][r[e]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==c[t]&&this._children.push(new f(c[t],this._numIndexPerPrimitive,this.position));return this._children}static prune(){p.prune()}}const p=new c.c({deallocator:null});var g=n(58608),d=n(74376),m=n(52180),y=n(24363);function x(t,e,n){return(0,o.f)(v,e,t),(0,o.f)(w,n,t),.5*(0,o.l)((0,o.b)(v,v,w))}n(20136),new m.o(y.Su),new m.o((()=>{return t?{p0:(0,u.ct)(t.p0),p1:(0,u.ct)(t.p1),p2:(0,u.ct)(t.p2)}:{p0:(0,u.Su)(),p1:(0,u.Su)(),p2:(0,u.Su)()};var t}));const v=(0,u.Su)(),w=(0,u.Su)(),A=(0,u.Su)(),b=(0,u.Su)(),_=(0,u.Su)(),S=(0,u.Su)();var T=n(60924);class M{constructor(t){this.channel=t,this.id=(0,T.Q)()}}var q=n(4636);n(5480),(0,u.Su)(),new Float32Array(6);class C extends g.u{constructor(t,e,n=null,r=d.C.Mesh,o=null,s=-1){super(),this.material=t,this.mapPositions=n,this.type=r,this.objectAndLayerIdColor=o,this.edgeIndicesLength=s,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[t,n]of e)this._attributes.set(t,{...n,indices:(0,i.Uv)(n.indices)}),t===q.K.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(t).indices.length:this.edgeIndicesLength)}instantiate(t={}){const e=new C(t.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((t,n)=>{t.exclusive=!1,e._attributes.set(n,t)})),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}get attributes(){return this._attributes}getMutableAttribute(t){let e=this._attributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:a(e.data)},this._attributes.set(t,e)),e}setAttributeData(t,e){const n=this._attributes.get(t);n&&this._attributes.set(t,{...n,exclusive:!0,data:e})}get indexCount(){const t=this._attributes.values().next().value.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===d.C.Mesh?this._computeAttachmentOriginTriangles(t):this.type===d.C.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&(0,o.e)(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){return function(t,e){if(!t)return!1;const{size:n,data:r,indices:i}=t;(0,o.s)(e,0,0,0),(0,o.s)(S,0,0,0);let s=0,a=0;for(let t=0;t<i.length-2;t+=3){const l=i[t]*n,c=i[t+1]*n,u=i[t+2]*n;(0,o.s)(A,r[l],r[l+1],r[l+2]),(0,o.s)(b,r[c],r[c+1],r[c+2]),(0,o.s)(_,r[u],r[u+1],r[u+2]);const h=x(A,b,_);h?((0,o.g)(A,A,b),(0,o.g)(A,A,_),(0,o.i)(A,A,1/3*h),(0,o.g)(e,e,A),s+=h):((0,o.g)(S,S,A),(0,o.g)(S,S,b),(0,o.g)(S,S,_),a+=3)}return!(0===a&&0===s||(0!==s?((0,o.i)(e,e,1/s),0):0===a||((0,o.i)(e,S,1/a),0)))}(this.attributes.get(q.K.POSITION),t)}_computeAttachmentOriginLines(t){const e=this.attributes.get(q.K.POSITION);return function(t,e,n){if(!t)return!1;(0,o.s)(n,0,0,0),(0,o.s)(S,0,0,0);let r=0,i=0;const{size:s,data:a,indices:l}=t,c=l.length-1,u=c+(e?2:0);for(let t=0;t<u;t+=2){const e=t<c?t+1:0,u=l[t<c?t:c]*s,h=l[e]*s;A[0]=a[u],A[1]=a[u+1],A[2]=a[u+2],b[0]=a[h],b[1]=a[h+1],b[2]=a[h+2],(0,o.i)(A,(0,o.g)(A,A,b),.5);const f=(0,o.m)(A,b);f>0?((0,o.g)(n,n,(0,o.i)(A,A,f)),r+=f):0===r&&((0,o.g)(S,S,A),i++)}return 0!==r?((0,o.i)(n,n,1/r),!0):0!==i&&((0,o.i)(n,S,1/i),!0)}(e,function(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e.indices.length>2}(this.material.parameters,e),t)}_computeAttachmentOriginPoints(t){return function(t,e){if(!t)return!1;const{size:n,data:r,indices:i}=t;(0,o.s)(e,0,0,0);let s=-1,a=0;for(let t=0;t<i.length;t++){const o=i[t]*n;s!==o&&(e[0]+=r[o],e[1]+=r[o+1],e[2]+=r[o+2],a++),s=o}return a>1&&(0,o.i)(e,e,1/a),a>0}(this.attributes.get(q.K.POSITION),t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.attributes.get(q.K.POSITION);if(!t||0===t.indices.length)return null;const e=this.type===d.C.Mesh?3:1;(0,h.Uc)(t.indices.length%e==0,"Indexing error: "+t.indices.length+" not divisible by "+e);const n=(0,i.yh)(t.indices.length/e);return new f(n,e,t)}get transformation(){return this._transformation??r.IJ}set transformation(t){this._transformation=t&&t!==r.IJ?(0,r.ct)(t):null}addHighlight(){const t=new M(l.sN.Highlight);return this.highlights=function(t,e){return null==t&&(t=[]),t.push(e),t}(this.highlights,t),t}removeHighlight(t){this.highlights=function(t,e){if(null==t)return null;const n=t.filter((t=>t!==e));return 0===n.length?null:n}(this.highlights,t)}}},12260:(t,e,n)=>{var r,o,i,s,a,l,c,u,h;n.d(e,{Aj:()=>a,C2:()=>u,CM:()=>r,Iv:()=>s,OA:()=>c,sN:()=>l,sr:()=>o,yk:()=>h}),function(t){t[t.None=0]="None",t[t.Front=1]="Front",t[t.Back=2]="Back",t[t.COUNT=3]="COUNT"}(r||(r={})),function(t){t[t.Less=0]="Less",t[t.Lequal=1]="Lequal",t[t.COUNT=2]="COUNT"}(o||(o={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.UPDATE=1]="UPDATE"}(i||(i={})),function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED"}(s||(s={})),function(t){t[t.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",t[t.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(t){t[t.Highlight=0]="Highlight",t[t.MaskOccludee=1]="MaskOccludee",t[t.COUNT=2]="COUNT"}(l||(l={})),function(t){t[t.Blend=0]="Blend",t[t.Opaque=1]="Opaque",t[t.Mask=2]="Mask",t[t.MaskBlend=3]="MaskBlend",t[t.COUNT=4]="COUNT"}(c||(c={})),function(t){t[t.OFF=0]="OFF",t[t.ON=1]="ON"}(u||(u={})),function(t){t.DDS_ENCODING="image/vnd-ms.dds",t.KTX2_ENCODING="image/ktx2",t.BASIS_ENCODING="image/x.basis"}(h||(h={}))},5480:(t,e,n)=>{function r(t,e){const n=t.length;for(let r=0;r<n;++r)i[0]=t[r],e[r]=i[0];return e}function o(t,e){const n=t.length;for(let r=0;r<n;++r)i[0]=t[r],i[1]=t[r]-i[0],e[r]=i[1];return e}n.d(e,{KM:()=>r,Ky:()=>o});const i=new Float32Array(2)}}]);
|