@arcgis/core 6.0.0-next.29 → 6.0.0-next.30
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/WebDocument2D.js +1 -1
- package/WebMap.d.ts +3 -19
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +1 -0
- package/assets/esri/core/workers/chunks/{b01688ccc29d33bfc82d.js → 28a821de9dbf10324033.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3c3fb079ad97970f834.js → 4fb2fcc95f852bf8f86c.js} +1 -1
- package/assets/esri/core/workers/chunks/{84940d8e14caf5a27e04.js → 64b360625c68cb863a08.js} +1 -1
- package/assets/esri/core/workers/chunks/71f792a20077aa739f87.js +1 -0
- package/assets/esri/core/workers/chunks/{e480e7d5f40049a2053b.js → 7af4edc6e87d27b9d467.js} +1 -1
- package/assets/esri/core/workers/chunks/90c1d10eae7ae71889b0.js +1 -0
- package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 9d40786c5ceface786ba.js} +1 -1
- package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +1 -0
- package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +1 -0
- package/assets/esri/views/3d/environment/resources/milkyway-band.avif +0 -0
- package/chunks/GlobalIllumination.glsl.js +16 -10
- package/chunks/GlobalIlluminationBlur.glsl.js +14 -14
- package/chunks/GlobalIlluminationUpscale.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +78 -75
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/kernel.js +1 -1
- package/layers/WMTSLayer.d.ts +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/mixins/TiledImagery.d.ts +7 -0
- package/layers/support/WMTSSublayer.d.ts +5 -5
- package/networks/Network.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
- package/support/timeUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
- package/views/2d/layers/SketchLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/types.d.ts +2 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/StageObjectVisualElement.js +2 -0
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
- package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/pointUtils.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/types.d.ts +2 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/util/PackedUint32.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +2 -0
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/PackedUint32.js +2 -0
- package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
- package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +2 -0
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterialBaseInstance.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +1 -1
- package/views/SelectionManager.d.ts +5 -5
- package/views/SelectionManager.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/layers/WMTSLayerView.d.ts +16 -0
- package/views/layers/WMTSLayerView.js +2 -0
- package/views/layers/support/highlightUtils.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/selection/types.d.ts +3 -3
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/GeometryWorkerHandle.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
- package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
- package/widgets/FeatureTable/RelationshipColumn.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +5 -5
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +3 -3
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +5 -6
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/types.d.ts +3 -1
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/widgets/support/symbolPreviewUtils.js +1 -1
- package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +0 -1
- package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +0 -1
- package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +0 -1
- package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +0 -1
- package/assets/esri/core/workers/chunks/e7aaf7579592b79d6dd7.js +0 -1
- package/layers/geospatialPDF/CIM2DLayerview.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6874],{66344(e,t,i){i.d(t,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,s,a){t=e.id+t;let o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);let n=1+Math.max(a,-4)- -3;this._db.set(t,new l(i,s,n)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=[];this._db.forEach((e,r)=>{let s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{let{id:s,name:l}=i;if(r.startsWith(s)){let i=t[l]||0;t[l]=i+e.size}})});let r={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){let r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let s=this._clients.get(e.split(a)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let r=t?.id,s=!0;for(;s;){s=!1;for(let[l,o]of this._db)if(0===o.lifetime&&(!r||l.startsWith(r))){let r=t??this._clients.get(l.split(a)[0]);if(this._purgeItem(l,o,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(let[s,l]of this._db)if(!r||s.startsWith(r)){let r=t??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,QA:()=>g,Tj:()=>u,UT:()=>y,aD:()=>v,jJ:()=>h});var r=i(32198),s=i(69622),l=i(97768),a=i(17676),o=i(10107),n=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function g(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,r.Cg)([(0,n.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},69397(e,t,i){i.d(t,{Qf:()=>n,Qh:()=>a,lM:()=>l,ro:()=>h,rq:()=>u});var r=i(44208),s=i(34275);function l(e){if(!e)return 0;let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return n(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function n(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?u(e,t):0:0}function u(e,t){return d+e.length*t}const c=32,d=16,p=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,f=145;i.d(t,["JY",0,p])},83027(e,t,i){const r=i(29953).ho;i.d(t,["h",0,r])},35982(e,t,i){i.d(t,{B:()=>u});var r=i(4576),s=i(71511),l=i(36563),a=i(53966),o=i(97768),n=i(17676),h=i(83027);class u{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:r}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new c(e,t);return this._listeners.push(i),this._connectListener(i),(0,l.hA)(()=>{(0,r.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,o.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){return this._invokeMethod(e,[t],i,r)}invokeMethodWithArgs(e,t,i,r){return this._invokeMethod(e,t,i,r)}_invokeMethod(e,t,i,r){if(this._thread){let s=this._transferLists[e],l=s?s(...t):[];return this._thread.apply(e,t,{transferList:l,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,n.Te)(i),this._invokeMethod(e,t,i,r))):Promise.reject((0,n.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,n.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class c{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),l=i(4576),a=i(66552),o=i(25482),n=i(86211),h=i(67076),u=i(91429),c=i(97348),d=i(43937),p=i(36005);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,l.Xy)(g,"orthometric");const y=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=r=class extends o.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,n.LA)(e)||y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:i}=e;if(!i)return null;let s=(null==t?null:c.B.get(t))??c.B.get(i);return s?new r({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,n.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,u.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:{writer:y.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],m)},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var r=i(32198),s=i(56507),l=i(49186),a=i(97768),o=i(25728),n=i(17676),h=i(84952),u=i(91429),c=i(4146),d=i(89186),p=i(18768),f=i(85707),g=i(34287),y=i(8303),m=i(10873),v=i(87378),_=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,f.a)((0,d.f)((0,p.b)((0,g.q)((0,y.A)((0,o.M)(c.A))))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null==e?(t=new w,b.set(null,t)):(t=new w(t=>e.immediate.schedule(t)),b.set(e,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){let i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let i=t.currentVersion;return i||=9.3,i}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new l.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(n.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,r){let a=r?.signal,o={responseType:"array-buffer",signal:a,useQueue:r?.useQueue,priority:r?.priority},n={noDataValue:r?.noDataValue};await this.load(),await this._fetchTileAvailability(e,t,i,r);let h=await(0,s.A)(this.getTileUrl(e,t,i),o),u=await this._lercDecoder.decode(h.data,n,a);if(!u)throw new l.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:u.pixelData,width:u.width,height:u.height,noDataValue:u.noDataValue})}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){let{query:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}async createElevationSampler(e,t){let{createSampler:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;let t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,u.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},89186(e,t,i){var r=i(32198),s=i(91429),l=i(16930),a=i(87045),o=i(65509),n=i(25943),h=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:s,maxLOD:l,minScale:h,maxScale:u}=t;if(null==s&&null==l&&(0!==h||0!==u)){let e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);s=t>=h?i.level:s,l=t>=u?i.level:l}}if(r)return new n.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){let e=new a.A;return e.read(t.tileInfo,i),new o.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var r=i(32198),s=i(53966),l=i(91429),a=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},85707(e,t,i){var r=i(32198),s=i(91429),l=i(54239);i.d(t,["a",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,type:l.A})],i.prototype,"heightModelInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],i),i}])},8303(e,t,i){var r=i(32198),s=i(92602),l=i(70333),a=i(56507),o=i(60999),n=i(49186),h=i(36563),u=i(53966),c=i(97768),d=i(17676),p=i(84952),f=i(91429),g=i(77548),y=i(20655),m=i(80812),v=i(41318),_=i(10407),w=i(26121),b=i(36005),C=i(43937);const M={credential:null,user:null};i.d(t,["A",0,e=>{let t=e,A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new m.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:r}=await i.e(1204).then(()=>i(41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let r=t?.signal?null:new AbortController;try{let{reload:s}=await i.e(1204).then(()=>i(41204));return r&&this.addHandles((0,h.rE)(r),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:r.signal})}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{r&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);let r,s,a=!l.id?.findCredential(this.url),o=e===i.id;if(o&&i.portal.user)return this._getUserPrivileges(i,a);if(o)r=i.portal.url;else try{r=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!r||!(0,p.b8)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(l.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await i.reload():(i=new m.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;let i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;let r=`${i.owningSystemUrl}/sharing/rest`,s=y.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;let n=`${r}/community/self`,h=null==e?null:e.signal,u=await(0,o.Ke)((0,a.A)(n,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,w.wN)(this.portalItem,t)?(t?.messages?.push(new n.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,f.MZ)({type:m.default})],A.prototype,"portalItem",null),(0,r.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,r.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,r.Cg)([(0,f.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,r.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],A),A}])},87378(e,t,i){i.d(t,{A:()=>o});var r,s=i(34275),l=i(78888);const a=Symbol("ElevationTileDataClass");class o{static{r=a}constructor({values:e,width:t,height:i,noDataValue:l}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,s.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=l}get hasNoDataValues(){if(null==this._hasNoDataValues){let e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;let{noDataValue:e,values:t}=this,i=1/0,r=-1/0,s=!0;for(let l of t)l===e?this._hasNoDataValues=!0:(i=l<i?l:i,r=l>r?l:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}static{this.from=(0,l.qf)(o)}}},91806(e,t,i){i.d(t,{A:()=>n});var r,s=i(32198),l=i(25482),a=i(91429),o=i(78888);let n=class extends l.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"cols",void 0),(0,s.Cg)([(0,a.MZ)({type:o.jz,json:{write:!0}})],n.prototype,"level",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],n.prototype,"levelValue",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"origin",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"resolution",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"rows",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"scale",void 0),n=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.LOD")],n)},87045(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),l=i(66552),a=i(25482),o=i(86211),n=i(91429),h=i(78888),u=i(86738),c=i(16930),d=i(21325),p=i(28735),f=i(91806),g=i(72802),y=i(36005),m=i(43937);const v=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let _=class extends a.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=c.A.WebMercator,numLODs:a=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new f.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new u.A(0,0,l),size:[s,s],spatialReference:l})}let n=(0,d.Vp)(l),h=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):n?new u.A({x:n.origin[0],y:n.origin[1],spatialReference:l}):new u.A({x:0,y:0,spatialReference:l}),p=1/(39.37*(0,o.GA)(l)*96),g=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*p;g.push(new f.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(a/t);g.push(new f.A({level:0,scale:e,resolution:e*p}));for(let r=1;r<i;r++){let i=e/2**t,s=i*p;g.push(new f.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:g,origin:h,size:[s,s],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){let s,l,a=this.lodAt(e);if(!a)return null;if("number"==typeof t)s=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))s=t.x,l=t.y,r=i;else{let e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,l=e.y,r=i}let o=a.resolution*this.size[0],n=a.resolution*this.size[1];return r??=new g.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/n+.001),r.col=Math.floor((s-this.origin.x)/o+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,s=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,s=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],s=this.lods.length-t;for(let e=0;e<s;e++){let r=e+t,{scale:s,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:s,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s.Cg)([(0,n.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,s.Cg)([(0,y.w)("origin")],_.prototype,"readOrigin",null),(0,s.Cg)([(0,n.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s.Cg)([(0,y.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s.Cg)([(0,m.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],_.prototype,"writeSize",null),(0,s.Cg)([(0,n.MZ)({type:c.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=r=(0,s.Cg)([(0,n.$K)("esri.layers.support.TileInfo")],_)},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(17676);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);let a=this.getAvailability(e,t,i);if("unavailable"===a)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return a}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;let a=this.tileInfo;return a.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(a.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>C});var r,s=i(32198),l=i(56507),a=i(69622),o=i(49186),n=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(17676),d=i(36708),p=i(76030),f=i(84952),g=i(91429),y=i(72802),m=i(4718),v=i(69397);class _{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,s=this.location.height,l=!0,a=!0,n=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*s/32)),h=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(a=!1,n[h]|=1<<t):l=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,v.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||l.A,{row:r,col:s,width:a,height:n}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:n},valid:!0,data:Array(a*n).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==n))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:n}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function w(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof _){let s=r.getAvailability(t,i);if("unavailable"===s)throw b(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;let l=this.layer.tileInfo;l.updateTileInfo(r);let a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;let a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;let o=new AbortController;l.then(()=>o.abort(),()=>o.abort());let h=!1,u=(0,n.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(u,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(o))return;let d=new y.U(e,t,i),f={...s,signal:o.signal},g=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&g.upsampleTile(d);++e){let e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);let a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));let i=w(s),l=this._pendingTilemapRequests[i];if(!l){l=_.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let s=w(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=r=(0,s.Cg)([(0,g.$K)("esri.layers.support.TilemapCache")],C)},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>o,bK:()=>n,sQ:()=>c});var r=i(99917),s=i(16930),l=i(28735);function a(e,t){if(!o(e,t)){let i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function n(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){let i=e.typeKeywords;if(i){let e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){let t,i=e.clone().normalize();if(i.length>1)for(let e of i)t?e.width>t.width&&(t=e):t=e;else t=i[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);let i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){let{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges,l=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit"),o="update"===r||"admin"===r;return o?a=l=!0:a&&(l=!0),{features:{edit:l,fullEdit:a},content:{updateItem:o}}}i.d(t,["mm",0,d])},78553(e,t,i){i.d(t,{D:()=>l,p:()=>s});var r=i(78888);function s(e){let t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}},26121(e,t,i){i.d(t,{I6:()=>u,ci:()=>h,dL:()=>n,wN:()=>c});var r=i(49186),s=i(84952),l=i(77548),a=i(20655),o=i(59923);async function n(e){let t=[];for(let i of e.allLayers)if("beforeSave"in i&&"function"==typeof i.beforeSave){let e=i.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function h(e,t,i){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:i})=>new r.A(e,t,i));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),i){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:r}=i;e&&(s=s.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),r&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new r.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function u(e){return(0,l.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let i=t?.portal,r=e?.id&&(e.portal||a.A.getDefault());return!!i&&!!r&&!(0,s.ut)(r.restUrl,i.restUrl)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1360],{29242(t,n,e){function r(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,e,r,a,o,i,u,c){return[t,n,e,r,a,o,i,u,c]}e.d(n,{fA:()=>a,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:a},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,o])},34304(t,n,e){e.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let r=1e-6;function a(){return r}const o=Math.random,i=Math.PI/180,u=180/Math.PI;function c(t){return t*i}function f(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){r=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),e.d(n,["Ov",0,o])},77690(t,n,e){e.d(n,{B8:()=>u,Ge:()=>M,I0:()=>h,KC:()=>c,a4:()=>f,hZ:()=>o,hs:()=>s,lw:()=>l,mg:()=>i,z0:()=>a});var r=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function o(t,n,e,r,a,o,i,u,c,f){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=o,t[5]=i,t[6]=u,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let e=n[1],r=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function u(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8],s=l*i-u*f,h=-l*o+u*c,M=f*o-i*c,m=e*s+r*h+a*M;return m?(m=1/m,t[0]=s*m,t[1]=(-l*r+a*f)*m,t[2]=(u*r-a*i)*m,t[3]=h*m,t[4]=(l*e-a*c)*m,t[5]=(-u*e+a*o)*m,t[6]=M*m,t[7]=(-f*e+r*c)*m,t[8]=(i*e-r*o)*m,t):null}function c(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8];return t[0]=i*l-u*f,t[1]=a*f-r*l,t[2]=r*u-a*i,t[3]=u*c-o*l,t[4]=e*l-a*c,t[5]=a*o-e*u,t[6]=o*f-i*c,t[7]=r*c-e*f,t[8]=e*i-r*o,t}function f(t){let n=t[0],e=t[1],r=t[2],a=t[3],o=t[4],i=t[5],u=t[6],c=t[7],f=t[8];return n*(f*o-i*c)+e*(-f*a+i*u)+r*(c*a-o*u)}function l(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=e[0],M=e[1],m=e[2],b=e[3],d=e[4],p=e[5],g=e[6],y=e[7],w=e[8];return t[0]=h*r+M*i+m*f,t[1]=h*a+M*u+m*l,t[2]=h*o+M*c+m*s,t[3]=b*r+d*i+p*f,t[4]=b*a+d*u+p*l,t[5]=b*o+d*c+p*s,t[6]=g*r+y*i+w*f,t[7]=g*a+y*u+w*l,t[8]=g*o+y*c+w*s,t}function s(t,n,e){let r=e[0],a=e[1],o=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=o*n[6],t[7]=o*n[7],t[8]=o*n[8],t}function h(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=e+e,u=r+r,c=a+a,f=e*i,l=r*i,s=r*u,h=a*i,M=a*u,m=a*c,b=o*i,d=o*u,p=o*c;return t[0]=1-s-m,t[3]=l-p,t[6]=h+d,t[1]=l+p,t[4]=1-f-m,t[7]=M-b,t[2]=h-d,t[5]=M+b,t[8]=1-f-s,t}function M(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8],s=n[9],h=n[10],M=n[11],m=n[12],b=n[13],d=n[14],p=n[15],g=e*u-r*i,y=e*c-a*i,w=e*f-o*i,x=r*c-a*u,v=r*f-o*u,P=a*f-o*c,F=l*b-s*m,N=l*d-h*m,R=l*p-M*m,k=s*d-h*b,I=s*p-M*b,S=h*p-M*d,_=g*S-y*I+w*k+x*R-v*N+P*F;return _?(_=1/_,t[0]=(u*S-c*I+f*k)*_,t[1]=(c*R-i*S-f*N)*_,t[2]=(i*I-u*R+f*F)*_,t[3]=(a*I-r*S-o*k)*_,t[4]=(e*S-a*R+o*N)*_,t[5]=(r*R-e*I-o*F)*_,t[6]=(b*P-d*v+p*x)*_,t[7]=(d*w-m*P-p*y)*_,t[8]=(m*v-b*w+p*g)*_,t):null}function m(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const b=l,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let e=t[0],a=t[1],o=t[2],i=t[3],u=t[4],c=t[5],f=t[6],l=t[7],s=t[8],h=n[0],M=n[1],m=n[2],b=n[3],d=n[4],p=n[5],g=n[6],y=n[7],w=n[8],x=(0,r.FD)();return Math.abs(e-h)<=x*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(i-b)<=x*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(u-d)<=x*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(f-g)<=x*Math.max(1,Math.abs(f),Math.abs(g))&&Math.abs(l-y)<=x*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(s-w)<=x*Math.max(1,Math.abs(s),Math.abs(w))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:h,fromRotation:function(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:u,isOrthoNormal:function(t){let n=(0,r.FD)(),e=t[0],a=t[1],o=t[2],i=t[3],u=t[4],c=t[5],f=t[6],l=t[7],s=t[8];return Math.abs(1-(e*e+i*i+f*f))<=n&&Math.abs(1-(a*a+u*u+l*l))<=n&&Math.abs(1-(o*o+c*c+s*s))<=n},mul:b,multiply:l,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let e=n[0],r=n[1],a=n[2],o=n[4],i=n[5],u=n[6],c=n[8],f=n[9],l=n[10],s=l*i-u*f,h=-l*o+u*c,M=f*o-i*c,m=e*s+r*h+a*M;if(!m)return null;let b=1/m;return t[0]=s*b,t[1]=(-l*r+a*f)*b,t[2]=(u*r-a*i)*b,t[3]=h*b,t[4]=(l*e-a*c)*b,t[5]=(-u*e+a*o)*b,t[6]=M*b,t[7]=(-f*e+r*c)*b,t[8]=(i*e-r*o)*b,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=Math.sin(e),M=Math.cos(e);return t[0]=M*r+h*i,t[1]=M*a+h*u,t[2]=M*o+h*c,t[3]=M*i-h*r,t[4]=M*u-h*a,t[5]=M*c-h*o,t[6]=f,t[7]=l,t[8]=s,t},scale:s,scaleByVec2:function(t,n,e){let r=e[0],a=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=e[0],M=e[1];return t[0]=r,t[1]=a,t[2]=o,t[3]=i,t[4]=u,t[5]=c,t[6]=h*r+M*i+f,t[7]=h*a+M*u+l,t[8]=h*o+M*c+s,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},34727(t,n,e){e.d(n,{$8:()=>F,Cc:()=>u,Hx:()=>d,Io:()=>v,KJ:()=>l,OS:()=>k,Sp:()=>M,XM:()=>s,YN:()=>h,ZH:()=>b,b6:()=>P,cU:()=>a,gg:()=>m,hs:()=>c,kU:()=>f,mP:()=>i,or:()=>R,pF:()=>S,qE:()=>o});const r=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function o(t,n,e){return Math.min(Math.max(t,n),e)}function i(t,n){return 0===n?0:Math.ceil(t/n)*n}function u(t,n,e){return t+(n-t)*e}function c(t,n,e,r,a){return u(r,a,(t-n)/(e-n))}function f(t){return t*Math.PI/180}function l(t){return 180*t/Math.PI}function s(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function M(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function m(t,n,e=1e-6){return!M(t,n,e)&&t>n}function b(t,n,e=1e-6){return!M(t,n,e)&&t<n}function d(t,n,e=1e-6){return M(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return p.setFloat64(0,t),p.getBigInt64(0)}const y=1000000n,w=x(1);function x(t){let n=g(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=y?y:n-y);return Math.abs(t-e)}function v(t,n,e=w){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&x(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;let r=g(t),a=g(n);return!(r<0!=a<0||(r<a?a-r:r-a)>y)}function P(t,n,e=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let r=Math.abs(t-n),a=Math.abs(t),o=Math.abs(n);if(0===t||0===n||a<1e-12&&o<1e-12){if(r>.01*e)return!1}else if(r/(a+o)>e)return!1;return!0}function F(t){return N(Math.max(-I,Math.min(t,I)))}function N(t){return r[0]=t,r[0]}function R(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(M(n,1)&&M(e,1)&&M(r,1))}function k(t,n){return(t%n+n)%n}const I=N(34028234663852886e22);function S(t,n,e){if(void 0===e||0==+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}e.d(n,["pq",0,I])},41360(t,n,e){e.r(n),e.d(n,{generateCombinationsPanoramicWorker:()=>M,generateCombinationsWorker:()=>h});var r=e(49186),a=e(34727),o=e(29242),i=e(77690);const u=[[2,-1],[0,1],[2,-1]];function c(t,n,e,i=!0){if(!Number.isFinite(t))throw new r.A("InvalidRotationAngle","Please specify a valid angle for rotation");let u=e*(i?(0,a.kU)(t):t),c=Math.cos(u),f=Math.sin(u),l=(0,o.vt)();switch(n){case 0:l[4]=c,l[5]=-f,l[7]=f,l[8]=c;break;case 1:l[0]=c,l[2]=f,l[6]=-f,l[8]=c;break;case 2:l[0]=c,l[1]=-f,l[3]=f,l[4]=c;break;default:throw new r.A("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return l}function f(t,n=!0){return function(t,n,e=!0){if(3!==t?.length||3!==n?.length)throw new r.A("InvalidRotationAngles","Please specify three angles with config for rotation");let a=(0,o.vt)();for(let r=0;r<3;r++){let[o,u]=n[r],f=c(t[r],o,u,e);(0,i.lw)(a,f,a)}return a}(t,u,n)}function l(t){return t>0?[-t,0,t]:[0]}function s(t,n){let{cameraHeading:e,cameraLocation:r}=t,{x:a,y:o,z:i,spatialReference:u}=r;if(!n||n.every(t=>0===t)||!n.length||!u)throw Error("Invalid parameters");let[c,f,s]=n,h=l(s),M=l(c),m=l(f),b=[];for(let n of h)for(let r of M)for(let c of M)for(let f of m){let l={...t};l.cameraHeading=e+n,l.cameraLocation={x:a+r,y:o+c,z:i?i+f:0,spatialReference:{wkid:u.wkid}},b.push(l)}return b}function h(t){return function(t,n,e){let{cameraPitch:r,cameraRoll:a,cameraLocation:o}=t,{x:i,y:u,z:c,spatialReference:s}=o;if(n.every(t=>0===t)||!n||!n.length||!s)throw Error("Invalid parameters");let[h,M,m,b,d]=n,p=l(m),g=l(b),y=l(d),w=l(h),x=l(M),v=[];for(let n of g)for(let o of y)for(let l of w)for(let h of w)for(let M of x)for(let m of p){let b={...t};b.cameraPitch=r+n,b.cameraRoll=a+o,b.rotationMatrix=f([e+m,b.cameraPitch,b.cameraRoll]),b.cameraLocation={x:i+l,y:u+h,z:c?c+M:0,spatialReference:{wkid:s.wkid}},v.push(b)}return v}(t.imageToWorldProps,t.accuracyParameters,t.cameraHeading)}function M(t){return s(t.imageToWorldProps,t.accuracyParameters)}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1360],{29242(t,n,e){function r(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,e,r,a,o,i,u,c){return[t,n,e,r,a,o,i,u,c]}e.d(n,{fA:()=>a,vt:()=>r});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:a},Symbol.toStringTag,{value:"Module"})),e.d(n,["zK",0,o])},34304(t,n,e){e.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let r=1e-6;function a(){return r}const o=Math.random,i=Math.PI/180,u=180/Math.PI;function c(t){return t*i}function f(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,equals:function(t,n){return Math.abs(t-n)<=r*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){r=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),e.d(n,["Ov",0,o])},77690(t,n,e){e.d(n,{B8:()=>u,Ge:()=>M,I0:()=>h,KC:()=>c,a4:()=>f,hZ:()=>o,hs:()=>s,lw:()=>l,mg:()=>i,z0:()=>a});var r=e(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function o(t,n,e,r,a,o,i,u,c,f){return t[0]=n,t[1]=e,t[2]=r,t[3]=a,t[4]=o,t[5]=i,t[6]=u,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let e=n[1],r=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function u(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8],s=l*i-u*f,h=-l*o+u*c,M=f*o-i*c,m=e*s+r*h+a*M;return m?(m=1/m,t[0]=s*m,t[1]=(-l*r+a*f)*m,t[2]=(u*r-a*i)*m,t[3]=h*m,t[4]=(l*e-a*c)*m,t[5]=(-u*e+a*o)*m,t[6]=M*m,t[7]=(-f*e+r*c)*m,t[8]=(i*e-r*o)*m,t):null}function c(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8];return t[0]=i*l-u*f,t[1]=a*f-r*l,t[2]=r*u-a*i,t[3]=u*c-o*l,t[4]=e*l-a*c,t[5]=a*o-e*u,t[6]=o*f-i*c,t[7]=r*c-e*f,t[8]=e*i-r*o,t}function f(t){let n=t[0],e=t[1],r=t[2],a=t[3],o=t[4],i=t[5],u=t[6],c=t[7],f=t[8];return n*(f*o-i*c)+e*(-f*a+i*u)+r*(c*a-o*u)}function l(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=e[0],M=e[1],m=e[2],b=e[3],d=e[4],p=e[5],g=e[6],y=e[7],w=e[8];return t[0]=h*r+M*i+m*f,t[1]=h*a+M*u+m*l,t[2]=h*o+M*c+m*s,t[3]=b*r+d*i+p*f,t[4]=b*a+d*u+p*l,t[5]=b*o+d*c+p*s,t[6]=g*r+y*i+w*f,t[7]=g*a+y*u+w*l,t[8]=g*o+y*c+w*s,t}function s(t,n,e){let r=e[0],a=e[1],o=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=o*n[6],t[7]=o*n[7],t[8]=o*n[8],t}function h(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=e+e,u=r+r,c=a+a,f=e*i,l=r*i,s=r*u,h=a*i,M=a*u,m=a*c,b=o*i,d=o*u,p=o*c;return t[0]=1-s-m,t[3]=l-p,t[6]=h+d,t[1]=l+p,t[4]=1-f-m,t[7]=M-b,t[2]=h-d,t[5]=M+b,t[8]=1-f-s,t}function M(t,n){let e=n[0],r=n[1],a=n[2],o=n[3],i=n[4],u=n[5],c=n[6],f=n[7],l=n[8],s=n[9],h=n[10],M=n[11],m=n[12],b=n[13],d=n[14],p=n[15],g=e*u-r*i,y=e*c-a*i,w=e*f-o*i,x=r*c-a*u,v=r*f-o*u,P=a*f-o*c,F=l*b-s*m,N=l*d-h*m,R=l*p-M*m,k=s*d-h*b,I=s*p-M*b,S=h*p-M*d,_=g*S-y*I+w*k+x*R-v*N+P*F;return _?(_=1/_,t[0]=(u*S-c*I+f*k)*_,t[1]=(c*R-i*S-f*N)*_,t[2]=(i*I-u*R+f*F)*_,t[3]=(a*I-r*S-o*k)*_,t[4]=(e*S-a*R+o*N)*_,t[5]=(r*R-e*I-o*F)*_,t[6]=(b*P-d*v+p*x)*_,t[7]=(d*w-m*P-p*y)*_,t[8]=(m*v-b*w+p*g)*_,t):null}function m(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const b=l,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let e=t[0],a=t[1],o=t[2],i=t[3],u=t[4],c=t[5],f=t[6],l=t[7],s=t[8],h=n[0],M=n[1],m=n[2],b=n[3],d=n[4],p=n[5],g=n[6],y=n[7],w=n[8],x=(0,r.FD)();return Math.abs(e-h)<=x*Math.max(1,Math.abs(e),Math.abs(h))&&Math.abs(a-M)<=x*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(o-m)<=x*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(i-b)<=x*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(u-d)<=x*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-p)<=x*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(f-g)<=x*Math.max(1,Math.abs(f),Math.abs(g))&&Math.abs(l-y)<=x*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(s-w)<=x*Math.max(1,Math.abs(s),Math.abs(w))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:h,fromRotation:function(t,n){let e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:u,isOrthoNormal:function(t){let n=(0,r.FD)(),e=t[0],a=t[1],o=t[2],i=t[3],u=t[4],c=t[5],f=t[6],l=t[7],s=t[8];return Math.abs(1-(e*e+i*i+f*f))<=n&&Math.abs(1-(a*a+u*u+l*l))<=n&&Math.abs(1-(o*o+c*c+s*s))<=n},mul:b,multiply:l,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let e=n[0],r=n[1],a=n[2],o=n[4],i=n[5],u=n[6],c=n[8],f=n[9],l=n[10],s=l*i-u*f,h=-l*o+u*c,M=f*o-i*c,m=e*s+r*h+a*M;if(!m)return null;let b=1/m;return t[0]=s*b,t[1]=(-l*r+a*f)*b,t[2]=(u*r-a*i)*b,t[3]=h*b,t[4]=(l*e-a*c)*b,t[5]=(-u*e+a*o)*b,t[6]=M*b,t[7]=(-f*e+r*c)*b,t[8]=(i*e-r*o)*b,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=Math.sin(e),M=Math.cos(e);return t[0]=M*r+h*i,t[1]=M*a+h*u,t[2]=M*o+h*c,t[3]=M*i-h*r,t[4]=M*u-h*a,t[5]=M*c-h*o,t[6]=f,t[7]=l,t[8]=s,t},scale:s,scaleByVec2:function(t,n,e){let r=e[0],a=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,e){let r=n[0],a=n[1],o=n[2],i=n[3],u=n[4],c=n[5],f=n[6],l=n[7],s=n[8],h=e[0],M=e[1];return t[0]=r,t[1]=a,t[2]=o,t[3]=i,t[4]=u,t[5]=c,t[6]=h*r+M*i+f,t[7]=h*a+M*u+l,t[8]=h*o+M*c+s,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},34727(t,n,e){e.d(n,{$8:()=>F,Cc:()=>u,Hx:()=>d,Io:()=>v,KJ:()=>l,OS:()=>k,Sp:()=>M,XM:()=>s,YN:()=>h,ZH:()=>b,b6:()=>P,cU:()=>a,gg:()=>m,hs:()=>c,kU:()=>f,mP:()=>i,or:()=>R,pF:()=>S,qE:()=>o});const r=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function o(t,n,e){return Math.min(Math.max(t,n),e)}function i(t,n){return 0===n?0:Math.ceil(t/n)*n}function u(t,n,e){return t+(n-t)*e}function c(t,n,e,r,a){return u(r,a,(t-n)/(e-n))}function f(t){return t*Math.PI/180}function l(t){return 180*t/Math.PI}function s(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function M(t,n,e=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=e}function m(t,n,e=1e-6){return!M(t,n,e)&&t>n}function b(t,n,e=1e-6){return!M(t,n,e)&&t<n}function d(t,n,e=1e-6){return M(t,n,e)||t>n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function g(t){return p.setFloat64(0,t),p.getBigInt64(0)}const y=1000000n,w=x(1);function x(t){let n=g(t=Math.abs(t)),e=function(t){return p.setBigInt64(0,t),p.getFloat64(0)}(n<=y?y:n-y);return Math.abs(t-e)}function v(t,n,e=w){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=e&&x(Math.min(Math.abs(t),Math.abs(n)))<e)return Math.abs(t-n)<=e;let r=g(t),a=g(n);return!(r<0!=a<0||(r<a?a-r:r-a)>y)}function P(t,n,e=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let r=Math.abs(t-n),a=Math.abs(t),o=Math.abs(n);if(0===t||0===n||a<1e-12&&o<1e-12){if(r>.01*e)return!1}else if(r/(a+o)>e)return!1;return!0}function F(t){return N(Math.max(-I,Math.min(t,I)))}function N(t){return r[0]=t,r[0]}function R(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],e=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(M(n,1)&&M(e,1)&&M(r,1))}function k(t,n){return(t%n+n)%n}const I=N(34028234663852886e22);function S(t,n,e){if(void 0===e||0==+e)return Math[t](n);if(n=+n,e=+e,isNaN(n)||"number"!=typeof e||e%1!=0)return NaN;let r=n.toString().split("e");return r=(n=Math[t](+(r[0]+"e"+(r[1]?+r[1]-e:-e)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+e:e))}e.d(n,["pq",0,I])},41360(t,n,e){e.r(n),e.d(n,{generateCombinationsPanoramicWorker:()=>M,generateCombinationsWorker:()=>h});var r=e(49186),a=e(34727),o=e(29242),i=e(77690);const u=[[2,-1],[0,1],[2,-1]];function c(t,n,e,i=!0){if(!Number.isFinite(t))throw new r.A("InvalidRotationAngle","Please specify a valid angle for rotation");let u=e*(i?(0,a.kU)(t):t),c=Math.cos(u),f=Math.sin(u),l=(0,o.vt)();switch(n){case 0:l[4]=c,l[5]=-f,l[7]=f,l[8]=c;break;case 1:l[0]=c,l[2]=f,l[6]=-f,l[8]=c;break;case 2:l[0]=c,l[1]=-f,l[3]=f,l[4]=c;break;default:throw new r.A("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return l}function f(t,n=!0){return function(t,n,e=!0){if(3!==t?.length||3!==n?.length)throw new r.A("InvalidRotationAngles","Please specify three angles with config for rotation");let a=(0,o.vt)();for(let r=0;r<3;r++){let[o,u]=n[r],f=c(t[r],o,u,e);(0,i.lw)(a,f,a)}return a}(t,u,n)}function l(t){return t>0?[-t,0,t]:[0]}function s(t,n){let{cameraHeading:e,cameraLocation:r}=t,{x:a,y:o,z:i,spatialReference:u}=r;if(!n||n.every(t=>0===t)||!n.length||!u)throw Error("Invalid parameters");let[c,f,s]=n,h=l(s),M=l(c),m=l(f),b=[];for(let n of h)for(let r of M)for(let c of m){let f={...t};f.cameraHeading=e+n,f.cameraLocation={x:a+r,y:o+r,z:i?i+c:0,spatialReference:{wkid:u.wkid}},b.push(f)}return b}function h(t){return function(t,n,e){let{cameraPitch:r,cameraRoll:a,cameraLocation:o}=t,{x:i,y:u,z:c,spatialReference:s}=o;if(n.every(t=>0===t)||!n||!n.length||!s)throw Error("Invalid parameters");let[h,M,m,b,d]=n,p=l(m),g=l(b),y=l(d),w=l(h),x=l(M),v=[];for(let n of g)for(let o of y)for(let l of w)for(let h of x)for(let M of p){let m={...t};m.cameraPitch=r+n,m.cameraRoll=a+o,m.rotationMatrix=f([e+M,m.cameraPitch,m.cameraRoll]),m.cameraLocation={x:i+l,y:u+l,z:c?c+h:0,spatialReference:{wkid:s.wkid}},v.push(m)}return v}(t.imageToWorldProps,t.accuracyParameters,t.cameraHeading)}function M(t){return s(t.imageToWorldProps,t.accuracyParameters)}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,f=0,h=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],f=e[1];let t=c,r=f;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<f&&(f=o),n>t&&(t=n),o>r&&(r=o)}h=Math.max(t-c,r-f),h=0===h?0:32767/h}return a(l,u,c,f,h),u}function s(e,t,n,r,i){let o=null;if(i===H(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=$(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=$(i/r|0,e[i],e[i+1],o);return o&&O(o,o.next)&&(D(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!O(s,s.next)&&0!==N(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,D(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=_(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{R.length<e&&(R=new Uint32Array(e),E=new Uint32Array(e),S=Array(e));for(let t=0;t<e;t++)R[t]=T[t].z;U(e,T,R,S,E,0),U(e,S,E,T,R,8),U(e,T,R,S,E,16),U(e,S,E,T,R,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),S.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(N(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),D(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=f(e,t),a=!0;continue}h(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),f=Math.min(l,a,u),h=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=h&&g.y>=f&&g.y<=p&&(i!==g.x||l!==g.y)&&B(i,l,o,a,s,u,g.x,g.y)&&N(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,f=o.y,h=s.y,p=Math.min(l,a,u),g=Math.min(c,f,h),d=Math.max(l,a,u),y=Math.max(c,f,h),m=_(p,g,t,n,r),x=_(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&B(l,c,a,f,u,h,v.x,v.y)&&N(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&B(l,c,a,f,u,h,w.x,w.y)&&N(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function f(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;P(i,n,n.next,o,!1)&&F(i,o)&&F(o,i)&&(t.push(i.i,n.i,o.i),D(n),D(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function h(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&Z(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(I(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(O(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(O(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),f=1/0;for(let t=0,h=0;t<x;t++,h+=4){if(m[h+2]<l||m[h]>i||m[h+3]<u||m[h+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&B(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(F(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<f||t===f&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,f=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return N(e.prev,e,t.prev)<0&&N(t.next,e,e.next)<0}const T=[];let S=[],R=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function _(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function I(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function B(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function Z(e,t){let n=O(e,t)&&N(e.prev,e,e.next)>0&&N(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||F(e,t)&&F(t,e)&&(0!==N(e.prev,e,t.prev)||0!==N(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&P(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function N(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function O(e,t){return e.x===t.x&&e.y===t.y}function P(e,t,n,r,i=!0){let o=N(e,t,n),s=N(e,t,r),l=N(n,r,e),a=N(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&j(e,n,t)||0===s&&j(e,r,t)||0===l&&j(n,e,r)||0===a&&j(n,t,r))}function j(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function F(e,t){return N(e.prev,e,e.next)<0?N(e,t,e.next)>=0&&N(e,e.prev,t)>=0:N(e,t,e.prev)<0||N(e,e.next,t)<0}function z(e,t){let n=k(e.i,e.x,e.y),r=k(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function $(e,t,n,r){let i=k(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function k(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function H(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,f=r-l,h=i-s,p=o-l,g=a*a+u*u,d=c*c+f*f,y=h*h+p*p,m=g+d+y;return a*(f*y-d*p)-u*(c*y-d*h)+g*(c*p-f*h)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(H(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(H(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,f=l+(i+1)%3,h=r[a],p=r[e],g=r[u],d=r[c],y=t[h*n],m=t[h*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=h;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[f]&&0===W[f]&&(W[f]=1,G[o++]=f)}}}},73354(e,t,n){n.d(t,{a:()=>f,b:()=>l,c:()=>i,d:()=>s,e:()=>h,f:()=>c,l:()=>u,n:()=>p,t:()=>o}),n(44208);var r=n(72727);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=n[0],c=n[1],f=n[2],h=n[4],p=n[5],g=n[6],d=n[8],y=n[9],m=n[10],x=n[12],v=n[13],w=n[14],A=0,b=0;for(let n=0;n<a;n++){let n=t[A],r=t[A+1],s=t[A+2];e[b]=u*n+h*r+d*s+x,e[b+1]=c*n+p*r+y*s+v,e[b+2]=f*n+g*r+m*s+w,A+=o,b+=i}return e}function s(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function l(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=n[0],c=n[1],f=n[2],h=n[3],p=n[4],g=n[5],d=n[6],y=n[7],m=n[8],x=0,v=0;for(let n=0;n<a;n++){let n=t[x],r=t[x+1],s=t[x+2];e[v]=u*n+h*r+d*s,e[v+1]=c*n+p*r+y*s,e[v+2]=f*n+g*r+m*s,x+=o,v+=i}}function a(e,t,n,r=3,i=r){let o=Math.min(e.length/r,t.length/i),s=0,l=0;for(let a=0;a<o;a++)e[l]=n*t[s],e[l+1]=n*t[s+1],e[l+2]=n*t[s+2],s+=i,l+=r;return e}function u(e,t,n,r){c(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,n,r,i=3,o=i){let s=Math.min(e.length/i,t.length/o),l=0,a=0,u=1/2.2;for(let c=0;c<s;c++)e[a]=r*(n*t[l])**u,e[a+1]=r*(n*t[l+1])**u,e[a+2]=r*(n*t[l+2])**u,l+=o,a+=i}function f(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=0,c=0;for(let r=0;r<a;r++)e[c]=t[u]+n[0],e[c+1]=t[u+1]+n[1],e[c+2]=t[u+2]+n[2],u+=o,c+=i;return e}function h(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,n=3,r=n){let i=Math.min(e.length/n,t.length/r),o=0,s=0;for(let l=0;l<i;l++){let i=t[o],l=t[o+1],a=t[o+2],u=i*i+l*l+a*a;if(u>0){let t=1/Math.sqrt(u);e[s]=t*i,e[s+1]=t*l,e[s+2]=t*a}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:p,normalizeView:h,scale:a,scaleView:function(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){let r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,l=t.typedBufferStride,a=0,u=0;for(let e=0;e<r;e++)i[u]=s[a]>>n,i[u+1]=s[a+1]>>n,i[u+2]=s[a+2]>>n,a+=l,u+=o},transformMat3:l,transformMat3View:s,transformMat4:o,transformMat4View:i,translate:f},Symbol.toStringTag,{value:"Module"}))},21287(e,t,n){n.d(t,{M5:()=>f,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function f(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.d(t,{A:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),f=n(51850),h=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),S=n(35522),R=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const _=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const I=(0,f.vt)(),B=(0,f.vt)(),Z=(0,f.vt)();var N=n(9093),O=n(5443),P=n(99917),j=n(98764),F=n(48353),z=n(9762),$=n(4197),D=n(73354);const k=(0,N.vt)(),H=(0,$.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function fe(e,t,n,r=f.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)he[n]=e[t+n]-r[n];(0,S.Z0)(he,he,de);for(let n=0;n<3;n++)e[t+n]=he[n]+r[n]}}}const he=(0,f.vt)(),pe=(0,N.vt)(),ge=(0,y.vt)(),de=(0,N.vt)(),ye=(0,se.vt)(),me=(0,f.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=f.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,S.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,f.vt)(),be=(0,f.vt)(),Me=(0,N.vt)(),Ce=(0,f.vt)();var Te,Se=n(9859);const Re={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(h.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.A,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,H);if((0,T.Hq)(n)&&e.transform&&(0,D.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,D.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,j.lO)(t),s=n.origin;if(!(0,P.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new O.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,F.l)(t,s,k,o),(0,D.t)(i,i,k),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=he;if(u.equals(n))(0,S.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let h=(0,le.O7)(pe,xe,f.uY,f.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,h,g);i.scale=(0,le.X_)((0,f.vt)(),d),(0,le.hs)(d,d,(0,S.DI)(he,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,f.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,j.lO)(r),o=me;if(!(0,R.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,R.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,F.l)(i,o,de,i),(0,oe.z0)(ye,de);let h=ge;(0,S.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),h[3]=t[3],(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ce(),r,i):(fe(u,h,3,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&(fe(c,h,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=f&&(fe(f,h,4),!(0,L.Mv)(f,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged():(0,L.CN)(ce(),i,r)):(0,L.CN)(ce(),r,i)}(e,t,o):function(e,t,n){let r=me;if((0,R.g)(n,r,e.spatialReference))fe(e.vertexAttributes.position,t,3,r),fe(e.vertexAttributes.normal,t,3),fe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,f.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,S.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let h=(0,S.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,f.uY,h,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,f.vt)(),m),(0,le.hs)(m,m,(0,S.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,f.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,j.lO)(r),o=Ce;if(!(0,R.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,R.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ve(),r,i):(we(u,t,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=f&&!(0,L.Mv)(f,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged():(0,L.CN)(ve(),i,r)):(0,L.CN)(ve(),r,i)}(e,t,o):function(e,t,n){let r=Ce;if((0,R.g)(n,r,e.spatialReference))we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=B,o=I;if(!(0,R.g)(t,o,e.spatialReference))return void(0,L.CN)(_(),t.spatialReference,e.spatialReference,L.JP);if(!(0,R.g)(n,i,e.spatialReference))return void(0,L.CN)(_(),n.spatialReference,e.spatialReference,L.JP);let s=(0,S.Re)(Z,o,i);r.origin=(0,S.WQ)((0,f.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,f.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,f.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=B,i=I;if((0,R.g)(t,i,e.spatialReference))if((0,R.g)(n,r,e.spatialReference))(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(_(),n.spatialReference,e.spatialReference,L.JP)}else(0,L.CN)(_(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({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(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Se.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.A({position:i}),components:[new m.A({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.A],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Re,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.A,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,f=null;const h=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){f=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==f}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),f=e.length/n*4,h=(0,r.mS)(i,new A(l,f*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,h.ptr,f);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:h.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=f;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,f=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+f):0}}(t,i),S=0,R=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),S=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],R=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,S*n),indices:o.slice(0,R),outlineIndices:i&&s?s.slice(0,E):h.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):h.outlineRingLengths,vertexCount:S,indexCount:R,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let _=(0,r.mS)(a,new b(u,S*n),!1),I=(0,r.mS)(a,new M(u,R),!1),B=(0,r.mS)(a,i?new M(u,E):null,!1),Z=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,_.ptr,S,n,I.ptr,R,g.ptr,d.ptr,B?.ptr??0,i?E:0,Z?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let N=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],O=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:_.slice(0,N*n),indices:I.slice(0,O),outlineIndices:i&&B?B.slice(0,P):h.outlineIndices,outlineRingLengths:i&&Z?Z.slice(0,j):h.outlineRingLengths,vertexCount:N,indexCount:O,outlineIndexCount:i?P:0,outlineRingCount:i?j:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,lc:()=>h,my:()=>s,tM:()=>p,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>u.length){let t=Math.max(2*u.length,e);u=new Uint8Array(t)}return new Uint8Array(u.buffer,0,e)}(e.length):i?p(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=g(131072),u=new Uint8Array(65536);const c=[0],f=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){if(e===c)return!0;if(!(0,r.iu)(e))return!1;let{buffer:t}=e;return t===f.buffer||t===a.buffer||t===u.buffer}function p(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let n=0;n<e;n++)t[n]=n;return t}(e):e<f.length?new Uint16Array(f.buffer,0,e):(e>a.length&&(a=g(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function g(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},16939(e,t,n){n.d(t,{A:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),f=n(80882),h=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,h.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(f.A,e):(0,u.PZ)(c.A,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:h.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.d(t,{A:()=>f});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let f=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.A.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.A.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],f.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],f)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.A.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.A.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.A.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.d(t,{A:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),f=n(97159),h=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:f.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,h.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.d(t,{A:()=>f});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let f=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.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"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},72727(e,t,n){function r(e,t,n){if(t<=0)return 0;let r=e-n;return r<0?0:Math.floor(r/t)+1}n.d(t,{k:()=>r}),n(53966)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>u,createWithExternalSource:()=>a});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461);function a(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),f={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},h=new l.O;return h.externalSources.push(f),new i.A({metadata:h,transform:u,vertexSpace:c,spatialReference:a})}function u(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.A({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(15070),n(9859)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(h):h(e.files);case"service":return e.assets.some(h);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||f.test(n)}return c.test(e.assetMimeType)||f.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>f,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>h,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>f,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,f=0;for(let r=0;r<e.length;r++){let h=e[r],p=a/3;for(let e of t)l[f++]=p+e;let g=h.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+h.uvOrigin[0],s[c++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===h.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*h.axis[e],o[u++]=h.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function f(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.A({faces:l,material:n.material}),new s.A({faces:a})],e}function h(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,f=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*h,w[1]=Math.cos(d)*h;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=f,l[c++]=f+1,l[c++]=f-n),1!==e&&(l[c++]=f,l[c++]=f-n,l[c++]=f-n-1)),f++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,f=0;for(let e=0;e<=5;e++){let n=0===e||5===e,h=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=h?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){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}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={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 m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.A({...c,uv:e.uv}),vertexSpace:r,components:[new s.A({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={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]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},9859(e,t,n){n.d(t,{uM:()=>P});var r=n(17676),i=(n(9762),n(4197)),o=(n(77690),n(29242)),s=(n(58083),n(9093)),l=n(35522),a=n(51850);n(48353),n(13030),(0,s.vt)(),(0,o.vt)(),(0,a.vt)(),(0,a.vt)(),(0,a.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},(0,a.vt)(),n(44208),n(53966);var u=n(62788),c=n(95488),f=n(83349),h=n(15585),p=n(95108),g=n(97146),d=n(34727),y=n(86211),m=n(27921);function x(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,y.GA)(r)/(0,y.G9)(r);return(0,m.lU)(e,(e,t)=>(0,l.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(v,e,t,n)?(0,m.Qj)(v):[0,0,1];return Math.abs(r[2])>Math.cos((0,d.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const v=(0,m.vt)(),w="auto",A=void 0,b=void 0,M=void 0;function C(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=B(i,t),o=e<3?2:x(i,e,n);if(r??=o,o!==r)return 2}return r??2}function T(e,t,n){if(!t)return!(0,p.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,p.$3)(e,1,2);case 1:return!(0,p.$3)(e,0,2);case 2:return!(0,p.$3)(e,0,1)}}const S=new c.I;let R=new WeakSet;function E(e,t){if(!(0,h.O9)())return Z("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:c}=(0,h.O5)(r,o,3,n),f=performance.now()-s;if(null!=t.owner&&f>250&&R.add(t.owner),l.length%3!=0)return Z("positions-not-multiple-of-3");let{positions:p,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),f=(0,i.yH)(n,c),{outlineIndexBuffer:h,outlineRingLengths:p}=U(a,f);return{positions:f,outlineIndexBuffer:(0,g.lC)(r,h,f.length/3),mergedOutlineRingLengths:(0,g.lC)(o,p,o.length+p.length)}}(e,t.outlines,l,u,c):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:p,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:p.length/3,method:"libtess"}}function L(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function U(e,t){let n=(0,g.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,g.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function _(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function I(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function B(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function Z(e){return{succeeded:!1,message:e}}class N{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}}class O extends N{}function P(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:l}=t??{},a="tessellated-indices"===o,c=C(e.rings,!!e.hasZ,e.spatialReference),p=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??C(e,n,o),l=e.length,a=[],u=[],c=[],f=[],h=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*h),d=0,y=r&&e[0]&&T(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=B(i,n);if(o<3){o>1&&f.push(i);continue}let l=!!r&&T(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=I(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=I(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of f)c.push({index:d,count:e.length}),d=I(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:c}),d=function(e,t){let n=function(e,t){let n={method:t?.method??w,projectionAxis:t?.projectionAxis??A,outlines:t?.outlines??b,owner:t?.owner??M},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&L(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return E(e,t);let n=function(e,t){let n=null!=t.owner&&R.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0,o=0;for(let s of e.polygons){let l=_(e.positions,s),a=(s.holeIndices??[]).map(e=>e-s.index),u=a.length>0?a:null,c=(0,f.e)(l,u,3),h=f.e.deviation(l,a,3,c);if(n&&h>1e-5)return E(e,t);r.push({indices:c,index:s.index}),i+=c.length,o=Math.max(o,h)}let s=(0,g.my)(i,e.positions.length/3),l=0;for(let e of r)for(let t=0;t<e.indices.length;t++)s[l++]=e.indices[t]+e.index;let{outlineIndexBuffer:a,outlineRingLengths:u}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:U(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,g.uW)(s),outlineIndexBuffer:a,outlineRingLengths:u,vertexCount:e.positions.length/3,method:"earcut",deviation:o}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&L(t,2,r),L(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,u.gc)(S),async function(){try{await(0,h.l3)(),S.notify()}catch(e){throw e}}())}(p,{projectionAxis:n?c:void 0,outlines:a?p.outlines:void 0,method:s,owner:l});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===p.positions?p.positions.slice():p.positions;y={output:"vertex-data",outlines:j(p.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new O(d.positions,d.indices,y,!0)}function j(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new z(e,r,(0,i.l5)(t,o,s)):new $(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function F(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class z{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class $ extends z{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,f=0,h=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],f=e[1];let t=c,r=f;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<f&&(f=o),n>t&&(t=n),o>r&&(r=o)}h=Math.max(t-c,r-f),h=0===h?0:32767/h}return a(l,u,c,f,h),u}function s(e,t,n,r,i){let o=null;if(i===H(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=$(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=$(i/r|0,e[i],e[i+1],o);return o&&O(o,o.next)&&(D(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!O(s,s.next)&&0!==N(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,D(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=_(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{R.length<e&&(R=new Uint32Array(e),E=new Uint32Array(e),S=Array(e));for(let t=0;t<e;t++)R[t]=T[t].z;U(e,T,R,S,E,0),U(e,S,E,T,R,8),U(e,T,R,S,E,16),U(e,S,E,T,R,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),S.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(N(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),D(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=f(e,t),a=!0;continue}h(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),f=Math.min(l,a,u),h=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=h&&g.y>=f&&g.y<=p&&(i!==g.x||l!==g.y)&&B(i,l,o,a,s,u,g.x,g.y)&&N(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,f=o.y,h=s.y,p=Math.min(l,a,u),g=Math.min(c,f,h),d=Math.max(l,a,u),y=Math.max(c,f,h),m=_(p,g,t,n,r),x=_(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&B(l,c,a,f,u,h,v.x,v.y)&&N(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&B(l,c,a,f,u,h,w.x,w.y)&&N(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function f(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;P(i,n,n.next,o,!1)&&F(i,o)&&F(o,i)&&(t.push(i.i,n.i,o.i),D(n),D(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function h(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&Z(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(I(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(O(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(O(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),f=1/0;for(let t=0,h=0;t<x;t++,h+=4){if(m[h+2]<l||m[h]>i||m[h+3]<u||m[h+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&B(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(F(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<f||t===f&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,f=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return N(e.prev,e,t.prev)<0&&N(t.next,e,e.next)<0}const T=[];let S=[],R=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function _(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function I(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function B(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function Z(e,t){let n=O(e,t)&&N(e.prev,e,e.next)>0&&N(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||F(e,t)&&F(t,e)&&(0!==N(e.prev,e,t.prev)||0!==N(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&P(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function N(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function O(e,t){return e.x===t.x&&e.y===t.y}function P(e,t,n,r,i=!0){let o=N(e,t,n),s=N(e,t,r),l=N(n,r,e),a=N(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&j(e,n,t)||0===s&&j(e,r,t)||0===l&&j(n,e,r)||0===a&&j(n,t,r))}function j(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function F(e,t){return N(e.prev,e,e.next)<0?N(e,t,e.next)>=0&&N(e,e.prev,t)>=0:N(e,t,e.prev)<0||N(e,e.next,t)<0}function z(e,t){let n=k(e.i,e.x,e.y),r=k(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function $(e,t,n,r){let i=k(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function D(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function k(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function H(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,f=r-l,h=i-s,p=o-l,g=a*a+u*u,d=c*c+f*f,y=h*h+p*p,m=g+d+y;return a*(f*y-d*p)-u*(c*y-d*h)+g*(c*p-f*h)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(H(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(H(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,f=l+(i+1)%3,h=r[a],p=r[e],g=r[u],d=r[c],y=t[h*n],m=t[h*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=h;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[f]&&0===W[f]&&(W[f]=1,G[o++]=f)}}}},73354(e,t,n){n.d(t,{a:()=>f,b:()=>l,c:()=>i,d:()=>s,e:()=>h,f:()=>c,l:()=>u,n:()=>p,t:()=>o}),n(44208);var r=n(72727);function i(e,t,n){o(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function o(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=n[0],c=n[1],f=n[2],h=n[4],p=n[5],g=n[6],d=n[8],y=n[9],m=n[10],x=n[12],v=n[13],w=n[14],A=0,b=0;for(let n=0;n<a;n++){let n=t[A],r=t[A+1],s=t[A+2];e[b]=u*n+h*r+d*s+x,e[b+1]=c*n+p*r+y*s+v,e[b+2]=f*n+g*r+m*s+w,A+=o,b+=i}return e}function s(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function l(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=n[0],c=n[1],f=n[2],h=n[3],p=n[4],g=n[5],d=n[6],y=n[7],m=n[8],x=0,v=0;for(let n=0;n<a;n++){let n=t[x],r=t[x+1],s=t[x+2];e[v]=u*n+h*r+d*s,e[v+1]=c*n+p*r+y*s,e[v+2]=f*n+g*r+m*s,x+=o,v+=i}}function a(e,t,n,r=3,i=r){let o=Math.min(e.length/r,t.length/i),s=0,l=0;for(let a=0;a<o;a++)e[l]=n*t[s],e[l+1]=n*t[s+1],e[l+2]=n*t[s+2],s+=i,l+=r;return e}function u(e,t,n,r){c(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,n,r,i=3,o=i){let s=Math.min(e.length/i,t.length/o),l=0,a=0,u=1/2.2;for(let c=0;c<s;c++)e[a]=r*(n*t[l])**u,e[a+1]=r*(n*t[l+1])**u,e[a+2]=r*(n*t[l+2])**u,l+=o,a+=i}function f(e,t,n,i=3,o=i){let s=(0,r.k)(e.length,i,3),l=(0,r.k)(t.length,o,3),a=Math.min(s,l),u=0,c=0;for(let r=0;r<a;r++)e[c]=t[u]+n[0],e[c+1]=t[u+1]+n[1],e[c+2]=t[u+2]+n[2],u+=o,c+=i;return e}function h(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,n=3,r=n){let i=Math.min(e.length/n,t.length/r),o=0,s=0;for(let l=0;l<i;l++){let i=t[o],l=t[o+1],a=t[o+2],u=i*i+l*l+a*a;if(u>0){let t=1/Math.sqrt(u);e[s]=t*i,e[s+1]=t*l,e[s+2]=t*a}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:p,normalizeView:h,scale:a,scaleView:function(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){let r=Math.min(e.count,t.count),i=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,l=t.typedBufferStride,a=0,u=0;for(let e=0;e<r;e++)i[u]=s[a]>>n,i[u+1]=s[a+1]>>n,i[u+2]=s[a+2]>>n,a+=l,u+=o},transformMat3:l,transformMat3View:s,transformMat4:o,transformMat4View:i,translate:f},Symbol.toStringTag,{value:"Module"}))},21287(e,t,n){n.d(t,{M5:()=>f,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function f(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.d(t,{A:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),f=n(51850),h=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),S=n(35522),R=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const _=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const I=(0,f.vt)(),B=(0,f.vt)(),Z=(0,f.vt)();var N=n(9093),O=n(5443),P=n(99917),j=n(98764),F=n(48353),z=n(9762),$=n(4197),D=n(73354);const k=(0,N.vt)(),H=(0,$.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function fe(e,t,n,r=f.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)he[n]=e[t+n]-r[n];(0,S.Z0)(he,he,de);for(let n=0;n<3;n++)e[t+n]=he[n]+r[n]}}}const he=(0,f.vt)(),pe=(0,N.vt)(),ge=(0,y.vt)(),de=(0,N.vt)(),ye=(0,se.vt)(),me=(0,f.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=f.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,S.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,f.vt)(),be=(0,f.vt)(),Me=(0,N.vt)(),Ce=(0,f.vt)();var Te,Se=n(9859);const Re={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(h.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.A,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,H);if((0,T.Hq)(n)&&e.transform&&(0,D.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,D.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,j.lO)(t),s=n.origin;if(!(0,P.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new O.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,F.l)(t,s,k,o),(0,D.t)(i,i,k),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=he;if(u.equals(n))(0,S.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let h=(0,le.O7)(pe,xe,f.uY,f.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,h,g);i.scale=(0,le.X_)((0,f.vt)(),d),(0,le.hs)(d,d,(0,S.DI)(he,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,f.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,j.lO)(r),o=me;if(!(0,R.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,R.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,F.l)(i,o,de,i),(0,oe.z0)(ye,de);let h=ge;(0,S.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),h[3]=t[3],(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ce(),r,i):(fe(u,h,3,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&(fe(c,h,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=f&&(fe(f,h,4),!(0,L.Mv)(f,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged():(0,L.CN)(ce(),i,r)):(0,L.CN)(ce(),r,i)}(e,t,o):function(e,t,n){let r=me;if((0,R.g)(n,r,e.spatialReference))fe(e.vertexAttributes.position,t,3,r),fe(e.vertexAttributes.normal,t,3),fe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,f.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,S.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let h=(0,S.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,f.uY,h,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,f.vt)(),m),(0,le.hs)(m,m,(0,S.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,f.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,j.lO)(r),o=Ce;if(!(0,R.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,R.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),f=null==a?null:new Float32Array(a.length);(0,L.gr)(s,r,u,i)?null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=f&&!(0,L.xA)(a,s,r,u,i,f)?(0,L.CN)(ve(),r,i):(we(u,t,o),(0,L.$5)(u,i,s,r)?null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=f&&!(0,L.Mv)(f,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged():(0,L.CN)(ve(),i,r)):(0,L.CN)(ve(),r,i)}(e,t,o):function(e,t,n){let r=Ce;if((0,R.g)(n,r,e.spatialReference))we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=B,o=I;if(!(0,R.g)(t,o,e.spatialReference))return void(0,L.CN)(_(),t.spatialReference,e.spatialReference,L.JP);if(!(0,R.g)(n,i,e.spatialReference))return void(0,L.CN)(_(),n.spatialReference,e.spatialReference,L.JP);let s=(0,S.Re)(Z,o,i);r.origin=(0,S.WQ)((0,f.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,f.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,f.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=B,i=I;if((0,R.g)(t,i,e.spatialReference))if((0,R.g)(n,r,e.spatialReference))(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged();else{let t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,(0,L.CN)(_(),n.spatialReference,e.spatialReference,L.JP)}else(0,L.CN)(_(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({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(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Se.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.A({position:i}),components:[new m.A({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.A],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Re,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.A,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,f=null;const h=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){f=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==f}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),f=e.length/n*4,h=(0,r.mS)(i,new A(l,f*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,h.ptr,f);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:h.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=f;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,f=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+f):0}}(t,i),S=0,R=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),S=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],R=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,S*n),indices:o.slice(0,R),outlineIndices:i&&s?s.slice(0,E):h.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):h.outlineRingLengths,vertexCount:S,indexCount:R,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let _=(0,r.mS)(a,new b(u,S*n),!1),I=(0,r.mS)(a,new M(u,R),!1),B=(0,r.mS)(a,i?new M(u,E):null,!1),Z=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,_.ptr,S,n,I.ptr,R,g.ptr,d.ptr,B?.ptr??0,i?E:0,Z?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),h;let N=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],O=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:_.slice(0,N*n),indices:I.slice(0,O),outlineIndices:i&&B?B.slice(0,P):h.outlineIndices,outlineRingLengths:i&&Z?Z.slice(0,j):h.outlineRingLengths,vertexCount:N,indexCount:O,outlineIndexCount:i?P:0,outlineRingCount:i?j:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,lc:()=>h,my:()=>s,tM:()=>p,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return c;if(e<1024)return Array(e).fill(0);if(e>u.length){let t=Math.max(2*u.length,e);u=new Uint8Array(t)}return new Uint8Array(u.buffer,0,e)}(e.length):i?p(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=g(131072),u=new Uint8Array(65536);const c=[0],f=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){if(e===c)return!0;if(!(0,r.iu)(e))return!1;let{buffer:t}=e;return t===f.buffer||t===a.buffer||t===u.buffer}function p(e){return 1===e?c:e<1024?function(e){let t=Array(e).fill(0);for(let n=0;n<e;n++)t[n]=n;return t}(e):e<f.length?new Uint16Array(f.buffer,0,e):(e>a.length&&(a=g(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function g(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}},16939(e,t,n){n.d(t,{A:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),f=n(80882),h=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,h.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(f.A,e):(0,u.PZ)(c.A,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:h.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.d(t,{A:()=>f});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let f=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.A.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.A.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],f.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.A,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],f)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.A.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.A.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.A.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.A,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.d(t,{A:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),f=n(97159),h=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:f.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,h.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.d(t,{A:()=>f});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let f=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.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"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},72727(e,t,n){function r(e,t,n){if(t<=0)return 0;let r=e-n;return r<0?0:Math.floor(r/t)+1}n.d(t,{k:()=>r}),n(53966)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>u,createWithExternalSource:()=>a});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461);function a(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),f={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},h=new l.O;return h.externalSources.push(f),new i.A({metadata:h,transform:u,vertexSpace:c,spatialReference:a})}function u(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.A({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(15070),n(9859)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(h):h(e.files);case"service":return e.assets.some(h);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function h(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||f.test(n)}return c.test(e.assetMimeType)||f.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>f,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>h,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>f,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,f=0;for(let r=0;r<e.length;r++){let h=e[r],p=a/3;for(let e of t)l[f++]=p+e;let g=h.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+h.uvOrigin[0],s[c++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===h.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*h.axis[e],o[u++]=h.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function f(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.A({faces:l,material:n.material}),new s.A({faces:a})],e}function h(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,f=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*h,w[1]=Math.cos(d)*h;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=f,l[c++]=f+1,l[c++]=f-n),1!==e&&(l[c++]=f,l[c++]=f-n,l[c++]=f-n-1)),f++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,f=0;for(let e=0;e<=5;e++){let n=0===e||5===e,h=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=h?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){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}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={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 m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.A({...c,uv:e.uv}),vertexSpace:r,components:[new s.A({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={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]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},9859(e,t,n){n.d(t,{uM:()=>O});var r=n(17676),i=(n(9762),n(4197)),o=(n(77690),n(29242)),s=n(35522),l=n(51850);n(48353),n(13030),(0,o.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},n(44208),n(53966);var a=n(62788),u=n(95488),c=n(83349),f=n(15585),h=n(95108),p=n(97146),g=n(34727),d=n(86211),y=n(27921);function m(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,d.GA)(r)/(0,d.G9)(r);return(0,y.lU)(e,(e,t)=>(0,s.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(x,e,t,n)?(0,y.Qj)(x):[0,0,1];return Math.abs(r[2])>Math.cos((0,g.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const x=(0,y.vt)(),v="auto",w=void 0,A=void 0,b=void 0;function M(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=I(i,t),o=e<3?2:m(i,e,n);if(r??=o,o!==r)return 2}return r??2}function C(e,t,n){if(!t)return!(0,h.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,h.$3)(e,1,2);case 1:return!(0,h.$3)(e,0,2);case 2:return!(0,h.$3)(e,0,1)}}const T=new u.I;let S=new WeakSet;function R(e,t){if(!(0,f.O9)())return B("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:c}=(0,f.O5)(r,o,3,n),h=performance.now()-s;if(null!=t.owner&&h>250&&S.add(t.owner),l.length%3!=0)return B("positions-not-multiple-of-3");let{positions:g,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),f=(0,i.yH)(n,c),{outlineIndexBuffer:h,outlineRingLengths:g}=L(a,f);return{positions:f,outlineIndexBuffer:(0,p.lC)(r,h,f.length/3),mergedOutlineRingLengths:(0,p.lC)(o,g,o.length+g.length)}}(e,t.outlines,l,u,c):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:g,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:g.length/3,method:"libtess"}}function E(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function L(e,t){let n=(0,p.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,p.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function U(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function _(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function I(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function B(e){return{succeeded:!1,message:e}}class Z{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=j(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=j(e.outlineIndices[n]);return t}}class N extends Z{}function O(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:l}=t??{},u="tessellated-indices"===o,h=M(e.rings,!!e.hasZ,e.spatialReference),g=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??M(e,n,o),l=e.length,a=[],u=[],c=[],f=[],h=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*h),d=0,y=r&&e[0]&&C(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=I(i,n);if(o<3){o>1&&f.push(i);continue}let l=!!r&&C(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=_(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=_(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of f)c.push({index:d,count:e.length}),d=_(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:h}),d=function(e,t){let n=function(e,t){let n={method:t?.method??v,projectionAxis:t?.projectionAxis??w,outlines:t?.outlines??A,owner:t?.owner??b},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&E(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return R(e,t);let n=function(e,t){let n=null!=t.owner&&S.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0,o=0;for(let s of e.polygons){let l=U(e.positions,s),a=(s.holeIndices??[]).map(e=>e-s.index),u=a.length>0?a:null,f=(0,c.e)(l,u,3),h=c.e.deviation(l,a,3,f);if(n&&h>1e-5)return R(e,t);r.push({indices:f,index:s.index}),i+=f.length,o=Math.max(o,h)}let s=(0,p.my)(i,e.positions.length/3),l=0;for(let e of r)for(let t=0;t<e.indices.length;t++)s[l++]=e.indices[t]+e.index;let{outlineIndexBuffer:a,outlineRingLengths:u}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:L(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,p.uW)(s),outlineIndexBuffer:a,outlineRingLengths:u,vertexCount:e.positions.length/3,method:"earcut",deviation:o}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&E(t,2,r),E(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,a.gc)(T),async function(){try{await(0,f.l3)(),T.notify()}catch(e){throw e}}())}(g,{projectionAxis:n?h:void 0,outlines:u?g.outlines:void 0,method:s,owner:l});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===g.positions?g.positions.slice():g.positions;y={output:"vertex-data",outlines:P(g.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new N(d.positions,d.indices,y,!0)}function P(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new F(e,r,(0,i.l5)(t,o,s)):new z(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function j(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class F{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class z extends F{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
|